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 TestHeadBroadcaster_TrackableCallbackTimeout(t *testing.T) {
t.Parallel()
lggr := logger.TestLogger(t)
broadcaster := headtracker.NewHeadBroadcaster(lggr)
err := broadcaster.Start()
require.NoError(t, err)
slowAwaiter := cltest.NewAwaiter()
fastAwaiter := cltest.NewAwaiter()
slow := &sleepySubscriber{aw... | explode_data.jsonl/19968 | {
"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,
12346,
68324,
32020,
21038,
473,
480,
7494,
7636,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
8810,
70,
901,
1669,
5925,
8787,
7395,
1155,
340,
2233,
8546,
32020,
1669,
1968,
50395,
7121,
12346,
68324,
32020,
2333,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewFunc(t *testing.T) {
t.Parallel()
tests := []struct {
Signature string
Returns string
WantFunc *Func
}{
{
Signature: "transfer(address,uint256)",
Returns: "bool",
WantFunc: &Func{
Signature: "transfer(address,uint256)",
Selector: [4]byte{0xa9, 0x05, 0x9c, 0xbb},
},
},... | explode_data.jsonl/68053 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 433
} | [
2830,
3393,
3564,
9626,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
78216,
1669,
3056,
1235,
341,
197,
197,
25088,
914,
198,
197,
76086,
256,
914,
198,
197,
17300,
517,
9626,
220,
353,
9626,
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... | 3 |
func TestDownStatuses(t *testing.T) {
for _, status := range downStatuses {
status := status
t.Run(fmt.Sprintf("test down status %d", status), func(t *testing.T) {
server, event := checkServer(t, hbtest.HelloWorldHandler(status))
port, err := hbtest.ServerPort(server)
require.NoError(t, err)
mapvaltes... | explode_data.jsonl/39390 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 287
} | [
2830,
3393,
4454,
2522,
288,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
2639,
1669,
2088,
1495,
2522,
288,
341,
197,
23847,
1669,
2639,
198,
197,
3244,
16708,
28197,
17305,
445,
1944,
1495,
2639,
1018,
67,
497,
2639,
701,
2915,
1155,
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 TestCollateral(t *testing.T) {
client := v1.New(&v1.Config{
Key: os.Getenv("BFKEY"),
Secret: os.Getenv("BFSECRET"),
})
col, err := client.Collateral(collateral.New())
assert.NoError(t, err)
fmt.Printf("%+v\n", col)
} | explode_data.jsonl/41202 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 105
} | [
2830,
3393,
15265,
19165,
1155,
353,
8840,
836,
8,
341,
25291,
1669,
348,
16,
7121,
2099,
85,
16,
10753,
515,
197,
55242,
25,
262,
2643,
64883,
445,
19883,
4784,
4461,
197,
7568,
50856,
25,
2643,
64883,
445,
19883,
65310,
4461,
197,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestObfuscateSQLErrors(t *testing.T) {
helpers.ResetMemoryStats()
testCases := []struct {
input string
expected string
}{
{"\"\"", "result is empty"},
{"{1: 2}", "argument 1 must be str(ing)?, not dict"},
{"None", "argument 1 must be str(ing)?, not None"},
}
for _, c := range testCases {
code... | explode_data.jsonl/24562 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 338
} | [
2830,
3393,
4121,
51589,
349,
64308,
867,
634,
1087,
1155,
353,
8840,
836,
8,
341,
197,
21723,
36660,
10642,
16635,
2822,
18185,
37302,
1669,
3056,
1235,
341,
197,
22427,
262,
914,
198,
197,
42400,
914,
198,
197,
59403,
197,
197,
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... | 5 |
func TestModuleDecl(t *testing.T) {
factory := NewCompleteIdlLexerFactoryImpl(
log.New(os.Stdout, "test", 0),
scopedObjects.NewNextNumber(),
scoping.NewScopingContext("", scoping.NewDefaultTypeService(), nil))
t.Run("Empty Module", func(t *testing.T) {
stream := fmt.Sprintf(`
module ABC
{
};`)
con... | explode_data.jsonl/22917 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1551
} | [
2830,
3393,
3332,
21629,
1155,
353,
8840,
836,
8,
341,
1166,
2919,
1669,
1532,
12548,
764,
75,
92847,
4153,
9673,
1006,
197,
6725,
7121,
9638,
83225,
11,
330,
1944,
497,
220,
15,
1326,
197,
29928,
16367,
11543,
7121,
5847,
2833,
3148,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestResponseWriter(t *testing.T) {
rc := httptest.NewRecorder()
rw := newResponseWriter(rc, true)
_, err := rw.Write([]byte("test"))
assert.NoError(t, err)
rw.WriteHeader(202)
assert.Equal(t, 202, rw.status, "status expected 202 but got %d", rw.status)
assert.Len(t, rw.Header(), 1, "Header count expected ... | explode_data.jsonl/52413 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 183
} | [
2830,
3393,
2582,
6492,
1155,
353,
8840,
836,
8,
341,
30295,
1669,
54320,
70334,
7121,
47023,
741,
7000,
86,
1669,
501,
2582,
6492,
35429,
11,
830,
692,
197,
6878,
1848,
1669,
25991,
4073,
10556,
3782,
445,
1944,
5455,
6948,
35699,
1155... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestSimplyOuterJoinWithOnlyOuterExpr(t *testing.T) {
s := createPlannerSuite()
sql := "select * from t t1 right join t t0 ON TRUE where CONCAT_WS(t0.e=t0.e, 0, NULL) IS NULL"
ctx := context.TODO()
stmt, err := s.p.ParseOneStmt(sql, "", "")
require.NoError(t, err)
err = Preprocess(s.ctx, stmt, WithPreprocesso... | explode_data.jsonl/50235 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 365
} | [
2830,
3393,
60246,
51322,
12292,
2354,
7308,
51322,
16041,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
1855,
2120,
4887,
28000,
741,
30633,
1669,
330,
1742,
353,
504,
259,
259,
16,
1290,
5138,
259,
259,
15,
6197,
8214,
1380,
78143,
68388,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestActivityService_MarkThreadRead(t *testing.T) {
setup()
defer teardown()
mux.HandleFunc("/notifications/threads/1", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "PATCH")
w.WriteHeader(http.StatusResetContent)
})
_, err := client.Activity.MarkThreadRead("1")
if err != nil {
t.Err... | explode_data.jsonl/6720 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 142
} | [
2830,
3393,
4052,
1860,
1245,
838,
6855,
4418,
1155,
353,
8840,
836,
8,
341,
84571,
741,
16867,
49304,
2822,
2109,
2200,
63623,
4283,
38188,
14,
27286,
14,
16,
497,
2915,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
197,
18185... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestPatternView(t *testing.T) {
// setup current context
utils.SetupContextEnv(t)
// initialize mock server for handling requests
utils.StartMockery(t)
// create a test helper
testContext := utils.NewTestHelper(t)
// get current directory
_, filename, _, ok := runtime.Caller(0)
if !ok {
t.Fatal("Not ... | explode_data.jsonl/5657 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1420
} | [
2830,
3393,
15760,
851,
1155,
353,
8840,
836,
8,
341,
197,
322,
6505,
1482,
2266,
198,
80206,
39820,
1972,
14359,
1155,
692,
197,
322,
9468,
7860,
3538,
369,
11589,
7388,
198,
80206,
12101,
11571,
722,
1155,
692,
197,
322,
1855,
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... | 5 |
func Test_getFrom_fail(t *testing.T) {
address1 := &address.Address{}
envHandleUintptr := uintptr(unsafe.Pointer(address1))
jvmsCached, _ = lru.New(1000)
from := getFrom(envHandleUintptr)
assert.Equal(t, "", from)
jvmTestEnv := setupTestEnv()
jvmsCached.Add(envHandleUintptr, jvmTestEnv.jvm)
from = getFrom(env... | explode_data.jsonl/38985 | {
"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,
3062,
3830,
22121,
1155,
353,
8840,
836,
8,
341,
63202,
16,
1669,
609,
4995,
26979,
16094,
57538,
6999,
21570,
3505,
1669,
38190,
7,
38157,
41275,
15434,
16,
1171,
12428,
85,
1011,
70293,
11,
716,
284,
326,
2672,
7121,
7,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestFailingDefaultEnforced(t *testing.T) {
tests := []struct {
definition string
expectedError error
}{
{
definition: `
package foo
type Blah struct {
// +default=5
Int int
} `,
expectedError: fmt.Errorf("failed to generate default in base/foo.Blah: Int: invalid default value (5) for non-pointe... | explode_data.jsonl/3353 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 572
} | [
2830,
3393,
37,
14277,
3675,
1702,
24246,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
7452,
4054,
262,
914,
198,
197,
42400,
1454,
1465,
198,
197,
59403,
197,
197,
515,
298,
7452,
4054,
25,
22074,
1722,
15229,
271... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestPlayback(t *testing.T) {
p := Playback{}
if s := p.String(); s != "playback" {
t.Fatal(s)
}
if err := p.Close(); err != nil {
t.Fatal(err)
}
} | explode_data.jsonl/44852 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 77
} | [
2830,
3393,
87125,
1155,
353,
8840,
836,
8,
341,
3223,
1669,
95301,
16094,
743,
274,
1669,
281,
6431,
2129,
274,
961,
330,
1363,
1419,
1,
341,
197,
3244,
26133,
1141,
340,
197,
532,
743,
1848,
1669,
281,
10421,
2129,
1848,
961,
2092,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParseImportAliases(t *testing.T) {
searchDir := "testdata/alias_import"
p := New()
err := p.ParseAPI(searchDir, mainAPIFile, defaultParseDepth)
assert.NoError(t, err)
expected, err := ioutil.ReadFile(filepath.Join(searchDir, "expected.json"))
assert.NoError(t, err)
b, _ := json.MarshalIndent(p.swagger... | explode_data.jsonl/63561 | {
"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,
14463,
11511,
95209,
1155,
353,
8840,
836,
8,
341,
45573,
6184,
1669,
330,
92425,
14,
14956,
18434,
698,
3223,
1669,
1532,
741,
9859,
1669,
281,
8937,
7082,
20447,
6184,
11,
1887,
7082,
1703,
11,
1638,
14463,
19776,
340,
694... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestIssue106(t *testing.T) {
m1 := struct {
I uint32
}{I: ^uint32(0)}
m2 := struct {
I int32
}{}
b, err := Marshal(&m1)
if err != nil {
t.Fatal(err)
}
if err := Unmarshal(b, &m2); err != nil {
t.Fatal(err)
}
if m2.I != -1 {
t.Error("unexpected value:", m2.I)
}
} | explode_data.jsonl/52779 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 150
} | [
2830,
3393,
42006,
16,
15,
21,
1155,
353,
8840,
836,
8,
341,
2109,
16,
1669,
2036,
341,
197,
24486,
2622,
18,
17,
198,
197,
15170,
40,
25,
6306,
2496,
18,
17,
7,
15,
73822,
2109,
17,
1669,
2036,
341,
197,
24486,
526,
18,
17,
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... | 4 |
func TestValidateMacaroon(t *testing.T) {
// First, initialize the service and unlock it.
tempDir := setupTestRootKeyStorage(t)
defer os.RemoveAll(tempDir)
service, err := macaroons.NewService(tempDir, macaroons.IPLockChecker)
defer service.Close()
if err != nil {
t.Fatalf("Error creating new service: %v", err)... | explode_data.jsonl/3155 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 454
} | [
2830,
3393,
17926,
19552,
277,
9009,
1155,
353,
8840,
836,
8,
341,
197,
322,
5512,
11,
9468,
279,
2473,
323,
15055,
432,
624,
16280,
6184,
1669,
6505,
2271,
8439,
1592,
5793,
1155,
340,
16867,
2643,
84427,
9758,
6184,
340,
52934,
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 TestGenerateCassandraStatefulSet(t *testing.T) {
assert := assert.New(t)
dcName := "dc1"
rackName := "rack1"
dcRackName := fmt.Sprintf("%s-%s", dcName, rackName)
_, cc := HelperInitCluster(t, "cassandracluster-2DC.yaml")
ccDefault := cc.DeepCopy()
cc.CheckDefaults()
labels, nodeSelector := k8s.DCRackLabel... | explode_data.jsonl/54114 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1383
} | [
2830,
3393,
31115,
34,
70093,
1397,
1262,
1649,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
340,
87249,
675,
1669,
330,
7628,
16,
698,
7000,
473,
675,
1669,
330,
71685,
16,
698,
87249,
49,
473,
675,
1669,
8879,
17305,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestACLReplication_Sorter(t *testing.T) {
acls := structs.ACLs{
&structs.ACL{ID: "a"},
&structs.ACL{ID: "b"},
&structs.ACL{ID: "c"},
}
sorter := &aclIterator{acls, 0}
if len := sorter.Len(); len != 3 {
t.Fatalf("bad: %d", len)
}
if !sorter.Less(0, 1) {
t.Fatalf("should be less")
}
if sorter.Less... | explode_data.jsonl/34820 | {
"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,
55393,
18327,
1693,
1098,
371,
261,
1155,
353,
8840,
836,
8,
341,
11323,
18074,
1669,
62845,
875,
3140,
82,
515,
197,
197,
5,
1235,
82,
875,
3140,
90,
915,
25,
330,
64,
7115,
197,
197,
5,
1235,
82,
875,
3140,
90,
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,
1,
1,
1,
1,
1... | 8 |
func TestBuild_zipfileUrl(t *testing.T) {
tests := []struct {
name string
json string
want string
}{
{
name: "Simple test with valid url",
json: `
{
"start_time": "Mon, 19 Apr 2021 12:15:47 GMT",
"version": "8.0.0-SNAPSHOT",
"build_id": "8.0.0-ab7cd914",
"projects": {
"e... | explode_data.jsonl/60127 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 570
} | [
2830,
3393,
11066,
42131,
1192,
2864,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
256,
914,
198,
197,
30847,
256,
914,
198,
197,
50780,
256,
914,
198,
197,
59403,
197,
197,
515,
298,
11609,
25,
330,
16374,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestNewFrom(t *testing.T) {
gtest.C(t, func(t *gtest.T) {
s1 := gset.NewFrom("a")
s2 := gset.NewFrom("b", false)
s3 := gset.NewFrom(3, true)
s4 := gset.NewFrom([]string{"s1", "s2"}, true)
t.Assert(s1.Contains("a"), true)
t.Assert(s2.Contains("b"), true)
t.Assert(s3.Contains(3), true)
t.Assert(s4.C... | explode_data.jsonl/34388 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 198
} | [
2830,
3393,
3564,
3830,
1155,
353,
8840,
836,
8,
341,
3174,
1944,
727,
1155,
11,
2915,
1155,
353,
82038,
836,
8,
341,
197,
1903,
16,
1669,
342,
746,
7121,
3830,
445,
64,
1138,
197,
1903,
17,
1669,
342,
746,
7121,
3830,
445,
65,
49... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHTTPTask_Variables(t *testing.T) {
t.Parallel()
validMeta := map[string]interface{}{"theMeta": "yes"}
tests := []struct {
name string
requestData string
meta pipeline.JSONSerializable
inputs []pipeline.Result
vars pipeli... | explode_data.jsonl/81343 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1826
} | [
2830,
3393,
2545,
51,
2828,
1073,
83932,
82,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
56322,
12175,
1669,
2415,
14032,
31344,
6257,
4913,
1782,
12175,
788,
330,
9693,
63159,
78216,
1669,
3056,
1235,
341,
197,
11609,
1698,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEntry_SelectHomeEnd(t *testing.T) {
e, window := setupSelection(false)
defer teardownImageTest(window)
c := window.Canvas()
test.AssertImageMatches(t, "entry/selection_initial.png", c.Capture())
// T e[s t i] n g -> end -> // T e[s t i n g]
typeKeys(e, fyne.KeyEnd)
test.AssertImageMatches(t, "entry/se... | explode_data.jsonl/57316 | {
"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,
5874,
58073,
7623,
3727,
1155,
353,
8840,
836,
8,
341,
7727,
11,
3241,
1669,
6505,
11177,
3576,
340,
16867,
49304,
1906,
2271,
15906,
340,
1444,
1669,
3241,
54121,
2822,
18185,
11711,
1906,
42470,
1155,
11,
330,
4085,
14,
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... | 1 |
func TestParseAddressString(t *testing.T) {
testCases := []struct {
name string
addr string
expected string
correct bool
}{
{"no node id and no protocol", "127.0.0.1:8080", "", false},
{"no node id w/ tcp input", "tcp://127.0.0.1:8080", "", false},
{"no node id w/ udp input", "udp://127.0.0.1:8... | explode_data.jsonl/14845 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1254
} | [
2830,
3393,
14463,
4286,
703,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
53183,
257,
914,
198,
197,
42400,
914,
198,
197,
1444,
27034,
220,
1807,
198,
197,
59403,
197,
197,
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... | 2 |
func TestEnvoyStatsCompleteAndRejectedCDS(t *testing.T) {
g := NewGomegaWithT(t)
stats := "cluster_manager.cds.update_rejected: 1\nlistener_manager.lds.update_success: 1"
server := createAndStartServer(stats)
defer server.Close()
err := probe.Check()
g.Expect(err).NotTo(HaveOccurred())
} | explode_data.jsonl/41347 | {
"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,
14359,
2253,
16635,
12548,
3036,
77693,
34,
5936,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
1532,
38,
32696,
2354,
51,
1155,
340,
79659,
1669,
330,
18855,
12144,
520,
5356,
5317,
1288,
28303,
25,
220,
16,
1699,
35039,
12144,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBInput(t *testing.T) {
bytes, err := ioutil.ReadFile("./input.txt")
if err != nil {
t.Fail()
}
input := string(bytes[:])
result := answerB(input)
t.Logf("day 3: A: %d", result)
if result != 2639 {
t.Fail()
}
} | explode_data.jsonl/16879 | {
"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,
33,
2505,
1155,
353,
8840,
836,
8,
341,
70326,
11,
1848,
1669,
43144,
78976,
13988,
1355,
3909,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
57243,
741,
197,
532,
22427,
1669,
914,
23158,
3447,
2546,
9559,
1669,
4226,
33,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestIntegration(t *testing.T) {
s, err := initServer(testRoutes)
if err != nil {
t.Fatalf("Couldn't parse routes: %v", err)
}
res, code := hitEndpoint(s, http.MethodGet, "/echo/hello/3x", "")
assertEqual(t, code, http.StatusOK)
assertEqual(t, res, "hello hello hello")
res, code = hitEndpoint(s, http.Met... | explode_data.jsonl/20029 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 525
} | [
2830,
3393,
52464,
1155,
353,
8840,
836,
8,
341,
1903,
11,
1848,
1669,
2930,
5475,
8623,
26653,
340,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
38987,
944,
4715,
11291,
25,
1018,
85,
497,
1848,
340,
197,
630,
10202,
11,
2038,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestQuotasetGet(t *testing.T) {
client, err := clients.NewComputeV2Client()
if err != nil {
t.Fatalf("Unable to create a compute client: %v", err)
}
identityClient, err := clients.NewIdentityV2Client()
if err != nil {
t.Fatalf("Unable to get a new identity client: %v", err)
}
tenantID, err := getTenan... | explode_data.jsonl/62151 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 203
} | [
2830,
3393,
2183,
354,
5028,
1949,
1155,
353,
8840,
836,
8,
341,
25291,
11,
1848,
1669,
8239,
7121,
46254,
53,
17,
2959,
741,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
17075,
311,
1855,
264,
12564,
2943,
25,
1018,
85,
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... | 5 |
func TestGetTrades(t *testing.T) {
b.SetDefaults()
_, err := b.GetTrades("BTC-USD")
if err != nil {
t.Fatalf("Test failed. Err: %s", err)
}
} | explode_data.jsonl/14533 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 67
} | [
2830,
3393,
1949,
1282,
3452,
1155,
353,
8840,
836,
8,
341,
2233,
4202,
16273,
741,
197,
6878,
1848,
1669,
293,
2234,
1282,
3452,
445,
59118,
12,
26749,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
2271,
4641,
13,
15495,
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
] | 2 |
func TestSymmetricEncrypt(t *testing.T) {
symmetricPaseto, err := NewSymmetric("PrU5AbXJawKJIUOJFmd4f6ZwmifLvvoF")
assert.NoError(t, err)
now := time.Now()
token := paseto.JSONToken{
Audience: "Kitabisa services",
Issuer: "Kulonuwun",
Jti: "706cbfce-c031-4a44-815e-030f963f7d4e",
Subject: "... | explode_data.jsonl/58335 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 299
} | [
2830,
3393,
27912,
15903,
61520,
1155,
353,
8840,
836,
8,
341,
1903,
29459,
47,
5028,
78,
11,
1848,
1669,
1532,
27912,
15903,
445,
3533,
52,
20,
5830,
55,
41,
672,
42,
45064,
52,
46,
41,
37,
2277,
19,
69,
21,
57,
19557,
333,
73757... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestChargeList(t *testing.T) {
params := &stripe.ChargeListParams{}
params.Filters.AddFilter("include[]", "", "total_count")
params.Filters.AddFilter("limit", "", "5")
params.Single = true
i := List(params)
for i.Next() {
if i.Charge() == nil {
t.Error("No nil values expected")
}
if i.Meta() == ni... | explode_data.jsonl/73937 | {
"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,
55363,
852,
1155,
353,
8840,
836,
8,
341,
25856,
1669,
609,
61233,
6353,
2744,
852,
4870,
16094,
25856,
77714,
1904,
5632,
445,
997,
1294,
497,
7342,
330,
5035,
3180,
1138,
25856,
77714,
1904,
5632,
445,
9506,
497,
7342,
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... | 5 |
func TestImportVolumeFailures(t *testing.T) {
const (
backendName = "backend82"
scName = "sc01"
volumeName = "volume82"
originalName01 = "origVolume01"
backendProtocol = config.File
)
createPVandPVCError := func(volExternal *storage.VolumeExternal, driverType string) error {
return fm... | explode_data.jsonl/62734 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 471
} | [
2830,
3393,
11511,
18902,
19524,
1413,
1155,
353,
8840,
836,
8,
341,
4777,
2399,
197,
197,
20942,
675,
257,
284,
330,
20942,
23,
17,
698,
197,
29928,
675,
688,
284,
330,
2388,
15,
16,
698,
197,
5195,
4661,
675,
414,
284,
330,
25060,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRPC_QueryAccount(t *testing.T) {
codec.UpgradeHeight = 7000
_, _, cleanup := NewInMemoryTendermintNode(t, oneValTwoNodeGenesisState())
_, stopCli, evtChan := subscribeTo(t, tmTypes.EventNewBlock)
<-evtChan
kb := getInMemoryKeybase()
cb, err := kb.GetCoinbase()
assert.Nil(t, err)
var params = HeightAndA... | explode_data.jsonl/44711 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 315
} | [
2830,
3393,
29528,
48042,
7365,
1155,
353,
8840,
836,
8,
341,
43343,
66,
13,
43861,
3640,
284,
220,
22,
15,
15,
15,
198,
197,
6878,
8358,
21290,
1669,
1532,
641,
10642,
51,
1659,
67791,
1955,
1155,
11,
825,
2208,
11613,
1955,
84652,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestOldFilters(t *testing.T) {
t.Run("Make single filter properly", func(t *testing.T) {
f, _ := makeOldFilterSet([]MetricFilter{
{
MetricNames: []string{
"cpu.utilization",
"memory.utilization",
},
},
}, nil)
assert.True(t, f.Matches(&datapoint.Datapoint{Metric: "cpu.utilization"}))... | explode_data.jsonl/55629 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1264
} | [
2830,
3393,
18284,
28351,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
8078,
3175,
4051,
10277,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
1166,
11,
716,
1669,
1281,
18284,
5632,
1649,
10556,
54310,
5632,
515,
298,
197,
515,
571... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestService(t *testing.T) {
tests := []struct {
name string
steps []testStep
}{
{
name: "success-get_set_get_delete_get",
steps: []testStep{
{
name: "initial empty get",
givenURL: "/list.json",
givenMethod: http.MethodGet,
wantCode: http.StatusOK,
wantFix... | explode_data.jsonl/72949 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2363
} | [
2830,
3393,
1860,
1155,
353,
8840,
836,
8,
1476,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
271,
197,
18388,
7124,
3056,
1944,
8304,
198,
197,
59403,
197,
197,
515,
298,
11609,
25,
330,
5630,
22491,
2602,
3062,
11353,
3062,
25897,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMarketSet(t *testing.T) {
market := getMarket()
user := models.User{
Credits: 100,
}
err := market.Buy(&user, "set_pack")
if err != nil {
t.Errorf("market.Buy error: %s", err)
}
if user.Credits != 800 {
t.Errorf("Buy(user, \"set_pack\"): expected %d, actual %d", 800, user.Credits)
}
} | explode_data.jsonl/10771 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 126
} | [
2830,
3393,
38822,
1649,
1155,
353,
8840,
836,
8,
341,
2109,
54560,
1669,
633,
38822,
741,
19060,
1669,
4119,
7344,
515,
197,
6258,
29502,
25,
220,
16,
15,
15,
345,
197,
630,
9859,
1669,
3081,
1785,
4076,
2099,
872,
11,
330,
746,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStartStandAlone(t *testing.T) {
home, cleanup := testutil.NewTestCaseDir(t)
t.Cleanup(cleanup)
t.Cleanup(setupClientHome(t))
logger := log.NewNopLogger()
cfg, err := createDefaultTendermintConfig(home)
require.NoError(t, err)
serverCtx := server.NewContext(viper.New(), cfg, logger)
clientCtx := clien... | explode_data.jsonl/58649 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 435
} | [
2830,
3393,
3479,
48733,
2101,
603,
1155,
353,
8840,
836,
8,
341,
197,
5117,
11,
21290,
1669,
1273,
1314,
7121,
16458,
6184,
1155,
340,
3244,
727,
60639,
1337,
60639,
340,
3244,
727,
60639,
14171,
454,
2959,
7623,
1155,
4390,
17060,
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 TestPermissionAPIInDomain(t *testing.T) {
e, _ := NewEnforcer("examples/rbac_with_domains_model.conf", "examples/rbac_with_domains_policy.csv")
testGetPermissionsInDomain(t, e, "alice", "domain1", [][]string{{"admin", "domain1", "data1", "read"}, {"admin", "domain1", "data1", "write"}})
testGetPermissionsInDom... | explode_data.jsonl/65634 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 390
} | [
2830,
3393,
14966,
7082,
641,
13636,
1155,
353,
8840,
836,
8,
341,
7727,
11,
716,
1669,
1532,
1702,
82010,
445,
51668,
7382,
55877,
6615,
70199,
5047,
13937,
497,
330,
51668,
7382,
55877,
6615,
70199,
22773,
11219,
5130,
18185,
1949,
2385... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUnmarshalString(t *testing.T) {
tests := map[string]struct {
input []byte
output string
expectedError error
}{
"''": {[]byte("s:0:\"\";"), "", nil},
"'Hello world'": {[]byte("s:11:\"Hello world\";"), "Hello world", nil},
"'Björk Guðmundsdóttir'": {
[]byte(`s:23:"Björk... | explode_data.jsonl/27019 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 400
} | [
2830,
3393,
1806,
27121,
703,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
2415,
14032,
60,
1235,
341,
197,
22427,
260,
3056,
3782,
198,
197,
21170,
286,
914,
198,
197,
42400,
1454,
1465,
198,
197,
59403,
197,
197,
1,
4605,
788,
310,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetCluster_Error(t *testing.T) {
manager := GetManagerInstance()
manager.SetDBConnection(&database.MockDBConnection{
GetClusterReturnErr: true,
})
clearManager()
_, err := manager.GetCluster("test")
if err == nil {
t.Error("Expected err for missing Cluster in Cache")
}
} | explode_data.jsonl/24677 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 106
} | [
2830,
3393,
1949,
28678,
28651,
1155,
353,
8840,
836,
8,
341,
92272,
1669,
2126,
2043,
2523,
741,
92272,
4202,
3506,
4526,
2099,
12216,
24664,
3506,
4526,
515,
197,
37654,
28678,
5598,
7747,
25,
830,
345,
197,
3518,
40408,
2043,
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,
1... | 2 |
func TestGroup(t *testing.T) {
assert := assert.New(t)
var (
p1 int
p2 int
)
addr := fmt.Sprintf("127.0.0.1:%d", consts.TEST_TCP2_FRP_PORT)
for i := 0; i < 6; i++ {
res, err := util.SendTcpMsg(addr, consts.TEST_TCP_ECHO_STR)
assert.NoError(err)
switch res {
case consts.TEST_TCP_ECHO_STR:
p1++
ca... | explode_data.jsonl/79670 | {
"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,
2808,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
2405,
2399,
197,
3223,
16,
526,
198,
197,
3223,
17,
526,
198,
197,
340,
53183,
1669,
8879,
17305,
445,
16,
17,
22,
13,
15,
13,
15,
13,
16,
7533,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReadFSMetadata(t *testing.T) {
disk := filepath.Join(globalTestTmpDir, "minio-"+nextSuffix())
defer removeAll(disk)
obj := initFSObjects(disk, t)
fs := obj.(*fsObjects)
bucketName := "bucket"
objectName := "object"
if err := obj.MakeBucket(bucketName); err != nil {
t.Fatal("Unexpected err: ", err)
... | explode_data.jsonl/68541 | {
"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,
4418,
8485,
14610,
1155,
353,
8840,
836,
8,
341,
2698,
3187,
1669,
26054,
22363,
31951,
2271,
35986,
6184,
11,
330,
1065,
815,
52077,
3600,
40177,
2398,
16867,
65099,
1500,
3187,
692,
22671,
1669,
2930,
8485,
11543,
1500,
3187... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTruncationSafety(t *testing.T) {
maxSize := 3
newBlocks := 10
rl := NewTestChain(maxSize)
item := rl.newest
for i := 0; i < newBlocks; i++ {
rl.appendBlock(&cb.Block{Header: &cb.BlockHeader{Number: uint64(i + 1)}})
}
count := 0
for item.next != nil {
item = item.next
count++
}
if count != newB... | explode_data.jsonl/76440 | {
"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,
1282,
1347,
367,
73037,
1155,
353,
8840,
836,
8,
341,
22543,
1695,
1669,
220,
18,
198,
8638,
29804,
1669,
220,
16,
15,
198,
197,
2381,
1669,
1532,
2271,
18837,
8739,
1695,
340,
22339,
1669,
38877,
4618,
477,
198,
2023,
600... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestEtcdGetService(t *testing.T) {
ctx := api.NewDefaultContext()
fakeClient := tools.NewFakeEtcdClient(t)
key, _ := makeServiceKey(ctx, "foo")
fakeClient.Set(key, runtime.EncodeOrDie(latest.Codec, &api.Service{TypeMeta: api.TypeMeta{ID: "foo"}}), 0)
registry := NewTestEtcdRegistry(fakeClient)
service, err :... | explode_data.jsonl/8168 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 192
} | [
2830,
3393,
31860,
4385,
1949,
1860,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
6330,
7121,
3675,
1972,
741,
1166,
726,
2959,
1669,
7375,
7121,
52317,
31860,
4385,
2959,
1155,
340,
23634,
11,
716,
1669,
1281,
1860,
1592,
7502,
11,
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... | 3 |
func TestParseIndexRoot(t *testing.T) {
input := decodeHex(t, "30000000010000000010000001000000100000008800000088000000000000005fac0600000006006800520000000000398c060000003b00de3ef1e234dcd501de3ef1e234dcd50118dbd2e334dcd501de3ef1e234dcd501000000000000000000000000000000002000000000000000080374006500730074002e0074007800... | explode_data.jsonl/8275 | {
"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,
14463,
1552,
8439,
1155,
353,
8840,
836,
8,
341,
22427,
1669,
16895,
20335,
1155,
11,
330,
18,
15,
15,
15,
15,
15,
15,
15,
15,
16,
15,
15,
15,
15,
15,
15,
15,
15,
16,
15,
15,
15,
15,
15,
15,
16,
15,
15,
15,
15,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestNewMapFromID(t *testing.T) {
testutils.SkipOnOldKernel(t, "4.13", "bpf_map_get_fd_by_id")
hash := createHash()
defer hash.Close()
var next MapID
var err error
next, err = hash.ID()
if err != nil {
t.Fatal("Could not get ID of map:", err)
}
if _, err = NewMapFromID(next); err != nil {
t.Fatalf("... | explode_data.jsonl/21677 | {
"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,
3564,
2227,
3830,
915,
1155,
353,
8840,
836,
8,
341,
18185,
6031,
57776,
1925,
18284,
26343,
1155,
11,
330,
19,
13,
16,
18,
497,
330,
65,
15897,
5376,
3062,
17676,
3710,
842,
5130,
50333,
1669,
1855,
6370,
741,
16867,
5175... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTopDownArithmetic(t *testing.T) {
tests := []struct {
note string
rules []string
expected interface{}
}{
{"plus", []string{`p[y] { a[i] = x; y = i + x }`}, "[1,3,5,7]"},
{"minus", []string{`p[y] { a[i] = x; y = i - x }`}, "[-1]"},
{"multiply", []string{`p[y] { a[i] = x; y = i * x }`}, "[0,... | explode_data.jsonl/25209 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 467
} | [
2830,
3393,
5366,
4454,
6953,
25922,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
9038,
1272,
257,
914,
198,
197,
7000,
2425,
262,
3056,
917,
198,
197,
42400,
3749,
16094,
197,
59403,
197,
197,
4913,
7138,
497,
305... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSleepWithContext_Canceled(t *testing.T) {
ctx := &awstesting.FakeContext{DoneCh: make(chan struct{})}
expectErr := fmt.Errorf("context canceled")
ctx.Error = expectErr
close(ctx.DoneCh)
err := aws.SleepWithContext(ctx, 1*time.Millisecond)
if err == nil {
t.Fatalf("expect error, did not get one")
}
... | explode_data.jsonl/49373 | {
"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,
41745,
91101,
920,
38392,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
609,
672,
267,
59855,
991,
726,
1972,
90,
17453,
1143,
25,
1281,
35190,
2036,
28875,
630,
24952,
7747,
1669,
8879,
13080,
445,
2147,
33446,
5130,
20985,
61... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIntegrationTCPConnectGoodWithDoT(t *testing.T) {
ctx := context.Background()
results := TCPConnect(ctx, TCPConnectConfig{
Address: "ooni.io:443",
DNSServerNetwork: "dot",
DNSServerAddress: "9.9.9.9:853",
})
if results.Error != nil {
t.Fatal(results.Error)
}
} | explode_data.jsonl/53545 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 122
} | [
2830,
3393,
52464,
49896,
14611,
15216,
2354,
5404,
51,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
55497,
1669,
26656,
14611,
7502,
11,
26656,
14611,
2648,
515,
197,
98090,
25,
688,
330,
9009,
72,
4245,
25,
19,
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... | 2 |
func TestReconcileInstanceDeleteUsingOriginatingIdentity(t *testing.T) {
for _, tc := range originatingIdentityTestCases {
func() {
prevOrigIDEnablement := sctestutil.EnableOriginatingIdentity(t, tc.enableOriginatingIdentity)
defer utilfeature.DefaultMutableFeatureGate.Set(fmt.Sprintf("%v=%v", scfeatures.Orig... | explode_data.jsonl/58178 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 985
} | [
2830,
3393,
693,
40446,
457,
2523,
6435,
16429,
13298,
1095,
18558,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17130,
1669,
2088,
70273,
18558,
2271,
37302,
341,
197,
29244,
368,
1476,
298,
50728,
62726,
915,
11084,
478,
1669,
274,
67880,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInstallPackagePath(t *testing.T) {
serverDir, err := ioutil.TempDir(os.TempDir(), "istio-test-server-*")
if err != nil {
t.Fatal(err)
}
defer os.RemoveAll(serverDir)
if err := tgz.Create(string(liveCharts), filepath.Join(serverDir, testTGZFilename)); err != nil {
t.Fatal(err)
}
srv := httpserver.New... | explode_data.jsonl/47919 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 451
} | [
2830,
3393,
24690,
13100,
1820,
1155,
353,
8840,
836,
8,
341,
41057,
6184,
11,
1848,
1669,
43144,
65009,
6184,
9638,
65009,
6184,
1507,
330,
380,
815,
16839,
26300,
44903,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestStartServerTLSOverwriteCipher(t *testing.T) {
s, err := NewServer()
require.NoError(t, err)
testDir, _ := fileutils.FindDir("tests")
s.UpdateConfig(func(cfg *model.Config) {
*cfg.ServiceSettings.ListenAddress = ":0"
*cfg.ServiceSettings.ConnectionSecurity = "TLS"
cfg.ServiceSettings.TLSOverwriteCiph... | explode_data.jsonl/47831 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 714
} | [
2830,
3393,
3479,
5475,
45439,
1918,
4934,
79460,
1155,
353,
8840,
836,
8,
341,
1903,
11,
1848,
1669,
1532,
5475,
741,
17957,
35699,
1155,
11,
1848,
692,
18185,
6184,
11,
716,
1669,
1034,
6031,
9998,
6184,
445,
23841,
1138,
1903,
16689,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRenameColumn(t *testing.T) {
store, clean := testkit.CreateMockStoreWithSchemaLease(t, columnModifyLease)
defer clean()
tk := testkit.NewTestKit(t, store)
tk.MustExec("use test")
assertColNames := func(tableName string, colNames ...string) {
cols := external.GetTableByName(t, tk, "test", tableName).Co... | explode_data.jsonl/51311 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 969
} | [
2830,
3393,
88757,
2933,
1155,
353,
8840,
836,
8,
341,
57279,
11,
4240,
1669,
1273,
8226,
7251,
11571,
6093,
2354,
8632,
2304,
519,
1155,
11,
3250,
44427,
2304,
519,
340,
16867,
4240,
2822,
3244,
74,
1669,
1273,
8226,
7121,
2271,
7695,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestECDSAKeyGenNonEphemeral(t *testing.T) {
t.Parallel()
provider, _, cleanup := currentTestConfig.Provider(t)
defer cleanup()
k, err := provider.KeyGen(&bccsp.ECDSAKeyGenOpts{Temporary: false})
if err != nil {
t.Fatalf("Failed generating ECDSA key [%s]", err)
}
if k == nil {
t.Fatal("Failed generating... | explode_data.jsonl/29256 | {
"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,
7498,
72638,
1592,
9967,
8121,
36,
59941,
3253,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
197,
19979,
11,
8358,
21290,
1669,
1482,
2271,
2648,
36208,
1155,
340,
16867,
21290,
2822,
16463,
11,
1848,
1669,
9109,
96... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestParseError(t *testing.T) {
var args struct {
Foo string `arg:"this_is_not_valid"`
}
os.Args = []string{"example", "--bar"}
err := Parse(&args)
assert.Error(t, err)
} | explode_data.jsonl/13032 | {
"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,
14463,
1454,
1155,
353,
8840,
836,
8,
341,
2405,
2827,
2036,
341,
197,
12727,
2624,
914,
1565,
858,
2974,
574,
6892,
7913,
8337,
8805,
197,
532,
25078,
51015,
284,
3056,
917,
4913,
8687,
497,
14482,
2257,
16707,
9859,
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 |
func TestConsulDeleteRecord(t *testing.T) {
consulReset()
err := cache.DeleteRecord("nanobox.io")
cache.AddRecord(&nanopack)
err2 := cache.DeleteRecord("nanopack.io")
if err != nil || err2 != nil {
t.Errorf("Failed to delete record from consul cacher - %v%v", err, err2)
}
} | explode_data.jsonl/61011 | {
"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,
15220,
360,
6435,
6471,
1155,
353,
8840,
836,
8,
341,
197,
6254,
360,
14828,
741,
9859,
1669,
6500,
18872,
6471,
445,
18759,
32460,
4245,
1138,
52680,
1904,
6471,
2099,
18759,
453,
473,
340,
9859,
17,
1669,
6500,
18872,
6471... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCSS(t *testing.T) {
config := asset.Info{
Folder: "testdata",
}
fm := config.Map("/")
temp, err := template.New("test").Funcs(fm).Parse(`{{CSS "/test.css" "all"}}`)
if err != nil {
t.Fatal(err)
}
buf := new(bytes.Buffer)
err = temp.Execute(buf, nil)
if err != nil {
t.Fatal(err)
}
expected... | explode_data.jsonl/46963 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 220
} | [
2830,
3393,
33658,
1155,
353,
8840,
836,
8,
341,
25873,
1669,
9329,
20132,
515,
197,
12727,
2018,
25,
330,
92425,
756,
197,
630,
1166,
76,
1669,
2193,
10104,
4283,
5130,
16280,
11,
1848,
1669,
3811,
7121,
445,
1944,
1827,
9626,
82,
91... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_Delete(t *testing.T) {
setup()
defer teardown()
mux.HandleFunc("/v2/tags/testing-1", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "DELETE")
})
_, err := client.Tags.Delete("testing-1")
if err != nil {
t.Errorf("Tags.Delete returned error: %v", err)
}
} | explode_data.jsonl/19729 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 124
} | [
2830,
3393,
15930,
57418,
1155,
353,
8840,
836,
8,
341,
84571,
741,
16867,
49304,
2822,
2109,
2200,
63623,
4283,
85,
17,
84460,
28801,
12,
16,
497,
2915,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
197,
18185,
3523,
1155,
11,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestRedis_Hvals(t *testing.T) {
runOnRedis(t, func(client *Redis) {
assert.NotNil(t, NewRedis(client.Addr, "").Hset("a", "aa", "aaa"))
assert.Nil(t, client.Hset("a", "aa", "aaa"))
assert.Nil(t, client.Hset("a", "bb", "bbb"))
_, err := NewRedis(client.Addr, "").Hvals("a")
assert.NotNil(t, err)
vals, er... | explode_data.jsonl/39157 | {
"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,
48137,
2039,
25596,
1155,
353,
8840,
836,
8,
341,
56742,
1925,
48137,
1155,
11,
2915,
12805,
353,
48137,
8,
341,
197,
6948,
93882,
1155,
11,
1532,
48137,
12805,
93626,
11,
35229,
39,
746,
445,
64,
497,
330,
5305,
497,
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 TestTextSearchMinimalRequestURL(t *testing.T) {
expectedQuery := "key=AIzaNotReallyAnAPIKey&query=Pizza+in+New+York"
server := mockServerForQuery(expectedQuery, 200, `{"status":"OK"}"`)
defer server.s.Close()
c, _ := NewClient(WithAPIKey(apiKey))
c.baseURL = server.s.URL
r := &TextSearchRequest{
Query: ... | explode_data.jsonl/76292 | {
"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,
1178,
5890,
88328,
1900,
3144,
1155,
353,
8840,
836,
8,
341,
42400,
2859,
1669,
330,
792,
28,
15469,
4360,
2623,
48785,
2082,
7082,
1592,
5,
1631,
76778,
13741,
10,
258,
10,
3564,
10,
98977,
1837,
41057,
1669,
7860,
5475,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConsulDiscovery_Deregister(t *testing.T) {
t.Parallel()
c, s := testConsulServer(t)
defer closecs(s)
d := testNewConsulDiscovery(c)
rs := RegisterService{
ID: "123",
GraphID: "ns",
TypeNode: "worker",
Address: "192.168.100.1",
Port: 8080,
}
d.Register(rs)
d.Deregister(rs.ID)
_,... | explode_data.jsonl/69057 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 195
} | [
2830,
3393,
15220,
360,
67400,
1557,
52633,
1571,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
1444,
11,
274,
1669,
1273,
15220,
360,
5475,
1155,
340,
16867,
3265,
4837,
1141,
340,
2698,
1669,
1273,
3564,
15220,
360,
67400,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestArrayFloat64(t *testing.T) {
descriptor := test.NewAggregatorTest(metric.ValueRecorderKind, metric.Float64NumberKind)
fpsf := func(sign int) []float64 {
// Check behavior of a bunch of odd floating
// points except for NaN, which is invalid.
return []float64{
0,
1 / math.Inf(sign),
1,
2,
... | explode_data.jsonl/28117 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 811
} | [
2830,
3393,
1857,
5442,
21,
19,
1155,
353,
8840,
836,
8,
341,
52912,
6820,
1669,
1273,
7121,
9042,
58131,
2271,
86265,
6167,
47023,
10629,
11,
18266,
29794,
21,
19,
2833,
10629,
692,
1166,
1690,
69,
1669,
2915,
40046,
526,
8,
3056,
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... | 1 |
func TestValidatePodConditions(t *testing.T) {
successCases := []struct {
desc string
podConditions []core.PodCondition
}{
{
"no condition",
[]core.PodCondition{},
},
{
"one system condition",
[]core.PodCondition{
{
Type: core.PodReady,
Status: core.ConditionTrue,
},... | explode_data.jsonl/1028 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 726
} | [
2830,
3393,
17926,
23527,
35435,
1155,
353,
8840,
836,
8,
341,
30553,
37302,
1669,
3056,
1235,
341,
197,
41653,
688,
914,
198,
197,
3223,
347,
35435,
3056,
2153,
88823,
10547,
198,
197,
59403,
197,
197,
515,
298,
197,
1,
2152,
2971,
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... | 5 |
func TestRole(t *testing.T) {
config.TestInit(t)
ctx := context.Background()
db, err := database.NewDatabase(ctx)
require.NoError(t, err)
defer db.Close()
dummy := tools.NewDummyUser()
_, err = dummy.AddUserInfo(ctx, db)
require.NoError(t, err)
goretry.Retry(t, func() bool {
entity, err := models.GetUse... | explode_data.jsonl/13350 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 502
} | [
2830,
3393,
9030,
1155,
353,
8840,
836,
8,
341,
25873,
8787,
3803,
1155,
692,
20985,
1669,
2266,
19047,
2822,
20939,
11,
1848,
1669,
4625,
7121,
5988,
7502,
340,
17957,
35699,
1155,
11,
1848,
340,
16867,
2927,
10421,
2822,
2698,
8574,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAllocateTiny(t *testing.T) {
_, cidr, err := net.ParseCIDR("192.168.1.0/32")
if err != nil {
t.Fatal(err)
}
r, err := NewCIDRRange(cidr)
if err != nil {
t.Fatal(err)
}
if f := r.Free(); f != 0 {
t.Errorf("free: %d", f)
}
if _, err := r.AllocateNext(); err != ErrFull {
t.Error(err)
}
} | explode_data.jsonl/69569 | {
"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,
75380,
85693,
1155,
353,
8840,
836,
8,
341,
197,
6878,
32141,
81,
11,
1848,
1669,
4179,
8937,
54146,
49,
445,
16,
24,
17,
13,
16,
21,
23,
13,
16,
13,
15,
14,
18,
17,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
26133,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStructType(t *testing.T) {
gopClTest(t, `
type bar = foo
type foo struct {
p *bar
A int
B string "tag1:123"
}
func main() {
type a struct {
p *a
}
type b = a
}
`, `package main
type bar = foo
type foo struct {
p *foo
A int
B string "tag1:123"
}
func main() {
type a struct {
p *a
}
type b =... | explode_data.jsonl/73636 | {
"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,
9422,
929,
1155,
353,
8840,
836,
8,
341,
3174,
453,
5066,
2271,
1155,
11,
22074,
1313,
3619,
284,
15229,
271,
1313,
15229,
2036,
341,
3223,
353,
2257,
198,
22985,
526,
198,
12791,
914,
330,
4578,
16,
25,
16,
17,
18,
698,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_invalid_float(t *testing.T) {
inputs := []string{
`1.e1`, // dot without following digit
`1.`, // dot can not be the last char
``, // empty number
`01`, // extra leading zero
`-`, // negative without digit
`--`, // double negative
`--2`, // double negative
}
for _, input := rang... | explode_data.jsonl/73515 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 397
} | [
2830,
3393,
31433,
17586,
1155,
353,
8840,
836,
8,
341,
22427,
82,
1669,
3056,
917,
515,
197,
197,
63,
16,
1734,
16,
7808,
442,
12756,
2041,
2701,
15723,
198,
197,
197,
63,
16,
13,
7808,
256,
442,
12756,
646,
537,
387,
279,
1537,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAbuseRateLimit(t *testing.T) {
tc := &testTime{now: time.Now()}
ts := httptest.NewTLSServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if tc.slept == 0 {
w.Header().Set("Retry-After", "1")
http.Error(w, "403 Forbidden", http.StatusForbidden)
}
}))
defer ts.Close()
c := getCl... | explode_data.jsonl/6244 | {
"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,
5830,
810,
11564,
16527,
1155,
353,
8840,
836,
8,
341,
78255,
1669,
609,
1944,
1462,
90,
3328,
25,
882,
13244,
23509,
57441,
1669,
54320,
70334,
7121,
13470,
1220,
2836,
19886,
89164,
18552,
3622,
1758,
37508,
11,
435,
353,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConfig_getDefaultConfigPathFromEnvURL(t *testing.T) {
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
}))
defer ts.Close()
c := NewConfig()
err := os.Setenv("TELEGRAF_CONFIG_PATH", ts.URL)
require.NoError(t, err)
configPath, err :=... | explode_data.jsonl/72179 | {
"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,
2648,
3062,
3675,
2648,
1820,
3830,
14359,
3144,
1155,
353,
8840,
836,
8,
341,
57441,
1669,
54320,
70334,
7121,
5475,
19886,
89164,
18552,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
197,
6692,
69794,
19886,
52989,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParseRenamedStructDefinition(t *testing.T) {
src := `
package main
type Child struct {
Name string
}//@name Student
type Parent struct {
Name string
Child Child
}//@name Teacher
// @Param request body Parent true "query params"
// @Success 200 {object} Parent
// @Router /test [get]
func Fun() {
}
`
f... | explode_data.jsonl/63588 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 447
} | [
2830,
3393,
14463,
34625,
3606,
9422,
10398,
1155,
353,
8840,
836,
8,
341,
41144,
1669,
22074,
1722,
1887,
271,
1313,
9391,
2036,
341,
21297,
914,
198,
29450,
31,
606,
11726,
271,
1313,
17022,
2036,
341,
21297,
914,
198,
197,
3652,
9391... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDownloadChunkInvalidResponseBody(t *testing.T) {
numChunks := 2
cm := make([]execResponseChunk, 0)
for i := 0; i < numChunks; i++ {
cm = append(cm, execResponseChunk{URL: fmt.Sprintf(
"dummyURL%v", i+1), RowCount: rowsInChunk})
}
scd := &snowflakeChunkDownloader{
sc: &snowflakeConn{
rest: &snowf... | explode_data.jsonl/1797 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 484
} | [
2830,
3393,
11377,
28304,
7928,
29637,
1155,
353,
8840,
836,
8,
341,
22431,
89681,
1669,
220,
17,
198,
98316,
1669,
1281,
10556,
11748,
2582,
28304,
11,
220,
15,
340,
2023,
600,
1669,
220,
15,
26,
600,
366,
1629,
89681,
26,
600,
1027,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func Test_updateMaxIdletimeDuration(t *testing.T) {
testRE := newQueryRegexp()
testcases := []struct {
value string
usename string
datname string
state string
query string
want postgresActivityStat
}{
{value: "1", usename: "", datname: "", state: "", query: "",
want: newPostgresActivitySta... | explode_data.jsonl/74548 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1001
} | [
2830,
3393,
8882,
5974,
764,
1149,
545,
12945,
1155,
353,
8840,
836,
8,
341,
18185,
787,
1669,
501,
2859,
3477,
4580,
2822,
18185,
23910,
1669,
3056,
1235,
341,
197,
16309,
256,
914,
198,
197,
70175,
1840,
914,
198,
197,
2698,
266,
60... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEnvPrefix(t *testing.T) {
initJSON()
SetEnvPrefix("foo") // will be uppercased automatically
BindEnv("id")
BindEnv("f", "FOOD") // not using prefix
os.Setenv("FOO_ID", "13")
os.Setenv("FOOD", "apple")
os.Setenv("FOO_NAME", "crunk")
assert.Equal(t, "13", Get("id"))
assert.Equal(t, "apple", Get("f"))... | explode_data.jsonl/5560 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 179
} | [
2830,
3393,
14359,
14335,
1155,
353,
8840,
836,
8,
341,
28248,
5370,
2822,
22212,
14359,
14335,
445,
7975,
899,
442,
686,
387,
8416,
91126,
9463,
198,
197,
9950,
14359,
445,
307,
1138,
197,
9950,
14359,
445,
69,
497,
330,
3788,
2069,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewServer_NSENotPresented(t *testing.T) {
defer goleak.VerifyNone(t, goleak.IgnoreCurrent())
var localBypassRegistryServer registry.NetworkServiceEndpointRegistryServer
localBypassNetworkServiceServer := localbypass.NewServer(&localBypassRegistryServer)
server := next.NewNetworkServiceServer(localBypassNet... | explode_data.jsonl/2439 | {
"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,
3564,
5475,
1604,
925,
2623,
21195,
291,
1155,
353,
8840,
836,
8,
341,
16867,
728,
273,
585,
54853,
4064,
1155,
11,
728,
273,
585,
48590,
5405,
2398,
2405,
2205,
33,
49911,
15603,
5475,
19424,
30149,
1860,
27380,
15603,
5475... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHTTPHandlerDefaultFallback(t *testing.T) {
tt := []struct {
method, url string
wantCode int
wantLocation string
}{
{"GET", "http://example.org", 302, "https://example.org/"},
{"GET", "http://example.org/foo", 302, "https://example.org/foo"},
{"GET", "http://example.org/foo/bar/", 302, "https... | explode_data.jsonl/65055 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 833
} | [
2830,
3393,
9230,
3050,
3675,
87206,
1155,
353,
8840,
836,
8,
341,
3244,
83,
1669,
3056,
1235,
341,
197,
42257,
11,
2515,
220,
914,
198,
197,
50780,
2078,
257,
526,
198,
197,
50780,
4707,
914,
198,
197,
59403,
197,
197,
4913,
3806,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRepositoryBadDefaulting(t *testing.T) {
var berr *ErrBadName
if _, err := NewRepository("index.docker.io/foo", StrictValidation); !errors.As(err, &berr) {
t.Errorf("Not an ErrBadName: %v", err)
}
} | explode_data.jsonl/39010 | {
"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,
4624,
17082,
3675,
287,
1155,
353,
8840,
836,
8,
341,
2405,
293,
615,
353,
7747,
17082,
675,
198,
743,
8358,
1848,
1669,
1532,
4624,
445,
1252,
91131,
4245,
60555,
497,
52881,
13799,
1215,
753,
7650,
20242,
3964,
11,
609,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 2 |
func TestReservedGameServerInFleet(t *testing.T) {
t.Parallel()
ctx := context.Background()
client := framework.AgonesClient.AgonesV1()
flt := defaultFleet(framework.Namespace)
flt.Spec.Replicas = 3
flt, err := client.Fleets(framework.Namespace).Create(ctx, flt, metav1.CreateOptions{})
if assert.NoError(t, err... | explode_data.jsonl/15423 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 723
} | [
2830,
3393,
53003,
4868,
5475,
641,
37,
18973,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
20985,
1669,
2266,
19047,
2822,
25291,
1669,
12626,
49850,
3154,
2959,
49850,
3154,
53,
16,
2822,
1166,
4832,
1669,
1638,
37,
18973,
95... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRetrieveConfigCurrencyPairs(t *testing.T) {
cfg := GetConfig()
err := cfg.LoadConfig(ConfigTestFile)
if err != nil {
t.Errorf(
"Test failed. TestRetrieveConfigCurrencyPairs.LoadConfig: %s", err.Error(),
)
}
err = cfg.RetrieveConfigCurrencyPairs(true)
if err != nil {
t.Errorf(
"Test failed. Te... | explode_data.jsonl/21902 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 239
} | [
2830,
3393,
87665,
2648,
26321,
54228,
1155,
353,
8840,
836,
8,
341,
50286,
1669,
2126,
2648,
741,
9859,
1669,
13286,
13969,
2648,
33687,
2271,
1703,
340,
743,
1848,
961,
2092,
341,
197,
3244,
13080,
1006,
298,
197,
1,
2271,
4641,
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 Test_getAndParseYaml(t *testing.T) {
testShipyard := `apiVersion: spec.keptn.sh/0.2.0
kind: Shipyard
metadata:
name: shipyard-sockshop
spec:
stages:
- name: dev
sequences:
- name: artifact-delivery
tasks:
- name: evaluation`
var returnedShipyardContent string
server := httptest.NewSe... | explode_data.jsonl/10569 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 876
} | [
2830,
3393,
3062,
3036,
14463,
56,
9467,
1155,
353,
8840,
836,
8,
1476,
18185,
29624,
17428,
1669,
1565,
2068,
5637,
25,
1398,
71281,
417,
77,
2395,
14,
15,
13,
17,
13,
15,
198,
15314,
25,
26803,
17428,
198,
17637,
510,
220,
829,
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 TestMatExtractChannel(t *testing.T) {
src := NewMatWithSize(10, 10, MatTypeCV32F+MatChannels3)
dst := NewMat()
ExtractChannel(src, &dst, 1)
if dst.Empty() {
t.Error("TestExtractChannel dst should not be empty.")
}
src.Close()
dst.Close()
} | explode_data.jsonl/81740 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 103
} | [
2830,
3393,
11575,
28959,
9629,
1155,
353,
8840,
836,
8,
341,
41144,
1669,
1532,
11575,
2354,
1695,
7,
16,
15,
11,
220,
16,
15,
11,
6867,
929,
19589,
18,
17,
37,
10,
11575,
35925,
18,
340,
52051,
1669,
1532,
11575,
741,
197,
28959,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMultipleDirectives(t *testing.T) {
src := `
.. d1:: p1
.. d2:: p2
.. [d3] p3
`
expected := `
Doc
Directive[d1]
Paragraph
Text[p1]
Directive[d2]
Paragraph
Text[p2]
Directive[[d3]]
Paragraph
Text[p3]
`
assertParse(t, expected, src)
} | explode_data.jsonl/21259 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 131
} | [
2830,
3393,
32089,
16027,
1886,
1155,
353,
8840,
836,
8,
341,
41144,
1669,
22074,
496,
294,
16,
486,
281,
16,
198,
496,
294,
17,
486,
281,
17,
198,
496,
508,
67,
18,
60,
281,
18,
198,
3989,
42400,
1669,
22074,
9550,
198,
10957,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestEchoIPForwarded(t *testing.T) {
is := is.New(t)
req := httptest.NewRequest("GET", "/ip", nil)
req.Header.Set("X-Forwarded-For", "::1")
req.RemoteAddr = "127.0.0.1:56789"
res := httptest.NewRecorder()
svc.ServeHTTP(res, req)
is.Equal("::1\n", res.Body.String())
} | explode_data.jsonl/46788 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 129
} | [
2830,
3393,
74994,
3298,
25925,
291,
1155,
353,
8840,
836,
8,
341,
19907,
1669,
374,
7121,
1155,
340,
24395,
1669,
54320,
70334,
75274,
445,
3806,
497,
3521,
573,
497,
2092,
340,
24395,
15753,
4202,
445,
55,
12,
25925,
291,
12,
2461,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestService_Handshake(t *testing.T) {
type args struct {
ctx context.Context
}
tests := []struct {
name string
args args
wantErr bool
}{
{"background context", args{nil}, false},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
s := &Service{l: zaptest.NewLogger(t).Sugar(... | explode_data.jsonl/22352 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 267
} | [
2830,
3393,
1860,
2039,
437,
29661,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
20985,
2266,
9328,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
31215,
262,
2827,
198,
197,
50780,
7747,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestUintUint(t *testing.T) {
var expected uint = 123456789
ti := Uint{
ValidFlag: true,
uint: uint64(expected),
}
if ti.Uint() != expected {
t.Errorf("actual:%d, expected:%d", ti.Uint(), expected)
}
} | explode_data.jsonl/13395 | {
"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,
21570,
21570,
1155,
353,
8840,
836,
8,
341,
2405,
3601,
2622,
284,
220,
16,
17,
18,
19,
20,
21,
22,
23,
24,
198,
72859,
1669,
27883,
515,
197,
197,
4088,
12135,
25,
830,
345,
197,
8254,
25,
414,
2622,
21,
19,
15253,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUnmarshalAPReq(t *testing.T) {
t.Parallel()
var a APReq
b, err := hex.DecodeString(testdata.MarshaledKRB5ap_req)
if err != nil {
t.Fatalf("Test vector read error: %v", err)
}
err = a.Unmarshal(b)
if err != nil {
t.Fatalf("Unmarshal error: %v", err)
}
assert.Equal(t, iana.PVNO, a.PVNO, "PVNO not as... | explode_data.jsonl/62185 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 573
} | [
2830,
3393,
1806,
27121,
2537,
27234,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
2405,
264,
10106,
27234,
198,
2233,
11,
1848,
1669,
12371,
56372,
703,
8623,
691,
83691,
75303,
42,
29259,
20,
391,
17644,
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... | 3 |
func TestHandshakeClientECDHERSAChaCha20(t *testing.T) {
config := testConfig.Clone()
config.CipherSuites = []uint16{TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305}
test := &clientTest{
name: "ECDHE-RSA-CHACHA20-POLY1305",
command: []string{"openssl", "s_server", "-cipher", "ECDHE-RSA-CHACHA20-POLY1305"},
config: c... | explode_data.jsonl/71358 | {
"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,
2314,
29661,
2959,
36,
6484,
3012,
7778,
95971,
95971,
17,
15,
1155,
353,
8840,
836,
8,
341,
25873,
1669,
1273,
2648,
64463,
741,
25873,
727,
10558,
62898,
288,
284,
3056,
2496,
16,
21,
90,
45439,
2089,
6484,
1799,
76994,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRolesFilterList(t *testing.T) {
clients.RequireAdmin(t)
// For some reason this is not longer working.
clients.SkipRelease(t, "master")
clients.SkipRelease(t, "stable/mitaka")
clients.SkipRelease(t, "stable/newton")
clients.SkipRelease(t, "stable/ocata")
clients.SkipRelease(t, "stable/pike")
clients.S... | explode_data.jsonl/57724 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 716
} | [
2830,
3393,
25116,
5632,
852,
1155,
353,
8840,
836,
8,
341,
197,
31869,
81288,
7210,
1155,
692,
197,
322,
1752,
1045,
2874,
419,
374,
537,
5021,
3238,
624,
197,
31869,
57776,
16077,
1155,
11,
330,
13629,
1138,
197,
31869,
57776,
16077,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDropMultipleBuildingDeferredIndexes(t *testing.T) {
log.Printf("In TestDropMultipleBuildingDeferredIndexes()")
var bucketName = "default"
var index1 = "id_company"
var index2 = "id_age"
var index3 = "id_gender"
var index4 = "id_isActive"
e := secondaryindex.DropAllSecondaryIndexes(indexManagementAddre... | explode_data.jsonl/59138 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1070
} | [
2830,
3393,
19871,
32089,
30133,
88417,
62229,
1155,
353,
8840,
836,
8,
341,
6725,
19367,
445,
641,
3393,
19871,
32089,
30133,
88417,
62229,
368,
5130,
2405,
15621,
675,
284,
330,
2258,
698,
2405,
1922,
16,
284,
330,
307,
33403,
698,
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... | 1 |
func TestMountWithRoot(t *testing.T) {
bMount := fsConnect(t)
defer fsDisconnect(t, bMount)
dir1 := "/test-mount-with-root"
err := bMount.MakeDir(dir1, 0755)
assert.NoError(t, err)
defer bMount.RemoveDir(dir1)
sub1 := "/i.was.here"
dir2 := dir1 + sub1
err = bMount.MakeDir(dir2, 0755)
assert.NoError(t, err)
... | explode_data.jsonl/29514 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 485
} | [
2830,
3393,
16284,
2354,
8439,
1155,
353,
8840,
836,
8,
341,
2233,
16284,
1669,
8619,
14611,
1155,
340,
16867,
8619,
60651,
1155,
11,
293,
16284,
692,
48532,
16,
1669,
3521,
1944,
59588,
26189,
39214,
698,
9859,
1669,
293,
16284,
50133,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDelete(t *testing.T) {
ctx := context.Background()
fi := filter.GetConfig(ctx)
r := fstest.NewRun(t)
defer r.Finalise()
file1 := r.WriteObject(ctx, "small", "1234567890", t2) // 10 bytes
file2 := r.WriteObject(ctx, ... | explode_data.jsonl/51931 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 374
} | [
2830,
3393,
6435,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
30839,
1669,
4051,
2234,
2648,
7502,
340,
7000,
1669,
48434,
477,
7121,
6727,
1155,
340,
16867,
435,
991,
977,
1064,
741,
17661,
16,
1669,
435,
4073,
1190,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExtends2(t *testing.T) {
assert.NoError(t, PrepareEngine())
err := testEngine.DropTables(&Message{}, &MessageUser{}, &MessageType{})
assert.NoError(t, err)
err = testEngine.CreateTables(&Message{}, &MessageUser{}, &MessageType{})
assert.NoError(t, err)
var sender = MessageUser{Name: "sender"}
var rec... | explode_data.jsonl/19195 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 805
} | [
2830,
3393,
6756,
1412,
17,
1155,
353,
8840,
836,
8,
341,
6948,
35699,
1155,
11,
31166,
4571,
12367,
9859,
1669,
1273,
4571,
21688,
21670,
2099,
2052,
22655,
609,
2052,
1474,
22655,
609,
82107,
37790,
6948,
35699,
1155,
11,
1848,
692,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestChats(t *testing.T) {
client := v1.New(nil)
chats, err := client.Chats(chat.New(time.Now().Add(-24 * time.Hour)))
assert.NoError(t, err)
fmt.Printf("%+v\n", strings.Join(chats.List(), "\n"))
} | explode_data.jsonl/41200 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 90
} | [
2830,
3393,
1143,
1862,
1155,
353,
8840,
836,
8,
341,
25291,
1669,
348,
16,
7121,
27907,
340,
23049,
1862,
11,
1848,
1669,
2943,
6353,
1862,
45438,
7121,
9730,
13244,
1005,
2212,
4080,
17,
19,
353,
882,
73550,
5929,
6948,
35699,
1155,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestMakeApplication(t *testing.T) {
got := makeApplication("blue-app", "default", "testing-ns", "https://kubernetes.default.svc", argoappv1.ApplicationSource{RepoURL: "https://example.com/myorg/myproject.git", Path: "services/service-1/base"})
want := &argoappv1.Application{
TypeMeta: applicationTypeMeta,
O... | explode_data.jsonl/73884 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 338
} | [
2830,
3393,
8078,
4988,
1155,
353,
8840,
836,
8,
341,
3174,
354,
1669,
1281,
4988,
445,
12203,
20023,
497,
330,
2258,
497,
330,
8840,
12,
4412,
497,
330,
2428,
1110,
74,
29827,
8764,
514,
7362,
497,
1392,
78,
676,
85,
16,
17521,
360... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLoadConfig(t *testing.T) {
factories, err := componenttest.NopFactories()
assert.Nil(t, err)
factory := NewFactory()
factories.Exporters[configmodels.Type(typeStr)] = factory
cfg, err := configtest.LoadConfigFile(
t, path.Join(".", "testdata", "config.yaml"), factories,
)
require.NoError(t, err)
re... | explode_data.jsonl/8498 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 855
} | [
2830,
3393,
5879,
2648,
1155,
353,
8840,
836,
8,
341,
1166,
52893,
11,
1848,
1669,
3692,
1944,
2067,
453,
17417,
2433,
741,
6948,
59678,
1155,
11,
1848,
692,
1166,
2919,
1669,
1532,
4153,
741,
1166,
52893,
81077,
388,
58,
1676,
6507,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWriteAndReadbackTombstones(t *testing.T) {
tmpdir, _ := ioutil.TempDir("", "test")
defer func() {
assert.NoError(t, os.RemoveAll(tmpdir))
}()
ref := uint64(0)
stones := NewMemTombstones()
// Generate the tombstones.
for i := 0; i < 100; i++ {
ref += uint64(rand.Int31n(10)) + 1
numRanges := rand.... | explode_data.jsonl/80239 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 343
} | [
2830,
3393,
7985,
3036,
4418,
1419,
51,
2855,
32510,
1155,
353,
8840,
836,
8,
341,
20082,
3741,
11,
716,
1669,
43144,
65009,
6184,
19814,
330,
1944,
1138,
16867,
2915,
368,
341,
197,
6948,
35699,
1155,
11,
2643,
84427,
10368,
3741,
1171... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTopLevelDirective(t *testing.T) {
src := `
.. deprecated:: 0.1.1
paragraph
`
expected := `
Doc
Directive[deprecated]
Paragraph
Text[0.1.1 paragraph]
`
assertParse(t, expected, src)
} | explode_data.jsonl/21258 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 82
} | [
2830,
3393,
5366,
4449,
62076,
1155,
353,
8840,
836,
8,
341,
41144,
1669,
22074,
496,
31590,
486,
220,
15,
13,
16,
13,
16,
198,
220,
14311,
198,
3989,
42400,
1669,
22074,
9550,
198,
10957,
1226,
533,
58,
38189,
921,
197,
197,
42165,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestScanner_IsSupportedVersion(t *testing.T) {
type args struct {
osFamily string
osVer string
}
tests := []struct {
name string
now time.Time
args args
want bool
}{
{
name: "photon 1.0",
now: time.Date(2022, 1, 31, 23, 59, 59, 0, time.UTC),
args: args{
osFamily: "photon",
o... | explode_data.jsonl/15371 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 485
} | [
2830,
3393,
31002,
31879,
34636,
5637,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
25078,
15192,
914,
198,
197,
25078,
10141,
262,
914,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
80922,
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 TestNewRetrieveWithSubdir(t *testing.T) {
expected := map[string]string{"subdir/path/a.txt": "a"}
client := &fakeRetrievalService{
artifacts: expected,
}
dest := makeTempDir(t)
defer os.RemoveAll(dest)
ctx := grpcx.WriteWorkerID(context.Background(), "worker")
mds, err := newMaterializeWithClient(ctx, ... | explode_data.jsonl/55339 | {
"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,
3564,
87665,
2354,
3136,
3741,
1155,
353,
8840,
836,
8,
341,
42400,
1669,
2415,
14032,
30953,
4913,
1966,
3741,
50976,
14186,
3909,
788,
330,
64,
63159,
25291,
1669,
609,
30570,
12020,
7231,
831,
1860,
515,
197,
197,
471,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestNaughtyStrings(t *testing.T) {
err := os.Setenv("IGOR_CONFIG", "{\"token\": \"testtoken\", \"languagedir\": \"../language\"}")
if err != nil {
t.Error("Problem setting environment variable")
}
var list []string
filename, _ := filepath.Abs("../devtools/blns.json")
c, _ := ioutil.ReadFile(filename)
dec... | explode_data.jsonl/78102 | {
"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,
16193,
35516,
20859,
1155,
353,
8840,
836,
8,
341,
9859,
1669,
2643,
4202,
3160,
445,
1914,
868,
12568,
497,
54734,
5839,
11693,
7245,
1944,
5839,
16215,
7245,
75,
2325,
3279,
404,
11693,
7245,
1244,
11528,
2105,
14451,
743,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestParseRSSDate(t *testing.T) {
date, err := Parse("Tue, 03 Jun 2003 09:39:21 GMT")
if err != nil {
t.Fatalf(`RSS dates should be parsed correctly`)
}
if date.Unix() != 1054633161 {
t.Fatal(`Invalid date parsed`)
}
} | explode_data.jsonl/21382 | {
"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,
14463,
68980,
1916,
1155,
353,
8840,
836,
8,
341,
44086,
11,
1848,
1669,
14775,
445,
61048,
11,
220,
15,
18,
11782,
220,
17,
15,
15,
18,
220,
15,
24,
25,
18,
24,
25,
17,
16,
24488,
1138,
743,
1848,
961,
2092,
341,
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... | 3 |
func TestPipeline_Secret_ParseShared_failure(t *testing.T) {
// setup tests
tests := []struct {
secret *Secret
org string
}{
{ // failure with bad key
secret: &Secret{
Name: "foo",
Value: "bar",
Key: "octocat",
Engine: "native",
Type: "repo",
},
org: "octocat",
},
{ ... | explode_data.jsonl/51854 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 322
} | [
2830,
3393,
34656,
1098,
50856,
77337,
16997,
43618,
1155,
353,
8840,
836,
8,
341,
197,
322,
6505,
7032,
198,
78216,
1669,
3056,
1235,
341,
197,
197,
20474,
353,
19773,
198,
197,
87625,
262,
914,
198,
197,
59403,
197,
197,
90,
442,
79... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.