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 TestLog_pipelinerun_status_done_v1beta1(t *testing.T) {
var (
pipelineName = "done-pipeline"
prName = "done-run"
ns = "namespace"
taskName = "done-task"
)
nsList := []*corev1.Namespace{
{
ObjectMeta: metav1.ObjectMeta{
Name: ns,
},
},
}
prs := []*v1beta1.PipelineRun... | explode_data.jsonl/14874 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1067
} | [
2830,
3393,
2201,
620,
81079,
10453,
359,
4773,
24390,
2273,
16,
19127,
16,
1155,
353,
8840,
836,
8,
341,
2405,
2399,
197,
3223,
8790,
675,
284,
330,
10438,
2268,
8790,
698,
197,
25653,
675,
981,
284,
330,
10438,
22973,
698,
197,
8404... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConsensusParameters(t *testing.T) {
require := require.New(t)
// Default consensus parameters.
var emptyParams ConsensusParameters
require.Error(emptyParams.SanityCheck(), "default consensus parameters should be invalid")
// Valid thresholds.
validThresholds := map[ThresholdKind]quantity.Quantity{
Ki... | explode_data.jsonl/36019 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 449
} | [
2830,
3393,
15220,
13626,
9706,
1155,
353,
8840,
836,
8,
341,
17957,
1669,
1373,
7121,
1155,
692,
197,
322,
7899,
23869,
5029,
624,
2405,
4287,
4870,
7292,
13626,
9706,
198,
17957,
6141,
24216,
4870,
808,
38270,
3973,
1507,
330,
2258,
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 TestBadRandomSource(t *testing.T) {
r := strings.NewReader("")
_, err := New(nil, "", &Config{RandomSource: r, Logger: log.Discard})
require.Error(t, err)
} | explode_data.jsonl/46859 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 63
} | [
2830,
3393,
17082,
13999,
3608,
1155,
353,
8840,
836,
8,
341,
7000,
1669,
9069,
68587,
31764,
197,
6878,
1848,
1669,
1532,
27907,
11,
7342,
609,
2648,
90,
13999,
3608,
25,
435,
11,
9514,
25,
1487,
909,
47560,
3518,
17957,
6141,
1155,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestIsValidRegion(t *testing.T) {
testCases := []struct {
inputReqRegion string
inputConfRegion string
expectedResult bool
}{
{"", "", false},
{"us-east-1", "", true},
{"us-east-1", "US", true},
{"us-west-1", "US", false},
{"us-west-1", "us-west-1", true},
}
for i, testCase := range testCas... | explode_data.jsonl/81626 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 225
} | [
2830,
3393,
55470,
14091,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
22427,
27234,
14091,
220,
914,
198,
197,
22427,
15578,
14091,
914,
271,
197,
42400,
2077,
1807,
198,
197,
92,
4257,
197,
197,
4913,
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... | 3 |
func TestTopologyBuilder_BuildWithTrafficTargetAndTrafficSplit(t *testing.T) {
selectorAppA := map[string]string{"app": "app-a"}
selectorAppB := map[string]string{"app": "app-b"}
selectorAppC := map[string]string{"app": "app-c"}
selectorAppD := map[string]string{"app": "app-d"}
annotations := map[string]string{
... | explode_data.jsonl/48677 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1032
} | [
2830,
3393,
60954,
3297,
96686,
2354,
87229,
6397,
3036,
87229,
20193,
1155,
353,
8840,
836,
8,
341,
197,
8925,
2164,
32,
1669,
2415,
14032,
30953,
4913,
676,
788,
330,
676,
7409,
16707,
197,
8925,
2164,
33,
1669,
2415,
14032,
30953,
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 TestConnUDP_WriteWithContext(t *testing.T) {
peerAddr := "127.0.0.1:2154"
b, err := net.ResolveUDPAddr("udp", peerAddr)
assert.NoError(t, err)
ctxCanceled, ctxCancel := context.WithCancel(context.Background())
ctxCancel()
type args struct {
ctx context.Context
udpCtx *ConnUDPContext
buffer []byte
... | explode_data.jsonl/68522 | {
"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,
9701,
41648,
31825,
91101,
1155,
353,
8840,
836,
8,
341,
197,
16537,
13986,
1669,
330,
16,
17,
22,
13,
15,
13,
15,
13,
16,
25,
17,
16,
20,
19,
698,
2233,
11,
1848,
1669,
4179,
57875,
41648,
13986,
445,
31101,
497,
1439... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGenerateFromUTF16(t *testing.T) {
q := apiclient.ManifestRequest{
Repo: &argoappv1.Repository{},
ApplicationSource: &argoappv1.ApplicationSource{},
}
res1, err := GenerateManifests("./testdata/utf-16", "/", "", &q, false)
assert.Nil(t, err)
assert.Equal(t, 2, len(res1.Manifests))
} | explode_data.jsonl/58035 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 140
} | [
2830,
3393,
31115,
3830,
8561,
16,
21,
1155,
353,
8840,
836,
8,
341,
18534,
1669,
1443,
292,
1451,
72272,
1900,
515,
197,
197,
25243,
25,
1060,
609,
12088,
676,
85,
16,
25170,
38837,
197,
78329,
3608,
25,
609,
12088,
676,
85,
16,
17... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestUnmarshalNumberSet(t *testing.T) {
input := []byte(`{ "NS": ["1234", "567.8"] }`)
var av DynamoDBAttributeValue
err := json.Unmarshal(input, &av)
assert.Nil(t, err)
assert.Equal(t, DataTypeNumberSet, av.DataType())
assert.Equal(t, 2, len(av.NumberSet()))
assert.Equal(t, "1234", av.NumberSet()[0])
ass... | explode_data.jsonl/61702 | {
"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,
1806,
27121,
2833,
1649,
1155,
353,
8840,
836,
8,
341,
22427,
1669,
3056,
3782,
5809,
90,
330,
2448,
788,
4383,
16,
17,
18,
19,
497,
330,
20,
21,
22,
13,
23,
1341,
335,
63,
692,
2405,
1822,
71813,
3506,
78554,
198,
985... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStacktraceLocationThrowFromCatch(t *testing.T) {
vm := New()
_, err := vm.RunString(`
function main(arg) {
try {
if (arg === 1) {
return f1();
}
if (arg === 2) {
return f2();
}
if (arg === 3) {
return f3();
}
} catch (e) {
throw e;
}
}
function f1() {}
function f2()... | explode_data.jsonl/10528 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 344
} | [
2830,
3393,
4336,
15067,
4707,
23079,
3830,
57760,
1155,
353,
8840,
836,
8,
341,
54879,
1669,
1532,
741,
197,
6878,
1848,
1669,
10995,
16708,
703,
61528,
7527,
1887,
9404,
8,
341,
197,
6799,
341,
298,
743,
320,
858,
2049,
220,
16,
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... | 7 |
func TestReactorVotingPowerChange(t *testing.T) {
nVals := 4
logger := log.TestingLogger()
css, cleanup := randConsensusNet(nVals, "consensus_voting_power_changes_test", newMockTickerFunc(true), newPersistentKVStore)
defer cleanup()
reactors, blocksSubs, eventBuses := startConsensusNet(t, css, nVals)
defer stopCo... | explode_data.jsonl/7894 | {
"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,
693,
5621,
53,
11519,
14986,
4072,
1155,
353,
8840,
836,
8,
341,
9038,
52452,
1669,
220,
19,
198,
17060,
1669,
1487,
8787,
287,
7395,
741,
1444,
778,
11,
21290,
1669,
10382,
15220,
13626,
6954,
1445,
52452,
11,
330,
6254,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSidecar(t *testing.T) {
var testCases = []struct {
name string
config *prowapi.DecorationConfig
gcsOptions gcsupload.Options
blobStorageMounts []coreapi.VolumeMount
logMount ... | explode_data.jsonl/79316 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1325
} | [
2830,
3393,
16384,
6918,
1155,
353,
8840,
836,
8,
341,
2405,
1273,
37302,
284,
3056,
1235,
341,
197,
11609,
1920,
914,
198,
197,
25873,
6656,
353,
79,
651,
2068,
22442,
7614,
2648,
198,
197,
3174,
4837,
3798,
4597,
342,
4837,
6120,
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... | 2 |
func TestSpanEvent_MoveTo(t *testing.T) {
ms := generateTestSpanEvent()
dest := NewSpanEvent()
ms.MoveTo(dest)
assert.EqualValues(t, NewSpanEvent(), ms)
assert.EqualValues(t, generateTestSpanEvent(), dest)
} | explode_data.jsonl/63283 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 81
} | [
2830,
3393,
12485,
1556,
66352,
1249,
1155,
353,
8840,
836,
8,
341,
47691,
1669,
6923,
2271,
12485,
1556,
741,
49616,
1669,
1532,
12485,
1556,
741,
47691,
31195,
1249,
27010,
340,
6948,
12808,
6227,
1155,
11,
1532,
12485,
1556,
1507,
9829... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestJoin(t *testing.T) {
if runtime.GOOS == "windows" {
jointests = append(jointests, winjointests...)
}
for _, test := range jointests {
expected := filepath.FromSlash(test.path)
if p := filepath.Join(test.elem...); p != expected {
t.Errorf("join(%q) = %q, want %q", test.elem, p, expected)
}
}
} | explode_data.jsonl/1657 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 132
} | [
2830,
3393,
12292,
1155,
353,
8840,
836,
8,
341,
743,
15592,
97574,
3126,
621,
330,
27077,
1,
341,
197,
12428,
781,
17966,
284,
8737,
3325,
781,
17966,
11,
3164,
32850,
17966,
31218,
197,
532,
2023,
8358,
1273,
1669,
2088,
10284,
17966,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLeakPrime(t *testing.T) {
ch := GenNatural()
for i:=0; i<100; i++ {
prime := <-ch
fmt.Printf("%v : %v\n", i+1, prime)
ch = PrimeFilter(ch, prime)
}
go func() {
for {
select {
case value := <- ch:
fmt.Println("v ",value)
}
}
}()
time.Sleep(time.Second)
// 这里会有 goroutine的泄漏问题,生成了1... | explode_data.jsonl/70691 | {
"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,
2304,
585,
32306,
1155,
353,
8840,
836,
8,
341,
23049,
1669,
9316,
54281,
741,
2023,
600,
14209,
15,
26,
600,
27,
16,
15,
15,
26,
600,
1027,
341,
197,
25653,
545,
1669,
9119,
331,
198,
197,
11009,
19367,
4430,
85,
549,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestListCommandEnvHostname(t *testing.T) {
var s state
r := strings.NewReader(exampleStateFileEnvHostname)
err := s.read(r)
assert.NoError(t, err)
// Decode expectation as JSON
var exp interface{}
err = json.Unmarshal([]byte(expectedListOutputEnvHostname), &exp)
assert.NoError(t, err)
// Run the command... | explode_data.jsonl/58807 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 285
} | [
2830,
3393,
852,
4062,
14359,
88839,
1155,
353,
8840,
836,
8,
341,
2405,
274,
1584,
198,
7000,
1669,
9069,
68587,
66203,
1397,
1703,
14359,
88839,
340,
9859,
1669,
274,
4125,
2601,
340,
6948,
35699,
1155,
11,
1848,
692,
197,
322,
50194,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRateLimiter(t *testing.T) {
e := echo.New()
handler := func(c echo.Context) error {
return c.String(http.StatusOK, "test")
}
var inMemoryStore = NewRateLimiterMemoryStoreWithConfig(RateLimiterMemoryStoreConfig{Rate: 1, Burst: 3})
mw := RateLimiter(inMemoryStore)
testCases := []struct {
id strin... | explode_data.jsonl/33961 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 370
} | [
2830,
3393,
11564,
43,
17700,
1155,
353,
8840,
836,
8,
341,
7727,
1669,
1687,
7121,
2822,
53326,
1669,
2915,
1337,
1687,
9328,
8,
1465,
341,
197,
853,
272,
6431,
19886,
52989,
11,
330,
1944,
1138,
197,
630,
2405,
304,
10642,
6093,
284... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestErrorsIsAnErrorAndFormatsErrors(t *testing.T) {
errs := error(Errors{
fmt.Errorf("some error: foo=2, bar=baz"),
fmt.Errorf("some other error: foo=42, bar=qux"),
})
assert.Equal(t, "[<some error: foo=2, bar=baz>, "+
"<some other error: foo=42, bar=qux>]", errs.Error())
} | explode_data.jsonl/27155 | {
"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,
13877,
3872,
2082,
1454,
3036,
44599,
13877,
1155,
353,
8840,
836,
8,
341,
9859,
82,
1669,
1465,
7,
13877,
515,
197,
11009,
13080,
445,
14689,
1465,
25,
15229,
28,
17,
11,
3619,
22086,
1370,
4461,
197,
11009,
13080,
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 TestPluginSinglePoolWithStatus(t *testing.T) {
t.Parallel()
s := &IllumosZpool{
Fields: []string{"alloc"},
Status: true,
}
zpoolOutput = func() string {
return sampleSinglePoolOutput
}
zpoolStatusOutput = func(pool string) string {
return sampleStatusNormalOutput
}
timeSince = func(timestamp ti... | explode_data.jsonl/18986 | {
"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,
11546,
10888,
10551,
2354,
2522,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
1903,
1669,
609,
40,
5448,
436,
57,
10285,
515,
197,
197,
8941,
25,
3056,
917,
4913,
4742,
7115,
197,
58321,
25,
830,
345,
197,
630,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTextGenerator_GenerateDataBySchema_MinAndMaxLength_LengthOfStringInRange(t *testing.T) {
randomSource := rand.NewSource(time.Now().UnixNano())
textGeneratorInstance := &textGenerator{
generator: &rangedTextGenerator{
random: rand.New(randomSource),
},
}
schema := openapi3.NewSchema()
var maxLength ... | explode_data.jsonl/45036 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 232
} | [
2830,
3393,
1178,
12561,
2646,
13220,
1043,
1359,
8632,
62122,
3036,
35601,
81620,
66952,
76059,
1155,
353,
8840,
836,
8,
341,
83628,
3608,
1669,
10382,
7121,
3608,
9730,
13244,
1005,
55832,
83819,
2398,
15425,
12561,
2523,
1669,
609,
1318,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPatternYears(t *testing.T) {
f := newTestLister(t)
entries, err := years(context.Background(), f, "potato/", nil)
require.NoError(t, err)
year := 2000
for _, entry := range entries {
assert.Equal(t, "potato/"+fmt.Sprint(year), entry.Remote())
year++
}
} | explode_data.jsonl/24368 | {
"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,
15760,
54419,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
501,
2271,
852,
261,
1155,
340,
197,
12940,
11,
1848,
1669,
1635,
5378,
19047,
1507,
282,
11,
330,
19099,
4330,
28105,
2092,
340,
17957,
35699,
1155,
11,
1848,
692,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRendersCaseElse(t *testing.T) {
template, _ := ParseString("A-{% case other %}{% when 'abc' %}when1{% when 1 or 123 %}when2{% else %}else{% endcase%}-Z", nil)
assertRender(t, template, nil, `A-else-Z`)
} | explode_data.jsonl/42422 | {
"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,
49,
14506,
4207,
22971,
1155,
353,
8840,
836,
8,
341,
22832,
11,
716,
1669,
14775,
703,
445,
32,
63347,
4,
1142,
1008,
1018,
15170,
4,
979,
364,
13683,
6,
1018,
92,
9309,
16,
66365,
979,
220,
16,
476,
220,
16,
17,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestTrigger_ErrorCreate(t *testing.T) {
t.Skip()
// controller := gomock.NewController(t)
// defer controller.Finish()
// mockUsers := mock.NewMockUserStore(controller)
// mockUsers.EXPECT().Find(noContext, dummyRepo.UserID).Return(dummyUser, nil)
// mockTriggers := mock.NewMockTriggerStore(controller... | explode_data.jsonl/27000 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 618
} | [
2830,
3393,
17939,
28651,
4021,
1155,
353,
8840,
836,
8,
341,
3244,
57776,
741,
197,
322,
220,
61615,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
197,
322,
220,
16867,
6461,
991,
18176,
2822,
197,
322,
220,
77333,
7137,
1669,
7860,
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 TestInterfaces(t *testing.T) {
var i interface{}
i = &TORegion{}
if _, ok := i.(api.Creator); !ok {
t.Errorf("Region must be Creator")
}
if _, ok := i.(api.Reader); !ok {
t.Errorf("Region must be Reader")
}
if _, ok := i.(api.Updater); !ok {
t.Errorf("Region must be Updater")
}
if _, ok := i.(api.D... | explode_data.jsonl/46893 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 201
} | [
2830,
3393,
41066,
1155,
353,
8840,
836,
8,
341,
2405,
600,
3749,
16094,
8230,
284,
609,
5207,
14091,
31483,
743,
8358,
5394,
1669,
600,
12832,
2068,
98564,
1215,
753,
562,
341,
197,
3244,
13080,
445,
14091,
1969,
387,
35678,
1138,
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... | 6 |
func TestArray_UnmarshalValue(t *testing.T) {
type V struct {
Name string
Array *garray.Array
}
// JSON
gtest.C(t, func(t *gtest.T) {
var v *V
err := gconv.Struct(g.Map{
"name": "john",
"array": []byte(`[1,2,3]`),
}, &v)
t.Assert(err, nil)
t.Assert(v.Name, "john")
t.Assert(v.Array.Slice(), g... | explode_data.jsonl/13919 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 317
} | [
2830,
3393,
1857,
40687,
27121,
1130,
1155,
353,
8840,
836,
8,
341,
13158,
647,
2036,
341,
197,
21297,
220,
914,
198,
197,
58743,
353,
70,
1653,
8114,
198,
197,
532,
197,
322,
4718,
198,
3174,
1944,
727,
1155,
11,
2915,
1155,
353,
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 TestAddPDBs(t *testing.T) {
labels := map[string]string{"foo": "bar"}
notFoundLabels := map[string]string{"bar": "foo"}
pdbs := []*pv1beta1.PodDisruptionBudget{
{
ObjectMeta: metav1.ObjectMeta{
Name: "pdb-1",
Labels: ownerLabels,
},
Spec: pv1beta1.PodDisruptionBudgetSpec{
Selector: &met... | explode_data.jsonl/53284 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1091
} | [
2830,
3393,
2212,
47,
3506,
82,
1155,
353,
8840,
836,
8,
341,
95143,
1669,
2415,
14032,
30953,
4913,
7975,
788,
330,
2257,
16707,
97266,
6650,
23674,
1669,
2415,
14032,
30953,
4913,
2257,
788,
330,
7975,
16707,
3223,
67,
1279,
1669,
298... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestIsoCanonicalHashes(t *testing.T) {
seed := uint64(*origSeed)
if *origSeed < 0 {
seed = uint64(time.Now().UnixNano())
}
defer func() {
if t.Failed() && *origSeed < 0 {
t.Logf("time based seed: %d", seed)
}
}()
// Number of times to run IsoCanonicalHashes to check consistency.
const retries = 5
... | explode_data.jsonl/47332 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 3241
} | [
2830,
3393,
76275,
70914,
6370,
288,
1155,
353,
8840,
836,
8,
341,
197,
22602,
1669,
2622,
21,
19,
4071,
4670,
41471,
340,
743,
353,
4670,
41471,
366,
220,
15,
341,
197,
197,
22602,
284,
2622,
21,
19,
9730,
13244,
1005,
55832,
83819,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTLSPointFormats(t *testing.T) {
// Test that a Server returns the ec_point_format extension when ECC is
// negotiated, and not returned on RSA handshake.
tests := []struct {
name string
cipherSuites []uint16
supportedCurves []CurveID
supportedPoints []uint8
wantSuppor... | explode_data.jsonl/36317 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 945
} | [
2830,
3393,
45439,
2609,
44599,
1155,
353,
8840,
836,
8,
341,
197,
322,
3393,
429,
264,
8422,
4675,
279,
11942,
6085,
8955,
8894,
979,
77316,
374,
198,
197,
322,
50478,
11,
323,
537,
5927,
389,
45641,
57020,
624,
78216,
1669,
3056,
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 TestUpdateExifGPS(t *testing.T) {
r, err := os.Open("fixtures/walrus.jpg")
if err != nil {
t.Fatalf("Failed to open test image, %v", err)
}
defer r.Close()
wr := io.Discard
lat := 37.61799
lon := -122.384864
gps_lat, err := PrepareDecimalGPSLatitudeTag(lat)
if err != nil {
t.Fatalf("Failed to p... | explode_data.jsonl/18065 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 458
} | [
2830,
3393,
4289,
840,
333,
63176,
1155,
353,
8840,
836,
8,
1476,
7000,
11,
1848,
1669,
2643,
12953,
445,
45247,
6324,
278,
20341,
4819,
5130,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
9408,
311,
1787,
1273,
2168,
11,
1018,
85... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 7 |
func TestSummaryToGauge(t *testing.T) {
originalFamily := tests.MakeTestMetricFamily(dto.MetricType_SUMMARY, 1, sampleLabels)
convertedFams := summaryToGauges(originalFamily)
assert.Equal(t, 3, len(convertedFams))
for _, family := range convertedFams {
assert.Equal(t, dto.MetricType_GAUGE, *family.Type)
name :=... | explode_data.jsonl/62482 | {
"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,
19237,
1249,
38,
19392,
1155,
353,
8840,
836,
8,
341,
197,
9889,
15192,
1669,
7032,
50133,
2271,
54310,
15192,
55237,
1321,
16340,
929,
50369,
48870,
11,
220,
16,
11,
6077,
23674,
340,
197,
76204,
37,
4122,
1669,
12126,
1249... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRecreate_acceptorSuccess(t *testing.T) {
var deployment *kapi.ReplicationController
scaler := &cmdtest.FakeScaler{}
strategy := &RecreateDeploymentStrategy{
out: &bytes.Buffer{},
errOut: &bytes.Buffer{},
eventClient: fake.NewSimpleClientset().Core(),
decoder: kapi.Codecs.Univer... | explode_data.jsonl/19096 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 600
} | [
2830,
3393,
693,
3182,
35728,
269,
7188,
1155,
353,
8840,
836,
8,
341,
2405,
23172,
353,
74,
2068,
2817,
79,
1693,
2051,
198,
1903,
63084,
1669,
609,
8710,
1944,
991,
726,
59553,
31483,
11355,
10228,
1669,
609,
693,
3182,
75286,
19816,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestVitessHashMatchesVitessShards(t *testing.T) {
store, clean := testkit.CreateMockStore(t)
defer clean()
tk := testkit.NewTestKit(t, store)
tk.MustExec("use test")
tk.MustExec("drop table if exists t;")
tk.MustExec("create table t(customer_id bigint, id bigint, expected_shard bigint unsigned, computed_sha... | explode_data.jsonl/65581 | {
"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,
53,
275,
433,
6370,
42470,
53,
275,
433,
2016,
2347,
1155,
353,
8840,
836,
8,
341,
57279,
11,
4240,
1669,
1273,
8226,
7251,
11571,
6093,
1155,
340,
16867,
4240,
2822,
3244,
74,
1669,
1273,
8226,
7121,
2271,
7695,
1155,
11,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTimeStampMillisLogicalTypeEncode(t *testing.T) {
schema := `{"type": "long", "logicalType": "timestamp-millis"}`
testBinaryDecodeFail(t, schema, []byte(""), "short buffer")
testBinaryEncodeFail(t, schema, "test", "cannot transform binary timestamp-millis, expected time.Time")
testBinaryCodecPass(t, schema,... | explode_data.jsonl/12003 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 158
} | [
2830,
3393,
66146,
17897,
64312,
929,
32535,
1155,
353,
8840,
836,
8,
341,
1903,
3416,
1669,
1565,
4913,
1313,
788,
330,
4825,
497,
330,
30256,
929,
788,
330,
13035,
1448,
56212,
9207,
3989,
18185,
21338,
32564,
19524,
1155,
11,
10802,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReturnsSTHPollination(t *testing.T) {
s := createAndOpenStorage()
defer closeAndDeleteStorage(s)
v := mustCreateSignatureVerifiers(t)
h := newHandlerWithClock(s, v, testStuckClock(stuckClockTimeMillis))
sentPollen := sthPollinationFromString(t, addSTHPollinationJSON)
sentPollenJSON, err := json.Marshal(... | explode_data.jsonl/80088 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 497
} | [
2830,
3393,
16446,
784,
6610,
965,
2554,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
1855,
3036,
5002,
5793,
741,
16867,
3265,
3036,
6435,
5793,
1141,
340,
5195,
1669,
1969,
4021,
25088,
10141,
11836,
1155,
340,
9598,
1669,
501,
3050,
235... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetSpace(t *testing.T) {
testCases := []*spaceTestData{
defaultSpaceTestData,
{
testName: "Empty List",
spaceName: "mySpace",
cassetteName: "getspace-empty-bc",
},
{
testName: "Wrong List",
spaceName: "mySpace",
cassetteName: "getspace-wrong-list",
shouldFail: true... | explode_data.jsonl/41270 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2433
} | [
2830,
3393,
1949,
9914,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
29838,
8746,
83920,
515,
197,
11940,
9914,
83920,
345,
197,
197,
515,
298,
18185,
675,
25,
257,
330,
3522,
1759,
756,
298,
1903,
1306,
675,
25,
262,
330,
2408,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLRU_Get(t *testing.T) {
t.Parallel()
c := NewLRUCache(2000)
type fields struct {
Cache *lru.Cache
Hit int64
Miss int64
}
type args struct {
key string
}
tests := []struct {
name string
fields fields
args args
want interface{}
wantErr bool
saveBefore bool... | explode_data.jsonl/46947 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 860
} | [
2830,
3393,
20117,
52,
13614,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
1444,
1669,
1532,
20117,
5459,
1777,
7,
17,
15,
15,
15,
692,
13158,
5043,
2036,
341,
197,
6258,
1777,
353,
75,
2672,
46130,
198,
197,
13292,
275,
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... | 9 |
func Test_DeletePlugin(t *testing.T) {
assert := assert.New(t)
defer setupLocalDistoForTesting()()
// Try delete plugin when plugin is not installed
err := DeletePlugin("", "login")
assert.NotNil(err)
assert.Contains(err.Error(), "could not get plugin path for plugin \"login\"")
// Install login (standalone) ... | explode_data.jsonl/71407 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 250
} | [
2830,
3393,
57418,
11546,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
16867,
6505,
7319,
23356,
78,
2461,
16451,
368,
2822,
197,
322,
9735,
3698,
9006,
979,
9006,
374,
537,
10275,
198,
9859,
1669,
10428,
11546,
1981... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSpanStatus_MoveTo(t *testing.T) {
ms := generateTestSpanStatus()
dest := NewSpanStatus()
ms.MoveTo(dest)
assert.EqualValues(t, NewSpanStatus(), ms)
assert.EqualValues(t, generateTestSpanStatus(), dest)
} | explode_data.jsonl/63301 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 81
} | [
2830,
3393,
12485,
2522,
66352,
1249,
1155,
353,
8840,
836,
8,
341,
47691,
1669,
6923,
2271,
12485,
2522,
741,
49616,
1669,
1532,
12485,
2522,
741,
47691,
31195,
1249,
27010,
340,
6948,
12808,
6227,
1155,
11,
1532,
12485,
2522,
1507,
9829... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRunJob(t *testing.T) {
ctx := context.Background()
s, err := standard.New(ctx, standard.WithLogLevel(zerolog.Disabled), standard.WithMonitor(&nullmetrics.Service{}))
require.NoError(t, err)
require.NotNil(t, s)
run := 0
runFunc := func(ctx context.Context, data interface{}) {
run++
}
require.NoErro... | explode_data.jsonl/44213 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 254
} | [
2830,
3393,
6727,
12245,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
1903,
11,
1848,
1669,
5297,
7121,
7502,
11,
5297,
26124,
72676,
7,
7070,
1609,
89576,
701,
5297,
26124,
30098,
2099,
2921,
43262,
13860,
6257,
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... | 1 |
func TestIsValidOrigin(t *testing.T) {
// don't use portocal(http/https) for ALLOWED_ORIGINS while testing,
// as we trim them off while running the main function
envstore.EnvInMemoryStoreObj.UpdateEnvVariable(constants.SliceStoreIdentifier, constants.EnvKeyAllowedOrigins, []string{"localhost:8080", "*.google.com", ... | explode_data.jsonl/56490 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 425
} | [
2830,
3393,
55470,
13298,
1155,
353,
8840,
836,
8,
341,
197,
322,
1513,
944,
990,
2635,
3683,
19886,
14,
2428,
8,
369,
72260,
1479,
19834,
1914,
9557,
1393,
7497,
345,
197,
322,
438,
582,
11013,
1105,
1007,
1393,
4303,
279,
1887,
729,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGoCSVNewWithInvalidDeployDir(t *testing.T) {
cleanupFunc := chDirWithCleanup(t, testGoDataDir)
defer cleanupFunc()
cfg := gen.Config{
OperatorName: testProjectName,
Inputs: map[string]string{
DeployDirKey: "notExist",
APIsDirKey: filepath.Join("pkg", "apis"),
CRDsDirKey: "notExist",
},
... | explode_data.jsonl/21327 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 241
} | [
2830,
3393,
10850,
44209,
3564,
2354,
7928,
69464,
6184,
1155,
353,
8840,
836,
8,
341,
1444,
60639,
9626,
1669,
521,
6184,
2354,
67335,
1155,
11,
1273,
10850,
1043,
6184,
340,
16867,
21290,
9626,
2822,
50286,
1669,
4081,
10753,
515,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestRoaringPostingsListEqualWithOtherRoaring(t *testing.T) {
first := NewPostingsList()
first.Insert(42)
first.Insert(44)
first.Insert(51)
second := NewPostingsList()
second.Insert(42)
second.Insert(44)
second.Insert(51)
require.True(t, first.Equal(second))
} | explode_data.jsonl/64022 | {
"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,
38872,
3249,
4133,
819,
852,
2993,
2354,
11409,
38872,
3249,
1155,
353,
8840,
836,
8,
341,
42190,
1669,
1532,
4133,
819,
852,
741,
42190,
23142,
7,
19,
17,
340,
42190,
23142,
7,
19,
19,
340,
42190,
23142,
7,
20,
16,
692,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExplainerToKnativeService(t *testing.T) {
kfsvc := v1alpha2.KFService{
ObjectMeta: metav1.ObjectMeta{
Name: "mnist",
Namespace: "default",
},
Spec: v1alpha2.KFServiceSpec{
Default: v1alpha2.EndpointSpec{
Predictor: v1alpha2.PredictorSpec{
DeploymentSpec: v1alpha2.DeploymentSpec{
... | explode_data.jsonl/63805 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2680
} | [
2830,
3393,
43953,
1743,
1249,
42,
29738,
1860,
1155,
353,
8840,
836,
8,
341,
16463,
69,
58094,
1669,
348,
16,
7141,
17,
11352,
37,
1860,
515,
197,
23816,
12175,
25,
77520,
16,
80222,
515,
298,
21297,
25,
414,
330,
21775,
380,
756,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 7 |
func TestIsLine(t *testing.T) {
notLine := []byte("This is not a line")
assert.False(t, isLine(notLine))
notLine = []byte("This is not a line\n\r")
assert.False(t, isLine(notLine))
notLine = []byte("This is \n not a line")
assert.False(t, isLine(notLine))
line := []byte("This is a line \n")
assert.True(t, is... | explode_data.jsonl/62360 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 160
} | [
2830,
3393,
3872,
2460,
1155,
353,
8840,
836,
8,
341,
97266,
2460,
1669,
3056,
3782,
445,
1986,
374,
537,
264,
1555,
1138,
6948,
50757,
1155,
11,
374,
2460,
24772,
2460,
4390,
97266,
2460,
284,
3056,
3782,
445,
1986,
374,
537,
264,
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 TestValidArgsCompletionInGo(t *testing.T) {
rootCmd := &Command{
Use: "root",
ValidArgs: []string{"one", "two", "three"},
Args: MinimumNArgs(1),
}
// Test that validArgs are completed
output, err := executeCommand(rootCmd, ShellCompNoDescRequestCmd, "")
if err != nil {
t.Errorf("Unexpected... | explode_data.jsonl/43737 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 492
} | [
2830,
3393,
4088,
4117,
33190,
641,
10850,
1155,
353,
8840,
836,
8,
341,
33698,
15613,
1669,
609,
4062,
515,
197,
95023,
25,
981,
330,
2888,
756,
197,
197,
4088,
4117,
25,
3056,
917,
4913,
603,
497,
330,
19789,
497,
330,
27856,
7115,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMySQLExplainWarnings(t *testing.T) {
expInfo, err := connTest.Explain("select 1", TraditionalExplainType, TraditionalFormatExplain)
if err != nil {
t.Error(err)
}
err = common.GoldenDiff(func() {
MySQLExplainWarnings(expInfo)
}, t.Name(), update)
if err != nil {
t.Error(err)
}
} | explode_data.jsonl/55050 | {
"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,
59224,
840,
20772,
20140,
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,
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... | 1 |
func TestWeight_Encode(t *testing.T) {
assertEncode(t, []encodingAssert{
{NewWeight(29), MustHexDecodeString("0x1d00000000000000")},
})
} | explode_data.jsonl/5199 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 57
} | [
2830,
3393,
8295,
93529,
534,
1155,
353,
8840,
836,
8,
341,
6948,
32535,
1155,
11,
3056,
17159,
8534,
515,
197,
197,
90,
3564,
8295,
7,
17,
24,
701,
15465,
20335,
32564,
703,
445,
15,
87,
16,
67,
15,
15,
15,
15,
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 |
func TestFactory_NewMetricsAspect_Errs(t *testing.T) {
err := fmt.Errorf("expected")
b := &builder{createClient: clientFunc(err), mg: dummyMetadataGenerator}
b.SetAdapterConfig(&config.Params{})
res, e := b.Build(context.Background(), test.NewEnv(t))
if e != nil && !strings.Contains(e.Error(), err.Error()) {
t.F... | explode_data.jsonl/54748 | {
"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,
4153,
39582,
27328,
37559,
93623,
82,
1155,
353,
8840,
836,
8,
341,
9859,
1669,
8879,
13080,
445,
7325,
1138,
2233,
1669,
609,
17850,
90,
3182,
2959,
25,
2943,
9626,
3964,
701,
13742,
25,
17292,
14610,
12561,
532,
2233,
4202... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBaseReqValidateBasic(t *testing.T) {
fromAddr := "cosmos1cq0sxam6x4l0sv9yz3a2vlqhdhvt2k6jtgcse0"
tenstakes, err := types.ParseCoins("10stake")
require.NoError(t, err)
onestake, err := types.ParseDecCoins("1.0stake")
require.NoError(t, err)
req1 := NewBaseReq(
fromAddr, "", "nonempty", "", "", 0, 0, te... | explode_data.jsonl/3951 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 559
} | [
2830,
3393,
3978,
27234,
17926,
15944,
1155,
353,
8840,
836,
8,
341,
42727,
13986,
1669,
330,
9407,
8631,
16,
95418,
15,
48612,
309,
21,
87,
19,
75,
15,
3492,
24,
18348,
18,
64,
17,
14536,
80,
15990,
71,
9708,
17,
74,
21,
57205,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestRepository_GetFeaturesFail(t *testing.T) {
assert := assert.New(t)
featuresCalls := make(chan int, 10)
var sendStatus200 int32
prevStatus := 0
srv := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) {
switch req.Method + " " + req.URL.Path {
case "POST /client/regist... | explode_data.jsonl/47721 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 692
} | [
2830,
3393,
4624,
13614,
21336,
19524,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
340,
1166,
22462,
55292,
1669,
1281,
35190,
526,
11,
220,
16,
15,
340,
2405,
3624,
2522,
17,
15,
15,
526,
18,
17,
198,
50728,
2522,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHTTPGetterTarDownload(t *testing.T) {
srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
f, _ := os.Open("testdata/empty-0.0.1.tgz")
defer f.Close()
b := make([]byte, 512)
f.Read(b)
//Get the file size
FileStat, _ := f.Stat()
FileSize := strconv.FormatInt(... | explode_data.jsonl/53170 | {
"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,
9230,
31485,
62733,
11377,
1155,
353,
8840,
836,
8,
341,
1903,
10553,
1669,
54320,
70334,
7121,
5475,
19886,
89164,
18552,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
197,
1166,
11,
716,
1669,
2643,
12953,
445,
9242... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUnicode(t *testing.T) {
var jsonStr = `{"key":0,"的情况下解":{"key":1,"的情况":2}}`
if Get(jsonStr, "的情况下解.key").Num != 1 {
t.Fatal("fail")
}
if Get(jsonStr, "的情况下解.的情况").Num != 2 {
t.Fatal("fail")
}
if Get(jsonStr, "的情况下解.的?况").Num != 2 {
t.Fatal("fail")
}
if Get(jsonStr, "的情况下解.的?*").Num != 2 {
t.Fat... | explode_data.jsonl/43433 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 336
} | [
2830,
3393,
33920,
1155,
353,
8840,
836,
8,
341,
2405,
2951,
2580,
284,
1565,
4913,
792,
788,
15,
1335,
104248,
49238,
22317,
792,
788,
16,
1335,
102072,
788,
17,
3417,
3989,
743,
2126,
9304,
2580,
11,
330,
104248,
49238,
4735,
1827,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTemplate_HasOutputs(t *testing.T) {
t.Run("Default", func(t *testing.T) {
x := &Template{}
assert.False(t, x.HasOutput())
})
t.Run("Container", func(t *testing.T) {
x := &Template{Container: &corev1.Container{}}
assert.True(t, x.HasOutput())
})
t.Run("ContainerSet", func(t *testing.T) {
t.Run("N... | explode_data.jsonl/26056 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 411
} | [
2830,
3393,
7275,
2039,
300,
61438,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
3675,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
10225,
1669,
609,
7275,
16094,
197,
6948,
50757,
1155,
11,
856,
16152,
5097,
2398,
197,
3518,
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,
1,
1,
1,
1,
1... | 1 |
func TestFile_Empty(t *testing.T) {
fs := testFs()
fs.WriteFile(".halfpipe.io", []byte{}, 0777)
err := CheckFile(fs, ".halfpipe.io", false)
assert.Equal(t, linterrors.NewFileError(".halfpipe.io", "is empty"), err)
} | explode_data.jsonl/71217 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 88
} | [
2830,
3393,
1703,
76060,
1595,
1155,
353,
8840,
836,
8,
341,
53584,
1669,
1273,
48300,
741,
53584,
4073,
1703,
5680,
37006,
13768,
4245,
497,
3056,
3782,
22655,
220,
15,
22,
22,
22,
692,
9859,
1669,
4248,
1703,
31856,
11,
5933,
37006,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConfig_FieldNotDefined(t *testing.T) {
c := NewConfig()
err := c.LoadConfig("./testdata/invalid_field.toml")
require.Error(t, err, "invalid field name")
assert.Equal(t, "Error loading config file ./testdata/invalid_field.toml: plugin inputs.http_listener_v2: line 1: configuration specified the fields [\"no... | explode_data.jsonl/67105 | {
"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,
2648,
46272,
2623,
29361,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
1532,
2648,
741,
9859,
1669,
272,
13969,
2648,
13988,
92425,
14,
11808,
5013,
73494,
75,
1138,
17957,
6141,
1155,
11,
1848,
11,
330,
11808,
2070,
829,
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 TestIndexation_Serialize(t *testing.T) {
type test struct {
name string
source *iotago.Indexation
target []byte
}
tests := []test{
func() test {
indexationPayload, indexationPayloadData := tpkg.RandIndexation()
return test{"ok", indexationPayload, indexationPayloadData}
}(),
}
for _, tt := r... | explode_data.jsonl/27822 | {
"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,
1552,
367,
1098,
9050,
1155,
353,
8840,
836,
8,
341,
13158,
1273,
2036,
341,
197,
11609,
256,
914,
198,
197,
47418,
353,
11098,
6304,
18338,
367,
198,
197,
28861,
3056,
3782,
198,
197,
532,
78216,
1669,
3056,
1944,
515,
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 TestReaderFrom_Stream(t *testing.T) {
ctx := context.Background()
t.Run("Simple", func(t *testing.T) {
const chunkSize = 3
s := NewStreamer(&BytesReader{
Align: chunkSize,
Data: []byte{1, 2, 3, 4, 5, 6, 7, 8},
}, chunkSize)
t.Run("Equal", func(t *testing.T) {
out := new(bytes.Buffer)
require... | explode_data.jsonl/21775 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 473
} | [
2830,
3393,
5062,
3830,
80631,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
3244,
16708,
445,
16374,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
4777,
11879,
1695,
284,
220,
18,
198,
197,
1903,
1669,
1532,
80063,
209... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTeamTxSweepMembers(t *testing.T) {
tt := newTeamTester(t)
defer tt.cleanup()
ann := tt.addUser("ann")
t.Logf("Signed up user ann (%s)", ann.username)
bob := tt.addUser("bob")
t.Logf("Signed up user bob (%s)", bob.username)
pat := tt.addPuklessUser("pat")
t.Logf("Signed up PUKless user pat (%s)", pat... | explode_data.jsonl/27644 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 568
} | [
2830,
3393,
14597,
31584,
50,
48542,
24371,
1155,
353,
8840,
836,
8,
341,
3244,
83,
1669,
501,
14597,
58699,
1155,
340,
16867,
17853,
87689,
2822,
197,
1020,
1669,
17853,
1364,
1474,
445,
1020,
1138,
3244,
98954,
445,
49312,
705,
1196,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConvertToArabic(t *testing.T) {
for _, test := range cases {
t.Run(fmt.Sprintf("%s gets converted to %d", test.Roman, test.Arabic), func(t *testing.T) {
got := ConvertToArabic(test.Roman)
want := test.Arabic
if got != want {
t.Errorf("got %v, want %v", got, want)
}
})
}
} | explode_data.jsonl/27665 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 134
} | [
2830,
3393,
12012,
1249,
6953,
68291,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
1273,
1669,
2088,
5048,
341,
197,
3244,
16708,
28197,
17305,
4430,
82,
5221,
16099,
311,
1018,
67,
497,
1273,
2013,
6908,
11,
1273,
875,
50105,
292,
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... | 2 |
func TestRedis_Hgetall(t *testing.T) {
runOnRedis(t, func(client *Redis) {
assert.Nil(t, client.Hset("a", "aa", "aaa"))
assert.Nil(t, client.Hset("a", "bb", "bbb"))
_, err := NewRedis(client.Addr, "").Hgetall("a")
assert.NotNil(t, err)
vals, err := client.Hgetall("a")
assert.Nil(t, err)
assert.EqualValue... | explode_data.jsonl/39156 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 194
} | [
2830,
3393,
48137,
2039,
455,
541,
1155,
353,
8840,
836,
8,
341,
56742,
1925,
48137,
1155,
11,
2915,
12805,
353,
48137,
8,
341,
197,
6948,
59678,
1155,
11,
2943,
3839,
746,
445,
64,
497,
330,
5305,
497,
330,
32646,
5455,
197,
6948,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestCrudSegmentsWithFailures(t *testing.T) {
var res middleware.Responder
db := entity.NewTestDB()
c := &crud{}
defer db.Close()
defer gostub.StubFunc(&getDB, db).Reset()
c.CreateFlag(flag.CreateFlagParams{
Body: &models.CreateFlagRequest{
Description: util.StringPtr("funny flag"),
},
})
t.Run("F... | explode_data.jsonl/19452 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 850
} | [
2830,
3393,
92061,
64813,
2354,
19524,
1413,
1155,
353,
8840,
836,
8,
341,
2405,
592,
29679,
8377,
20328,
198,
20939,
1669,
5387,
7121,
2271,
3506,
741,
1444,
1669,
609,
53569,
31483,
16867,
2927,
10421,
741,
16867,
67934,
392,
7758,
392,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFormatWithLandLine(t *testing.T) {
for _, tt := range mobWithLLFormatTests {
number := ParseWithLandLine(tt.input, tt.country)
if number != tt.expected {
t.Errorf("Parse(number=`%s`, country=`%s`): expected `%s`, actual `%s`", tt.input, tt.country, tt.expected, number)
}
}
} | explode_data.jsonl/58213 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 123
} | [
2830,
3393,
4061,
2354,
41957,
2460,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17853,
1669,
2088,
12595,
2354,
4086,
4061,
18200,
341,
197,
57135,
1669,
14775,
2354,
41957,
2460,
47152,
10046,
11,
17853,
33324,
340,
197,
743,
1372,
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 TestManifestGenerateComponentHubTag(t *testing.T) {
g := NewWithT(t)
objs, err := runManifestCommands("component_hub_tag", "", liveCharts)
if err != nil {
t.Fatal(err)
}
tests := []struct {
deploymentName string
containerName string
want string
}{
{
deploymentName: "istio-ingressgat... | explode_data.jsonl/47902 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 384
} | [
2830,
3393,
38495,
31115,
2189,
19316,
5668,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
1532,
2354,
51,
1155,
692,
22671,
82,
11,
1848,
1669,
1598,
38495,
30479,
445,
8571,
93996,
9372,
497,
7342,
3887,
64878,
340,
743,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestValidateServerPermissions_ValidInput(t *testing.T) {
var tests = []struct {
name string
permissionsInput []models.Permission
}{
{"Valid Permission info",
[]models.Permission{
models.Permission{
"Object",
"",
"",
"",
"",
"",
[]string{},
models.C... | explode_data.jsonl/71214 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 767
} | [
2830,
3393,
17926,
5475,
23851,
97279,
2505,
1155,
353,
8840,
836,
8,
341,
2405,
7032,
284,
3056,
1235,
341,
197,
11609,
1797,
914,
198,
197,
197,
29900,
2505,
3056,
6507,
73409,
198,
197,
59403,
197,
197,
4913,
4088,
18135,
3546,
756,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestICodeApi_ExecuteRequestList(t *testing.T) {
savePath := os.Getenv("GOPATH") + "/src/github.com/it-chain/engine/.tmp/"
defer os.RemoveAll(savePath)
sshPath := "./id_rsa"
err, tearDown1 := generatePriKey(sshPath)
assert.NoError(t, err)
defer tearDown1()
api, _ := setUp(t)
icode, err := api.Deploy(saveP... | explode_data.jsonl/9677 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 358
} | [
2830,
3393,
1317,
534,
6563,
83453,
1900,
852,
1155,
353,
8840,
836,
8,
341,
49230,
1820,
1669,
2643,
64883,
445,
98733,
4827,
899,
488,
3521,
3548,
71120,
905,
14,
275,
65186,
82045,
11930,
5173,
29555,
16867,
2643,
84427,
33546,
1820,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMigration(t *testing.T) {
_ = os.Remove(dbName)
db, err := xorm.NewEngine("sqlite3", dbName)
if err != nil {
log.Fatal(err)
}
defer db.Close()
if err = db.DB().Ping(); err != nil {
log.Fatal(err)
}
m := New(db, DefaultOptions, migrations)
err = m.Migrate()
assert.NoError(t, err)
exists, _ :=... | explode_data.jsonl/58881 | {
"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,
20168,
1155,
353,
8840,
836,
8,
341,
197,
62,
284,
2643,
13270,
9791,
675,
692,
20939,
11,
1848,
1669,
856,
493,
7121,
4571,
445,
37042,
18,
497,
75564,
340,
743,
1848,
961,
2092,
341,
197,
6725,
26133,
3964,
340,
197,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestAccShakenFistNetwork(t *testing.T) {
var network client.Network
randomName := acctest.RandStringFromCharSet(10, acctest.CharSetAlphaNum)
resType := "shakenfist_network."
resName := "external"
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
... | explode_data.jsonl/18035 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 687
} | [
2830,
3393,
14603,
2016,
3366,
37,
380,
12320,
1155,
353,
8840,
836,
8,
341,
2405,
3922,
2943,
30149,
271,
83628,
675,
1669,
1613,
67880,
2013,
437,
703,
3830,
4768,
1649,
7,
16,
15,
11,
1613,
67880,
10447,
1649,
19384,
4651,
692,
102... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMetablockLoadDumpLoad(t *testing.T) {
// Dump, load and compare metablock, also compare with metablock loaded
// from existing equivalent JSON file, assert that they are equal.
mbMemory := Metablock{
Signed: Link{
Type: "link",
Name: "package",
Command: []string{
"tar",
"zcvf",
"foo.t... | explode_data.jsonl/51758 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1345
} | [
2830,
3393,
34673,
370,
1023,
5879,
51056,
5879,
1155,
353,
8840,
836,
8,
341,
197,
322,
29693,
11,
2795,
323,
9429,
19635,
1023,
11,
1083,
9429,
448,
19635,
1023,
6661,
198,
197,
322,
504,
6350,
13578,
4718,
1034,
11,
2060,
429,
807,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Test_DeployHandler_Execution_Errors_Release(t *testing.T) {
release := MockRelease()
awsc := MockAwsClients(release)
release.ReleaseID = nil
state_machine := createTestStateMachine(t, awsc)
exec, err := state_machine.Execute(release)
assert.Error(t, err)
assert.Regexp(t, "BadReleaseError", exec.LastOutp... | explode_data.jsonl/62292 | {
"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,
90680,
1989,
3050,
62,
20294,
93623,
1087,
85573,
1155,
353,
8840,
836,
8,
341,
17200,
1623,
1669,
14563,
16077,
2822,
197,
672,
2388,
1669,
14563,
47359,
47174,
5801,
1623,
340,
17200,
1623,
58693,
915,
284,
2092,
271,
24291,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTagValueUnMarshaling(t *testing.T) {
for i, tt := range stringtests {
var tv TagValue
err := json.Unmarshal(tt.json, &tv)
if err != nil {
t.Errorf("%d. Unmarshal(%q, &str) returned err: %s", i, tt.json, err)
} else {
if tv != tt.tv {
t.Errorf(
"%d. Unmarshal(%q, &str) => str==%q, want %... | explode_data.jsonl/14048 | {
"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,
5668,
1130,
1806,
79712,
6132,
1155,
353,
8840,
836,
8,
341,
2023,
600,
11,
17853,
1669,
2088,
914,
23841,
341,
197,
2405,
11086,
12353,
1130,
198,
197,
9859,
1669,
2951,
38097,
47152,
4323,
11,
609,
22209,
340,
197,
743,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestPanicThresholdPercentage(t *testing.T) {
cases := []struct {
name string
pa *PodAutoscaler
wantPercentage float64
wantOK bool
}{{
name: "not present",
pa: pa(map[string]string{}),
wantPercentage: 0.0,
wantOK: false,
}, {
name: "pr... | explode_data.jsonl/27236 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 404
} | [
2830,
3393,
47,
31270,
37841,
36167,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
11609,
1843,
914,
198,
197,
3223,
64,
1797,
353,
23527,
19602,
436,
63084,
198,
197,
50780,
36167,
2224,
21,
19,
198,
197,
5078... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAudioAdaptorName(t *testing.T) {
a := NewAdaptor()
gobottest.Assert(t, strings.HasPrefix(a.Name(), "Audio"), true)
a.SetName("NewName")
gobottest.Assert(t, a.Name(), "NewName")
} | explode_data.jsonl/66224 | {
"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,
14755,
2589,
32657,
675,
1155,
353,
8840,
836,
8,
341,
11323,
1669,
1532,
2589,
32657,
741,
3174,
674,
1716,
477,
11711,
1155,
11,
9069,
94357,
2877,
2967,
1507,
330,
14755,
3975,
830,
340,
11323,
4202,
675,
445,
3564,
675,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDownloadOverrideObjectRemote(t *testing.T) {
var (
proxyURL = tutils.RandomProxyURL(t)
baseParams = tutils.BaseAPIParams(proxyURL)
bck = cmn.Bck{
Name: cos.RandString(10),
Provider: cmn.ProviderAIS,
}
dlBody = downloader.DlBackendBody{
DlBase: downloader.DlBase{Bck: bck},
}
... | explode_data.jsonl/70392 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 346
} | [
2830,
3393,
11377,
2177,
1190,
24703,
1155,
353,
8840,
836,
8,
341,
2405,
2399,
197,
197,
22803,
3144,
256,
284,
259,
6031,
26709,
16219,
3144,
1155,
340,
197,
24195,
4870,
284,
259,
6031,
13018,
7082,
4870,
65787,
3144,
340,
197,
2233,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStdTx(t *testing.T) {
priv := crypto.GenPrivKeyEd25519()
addr := priv.PubKey().Address()
msg := NewTestMsg(addr)
fee := newStdFee()
sigs := []StdSignature{}
tx := NewStdTx(msg, fee, sigs)
assert.Equal(t, msg, tx.GetMsg())
assert.Equal(t, sigs, tx.GetSignatures())
feePayer := FeePayer(tx)
assert.Equ... | explode_data.jsonl/6530 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 148
} | [
2830,
3393,
22748,
31584,
1155,
353,
8840,
836,
8,
341,
71170,
1669,
19028,
65384,
32124,
1592,
2715,
17,
20,
20,
16,
24,
741,
53183,
1669,
6095,
1069,
392,
1592,
1005,
4286,
741,
21169,
1669,
1532,
2271,
6611,
24497,
340,
1166,
2127,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWriteReadCurrentPidFile(t *testing.T) {
ctx := newTestContext("TestWriteReadPidFile", t)
var err error
var pidRead int
pid := os.Getpid()
if err = util.WritePidFile(ctx, -1); err != nil {
t.Fatalf("error writing pidfile=%s", util.PidFilePath(ctx))
}
if pidRead, err = util.ReadPidFile(ctx); err != ... | explode_data.jsonl/15038 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 188
} | [
2830,
3393,
7985,
4418,
5405,
32339,
1703,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
501,
2271,
1972,
445,
2271,
7985,
4418,
32339,
1703,
497,
259,
692,
2405,
1848,
1465,
198,
2405,
14814,
4418,
526,
271,
78799,
1669,
2643,
2234,
10412... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestApplicationContext_LoadProperties(t *testing.T) {
c, ch := container()
err := c.Load("testdata/config/application.yaml")
assert.Nil(t, err)
err = c.Load("testdata/config/application.properties")
assert.Nil(t, err)
err = c.Refresh()
assert.Nil(t, err)
p := <-ch
assert.Equal(t, p.Properties().Get(... | explode_data.jsonl/17403 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 188
} | [
2830,
3393,
19736,
19553,
7903,
1155,
353,
8840,
836,
8,
1476,
1444,
11,
521,
1669,
5476,
2822,
9859,
1669,
272,
13969,
445,
92425,
14730,
33032,
33406,
1138,
6948,
59678,
1155,
11,
1848,
692,
9859,
284,
272,
13969,
445,
92425,
14730,
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 TestEKS(t *testing.T) {
detectorUtils := new(MockDetectorUtils)
ctx := context.Background()
require.NoError(t, os.Setenv("KUBERNETES_SERVICE_HOST", "localhost"))
detectorUtils.On("getConfigMap", authConfigmapNS, authConfigmapName).Return(map[string]string{"cluster.name": "my-cluster"}, nil)
// Call EKS Resou... | explode_data.jsonl/54900 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 234
} | [
2830,
3393,
36,
40449,
1155,
353,
8840,
836,
8,
341,
2698,
295,
1256,
4209,
1669,
501,
66436,
31606,
4209,
340,
20985,
1669,
2266,
19047,
2822,
17957,
35699,
1155,
11,
2643,
4202,
3160,
445,
42,
4493,
13660,
1348,
1570,
21590,
17213,
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 TestGetBucketInfo(t *testing.T) {
ak := os.Getenv("AccessKey")
sk := os.Getenv("SecretKey")
bucket := os.Getenv("Bucket")
mac := digest.Mac{ak, []byte(sk)}
bucketInfo, gErr := GetBucketInfo(&mac, bucket)
if gErr != nil {
t.Fatal(gErr)
}
t.Log(bucketInfo.Region)
} | explode_data.jsonl/56492 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 123
} | [
2830,
3393,
1949,
36018,
1731,
1155,
353,
8840,
836,
8,
341,
197,
585,
1669,
2643,
64883,
445,
6054,
1592,
1138,
1903,
74,
1669,
2643,
64883,
445,
19773,
1592,
1138,
2233,
11152,
1669,
2643,
64883,
445,
36018,
1138,
2109,
580,
1669,
208... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStickyLoadBalanceWorksWithServiceRemoval(t *testing.T) {
client1 := &net.TCPAddr{IP: net.IPv4(127, 0, 0, 1), Port: 0}
client2 := &net.TCPAddr{IP: net.IPv4(127, 0, 0, 2), Port: 0}
client3 := &net.TCPAddr{IP: net.IPv4(127, 0, 0, 3), Port: 0}
loadBalancer := NewLoadBalancerRR()
fooService := proxy.ServicePor... | explode_data.jsonl/66183 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1329
} | [
2830,
3393,
623,
18964,
5879,
21190,
6776,
16056,
1860,
6590,
13516,
1155,
353,
8840,
836,
8,
341,
25291,
16,
1669,
609,
4711,
836,
7123,
13986,
90,
3298,
25,
4179,
46917,
85,
19,
7,
16,
17,
22,
11,
220,
15,
11,
220,
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 TestSaveTokenFailsNoPermission(t *testing.T) {
pathWhereWeShouldntHavePermission := "/usr/thiswontwork/atall"
if runtime.GOOS == "windows" {
pathWhereWeShouldntHavePermission = path.Join(os.Getenv("windir"), "system32\\mytokendir\\mytoken")
}
err := SaveToken(pathWhereWeShouldntHavePermission, 0644, *to... | explode_data.jsonl/14995 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 194
} | [
2830,
3393,
8784,
3323,
37,
6209,
2753,
14966,
1155,
353,
8840,
836,
8,
972,
26781,
9064,
1654,
14996,
406,
12116,
14966,
1669,
3521,
7063,
14,
574,
86,
544,
1778,
80730,
541,
5031,
743,
15592,
97574,
3126,
621,
330,
27077,
1,
972,
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... | 4 |
func TestDateLogicalTypeEncode(t *testing.T) {
schema := `{"type": "int", "logicalType": "date"}`
testBinaryDecodeFail(t, schema, []byte(""), "short buffer")
testBinaryEncodeFail(t, schema, "test", "cannot transform to binary date, expected time.Time, received string")
testBinaryCodecPass(t, schema, time.Date(2006,... | explode_data.jsonl/12011 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 140
} | [
2830,
3393,
1916,
64312,
929,
32535,
1155,
353,
8840,
836,
8,
341,
1903,
3416,
1669,
1565,
4913,
1313,
788,
330,
396,
497,
330,
30256,
929,
788,
330,
1028,
9207,
3989,
18185,
21338,
32564,
19524,
1155,
11,
10802,
11,
3056,
3782,
86076,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLinkCompletionHandler(t *testing.T) {
tests := []struct {
name string
component string
dcList appsv1.DeploymentConfigList
serviceList scv1beta1.ServiceInstanceList
output []string
}{
{
name: "Case 1: both components and services are present",
component: "frontend",
... | explode_data.jsonl/3547 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2146
} | [
2830,
3393,
3939,
33190,
3050,
1155,
353,
8840,
836,
8,
1476,
78216,
1669,
3056,
1235,
341,
197,
11609,
286,
914,
198,
197,
52228,
256,
914,
198,
197,
87249,
852,
414,
906,
3492,
16,
34848,
39130,
2648,
852,
198,
197,
52934,
852,
1136... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAddrSerialization(t *testing.T) {
t.Parallel()
var b bytes.Buffer
for _, test := range addrTests {
err := serializeAddr(&b, test.expAddr)
if err != test.serErr {
t.Fatalf("unexpected serialization err for addr %v, "+
"want: %v, got %v",
test.expAddr, test.serErr, err)
} else if test.serErr... | explode_data.jsonl/46280 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 259
} | [
2830,
3393,
13986,
35865,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
2405,
293,
5820,
22622,
198,
2023,
8358,
1273,
1669,
2088,
10789,
18200,
341,
197,
9859,
1669,
24235,
13986,
2099,
65,
11,
1273,
13754,
13986,
340,
197,
74... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestChangefeedCursor(t *testing.T) {
defer leaktest.AfterTest(t)()
testFn := func(t *testing.T, db *gosql.DB, f testfeedFactory) {
sqlDB := sqlutils.MakeSQLRunner(db)
sqlDB.Exec(t, `CREATE TABLE foo (a INT PRIMARY KEY, b STRING)`)
// To make sure that these timestamps are after 'before' and before
// '... | explode_data.jsonl/21275 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 867
} | [
2830,
3393,
1143,
524,
823,
12051,
14543,
1155,
353,
8840,
836,
8,
341,
16867,
23352,
1944,
36892,
2271,
1155,
8,
2822,
18185,
24911,
1669,
2915,
1155,
353,
8840,
836,
11,
2927,
353,
34073,
1470,
22537,
11,
282,
1273,
11184,
4153,
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... | 2 |
func TestGetPostsubmitsReturnsStaticAndInrepoconfigPostsubmits(t *testing.T) {
t.Parallel()
org, repo := "org", "repo"
c := &Config{
ProwConfig: ProwConfig{
InRepoConfig: InRepoConfig{Enabled: map[string]*bool{"*": utilpointer.BoolPtr(true)}},
},
JobConfig: JobConfig{
PostsubmitsStatic: map[string][]Pos... | explode_data.jsonl/8098 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 455
} | [
2830,
3393,
1949,
4133,
1966,
44703,
16446,
11690,
3036,
641,
23476,
1676,
4133,
1966,
44703,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
87625,
11,
15867,
1669,
330,
1775,
497,
330,
23476,
698,
1444,
1669,
609,
2648,
515,
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 TestCache_IsCacheable_negative(t *testing.T) {
msgHdr := func(rcode int) (hdr dns.MsgHdr) { return dns.MsgHdr{Id: dns.Id(), Rcode: rcode} }
aQuestions := func(name string) []dns.Question {
return []dns.Question{{
Name: name,
Qtype: dns.TypeA,
Qclass: dns.ClassINET,
}}
}
cnameAns := func(name, ... | explode_data.jsonl/18913 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2441
} | [
2830,
3393,
8233,
31879,
8233,
480,
53865,
1155,
353,
8840,
836,
8,
341,
21169,
88367,
1669,
2915,
35429,
534,
526,
8,
320,
28785,
44077,
30365,
88367,
8,
314,
470,
44077,
30365,
88367,
90,
764,
25,
44077,
6444,
1507,
431,
1851,
25,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestResources(t *testing.T) {
th := kusttest_test.NewKustTestHarness(t, "/whatever")
th.WriteK("/whatever/", kustomizationContent)
th.WriteF("/whatever/deployment.yaml", deploymentContent)
th.WriteF("/whatever/namespace.yaml", namespaceContent)
th.WriteF("/whatever/jsonpatch.json", jsonpatchContent)
expecte... | explode_data.jsonl/78140 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1674
} | [
2830,
3393,
11277,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
595,
590,
1944,
4452,
7121,
42,
590,
2271,
74248,
1155,
11,
3521,
68286,
1138,
70479,
4073,
42,
4283,
68286,
28105,
595,
1450,
2022,
2762,
340,
70479,
4073,
37,
4283,
68286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestResolveWithMaxAge(t *testing.T) {
b := &resolveBackendWithTracking{
nameToIP: make(map[string][]net.IP),
}
r := &Resolver{
cache: make(map[string]*cacheRecord),
resolve: b.resolve,
}
testHost := "hostA"
expectedIP := net.ParseIP("1.2.3.4")
b.nameToIP[testHost] = []net.IP{expectedIP}
// Resolv... | explode_data.jsonl/27868 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 786
} | [
2830,
3393,
56808,
2354,
5974,
16749,
1155,
353,
8840,
836,
8,
341,
2233,
1669,
609,
17325,
29699,
2354,
37119,
515,
197,
11609,
1249,
3298,
25,
1281,
9147,
14032,
45725,
4711,
46917,
1326,
197,
532,
7000,
1669,
609,
18190,
515,
197,
52... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func TestEngineBuildBlock(t *testing.T) {
vdr, _, sender, vm, te, gBlk := setup(t)
sender.Default(true)
blk := &Blk{
parent: gBlk,
id: GenerateID(),
status: choices.Processing,
bytes: []byte{1},
}
queried := new(bool)
sender.PushQueryF = func(inVdrs ids.ShortSet, _ uint32, blkID ids.ID, blkBytes [... | explode_data.jsonl/3563 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 320
} | [
2830,
3393,
4571,
11066,
4713,
1155,
353,
8840,
836,
8,
341,
5195,
3612,
11,
8358,
4646,
11,
10995,
11,
1013,
11,
342,
4923,
74,
1669,
6505,
1155,
692,
1903,
1659,
13275,
3715,
692,
197,
34989,
1669,
609,
4923,
74,
515,
197,
24804,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestVarName(t *testing.T) {
cases := map[string][]string{
"B_C_A": []string{"a", "b", "c"},
"B_C_AA": []string{"aa", "b", "c"},
"AA": []string{"aa"},
}
e := &env{}
for exp, c := range cases {
require.Equal(t, exp, e.varName(c[0], c[1:]...))
}
} | explode_data.jsonl/78215 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 134
} | [
2830,
3393,
3962,
675,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
2415,
14032,
45725,
917,
515,
197,
197,
63590,
920,
1566,
788,
220,
3056,
917,
4913,
64,
497,
330,
65,
497,
330,
66,
7115,
197,
197,
63590,
920,
81941,
788,
3056... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSubCommandCall(t *testing.T) {
var result string
f1 := func(c *Command, args *Args) { result = "noop" }
f2 := func(c *Command, args *Args) { result = args.LastParam() }
c := &Command{Usage: "foo", Run: f1}
s := &Command{Key: "bar", Usage: "foo bar", Run: f2}
c.Use(s)
args := NewArgs([]string{"foo", "b... | explode_data.jsonl/60589 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 158
} | [
2830,
3393,
3136,
4062,
7220,
1155,
353,
8840,
836,
8,
341,
2405,
1102,
914,
198,
1166,
16,
1669,
2915,
1337,
353,
4062,
11,
2827,
353,
4117,
8,
314,
1102,
284,
330,
40162,
1,
456,
1166,
17,
1669,
2915,
1337,
353,
4062,
11,
2827,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestDo(t *testing.T) {
t.Run("success", func(t *testing.T) {
cb := circuitbreaker.New(&circuitbreaker.Options{})
got, err := cb.Do(context.Background(), func() (interface{}, error) {
return "data", nil
})
assert.NoError(t, err)
assert.Equal(t, "data", got.(string))
assert.Equal(t, int64(0), cb.Coun... | explode_data.jsonl/8216 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2108
} | [
2830,
3393,
5404,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
5630,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
63810,
1669,
16224,
64121,
7121,
2099,
66,
37268,
64121,
22179,
37790,
197,
3174,
354,
11,
1848,
1669,
9858,
33596,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEnumSpecifications(t *testing.T) {
cache := newTestCache(t)
input := []TestData{{S: "Foo", I: 1}, {S: "Bar", I: 2}}
cases := []struct {
name string
spec map[string][]string
orderBy string
expected []map[string]interface{}
skipJson bool
}{
{
name: "No spec",
spec: map[str... | explode_data.jsonl/8985 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 903
} | [
2830,
3393,
10766,
85021,
1155,
353,
8840,
836,
8,
341,
52680,
1669,
501,
2271,
8233,
1155,
340,
22427,
1669,
3056,
83920,
2979,
50,
25,
330,
40923,
497,
358,
25,
220,
16,
2137,
314,
50,
25,
330,
3428,
497,
358,
25,
220,
17,
47449,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBuildUpdateError(t *testing.T) {
testServer(t, func(c *stdsdk.Client, p *structs.MockProvider) {
var b1 *structs.Build
p.On("BuildUpdate", "app1", "build1", structs.BuildUpdateOptions{}).Return(b1, fmt.Errorf("err1"))
err := c.Put("/apps/app1/builds/build1", stdsdk.RequestOptions{}, nil)
require.Equal... | explode_data.jsonl/71428 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 144
} | [
2830,
3393,
11066,
4289,
1454,
1155,
353,
8840,
836,
8,
341,
18185,
5475,
1155,
11,
2915,
1337,
353,
1834,
51295,
11716,
11,
281,
353,
1235,
82,
24664,
5179,
8,
341,
197,
2405,
293,
16,
353,
1235,
82,
25212,
198,
197,
3223,
8071,
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 TestLoad(t *testing.T) {
gou.Flows = make(map[string]*gou.Flow)
Load(config.Conf)
LoadFrom("not a path", "404.")
check(t)
} | explode_data.jsonl/70069 | {
"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,
5879,
1155,
353,
8840,
836,
8,
341,
3174,
283,
73459,
4241,
284,
1281,
9147,
14032,
8465,
70,
283,
60732,
340,
197,
5879,
8754,
4801,
69,
340,
197,
5879,
3830,
445,
1921,
264,
1815,
497,
330,
19,
15,
19,
13053,
25157,
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 |
func TestWhereUint(t *testing.T) {
v := &Value{data: []uint{uint(1), uint(1), uint(1), uint(1), uint(1), uint(1)}}
selected := v.WhereUint(func(i int, val uint) bool {
return i%2 == 0
}).MustUintSlice()
assert.Equal(t, 3, len(selected))
} | explode_data.jsonl/23460 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 107
} | [
2830,
3393,
9064,
21570,
1155,
353,
8840,
836,
8,
1476,
5195,
1669,
609,
1130,
90,
691,
25,
3056,
2496,
90,
2496,
7,
16,
701,
2622,
7,
16,
701,
2622,
7,
16,
701,
2622,
7,
16,
701,
2622,
7,
16,
701,
2622,
7,
16,
9139,
630,
7063... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPrefixMetadataToACLs(t *testing.T) {
t.Parallel()
epoch := time.Date(2018, time.February, 1, 2, 3, 0, 0, time.UTC)
Convey("Works", t, func() {
out := prefixMetadataToACLs(&api.InheritedPrefixMetadata{
PerPrefixMetadata: []*api.PrefixMetadata{
{
Prefix: "a",
Acls: []*api.PrefixMetadata_A... | explode_data.jsonl/4606 | {
"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,
14335,
14610,
1249,
55393,
82,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
197,
20197,
1669,
882,
8518,
7,
17,
15,
16,
23,
11,
882,
991,
68,
6812,
11,
220,
16,
11,
220,
17,
11,
220,
18,
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... | 1 |
func TestGetLogoutRequest(t *testing.T) {
for k, tc := range []struct {
exists bool
used bool
status int
}{
{false, false, http.StatusNotFound},
{true, false, http.StatusOK},
{true, true, http.StatusConflict},
} {
t.Run(fmt.Sprintf("case=%d", k), func(t *testing.T) {
key := fmt.Sprint(k)
challe... | explode_data.jsonl/47936 | {
"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,
1949,
27958,
1900,
1155,
353,
8840,
836,
8,
341,
2023,
595,
11,
17130,
1669,
2088,
3056,
1235,
341,
197,
8122,
1671,
1807,
198,
197,
197,
2591,
256,
1807,
198,
197,
23847,
526,
198,
197,
59403,
197,
197,
90,
3849,
11,
89... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInt64sToMap(t *testing.T) {
assert.Equal(t, map[int64]bool{}, Int64sToMap([]int64{}))
assert.Equal(t,
map[int64]bool{1: true, 4: true, 16: true},
Int64sToMap([]int64{1, 4, 16}),
)
} | explode_data.jsonl/14321 | {
"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,
1072,
21,
19,
82,
1249,
2227,
1155,
353,
8840,
836,
8,
341,
6948,
12808,
1155,
11,
2415,
18640,
21,
19,
96436,
22655,
1333,
21,
19,
82,
1249,
2227,
10556,
396,
21,
19,
6257,
1171,
6948,
12808,
1155,
345,
197,
19567,
1864... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMkdir(t *testing.T) {
ctx := context.Background()
r := fstest.NewRun(t)
defer r.Finalise()
err := operations.Mkdir(ctx, r.Fremote, "")
require.NoError(t, err)
fstest.CheckListing(t, r.Fremote, []fstest.Item{})
err = operations.Mkdir(ctx, r.Fremote, "")
require.NoError(t, err)
} | explode_data.jsonl/51923 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 130
} | [
2830,
3393,
44,
12438,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
7000,
1669,
48434,
477,
7121,
6727,
1155,
340,
16867,
435,
991,
977,
1064,
2822,
9859,
1669,
7525,
1321,
12438,
7502,
11,
435,
991,
18147,
11,
14676,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestRetryBasic(t *testing.T) {
conf := NewConfig()
childConf := NewConfig()
conf.Retry.Output = &childConf
output, err := NewRetry(conf, nil, log.Noop(), metrics.Noop())
if err != nil {
t.Fatal(err)
}
ret, ok := output.(*Retry)
if !ok {
t.Fatal("Failed to cast")
}
mOut := &mockOutput{
ts: make(... | explode_data.jsonl/3320 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 512
} | [
2830,
3393,
51560,
15944,
1155,
353,
8840,
836,
8,
341,
67850,
1669,
1532,
2648,
2822,
58391,
15578,
1669,
1532,
2648,
741,
67850,
2013,
15149,
34246,
284,
609,
3048,
15578,
271,
21170,
11,
1848,
1669,
1532,
51560,
29879,
11,
2092,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.