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 TestHostClientMaxConnsWithDeadline(t *testing.T) {
t.Parallel()
var (
emptyBodyCount uint8
ln = fasthttputil.NewInmemoryListener()
timeout = 200 * time.Millisecond
wg sync.WaitGroup
)
s := &Server{
Handler: func(ctx *RequestCtx) {
if len(ctx.PostBody()) == 0 {
... | explode_data.jsonl/79357 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 763
} | [
2830,
3393,
9296,
2959,
5974,
1109,
4412,
2354,
83593,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
2405,
2399,
197,
197,
3194,
5444,
2507,
2622,
23,
198,
197,
197,
2261,
1797,
284,
4937,
96336,
628,
321,
7121,
641,
17269,
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... | 2 |
func TestTopicNameWithUID(t *testing.T) {
expected := "knative-eventing-channel_gcp_78f8428c-15c3-11e9-9905-42010a80018a"
actual := TopicNameWithUID("_", "gcp", types.UID("78f8428c-15c3-11e9-9905-42010a80018a"))
if expected != actual {
t.Errorf("Expected '%s'. Actual '%s'", expected, actual)
}
} | explode_data.jsonl/15508 | {
"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,
26406,
675,
2354,
6463,
1155,
353,
8840,
836,
8,
341,
42400,
1669,
330,
19095,
1388,
39687,
287,
53868,
1889,
4672,
62,
22,
23,
69,
23,
19,
17,
23,
66,
12,
16,
20,
66,
18,
12,
16,
16,
68,
24,
12,
24,
24,
15,
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... | 2 |
func TestDownloadModule(t *testing.T) {
var (
wantOutput string = "want-output"
wantSubDir string = "want-subdir"
wantErr error = fmt.Errorf("want-error")
wantNoErr error = nil
)
table := []struct {
name string
addr string
dest string
wantOutput string
wantSubDir string
... | explode_data.jsonl/16233 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1382
} | [
2830,
3393,
11377,
3332,
1155,
353,
8840,
836,
8,
1476,
2405,
2399,
197,
50780,
5097,
914,
284,
330,
52657,
59524,
698,
197,
50780,
3136,
6184,
914,
284,
330,
52657,
17967,
3741,
698,
197,
50780,
7747,
262,
1465,
220,
284,
8879,
13080,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestOPA(t *testing.T) {
var tests = []struct {
name string
method string
cacheHit int
cacheMiss int
requestCount int
delay time.Duration
wantRespCode int
}{
{"allow", "GET", 9, 1, 10, 0, 200},
{"deny", "POST", 9, 1, 10, 0, 403},
{"cache_expire", "POST", 2, 2, 4, 4 ... | explode_data.jsonl/19355 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1380
} | [
2830,
3393,
3067,
32,
1155,
353,
8840,
836,
8,
341,
2405,
7032,
284,
3056,
1235,
341,
197,
11609,
260,
914,
198,
197,
42257,
981,
914,
198,
197,
52680,
19498,
257,
526,
198,
197,
52680,
35312,
262,
526,
198,
197,
23555,
2507,
526,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSampleOneOfSize(t *testing.T) {
seed := time.Now().UnixNano()
popr := math_rand.New(math_rand.NewSource(seed))
p := NewPopulatedSampleOneOf(popr, true)
size2 := github_com_gogo_protobuf_proto.Size(p)
dAtA, err := github_com_gogo_protobuf_proto.Marshal(p)
if err != nil {
t.Fatalf("seed = %d, err = %v", ... | explode_data.jsonl/709 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 313
} | [
2830,
3393,
17571,
3966,
44126,
1155,
353,
8840,
836,
8,
341,
197,
22602,
1669,
882,
13244,
1005,
55832,
83819,
741,
3223,
46288,
1669,
6888,
33864,
7121,
37270,
33864,
7121,
3608,
44163,
1171,
3223,
1669,
1532,
11598,
7757,
17571,
3966,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEmptySpanContextAsParent(t *testing.T) {
tracer, tc := NewTracer("x", NewConstSampler(true), NewNullReporter())
defer tc.Close()
span := tracer.StartSpan("test", opentracing.ChildOf(emptyContext))
ctx := span.Context().(SpanContext)
assert.True(t, ctx.traceID.IsValid())
assert.True(t, ctx.IsValid())
} | explode_data.jsonl/44651 | {
"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,
3522,
12485,
1972,
2121,
8387,
1155,
353,
8840,
836,
8,
341,
25583,
9584,
11,
17130,
1669,
1532,
1282,
9584,
445,
87,
497,
1532,
19167,
66048,
3715,
701,
1532,
3280,
52766,
2398,
16867,
17130,
10421,
2822,
197,
1480,
1669,
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 TestFullWindowReceive(t *testing.T) {
c := context.New(t, defaultMTU)
defer c.Cleanup()
const rcvBufSz = 10
c.CreateConnected(context.TestInitialSequenceNumber, 30000, rcvBufSz)
we, ch := waiter.NewChannelEntry(nil)
c.WQ.EventRegister(&we, waiter.ReadableEvents)
defer c.WQ.EventUnregister(&we)
ept := en... | explode_data.jsonl/75953 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 855
} | [
2830,
3393,
9432,
4267,
14742,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
2266,
7121,
1155,
11,
1638,
8505,
52,
340,
16867,
272,
727,
60639,
2822,
4777,
10192,
85,
15064,
89837,
284,
220,
16,
15,
198,
1444,
7251,
21146,
5378,
8787,
634... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreate(t *testing.T) {
th.SetupHTTP()
defer th.TeardownHTTP()
fixtures.HandleCreateSuccessfully(t)
serverId := "4d8c3732-a248-40ed-bebc-539a6ffd25c0"
actual, err := Create(client.ServiceClient(), serverId, volumeattach.CreateOpts{
Device: "/dev/vdc",
VolumeID: "a26887c6-c47b-4654-abb5-dfadf7d3f804"... | explode_data.jsonl/34614 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 183
} | [
2830,
3393,
4021,
1155,
353,
8840,
836,
8,
341,
70479,
39820,
9230,
741,
16867,
270,
94849,
37496,
9230,
741,
1166,
941,
18513,
31421,
4021,
35959,
1155,
340,
41057,
764,
1669,
330,
19,
67,
23,
66,
18,
22,
18,
17,
7409,
17,
19,
23,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestSerializeSchema(t *testing.T) {
type args struct {
s *Schema
args redis.Args
}
tests := []struct {
name string
args args
want redis.Args
wantErr bool
}{
{"default-args", args{NewSchema(DefaultOptions), redis.Args{}}, redis.Args{"SCHEMA"}, false},
{"maxtextfields", args{NewSchem... | explode_data.jsonl/72799 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2426
} | [
2830,
3393,
15680,
8632,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
1903,
262,
353,
8632,
198,
197,
31215,
20870,
51015,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
31215,
262,
2827,
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 TestFlushAccessTokens(t *testing.T) {
t.Parallel()
for k, m := range fositeStores {
t.Run(fmt.Sprintf("case=%s", k), TestHelperFlushTokens(m, time.Hour))
}
} | explode_data.jsonl/54421 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 71
} | [
2830,
3393,
46874,
6054,
29300,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
2023,
595,
11,
296,
1669,
2088,
48390,
632,
69026,
341,
197,
3244,
16708,
28197,
17305,
445,
5638,
7846,
82,
497,
595,
701,
3393,
5511,
46874,
29300,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAccHostedCollector_Basic(t *testing.T) {
var collector api.Collector
testCheck := func(s *terraform.State) error {
if collector.ID <= 0 {
return fmt.Errorf("expected collector to be created")
}
return nil
}
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Prov... | explode_data.jsonl/66559 | {
"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,
14603,
9296,
291,
53694,
1668,
5971,
1155,
353,
8840,
836,
8,
341,
2405,
31953,
6330,
727,
24605,
269,
271,
18185,
3973,
1669,
2915,
1141,
353,
61385,
18942,
8,
1465,
341,
197,
743,
31953,
9910,
2651,
220,
15,
341,
298,
85... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func Test_manager_Load(t *testing.T) {
type storageTestContent struct {
getLen int
putLen int
deleteLen int
getHookStorageCfg []*config.WebhookConfig
putHookStorageCfg []*config.WebhookConfig
deleteHookStorageCfg []*config.WebhookConfig
}
type fields struct {
... | explode_data.jsonl/12089 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 3343
} | [
2830,
3393,
12144,
19553,
1155,
353,
8840,
836,
8,
341,
13158,
5819,
2271,
2762,
2036,
341,
197,
10366,
11271,
2290,
526,
198,
197,
45062,
11271,
2290,
526,
198,
197,
15618,
11271,
310,
526,
198,
197,
10366,
31679,
5793,
42467,
262,
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... | 8 |
func TestNearbySearchRankByDistanceAndRadius(t *testing.T) {
c, _ := NewClient(WithAPIKey(apiKey))
r := &NearbySearchRequest{
Location: &LatLng{1.0, 2.0},
Radius: 1000,
RankBy: RankByDistance,
}
_, err := c.NearbySearch(context.Background(), r)
if err == nil {
t.Errorf("Error expected: maps: Radius sp... | explode_data.jsonl/76290 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 179
} | [
2830,
3393,
51962,
1694,
5890,
22550,
1359,
14778,
3036,
8289,
1155,
353,
8840,
836,
8,
341,
1444,
11,
716,
1669,
1532,
2959,
7,
2354,
7082,
1592,
24827,
1592,
1171,
7000,
1669,
609,
51962,
1694,
5890,
1900,
515,
197,
197,
4707,
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... | 3 |
func TestGocloak_CreateUserCustomAttributes(t *testing.T) {
t.Parallel()
cfg := GetConfig(t)
client := NewClientWithDebug(t)
token := GetAdminToken(t, client)
tearDown, userID := CreateUser(t, client)
defer tearDown()
fetchedUser, err := client.GetUserByID(token.AccessToken,
cfg.GoCloak.Realm,
userID)
Fai... | explode_data.jsonl/79554 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 230
} | [
2830,
3393,
38,
509,
385,
585,
34325,
1474,
61946,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
50286,
1669,
2126,
2648,
1155,
340,
25291,
1669,
1532,
2959,
2354,
7939,
1155,
340,
43947,
1669,
2126,
7210,
3323,
1155,
11,
2943,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestComputeEvents(t *testing.T) {
containerdCheck := &ContainerdCheck{
instance: &ContainerdConfig{},
CheckBase: corechecks.NewCheckBase("containerd"),
}
mocked := mocksender.NewMockSender(containerdCheck.ID())
var err error
containerdCheck.filters, err = containersutil.GetSharedFilter()
require.NoError... | explode_data.jsonl/1857 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1060
} | [
2830,
3393,
46254,
7900,
1155,
353,
8840,
836,
8,
341,
53290,
67,
3973,
1669,
609,
4502,
67,
3973,
515,
197,
56256,
25,
220,
609,
4502,
67,
2648,
38837,
197,
69472,
3978,
25,
6200,
49383,
7121,
3973,
3978,
445,
3586,
67,
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... | 2 |
func TestNewFunction(t *testing.T) {
fn1 := func(ctx *context.Context, in context.Valuer) ([]context.Valuer, error) {
return nil, nil
}
fn, err := NewFunction(fn1)
assert.NoError(t, err)
assert.NotNil(t, fn)
assert.Equal(t, 0, fn.Arity())
fn2 := func(ctx *context.Context, in context.Valuer, arg1 []context.Va... | explode_data.jsonl/82024 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 469
} | [
2830,
3393,
3564,
5152,
1155,
353,
8840,
836,
8,
341,
40095,
16,
1669,
2915,
7502,
353,
2147,
9328,
11,
304,
2266,
77819,
8801,
8,
34923,
2147,
77819,
8801,
11,
1465,
8,
341,
197,
853,
2092,
11,
2092,
198,
197,
630,
40095,
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 TestChangelog(t *testing.T) {
for _, format := range formats {
format := format
t.Run(fmt.Sprintf("changelog-%s", format), func(t *testing.T) {
accept(t, acceptParms{
Name: fmt.Sprintf("changelog_%s", format),
Conf: "withchangelog.yaml",
Format: format,
Dockerfile: fmt.Sprin... | explode_data.jsonl/15465 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 174
} | [
2830,
3393,
1143,
61873,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
3561,
1669,
2088,
19856,
341,
197,
59416,
1669,
3561,
198,
197,
3244,
16708,
28197,
17305,
445,
331,
61873,
11069,
82,
497,
3561,
701,
2915,
1155,
353,
8840,
836,
8,
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 TestArray_SubSlice(t *testing.T) {
gtest.C(t, func(t *gtest.T) {
a1 := []interface{}{0, 1, 2, 3, 4, 5, 6}
array1 := garray.NewArrayFrom(a1)
array2 := garray.NewArrayFrom(a1, true)
t.Assert(array1.SubSlice(0, 2), []interface{}{0, 1})
t.Assert(array1.SubSlice(2, 2), []interface{}{2, 3})
t.Assert(array1.... | explode_data.jsonl/13903 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 296
} | [
2830,
3393,
1857,
36359,
33236,
1155,
353,
8840,
836,
8,
341,
3174,
1944,
727,
1155,
11,
2915,
1155,
353,
82038,
836,
8,
341,
197,
11323,
16,
1669,
3056,
4970,
6257,
90,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
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 TestTicker_S11(t *testing.T) {
product := "btc_" + common.NativeToken
timeMap := GetTimes()
kline15sA := prepareKlineMx(product, 15*60, 100.0, 200.0, 99.0, 210.0, []float64{100}, timeMap["-48h"], timeMap["-24m"])
kline15sB := prepareKlineMx(product, 15*60, 100.0, 200.0, 99.0, 210.0, []float64{100}, timeMap["-... | explode_data.jsonl/37817 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 575
} | [
2830,
3393,
87278,
1098,
16,
16,
1155,
353,
8840,
836,
8,
1476,
69288,
1669,
330,
92634,
18771,
488,
4185,
68624,
3323,
198,
21957,
2227,
1669,
2126,
18889,
741,
16463,
1056,
16,
20,
82,
32,
1669,
10549,
42,
1056,
44,
87,
19475,
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 TestIsNativeResource(t *testing.T) {
testCases := []struct {
resourceName v1.ResourceName
expectVal bool
}{
{
resourceName: "pod.alpha.kubernetes.io/opaque-int-resource-foo",
expectVal: true,
},
{
resourceName: "kubernetes.io/resource-foo",
expectVal: true,
},
{
resourceName... | explode_data.jsonl/25706 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 366
} | [
2830,
3393,
3872,
20800,
4783,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
50346,
675,
348,
16,
20766,
675,
198,
197,
24952,
2208,
262,
1807,
198,
197,
59403,
197,
197,
515,
298,
50346,
675,
25,
330,
39073,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPrecedenceTokenFile(t *testing.T) {
token := "exampletoken"
f, err := ioutil.TempFile("", "tokenfile")
if err != nil {
t.Errorf("Unexpected error: %v", err)
return
}
defer os.Remove(f.Name())
if err := ioutil.WriteFile(f.Name(), []byte(token), 0644); err != nil {
t.Errorf("Unexpected error: %v", er... | explode_data.jsonl/56163 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 368
} | [
2830,
3393,
4703,
1998,
763,
3323,
1703,
1155,
353,
8840,
836,
8,
341,
43947,
1669,
330,
8687,
5839,
698,
1166,
11,
1848,
1669,
43144,
65009,
1703,
19814,
330,
5839,
1192,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
13080,
445,
29430,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCheckExchangeWithSig(t *testing.T) {
to, path := createCheckerTestObjects(t)
defer func() {
to.stor.close(t)
err := common.CleanTemporaryDirs(path)
assert.NoError(t, err, "failed to clean test data dirs")
}()
tx := createExchangeWithSig(t)
info := defaultCheckerInfo(t)
_, err := to.tc.checkExcha... | explode_data.jsonl/63084 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1058
} | [
2830,
3393,
3973,
31564,
2354,
47246,
1155,
353,
8840,
836,
8,
341,
31709,
11,
1815,
1669,
1855,
35188,
2271,
11543,
1155,
692,
16867,
2915,
368,
341,
197,
31709,
1236,
269,
4653,
1155,
692,
197,
9859,
1669,
4185,
727,
2675,
59362,
9738... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIsDirtySuccess(t *testing.T) {
testRepo := newTestRepo(t)
defer testRepo.cleanup(t)
dirty, err := testRepo.sut.IsDirty()
require.Nil(t, err)
require.False(t, dirty)
} | explode_data.jsonl/14038 | {
"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,
3872,
36485,
7188,
1155,
353,
8840,
836,
8,
341,
18185,
25243,
1669,
501,
2271,
25243,
1155,
340,
16867,
1273,
25243,
87689,
1155,
692,
2698,
16531,
11,
1848,
1669,
1273,
25243,
514,
332,
4506,
36485,
741,
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 |
func TestNewClientFromEnvWithUserAgent(t *testing.T) {
os.Setenv("VINYLDNS_USER_AGENT", "foo")
client := NewClientFromEnv()
if client.UserAgent != "foo" {
t.Error("NewClientFromEnv should set a UserAgent from the environment if one is present")
}
os.Setenv("VINYLDNS_USER_AGENT", "")
} | explode_data.jsonl/4359 | {
"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,
3564,
2959,
3830,
14359,
2354,
1474,
16810,
1155,
353,
8840,
836,
8,
341,
25078,
4202,
3160,
445,
53,
64953,
12335,
2448,
9107,
52499,
497,
330,
7975,
5130,
25291,
1669,
1532,
2959,
3830,
14359,
2822,
743,
2943,
7344,
16810,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTable_doParallelDownload(t *testing.T) {
tempDir, err := ioutil.TempDir("", "table-parallel-download")
require.NoError(t, err)
defer func() {
require.NoError(t, os.RemoveAll(tempDir))
}()
objectStoragePath := filepath.Join(tempDir, objectsStorageDirName)
for _, tc := range []int{0, 10, downloadParal... | explode_data.jsonl/81250 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 417
} | [
2830,
3393,
2556,
26309,
16547,
11377,
1155,
353,
8840,
836,
8,
341,
16280,
6184,
11,
1848,
1669,
43144,
65009,
6184,
19814,
330,
2005,
12,
46103,
62451,
1138,
17957,
35699,
1155,
11,
1848,
692,
16867,
2915,
368,
341,
197,
17957,
35699,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRunnerRemovesCompleted(t *testing.T) {
store := NewMockStoreIface()
ticker1 := glock.NewMockTicker(time.Second)
ticker2 := glock.NewMockTicker(time.Second)
ticker3 := glock.NewMockTicker(time.Second)
refreshTicker := glock.NewMockTicker(time.Second * 30)
store.ListFunc.SetDefaultReturn([]Migration{
{I... | explode_data.jsonl/11531 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 754
} | [
2830,
3393,
19486,
6590,
10088,
22724,
1155,
353,
8840,
836,
8,
341,
57279,
1669,
1532,
11571,
6093,
40,
1564,
741,
3244,
5215,
16,
1669,
342,
1023,
7121,
11571,
87278,
9730,
32435,
340,
3244,
5215,
17,
1669,
342,
1023,
7121,
11571,
872... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTestServerWithConf(t *testing.T) {
conf := &vaulttest.CoreConfig{
LogicalBackends: map[string]logical.Factory{
"aws": aws.Factory,
"cassandra": cassandra.Factory,
"consul": consul.Factory,
"database": database.Factory,
"nomad": nomad.Factory,
"pki": pki.Factory,
"rab... | explode_data.jsonl/3207 | {
"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,
2271,
5475,
2354,
15578,
1155,
353,
8840,
836,
8,
341,
67850,
1669,
609,
82983,
1944,
12777,
2648,
515,
197,
24201,
938,
3707,
1412,
25,
2415,
14032,
60,
30256,
51008,
515,
298,
197,
1,
8635,
788,
981,
31521,
51008,
345,
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 TestGetProfilesInChannel(t *testing.T) {
th := Setup().InitBasic()
Client := th.BasicClient
prevShowEmail := utils.Cfg.PrivacySettings.ShowEmailAddress
defer func() {
utils.Cfg.PrivacySettings.ShowEmailAddress = prevShowEmail
}()
utils.Cfg.PrivacySettings.ShowEmailAddress = true
if result, err := Clien... | explode_data.jsonl/13830 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 673
} | [
2830,
3393,
1949,
62719,
641,
9629,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1005,
3803,
15944,
741,
71724,
1669,
270,
48868,
2959,
271,
50728,
7812,
4781,
1669,
12439,
727,
4817,
17947,
344,
2757,
6086,
9060,
79986,
198,
16867,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDirect_InvalidEventKind(t *testing.T) {
g := NewGomegaWithT(t)
xform, src, acc := setup(g)
xform.Start()
defer xform.Stop()
src.Handlers.Handle(event.FullSyncFor(basicmeta.K8SCollection1))
src.Handlers.Handle(event.Event{Kind: 55})
fixtures.ExpectEventsEventually(t, acc,
event.FullSyncFor(basicmet... | explode_data.jsonl/37558 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 132
} | [
2830,
3393,
16027,
62,
7928,
1556,
10629,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
1532,
38,
32696,
2354,
51,
1155,
692,
10225,
627,
11,
2286,
11,
1029,
1669,
6505,
3268,
692,
10225,
627,
12101,
741,
16867,
856,
627,
30213,
2822,
411... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMultipleBoundaries(t *testing.T) {
mockCtrl := gomock.NewController(t)
defer mockCtrl.Finish()
splitParams, err := NewSplitParamsGivenNumRowsPerQueryPart(
"select * from test_table where int_col > 5",
nil, /* bindVariables */
[]sqlparser.ColIdent{
sqlparser.NewColIdent("id"),
sqlparser.NewColIde... | explode_data.jsonl/13689 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1030
} | [
2830,
3393,
32089,
19568,
5431,
1155,
353,
8840,
836,
8,
341,
77333,
15001,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
7860,
15001,
991,
18176,
741,
1903,
2292,
4870,
11,
1848,
1669,
1532,
20193,
4870,
22043,
4651,
9024,
3889,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestResponseWriterFailure(t *testing.T) {
tests := []struct {
setupResp func(*responseRecorder)
messages []string
}{
{
setupResp: func(rr *responseRecorder) {
rr.arg2 = nil
},
messages: []string{"no arg2 provided"},
},
{
setupResp: func(rr *responseRecorder) {
rr.arg3 = nil
},
... | explode_data.jsonl/53840 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 324
} | [
2830,
3393,
2582,
6492,
17507,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
84571,
36555,
2915,
4071,
2322,
47023,
340,
197,
2109,
3737,
220,
3056,
917,
198,
197,
59403,
197,
197,
515,
298,
84571,
36555,
25,
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 Test_ResetPasswordPage(t *testing.T) {
tests := []struct {
name string
prep func(*testSetup)
jwt string
wantResCode int
}{
{
name: "should return 200",
jwt: testAuthToken,
wantResCode: http.StatusOK,
},
}
for _, tt := range tests {
t.Run(tt.name, fun... | explode_data.jsonl/32964 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 354
} | [
2830,
3393,
67771,
4876,
2665,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
286,
914,
198,
197,
40346,
79,
286,
2915,
4071,
1944,
21821,
340,
197,
12428,
9306,
260,
914,
198,
197,
50780,
1061,
2078,
526,
198... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_getRequestConnection(t *testing.T) {
store := mockstorage.NewMockStoreProvider()
k := newKMS(t, store)
t.Run("success - did_doc~attach present", func(t *testing.T) {
testDoc := newPeerDID(t, k)
docBytes, err := testDoc.MarshalJSON()
require.NoError(t, err)
attachment := decorator.Attachment{
D... | explode_data.jsonl/30532 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 871
} | [
2830,
3393,
3062,
1900,
4526,
1155,
353,
8840,
836,
8,
341,
57279,
1669,
7860,
16172,
7121,
11571,
6093,
5179,
741,
16463,
1669,
501,
42,
4826,
1155,
11,
3553,
692,
3244,
16708,
445,
5630,
481,
1521,
18869,
93,
16330,
3042,
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 TestIPv6Conversion(t *testing.T) {
ipWant := net.ParseIP("fdaf:1285:6f0e:1262:6f0e:8a2e:0370:7334")
uNetWant, uHostWant := uint64(18279849776823276130), uint64(8002485518114779956)
bWant, _ := new(big.Int).SetString("337203710538915638676904557932570506036", 10)
if uNetGot, uHostGot := IPv6ToUInts(ipWant); uN... | explode_data.jsonl/49340 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 324
} | [
2830,
3393,
58056,
21,
48237,
1155,
353,
8840,
836,
8,
341,
46531,
28823,
1669,
4179,
8937,
3298,
445,
6902,
2577,
25,
16,
17,
23,
20,
25,
21,
69,
15,
68,
25,
16,
17,
21,
17,
25,
21,
69,
15,
68,
25,
23,
64,
17,
68,
25,
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... | 5 |
func TestGetClaimableBalanceByID(t *testing.T) {
tt := test.Start(t)
defer tt.Finish()
test.ResetAuroraDB(t, tt.AuroraDB)
q := &history.Q{tt.AuroraSession()}
accountID := "GC3C4AKRBQLHOJ45U4XG35ESVWRDECWO5XLDGYADO6DPR3L7KIDVUMML"
asset := xdr.MustNewCreditAsset("USD", accountID)
balanceID := xdr.ClaimableBalanc... | explode_data.jsonl/57519 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1039
} | [
2830,
3393,
1949,
45544,
480,
21190,
60572,
1155,
353,
8840,
836,
8,
341,
3244,
83,
1669,
1273,
12101,
1155,
340,
16867,
17853,
991,
18176,
741,
18185,
36660,
32,
324,
6215,
3506,
1155,
11,
17853,
875,
324,
6215,
3506,
340,
18534,
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 TestExecD(t *testing.T) {
rand.Seed(time.Now().UTC().UnixNano())
spec.Run(t, "ExecD", testExecD, spec.Sequential(), spec.Report(report.Terminal{}))
} | explode_data.jsonl/72040 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 63
} | [
2830,
3393,
10216,
35,
1155,
353,
8840,
836,
8,
341,
7000,
437,
5732,
291,
9730,
13244,
1005,
21183,
1005,
55832,
83819,
2398,
98100,
16708,
1155,
11,
330,
10216,
35,
497,
1273,
10216,
35,
11,
1398,
43823,
1507,
1398,
25702,
45175,
8067... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCase1( t *testing.T){
var(
nums = []int{3 , 2, 2, 3}
val = 3
expected = 2
)
result := removeElement(nums, val)
if result != expected {
t.Errorf("\n Wrong answer. result = %v. expected = %v", result, expected)
}
} | explode_data.jsonl/60602 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 98
} | [
2830,
30573,
16,
7,
259,
353,
8840,
836,
12798,
2405,
1006,
197,
22431,
82,
284,
3056,
396,
90,
18,
1154,
220,
17,
11,
220,
17,
11,
220,
18,
532,
197,
19302,
284,
220,
18,
198,
197,
42400,
284,
220,
17,
198,
197,
692,
9559,
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 TestBuildArticles(t *testing.T) {
defer gock.Off()
gock.New("https://www.ptt.cc").Get("/bbs/lol/index.html").Reply(200).BodyString(dummyBody)
type args struct {
board string
page int
}
tests := []struct {
name string
args args
wantArticles article.Articles
wantErr bool
}{
... | explode_data.jsonl/717 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 556
} | [
2830,
3393,
11066,
46135,
1155,
353,
8840,
836,
8,
1476,
16867,
728,
377,
13,
4596,
741,
3174,
1176,
7121,
445,
2428,
1110,
2136,
39326,
83,
27812,
1827,
1949,
4283,
65,
1279,
13328,
337,
9022,
2564,
1827,
20841,
7,
17,
15,
15,
568,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInsertAndQueryCsvLz4Compression(t *testing.T) {
cache := newTestCache(t)
input := []TestData{{S: "Foo", I: 123, F: 1.5, B: true}}
cache.insertCsv("FOO", map[string]string{"Content-Type": "text/csv", "Content-Encoding": "lz4"}, input)
rr := cache.queryDataset("FOO", map[string]string{"Accept": "text/csv", ... | explode_data.jsonl/8981 | {
"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,
13780,
3036,
2859,
94826,
43,
89,
19,
81411,
1155,
353,
8840,
836,
8,
341,
52680,
1669,
501,
2271,
8233,
1155,
340,
22427,
1669,
3056,
83920,
2979,
50,
25,
330,
40923,
497,
358,
25,
220,
16,
17,
18,
11,
434,
25,
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... | 3 |
func TestService_Power(t *testing.T) {
fakeServer := initFakeServer()
apiClient := &phy.Client{
APIRootURL: fakeServer.URL,
Options: &client.Options{
UserAgent: "phy-service-go/test",
},
}
svc := New(apiClient)
cases := []struct {
operation string
}{
{operation: "soft"},
{operation: "on"},
{oper... | explode_data.jsonl/13165 | {
"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,
1860,
1088,
1202,
1155,
353,
8840,
836,
8,
341,
1166,
726,
5475,
1669,
2930,
52317,
5475,
741,
54299,
2959,
1669,
609,
12700,
11716,
515,
197,
197,
7082,
8439,
3144,
25,
12418,
5475,
20893,
345,
197,
197,
3798,
25,
609,
29... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestFindMinimums(t *testing.T) {
mins := make([]byte, 6)
intCharCounts := make([]int, 6)
min := findMinimums(
[]float64{7.2, 1.5, 6, 2.2, 5, 2}, intCharCounts, 100, mins)
if min != 2 {
t.Fatalf("findMinimums min = %v, expect 2", min)
}
if !reflect.DeepEqual(intCharCounts, []int{8, 2, 6, 3, 5, 2}) {
t.... | explode_data.jsonl/32222 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 243
} | [
2830,
3393,
9885,
28695,
82,
1155,
353,
8840,
836,
8,
341,
25320,
82,
1669,
1281,
10556,
3782,
11,
220,
21,
340,
2084,
4768,
63731,
1669,
1281,
10556,
396,
11,
220,
21,
340,
25320,
1669,
1477,
28695,
82,
1006,
197,
197,
1294,
3649,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTransportRetryAfterRefusedStream(t *testing.T) {
clientDone := make(chan struct{})
ct := newClientTester(t)
ct.client = func() error {
defer ct.cc.(*net.TCPConn).CloseWrite()
defer close(clientDone)
req, _ := http.NewRequest("GET", "https://dummy.tld/", nil)
resp, err := ct.tr.RoundTrip(req)
if er... | explode_data.jsonl/16138 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 686
} | [
2830,
3393,
27560,
51560,
6025,
3945,
2591,
3027,
1155,
353,
8840,
836,
8,
341,
25291,
17453,
1669,
1281,
35190,
2036,
37790,
89216,
1669,
501,
2959,
58699,
1155,
340,
89216,
6581,
284,
2915,
368,
1465,
341,
197,
16867,
20251,
27812,
4139... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReadYAMLStream(t *testing.T) {
f := newFixture(t)
defer f.TearDown()
f.UseRealFS()
f.File("test.yaml", yamlStream)
d := "observed = read_yaml_stream('test.yaml')\n"
d += fmt.Sprintf("expected = %s\n", yamlStreamAsStarlark)
tf := d + `
def test():
if expected != observed:
print('expected: %s' % (exp... | explode_data.jsonl/10613 | {
"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,
4418,
56,
31102,
3027,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
501,
18930,
1155,
340,
16867,
282,
836,
682,
4454,
2822,
1166,
9046,
12768,
8485,
2822,
1166,
8576,
445,
1944,
33406,
497,
32246,
3027,
340,
2698,
1669,
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 TestEntropy(t *testing.T) {
entropy := getEntropy(collegeData)
if !floatEquals(entropy, 0.9709505944546686) {
t.Error("Wrong entropy " + FloatToString(entropy))
}
} | explode_data.jsonl/10539 | {
"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,
97582,
1155,
353,
8840,
836,
8,
341,
197,
49150,
1669,
633,
97582,
19611,
4757,
1043,
340,
743,
753,
3649,
4315,
7,
49150,
11,
220,
15,
13,
24,
22,
15,
24,
20,
15,
20,
24,
19,
19,
20,
19,
21,
21,
23,
21,
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
] | 2 |
func TestConnectionInvalidatesBadCachedStatements(t *testing.T) {
assert := assert.New(t)
conn := NewFromEnv()
defer conn.Close()
conn.EnableStatementCache()
_, err := conn.Open()
assert.Nil(err)
createTableStatement := `CREATE TABLE state_invalidation (id int not null, name varchar(64))`
insertStatement := ... | explode_data.jsonl/33848 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 416
} | [
2830,
3393,
4526,
7928,
973,
17082,
70293,
93122,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
32917,
1669,
1532,
3830,
14359,
741,
16867,
4534,
10421,
2822,
32917,
32287,
8636,
8233,
741,
197,
6878,
1848,
1669,
4534,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLogin(t *testing.T) {
mockPGUserRepo := mocks.PGUserRepoMock{}
t.Run("success", func(t *testing.T) {
mockUser := mocks.SetMockUser()
mockPGUserRepo.On(
"GetByUserName",
mock.Anything,
mock.AnythingOfType("string"),
).Return(mockUser, nil).Once()
userServiceMock := NewUserService(&mockPGUse... | explode_data.jsonl/51800 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 445
} | [
2830,
3393,
6231,
1155,
353,
8840,
836,
8,
341,
77333,
11383,
1474,
25243,
1669,
68909,
1069,
38,
1474,
25243,
11571,
31483,
3244,
16708,
445,
5630,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
77333,
1474,
1669,
68909,
4202,
11571,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCallMethod(t *testing.T) {
var mockHandler = func(w http.ResponseWriter, r *http.Request, conn *Conn) {
q, err := conn.Query("select")
if err != nil {
t.Fatal(err)
}
if q != "localhost:8000:select" {
t.Fatalf("%v != %v", q, "localhost:8000:select")
}
}
var err error
var called bool
gb :=... | explode_data.jsonl/44414 | {
"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,
7220,
3523,
1155,
353,
8840,
836,
8,
341,
2405,
7860,
3050,
284,
2915,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
11,
4534,
353,
9701,
8,
341,
197,
18534,
11,
1848,
1669,
4534,
15685,
445,
1742,
1138,
197,
743,
1848,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestServiceDoc(t *testing.T) {
serv := &descriptor.ServiceDescriptorProto{
Name: proto.String("MyService"),
}
var g generator
g.comments = make(map[protoiface.MessageV1]string)
for _, tst := range []struct {
in, want string
deprecated bool
}{
{
in: "",
want: "",
},
{
in: "Does st... | explode_data.jsonl/40033 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 669
} | [
2830,
3393,
1860,
9550,
1155,
353,
8840,
836,
8,
341,
1903,
648,
1669,
609,
53132,
13860,
11709,
31549,
515,
197,
21297,
25,
18433,
6431,
445,
5050,
1860,
4461,
197,
630,
2405,
342,
13823,
198,
3174,
45074,
284,
1281,
9147,
58,
15110,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRebuildIndexFailsOnAppendOnly(t *testing.T) {
env, cleanup := withTestEnvironment(t)
defer cleanup()
datafile := filepath.Join("..", "..", "internal", "checker", "testdata", "duplicate-packs-in-index-test-repo.tar.gz")
rtest.SetupTarTestFixture(t, env.base, datafile)
globalOptions.stdout = ioutil.Discar... | explode_data.jsonl/43567 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 245
} | [
2830,
3393,
693,
5834,
1552,
37,
6209,
1925,
23877,
7308,
1155,
353,
8840,
836,
8,
341,
57538,
11,
21290,
1669,
448,
2271,
12723,
1155,
340,
16867,
21290,
2822,
8924,
1192,
1669,
26054,
22363,
95032,
497,
32213,
497,
330,
10481,
497,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_EnvSource(t *testing.T) {
expectedValue := "TEST_VALUE"
configurationKey := "TEST_PARAM"
os.Setenv(configurationKey, expectedValue)
var sut confunc.Source
sut = confunc.Env()
actualValue, err := sut.Value(configurationKey)
if err != nil {
t.Errorf("error should not have occurred : %v", err.Error()... | explode_data.jsonl/8316 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 156
} | [
2830,
3393,
62,
14359,
3608,
1155,
353,
8840,
836,
8,
341,
42400,
1130,
1669,
330,
10033,
7476,
698,
197,
21138,
1592,
1669,
330,
10033,
12073,
698,
25078,
4202,
3160,
48724,
1592,
11,
3601,
1130,
692,
2405,
34212,
2335,
1347,
30350,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAdapterBidReceivedMetric(t *testing.T) {
adapterName := "anyName"
performTest := func(m *Metrics, hasAdm bool) {
labels := pbsmetrics.AdapterLabels{
Adapter: openrtb_ext.BidderName(adapterName),
}
bidType := openrtb_ext.BidTypeBanner
m.RecordAdapterBidReceived(labels, bidType, hasAdm)
}
testCas... | explode_data.jsonl/13948 | {
"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,
5940,
65452,
23260,
54310,
1155,
353,
8840,
836,
8,
341,
197,
19731,
675,
1669,
330,
3767,
675,
698,
197,
28488,
2271,
1669,
2915,
1255,
353,
27328,
11,
702,
2589,
76,
1807,
8,
341,
197,
95143,
1669,
281,
1279,
43262,
3419... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPeerSetAddDuplicate(t *testing.T) {
t.Parallel()
peerSet := NewPeerSet()
peer := newMockPeer(nil)
n := 20
errsChan := make(chan error)
// Add the same asynchronously to test the
// concurrent guarantees of our APIs, and
// our expectation in the end is that only
// one addition succeeded, but the res... | explode_data.jsonl/68621 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 416
} | [
2830,
3393,
30888,
1649,
2212,
53979,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
197,
16537,
1649,
1669,
1532,
30888,
1649,
741,
197,
16537,
1669,
501,
11571,
30888,
27907,
692,
9038,
1669,
220,
17,
15,
198,
9859,
82,
46019,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEntryAddUntimedDefaultStagedMetadata(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
var (
withPrepopulation = true
prePopulateData = testDefaultAggregationKeys
inputMetadatas = testDefaultStagedMetadatas
expectedShouldAdd = true
expectedCutoverNan... | explode_data.jsonl/24216 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 493
} | [
2830,
3393,
5874,
2212,
20250,
75485,
3675,
623,
3279,
14610,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
16867,
23743,
991,
18176,
2822,
2405,
2399,
197,
46948,
4703,
44441,
981,
284,
830,
198,
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 Test_mergeSeverity(t *testing.T) {
type args struct {
s1 Severity
s2 Severity
}
tests := []struct {
name string
args args
want Severity
}{
{"empty string and none", args{Severity(""), None}, None},
{"none and empty string", args{None, Severity("")}, None},
{"none and low", args{None, Low}, Low}... | explode_data.jsonl/52086 | {
"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,
20888,
65594,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
1903,
16,
51139,
198,
197,
1903,
17,
51139,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
31215,
2827,
198,
197,
50780,
511... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRuleInsertOnDup(t *testing.T) {
common.Log.Debug("Entering function: %s", common.GetFunctionName())
sqls := []string{
`INSERT INTO t1(a,b,c) VALUES (1,2,3) ON DUPLICATE KEY UPDATE c=c+1;`,
}
for _, sql := range sqls {
q, err := NewQuery4Audit(sql)
if err == nil {
rule := q.RuleInsertOnDup()
if ... | explode_data.jsonl/76778 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 235
} | [
2830,
3393,
11337,
13780,
1925,
85713,
1155,
353,
8840,
836,
8,
341,
83825,
5247,
20345,
445,
82867,
729,
25,
1018,
82,
497,
4185,
2234,
5152,
675,
2398,
30633,
82,
1669,
3056,
917,
515,
197,
197,
63,
12698,
12496,
259,
16,
2877,
8402... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestServe(t *testing.T) {
validMAC := "/84:38:35:77:aa:52"
type args struct {
r *http.Request
code int
}
tests := []struct {
name string
args args
}{
{
name: "Default",
args: args{
httptest.NewRequest(http.MethodGet, validMAC, nil),
http.StatusOK,
},
}, {
name: "No MAC Addre... | explode_data.jsonl/50927 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 390
} | [
2830,
3393,
60421,
1155,
353,
8840,
836,
8,
341,
56322,
25788,
1669,
3521,
23,
19,
25,
18,
23,
25,
18,
20,
25,
22,
22,
25,
5305,
25,
20,
17,
698,
13158,
2827,
2036,
341,
197,
7000,
262,
353,
1254,
9659,
198,
197,
43343,
526,
198... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestBundle(t *testing.T) {
logSig := mustMakeSigner(t, testLogSignerPrivate)
fwSig := mustMakeSigner(t, testFirmwarePrivate)
logSigV := mustMakeVerifier(t, testLogSignerPublic)
fwSigV := mustMakeVerifier(t, testFirmwarePublic)
h := hasher.DefaultHasher
firmwareImageHash := []byte("Firmware Hash")
fw := mak... | explode_data.jsonl/48486 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1590
} | [
2830,
3393,
8409,
1155,
353,
8840,
836,
8,
341,
6725,
47246,
1669,
1969,
8078,
7264,
261,
1155,
11,
1273,
2201,
7264,
261,
16787,
340,
1166,
86,
47246,
1669,
1969,
8078,
7264,
261,
1155,
11,
1273,
37,
53260,
16787,
340,
6725,
47246,
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 TestGetTrades(t *testing.T) {
t.Parallel()
// test empty market
_, err := f.GetTrades(context.Background(), "", 0, 0, 200)
if err == nil {
t.Error("empty market should return an error")
}
_, err = f.GetTrades(context.Background(),
spotPair, validFTTBTCEndTime, validFTTBTCStartTime, 5)
if err != errStart... | explode_data.jsonl/15158 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 424
} | [
2830,
3393,
1949,
1282,
3452,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
197,
322,
1273,
4287,
3081,
198,
197,
6878,
1848,
1669,
282,
2234,
1282,
3452,
5378,
19047,
1507,
7342,
220,
15,
11,
220,
15,
11,
220,
17,
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... | 9 |
func TestPushdownFilterToTables(t *testing.T) {
table := memory.NewFilteredTable("mytable", sql.NewPrimaryKeySchema(sql.Schema{
{Name: "i", Type: sql.Int32, Source: "mytable"},
{Name: "f", Type: sql.Float64, Source: "mytable"},
{Name: "t", Type: sql.Text, Source: "mytable"},
}))
table2 := memory.NewFilteredTa... | explode_data.jsonl/66769 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1827
} | [
2830,
3393,
16644,
2923,
5632,
1249,
21670,
1155,
353,
8840,
836,
8,
341,
26481,
1669,
4938,
7121,
67310,
2556,
445,
2408,
2005,
497,
5704,
7121,
25981,
8632,
13148,
21105,
515,
197,
197,
63121,
25,
330,
72,
497,
3990,
25,
5704,
7371,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestJoin1(t *testing.T) {
b := &BuilderStandard{}
s := NewSelect(b)
_, _, err := s.Select("name as nx", "age").
From("student as c").
Where(expr.In("age", 13, 14)).InnerJoin("school as s", expr.Exp{
E: "student.name=school.name",
}, "t1", "c2").
ToSql()
if err != nil {
t.Fatal(err)
}
// t.Error... | explode_data.jsonl/16784 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 415
} | [
2830,
3393,
12292,
16,
1155,
353,
8840,
836,
8,
1476,
2233,
1669,
609,
3297,
19781,
16094,
1903,
1669,
1532,
3379,
1883,
692,
197,
6878,
8358,
1848,
1669,
274,
14752,
445,
606,
438,
24496,
497,
330,
424,
38609,
197,
197,
3830,
445,
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... | 3 |
func TestCopyDirFail_SrcInaccessible(t *testing.T) {
if runtime.GOOS == "windows" {
// XXX: setting permissions works differently in
// Microsoft Windows. Skipping this this until a
// compatible implementation is provided.
t.Skip("skipping on windows")
}
var srcdir, dstdir string
cleanup := set... | explode_data.jsonl/72206 | {
"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,
12106,
6184,
19524,
1098,
1287,
641,
62347,
1155,
353,
8840,
836,
8,
972,
743,
15592,
97574,
3126,
621,
330,
27077,
1,
972,
197,
197,
322,
19975,
25,
6243,
8541,
4278,
21303,
304,
319,
197,
197,
322,
5100,
5515,
13,
96118,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGenerateModel_Stats(t *testing.T) {
specDoc, err := loads.Spec("../fixtures/codegen/todolist.models.yml")
require.NoError(t, err)
definitions := specDoc.Spec().Definitions
k := "Stats"
schema := definitions[k]
opts := opts()
genModel, err := makeGenDefinition(k, "models", schema, specDoc, opts)
requir... | explode_data.jsonl/2521 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 269
} | [
2830,
3393,
31115,
1712,
62,
16635,
1155,
353,
8840,
836,
8,
341,
98100,
9550,
11,
1848,
1669,
20907,
36473,
17409,
45247,
46928,
4370,
5523,
347,
34675,
8235,
33936,
1138,
17957,
35699,
1155,
11,
1848,
692,
7452,
4054,
82,
1669,
1398,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDeleteUndeliveredEventsFlag(t *testing.T) {
common.SetUpMockConfig()
defer func() {
err := common.TruncateDB(common.OnDisk)
if err != nil {
t.Fatalf("error: %v", err)
}
}()
if cerr := SetUndeliveredEventsFlag("destination"); cerr != nil {
t.Errorf("Error while making set undelivered events flag:... | explode_data.jsonl/49424 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 217
} | [
2830,
3393,
6435,
19957,
301,
43056,
7900,
12135,
1155,
353,
8840,
836,
8,
341,
83825,
4202,
2324,
11571,
2648,
741,
16867,
2915,
368,
341,
197,
9859,
1669,
4185,
8240,
26900,
3506,
57802,
8071,
47583,
340,
197,
743,
1848,
961,
2092,
34... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestPrefixer(t *testing.T) {
base := Prefixer("foo")
tests := []struct {
in []byte
out string
}{
{
base("bar"),
"foo/bar",
},
{
base(),
"foo",
},
{
base(""),
"foo/",
},
}
for _, tt := range tests {
require.Equal(t, tt.out, string(tt.in))
}
} | explode_data.jsonl/65923 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 154
} | [
2830,
3393,
14335,
261,
1155,
353,
8840,
836,
8,
341,
24195,
1669,
56483,
261,
445,
7975,
5130,
78216,
1669,
3056,
1235,
341,
197,
17430,
220,
3056,
3782,
198,
197,
13967,
914,
198,
197,
59403,
197,
197,
515,
298,
24195,
445,
2257,
44... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestManifestParse(t *testing.T) {
k := &ManifestivalParser{}
res, err := k.Parse("testdata")
if err != nil {
t.Fatal(err)
}
if l := len(res); l != 3 {
t.Fatalf("got %d, want 3", l)
}
} | explode_data.jsonl/26132 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 94
} | [
2830,
3393,
38495,
14463,
1155,
353,
8840,
836,
8,
341,
16463,
1669,
609,
38495,
3936,
6570,
31483,
10202,
11,
1848,
1669,
595,
8937,
445,
92425,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
630,
743,
326,
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... | 3 |
func TestSelect(t *testing.T) {
t.Run("success", func(t *testing.T) {
s := New()
require.NotNil(t, s)
witnesses := []*proof.Witness{{}, {}, {}, {}}
selected, err := s.Select(witnesses, 3)
require.NoError(t, err)
require.Equal(t, 3, len(selected))
})
t.Run("success", func(t *testing.T) {
s := New()
... | explode_data.jsonl/64304 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 324
} | [
2830,
3393,
3379,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
5630,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
1903,
1669,
1532,
741,
197,
17957,
93882,
1155,
11,
274,
692,
197,
6692,
8091,
288,
1669,
29838,
15780,
1175,
8091,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFailApplicationEventGetEvent(t *testing.T) {
tests := []struct {
name string
appID, errorMsg string
wantEvent events.ApplicationEventType
}{
{TestEventName, "testAppId001", "test error msg", events.FailApplication},
}
for _, tt := range tests {
instance := NewFailApplicationEven... | explode_data.jsonl/9791 | {
"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,
19524,
4988,
1556,
1949,
1556,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
310,
914,
198,
197,
28236,
915,
11,
52247,
914,
198,
197,
50780,
1556,
981,
4357,
17521,
47906,
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,
1... | 2 |
func TestAESDecrypt(t *testing.T) {
t.Parallel()
provider, _, cleanup := currentTestConfig.Provider(t)
defer cleanup()
k, err := provider.KeyGen(&bccsp.AESKeyGenOpts{Temporary: false})
if err != nil {
t.Fatalf("Failed generating AES_256 key [%s]", err)
}
msg := []byte("Hello World")
ct, err := provider.Enc... | explode_data.jsonl/29273 | {
"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,
69168,
89660,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
197,
19979,
11,
8358,
21290,
1669,
1482,
2271,
2648,
36208,
1155,
340,
16867,
21290,
2822,
16463,
11,
1848,
1669,
9109,
9610,
9967,
2099,
69018,
2154,
875,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExistsComprehension(t *testing.T) {
gopClTest(t, `
hasFive := {for x <- ["1", "3", "5", "7", "11"], x == "5"}
`, `package main
func main() {
hasFive := func() (_gop_ok bool) {
for _, x := range []string{"1", "3", "5", "7", "11"} {
if x == "5" {
return true
}
}
return
}()
}
`)
} | explode_data.jsonl/73649 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 148
} | [
2830,
3393,
15575,
1092,
30782,
2645,
1155,
353,
8840,
836,
8,
341,
3174,
453,
5066,
2271,
1155,
11,
22074,
4648,
37020,
1669,
314,
1958,
856,
9119,
4383,
16,
497,
330,
18,
497,
330,
20,
497,
330,
22,
497,
330,
16,
16,
7914,
856,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestH(t *testing.T) {
const want = "hahifuheho"
for _, v := range [2]string{"はひふへほ", "ハヒフヘホ"} {
got, err := KanaToRomaji(v)
assert.Equal(t, want, got)
assert.Nil(t, err)
}
} | explode_data.jsonl/11303 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 103
} | [
2830,
3393,
39,
1155,
353,
8840,
836,
8,
341,
4777,
1366,
284,
330,
71,
1466,
20850,
383,
6161,
1837,
2023,
8358,
348,
1669,
2088,
508,
17,
30953,
4913,
15322,
124877,
129102,
126263,
124515,
497,
330,
124654,
129201,
51491,
127021,
12468... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestQueuedRetry_DropOnFull(t *testing.T) {
qCfg := CreateDefaultQueueSettings()
qCfg.QueueSize = 0
rCfg := CreateDefaultRetrySettings()
be := newBaseExporter(defaultExporterCfg, zap.NewNop(), WithRetry(rCfg), WithQueue(qCfg))
ocs := newObservabilityConsumerSender(be.qrSender.consumerSender)
be.qrSender.consu... | explode_data.jsonl/46012 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 247
} | [
2830,
3393,
25776,
3260,
51560,
1557,
887,
1925,
9432,
1155,
353,
8840,
836,
8,
341,
18534,
42467,
1669,
4230,
3675,
7554,
6086,
741,
18534,
42467,
50251,
1695,
284,
220,
15,
198,
7000,
42467,
1669,
4230,
3675,
51560,
6086,
741,
73142,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMakeBuilderMapErrors(t *testing.T) {
emptyServiceKeyBuilder := &rlspb.GrpcKeyBuilder{
Names: []*rlspb.GrpcKeyBuilder_Name{
{Service: "bFoo", Method: "method1"},
{Service: "bBar"},
{Method: "method1"},
},
Headers: []*rlspb.NameMatcher{{Key: "k1", Names: []string{"n1", "n2"}}},
}
requiredMatchK... | explode_data.jsonl/81170 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1386
} | [
2830,
3393,
8078,
3297,
2227,
13877,
1155,
353,
8840,
836,
8,
341,
197,
3194,
1860,
1592,
3297,
1669,
609,
2381,
43467,
1224,
29414,
1592,
3297,
515,
197,
197,
7980,
25,
29838,
2381,
43467,
1224,
29414,
1592,
3297,
19015,
515,
298,
197,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestIPv4Send(t *testing.T) {
o := testObject{t: t, v4: true}
proto := ipv4.NewProtocol()
ep, err := proto.NewEndpoint(1, "\x0a\x00\x00\x01", nil, nil, &o)
if err != nil {
t.Fatalf("NewEndpoint failed: %v", err)
}
// Allocate and initialize the payload view.
payload := buffer.NewView(100)
for i := 0; i <... | explode_data.jsonl/53346 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 346
} | [
2830,
3393,
58056,
19,
11505,
1155,
353,
8840,
836,
8,
341,
22229,
1669,
1273,
1190,
90,
83,
25,
259,
11,
348,
19,
25,
830,
532,
197,
15110,
1669,
45475,
19,
7121,
20689,
741,
96626,
11,
1848,
1669,
18433,
7121,
27380,
7,
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... | 4 |
func TestParsePointNegativeInteger(t *testing.T) {
_, err := models.ParsePointsString(`cpu,host=serverA,region=us-west value=-1i`)
if err != nil {
t.Errorf(`ParsePoints("%s") mismatch. got %v, exp nil`, `cpu,host=serverA,region=us-west value=-1i`, err)
}
} | explode_data.jsonl/16918 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 105
} | [
2830,
3393,
14463,
2609,
38489,
3486,
1155,
353,
8840,
836,
8,
341,
197,
6878,
1848,
1669,
4119,
8937,
11411,
703,
5809,
16475,
11,
3790,
28,
4030,
32,
11,
3943,
28,
355,
37602,
897,
10829,
16,
72,
24183,
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... | 2 |
func TestDecompression(t *testing.T) {
testCases := []struct {
name string
compressedQuery string
f func(*http.Request) error
}{
{
"full LZ4",
lz4TestQuery,
func(req *http.Request) error {
q, err := getFullQuery(req)
if err != nil {
return err
}
checkResp... | explode_data.jsonl/31705 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1215
} | [
2830,
3393,
4900,
316,
4011,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
11609,
310,
914,
198,
197,
32810,
14318,
2859,
914,
198,
197,
1166,
2290,
2915,
4071,
1254,
9659,
8,
1465,
198,
197,
59403,
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 TestInline(t *testing.T) {
tmpl, err := ParseFile("testdir/test_inline.slim")
if err != nil {
t.Fatal(err)
}
var buf bytes.Buffer
err = tmpl.Execute(&buf, Values{
"name": "golang",
})
if err != nil {
t.Fatal(err)
}
expect := readFile(t, "testdir/test_inline.html")
got := buf.String()
if expect != ... | explode_data.jsonl/80434 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 168
} | [
2830,
3393,
25324,
1155,
353,
8840,
836,
8,
341,
3244,
54010,
11,
1848,
1669,
14775,
1703,
445,
1944,
3741,
12697,
41871,
74257,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
532,
2405,
6607,
5820,
22622,
198,
9859,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNonEmptyList(t *testing.T) {
storage := map[string]RESTStorage{}
simpleStorage := SimpleRESTStorage{
list: []Simple{
{
JSONBase: api.JSONBase{Kind: "Simple"},
Name: "foo",
},
},
}
storage["simple"] = &simpleStorage
handler := Handle(storage, codec, "/prefix/version", selfLinker)
ser... | explode_data.jsonl/71492 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 380
} | [
2830,
3393,
8121,
3522,
852,
1155,
353,
8840,
836,
8,
341,
197,
16172,
1669,
2415,
14032,
60,
38307,
5793,
16094,
1903,
6456,
5793,
1669,
8993,
38307,
5793,
515,
197,
14440,
25,
3056,
16374,
515,
298,
197,
515,
571,
197,
5370,
3978,
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... | 6 |
func TestYAMLTemplates(t *testing.T) {
g := &gomplate{
funcMap: template.FuncMap{
"yaml": data.YAML,
"yamlArray": data.YAMLArray,
},
}
assert.Equal(t, "bar", testTemplate(g, `{{(yaml "foo: bar").foo}}`))
assert.Equal(t, "[foo bar]", testTemplate(g, `{{yamlArray "- foo\n- bar\n"}}`))
assert.Equal(t,... | explode_data.jsonl/54452 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 184
} | [
2830,
3393,
56,
31102,
51195,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
609,
36083,
1750,
515,
197,
29244,
2227,
25,
3811,
69845,
2227,
515,
298,
197,
1,
41466,
788,
414,
821,
7507,
31102,
345,
298,
197,
1,
41466,
1857,
788,
821,
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 TestTransferNotAXFRorIXFR(t *testing.T) {
transfer := newTestTransfer()
ctx := context.TODO()
w := dnstest.NewRecorder(&test.ResponseWriter{})
m := &dns.Msg{}
m.SetQuestion("test.domain.", dns.TypeA)
_, err := transfer.ServeDNS(ctx, w, m)
if err != nil {
t.Error(err)
}
if w.Msg == nil {
t.Fatal("Go... | explode_data.jsonl/39435 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 199
} | [
2830,
3393,
21970,
2623,
2954,
10504,
269,
5396,
10504,
1155,
353,
8840,
836,
8,
341,
197,
24188,
1669,
501,
2271,
21970,
2822,
20985,
1669,
2266,
90988,
741,
6692,
1669,
47488,
267,
477,
7121,
47023,
2099,
1944,
37508,
37790,
2109,
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... | 4 |
func TestCellAliasVreplicationWorkflow(t *testing.T) {
cells := []string{"zone1", "zone2"}
mainClusterConfig.vreplicationCompressGTID = true
defer func() {
mainClusterConfig.vreplicationCompressGTID = false
}()
vc = NewVitessCluster(t, "TestCellAliasVreplicationWorkflow", cells, mainClusterConfig)
require.NotNi... | explode_data.jsonl/44951 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 545
} | [
2830,
3393,
3599,
22720,
53,
9995,
1693,
62768,
1155,
353,
8840,
836,
8,
341,
1444,
6436,
1669,
3056,
917,
4913,
8684,
16,
497,
330,
8684,
17,
16707,
36641,
28678,
2648,
3133,
9995,
1693,
1092,
1873,
25388,
915,
284,
830,
198,
16867,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestListCommandRunEClosureWithErr(t *testing.T) {
assert := assert.New(t)
cli := test.NewCLI()
client := cli.Client.(*client.MockClient)
resources := []corev2.User{}
client.On("List", mock.Anything, &resources, mock.Anything, mock.Anything).Return(errors.New("fire"))
cmd := ListCommand(cli)
out, err := te... | explode_data.jsonl/11554 | {
"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,
852,
4062,
6727,
7498,
11653,
2354,
7747,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
86448,
1669,
1273,
7121,
63959,
741,
25291,
1669,
21348,
11716,
41399,
2972,
24664,
2959,
340,
10202,
2360,
1669,
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... | 1 |
func TestKRBPriv_EncryptEncPart(t *testing.T) {
t.Parallel()
var a KRBPriv
b, err := hex.DecodeString(testdata.MarshaledKRB5priv)
if err != nil {
t.Fatalf("Test vector read error: %v", err)
}
err = a.Unmarshal(b)
if err != nil {
t.Fatalf("Unmarshal error: %v", err)
}
b, err = hex.DecodeString(testdata.Mars... | explode_data.jsonl/69299 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 319
} | [
2830,
3393,
42,
29259,
32124,
93529,
3571,
7408,
5800,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
2405,
264,
730,
29259,
32124,
198,
2233,
11,
1848,
1669,
12371,
56372,
703,
8623,
691,
83691,
75303,
42,
29259,
20,
11887,
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 TestGrantNewAccessTokenFromRefreshToken(t *testing.T) {
c, _ := NewClient(testClientID, testSecret, APIBaseSandBox)
_, err := c.GrantNewAccessTokenFromRefreshToken("123")
if err == nil {
t.Errorf("GrantNewAccessTokenFromRefreshToken must return error for invalid refresh token")
}
} | explode_data.jsonl/18447 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 94
} | [
2830,
3393,
67971,
3564,
37649,
3830,
14567,
3323,
1155,
353,
8840,
836,
8,
341,
1444,
11,
716,
1669,
1532,
2959,
8623,
2959,
915,
11,
1273,
19773,
11,
5333,
3978,
47044,
1611,
692,
197,
6878,
1848,
1669,
272,
1224,
34434,
3564,
37649,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCollection_Find(t *testing.T) {
mgoClient := Ins()
cursor, err := mgoClient.C("test").Find(bson.M{})
if err != nil {
t.Errorf("Find error: %s", err)
t.FailNow()
}
defer cursor.Close()
resultAll := bson.A{}
if err := cursor.All(&resultAll); err != nil {
t.Errorf("Find all error: %s", err)
t.Fail... | explode_data.jsonl/30095 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 331
} | [
2830,
3393,
6482,
95245,
1155,
353,
8840,
836,
8,
341,
2109,
3346,
2959,
1669,
9726,
741,
55948,
11,
1848,
1669,
296,
3346,
2959,
727,
445,
1944,
1827,
9885,
1883,
930,
1321,
37790,
743,
1848,
961,
2092,
341,
197,
3244,
13080,
445,
98... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAgent_Join(t *testing.T) {
t.Parallel()
a1 := NewTestAgent(t.Name(), "")
defer a1.Shutdown()
a2 := NewTestAgent(t.Name(), "")
defer a2.Shutdown()
addr := fmt.Sprintf("127.0.0.1:%d", a2.Config.SerfPortLAN)
req, _ := http.NewRequest("PUT", fmt.Sprintf("/v1/agent/join/%s", addr), nil)
obj, err := a1.srv.... | explode_data.jsonl/33602 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 307
} | [
2830,
3393,
16810,
10598,
1961,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
11323,
16,
1669,
1532,
2271,
16810,
1155,
2967,
1507,
14676,
16867,
264,
16,
10849,
18452,
741,
11323,
17,
1669,
1532,
2271,
16810,
1155,
2967,
1507,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStopperMultipleStopees(t *testing.T) {
const count = 3
s := stop.NewStopper()
for i := 0; i < count; i++ {
s.RunWorker(func() {
<-s.ShouldStop()
})
}
done := make(chan struct{})
go func() {
s.Stop()
close(done)
}()
select {
case <-done:
case <-time.After(10 * time.Millisecond):
t.Erro... | explode_data.jsonl/2420 | {
"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,
10674,
712,
32089,
623,
2792,
288,
1155,
353,
8840,
836,
8,
341,
4777,
1760,
284,
220,
18,
198,
1903,
1669,
2936,
7121,
10674,
712,
2822,
2023,
600,
1669,
220,
15,
26,
600,
366,
1760,
26,
600,
1027,
341,
197,
1903,
16708... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMissionControlChannelUpdate(t *testing.T) {
ctx := createMcTestContext(t)
defer ctx.cleanup()
// Report a policy related failure. Because it is the first, we don't
// expect a penalty.
ctx.reportFailure(
ctx.now, 0,
lnwire.NewFeeInsufficient(0, lnwire.ChannelUpdate{}),
)
ctx.expectP(0, 0.8)
// Re... | explode_data.jsonl/54765 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 194
} | [
2830,
3393,
55951,
3273,
9629,
4289,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
1855,
25286,
2271,
1972,
1155,
340,
16867,
5635,
87689,
2822,
197,
322,
8259,
264,
4842,
5435,
7901,
13,
9211,
432,
374,
279,
1156,
11,
582,
1513,
944,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestStringReplace_Replace_NewVariable(t *testing.T) {
variables := NewVariables()
variables["VAR"] = "bar"
stringReplace := StringReplace{Old: "foo", New: "$VAR"}
assert.Equal(t, "should be bar", stringReplace.Replace("should be foo", variables))
} | explode_data.jsonl/66406 | {
"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,
703,
23107,
62,
23107,
39582,
7827,
1155,
353,
8840,
836,
8,
341,
262,
7332,
1669,
1532,
22678,
741,
262,
7332,
1183,
33040,
1341,
284,
330,
2257,
698,
262,
914,
23107,
1669,
923,
23107,
90,
18284,
25,
330,
7975,
497,
1532... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIsHTTPSRequest(t *testing.T) {
httpRequest := httptest.NewRequest("GET", "http://127.0.0.1:8080", nil)
httpsRequest := httptest.NewRequest("GET", "https://https-request-stub.example.com", nil)
httpsProxiedRequest := httptest.NewRequest("GET", "http://proxied-https-request-stub.example.com", nil)
httpsProxi... | explode_data.jsonl/26661 | {
"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,
3872,
82354,
1900,
1155,
353,
8840,
836,
8,
341,
28080,
1900,
1669,
54320,
70334,
75274,
445,
3806,
497,
330,
1254,
1110,
16,
17,
22,
13,
15,
13,
15,
13,
16,
25,
23,
15,
23,
15,
497,
2092,
340,
197,
2428,
1900,
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... | 3 |
func TestWeightedTaxonomies(t *testing.T) {
t.Parallel()
sources := []source.ByteSource{
{Name: filepath.FromSlash("sect/doc1.md"), Content: pageWithWeightedTaxonomies2},
{Name: filepath.FromSlash("sect/doc2.md"), Content: pageWithWeightedTaxonomies1},
{Name: filepath.FromSlash("sect/doc3.md"), Content: pageWit... | explode_data.jsonl/40675 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 485
} | [
2830,
3393,
8295,
291,
31349,
79346,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
1903,
2360,
1669,
3056,
2427,
32119,
3608,
515,
197,
197,
63121,
25,
26054,
11439,
88004,
445,
9687,
39510,
16,
21324,
3975,
8883,
25,
2150,
2354... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMatCalcCovarMatrix(t *testing.T) {
samples := NewMatWithSize(10, 10, MatTypeCV32F)
covar := NewMat()
mean := NewMat()
CalcCovarMatrix(samples, &covar, &mean, CovarRows, MatTypeCV64F)
if covar.Empty() {
t.Error("TestCalcCovarMatrix dst should not be empty.")
}
samples.Close()
covar.Close()
mean.Close... | explode_data.jsonl/81730 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 139
} | [
2830,
3393,
11575,
47168,
34,
859,
277,
6689,
1155,
353,
8840,
836,
8,
341,
1903,
4023,
1669,
1532,
11575,
2354,
1695,
7,
16,
15,
11,
220,
16,
15,
11,
6867,
929,
19589,
18,
17,
37,
340,
1444,
859,
277,
1669,
1532,
11575,
741,
2109... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLookupRemoteImage(t *testing.T) {
r := spawnTestRegistrySession(t)
found := r.LookupRemoteImage(imageID, makeURL("/v1/"), token)
assertEqual(t, found, true, "Expected remote lookup to succeed")
found = r.LookupRemoteImage("abcdef", makeURL("/v1/"), token)
assertEqual(t, found, false, "Expected remote look... | explode_data.jsonl/78255 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 116
} | [
2830,
3393,
34247,
24703,
1906,
1155,
353,
8840,
836,
8,
341,
7000,
1669,
18042,
2271,
15603,
5283,
1155,
340,
58102,
1669,
435,
79261,
24703,
1906,
10075,
915,
11,
1281,
3144,
4283,
85,
16,
14,
3975,
3950,
340,
6948,
2993,
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 TestParseFilesMessageComments(t *testing.T) {
comp := Compiler{
Resolver: &SourceResolver{},
IncludeSourceInfo: true,
}
ctx := context.Background()
files, err := comp.Compile(ctx, "internal/testprotos/desc_test1.proto")
if !assert.Nil(t, err, "%v", err) {
t.FailNow()
}
comments := ""
expecte... | explode_data.jsonl/18029 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 250
} | [
2830,
3393,
14463,
10809,
2052,
17373,
1155,
353,
8840,
836,
8,
341,
197,
5689,
1669,
45631,
515,
197,
197,
18190,
25,
688,
609,
3608,
18190,
38837,
197,
197,
22283,
3608,
1731,
25,
830,
345,
197,
532,
20985,
1669,
2266,
19047,
741,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestGetUserWithWallet_NewUserSDKError(t *testing.T) {
setupTest()
srv := test.RandServerAddress(t)
sdk := &models.LbrynetServer{
Name: "failing",
Address: "http://failure.test",
}
defer func() { sdk.DeleteG() }()
rt := sdkrouter.NewWithServers(sdk)
url, cleanup := dummyAPI(srv)
defer cleanup()
_,... | explode_data.jsonl/1630 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 233
} | [
2830,
3393,
1949,
1474,
2354,
38259,
39582,
1474,
31534,
1454,
1155,
353,
8840,
836,
8,
341,
84571,
2271,
741,
1903,
10553,
1669,
1273,
2013,
437,
5475,
4286,
1155,
340,
1903,
7584,
1669,
609,
6507,
1214,
65,
884,
4711,
5475,
515,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestAuthMethodGSSAPIWithMIC(t *testing.T) {
type testcase struct {
config *ClientConfig
gssConfig *GSSAPIWithMICConfig
clientWantErr string
serverWantErr string
}
testcases := []*testcase{
{
config: &ClientConfig{
User: "testuser",
Auth: []AuthMethod{
GSSAPIWithMICAuthMethod... | explode_data.jsonl/6951 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2699
} | [
2830,
3393,
5087,
3523,
38,
1220,
7082,
2354,
54961,
1155,
353,
8840,
836,
8,
341,
13158,
70080,
2036,
341,
197,
25873,
286,
353,
2959,
2648,
198,
197,
3174,
778,
2648,
257,
353,
38,
1220,
7082,
2354,
54961,
2648,
198,
197,
25291,
288... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUnimportedCompletion(t *testing.T) {
testenv.NeedsGo1Point(t, 14)
const mod = `
-- go.mod --
module mod.com
go 1.14
require example.com v1.2.3
-- go.sum --
example.com v1.2.3 h1:ihBTGWGjTU3V4ZJ9OmHITkU9WQ4lGdQkMjgyLFk0FaY=
example.com v1.2.3/go.mod h1:Y2Rc5rVWjWur0h3pd9aEvK5Pof8YKDANh9gHA2Maujo=
-- main.g... | explode_data.jsonl/50190 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 774
} | [
2830,
3393,
1806,
474,
291,
33190,
1155,
353,
8840,
836,
8,
341,
18185,
3160,
2067,
68,
6767,
10850,
16,
2609,
1155,
11,
220,
16,
19,
692,
4777,
1463,
284,
22074,
313,
728,
10929,
39514,
4352,
1463,
905,
271,
3346,
220,
16,
13,
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 TestDecoderErrorReporting(t *testing.T) {
Convey("Given a decode failure error report", t, func() {
type Embedded struct {
F int
}
s := struct {
I int `bql:",required"`
FMissing float64 `bql:",required,weaklytyped"`
FWrongType float64 `bql:",required,weaklytyped"`
A s... | explode_data.jsonl/44423 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1043
} | [
2830,
3393,
20732,
1454,
70131,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
445,
22043,
264,
16895,
7901,
1465,
1895,
497,
259,
11,
2915,
368,
341,
197,
13158,
61383,
2036,
341,
298,
12727,
526,
198,
197,
197,
630,
197,
1903,
1669,
203... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGet3NbrEntries(t *testing.T) {
svr := &NDPServer{}
svr.InitGlobalDS()
initServerBasic()
populateNbrInfoTest(svr)
if len(svr.NeighborInfo) < TEST_NBR_ENTRIES || len(svr.neighborKey) < TEST_NBR_ENTRIES {
t.Error("Inserting neighbor entries failed")
}
nextIdx, count, runTimeEntries := svr.GetNeighborEntr... | explode_data.jsonl/38850 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 373
} | [
2830,
3393,
1949,
18,
45,
1323,
24533,
1155,
353,
8840,
836,
8,
341,
1903,
18920,
1669,
609,
8065,
5012,
2836,
16094,
1903,
18920,
26849,
11646,
5936,
741,
28248,
5475,
15944,
741,
74813,
6334,
45,
1323,
1731,
2271,
1141,
18920,
340,
74... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 8 |
func TestCopyTransaction(t *testing.T) {
defer leaktest.AfterTest(t)()
params, _ := tests.CreateTestServerParams()
s, db, _ := serverutils.StartServer(t, params)
defer s.Stopper().Stop(context.TODO())
if _, err := db.Exec(`
CREATE DATABASE d;
SET DATABASE = d;
CREATE TABLE t (
i INT PRIMARY KEY
);
`)... | explode_data.jsonl/2951 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 453
} | [
2830,
3393,
12106,
8070,
1155,
353,
8840,
836,
8,
341,
16867,
23352,
1944,
36892,
2271,
1155,
8,
2822,
25856,
11,
716,
1669,
7032,
7251,
2271,
5475,
4870,
741,
1903,
11,
2927,
11,
716,
1669,
3538,
6031,
12101,
5475,
1155,
11,
3628,
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... | 9 |
func TestLastLineWithLastNewlineShort(t *testing.T) {
filename, err := fs.TempFilenameWithText(shortTextWithLastNewline)
assert.Nil(t, err)
defer os.Remove(filename)
val, err := LastLine(filename)
assert.Nil(t, err)
assert.Equal(t, "last line", val)
} | explode_data.jsonl/37838 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 97
} | [
2830,
3393,
5842,
2460,
2354,
5842,
3564,
1056,
12472,
1155,
353,
8840,
836,
8,
341,
66434,
11,
1848,
1669,
8619,
65009,
20759,
2354,
1178,
37890,
1178,
2354,
5842,
3564,
1056,
340,
6948,
59678,
1155,
11,
1848,
340,
16867,
2643,
13270,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.