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 TestInvalidReferenceComponents(t *testing.T) {
if _, err := WithName("-foo"); err == nil {
t.Fatal("Expected WithName to detect invalid name")
}
ref, err := WithName("busybox")
if err != nil {
t.Fatal(err)
}
if _, err := WithTag(ref, "-foo"); err == nil {
t.Fatal("Expected WithName to detect invalid ta... | explode_data.jsonl/60895 | {
"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,
7928,
8856,
10443,
1155,
353,
8840,
836,
8,
341,
743,
8358,
1848,
1669,
3085,
675,
13645,
7975,
5038,
1848,
621,
2092,
341,
197,
3244,
26133,
445,
18896,
3085,
675,
311,
11140,
8318,
829,
1138,
197,
532,
59504,
11,
1848,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestKustomizationErrors_Append(t *testing.T) {
ce := ConfigmapError{Path: "kustomization/filepath", ErrorMsg: "can't find configmap name"}
pe := PatchError{KustomizationPath: "kustomization/filepath", PatchFilepath: "patch/path", ErrorMsg: "can't find patch file"}
mes := KustomizationErrors{kErrors: []error{ce}... | explode_data.jsonl/72347 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 214
} | [
2830,
3393,
42,
1450,
2022,
13877,
36117,
408,
1155,
353,
8840,
836,
8,
341,
197,
346,
1669,
5532,
2186,
1454,
90,
1820,
25,
330,
74,
1450,
2022,
96442,
497,
4600,
6611,
25,
330,
4814,
944,
1477,
2193,
2186,
829,
16707,
197,
375,
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... | 2 |
func TestServer_TokenUpdate(t *testing.T) {
s := &Server{}
token, trx, down, err := models.NewArbitrarilyTokenForTest(nil, t)
assert.Nil(t, err)
defer down(t)
testDbConn = trx
req := &TokenUpdateRequest{
AppUid: token.App.UID,
AppSecret: token.App.Secret,
Token: token.UID,
Path: ... | explode_data.jsonl/30080 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 873
} | [
2830,
3393,
5475,
1139,
1679,
4289,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
609,
5475,
16094,
43947,
11,
73021,
11,
1495,
11,
1848,
1669,
4119,
7121,
6953,
4489,
81,
6613,
3323,
2461,
2271,
27907,
11,
259,
340,
6948,
59678,
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 TestNewCount(t *testing.T) {
for _, tc := range []struct {
desc string
opt *CountOptions
want *Count
}{
{"MaxPartitionsContributed is not set",
&CountOptions{
Epsilon: ln3,
Delta: tenten,
Noise: noNoise{},
maxContribut... | explode_data.jsonl/57745 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 961
} | [
2830,
3393,
3564,
2507,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17130,
1669,
2088,
3056,
1235,
341,
197,
41653,
914,
198,
197,
64838,
220,
353,
2507,
3798,
198,
197,
50780,
353,
2507,
198,
197,
59403,
197,
197,
4913,
5974,
5800,
593... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFIDO2(t *testing.T) {
if os.Getenv("TEST_FIDO2") == "" {
t.Skip()
}
path := testutil.Path()
db, err := auth.NewDB(path)
require.NoError(t, err)
defer func() { _ = os.Remove(path) }()
mk := testutil.Seed(0x01)
pin := "12345"
fido2Path := filepath.Join(gopath(t), "bin", "fido2.so")
fido2Plugin, err... | explode_data.jsonl/13749 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 446
} | [
2830,
3393,
37,
70974,
17,
1155,
353,
8840,
836,
8,
341,
743,
2643,
64883,
445,
10033,
1400,
70974,
17,
899,
621,
1591,
341,
197,
3244,
57776,
741,
197,
532,
26781,
1669,
1273,
1314,
17474,
741,
20939,
11,
1848,
1669,
4166,
7121,
3506... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUpdateSubaccountName(t *testing.T) {
t.Parallel()
_, err := f.UpdateSubaccountName(context.Background(), "", "")
if !errors.Is(err, errSubaccountUpdateNameInvalid) {
t.Errorf("expected %v, but received: %s", errSubaccountUpdateNameInvalid, err)
}
if !areTestAPIKeysSet() || !canManipulateRealOrders {
... | explode_data.jsonl/15247 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 263
} | [
2830,
3393,
4289,
3136,
4608,
675,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
197,
6878,
1848,
1669,
282,
16689,
3136,
4608,
675,
5378,
19047,
1507,
7342,
14676,
743,
753,
7650,
4506,
3964,
11,
1848,
3136,
4608,
4289,
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,
1,
1,
1,
1,
1,
1... | 7 |
func TestLimitsSTHPollinationReturned(t *testing.T) {
s := createAndOpenStorage()
defer closeAndDeleteStorage(s)
*defaultNumPollinationsToReturn = 1
v := mustCreateSignatureVerifiers(t)
h := newHandlerWithClock(s, v, testStuckClock(stuckClockTimeMillis))
sentPollen := sthPollinationFromString(t, addSTHPollinati... | explode_data.jsonl/80090 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 433
} | [
2830,
3393,
94588,
784,
6610,
965,
2554,
84804,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
1855,
3036,
5002,
5793,
741,
16867,
3265,
3036,
6435,
5793,
1141,
692,
197,
9,
2258,
4651,
49207,
12634,
1249,
5598,
284,
220,
16,
198,
5195,
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... | 3 |
func TestStream(t *testing.T) {
expectedBody := "expected body"
testServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
flusher, ok := w.(http.Flusher)
if !ok {
panic("need flusher!")
}
w.Header().Set("Transfer-Encoding", "chunked")
w.WriteHeader(http.StatusOK)
... | explode_data.jsonl/13284 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 300
} | [
2830,
3393,
3027,
1155,
353,
8840,
836,
8,
341,
42400,
5444,
1669,
330,
7325,
2487,
1837,
18185,
5475,
1669,
54320,
70334,
7121,
5475,
19886,
89164,
18552,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
197,
1166,
34604,
261,
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 TestObjectCopy(t *testing.T) {
ctx := context.Background()
c, rollback := makeConnectionWithObjectHeaders(t)
defer rollback()
_, err := c.ObjectCopy(ctx, CONTAINER, OBJECT, CONTAINER, OBJECT2, nil)
if err != nil {
t.Fatal(err)
}
err = c.ObjectDelete(ctx, CONTAINER, OBJECT2)
if err != nil {
t.Fatal(err)... | explode_data.jsonl/12704 | {
"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,
1190,
12106,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
1444,
11,
60414,
1669,
1281,
4526,
2354,
1190,
10574,
1155,
340,
16867,
60414,
741,
197,
6878,
1848,
1669,
272,
8348,
12106,
7502,
11,
16120,
34521,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIgnoreErrors_Middleware(t *testing.T) {
testCases := []struct {
Name string
IgnoredErrors []error
TestError error
ShouldBeIgnored bool
}{
{
Name: "ignored_error",
IgnoredErrors: []error{errors.New("test")},
TestError: errors.New("test"),
ShouldBeIgn... | explode_data.jsonl/58940 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 564
} | [
2830,
3393,
12497,
13877,
1245,
11603,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
21297,
310,
914,
198,
197,
24486,
4905,
3018,
13877,
256,
3056,
841,
198,
197,
73866,
1454,
981,
1465,
198,
197,
197,
14996,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCompileV1Observability(t *testing.T) {
f := newFixture(t)
f.v1(http.MethodPut, "/policies/test", `package test
p { input.x = 1 }`, 200, "")
compileReq := newReqV1(http.MethodPost, "/compile?metrics&explain=full", `{
"query": "data.test.p = true"
}`)
f.reset()
f.server.Handler.ServeHTTP(f.recorder... | explode_data.jsonl/78985 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 272
} | [
2830,
3393,
46126,
53,
16,
37763,
2897,
1155,
353,
8840,
836,
8,
1476,
1166,
1669,
501,
18930,
1155,
692,
1166,
3133,
16,
19886,
20798,
19103,
11,
3521,
79,
42038,
12697,
497,
1565,
1722,
1273,
271,
3223,
314,
1946,
1993,
284,
220,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestValidateDmsReplicationSubnetGroupId(t *testing.T) {
validIds := []string{
"tf-test-replication-subnet-group-1",
"tf_test_replication_subnet_group_1",
"tf.test.replication.subnet.group.1",
"tf test replication subnet group 1",
"tfTestReplicationSubnetGroup",
}
for _, s := range validIds {
_, err... | explode_data.jsonl/78606 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 435
} | [
2830,
3393,
17926,
35,
1011,
18327,
1693,
3136,
4711,
48410,
1155,
353,
8840,
836,
8,
341,
56322,
12701,
1669,
3056,
917,
515,
197,
197,
1,
8935,
16839,
5504,
79,
1693,
17967,
4711,
4351,
12,
16,
756,
197,
197,
1,
8935,
4452,
25533,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestErrInvalidArrayValue(t *testing.T) {
expected := cli.FieldErrors{
&field.Error{
Type: field.ErrorTypeInvalid,
Field: "test-field[1]",
BadValue: "value",
Detail: "",
},
}
actual := cli.ErrInvalidArrayValue("value", rifftesting.TestField, 1)
if diff := cmp.Diff(expected, actual); di... | explode_data.jsonl/13217 | {
"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,
7747,
7928,
1857,
1130,
1155,
353,
8840,
836,
8,
341,
42400,
1669,
21348,
17087,
13877,
515,
197,
197,
5,
2566,
6141,
515,
298,
27725,
25,
257,
2070,
6141,
929,
7928,
345,
298,
94478,
25,
262,
330,
1944,
19130,
58,
16,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestVirtualFieldsService_List(t *testing.T) {
exp := []*VirtualField{
{
ID: "test.status_success",
Dataset: "test",
Name: "status_success",
Description: "Successful Requests",
Expression: "response < 400",
},
}
hf := func(w http.ResponseWriter, r *http.Request) {
asser... | explode_data.jsonl/36714 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 466
} | [
2830,
3393,
33026,
8941,
1860,
27104,
1155,
353,
8840,
836,
8,
341,
48558,
1669,
29838,
33026,
1877,
515,
197,
197,
515,
298,
29580,
25,
688,
330,
1944,
4299,
18632,
756,
298,
10957,
8369,
25,
257,
330,
1944,
756,
298,
21297,
25,
286,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_getContainerPortsFromStrings(t *testing.T) {
tests := []struct {
name string
ports []string
containerPorts []corev1.ContainerPort
wantErr bool
}{
{
name: "with normal port values and normal protocol values in lowercase",
ports: []string{"8080/tcp", "9090/udp"},
... | explode_data.jsonl/65165 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1164
} | [
2830,
3393,
3062,
4502,
68273,
3830,
20859,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
1843,
914,
198,
197,
197,
3394,
688,
3056,
917,
198,
197,
53290,
68273,
3056,
98645,
16,
33672,
7084,
198,
197,
50780,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 8 |
func TestSpxVar(t *testing.T) {
gopSpxTestEx(t, `
var (
Kai Kai
)
func onInit() {
Kai.clone()
broadcast("msg1")
}
`, `
var (
a int
)
func onInit() {
a = 1
}
func onCloned() {
say("Hi")
}
`, `package main
import spx "github.com/goplus/gop/cl/internal/spx"
type Game struct {
*spx.MyGame
Kai Kai
}
type Kai s... | explode_data.jsonl/78666 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 270
} | [
2830,
3393,
50,
1767,
3962,
1155,
353,
8840,
836,
8,
341,
3174,
453,
50,
1767,
2271,
840,
1155,
11,
22074,
947,
2399,
39340,
2143,
50610,
198,
692,
2830,
389,
3803,
368,
341,
39340,
2143,
15997,
741,
2233,
19105,
445,
3236,
16,
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 TestSignIn(t *testing.T) {
db, err := db.ConnectDB()
defer db.DB.Close()
if err != nil {
t.Errorf(err.Error())
}
user := model.User{}
db.DB.Where("email = ?", "notexisting@test.com").First(&user)
t.Log(user.ID)
} | explode_data.jsonl/71566 | {
"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,
35423,
1155,
353,
8840,
836,
8,
341,
20939,
11,
1848,
1669,
2927,
43851,
3506,
2822,
16867,
2927,
22537,
10421,
2822,
743,
1848,
961,
2092,
341,
197,
3244,
13080,
3964,
6141,
2398,
197,
532,
19060,
1669,
1614,
7344,
16094,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 2 |
func TestExtractOneLocalTarget(t *testing.T) {
f := newLTFixture(t)
defer f.TearDown()
targ := f.localTarget("echo hello world")
// Even if there are multiple other targets, should correctly extract and run the one LocalTarget
specs := []model.TargetSpec{
targ, model.ImageTarget{}, model.K8sTarget{},
}
res,... | explode_data.jsonl/17637 | {
"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,
28959,
3966,
7319,
6397,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
501,
43,
10808,
12735,
1155,
340,
16867,
282,
836,
682,
4454,
2822,
3244,
858,
1669,
282,
11033,
6397,
445,
3047,
23811,
1879,
5130,
197,
322,
7418,
421,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEnvironmentElbUpserter(t *testing.T) {
assert := assert.New(t)
workflow := new(environmentWorkflow)
workflow.environment = &common.Environment{
Name: "foo",
}
vpcInputParams := make(map[string]string)
stackManager := new(mockedStackManagerForUpsert)
stackManager.On("AwaitFinalStatus", "mu-loadbalan... | explode_data.jsonl/15910 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 273
} | [
2830,
3393,
12723,
6582,
65,
2324,
90727,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
197,
56249,
1669,
501,
67591,
62768,
340,
197,
56249,
62145,
284,
609,
5464,
45651,
515,
197,
21297,
25,
330,
7975,
756,
197,
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 TestGetActiveOrders(t *testing.T) {
h.SetDefaults()
TestSetup(t)
var getOrdersRequest = exchange.GetOrdersRequest{
OrderType: exchange.AnyOrderType,
Currencies: []currency.Pair{currency.NewPair(currency.BTC, currency.USDT)},
}
_, err := h.GetActiveOrders(&getOrdersRequest)
if areTestAPIKeysSet() && er... | explode_data.jsonl/24345 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 178
} | [
2830,
3393,
1949,
5728,
24898,
1155,
353,
8840,
836,
8,
341,
9598,
4202,
16273,
741,
73866,
21821,
1155,
692,
2405,
633,
24898,
1900,
284,
9289,
2234,
24898,
1900,
515,
197,
197,
4431,
929,
25,
220,
9289,
13311,
4431,
929,
345,
197,
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... | 5 |
func TestNamespaceFetchBlocksShardOwned(t *testing.T) {
ctrl := xtest.NewController(t)
defer ctrl.Finish()
ctx := context.NewBackground()
defer ctx.Close()
ns, closer := newTestNamespace(t)
defer closer()
shard := NewMockdatabaseShard(ctrl)
shard.EXPECT().FetchBlocks(ctx, ident.NewIDMatcher("foo"), nil, gomoc... | explode_data.jsonl/35348 | {
"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,
22699,
20714,
29804,
2016,
567,
57641,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
856,
1944,
7121,
2051,
1155,
340,
16867,
23743,
991,
18176,
2822,
20985,
1669,
2266,
7121,
8706,
741,
16867,
5635,
10421,
2822,
84041,
11,
12128... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDateToTime(t *testing.T) {
baseTime, _ := time.Parse(time.RFC3339, "2018-05-10T15:04:00Z")
// Our test cases
tests := []struct {
name string
str string
want time.Time
wantErr bool
}{
{
name: "RFC3339 UTC",
str: "2018-05-10T15:04:00Z",
want: baseTime,
},
{
name: "RFC333... | explode_data.jsonl/31983 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 526
} | [
2830,
3393,
1916,
1249,
1462,
1155,
353,
8840,
836,
8,
341,
24195,
1462,
11,
716,
1669,
882,
8937,
9730,
2013,
6754,
18,
18,
18,
24,
11,
330,
17,
15,
16,
23,
12,
15,
20,
12,
16,
15,
51,
16,
20,
25,
15,
19,
25,
15,
15,
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... | 3 |
func TestWritePiecesTooLong(t *testing.T) {
w := NewWriter(ioutil.Discard)
b1 := make([]byte, MaxFrameLength)
b2 := make([]byte, 1)
n, err := w.WritePieces(b1, b2)
assert.Error(t, err, "Writing too long message should result in error")
assert.Equal(t, 0, n, "Writing too long message should result in 0 bytes writt... | explode_data.jsonl/19798 | {
"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,
7985,
91225,
31246,
6583,
1155,
353,
8840,
836,
8,
341,
6692,
1669,
1532,
6492,
1956,
30158,
909,
47560,
340,
2233,
16,
1669,
1281,
10556,
3782,
11,
7487,
4369,
4373,
340,
2233,
17,
1669,
1281,
10556,
3782,
11,
220,
16,
34... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestJsonnetCompiler(t *testing.T) {
Convey("Given a jsonnet compiler", t, func() {
jnCompiler := NewJNCompiler(jsonnet.MakeVM())
in := make(chan gen.File, 1)
Convey("Given a valid file path", func() {
valid := "/tmp/valid.jsonnet"
invalid := "/tmp/invalid.jsonnet"
Convey("With valid jsonnet content... | explode_data.jsonl/44510 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 574
} | [
2830,
3393,
5014,
4711,
38406,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
445,
22043,
264,
2951,
4711,
19415,
497,
259,
11,
2915,
368,
341,
197,
12428,
77,
38406,
1669,
1532,
41,
45,
38406,
9304,
4711,
50133,
11187,
2398,
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 TestKubeResourcesStart(t *testing.T) {
srv := newTestServer()
go srv.Start()
defer srv.Stop()
requestor := createAdmin(srv.Core)
sg := srv.Core.APIClient("token", requestor.APIToken)
srv.Core.AWSProvider = func(_ map[string]string) core.Provider {
return new(fake_core.Provider)
}
kube := createKube(sg)... | explode_data.jsonl/26150 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1765
} | [
2830,
3393,
42,
3760,
11277,
3479,
1155,
353,
8840,
836,
8,
341,
1903,
10553,
1669,
501,
2271,
5475,
741,
30680,
43578,
12101,
741,
16867,
43578,
30213,
2822,
23555,
269,
1669,
1855,
7210,
1141,
10553,
12777,
340,
1903,
70,
1669,
43578,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNoneUpdateRecord(t *testing.T) {
noneReset()
err := cache.UpdateRecord("nanopack.io", &shaman.Resource{})
if err != nil {
t.Errorf("Failed to update record in none cacher - %v", err)
}
} | explode_data.jsonl/60814 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 76
} | [
2830,
3393,
4064,
4289,
6471,
1155,
353,
8840,
836,
8,
341,
197,
6697,
14828,
741,
9859,
1669,
6500,
16689,
6471,
445,
18759,
453,
473,
4245,
497,
609,
927,
12715,
20766,
37790,
743,
1848,
961,
2092,
341,
197,
3244,
13080,
445,
9408,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUserService_FindById(t *testing.T) {
//prepare db test
db, _ := database.PrepareTestDB("txdb")
defer database.CleanTestDB(db)
// create an instance of our test object
mockUser := models.User{
ID: "7dd77cc4-f786-4be0-b5a5-0c203b9c62c5",
Name: "Uje",
Email: "uje@email.com",
}
u := NewUserServic... | explode_data.jsonl/37409 | {
"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,
60004,
95245,
2720,
1155,
353,
8840,
836,
8,
341,
197,
322,
13609,
2927,
1273,
198,
20939,
11,
716,
1669,
4625,
28770,
3380,
2271,
3506,
445,
3998,
1999,
1138,
16867,
4625,
727,
2675,
2271,
3506,
9791,
692,
197,
322,
1855,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestApplyOverrides(t *testing.T) {
falseVar := false
trueVar := true
tests := []struct {
name string
fcfg FilesetConfig
module, fileset string
overrides *ModuleOverrides
expected FilesetConfig
}{
{
name: "var overrides",
fcfg: FilesetConfig{
Var: map[st... | explode_data.jsonl/64756 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1062
} | [
2830,
3393,
28497,
80010,
1155,
353,
8840,
836,
8,
341,
36012,
3962,
1669,
895,
198,
42808,
3962,
1669,
830,
271,
78216,
1669,
3056,
1235,
341,
197,
11609,
310,
914,
198,
197,
1166,
14072,
310,
2887,
746,
2648,
198,
197,
54020,
11,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAppCreationWithoutForceUpdate(t *testing.T) {
ctx := Given(t)
ctx.
Path(guestbookPath).
DestName("in-cluster").
When().
CreateApp().
Then().
Expect(SyncStatusIs(SyncStatusCodeOutOfSync)).
And(func(app *Application) {
assert.Equal(t, Name(), app.Name)
assert.Equal(t, RepoURL(RepoURLTypeFi... | explode_data.jsonl/35619 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 359
} | [
2830,
3393,
2164,
32701,
26040,
18573,
4289,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
16246,
1155,
692,
20985,
624,
197,
69640,
3268,
3045,
2190,
1820,
4292,
197,
10957,
477,
675,
445,
258,
93208,
38609,
197,
197,
4498,
25829,
197,
75... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEtcdSDGetServer(t *testing.T) {
t.Parallel()
for _, table := range etcdSDTables {
t.Run(table.server.ID, func(t *testing.T) {
config := config.NewDefaultEtcdServiceDiscoveryConfig()
c, cli := helpers.GetTestEtcd(t)
defer c.Terminate(t)
e := getEtcdSD(t, *config, table.server, cli)
e.Init()
... | explode_data.jsonl/61562 | {
"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,
31860,
4385,
5491,
1949,
5475,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
2023,
8358,
1965,
1669,
2088,
1842,
4385,
5491,
21670,
341,
197,
3244,
16708,
15761,
12638,
9910,
11,
2915,
1155,
353,
8840,
836,
8,
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... | 1 |
func TestMessageTransaction_ValidateExtended2(t *testing.T) {
xmss := helper.GetAliceXMSS(6) // Master XMSS
masterAddress := misc.UCharVectorToBytes(xmss.Address())
xmss2 := helper.GetBobXMSS(6) // Slave XMSS
message := "hello"
fee := uint64(1)
xmssPK := misc.UCharVectorToBytes(xmss2.PK())
messageTx := NewTestM... | explode_data.jsonl/10390 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 356
} | [
2830,
3393,
2052,
8070,
62,
17926,
53190,
17,
1155,
353,
8840,
836,
8,
341,
10225,
76,
778,
1669,
13137,
2234,
61686,
52337,
1220,
7,
21,
8,
442,
10824,
51020,
1220,
198,
2109,
2300,
4286,
1669,
31125,
5255,
4768,
3781,
1249,
7078,
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 TestThisUndefinedWarningESM(t *testing.T) {
default_suite.expectBundled(t, bundled{
files: map[string]string{
"/entry.js": `
import x from './file1.js'
import y from 'pkg/file2.js'
console.log(x, y)
`,
"/file1.js": `
export default [this, this]
`,
"/node_modules/pkg/file2.js": `
... | explode_data.jsonl/38608 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 298
} | [
2830,
3393,
1986,
30571,
12087,
1570,
44,
1155,
353,
8840,
836,
8,
341,
11940,
57239,
25952,
33,
1241,
832,
1155,
11,
51450,
515,
197,
74075,
25,
2415,
14032,
30953,
515,
298,
197,
3115,
4085,
2857,
788,
22074,
571,
21918,
856,
504,
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 TestMergePortRules(t *testing.T) {
testMergePortRules(t, []PortRule{
PortRule{
Service: "web",
SourcePort: 80,
TargetPort: 80,
},
}, []PortRule{
PortRule{
Service: "web",
SourcePort: 80,
TargetPort: 81,
},
}, []PortRule{
PortRule{
Service: "web",
SourcePort: 80,
Tar... | explode_data.jsonl/31961 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1735
} | [
2830,
3393,
52096,
7084,
26008,
1155,
353,
8840,
836,
8,
341,
18185,
52096,
7084,
26008,
1155,
11,
3056,
7084,
11337,
515,
197,
98459,
11337,
515,
298,
91619,
25,
262,
330,
2911,
756,
298,
197,
3608,
7084,
25,
220,
23,
15,
345,
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... | 1 |
func TestScannerEmptyIterator(t *testing.T) {
defer leaktest.AfterTest(t)
iter := newTestIterator(0)
q := &testQueue{}
s := newRangeScanner(1*time.Millisecond, 0, iter, nil)
s.AddQueues(q)
mc := hlc.NewManualClock(0)
clock := hlc.NewClock(mc.UnixNano)
stopper := util.NewStopper()
defer stopper.Stop()
s.Start(... | explode_data.jsonl/39877 | {
"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,
31002,
3522,
11951,
1155,
353,
8840,
836,
8,
341,
16867,
23352,
1944,
36892,
2271,
1155,
340,
79924,
1669,
501,
2271,
11951,
7,
15,
340,
18534,
1669,
609,
1944,
7554,
16094,
1903,
1669,
501,
6046,
31002,
7,
16,
77053,
71482,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReregisterContainerInstanceAttributeError(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
mockDockerClient := mock_dockerapi.NewMockDockerClient(ctrl)
client := mock_api.NewMockECSClient(ctrl)
mockCredentialsProvider := app_mocks.NewMockProvider(ctrl)
mockMobyPlugins := mock_mobypkgw... | explode_data.jsonl/41596 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 755
} | [
2830,
3393,
49,
52633,
1571,
4502,
2523,
3907,
1454,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
23743,
991,
18176,
2822,
77333,
35,
13659,
2959,
1669,
7860,
814,
13659,
2068,
7121,
11571,
35... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestValidateSplitsFails(t *testing.T) {
tests := []struct {
splits []v1.Split
upstreamNames sets.String
msg string
}{
{
splits: []v1.Split{
{
Weight: 90,
Action: &v1.Action{
Pass: "test-1",
},
},
},
upstreamNames: map[string]sets.Empty{
"test-1":... | explode_data.jsonl/65845 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1080
} | [
2830,
3393,
17926,
50,
39033,
37,
6209,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
1903,
39033,
286,
3056,
85,
16,
19823,
198,
197,
59810,
4027,
7980,
7289,
6431,
198,
197,
21169,
1843,
914,
198,
197,
59403,
197,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestLevelDBReceiptsGetReceiptErrorID(t *testing.T) {
assert := assert.New(t)
kvstoreMock := &mockKVStore{
err: fmt.Errorf("pop"),
}
r := &levelDBReceipts{
conf: &LevelDBReceiptStoreConf{},
store: kvstoreMock,
}
_, err := r.GetReceipt("receipt1")
assert.EqualError(err, "Failed to retrieve the entry ... | explode_data.jsonl/21461 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 151
} | [
2830,
3393,
4449,
3506,
67461,
82,
1949,
67461,
1454,
915,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
16463,
85,
4314,
11571,
1669,
609,
16712,
82707,
6093,
515,
197,
9859,
25,
8879,
13080,
445,
8374,
4461,
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 TestSyncClients_ScopeError(t *testing.T) {
s, cfg, sec, _, iss, err := setupHydraTest(true)
if err != nil {
t.Fatalf("setupHydraTest() failed: %v", err)
}
clientName := "test_client2"
cli := cfg.Clients[clientName]
resp := damSendTestRequest(t, http.MethodGet, syncClientsPath, clientName, "master", "", c... | explode_data.jsonl/18513 | {
"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,
12154,
47174,
1098,
2417,
1454,
1155,
353,
8840,
836,
8,
341,
1903,
11,
13286,
11,
5701,
11,
8358,
2369,
11,
1848,
1669,
6505,
30816,
22248,
2271,
3715,
340,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
15188,
30816,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Test3colorize(t *testing.T) {
lw := newCheckDisplay()
p := NewLineTransformerANSI(lw, "off")
s := "msg:de"
assert.Equal(t, s, p.colorize(s))
} | explode_data.jsonl/7196 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 68
} | [
2830,
3393,
18,
3423,
551,
1155,
353,
8840,
836,
8,
341,
8810,
86,
1669,
501,
3973,
7020,
741,
3223,
1669,
1532,
2460,
46358,
11692,
40,
2333,
86,
11,
330,
1847,
1138,
1903,
1669,
330,
3236,
25,
450,
698,
6948,
12808,
1155,
11,
274,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func Test_reconcileForK8sNode(t *testing.T) {
t.Run("CSIBMNode was created and annotation was set", func(t *testing.T) {
var (
c = setup(t)
k8sNode = testNode1.DeepCopy()
)
createObjects(t, c.k8sClient, k8sNode)
res, err := c.reconcileForK8sNode(k8sNode)
assert.Nil(t, err)
assert.Equal(t, ctr... | explode_data.jsonl/50958 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1323
} | [
2830,
3393,
1288,
40446,
457,
2461,
42,
23,
82,
1955,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
6412,
67738,
1955,
572,
3465,
323,
21223,
572,
738,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
2405,
2399,
298,
1444,
981,
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 TestSingerX509(t *testing.T) {
cert, err := signHost(&GoproxyCa, []string{"example.com", "1.1.1.1", "localhost"})
orFatal("singHost", err, t)
cert.Leaf, err = x509.ParseCertificate(cert.Certificate[0])
orFatal("ParseCertificate", err, t)
certpool := x509.NewCertPool()
certpool.AddCert(GoproxyCa.Leaf)
orFata... | explode_data.jsonl/80665 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 248
} | [
2830,
3393,
50,
5137,
55,
20,
15,
24,
1155,
353,
8840,
836,
8,
341,
1444,
529,
11,
1848,
1669,
1841,
9296,
2099,
38,
45926,
4130,
22571,
11,
3056,
917,
4913,
8687,
905,
497,
330,
16,
13,
16,
13,
16,
13,
16,
497,
330,
8301,
23625... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWatchQueryChannel_ClearEtcdInfoAfterAssignedNodeDown(t *testing.T) {
baseCtx := context.Background()
queryCoord, err := startQueryCoord(baseCtx)
assert.Nil(t, err)
activeTaskIDKeys, _, err := queryCoord.scheduler.client.LoadWithPrefix(activeTaskPrefix)
assert.Nil(t, err)
queryNode, err := startQueryNodeS... | explode_data.jsonl/61477 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 569
} | [
2830,
3393,
14247,
2859,
9629,
57744,
31860,
4385,
1731,
6025,
94025,
1955,
4454,
1155,
353,
8840,
836,
8,
341,
24195,
23684,
1669,
2266,
19047,
741,
27274,
19437,
11,
1848,
1669,
1191,
2859,
19437,
12663,
23684,
340,
6948,
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... | 4 |
func TestCreateSchemaWithPlacement(t *testing.T) {
store, dom, clean := testkit.CreateMockStoreAndDomain(t)
defer clean()
tk := testkit.NewTestKit(t, store)
tk.MustExec("drop schema if exists SchemaPolicyPlacementTest")
defer func() {
tk.MustExec("drop schema if exists SchemaPolicyPlacementTest")
tk.MustExec("... | explode_data.jsonl/77384 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1473
} | [
2830,
3393,
4021,
8632,
2354,
28237,
1155,
353,
8840,
836,
8,
341,
57279,
11,
4719,
11,
4240,
1669,
1273,
8226,
7251,
11571,
6093,
3036,
13636,
1155,
340,
16867,
4240,
741,
3244,
74,
1669,
1273,
8226,
7121,
2271,
7695,
1155,
11,
3553,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestSlugExecutor(t *testing.T) {
tests := []struct {
name string
mockDb NotificationLoader
expectedResult contract.Notification
expectedError bool
}{
{
name: "Successful database call",
mockDb: createMockNotificiationLoaderStringArg("GetNotificationBySlug", ni... | explode_data.jsonl/31055 | {
"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,
54968,
25255,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
1843,
914,
198,
197,
77333,
7994,
260,
16571,
9181,
198,
197,
42400,
2077,
5116,
49329,
198,
197,
42400,
1454,
220,
1807,
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... | 6 |
func TestParseStmtsStopAt(t *testing.T) {
t.Parallel()
for i, c := range stopAtTests {
p := NewParser(StopAt(c.stop))
want := fullProg(c.want)
t.Run(fmt.Sprintf("%02d", i), singleParse(p, c.in, want))
}
} | explode_data.jsonl/31443 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 101
} | [
2830,
3393,
14463,
31063,
82,
10674,
1655,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
2023,
600,
11,
272,
1669,
2088,
2936,
1655,
18200,
341,
197,
3223,
1669,
1532,
6570,
7,
10674,
1655,
1337,
13227,
1171,
197,
50780,
1669,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestFilteredByExistingSuffix(t *testing.T) {
name := "carotte"
ghLabel := &github.Label{
Name: &name,
}
prefixes := []string{"otte", "cour"}
assert.True(t, FilteredBy(HasSuffix, prefixes)(ghLabel))
} | explode_data.jsonl/16584 | {
"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,
67310,
1359,
53067,
40177,
1155,
353,
8840,
836,
8,
341,
11609,
1669,
330,
6918,
50011,
698,
197,
866,
2476,
1669,
609,
5204,
4679,
515,
197,
21297,
25,
609,
606,
345,
197,
630,
3223,
5060,
288,
1669,
3056,
917,
4913,
5001... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestService_Handle_Invitee(t *testing.T) {
protocolStateStore := mockstorage.NewMockStoreProvider()
store := mockstorage.NewMockStoreProvider()
k := newKMS(t, store)
prov := &protocol.MockProvider{
StoreProvider: store,
ProtocolStateStoreProvider: protocolStateStore,
ServiceMap: map[string]i... | explode_data.jsonl/30517 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1518
} | [
2830,
3393,
1860,
42714,
62,
93540,
68,
1155,
353,
8840,
836,
8,
341,
197,
17014,
1397,
6093,
1669,
7860,
16172,
7121,
11571,
6093,
5179,
741,
57279,
1669,
7860,
16172,
7121,
11571,
6093,
5179,
741,
16463,
1669,
501,
42,
4826,
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 Test_perDecodeRicReportStyleItem(t *testing.T) {
ricReportStyleItem := createRicReportStyleItem()
per, err := perEncodeRicReportStyleItem(ricReportStyleItem)
assert.NilError(t, err)
assert.Equal(t, 16, len(per))
t.Logf("RIC-ReportStyle-List PER\n%s", string(per))
result, err := perDecodeRicReportStyleItem... | explode_data.jsonl/70475 | {
"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,
5678,
32564,
49,
292,
10361,
2323,
1234,
1155,
353,
8840,
836,
8,
1476,
197,
2216,
10361,
2323,
1234,
1669,
1855,
49,
292,
10361,
2323,
1234,
2822,
197,
712,
11,
1848,
1669,
817,
32535,
49,
292,
10361,
2323,
1234,
7,
2216,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestChannelSignedAckRegression(t *testing.T) {
t.Parallel()
// Create test channels to test out this state transition.
aliceChannel, bobChannel, cleanUp, err := CreateTestChannels(
channeldb.SingleFunderTweaklessBit,
)
require.NoError(t, err)
defer cleanUp()
// Create an HTLC that Bob will send to Alice... | explode_data.jsonl/72521 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1179
} | [
2830,
3393,
9629,
49312,
55559,
45200,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
197,
322,
4230,
1273,
11744,
311,
1273,
700,
419,
1584,
9142,
624,
197,
63195,
9629,
11,
35192,
9629,
11,
4240,
2324,
11,
1848,
1669,
4230,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCheckCommitTxSize(t *testing.T) {
t.Parallel()
checkSize := func(channel *LightningChannel, count int) {
// Due to variable size of the signatures (70-73) in
// witness script actual size of commitment transaction might
// be lower on 6 weight.
BaseCommitmentTxSizeEstimationError := 6
commitTx, e... | explode_data.jsonl/28251 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 892
} | [
2830,
3393,
3973,
33441,
31584,
1695,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
25157,
1695,
1669,
2915,
25923,
353,
13911,
1229,
9629,
11,
1760,
526,
8,
341,
197,
197,
322,
23662,
311,
3890,
1379,
315,
279,
32628,
320,
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... | 4 |
func TestConstIssue800(t *testing.T) {
gopClTest(t, `
const (
h0_0, h0_1 = 1.0 / (iota + 1), 1.0 / (iota + 2)
h1_0, h1_1
)
`, `package main
const (
h0_0, h0_1 = 1.0 / (iota + 1), 1.0 / (iota + 2)
h1_0, h1_1
)
`)
} | explode_data.jsonl/73584 | {
"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,
19167,
42006,
23,
15,
15,
1155,
353,
8840,
836,
8,
341,
3174,
453,
5066,
2271,
1155,
11,
22074,
1024,
2399,
9598,
15,
62,
15,
11,
305,
15,
62,
16,
284,
220,
16,
13,
15,
608,
320,
72,
6089,
488,
220,
16,
701,
220,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestDistributor(t *testing.T) {
channelID := "test"
g := &gossipMock{
Mock: mock.Mock{},
PeerSignature: api.PeerSignature{
Signature: []byte{3, 4, 5},
Message: []byte{6, 7, 8},
PeerIdentity: []byte{0, 1, 2},
},
}
sendings := make(chan struct {
*proto.PrivatePayload
gossip2.SendCrite... | explode_data.jsonl/3143 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2091
} | [
2830,
3393,
35,
78388,
1155,
353,
8840,
836,
8,
341,
71550,
915,
1669,
330,
1944,
1837,
3174,
1669,
609,
70,
41473,
11571,
515,
197,
9209,
1176,
25,
7860,
24664,
38837,
197,
10025,
34756,
25088,
25,
6330,
1069,
34756,
25088,
515,
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... | 1 |
func TestAbsCollection_Merge(t *testing.T) {
intColl := NewIntCollection([]int{1, 2})
intColl2 := NewIntCollection([]int{3, 4})
intColl.Merge(intColl2)
if intColl.Err() != nil {
t.Fatal(intColl.Err())
}
if intColl.Count() != 4 {
t.Fatal("Merge 错误")
}
} | explode_data.jsonl/66437 | {
"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,
27778,
6482,
1245,
10080,
1155,
353,
8840,
836,
8,
341,
2084,
15265,
1669,
1532,
1072,
6482,
10556,
396,
90,
16,
11,
220,
17,
8824,
2084,
15265,
17,
1669,
1532,
1072,
6482,
10556,
396,
90,
18,
11,
220,
19,
8824,
2084,
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 TestServiceCreateFromYAMLWithOverride(t *testing.T) {
tempDir, err := ioutil.TempDir("", "kn-file")
defer os.RemoveAll(tempDir)
assert.NilError(t, err)
tempFile := filepath.Join(tempDir, "service.yaml")
err = ioutil.WriteFile(tempFile, []byte(serviceYAML), os.FileMode(0666))
assert.NilError(t, err)
// Merg... | explode_data.jsonl/42465 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 967
} | [
2830,
3393,
1860,
4021,
3830,
56,
31102,
2354,
2177,
1155,
353,
8840,
836,
8,
341,
16280,
6184,
11,
1848,
1669,
43144,
65009,
6184,
19814,
330,
19095,
14203,
1138,
16867,
2643,
84427,
9758,
6184,
340,
6948,
59678,
1454,
1155,
11,
1848,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestIsChildOf(t *testing.T) {
require := require.New(t)
table := []struct {
child string
parent string
expected bool
}{
{"example", "example.com", false},
{"example.com", "example.com", true},
{"example.com", "example2.com", false},
{"example.com", "com", true},
{"example.net", "com", fals... | explode_data.jsonl/47254 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 412
} | [
2830,
3393,
3872,
3652,
2124,
1155,
353,
8840,
836,
8,
341,
17957,
1669,
1373,
7121,
1155,
692,
26481,
1669,
3056,
1235,
341,
197,
58391,
262,
914,
198,
197,
24804,
256,
914,
198,
197,
42400,
1807,
198,
197,
59403,
197,
197,
4913,
868... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestControllerExpandVolume(t *testing.T) {
testCases := []struct {
name string
req *csi.ControllerExpandVolumeRequest
newSize int64
expResp *csi.ControllerExpandVolumeResponse
expError bool
}{
{
name: "success normal",
req: &csi.ControllerExpandVolumeRequest{
VolumeId: "vol-test"... | explode_data.jsonl/61525 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 967
} | [
2830,
3393,
2051,
38946,
18902,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
24395,
414,
353,
63229,
29112,
38946,
18902,
1900,
198,
197,
8638,
1695,
220,
526,
21,
19,
198,
197,
48... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestArgumentsExtra(t *testing.T) {
const SCRIPT = `
function F(x, y) {
return arguments[2];
}
F(1, 2, 42)
`
testScript1(SCRIPT, intToValue(42), t)
} | explode_data.jsonl/75272 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 73
} | [
2830,
3393,
19139,
11612,
1155,
353,
8840,
836,
8,
341,
4777,
53679,
284,
22074,
7527,
434,
2075,
11,
379,
8,
341,
197,
853,
5977,
58,
17,
935,
197,
630,
12727,
7,
16,
11,
220,
17,
11,
220,
19,
17,
340,
197,
19324,
18185,
5910,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEachFullIterationExpectCountOfAllTypes(t *testing.T) {
tree := NewArtTree()
file, err := os.Open("test/assets/words.txt")
if err != nil {
t.Error("Couldn't open words.txt")
}
defer file.Close()
reader := bufio.NewReader(file)
for {
if line, err := reader.ReadBytes('\n'); err != nil {
break
... | explode_data.jsonl/43967 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 467
} | [
2830,
3393,
4854,
9432,
53101,
17536,
2507,
2124,
2403,
4173,
1155,
353,
8840,
836,
8,
341,
51968,
1669,
1532,
9286,
6533,
2822,
17661,
11,
1848,
1669,
2643,
12953,
445,
1944,
21442,
14,
5761,
3909,
1138,
743,
1848,
961,
2092,
341,
197,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func TestAddDuplicateCreditAfterConfirm(t *testing.T) {
store, db, teardown, err := testStore()
if err != nil {
t.Fatal(err)
}
defer teardown()
// In order to reproduce real-world scenarios, we'll use a new database
// transaction for each interaction with the wallet.
//
// We'll start off the test by creati... | explode_data.jsonl/48548 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1524
} | [
2830,
3393,
2212,
53979,
33493,
6025,
16728,
1155,
353,
8840,
836,
8,
341,
57279,
11,
2927,
11,
49304,
11,
1848,
1669,
1273,
6093,
741,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
532,
16867,
49304,
2822,
197,
322,
75... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIntegrationDNSLookupGood(t *testing.T) {
ctx := context.Background()
results := DNSLookup(ctx, DNSLookupConfig{
Hostname: "ooni.io",
})
if results.Error != nil {
t.Fatal(results.Error)
}
if len(results.Addresses) < 1 {
t.Fatal("no addresses returned?!")
}
} | explode_data.jsonl/53530 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 110
} | [
2830,
3393,
52464,
61088,
34247,
15216,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
55497,
1669,
27598,
34247,
7502,
11,
27598,
34247,
2648,
515,
197,
197,
88839,
25,
330,
9009,
72,
4245,
756,
197,
3518,
743,
3059,
6141... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetNodes(t *testing.T) {
mockServer := NewMockHttpServer(200, SuccessGetNodesContent)
defer mockServer.Close()
mockHttpClient := NewMockHttpClient(mockServer.URL)
client := NewRookNetworkRestClient(mockServer.URL, mockHttpClient)
// invoke the GetNodes method that will use our mock http client/server to ... | explode_data.jsonl/27839 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 310
} | [
2830,
3393,
1949,
12288,
1155,
353,
8840,
836,
8,
341,
77333,
5475,
1669,
1532,
11571,
2905,
5475,
7,
17,
15,
15,
11,
13047,
1949,
12288,
2762,
340,
16867,
7860,
5475,
10421,
741,
77333,
26316,
1669,
1532,
11571,
26316,
30389,
5475,
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... | 3 |
func TestExpandDataSourcePodAffinityTerm(t *testing.T) {
_default := core.PodAffinityTerm{}
type args struct {
in map[string]interface{}
}
tests := []struct {
name string
args args
want core.PodAffinityTerm
}{
{
name: "default",
args: args{
in: map[string]interface{}{
"label_selector": ... | explode_data.jsonl/53682 | {
"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,
38946,
17173,
23527,
25841,
13489,
17249,
1155,
353,
8840,
836,
8,
341,
197,
9993,
1669,
6200,
88823,
25841,
13489,
17249,
16094,
13158,
2827,
2036,
341,
197,
17430,
2415,
14032,
31344,
16094,
197,
532,
78216,
1669,
3056,
1235,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestServerFlushAndHijack(t *testing.T) {
defer afterTest(t)
ts := httptest.NewServer(HandlerFunc(func(w ResponseWriter, r *Request) {
io.WriteString(w, "Hello, ")
w.(Flusher).Flush()
conn, buf, _ := w.(Hijacker).Hijack()
buf.WriteString("6\r\nworld!\r\n0\r\n\r\n")
if err := buf.Flush(); err != nil {
... | explode_data.jsonl/22478 | {
"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,
5475,
46874,
3036,
39,
3172,
473,
1155,
353,
8840,
836,
8,
341,
16867,
1283,
2271,
1155,
340,
57441,
1669,
54320,
70334,
7121,
5475,
7,
3050,
9626,
18552,
3622,
5949,
6492,
11,
435,
353,
1900,
8,
341,
197,
53112,
44747,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestListPackagesBuildInfo(t *testing.T) {
withTestProcess("pkgrenames", t, func(p *proc.Target, fixture protest.Fixture) {
pkgs := p.BinInfo().ListPackagesBuildInfo(true)
t.Logf("returned %d", len(pkgs))
if len(pkgs) < 10 {
t.Errorf("very few packages returned")
}
for _, pkg := range pkgs {
t.Logf... | explode_data.jsonl/56340 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 293
} | [
2830,
3393,
852,
69513,
11066,
1731,
1155,
353,
8840,
836,
8,
341,
46948,
2271,
7423,
445,
30069,
1440,
971,
497,
259,
11,
2915,
1295,
353,
15782,
35016,
11,
12507,
8665,
991,
12735,
8,
341,
197,
3223,
74,
5857,
1669,
281,
1785,
258,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIssuingTransactionGet(t *testing.T) {
transaction, err := Get("iauth_123", nil)
assert.Nil(t, err)
assert.NotNil(t, transaction)
assert.Equal(t, "issuing.transaction", transaction.Object)
} | explode_data.jsonl/7505 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 75
} | [
2830,
3393,
28216,
7471,
8070,
1949,
1155,
353,
8840,
836,
8,
341,
197,
13528,
11,
1848,
1669,
2126,
445,
685,
940,
62,
16,
17,
18,
497,
2092,
340,
6948,
59678,
1155,
11,
1848,
340,
6948,
93882,
1155,
11,
7745,
340,
6948,
12808,
115... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAreaCode(t *testing.T) {
Seed(0)
//fmt.Println(getRandomNumber(globalFaker.Rand))
//fmt.Println(getGenderNumber(globalFaker.Rand, "男"))
//fmt.Println(getRanderGender(globalFaker.Rand))
for i := 0; i < 100; i++ {
fmt.Println(IdCard())
//fmt.Println(BirthDay())
//fmt.Println(GenderNumber())
}
} | explode_data.jsonl/16752 | {
"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,
8726,
2078,
1155,
353,
8840,
836,
8,
341,
197,
41471,
7,
15,
340,
197,
322,
12501,
12419,
5433,
13999,
2833,
31951,
37,
4407,
2013,
437,
1171,
197,
322,
12501,
12419,
5433,
28914,
2833,
31951,
37,
4407,
2013,
437,
11,
330,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestNilSchemaResolvers(t *testing.T) {
ctx := logger.WithLogger(broker.NewBackground())
resolvers := SchemaResolvers{nil}
_, err := resolvers.Resolve(ctx)
if err != nil {
t.Fatal(err)
}
} | explode_data.jsonl/2212 | {
"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,
19064,
8632,
1061,
39435,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
5925,
26124,
7395,
1883,
45985,
7121,
8706,
2398,
10202,
39435,
1669,
12539,
1061,
39435,
90,
8385,
532,
197,
6878,
1848,
1669,
592,
39435,
57875,
7502,
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
] | 2 |
func TestInsufficientCapacityNodeSufficientCapacityWithNodeLabelDaemonLaunchPod(t *testing.T) {
podSpec := resourcePodSpecWithoutNodeName("50M", "75m")
ds := newDaemonSet("foo")
ds.Spec.Template.Spec = podSpec
ds.Spec.Template.Spec.NodeSelector = simpleNodeLabel
manager, podControl, _, err := newTestController(ds)... | explode_data.jsonl/50312 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 349
} | [
2830,
3393,
15474,
26683,
29392,
1955,
50,
26683,
29392,
2354,
1955,
2476,
89177,
32067,
23527,
1155,
353,
8840,
836,
8,
341,
3223,
347,
8327,
1669,
5101,
23527,
8327,
26040,
1955,
675,
445,
20,
15,
44,
497,
330,
22,
20,
76,
1138,
833... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestKubernetesCacheRemove(t *testing.T) {
cache := func(objs ...interface{}) *KubernetesCache {
cache := KubernetesCache{
FieldLogger: testLogger(t),
}
for _, o := range objs {
cache.Insert(o)
}
return &cache
}
tests := map[string]struct {
cache *KubernetesCache
obj interface{}
want bo... | explode_data.jsonl/62180 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1992
} | [
2830,
3393,
42,
29827,
8233,
13021,
1155,
353,
8840,
836,
8,
341,
52680,
1669,
2915,
6779,
82,
2503,
4970,
28875,
353,
42,
29827,
8233,
341,
197,
52680,
1669,
66374,
8233,
515,
298,
94478,
7395,
25,
1273,
7395,
1155,
1326,
197,
197,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func Test_New(t *testing.T) {
t.Parallel()
a := assert.New(t)
p := provider()
a.Equal(p.ClientKey, os.Getenv("UBER_KEY"))
a.Equal(p.Secret, os.Getenv("UBER_SECRET"))
a.Equal(p.CallbackURL, "/foo")
} | explode_data.jsonl/36581 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 96
} | [
2830,
3393,
39582,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
11323,
1669,
2060,
7121,
1155,
340,
3223,
1669,
9109,
2822,
11323,
12808,
1295,
11716,
1592,
11,
2643,
64883,
445,
4493,
640,
6600,
5455,
11323,
12808,
1295,
74779,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWrappedStreamEncoding(t *testing.T) {
encoding := NewWrappedStreamEncoding(JSONEncoding, NewChainByteStreamEncoding(GzipEncoding, Base64StdEncoding))
testBasicEncoding(t, NewValueEncoding(encoding))
} | explode_data.jsonl/69079 | {
"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,
67795,
3027,
14690,
1155,
353,
8840,
836,
8,
341,
197,
17159,
1669,
1532,
67795,
3027,
14690,
19129,
14690,
11,
1532,
18837,
7153,
3027,
14690,
6699,
9964,
14690,
11,
5351,
21,
19,
22748,
14690,
1171,
18185,
15944,
14690,
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 |
func TestPEXReactorDialPeer(t *testing.T) {
pexR, book := createReactor(&PEXReactorConfig{})
defer teardownReactor(book)
sw := createSwitchAndAddReactors(pexR)
sw.SetAddrBook(book)
peer := newMockPeer()
addr := peer.NodeInfo().NetAddress()
assert.Equal(t, 0, pexR.AttemptsToDial(addr))
// 1st unsuccessful at... | explode_data.jsonl/6132 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 273
} | [
2830,
3393,
1740,
55,
693,
5621,
35,
530,
30888,
1155,
353,
8840,
836,
8,
341,
3223,
327,
49,
11,
2311,
1669,
1855,
693,
5621,
2099,
1740,
55,
693,
5621,
2648,
37790,
16867,
49304,
693,
5621,
33130,
692,
77295,
1669,
1855,
16837,
3036... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCancel(t *testing.T) {
controller := gomock.NewController(t)
defer controller.Finish()
mockStages := []*core.Stage{
{Status: core.StatusPassing},
{
Status: core.StatusPending,
Steps: []*core.Step{
{Status: core.StatusPassing},
{Status: core.StatusPending},
},
},
}
mockBuildCopy :=... | explode_data.jsonl/31279 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 659
} | [
2830,
3393,
9269,
1155,
353,
8840,
836,
8,
341,
61615,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
6461,
991,
18176,
2822,
77333,
623,
1134,
1669,
29838,
2153,
69873,
515,
197,
197,
90,
2522,
25,
6200,
10538,
12187,
287,
1583,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func Test_Sku_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) {
t.Parallel()
parameters := gopter.DefaultTestParameters()
parameters.MaxSize = 10
properties := gopter.NewProperties(parameters)
properties.Property(
"Round trip from Sku to Sku via AssignPropertiesToSku & AssignPropertiesFromSku returns... | explode_data.jsonl/44560 | {
"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,
1098,
12133,
62,
4498,
7903,
61941,
2568,
795,
21884,
1690,
26040,
39838,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
67543,
1669,
728,
73137,
13275,
2271,
9706,
741,
67543,
14535,
1695,
284,
220,
16,
15,
198,
8692... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestServiceUpdate(t *testing.T) {
client := newFakeClient()
s, err := NewSubscriber(client, path, newFactory(""), logger)
if err != nil {
t.Fatalf("failed to create new Subscriber: %v", err)
}
defer s.Stop()
endpoints, err := s.Endpoints()
if err != nil {
t.Fatal(err)
}
if want, have := 0, len(endpo... | explode_data.jsonl/63599 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 505
} | [
2830,
3393,
1860,
4289,
1155,
353,
8840,
836,
8,
341,
25291,
1669,
501,
52317,
2959,
2822,
1903,
11,
1848,
1669,
1532,
40236,
12805,
11,
1815,
11,
501,
4153,
86076,
5925,
340,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
16091,
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... | 7 |
func TestHandlers_ReadChannel(t *testing.T) {
t.Parallel()
path := "/api/v3/users/me/unread/{channelId}"
env := Setup(t, common1)
user := env.CreateUser(t, rand)
ch := env.CreateChannel(t, rand)
m := env.CreateMessage(t, user.GetID(), ch.ID, rand)
env.MakeMessageUnread(t, user.GetID(), m.GetID())
s := env.S(t,... | explode_data.jsonl/40147 | {
"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,
39949,
38381,
9629,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
26781,
1669,
3521,
2068,
5457,
18,
19178,
50899,
35217,
878,
9388,
10119,
764,
11195,
57538,
1669,
18626,
1155,
11,
4185,
16,
340,
19060,
1669,
6105,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParseExplainText(t *testing.T) {
for _, content := range exp {
pretty.Println(RemoveSQLComments(content))
pretty.Println(ParseExplainText(content))
}
/*
//length := len(exp)
pretty.Println(string(RemoveSQLComments([]byte(exp[9]))))
explainInfo, err := ParseExplainText(exp[9])
pretty.Println(expl... | explode_data.jsonl/55045 | {
"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,
14463,
840,
20772,
1178,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
2213,
1669,
2088,
1343,
341,
197,
197,
32955,
12419,
2785,
336,
994,
6688,
17373,
15063,
1171,
197,
197,
32955,
12419,
71812,
840,
20772,
1178,
15063,
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... | 2 |
func TestObsoletingInvites1(t *testing.T) {
// This chain has 3 keybase invites total:
// 1) 579651b0d574971040b531b66efbc519%1
// 2) 618d663af0f1ec88a5a19defa65a2f19%1
// 3) 40903c59d19feef1d67c455499304c19%1
//
// 1 gets obsoleted by "change_membership" link that adds the same
// person but does not complete t... | explode_data.jsonl/12250 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 750
} | [
2830,
3393,
4121,
704,
35935,
15174,
3611,
16,
1155,
353,
8840,
836,
8,
341,
197,
322,
1096,
8781,
702,
220,
18,
1376,
3152,
44410,
2790,
510,
197,
322,
220,
16,
8,
220,
20,
22,
24,
21,
20,
16,
65,
15,
67,
20,
22,
19,
24,
22,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestTransactionMissingNonce(t *testing.T) {
t.Parallel()
pool, key := setupTxPool()
defer pool.Stop()
addr := crypto.PubkeyToAddress(key.PublicKey)
pool.currentState.AddBalance(addr, big.NewInt(100000000000000))
tx := transaction(1, 100000, key)
if _, err := pool.add(tx, false); err != nil {
t.Error("di... | explode_data.jsonl/7861 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 239
} | [
2830,
3393,
8070,
25080,
90528,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
85273,
11,
1376,
1669,
6505,
31584,
10551,
741,
16867,
7314,
30213,
2822,
53183,
1669,
19028,
1069,
392,
792,
1249,
4286,
4857,
49139,
1592,
340,
85273... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestJSONDiff(t *testing.T) {
s1 := diffType{
D1: 23,
D2: 42,
N1: "miliao",
Dt: diffType2{
D3: 230,
D4: 420,
N2: "miliao2",
},
}
s2 := diffType{
D1: 23,
D2: 42,
N1: "miliao",
Dt: diffType2{
D3: 230,
D4: 420,
N2: "miliao2",
},
}
s3 := diffType{
D1: 23,
D2: 42,
N1: "... | explode_data.jsonl/59909 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1000
} | [
2830,
3393,
5370,
21751,
1155,
353,
8840,
836,
8,
341,
1903,
16,
1669,
3638,
929,
515,
197,
10957,
16,
25,
220,
17,
18,
345,
197,
10957,
17,
25,
220,
19,
17,
345,
197,
18317,
16,
25,
330,
72270,
22516,
756,
197,
10957,
83,
25,
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 TestDeleteExperiment_CrdFailure(t *testing.T) {
store, manager, experiment := initWithExperiment(t)
defer store.Close()
manager.argoClient = client.NewFakeArgoClientWithBadWorkflow()
err := manager.DeleteExperiment(experiment.UUID)
assert.Nil(t, err)
} | explode_data.jsonl/77025 | {
"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,
6435,
77780,
920,
6498,
17507,
1155,
353,
8840,
836,
8,
341,
57279,
11,
6645,
11,
9342,
1669,
13864,
77780,
1155,
340,
16867,
3553,
10421,
2822,
92272,
13,
12088,
2959,
284,
2943,
7121,
52317,
2735,
78,
2959,
2354,
17082,
62... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConcurrency(t *testing.T) {
doConcurrentTest(t, new(concurrentDBQueryTest))
doConcurrentTest(t, new(concurrentDBExecTest))
doConcurrentTest(t, new(concurrentStmtQueryTest))
doConcurrentTest(t, new(concurrentStmtExecTest))
doConcurrentTest(t, new(concurrentTxQueryTest))
doConcurrentTest(t, new(concurrentT... | explode_data.jsonl/52830 | {
"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,
79611,
1155,
353,
8840,
836,
8,
341,
19935,
1109,
3231,
2271,
1155,
11,
501,
17868,
3231,
3506,
2859,
2271,
1171,
19935,
1109,
3231,
2271,
1155,
11,
501,
17868,
3231,
3506,
10216,
2271,
1171,
19935,
1109,
3231,
2271,
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... | 1 |
func TestSparseMerge(t *testing.T) {
gen := rand.New(rand.NewSource(time.Now().UnixNano()))
for i := 0; i < 1000; i++ {
v1 := intToBytes(gen.Uint64())
v2 := intToBytes(gen.Uint64())
h := New()
h.Add(v1)
h.Add(v2)
other := New()
other.Add(v1)
h.flushTmpSet()
h.Merge(other)
if h.Count() != 2 {
... | explode_data.jsonl/49453 | {
"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,
98491,
52096,
1155,
353,
8840,
836,
8,
341,
82281,
1669,
10382,
7121,
37595,
7121,
3608,
9730,
13244,
1005,
55832,
83819,
49962,
2023,
600,
1669,
220,
15,
26,
600,
366,
220,
16,
15,
15,
15,
26,
600,
1027,
341,
197,
5195,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestResembles(t *testing.T) {
a := assertions.New(t)
a.So(errors.Resemble(nil, nil), should.BeTrue)
defInvalidArgument := errors.DefineInvalidArgument("test_resembles_invalid_argument", "invalid argument")
// Nil errors never resemble.
a.So(errors.Resemble(defInvalidArgument, nil), should.BeFalse)
a.So(er... | explode_data.jsonl/74150 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 593
} | [
2830,
3393,
1061,
8858,
642,
1155,
353,
8840,
836,
8,
341,
11323,
1669,
54836,
7121,
1155,
692,
11323,
46387,
38881,
8377,
91629,
27907,
11,
2092,
701,
1265,
70923,
2514,
692,
7452,
7928,
9171,
1669,
5975,
49947,
482,
7928,
9171,
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 TestCCFramework(t *testing.T) {
//register 2 channels
chainID := "mockchainid"
chainID2 := "secondchain"
peerInstance, chaincodeSupport, cleanup, err := initMockPeer(chainID, chainID2)
if err != nil {
t.Fatalf("%s", err)
}
defer cleanup()
defer finitMockPeer(peerInstance, chainID, chainID2)
//create a c... | explode_data.jsonl/58390 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 603
} | [
2830,
3393,
3706,
14837,
1155,
353,
8840,
836,
8,
341,
197,
322,
6343,
220,
17,
11744,
198,
197,
8819,
915,
1669,
330,
16712,
8819,
307,
698,
197,
8819,
915,
17,
1669,
330,
5569,
8819,
698,
197,
16537,
2523,
11,
8781,
1851,
7916,
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... | 4 |
func TestIsValidPercent(t *testing.T) {
goodValues := []string{
"0%",
"00000%",
"1%",
"01%",
"99%",
"100%",
"101%",
}
for _, val := range goodValues {
if msgs := IsValidPercent(val); len(msgs) != 0 {
t.Errorf("expected true for %q: %v", val, msgs)
}
}
badValues := []string{
"",
"0",
"10... | explode_data.jsonl/11828 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 282
} | [
2830,
3393,
55470,
32010,
1155,
353,
8840,
836,
8,
341,
3174,
1386,
6227,
1669,
3056,
917,
515,
197,
197,
1,
15,
20862,
197,
197,
1,
15,
15,
15,
15,
15,
20862,
197,
197,
1,
16,
20862,
197,
197,
1,
15,
16,
20862,
197,
197,
1,
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... | 5 |
func TestReplaceEdgeRevision(t *testing.T) {
var ctx context.Context
c := createClientFromEnv(t, true)
db := ensureDatabase(ctx, c, "edge_test", nil, t)
prefix := "replace_edge_revision_"
g := ensureGraph(ctx, db, prefix+"graph", nil, t)
ec := ensureEdgeCollection(ctx, g, prefix+"citiesPerState", []string{prefix ... | explode_data.jsonl/26405 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 700
} | [
2830,
3393,
23107,
11656,
33602,
1155,
353,
8840,
836,
8,
341,
2405,
5635,
2266,
9328,
198,
1444,
1669,
1855,
2959,
3830,
14359,
1155,
11,
830,
340,
20939,
1669,
5978,
5988,
7502,
11,
272,
11,
330,
7186,
4452,
497,
2092,
11,
259,
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... | 6 |
func TestDecodeInvalid(t *testing.T) {
examples := []string{
"invalid stuff",
// no sha
"# git-media",
// bad oid
`version https://git-lfs.github.com/spec/v1
oid sha256:boom
size 12345`,
// bad oid type
`version https://git-lfs.github.com/spec/v1
oid shazam:4d7a214614ab2935c943f9e0ff69d22eadbb8f32b125... | explode_data.jsonl/50441 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1545
} | [
2830,
3393,
32564,
7928,
1155,
353,
8840,
836,
8,
341,
8122,
4023,
1669,
3056,
917,
515,
197,
197,
1,
11808,
6259,
25897,
197,
197,
322,
902,
15870,
198,
197,
197,
57676,
16345,
41262,
25897,
197,
197,
322,
3873,
48766,
198,
197,
197,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestToValueNil(t *testing.T) {
type T struct{}
var a *T
vm := New()
if v := vm.ToValue(nil); !IsNull(v) {
t.Fatalf("nil: %v", v)
}
if v := vm.ToValue(a); !IsNull(v) {
t.Fatalf("struct ptr: %v", v)
}
var m map[string]interface{}
if v := vm.ToValue(m); !IsNull(v) {
t.Fatalf("map[string]interface{}:... | explode_data.jsonl/10482 | {
"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,
1249,
1130,
19064,
1155,
353,
8840,
836,
8,
341,
13158,
350,
2036,
16094,
2405,
264,
353,
51,
198,
54879,
1669,
1532,
2822,
743,
348,
1669,
10995,
3274,
1130,
27907,
1215,
753,
98593,
3747,
8,
341,
197,
3244,
30762,
445,
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... | 6 |
func TestSlowStartBatch(t *testing.T) {
fakeErr := fmt.Errorf("fake error")
callCnt := 0
callLimit := 0
var lock sync.Mutex
fn := func() error {
lock.Lock()
defer lock.Unlock()
callCnt++
if callCnt > callLimit {
return fakeErr
}
return nil
}
tests := []struct {
name string
count ... | explode_data.jsonl/7991 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 947
} | [
2830,
3393,
58289,
3479,
21074,
1155,
353,
8840,
836,
8,
341,
1166,
726,
7747,
1669,
8879,
13080,
445,
30570,
1465,
1138,
67288,
33747,
1669,
220,
15,
198,
67288,
16527,
1669,
220,
15,
198,
2405,
5296,
12811,
99014,
198,
40095,
1669,
29... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestEntry_CursorColumn_Wrap2(t *testing.T) {
entry := widget.NewMultiLineEntry()
entry.Wrapping = fyne.TextWrapWord
entry.Resize(fyne.NewSize(72, 64))
entry.SetText("1234")
entry.CursorColumn = 3
test.Type(entry, "a")
test.Type(entry, "b")
test.Type(entry, "c")
assert.Equal(t, 0, entry.CursorColumn)
asse... | explode_data.jsonl/12317 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 210
} | [
2830,
3393,
5874,
920,
3823,
2933,
2763,
4611,
17,
1155,
353,
8840,
836,
8,
341,
48344,
1669,
9086,
7121,
20358,
2460,
5874,
741,
48344,
1175,
81,
3629,
284,
51941,
811,
1979,
26787,
10879,
198,
48344,
77707,
955,
81708,
7121,
1695,
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 TestParseContainerNetworkAddresses(t *testing.T) {
ports := []v2.Port{
{
ContainerPort: 80,
Protocol: "tcp",
},
{
ContainerPort: 7000,
Protocol: "udp",
},
}
networks := []v2.Network{
{
NetworkMode: "awsvpc",
IPv4Addresses: []string{"10.0.2.106"},
},
{
NetworkMode: ... | explode_data.jsonl/51433 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 472
} | [
2830,
3393,
14463,
4502,
12320,
52290,
1155,
353,
8840,
836,
8,
341,
197,
3394,
1669,
3056,
85,
17,
43013,
515,
197,
197,
515,
298,
197,
4502,
7084,
25,
220,
23,
15,
345,
298,
197,
20689,
25,
414,
330,
27161,
756,
197,
197,
1583,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConvertQcow2ToRawStream(t *testing.T) {
source, _ := url.Parse("http://localhost:8080/myimage.qcow2")
dest := "/tmp/myimage.qcow2"
runConvertTests(t, "streaming", func() error { return ConvertQcow2ToRawStream(source, dest) })
} | explode_data.jsonl/34486 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 91
} | [
2830,
3393,
12012,
48,
18921,
17,
1249,
20015,
3027,
1155,
353,
8840,
836,
8,
341,
47418,
11,
716,
1669,
2515,
8937,
445,
1254,
1110,
8301,
25,
23,
15,
23,
15,
34198,
1805,
11354,
18921,
17,
1138,
49616,
1669,
3521,
5173,
34198,
1805,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestKubeadmConfigReconciler_Reconcile_DiscoveryReconcileFailureBehaviors(t *testing.T) {
k := &KubeadmConfigReconciler{}
testcases := []struct {
name string
cluster *clusterv1.Cluster
config *bootstrapv1.KubeadmConfig
result ctrl.Result
err error
}{
{
name: "Should requeue if cluster ... | explode_data.jsonl/44326 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 526
} | [
2830,
3393,
42,
392,
3149,
76,
2648,
693,
40446,
5769,
50693,
40446,
457,
45525,
7449,
693,
40446,
457,
17507,
10021,
22176,
1155,
353,
8840,
836,
8,
341,
16463,
1669,
609,
42,
392,
3149,
76,
2648,
693,
40446,
5769,
31483,
18185,
23910,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFileExists(t *testing.T) {
filePath := "/tmp/foo/bar"
rs := FileExists(filePath)
os := runtime.GOOS
if !rs {
t.Log("pass")
} else {
t.Error("net work error")
}
filePath = "/etc/bashrc"
successFlag := true
if os == "windows" {
successFlag = false
}
rs = FileExists(filePath)
if rs == successF... | explode_data.jsonl/30423 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 169
} | [
2830,
3393,
1703,
15575,
1155,
353,
8840,
836,
8,
341,
17661,
1820,
1669,
3521,
5173,
60555,
49513,
698,
41231,
1669,
2887,
15575,
29605,
340,
25078,
1669,
15592,
97574,
3126,
271,
743,
753,
5428,
341,
197,
3244,
5247,
445,
6385,
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... | 4 |
func TestShouldReturnBadRequestWhenBidIdIsMissing(t *testing.T) {
// mock AccountsFetcher
mockAccountsFetcher := &mockAccountsFetcher{}
// mock PBS Analytics Module
mockAnalyticsModule := &eventsMockAnalyticsModule{
Fail: false,
}
// mock config
cfg := &config.Configuration{
AccountDefaults: config.Accoun... | explode_data.jsonl/134 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 302
} | [
2830,
3393,
14996,
5598,
46015,
4498,
65452,
764,
3872,
25080,
1155,
353,
8840,
836,
8,
1476,
197,
322,
7860,
40655,
97492,
198,
77333,
41369,
97492,
1669,
609,
16712,
41369,
97492,
31483,
197,
322,
7860,
59045,
32427,
13711,
198,
77333,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValues(t *testing.T) {
is := assert.New(t)
r1 := Values[string, int](map[string]int{"foo": 1, "bar": 2})
sort.Ints(r1)
is.Equal(r1, []int{1, 2})
} | explode_data.jsonl/52771 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 76
} | [
2830,
3393,
6227,
1155,
353,
8840,
836,
8,
341,
19907,
1669,
2060,
7121,
1155,
692,
7000,
16,
1669,
24979,
14032,
11,
526,
9533,
2186,
14032,
63025,
4913,
7975,
788,
220,
16,
11,
330,
2257,
788,
220,
17,
3518,
39487,
7371,
82,
2601,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMicrositeCreate(t *testing.T) {
setup()
defer teardown()
input := &Microsite{Name: "A Test Microsite"}
addRestHandlerFunc("/assets/microsite", func(w http.ResponseWriter, req *http.Request) {
testMethod(t, req, "POST")
v := new(Microsite)
json.NewDecoder(req.Body).Decode(v)
testModels(t, "Microsi... | explode_data.jsonl/7512 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 268
} | [
2830,
3393,
34609,
9513,
4021,
1155,
353,
8840,
836,
8,
341,
84571,
741,
16867,
49304,
2822,
22427,
1669,
609,
34609,
9513,
63121,
25,
330,
32,
3393,
18157,
9513,
63159,
12718,
12416,
3050,
9626,
4283,
5160,
3183,
2754,
9513,
497,
2915,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestService_GetTemplatesFromCache(t *testing.T) {
stringifiedTemplates := "[{\"name\":\"deployment.yaml\",\"content\":\"kind: Deployment\"}]"
repository := new(repoMock.Repository)
helm := new(helmMock.Helm)
repository.On("Get", "template-stable-app-deploy-v0.0.1").Return(stringifiedTemplates)
svc := service... | explode_data.jsonl/15365 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 221
} | [
2830,
3393,
1860,
13614,
51195,
3830,
8233,
1155,
353,
8840,
836,
8,
341,
11357,
1870,
51195,
1669,
10545,
64238,
606,
23488,
82213,
33406,
34333,
1796,
23488,
15314,
25,
66292,
2105,
25439,
1837,
17200,
3099,
1669,
501,
50608,
11571,
25170... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewMappingRuleViewError(t *testing.T) {
badIndices := []int{-2, 2, 30}
for _, i := range badIndices {
_, err := testMappingRule2.mappingRuleView(i)
require.Equal(t, errMappingRuleSnapshotIndexOutOfRange, err)
}
} | explode_data.jsonl/64587 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 92
} | [
2830,
3393,
3564,
6807,
11337,
851,
1454,
1155,
353,
8840,
836,
8,
341,
2233,
329,
31941,
1669,
3056,
396,
19999,
17,
11,
220,
17,
11,
220,
18,
15,
532,
2023,
8358,
600,
1669,
2088,
3873,
31941,
341,
197,
197,
6878,
1848,
1669,
1273... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.