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 TestStartContainer(t *testing.T) {
dm, err := getDockerManager()
if err != nil {
t.Errorf("test new docker manager failed. %v", err)
}
config := cri.ContainerConfig{
Name: "qcjtest",
Config: &container.Config{
Hostname: "127.0.0.1",
Image: "registry.southchina.huaweicloud.com/dgh/edge-demo-app:l... | explode_data.jsonl/24913 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 377
} | [
2830,
3393,
3479,
4502,
1155,
353,
8840,
836,
8,
341,
2698,
76,
11,
1848,
1669,
633,
35,
13659,
2043,
741,
743,
1848,
961,
2092,
341,
197,
3244,
13080,
445,
1944,
501,
26588,
6645,
4641,
13,
1018,
85,
497,
1848,
340,
197,
532,
25873... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestField_EmptyInterface(t *testing.T) {
type (
Rel struct {
Int int
}
Src struct {
Rel *Rel
}
SrcForce struct {
Rel *Rel `deepcopier:"force"`
}
Dst struct {
Rel interface{}
}
DstForce struct {
Rel interface{} `deepcopier:"force"`
}
)
var (
rel = &Rel{Int: 1}
src... | explode_data.jsonl/13665 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 392
} | [
2830,
3393,
1877,
76060,
1595,
5051,
1155,
353,
8840,
836,
8,
341,
13158,
2399,
197,
197,
6740,
2036,
341,
298,
57152,
526,
198,
197,
197,
630,
197,
7568,
1287,
2036,
341,
298,
197,
6740,
353,
6740,
198,
197,
197,
630,
197,
7568,
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 TestRuleIdxPrefix(t *testing.T) {
common.Log.Debug("Entering function: %s", common.GetFunctionName())
sqls := [][]string{
{
"CREATE TABLE tbl (a int, unique key `xx_a` (`a`));",
"CREATE TABLE tbl (a int, key `xx_a` (`a`));",
`ALTER TABLE tbl ADD INDEX xx_a (a)`,
`ALTER TABLE tbl ADD UNIQUE INDEX xx... | explode_data.jsonl/76846 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 482
} | [
2830,
3393,
11337,
11420,
14335,
1155,
353,
8840,
836,
8,
341,
83825,
5247,
20345,
445,
82867,
729,
25,
1018,
82,
497,
4185,
2234,
5152,
675,
2398,
30633,
82,
1669,
52931,
917,
515,
197,
197,
515,
298,
197,
1,
22599,
14363,
21173,
320... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLookupDeclByNameNullable(t *testing.T) {
decl, ok := testSchema(t).lookupDeclByName("ExampleStruct", true)
if !ok {
t.Fatalf("lookupDeclByName failed")
}
checkStruct(t, decl.(*StructDecl), "ExampleStruct", true)
} | explode_data.jsonl/21385 | {
"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,
34247,
21629,
16898,
15703,
1155,
353,
8840,
836,
8,
341,
197,
10005,
11,
5394,
1669,
1273,
8632,
1155,
568,
21020,
21629,
16898,
445,
13314,
9422,
497,
830,
340,
743,
753,
562,
341,
197,
3244,
30762,
445,
21020,
21629,
1689... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestQueryGetBlockByHash(t *testing.T) {
chainid := "mytestchainid4"
path := tempDir(t, "test4")
defer os.RemoveAll(path)
stub, err := setupTestLedger(chainid, path)
if err != nil {
t.Fatalf(err.Error())
}
args := [][]byte{[]byte(GetBlockByHash), []byte(chainid), []byte("0")}
prop := resetProvider(resou... | explode_data.jsonl/18831 | {
"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,
2859,
1949,
4713,
1359,
6370,
1155,
353,
8840,
836,
8,
341,
197,
8819,
307,
1669,
330,
2408,
1944,
8819,
307,
19,
698,
26781,
1669,
2730,
6184,
1155,
11,
330,
1944,
19,
1138,
16867,
2643,
84427,
5581,
692,
18388,
392,
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... | 2 |
func TestRepository_Commits(t *testing.T) {
t.Parallel()
ctx := actor.WithActor(context.Background(), &actor.Actor{
UID: 1,
})
// TODO(sqs): test CommitsOptions.Base
gitCommands := []string{
"GIT_COMMITTER_NAME=a GIT_COMMITTER_EMAIL=a@a.com GIT_COMMITTER_DATE=2006-01-02T15:04:05Z git commit --allow-empty -m ... | explode_data.jsonl/8517 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1118
} | [
2830,
3393,
4624,
16946,
44703,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
20985,
1669,
12089,
26124,
18870,
5378,
19047,
1507,
609,
5621,
76094,
515,
197,
197,
6463,
25,
220,
16,
345,
197,
8824,
197,
322,
5343,
1141,
26358,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAssembleRowEvent(t *testing.T) {
testCases := []struct {
regionID uint64
entry *cdcpb.Event_Row
expected model.RegionFeedEvent
err string
}{{
regionID: 1,
entry: &cdcpb.Event_Row{
StartTs: 1,
CommitTs: 2,
Key: []byte("k1"),
Value: []byte("v1"),
OpType: cdcpb.Even... | explode_data.jsonl/32860 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1029
} | [
2830,
3393,
2121,
15790,
3102,
1556,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
197,
3943,
915,
2622,
21,
19,
198,
197,
48344,
262,
353,
4385,
4672,
65,
6904,
66932,
198,
197,
42400,
1614,
65642,
28916,
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... | 3 |
func TestLibrato_IndefiniteBackoff(t *testing.T) {
handler := &GrumpyHandler{ResponseCodes: []int{500}}
server := httptest.NewServer(handler)
defer server.Close()
config := GetConfig()
config.LibratoUrl, _ = url.Parse(server.URL)
config.LibratoUser = "user"
config.LibratoToken = "token"
measurements := make(c... | explode_data.jsonl/51436 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 191
} | [
2830,
3393,
9194,
81,
4330,
62,
1425,
823,
15856,
3707,
1847,
1155,
353,
8840,
836,
8,
341,
53326,
1669,
609,
6464,
6752,
3050,
90,
2582,
20871,
25,
3056,
396,
90,
20,
15,
15,
11248,
41057,
1669,
54320,
70334,
7121,
5475,
36514,
340,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestConcurrentTraceArrival(t *testing.T) {
traceIds, batches := generateIdsAndBatches(128)
var wg sync.WaitGroup
cfg := Config{
DecisionWait: defaultTestDecisionWait,
NumTraces: uint64(2 * len(traceIds)),
ExpectedNewTracesPerSec: 64,
PolicyCfgs: testPolicy,
}
sp,... | explode_data.jsonl/31670 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 434
} | [
2830,
3393,
1109,
3231,
6550,
8838,
3936,
1155,
353,
8840,
836,
8,
341,
65058,
12701,
11,
44792,
1669,
6923,
12701,
3036,
33,
9118,
7,
16,
17,
23,
692,
2405,
63581,
12811,
28384,
2808,
198,
50286,
1669,
5532,
515,
197,
197,
74846,
141... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGammasGobable(t *testing.T) {
p, err := NewPolynomial([]*big.Int{
big.NewInt(0),
big.NewInt(10),
big.NewInt(20),
})
assert.NilError(t, err)
gammas := p.Gammas()
deserialized := new(Gammas)
shtest.EnsureGobable(t, gammas, deserialized)
} | explode_data.jsonl/60072 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 120
} | [
2830,
3393,
78884,
6899,
38,
674,
480,
1155,
353,
8840,
836,
8,
341,
3223,
11,
1848,
1669,
1532,
14658,
25358,
85288,
16154,
7371,
515,
197,
2233,
343,
7121,
1072,
7,
15,
1326,
197,
2233,
343,
7121,
1072,
7,
16,
15,
1326,
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 TestAuth(t *testing.T) {
mockError := errors.New("error")
mockUsername := "mockUsername"
mockPassword := "mockPassword"
encoded := base64.StdEncoding.EncodeToString([]byte(fmt.Sprintf("%s:%s", mockUsername, mockPassword)))
testCases := map[string]struct {
mockECRClient func(m *mocks.Mockapi)
wantedUse... | explode_data.jsonl/31311 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 640
} | [
2830,
3393,
5087,
1155,
353,
8840,
836,
8,
341,
77333,
1454,
1669,
5975,
7121,
445,
841,
5130,
77333,
11115,
1669,
330,
16712,
11115,
698,
77333,
4876,
1669,
330,
16712,
4876,
1837,
197,
19329,
1669,
2331,
21,
19,
36086,
14690,
50217,
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... | 1 |
func TestBlobberGRPCService_GetObjectPath_Success(t *testing.T) {
req := &blobbergrpc.GetObjectPathRequest{
Context: &blobbergrpc.RequestContext{
Client: "owner",
ClientKey: "",
Allocation: "",
},
Allocation: "",
Path: "path",
BlockNum: "120",
}
mockStorageHandler := &storageHandlerI... | explode_data.jsonl/66832 | {
"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,
37985,
652,
8626,
4872,
1860,
13614,
1190,
1820,
87161,
1155,
353,
8840,
836,
8,
341,
24395,
1669,
609,
35112,
652,
56585,
25618,
1820,
1900,
515,
197,
70871,
25,
609,
35112,
652,
56585,
9659,
1972,
515,
298,
71724,
25,
257,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestSample1(t *testing.T) {
N, K := 2, 2
E := [][]int{
{0, 1},
{1, 2},
{2, 0},
}
A := []int{1, 2}
var expect int64 = 4
runSample(t, N, K, E, A, expect)
} | explode_data.jsonl/59614 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 95
} | [
2830,
3393,
17571,
16,
1155,
353,
8840,
836,
8,
341,
18317,
11,
730,
1669,
220,
17,
11,
220,
17,
198,
22784,
1669,
52931,
396,
515,
197,
197,
90,
15,
11,
220,
16,
1583,
197,
197,
90,
16,
11,
220,
17,
1583,
197,
197,
90,
17,
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 TestVerifyPeerCertificate(t *testing.T) {
issuer, err := x509.ParseCertificate(testRSACertificateIssuer)
if err != nil {
panic(err)
}
rootCAs := x509.NewCertPool()
rootCAs.AddCert(issuer)
now := func() time.Time { return time.Unix(1476984729, 0) }
sentinelErr := errors.New("TestVerifyPeerCertificate")
... | explode_data.jsonl/71373 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2022
} | [
2830,
3393,
32627,
30888,
33202,
1155,
353,
8840,
836,
8,
341,
197,
66817,
11,
1848,
1669,
856,
20,
15,
24,
8937,
33202,
8623,
11451,
1706,
20962,
98902,
340,
743,
1848,
961,
2092,
341,
197,
30764,
3964,
340,
197,
630,
33698,
34,
2121... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSortDependencies(t *testing.T) {
testInstanceA := createTestInstance("example-a")
testInstanceB := createTestInstance("example-b")
testInstanceC := createTestInstance("example-c", testInstanceB)
testInstanceD := createTestInstance("example-d", testInstanceC)
testInstanceE := createTestInstance("example-e"... | explode_data.jsonl/34589 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 536
} | [
2830,
3393,
10231,
48303,
1155,
353,
8840,
836,
8,
341,
18185,
2523,
32,
1669,
1855,
2271,
2523,
445,
8687,
7409,
1138,
18185,
2523,
33,
1669,
1855,
2271,
2523,
445,
8687,
1455,
1138,
18185,
2523,
34,
1669,
1855,
2271,
2523,
445,
8687,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestObjectFilter(t *testing.T) {
cases := []struct {
note string
object string
filter string
expected string
}{
{
note: "base",
object: `{"a": {"b": {"c": 7, "d": 8}}, "e": 9}`,
filter: `{"a": {"b": {"c": null}}}`,
expected: `{"a": {"b": {"c": 7}}}`,
},
{
note: "m... | explode_data.jsonl/2908 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 987
} | [
2830,
3393,
1190,
5632,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
9038,
1272,
257,
914,
198,
197,
35798,
256,
914,
198,
197,
50108,
256,
914,
198,
197,
42400,
914,
198,
197,
59403,
197,
197,
515,
298,
903... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDeletedControlPlaneIsAlwaysAllowed(t *testing.T) {
controlPlane := newControlPlaneWithVersion("my-smcp", "istio-system", versions.V2_2.String())
controlPlane.DeletionTimestamp = now()
validator, _, _ := createControlPlaneValidatorTestFixture()
response := validator.Handle(ctx, createCreateRequest(controlP... | explode_data.jsonl/10230 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 133
} | [
2830,
3393,
26039,
3273,
34570,
3872,
37095,
35382,
1155,
353,
8840,
836,
8,
341,
82786,
34570,
1669,
501,
3273,
34570,
2354,
5637,
445,
2408,
4668,
4672,
497,
330,
380,
815,
36648,
497,
10795,
5058,
17,
62,
17,
6431,
2398,
82786,
34570... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEmpty(t *testing.T) {
key := makeKey("aaa")
l := NewSkiplist(&testStorage{}, 0)
it := l.NewIter()
require.False(t, it.Valid())
it.First()
require.False(t, it.Valid())
it.Last()
require.False(t, it.Valid())
require.False(t, it.SeekGE(key))
require.False(t, it.Valid())
} | explode_data.jsonl/26098 | {
"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,
3522,
1155,
353,
8840,
836,
8,
341,
23634,
1669,
1281,
1592,
445,
32646,
1138,
8810,
1669,
1532,
50,
6642,
39934,
2099,
1944,
5793,
22655,
220,
15,
340,
23374,
1669,
326,
7121,
8537,
2822,
17957,
50757,
1155,
11,
432,
47156,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFileDescForType(t *testing.T) {
for _, test := range []struct {
st reflect.Type
wantFd *dpb.FileDescriptorProto
}{
{reflect.TypeOf(pb.SearchResponse_Result{}), fdTest},
{reflect.TypeOf(pb.ToBeExtended{}), fdProto2},
} {
fd, err := s.fileDescForType(test.st)
if err != nil || !proto.Equal(fd, ... | explode_data.jsonl/79209 | {
"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,
1703,
11065,
2461,
929,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
1273,
1669,
2088,
3056,
1235,
341,
197,
18388,
257,
8708,
10184,
198,
197,
50780,
74476,
353,
9796,
65,
8576,
11709,
31549,
198,
197,
59403,
197,
197,
90,
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... | 4 |
func TestBucketBlockSet_labelMatchers(t *testing.T) {
set := newBucketBlockSet(labels.FromStrings("a", "b", "c", "d"))
cases := []struct {
in []labels.Matcher
res []labels.Matcher
match bool
}{
{
in: []labels.Matcher{},
res: []labels.Matcher{},
match: true,
},
{
in: []labels.Matche... | explode_data.jsonl/39690 | {
"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,
36018,
4713,
1649,
6106,
37862,
1155,
353,
8840,
836,
8,
341,
8196,
1669,
501,
36018,
4713,
1649,
36915,
11439,
20859,
445,
64,
497,
330,
65,
497,
330,
66,
497,
330,
67,
28075,
1444,
2264,
1669,
3056,
1235,
341,
197,
17430... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestImageFill(t *testing.T) {
w, h := 10, 10
img, err := NewImage(w, h, FilterNearest)
if err != nil {
t.Fatal(err)
return
}
clr := &mutableRGBA{0x80, 0x80, 0x80, 0x80}
if err := img.Fill(clr); err != nil {
t.Fatal(err)
return
}
clr.r = 0
for j := 0; j < h; j++ {
for i := 0; i < w; i++ {
got ... | explode_data.jsonl/10897 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 260
} | [
2830,
3393,
1906,
14449,
1155,
353,
8840,
836,
8,
341,
6692,
11,
305,
1669,
220,
16,
15,
11,
220,
16,
15,
198,
39162,
11,
1848,
1669,
1532,
1906,
3622,
11,
305,
11,
12339,
8813,
15432,
340,
743,
1848,
961,
2092,
341,
197,
3244,
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... | 6 |
func TestCacheHit(t *testing.T) {
c := cache.New()
c.SetWithExpiration("test-key", "test-value", maxTime)
v, ok := c.Get("test-key")
if !ok {
t.Error("cache miss")
}
if diff := cmp.Diff("test-value", v.(string)); diff != "" {
t.Errorf("value differs.\n%v", diff)
}
} | explode_data.jsonl/70364 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 119
} | [
2830,
3393,
8233,
19498,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
6500,
7121,
2822,
1444,
4202,
2354,
66301,
445,
1944,
16173,
497,
330,
1944,
19083,
497,
1932,
1462,
692,
5195,
11,
5394,
1669,
272,
2234,
445,
1944,
16173,
1138,
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... | 3 |
func Test_docs_index__54fb35cd129733591dab1e37165b7232(t *testing.T) {
es, _ := elasticsearch.NewDefaultClient()
// tag:54fb35cd129733591dab1e37165b7232[]
res, err := es.Index(
"twitter",
strings.NewReader(`{
"message": "elasticsearch now has versioning support, double cool!"
}`),
es.Index.WithDocumentI... | explode_data.jsonl/52734 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 258
} | [
2830,
3393,
49692,
3560,
563,
20,
19,
10798,
18,
20,
4385,
16,
17,
24,
22,
18,
18,
20,
24,
16,
67,
370,
16,
68,
18,
22,
16,
21,
20,
65,
22,
17,
18,
17,
1155,
353,
8840,
836,
8,
341,
78966,
11,
716,
1669,
655,
27791,
7121,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestValidateContextTags(t *testing.T) {
t.Run("long_key", func(t *testing.T) {
// NOTE(axw) this should probably fail, but does not. See:
// https://github.com/elastic/apm-server/issues/910
validateTransaction(t, func(tx *apm.Transaction) {
tx.Context.SetTag(strings.Repeat("x", 1025), "x")
})
})
t.Ru... | explode_data.jsonl/791 | {
"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,
17926,
1972,
15930,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
4825,
3097,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
197,
322,
16743,
41922,
86,
8,
419,
1265,
4658,
3690,
11,
714,
1558,
537,
13,
3496,
510,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestRootDir(t *testing.T) {
var dirs = []struct {
input, dirname, result string
}{
{"/tmp/foo/bar", "content", "/tmp/foo/content"},
{"/", "content", "/content"},
{"/tmp/", "content", "/tmp/content"},
}
for _, tt := range dirs {
if got, want := rootDir(tt.input, tt.dirname), tt.result; got != want {
... | explode_data.jsonl/66393 | {
"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,
8439,
6184,
1155,
353,
8840,
836,
8,
341,
2405,
42248,
284,
3056,
1235,
341,
197,
22427,
11,
29908,
11,
1102,
914,
198,
197,
59403,
197,
197,
90,
3115,
5173,
60555,
49513,
497,
330,
1796,
497,
3521,
5173,
60555,
27917,
711... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func Test_logSelectorExpr_String(t *testing.T) {
t.Parallel()
tests := []struct {
selector string
expectFilter bool
}{
{`{foo!~"bar"}`, false},
{`{foo="bar", bar!="baz"}`, false},
{`{foo="bar", bar!="baz"} != "bip" !~ ".+bop"`, true},
{`{foo="bar"} |= "baz" |~ "blip" != "flip" !~ "flap"`, true},
{`... | explode_data.jsonl/62859 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 521
} | [
2830,
3393,
5224,
5877,
16041,
31777,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
78216,
1669,
3056,
1235,
341,
197,
197,
8925,
257,
914,
198,
197,
24952,
5632,
1807,
198,
197,
59403,
197,
197,
90,
63,
90,
7975,
0,
93,
1,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestServerAggregate(t *testing.T) {
t.Parallel()
o := onpar.New()
defer o.Run(t)
o.BeforeEach(func(t *testing.T) TS {
mockCalc := newMockCalculator()
return TS{
T: t,
mockCalc: mockCalc,
s: server.New(mockCalc),
}
})
o.Group("when the calculator does not return an error", func(... | explode_data.jsonl/71880 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2030
} | [
2830,
3393,
5475,
64580,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
22229,
1669,
389,
1732,
7121,
741,
16867,
297,
16708,
1155,
692,
22229,
31153,
4854,
18552,
1155,
353,
8840,
836,
8,
22965,
341,
197,
77333,
47168,
1669,
501... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInterpolate(t *testing.T) {
var testCases = []struct {
name string
command string
expected string
args []driver.NamedValue
}{
{
name: "no parameters",
command: "select * from something",
expected: "select * from something",
args: []driver.NamedValue{},
},
{
name... | explode_data.jsonl/25529 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 939
} | [
2830,
3393,
3306,
45429,
1155,
353,
8840,
836,
8,
341,
2405,
1273,
37302,
284,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
45566,
220,
914,
198,
197,
42400,
914,
198,
197,
31215,
257,
3056,
12521,
57872,
1130,
198,
197,
59403,
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 TestTracesReceiverStartConsume(t *testing.T) {
c := kafkaTracesConsumer{
nextConsumer: consumertest.NewNop(),
logger: zap.NewNop(),
consumerGroup: &testConsumerGroup{},
}
ctx, cancelFunc := context.WithCancel(context.Background())
c.cancelConsumeLoop = cancelFunc
require.NoError(t, c.Shutdown(co... | explode_data.jsonl/79392 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 182
} | [
2830,
3393,
1282,
2434,
25436,
3479,
1109,
31323,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
67852,
1282,
2434,
29968,
515,
197,
28144,
29968,
25,
220,
4662,
83386,
7121,
45,
453,
3148,
197,
17060,
25,
286,
32978,
7121,
45,
453,
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 TestEditorDeleteWord(t *testing.T) {
type Test struct {
Text string
Start int
Selection int
Delete int
Want int
Result string
}
tests := []Test{
// No text selected
{"", 0, 0, 0, 0, ""},
{"", 0, 0, -1, 0, ""},
{"", 0, 0, 1, 0, ""},
{"", 0, 0, -2, 0, ""},
{"", 0, 0, 2, 0, "... | explode_data.jsonl/27266 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1532
} | [
2830,
3393,
9410,
6435,
10879,
1155,
353,
8840,
836,
8,
341,
13158,
3393,
2036,
341,
197,
49635,
414,
914,
198,
197,
65999,
257,
526,
198,
197,
197,
11177,
526,
198,
197,
96672,
262,
526,
271,
197,
17300,
517,
256,
526,
198,
197,
56... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestPrintIngressClass(t *testing.T) {
testCases := []struct {
name string
ingressClass *networking.IngressClass
expected []metav1.TableRow
}{{
name: "example with params",
ingressClass: &networking.IngressClass{
ObjectMeta: metav1.ObjectMeta{
Name: "test1",
CreationT... | explode_data.jsonl/72267 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 918
} | [
2830,
3393,
8994,
641,
2483,
1957,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
11609,
260,
914,
198,
197,
197,
287,
673,
1957,
353,
17511,
287,
5337,
2483,
1957,
198,
197,
42400,
257,
3056,
4059,
402,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestNewInputDone(t *testing.T) {
config := common.MapStr{
"connection_string": "Endpoint=sb://something",
"eventhub": "insights-operational-logs",
"storage_account": "someaccount",
"storage_account_key": "secret",
}
inputtest.AssertNotStartedInputCanBeDone(t, NewInput, &config)
} | explode_data.jsonl/53936 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 125
} | [
2830,
3393,
3564,
2505,
17453,
1155,
353,
8840,
836,
8,
341,
25873,
1669,
4185,
10104,
2580,
515,
197,
197,
1,
7742,
3904,
788,
256,
330,
27380,
14149,
65,
1110,
33331,
756,
197,
197,
1,
3087,
26682,
788,
310,
330,
1330,
2796,
58555,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestScan(t *testing.T) {
table := map[int64]string{
8005001000: "8.5.1",
4007000000: "4.7.0",
23000000: "0.23.0",
14000000100: "14.0.0.100",
0: "0.0.0",
1001: "0.0.1.1",
1000000: "0.1.0",
1000000000: "1.0.0",
14000000000100: "14000.0.0.100",
}
... | explode_data.jsonl/74329 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 318
} | [
2830,
3393,
26570,
1155,
353,
8840,
836,
8,
341,
26481,
1669,
2415,
18640,
21,
19,
30953,
515,
197,
197,
23,
15,
15,
20,
15,
15,
16,
15,
15,
15,
25,
257,
330,
23,
13,
20,
13,
16,
756,
197,
197,
19,
15,
15,
22,
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... | 4 |
func TestCustomMenuGetsLogOutAdded(t *testing.T) {
// prepare
internalLink := map[string]interface{}{
"label": "Some internal links",
"items": []interface{}{
map[string]interface{}{
"label": "The internal link",
"url": "http://example.com/internal",
},
},
}
uiOpts := map[string]interface{}{
... | explode_data.jsonl/21868 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 333
} | [
2830,
3393,
10268,
3514,
49358,
2201,
2662,
19337,
1155,
353,
8840,
836,
8,
341,
197,
322,
10549,
198,
33343,
3939,
1669,
2415,
14032,
31344,
67066,
197,
197,
92667,
788,
330,
8373,
5306,
7746,
756,
197,
197,
1,
3615,
788,
3056,
4970,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCollectBool(t *testing.T) {
v := &Value{data: []bool{bool(true), bool(true), bool(true), bool(true), bool(true), bool(true)}}
collected := v.CollectBool(func(index int, val bool) interface{} {
return index
})
collectedArr := collected.MustInterSlice()
if assert.Equal(t, 6, len(collectedArr)) {
asse... | explode_data.jsonl/23407 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 229
} | [
2830,
3393,
47504,
11233,
1155,
353,
8840,
836,
8,
1476,
5195,
1669,
609,
1130,
90,
691,
25,
3056,
2641,
90,
2641,
3715,
701,
1807,
3715,
701,
1807,
3715,
701,
1807,
3715,
701,
1807,
3715,
701,
1807,
3715,
9139,
630,
46640,
2209,
1669... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestUnitChannelHandlerWriteLateOnChannel(t *testing.T) {
handler := &channelHandler{
ch: make(chan modelx.Measurement),
}
var waitgroup sync.WaitGroup
waitgroup.Add(1)
go func() {
time.Sleep(1 * time.Second)
handler.OnMeasurement(modelx.Measurement{})
waitgroup.Done()
}()
waitgroup.Wait()
if handle... | explode_data.jsonl/53529 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 145
} | [
2830,
3393,
4562,
9629,
3050,
7985,
61457,
1925,
9629,
1155,
353,
8840,
836,
8,
341,
53326,
1669,
609,
10119,
3050,
515,
197,
23049,
25,
1281,
35190,
1614,
87,
53447,
24359,
1326,
197,
532,
2405,
3783,
4074,
12811,
28384,
2808,
198,
487... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCandles_FromLocalDB(t *testing.T) {
dbDir, err := os.Getwd()
require.Nil(t, err)
orm, err := NewSqlite3ORM(false, dbDir, "backend.db", nil)
require.Nil(t, err)
product := types.TestTokenPair
limit := 10
maxKlines, err := types.NewKlinesFactory("kline_m1440")
require.Nil(t, err)
err = orm.GetLatestKli... | explode_data.jsonl/77883 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 487
} | [
2830,
3393,
34,
20125,
53157,
7319,
3506,
1155,
353,
8840,
836,
8,
341,
20939,
6184,
11,
1848,
1669,
2643,
2234,
6377,
741,
17957,
59678,
1155,
11,
1848,
340,
197,
493,
11,
1848,
1669,
1532,
8269,
632,
18,
4365,
3576,
11,
2927,
6184,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDeepDependencyOutputWithMock(t *testing.T) {
// Test that the terraform command flows through for mock output retrieval to deeper dependencies. Previously the
// terraform command was being overwritten, so by the time the deep dependency retrieval runs, it was replaced with
// "output" instead of the origin... | explode_data.jsonl/10148 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 237
} | [
2830,
3393,
33464,
36387,
5097,
2354,
11571,
1155,
353,
8840,
836,
8,
341,
197,
322,
3393,
429,
279,
59561,
627,
3210,
27455,
1526,
369,
7860,
2550,
56370,
311,
19117,
19543,
13,
58687,
279,
198,
197,
322,
59561,
627,
3210,
572,
1660,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUpdateMapLastUpdateTime(t *testing.T) {
ctx := context.Background()
c, srv := newMock(t)
wantReq := &pb.CommitRequest{
Database: "projects/projectID/databases/(default)",
Writes: []*pb.Write{{
Operation: &pb.Write_Update{
Update: &pb.Document{
Name: "projects/projectID/databases/(default)... | explode_data.jsonl/15816 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 357
} | [
2830,
3393,
4289,
2227,
5842,
64299,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
1444,
11,
43578,
1669,
501,
11571,
1155,
692,
50780,
27234,
1669,
609,
16650,
53036,
1900,
515,
197,
197,
5988,
25,
330,
17161,
40118,
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... | 3 |
func TestWatchEtcdState(t *testing.T) {
codec := latest.Codec
type T struct {
Type watch.EventType
Endpoints []string
}
testCases := map[string]struct {
Initial map[string]EtcdResponseWithError
Responses []*etcd.Response
From uint64
Expected []*T
}{
"from not found": {
Initial: map[st... | explode_data.jsonl/40979 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1517
} | [
2830,
3393,
14247,
31860,
4385,
1397,
1155,
353,
8840,
836,
8,
341,
43343,
66,
1669,
5535,
20274,
66,
198,
13158,
350,
2036,
341,
197,
27725,
414,
3736,
89879,
198,
197,
38407,
7706,
3056,
917,
198,
197,
532,
18185,
37302,
1669,
2415,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConfig_SliceComment(t *testing.T) {
t.Skipf("Skipping until #3642 is resolved")
c := NewConfig()
require.NoError(t, c.LoadConfig("./testdata/slice_comment.toml"))
require.Len(t, c.Outputs, 1)
output, ok := c.Outputs[0].Output.(*MockupOuputPlugin)
require.True(t, ok)
require.Equal(t, []string{"test"}, ... | explode_data.jsonl/72174 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 135
} | [
2830,
3393,
2648,
1098,
4754,
10677,
1155,
353,
8840,
836,
8,
341,
3244,
57776,
69,
445,
85945,
3080,
671,
18,
21,
19,
17,
374,
19673,
5130,
1444,
1669,
1532,
2648,
741,
17957,
35699,
1155,
11,
272,
13969,
2648,
13988,
92425,
2687,
47... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAchievements(t *testing.T) {
_, err := duoClient.GetAchievements(1234, "de", "ru", true, false, false, false)
if err != nil {
t.Error(err)
}
} | explode_data.jsonl/72540 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 65
} | [
2830,
3393,
71585,
12477,
1155,
353,
8840,
836,
8,
341,
197,
6878,
1848,
1669,
33721,
2959,
2234,
71585,
12477,
7,
16,
17,
18,
19,
11,
330,
450,
497,
330,
2672,
497,
830,
11,
895,
11,
895,
11,
895,
340,
743,
1848,
961,
2092,
341,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 2 |
func TestRouteStatusPropagation(t *testing.T) {
svc := &Service{}
svc.Status.PropagateRouteStatus(RouteStatus{
Domain: "example.com",
Traffic: []TrafficTarget{{
Percent: 100,
RevisionName: "newstuff",
}, {
Percent: 0,
RevisionName: "oldstuff",
}},
})
want := ServiceStatus{
Domain: "... | explode_data.jsonl/17374 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 262
} | [
2830,
3393,
4899,
2522,
35172,
1155,
353,
8840,
836,
8,
341,
1903,
7362,
1669,
609,
1860,
16094,
1903,
7362,
10538,
42483,
46836,
4899,
2522,
94945,
2522,
515,
197,
10957,
3121,
25,
330,
8687,
905,
756,
197,
10261,
956,
20615,
25,
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 TestTransformResolveImportedTypes(t *testing.T) {
schema := []byte(`
syntax = "proto3";
package test;
import "google/protobuf/timestamp.proto";
message ErrorStatus {
google.protobuf.Timestamp time = 1;
}
`)
input := new(bytes.Buffer)
input.Write(schema)
output := new(bytes.Buffer)
transform... | explode_data.jsonl/2074 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 329
} | [
2830,
3393,
8963,
56808,
11511,
291,
4173,
1155,
353,
8840,
836,
8,
341,
1903,
3416,
1669,
3056,
3782,
61528,
197,
1903,
13662,
284,
330,
15110,
18,
876,
197,
197,
1722,
1273,
401,
197,
21918,
330,
17485,
14,
32921,
5523,
4702,
57322,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLogSamplingRules(t *testing.T) {
assert := assert.New(t)
tp := new(testLogger)
os.Setenv("DD_TRACE_SAMPLING_RULES", `[{"service": "some.service", "sample_rate": 0.234}, {"service": "other.service"}, {"service": "last.service", "sample_rate": 0.56}, {"odd": "pairs"}, {"sample_rate": 9.10}]`)
defer os.Unsete... | explode_data.jsonl/64650 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 327
} | [
2830,
3393,
2201,
98622,
26008,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
340,
73423,
1669,
501,
8623,
7395,
340,
25078,
4202,
3160,
445,
4103,
24238,
85144,
1718,
50495,
50,
497,
77644,
4913,
7936,
788,
330,
14689,
57... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStorage_Store(t *testing.T) {
s := NewStorage("/tmp/chunk/1.chunk", "/tmp/index")
err := s.Open()
defer s.Close()
if err != nil {
t.Fatal(err)
}
bts, err := ioutil.ReadFile("testdata/test.txt")
if err != nil {
t.Fatal(err)
}
err = s.Store("test.txt", bts, FdNullFlags)
if err != nil {
t.Fatal(... | explode_data.jsonl/77474 | {
"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,
5793,
92684,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
1532,
5793,
4283,
5173,
21284,
3122,
14,
16,
47806,
497,
3521,
5173,
9022,
1138,
9859,
1669,
274,
12953,
741,
16867,
274,
10421,
741,
743,
1848,
961,
2092,
341,
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... | 4 |
func TestDefaultFactory_NewPolicyChecker(t *testing.T) {
// Ensure defaultFactory implements policy.PolicyCheckerFactory
var pcf policy.PolicyCheckerFactory
pcf = &defaultFactory{}
var pc policy.PolicyChecker
// Check we can obtain a new policyChecker
pc = pcf.NewPolicyChecker()
assert.NotNil(t, pc)
} | explode_data.jsonl/44683 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 98
} | [
2830,
3393,
3675,
4153,
39582,
13825,
35188,
1155,
353,
8840,
836,
8,
341,
197,
322,
29279,
1638,
4153,
5169,
4842,
1069,
8018,
35188,
4153,
198,
2405,
281,
9792,
4842,
1069,
8018,
35188,
4153,
198,
3223,
9792,
284,
609,
2258,
4153,
160... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBasicEmbedded(t *testing.T) {
type Foo struct {
A int
}
type Bar struct {
Foo // `db:""` is implied for an embedded struct
B int
C int `db:"-"`
}
type Baz struct {
A int
Bar `db:"Bar"`
}
m := NewMapperFunc("db", func(s string) string { return s })
z := Baz{}
z.A = 1
z.B = 2
z.C... | explode_data.jsonl/59094 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 532
} | [
2830,
3393,
15944,
83466,
1155,
353,
8840,
836,
8,
341,
13158,
33428,
2036,
341,
197,
22985,
526,
198,
197,
630,
13158,
4716,
2036,
341,
197,
12727,
2624,
442,
1565,
1999,
2974,
39917,
374,
6131,
369,
458,
22864,
2036,
198,
197,
12791,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStdlib(t *testing.T) {
testenv.MustHaveGoBuild(t)
start = time.Now()
walkDirs(t, filepath.Join(runtime.GOROOT(), "src"))
if testing.Verbose() {
fmt.Println(pkgCount, "packages typechecked in", time.Since(start))
}
} | explode_data.jsonl/53275 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 95
} | [
2830,
3393,
22748,
2740,
1155,
353,
8840,
836,
8,
341,
18185,
3160,
50463,
12116,
10850,
11066,
1155,
692,
21375,
284,
882,
13244,
741,
6692,
1692,
97384,
1155,
11,
26054,
22363,
89467,
1224,
868,
53837,
1507,
330,
3548,
5455,
743,
7497,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWSUpgradeConnDeadline(t *testing.T) {
opts := testWSOptions()
opts.Websocket.HandshakeTimeout = time.Second
s := &Server{opts: opts}
rw := &testResponseWriter{}
req := testWSCreateValidReq()
res, err := s.wsUpgrade(rw, req)
if res == nil || err != nil {
t.Fatalf("Unexpected error: %v", err)
}
if rw.... | explode_data.jsonl/42707 | {
"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,
7433,
43861,
9701,
83593,
1155,
353,
8840,
836,
8,
341,
64734,
1669,
1273,
7433,
3798,
741,
64734,
6473,
9556,
35308,
29661,
7636,
284,
882,
32435,
198,
1903,
1669,
609,
5475,
90,
10518,
25,
12185,
532,
7000,
86,
1669,
609,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestPtrToGC(t *testing.T) {
type T *uintptr
tt := TypeOf(T(nil))
pt := PtrTo(tt)
const n = 100
var x []interface{}
for i := 0; i < n; i++ {
v := New(pt)
p := new(*uintptr)
*p = new(uintptr)
**p = uintptr(i)
v.Elem().Set(ValueOf(p).Convert(pt))
x = append(x, v.Interface())
}
runtime.GC()
for i... | explode_data.jsonl/29572 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 238
} | [
2830,
3393,
5348,
1249,
22863,
1155,
353,
8840,
836,
8,
341,
13158,
350,
353,
51380,
198,
3244,
83,
1669,
3990,
2124,
4140,
27907,
1171,
60796,
1669,
46409,
1249,
47152,
340,
4777,
308,
284,
220,
16,
15,
15,
198,
2405,
856,
3056,
4970... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMenuParams(t *testing.T) {
b := newTestSitesBuilder(t).WithConfigFile("toml", `
[[menus.main]]
identifier = "contact"
title = "Contact Us"
url = "mailto:noreply@example.com"
weight = 300
[menus.main.params]
foo = "foo_config"
key2 = "key2_config"
camelCase = "camelCase_config"
`)
b.WithTemplatesAdded("in... | explode_data.jsonl/51846 | {
"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,
3514,
4870,
1155,
353,
8840,
836,
8,
341,
2233,
1669,
501,
2271,
93690,
3297,
1155,
568,
2354,
2648,
1703,
445,
37401,
75,
497,
22074,
15505,
57627,
8880,
14288,
15909,
284,
330,
6287,
698,
2102,
284,
330,
8732,
3985,
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 TestGC_TrackDeletedLayers_DoesNothingIfTriggerDisabled(t *testing.T) {
require.NoError(t, testutil.TruncateAllTables(suite.db))
enable, err := testutil.GCTrackDeletedLayersTrigger.Disable(suite.db)
require.NoError(t, err)
defer enable()
// disable other triggers that also insert on gc_blob_review_queue so th... | explode_data.jsonl/48569 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 529
} | [
2830,
3393,
22863,
21038,
473,
26039,
40235,
1557,
7072,
23780,
2679,
17939,
25907,
1155,
353,
8840,
836,
8,
341,
17957,
35699,
1155,
11,
1273,
1314,
8240,
26900,
2403,
21670,
89516,
7076,
4390,
197,
12552,
11,
1848,
1669,
1273,
1314,
122... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetPod(t *testing.T) {
ns := api.NamespaceDefault
c := &testClient{
Request: testRequest{Method: "GET", Path: testapi.Default.ResourcePath("pods", ns, "foo"), Query: buildQueryValues(nil)},
Response: Response{
StatusCode: http.StatusOK,
Body: &api.Pod{
Status: api.PodStatus{
Phase: api.Pod... | explode_data.jsonl/36093 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 249
} | [
2830,
3393,
1949,
23527,
1155,
353,
8840,
836,
8,
341,
84041,
1669,
6330,
46011,
3675,
198,
1444,
1669,
609,
1944,
2959,
515,
197,
73806,
25,
1273,
1900,
90,
3523,
25,
330,
3806,
497,
7933,
25,
1273,
2068,
13275,
20766,
1820,
445,
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... | 1 |
func TestManifestMetadata(t *testing.T) {
files := [][2]string{
{"/.manifest", `{
"metadata": {
"foo": {
"version": "1.0.0"
}
}
}`},
}
buf := archive.MustWriteTarGz(files)
bundle, err := NewReader(buf).Read()
if err != nil {
t.Fatal(err)
}
if bundle.Manifest.Metadata["foo"] == nil {
t... | explode_data.jsonl/55367 | {
"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,
38495,
14610,
1155,
353,
8840,
836,
8,
341,
74075,
1669,
508,
1457,
17,
30953,
515,
197,
197,
90,
3115,
13,
42315,
497,
1565,
515,
298,
197,
1,
17637,
788,
341,
571,
197,
1,
7975,
788,
341,
464,
197,
1,
4366,
788,
330,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestTrigger_SkipCI(t *testing.T) {
triggerer := New(
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
)
dummyHookSkip := *dummyHook
dummyHookSkip.Message = "foo [CI SKIP] bar"
triggerer.Trigger(noContext, dummyRepo, &dummyHookSkip)
} | explode_data.jsonl/26992 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 138
} | [
2830,
3393,
17939,
1098,
13389,
11237,
1155,
353,
8840,
836,
8,
341,
83228,
261,
1669,
1532,
1006,
197,
84131,
345,
197,
84131,
345,
197,
84131,
345,
197,
84131,
345,
197,
84131,
345,
197,
84131,
345,
197,
84131,
345,
197,
84131,
345,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreateOCIConfig(t *testing.T) {
assert := assert.New(t)
tmpdir, err := ioutil.TempDir(testDir, "")
assert.NoError(err)
defer os.RemoveAll(tmpdir)
bundleDir := filepath.Join(tmpdir, "bundle")
err = createOCIConfig(bundleDir)
// ENOENT
assert.Error(err)
err = os.MkdirAll(bundleDir, testDirMode)
ass... | explode_data.jsonl/52189 | {
"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,
4021,
63983,
2648,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
20082,
3741,
11,
1848,
1669,
43144,
65009,
6184,
8623,
6184,
11,
14676,
6948,
35699,
3964,
340,
16867,
2643,
84427,
10368,
3741,
692,
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 TestServerFlavorList(t *testing.T) {
setup()
defer teardown()
mux.HandleFunc(testlib.CloudServerURL(flavorPath), func(w http.ResponseWriter, r *http.Request) {
assert.Equal(t, http.MethodGet, r.Method)
resp := `
[
{
"_id": "5d7f58903c4c0127da9896ae",
"name": "1c_1g"
},
{
... | explode_data.jsonl/35480 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 278
} | [
2830,
3393,
5475,
3882,
3292,
852,
1155,
353,
8840,
836,
8,
341,
84571,
741,
16867,
49304,
741,
2109,
2200,
63623,
8623,
2740,
94492,
5475,
3144,
49747,
3292,
1820,
701,
2915,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestProductDb_Get(t *testing.T) {
setUp()
defer Db.Close()
productDb := db.NewProductDb(Db)
product, err := productDb.Get("abc")
require.Nil(t, err)
require.Equal(t, "Product Test", product.GetName())
require.Equal(t, 0.0, product.GetPrice())
require.Equal(t, "disabled", product.GetStatus())
} | explode_data.jsonl/58345 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 121
} | [
2830,
3393,
4816,
7994,
13614,
1155,
353,
8840,
836,
8,
341,
8196,
2324,
741,
16867,
11988,
10421,
741,
69288,
7994,
1669,
2927,
7121,
4816,
7994,
52169,
340,
69288,
11,
1848,
1669,
1985,
7994,
2234,
445,
13683,
5130,
17957,
59678,
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 TestParseBucketResource(t *testing.T) {
cases := map[string]struct {
ARN arn.ARN
ExpectErr string
ExpectBucketName string
}{
"resource-id empty": {
ARN: arn.ARN{
Partition: "aws",
Service: "s3",
Region: "us-west-2",
AccountID: "012345678901",
Resource: "bu... | explode_data.jsonl/62372 | {
"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,
14463,
36018,
4783,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
2415,
14032,
60,
1235,
341,
197,
197,
9051,
1060,
796,
77,
875,
50195,
198,
197,
35911,
7747,
286,
914,
198,
197,
35911,
36018,
675,
914,
198,
197,
59403,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestImgTest_InitAdd_OverwriteBucketAndURL_ProperLinks(t *testing.T) {
unittest.MediumTest(t)
workDir := t.TempDir()
setupAuthWithGSUtil(t, workDir)
td := testutils.TestDataDir(t)
mh := mockRPCResponses("https://my-custom-gold-url.example.com").Build()
// Call imgtest init with the following flags. We expe... | explode_data.jsonl/69526 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1247
} | [
2830,
3393,
13033,
2271,
15644,
2212,
62,
1918,
4934,
36018,
3036,
3144,
16670,
712,
24089,
1155,
353,
8840,
836,
8,
341,
20479,
14267,
1321,
23090,
2271,
1155,
692,
97038,
6184,
1669,
259,
65009,
6184,
741,
84571,
5087,
2354,
16522,
2742... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValidateLoginTemplate(t *testing.T) {
testCases := map[string]struct {
Template string
TemplateValid bool
}{
"default login template": {
Template: defaultLoginTemplateString,
TemplateValid: true,
},
"login template example": {
Template: LoginTemplateExample,
TemplateValid... | explode_data.jsonl/43988 | {
"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,
17926,
6231,
7275,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
2415,
14032,
60,
1235,
341,
197,
197,
7275,
414,
914,
198,
197,
197,
7275,
4088,
1807,
198,
197,
59403,
197,
197,
86191,
5858,
3811,
788,
341,
298,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestEntry_OnCut_Password(t *testing.T) {
e := widget.NewPasswordEntry()
e.SetText("Testing")
typeKeys(e, keyShiftLeftDown, fyne.KeyRight, fyne.KeyRight, fyne.KeyRight)
clipboard := test.NewClipboard()
shortcut := &fyne.ShortcutCut{Clipboard: clipboard}
e.TypedShortcut(shortcut)
assert.Equal(t, "", clipboa... | explode_data.jsonl/12334 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 141
} | [
2830,
3393,
5874,
35482,
37666,
93302,
1155,
353,
8840,
836,
8,
341,
7727,
1669,
9086,
7121,
4876,
5874,
741,
7727,
92259,
445,
16451,
1138,
13158,
8850,
2026,
11,
1376,
24841,
5415,
4454,
11,
51941,
811,
9610,
5979,
11,
51941,
811,
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... | 1 |
func TestCacheBinariesForBootstrapper(t *testing.T) {
download.DownloadMock = download.CreateDstDownloadMock
oldMinikubeHome := os.Getenv("MINIKUBE_HOME")
defer os.Setenv("MINIKUBE_HOME", oldMinikubeHome)
minikubeHome := t.TempDir()
var tc = []struct {
version, clusterBootstrapper string
minikubeHome ... | explode_data.jsonl/73739 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 527
} | [
2830,
3393,
8233,
28794,
5431,
2461,
17919,
495,
3106,
1155,
353,
8840,
836,
8,
341,
2698,
37702,
61204,
11571,
284,
4139,
7251,
54600,
11377,
11571,
271,
61828,
6217,
1579,
3760,
7623,
1669,
2643,
64883,
445,
16413,
28561,
42389,
28466,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFacadeErrorf(t *testing.T) {
st, ok := status.FromError(facade.Errorf(codes.Internal, "%s", "ohno"))
require.True(t, ok, "error is not a gRPC status")
assert.Equal(t, codes.Internal, st.Code())
assert.Equal(t, "type(name): ohno", st.Message())
} | explode_data.jsonl/30821 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 102
} | [
2830,
3393,
55331,
1454,
69,
1155,
353,
8840,
836,
8,
341,
18388,
11,
5394,
1669,
2639,
11439,
1454,
955,
580,
1021,
13080,
1337,
2539,
32579,
11,
5962,
82,
497,
330,
2267,
2152,
5455,
17957,
32443,
1155,
11,
5394,
11,
330,
841,
374,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMessage_Format(t *testing.T) {
for i, test := range messageTests {
fields := test.message.Format()
got, err := formatFields(fields)
if err != nil {
t.Error(err)
continue
}
expected, _ := formatFields(test.fields)
if got != expected {
t.Errorf("Invalid message fields for #%v: got \n%v\n... | explode_data.jsonl/43042 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 145
} | [
2830,
3393,
2052,
72999,
1155,
353,
8840,
836,
8,
341,
2023,
600,
11,
1273,
1669,
2088,
1943,
18200,
341,
197,
55276,
1669,
1273,
6698,
9978,
2822,
197,
3174,
354,
11,
1848,
1669,
3561,
8941,
37701,
340,
197,
743,
1848,
961,
2092,
341... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestEdgeInfo(t *testing.T) {
edgeInfo := getTestEdgeInfo(t, "account")
testEdgeInfo(t, edgeInfo, 4)
edgeInfo = getTestEdgeInfo(t, "todo")
testEdgeInfo(t, edgeInfo, 0)
edgeInfo = getTestEdgeInfo(t, "folder")
testEdgeInfo(t, edgeInfo, 1)
} | explode_data.jsonl/73722 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 99
} | [
2830,
3393,
11656,
1731,
1155,
353,
8840,
836,
8,
341,
197,
7186,
1731,
1669,
633,
2271,
11656,
1731,
1155,
11,
330,
4608,
5130,
18185,
11656,
1731,
1155,
11,
6821,
1731,
11,
220,
19,
692,
197,
7186,
1731,
284,
633,
2271,
11656,
1731,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUnsetSocialChannelFromWorkspace(t *testing.T) {
initMongoConn()
defer Close()
rand.Seed(time.Now().UnixNano())
w, err := createWorkspace()
if err != nil {
t.Fatalf(err.Error())
}
// first fetch it
w2, err := GetWorkspaceByChannelId(w.ChannelId)
if err != nil {
t.Errorf(err.Error())
}
if w2 ==... | explode_data.jsonl/70374 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 305
} | [
2830,
3393,
1806,
746,
26317,
9629,
3830,
45981,
1155,
353,
8840,
836,
8,
341,
28248,
54998,
9701,
741,
16867,
13032,
741,
7000,
437,
5732,
291,
9730,
13244,
1005,
55832,
83819,
12367,
6692,
11,
1848,
1669,
1855,
45981,
741,
743,
1848,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 7 |
func TestParseFileIncludeIgnore(t *testing.T) {
p := NewParser(nil)
err := p.ParseFile("testdata/include_ignore.ini")
if err != nil {
t.Errorf("unexpected error: %v", err)
}
expected := map[string]map[string]string{
"valid00": {
"valid00 L0": "valid00 V0",
"valid00 L1": "valid00 V1",
},
}
actual :=... | explode_data.jsonl/49360 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 187
} | [
2830,
3393,
14463,
1703,
22283,
12497,
1155,
353,
8840,
836,
8,
341,
3223,
1669,
1532,
6570,
27907,
340,
9859,
1669,
281,
8937,
1703,
445,
92425,
26393,
58493,
34958,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
13080,
445,
53859,
1465,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValidateMatch(t *testing.T) {
tests := []struct {
match v1.Match
upstreamNames sets.String
msg string
}{
{
match: v1.Match{
Conditions: []v1.Condition{
{
Cookie: "version",
Value: "v1",
},
},
Action: &v1.Action{
Pass: "test",
},
},
... | explode_data.jsonl/65851 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 608
} | [
2830,
3393,
17926,
8331,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
47706,
260,
348,
16,
36062,
198,
197,
59810,
4027,
7980,
7289,
6431,
198,
197,
21169,
1843,
914,
198,
197,
59403,
197,
197,
515,
298,
47706,
25,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestWorkerStartOk(t *testing.T) {
worker := createDefaultWorker()
worker.Start()
rc := make(chan *ActionResult)
action := new(MockResultAction)
action.On("Run", nil, mock.AnythingOfType("map[string]interface {}"), mock.AnythingOfType("*runner.AsyncResultHandler")).Return(nil)
actionData := &ActionData{arc... | explode_data.jsonl/16732 | {
"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,
21936,
3479,
11578,
1155,
353,
8840,
836,
8,
341,
197,
21462,
1669,
1855,
3675,
21936,
741,
197,
21462,
12101,
2822,
30295,
1669,
1281,
35190,
353,
17301,
692,
38933,
1669,
501,
66436,
2077,
2512,
340,
38933,
8071,
445,
6727,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestArrayScanner(t *testing.T) {
var s sql.Scanner = Array(&[]bool{})
if _, ok := s.(*BoolArray); !ok {
t.Errorf("Expected *BoolArray, got %T", s)
}
s = Array(&[]float64{})
if _, ok := s.(*Float64Array); !ok {
t.Errorf("Expected *Float64Array, got %T", s)
}
s = Array(&[]int64{})
if _, ok := s.(*Int64... | explode_data.jsonl/5302 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 352
} | [
2830,
3393,
1857,
31002,
1155,
353,
8840,
836,
8,
341,
2405,
274,
5704,
32098,
284,
2910,
2099,
1294,
2641,
37790,
743,
8358,
5394,
1669,
274,
41399,
11233,
1857,
1215,
753,
562,
341,
197,
3244,
13080,
445,
18896,
353,
11233,
1857,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 7 |
func TestLaunchTestRequest(t *testing.T) {
runTest(t, "increment", func(client *daptest.Client, fixture protest.Fixture) {
runDebugSession(t, client, "launch", func() {
// We reuse the harness that builds, but ignore the built binary,
// only relying on the source to be built in response to LaunchRequest.
f... | explode_data.jsonl/17349 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 193
} | [
2830,
3393,
32067,
2271,
1900,
1155,
353,
8840,
836,
8,
341,
56742,
2271,
1155,
11,
330,
35744,
497,
2915,
12805,
353,
91294,
1944,
11716,
11,
12507,
8665,
991,
12735,
8,
341,
197,
56742,
7939,
5283,
1155,
11,
2943,
11,
330,
33499,
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 TestSokuonS(t *testing.T) {
const want = "ssasshissussesso"
for _, v := range []string{"っさっしっすっせっそ", "ッサッシッスッセッソ"} {
got, err := KanaToRomaji(v)
assert.Equal(t, want, got)
assert.Nil(t, err)
}
} | explode_data.jsonl/11345 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 111
} | [
2830,
3393,
50,
16493,
263,
50,
1155,
353,
8840,
836,
8,
341,
4777,
1366,
284,
330,
778,
395,
71,
1038,
1854,
9823,
1837,
2023,
8358,
348,
1669,
2088,
3056,
917,
4913,
41791,
29713,
41791,
127441,
17219,
41791,
71242,
41791,
26831,
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... | 2 |
func TestProcessNodesWithRetriesOnErrors(t *testing.T) {
cancel, controller := newController()
defer cancel()
assert.NotNil(t, controller)
wf := unmarshalWF(helloWorldWf)
assert.NotNil(t, wf)
woc := newWorkflowOperationCtx(wf, controller)
assert.NotNil(t, woc)
// Verify that there are no nodes in the wf status.... | explode_data.jsonl/70951 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1036
} | [
2830,
3393,
7423,
12288,
2354,
12020,
4019,
1925,
13877,
1155,
353,
8840,
836,
8,
341,
84441,
11,
6461,
1669,
501,
2051,
741,
16867,
9121,
741,
6948,
93882,
1155,
11,
6461,
340,
6692,
69,
1669,
650,
27121,
32131,
3203,
4791,
10134,
54,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestOuterLinkV2WithMetadataContainerEncode(t *testing.T) {
var o outerLinkV2WithMetadataContainer
_, err := MsgpackEncode(o)
requireErrorHasSuffix(t, errCodecEncodeSelf, err)
} | explode_data.jsonl/72244 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 69
} | [
2830,
3393,
51322,
3939,
53,
17,
2354,
14610,
4502,
32535,
1155,
353,
8840,
836,
8,
341,
2405,
297,
15955,
3939,
53,
17,
2354,
14610,
4502,
198,
197,
6878,
1848,
1669,
24205,
4748,
32535,
10108,
340,
17957,
1454,
10281,
40177,
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 |
func TestListObjectsPagination(t *testing.T) {
svc := &mockS3Client{}
objects := []s3.ListObjectsOutput{
{
Contents: []s3.Object{
{
Key: aws.String("1"),
},
},
NextMarker: aws.String("marker"),
IsTruncated: aws.Bool(true),
},
{
Contents: []s3.Object{
{
Key: aws.String("2"),... | explode_data.jsonl/7295 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 529
} | [
2830,
3393,
852,
11543,
44265,
1155,
353,
8840,
836,
8,
341,
1903,
7362,
1669,
609,
16712,
50,
18,
2959,
16094,
197,
19210,
1669,
3056,
82,
18,
5814,
11543,
5097,
515,
197,
197,
515,
298,
197,
14803,
25,
3056,
82,
18,
8348,
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... | 4 |
func TestIPPoolExists(t *testing.T) {
tests := []struct {
name string
ipPools []*antreacrds.ExternalIPPool
ipPoolToCheck string
expectedExists bool
}{
{
name: "check for existing IPPool",
ipPools: []*antreacrds.ExternalIPPool{
newExternalIPPool("eip1", "", "10.10.10.2", "10.10.10... | explode_data.jsonl/10263 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 546
} | [
2830,
3393,
3298,
10551,
15575,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
1843,
914,
198,
197,
46531,
47,
6178,
286,
29838,
517,
265,
64748,
5356,
5121,
15342,
3298,
10551,
198,
197,
46531,
10551,
1249,
397... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExists(t *testing.T) {
type incrementalTest struct {
// incremental flag was passed
incremental bool
// previous image existence
previousImage bool
// script installed
scriptInstalled bool
// expected result
expected bool
}
tests := []incrementalTest{
// 0-1: incremental, no image, no mat... | explode_data.jsonl/59439 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 636
} | [
2830,
3393,
15575,
1155,
353,
8840,
836,
8,
341,
13158,
52299,
2271,
2036,
341,
197,
197,
322,
52299,
5181,
572,
5823,
198,
197,
17430,
13477,
278,
1807,
198,
197,
197,
322,
3681,
2168,
13885,
198,
197,
197,
19702,
1906,
1807,
198,
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... | 8 |
func Test_lessStrings(t *testing.T) {
tests := []struct {
a []string
b []string
want bool
}{
{[]string{"a", "b", "c"}, []string{"a", "b", "c"}, false},
{[]string{"a", "b", "c"}, []string{"a", "b"}, false},
{[]string{"a", "b", "c"}, []string{"a", "c"}, true},
{[]string{"a", "b", "c"}, []string{"b"}... | explode_data.jsonl/24871 | {
"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,
50747,
20859,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11323,
262,
3056,
917,
198,
197,
2233,
262,
3056,
917,
198,
197,
50780,
1807,
198,
197,
59403,
197,
197,
90,
1294,
917,
4913,
64,
497,
330,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestSchema(t *testing.T) {
colColl := NewColCollection(allCols...)
schFromCols, err := SchemaFromCols(colColl)
require.NoError(t, err)
testSchema("SchemaFromCols", schFromCols, t)
testKeyColColl := NewColCollection(pkCols...)
testNonKeyColsColl := NewColCollection(nonPkCols...)
schFromPKAndNonPKCols, _ :=... | explode_data.jsonl/5966 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 215
} | [
2830,
3393,
8632,
1155,
353,
8840,
836,
8,
341,
46640,
15265,
1669,
1532,
6127,
6482,
20388,
37567,
31218,
1903,
331,
3830,
37567,
11,
1848,
1669,
12539,
3830,
37567,
19611,
15265,
340,
17957,
35699,
1155,
11,
1848,
692,
18185,
8632,
445,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestTranslateIngressV1(t *testing.T) {
prefix := networkingv1.PathTypePrefix
// no backend.
ing := &networkingv1.Ingress{
ObjectMeta: metav1.ObjectMeta{
Name: "test",
Namespace: "default",
Annotations: map[string]string{
"k8s.apisix.apache.org/use-regex": "tr... | explode_data.jsonl/6700 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2074
} | [
2830,
3393,
27473,
641,
2483,
53,
16,
1155,
353,
8840,
836,
8,
341,
3223,
5060,
1669,
28030,
85,
16,
17474,
929,
14335,
198,
197,
322,
902,
19163,
624,
197,
287,
1669,
609,
17511,
287,
85,
16,
5337,
2483,
515,
197,
23816,
12175,
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 TestGetContainerEnv(t *testing.T) {
assert := asrt.New(t)
container, err := FindContainerByLabels(map[string]string{"com.ddev.site-name": testContainerName})
assert.NoError(err)
require.NotEmpty(t, container)
env := GetContainerEnv("HOTDOG", *container)
assert.Equal("superior-to-corndog", env)
env = GetCo... | explode_data.jsonl/41379 | {
"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,
1949,
4502,
14359,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
438,
3342,
7121,
1155,
692,
53290,
11,
1848,
1669,
7379,
4502,
1359,
23674,
9147,
14032,
30953,
4913,
874,
950,
3583,
22115,
11494,
788,
1273,
4502,
675,
3518,
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 TestEvict(t *testing.T) {
m := NewMap(nil)
if 0 != len(m.Items()) {
t.Error()
}
for _, e := range list {
m.Set(e.k, &MapItem{Value: e}, e.f)
}
if len(list) != len(m.Items()) {
t.Error()
}
m.Expire(func(list, item *MapItem) bool {
if 10 > item.Value.(testItem).v {
m.Delete(item.Value.(testItem)... | explode_data.jsonl/74885 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 196
} | [
2830,
3393,
34112,
849,
1155,
353,
8840,
836,
8,
341,
2109,
1669,
1532,
2227,
27907,
340,
743,
220,
15,
961,
2422,
1255,
12054,
2140,
341,
197,
3244,
6141,
741,
197,
630,
2023,
8358,
384,
1669,
2088,
1140,
341,
197,
2109,
4202,
2026,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestModCheckExistenceOfManifestExists(t *testing.T) {
mod := Mod{}
mod.GoSumPath = testGoSumName
exists := mod.CheckExistenceOfManifest()
if !exists {
t.Errorf("Expected existence of %s", testGoSumName)
}
} | explode_data.jsonl/46383 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 84
} | [
2830,
3393,
4459,
3973,
25613,
763,
2124,
38495,
15575,
1155,
353,
8840,
836,
8,
341,
42228,
1669,
5650,
16094,
42228,
67131,
9190,
1820,
284,
1273,
10850,
9190,
675,
198,
8122,
1671,
1669,
1463,
10600,
25613,
763,
2124,
38495,
2822,
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
] | 2 |
func TestDeleteExecute(t *testing.T) {
config.WAITFREQUENCY = 0
client := new(CFClient)
stackname := "ToDeleteStack"
client.Client = &fakeDeleteCFClient{err: nil, stackname: stackname}
opts := &commander.CommandHelper{}
d := Delete{
client: client,
}
d.Execute(opts)
} | explode_data.jsonl/29824 | {
"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,
6435,
17174,
1155,
353,
8840,
836,
8,
341,
25873,
1175,
18587,
37,
787,
74113,
284,
220,
15,
198,
25291,
1669,
501,
3025,
37,
2959,
340,
48227,
606,
1669,
330,
64105,
4336,
698,
25291,
11716,
284,
609,
30570,
6435,
9650,
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 TestProhibitedVendorSync(t *testing.T) {
vendorListData := MarshalVendorList(buildVendorList34())
perms := allPurposesEnabledPermissions()
perms.cfg.HostVendorID = 10
perms.vendorIDs = map[openrtb_ext.BidderName]uint16{
openrtb_ext.BidderAppnexus: 2,
openrtb_ext.BidderPubmatic: 6,
openrtb_ext.BidderRubi... | explode_data.jsonl/31099 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 517
} | [
2830,
3393,
1336,
92517,
44691,
12154,
1155,
353,
8840,
836,
8,
341,
5195,
8029,
852,
1043,
1669,
35667,
44691,
852,
43333,
44691,
852,
18,
19,
12367,
197,
87772,
1669,
678,
47,
324,
8285,
5462,
23851,
741,
197,
87772,
30481,
29840,
446... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestServerSSL(t *testing.T) {
tests := []struct {
label string
domain string
passphrase string
expectedMsgs []string
insecure bool
statusCode int
overrideProtocol bool
}{
{
label: "unknown CA", domain: "127.0.0.1", expectedMsgs: []string{"x509: cert... | explode_data.jsonl/4947 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 879
} | [
2830,
3393,
5475,
22594,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
29277,
310,
914,
198,
197,
2698,
3121,
1843,
914,
198,
197,
41431,
27710,
981,
914,
198,
197,
42400,
6611,
82,
257,
3056,
917,
198,
197,
17430,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTypeOfTypeOf(t *testing.T) {
// Check that all the type constructors return concrete *rtype implementations.
// It's difficult to test directly because the reflect package is only at arm's length.
// The easiest thing to do is just call a function that crashes if it doesn't get an *rtype.
check := func(nam... | explode_data.jsonl/29632 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 295
} | [
2830,
3393,
929,
34696,
2124,
1155,
353,
8840,
836,
8,
341,
197,
322,
4248,
429,
678,
279,
943,
54717,
470,
14175,
353,
32513,
38337,
624,
197,
322,
1084,
594,
5000,
311,
1273,
5961,
1576,
279,
8708,
6328,
374,
1172,
518,
6773,
594,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestACheck(t *testing.T) {
id := "eyJ6b25lIjoibmEwIiwicXVldWUiOiJTSVNZUEhVUy1KT0JTLVYzIiwicGFydF9pZCI6OSwib2Zmc2V0Ijo1NTEzMTU3fQ=="
result, err := test.RunCmdWithError("acheck", test.Bucket, id)
if len(err) > 0 && !strings.Contains(err, "incorrect zone") && len(result) == 0 {
t.Fail()
}
} | explode_data.jsonl/54473 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 157
} | [
2830,
3393,
1706,
1227,
1155,
353,
8840,
836,
8,
341,
15710,
1669,
330,
84609,
21,
65,
17,
20,
75,
40,
7305,
579,
76,
36,
86,
40,
37081,
292,
55,
53,
507,
54,
23710,
81096,
41,
9951,
53,
69930,
2230,
71,
53,
52,
88,
16,
33539,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGeometryCollection(t *testing.T) {
for i, tc := range []struct {
geoms []T
expected *expectedGeometryCollection
}{
{
expected: &expectedGeometryCollection{
layout: NoLayout,
stride: 0,
bounds: NewBounds(NoLayout),
empty: true,
},
},
{
geoms: []T{
NewPoint(XY),
},... | explode_data.jsonl/74715 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1313
} | [
2830,
3393,
20787,
6482,
1155,
353,
8840,
836,
8,
341,
2023,
600,
11,
17130,
1669,
2088,
3056,
1235,
341,
197,
197,
709,
6940,
262,
3056,
51,
198,
197,
42400,
353,
7325,
20787,
6482,
198,
197,
59403,
197,
197,
515,
298,
42400,
25,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestRetry404(t *testing.T) {
tc := &testTime{now: time.Now()}
ts := httptest.NewTLSServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if tc.slept == 0 {
http.Error(w, "404 Not Found", http.StatusNotFound)
}
}))
defer ts.Close()
c := getClient(ts.URL)
c.time = tc
resp, err := c.req... | explode_data.jsonl/6245 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 215
} | [
2830,
3393,
51560,
19,
15,
19,
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,
1254,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConfigureBadAlgorithm(t *testing.T) {
for _, algorithm := range []string{
"MD2WithRSA",
"DSAWithSHA1",
"DSAWithSHA256",
"Unknown",
} {
t.Run(algorithm, func(t *testing.T) {
inspector, exists := inspectors.Get("signaturealgorithm")
require.True(t, exists, "inspectors.Get(\"signaturealgorithm\"... | explode_data.jsonl/54445 | {
"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,
28560,
17082,
27847,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
12111,
1669,
2088,
3056,
917,
515,
197,
197,
1,
6076,
17,
2354,
73564,
756,
197,
197,
1,
72638,
2354,
33145,
16,
756,
197,
197,
1,
72638,
2354,
33145,
17,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestAddTxGroup(t *testing.T) {
q, mem := initEnv(0)
cfg := q.GetConfig()
defer q.Close()
defer mem.Close()
toAddr := "1PjMi9yGTjA9bbqUZa1Sj7dAUKyLA8KqE1"
//copytx
crouptx1 := types.Transaction{Execer: []byte("coins"), Payload: types.Encode(transfer), Fee: 460000000, Expire: 0, To: toAddr}
crouptx2 := type... | explode_data.jsonl/16837 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 539
} | [
2830,
3393,
2212,
31584,
2808,
1155,
353,
8840,
836,
8,
341,
18534,
11,
1833,
1669,
2930,
14359,
7,
15,
340,
50286,
1669,
2804,
2234,
2648,
741,
16867,
2804,
10421,
741,
16867,
1833,
10421,
741,
31709,
13986,
1669,
330,
16,
47,
73,
41... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInterpretStringEncodeHex(t *testing.T) {
t.Parallel()
inter := parseCheckAndInterpret(t, `
fun test(): String {
return String.encodeHex([1, 2, 3, 0xCA, 0xDE])
}
`)
result, err := inter.Invoke("test")
require.NoError(t, err)
RequireValuesEqual(
t,
inter,
interpreter.NewS... | explode_data.jsonl/73417 | {
"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,
3306,
8043,
703,
32535,
20335,
1155,
353,
8840,
836,
8,
1476,
3244,
41288,
7957,
2822,
58915,
1669,
4715,
3973,
3036,
3306,
8043,
1155,
11,
22074,
414,
2464,
1273,
4555,
923,
341,
688,
470,
923,
17313,
20335,
2561,
16,
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 TestPresentationMarshalMinimalJSON(t *testing.T) {
var p Presentation
assert.NoError(t, json.Unmarshal([]byte(`{}`), &p))
assert.Equal(t, &p, NewPresentation(), "new Presentation should be equal to empty JSON object")
} | explode_data.jsonl/79743 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 80
} | [
2830,
3393,
55239,
55438,
88328,
5370,
1155,
353,
8840,
836,
8,
341,
2405,
281,
50868,
198,
6948,
35699,
1155,
11,
2951,
38097,
10556,
3782,
5809,
90,
5541,
701,
609,
79,
1171,
6948,
12808,
1155,
11,
609,
79,
11,
1532,
55239,
1507,
33... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestNotFound(t *testing.T) {
router := MakeRouter()
router.GET("/zello/yes", printHello)
router.GET("/hello", printHello)
router.GET("/activity/:user", writeData)
// completely wrong path
RunRequest(router, "GET", "/notFound", 404, "Not Found", t)
// partial match
RunRequest(router, "GET", "/zello/rando... | explode_data.jsonl/15100 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 261
} | [
2830,
3393,
10372,
1155,
353,
8840,
836,
8,
1476,
67009,
1669,
7405,
9523,
741,
67009,
17410,
4283,
89,
4791,
14,
9693,
497,
1173,
9707,
340,
67009,
17410,
4283,
14990,
497,
1173,
9707,
340,
67009,
17410,
4283,
7175,
11315,
872,
497,
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... | 1 |
func TestVerifyDir(t *testing.T) {
// Create temporary directory with a file "target" in it.
dir := tempDir(t)
target := filepath.Join(dir, "target")
err := ioutil.WriteFile(target, []byte{}, 0666)
require.NoError(t, err)
cmd, err := CreateCommand(
Config{
User: "test-user",
Flags: Flags{
Source: tru... | explode_data.jsonl/74626 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 223
} | [
2830,
3393,
32627,
6184,
1155,
353,
8840,
836,
8,
341,
197,
322,
4230,
13340,
6220,
448,
264,
1034,
330,
5657,
1,
304,
432,
624,
48532,
1669,
2730,
6184,
1155,
340,
28861,
1669,
26054,
22363,
14161,
11,
330,
5657,
1138,
9859,
1669,
43... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMySQLBinlogRowImageChecker(t *testing.T) {
db, mock, err := sqlmock.New()
require.Nil(t, err)
ctx := context.Background()
cases := []struct {
version string
state State
needCheck bool
rowImage string
}{
// mysql < 5.6.2 don't need check
{
version: "5.6.1-log",
state: StateS... | explode_data.jsonl/46931 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 835
} | [
2830,
3393,
59224,
28794,
839,
3102,
1906,
35188,
1155,
353,
8840,
836,
8,
341,
20939,
11,
7860,
11,
1848,
1669,
5704,
16712,
7121,
741,
17957,
59678,
1155,
11,
1848,
340,
20985,
1669,
2266,
19047,
2822,
1444,
2264,
1669,
3056,
1235,
34... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func Test_buildMetricsHTTPConnectionManagerFilter(t *testing.T) {
cacheDir, _ := os.UserCacheDir()
certFileName := filepath.Join(cacheDir, "pomerium", "envoy", "files", "tls-crt-354e49305a5a39414a545530374e58454e48334148524c4e324258463837364355564c4e4532464b54355139495547514a38.pem")
keyFileName := filepath.Join(cac... | explode_data.jsonl/36948 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1259
} | [
2830,
3393,
20801,
27328,
9230,
4526,
2043,
5632,
1155,
353,
8840,
836,
8,
341,
52680,
6184,
11,
716,
1669,
2643,
7344,
8233,
6184,
741,
1444,
529,
10903,
1669,
26054,
22363,
31933,
6184,
11,
330,
79,
25359,
2356,
497,
330,
3160,
2253,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.