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 TestCoders(t *testing.T) {
ptrString := "test *string"
type regTestType struct {
A [4]int
}
schema.RegisterType(reflect.TypeOf((*regTestType)(nil)))
tests := []interface{}{
43,
12431235,
-2,
0,
1,
true,
"a string",
map[int64]string{1: "one", 11: "oneone", 21: "twoone", 1211: "onetwooneone"},... | explode_data.jsonl/50042 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 762
} | [
2830,
3393,
34,
52498,
1155,
353,
8840,
836,
8,
341,
43811,
703,
1669,
330,
1944,
353,
917,
698,
13158,
1217,
2271,
929,
2036,
341,
197,
22985,
508,
19,
63025,
198,
197,
532,
1903,
3416,
81703,
13321,
767,
73921,
26609,
1580,
2271,
92... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Test_hashSQL(t *testing.T) {
tests := []struct {
name string
args string
want string
}{
{"empty", "", "cbf29ce484222325"},
{"one char", "a", "af63fc4c860222ec"},
{"select01", "SELECT * FROM dual", "SELECT6928bed45f95652f"},
{"select02", "SELECT*FROM\tdual", "SELECT*FROM6928bed45f95652f"},
{"selec... | explode_data.jsonl/11095 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 406
} | [
2830,
3393,
8950,
6688,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
31215,
914,
198,
197,
50780,
914,
198,
197,
59403,
197,
197,
4913,
3194,
497,
7342,
330,
7221,
69,
17,
24,
346,
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... | 2 |
func TestAcceptMaxFds(t *testing.T) {
log.SetOutput(ioutil.Discard) // is noisy otherwise
defer log.SetOutput(os.Stderr)
ln := &errorListener{[]error{
&net.OpError{
Op: "accept",
Err: syscall.EMFILE,
}}}
err := Serve(ln, HandlerFunc(HandlerFunc(func(ResponseWriter, *Request) {})))
if err != io.EOF {
... | explode_data.jsonl/22459 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 155
} | [
2830,
3393,
16646,
5974,
37,
5356,
1155,
353,
8840,
836,
8,
341,
6725,
4202,
5097,
1956,
30158,
909,
47560,
8,
442,
374,
49280,
5937,
198,
16867,
1487,
4202,
5097,
9638,
77319,
692,
197,
2261,
1669,
609,
841,
2743,
90,
1294,
841,
515,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestFlush(t *testing.T) {
goqueue_tests.Flush(t, func(size int) interface {
goqueue.Owner
goqueue.Enqueuer
goqueue.Dequeuer
} {
return finite.New(size)
})
} | explode_data.jsonl/54505 | {
"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,
46874,
1155,
353,
8840,
836,
8,
341,
30680,
4584,
32509,
61559,
1155,
11,
2915,
6856,
526,
8,
3749,
341,
197,
30680,
4584,
49920,
198,
197,
30680,
4584,
22834,
591,
8801,
198,
197,
30680,
4584,
8934,
591,
8801,
198,
197,
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 |
func TestMongo_Get(t *testing.T) {
m, skip := prepMongo(t, true) // adds two comments
if skip {
return
}
res, err := m.Find(store.Locator{URL: "https://radio-t.com", SiteID: "radio-t"}, "time")
assert.Nil(t, err)
assert.Equal(t, 2, len(res))
comment, err := m.Get(store.Locator{URL: "https://radio-t.com", Site... | explode_data.jsonl/54195 | {
"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,
54998,
13614,
1155,
353,
8840,
836,
8,
341,
2109,
11,
10706,
1669,
21327,
54998,
1155,
11,
830,
8,
442,
11367,
1378,
6042,
198,
743,
10706,
341,
197,
853,
198,
197,
532,
10202,
11,
1848,
1669,
296,
9998,
31200,
1214,
74328... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDockerCgroupVersion(t *testing.T) {
version := "'\"1\"'\n"
wantVersion := 1
ctx := context.Background()
mockCtrl := gomock.NewController(t)
executable := mockexecutables.NewMockExecutable(mockCtrl)
executable.EXPECT().Execute(ctx, "info", "--format", "'{{json .CgroupVersion}}'").Return(*bytes.NewBuffer... | explode_data.jsonl/6805 | {
"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,
35,
13659,
34,
4074,
5637,
1155,
353,
8840,
836,
8,
341,
74954,
1669,
7178,
2105,
16,
2105,
15777,
77,
698,
50780,
5637,
1669,
220,
16,
271,
20985,
1669,
2266,
19047,
741,
77333,
15001,
1669,
342,
316,
1176,
7121,
2051,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestGenerated(t *testing.T) {
testenv.NeedsGoBuild(t) // This is a lie. We actually need the source code.
onDisk, err := ioutil.ReadFile("command_gen.go")
if err != nil {
t.Fatal(err)
}
generated, err := gen.Generate()
if err != nil {
t.Fatal(err)
}
if !bytes.Equal(onDisk, generated) {
t.Error("com... | explode_data.jsonl/18366 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 145
} | [
2830,
3393,
15741,
1155,
353,
8840,
836,
8,
341,
18185,
3160,
2067,
68,
6767,
10850,
11066,
1155,
8,
442,
1096,
374,
264,
10246,
13,
1205,
3520,
1184,
279,
2530,
2038,
382,
24630,
47583,
11,
1848,
1669,
43144,
78976,
445,
5631,
16322,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTopicFiltersForRunLog_Error(t *testing.T) {
t.Parallel()
jobID := "Q!1eb0e8df314cb894024a38991cff0f"
topics, err := models.TopicFiltersForRunLog([]common.Hash{models.RunLogTopic0}, jobID)
assert.Error(t, err)
assert.Equal(t, [][]common.Hash{}, topics)
} | explode_data.jsonl/67469 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 115
} | [
2830,
3393,
26406,
28351,
2461,
6727,
2201,
28651,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
68577,
915,
1669,
330,
48,
0,
16,
3065,
15,
68,
23,
2940,
18,
16,
19,
7221,
23,
24,
19,
15,
17,
19,
64,
18,
23,
24,
24,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestImageAttachmentToStep(t *testing.T) {
allure.Test(t, allure.Description("testing an image attachment"), allure.Action(func() {
allure.Step(allure.Description("adding an image attachment"), allure.Action(func() {
dat, err := ioutil.ReadFile("../Coryphaena_hippurus.png")
if err != nil {
log.Println(... | explode_data.jsonl/58995 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 160
} | [
2830,
3393,
1906,
33569,
1249,
8304,
1155,
353,
8840,
836,
8,
341,
50960,
552,
8787,
1155,
11,
87403,
28773,
445,
8840,
458,
2168,
19984,
3975,
87403,
11360,
18552,
368,
341,
197,
50960,
552,
68402,
20388,
552,
28773,
445,
2998,
458,
21... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStorageSmartContract_addBlobber_preventDuplicates(t *testing.T) {
var (
ssc = newTestStorageSC()
balances = newTestBalances(t, false)
tp int64 = 100
blobbers *StorageNodes
err error
)
setConfig(t, balances)
var blob = newClient(0, balances)
blob.terms = avgTerms
bl... | explode_data.jsonl/32338 | {
"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,
5793,
33817,
14067,
2891,
37985,
652,
10442,
684,
76851,
1155,
353,
8840,
836,
8,
341,
2405,
2399,
197,
34472,
66,
310,
284,
501,
2271,
5793,
3540,
741,
197,
2233,
278,
3020,
981,
284,
501,
2271,
37889,
3020,
1155,
11,
895... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestString(t *testing.T) {
tests := []string{
"no-u-rg-dkzzzz",
}
for i, s := range tests {
tag := Make(s)
if tag.String() != s {
t.Errorf("%d:%s: got %s: want %s (%#v)", i, s, tag.String(), s, tag)
}
}
} | explode_data.jsonl/15830 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 112
} | [
2830,
3393,
703,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
917,
515,
197,
197,
1,
2152,
45381,
12,
1984,
1737,
74,
10400,
10400,
756,
197,
532,
2023,
600,
11,
274,
1669,
2088,
7032,
341,
197,
60439,
1669,
7405,
1141,
340,
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 TestUpdateRuntimeConfigurationVMConfig(t *testing.T) {
assert := assert.New(t)
vcpus := uint(2)
mem := uint32(2048)
config := oci.RuntimeConfig{}
expectedVMConfig := mem
tomlConf := tomlConfig{
Hypervisor: map[string]hypervisor{
qemuHypervisorTableType: {
NumVCPUs: int32(vcpus),
MemorySize:... | explode_data.jsonl/11748 | {
"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,
4289,
15123,
7688,
11187,
2648,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
5195,
4672,
355,
1669,
2622,
7,
17,
340,
14145,
1669,
2622,
18,
17,
7,
17,
15,
19,
23,
692,
25873,
1669,
93975,
16706,
2648... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUnmarshal(t *testing.T) {
type Detail struct {
Build *int
IsProduction *bool
}
type Model struct {
Name *string
Version *float64
Detail *Detail
}
req := Request{
LogicalResourceID: "foo",
previousResourcePropertiesBody: []byte(`{"Name":"bar","Version":"0.1","Detail"... | explode_data.jsonl/16216 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 524
} | [
2830,
3393,
1806,
27121,
1155,
353,
8840,
836,
8,
341,
13158,
25771,
2036,
341,
197,
197,
11066,
286,
353,
396,
198,
197,
197,
3872,
44967,
353,
2641,
198,
197,
630,
13158,
4903,
2036,
341,
197,
21297,
262,
353,
917,
198,
197,
77847,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPeekThenUnreadRune(t *testing.T) {
// This sequence used to cause a crash.
r := NewReader(strings.NewReader("x"))
r.ReadRune()
r.Peek(1)
r.UnreadRune()
r.ReadRune() // Used to panic here
} | explode_data.jsonl/22866 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 83
} | [
2830,
3393,
10197,
1225,
12209,
1806,
878,
49,
2886,
1155,
353,
8840,
836,
8,
341,
197,
322,
1096,
8500,
1483,
311,
5240,
264,
9920,
624,
7000,
1669,
1532,
5062,
51442,
68587,
445,
87,
5455,
7000,
6503,
49,
2886,
741,
7000,
94279,
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 |
func TestExternalType(t *testing.T) {
u, err := uuid.NewUUID()
assert.NoError(t, err)
v := reflect.ValueOf(u)
comments, err := commentsForStruct(v, testDR())
assert.NoError(t, err)
assert.Equal(t, "A UUID is a 128 bit (16 byte) Universal Unique IDentifier as defined in RFC\n4122.\n", comments["_struct"])
} | explode_data.jsonl/54079 | {
"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,
25913,
929,
1155,
353,
8840,
836,
8,
341,
10676,
11,
1848,
1669,
16040,
7121,
24754,
741,
6948,
35699,
1155,
11,
1848,
340,
5195,
1669,
8708,
6167,
2124,
8154,
340,
197,
14727,
11,
1848,
1669,
6042,
2461,
9422,
3747,
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... | 1 |
func TestInputService3ProtocolTestNestedStructureMembersCase1(t *testing.T) {
svc := NewInputService3ProtocolTest(nil)
svc.Endpoint = "https://test"
input := &InputService3TestShapeInputShape{
StructArg: &InputService3TestShapeStructType{
ScalarArg: aws.String("foo"),
},
}
req, _ := svc.InputService3TestCa... | explode_data.jsonl/53203 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 274
} | [
2830,
3393,
2505,
1860,
18,
20689,
2271,
71986,
22952,
24371,
4207,
16,
1155,
353,
8840,
836,
8,
341,
1903,
7362,
1669,
1532,
2505,
1860,
18,
20689,
2271,
27907,
340,
1903,
7362,
90409,
284,
330,
2428,
1110,
1944,
1837,
22427,
1669,
609... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestValidateApiGatewayIntegrationType(t *testing.T) {
type testCases struct {
Value string
ErrCount int
}
invalidCases := []testCases{
{
Value: "incorrect",
ErrCount: 1,
},
{
Value: "aws_proxy",
ErrCount: 1,
},
}
for _, tc := range invalidCases {
_, errors := validateApiGa... | explode_data.jsonl/78587 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 365
} | [
2830,
3393,
17926,
6563,
40709,
52464,
929,
1155,
353,
8840,
836,
8,
341,
13158,
1273,
37302,
2036,
341,
197,
47399,
262,
914,
198,
197,
197,
7747,
2507,
526,
198,
197,
630,
197,
11808,
37302,
1669,
3056,
1944,
37302,
515,
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... | 5 |
func TestGetNetError(t *testing.T) {
// The error from os.Stat for a non-existent file satisfies the
// net.Error interface.
_, err := os.Stat("non-existent-file")
var invalidAddrErr *net.InvalidAddrError
var unknownNetworkError *net.UnknownNetworkError
table := []struct {
name string
err ... | explode_data.jsonl/3525 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 842
} | [
2830,
3393,
1949,
6954,
1454,
1155,
353,
8840,
836,
8,
341,
197,
322,
576,
1465,
504,
2643,
53419,
369,
264,
2477,
59828,
1034,
67901,
279,
198,
197,
322,
4179,
6141,
3749,
624,
197,
6878,
1848,
1669,
2643,
53419,
445,
6280,
59828,
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 TestKMSEndpoint(t *testing.T) {
endpointField := field.NewPath("Resource").Index(0).Child("Provider").Index(0).Child("kms").Child("endpoint")
testCases := []struct {
desc string
in *config.KMSConfiguration
want field.ErrorList
}{
{
desc: "valid endpoint",
in: &config.KMSConfiguration{Endpoint:... | explode_data.jsonl/75103 | {
"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,
65651,
925,
303,
2768,
1155,
353,
8840,
836,
8,
341,
6246,
2768,
1877,
1669,
2070,
7121,
1820,
445,
4783,
1827,
1552,
7,
15,
568,
3652,
445,
5179,
1827,
1552,
7,
15,
568,
3652,
445,
74,
1011,
1827,
3652,
445,
32540,
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... | 2 |
func TestConfigureSecurityGroupPermissionsSkipReadOnly(t *testing.T) {
driver := NewTestDriver()
driver.SecurityGroupReadOnly = true
perms, err := driver.configureSecurityGroupPermissions(securityGroupNoIpPermissions)
assert.Nil(t, err)
assert.Len(t, perms, 0)
} | explode_data.jsonl/7407 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 87
} | [
2830,
3393,
28560,
15352,
2808,
23851,
35134,
20914,
1155,
353,
8840,
836,
8,
341,
33652,
1669,
1532,
2271,
11349,
741,
33652,
21567,
2808,
20914,
284,
830,
198,
197,
87772,
11,
1848,
1669,
5579,
21343,
15352,
2808,
23851,
10478,
3666,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestContext(t *testing.T) {
var ( // Capture in handler
gotTokSrc oidc.TokenSource
gotClaims *oidc.Claims
gotRaw string
)
protected := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
gotTokSrc = TokenSourceFromContext(r.Context())
gotClaims = ClaimsFromContext(r.Context())
gotRaw ... | explode_data.jsonl/77570 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 664
} | [
2830,
3393,
1972,
1155,
353,
8840,
836,
8,
341,
2405,
320,
442,
39885,
304,
7013,
198,
197,
3174,
354,
52854,
20360,
48766,
66,
32277,
3608,
198,
197,
3174,
354,
51133,
353,
588,
66,
78625,
198,
197,
3174,
354,
20015,
262,
914,
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 TestMarshalWithCustomValidation(t *testing.T) {
msg := dynamicMessage{RawJson: `{ "foo": "bar", "baz": [0, 1, 2, 3] }`, Dummy: &dynamicMessage{}}
js, err := new(Marshaler).MarshalToString(&msg)
if err != nil {
t.Errorf("an unexpected error occurred when marshaling to json: %v", err)
}
err = Unmarshal(strin... | explode_data.jsonl/63118 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 165
} | [
2830,
3393,
55438,
2354,
10268,
13799,
1155,
353,
8840,
836,
8,
341,
21169,
1669,
8741,
2052,
90,
20015,
5014,
25,
53692,
330,
7975,
788,
330,
2257,
497,
330,
42573,
788,
508,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
60,
335,
78... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGameServerCountPorts(t *testing.T) {
fixture := &GameServer{Spec: GameServerSpec{Ports: []GameServerPort{
{PortPolicy: Dynamic},
{PortPolicy: Dynamic},
{PortPolicy: Dynamic},
{PortPolicy: Static},
}}}
assert.Equal(t, 3, fixture.CountPorts(Dynamic))
assert.Equal(t, 1, fixture.CountPorts(Static))
} | explode_data.jsonl/19636 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 117
} | [
2830,
3393,
4868,
5475,
2507,
68273,
1155,
353,
8840,
836,
8,
341,
1166,
12735,
1669,
609,
4868,
5475,
90,
8327,
25,
4050,
5475,
8327,
90,
68273,
25,
3056,
4868,
5475,
7084,
515,
197,
197,
90,
7084,
13825,
25,
21886,
1583,
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... | 1 |
func TestDiffEnsureOnlyKmsgAndPtmx(t *testing.T) {
runCmd := exec.Command(dockerBinary, "run", "-d", "busybox", "sleep", "0")
out, _, err := runCommandWithOutput(runCmd)
if err != nil {
t.Fatal(out, err)
}
cleanCID := strings.TrimSpace(out)
diffCmd := exec.Command(dockerBinary, "diff", cleanCID)
out, _, err ... | explode_data.jsonl/35833 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 530
} | [
2830,
3393,
21751,
64439,
7308,
42,
3236,
3036,
47,
13730,
87,
1155,
353,
8840,
836,
8,
341,
56742,
15613,
1669,
3883,
12714,
1500,
13659,
21338,
11,
330,
6108,
497,
6523,
67,
497,
330,
78467,
2011,
497,
330,
25809,
497,
330,
15,
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... | 6 |
func TestGetSeverity(t *testing.T) {
t.Run("should success severity", func(t *testing.T) {
vuln := &dependencyCheckVulnerability{}
vuln.Severity = "highest"
assert.Equal(t, severities.Critical, vuln.getSeverity())
vuln.Severity = "critical"
assert.Equal(t, severities.Critical, vuln.getSeverity())
vuln.S... | explode_data.jsonl/47642 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 312
} | [
2830,
3393,
1949,
65594,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
5445,
2393,
29920,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
5195,
360,
77,
1669,
609,
53690,
3973,
53,
58401,
2897,
31483,
197,
5195,
360,
77,
808,
2054,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInsertShardedFail(t *testing.T) {
invschema := &vschemapb.SrvVSchema{
Keyspaces: map[string]*vschemapb.Keyspace{
"sharded": {
Sharded: true,
Vindexes: map[string]*vschemapb.Vindex{
"primary": {
Type: "lookup_unique",
Params: map[string]string{
"table": "prim",
"from... | explode_data.jsonl/55987 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 630
} | [
2830,
3393,
13780,
2016,
20958,
19524,
1155,
353,
8840,
836,
8,
341,
17430,
11562,
3416,
1669,
609,
11562,
2407,
391,
65,
808,
10553,
53,
8632,
515,
197,
197,
8850,
27338,
25,
2415,
14032,
8465,
11562,
2407,
391,
65,
37863,
1306,
515,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestIsConnTimeoutForFundamentalTimeouts(t *testing.T) {
// Generate a networking timeout
tcpAddr := GetFreeLocalhostAddrPort()
dialer := DialTCPFn(tcpAddr, time.Millisecond, ed25519.GenPrivKey())
_, err := dialer()
assert.Error(t, err)
assert.True(t, IsConnTimeout(err))
} | explode_data.jsonl/67895 | {
"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,
3872,
9701,
7636,
2461,
58340,
43086,
7636,
82,
1155,
353,
8840,
836,
8,
341,
197,
322,
19813,
264,
28030,
9632,
198,
3244,
4672,
13986,
1669,
2126,
10940,
7319,
3790,
13986,
7084,
741,
2698,
530,
261,
1669,
66155,
49896,
24... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestMatFlip(t *testing.T) {
src := NewMatWithSize(10, 10, MatTypeCV32F)
defer src.Close()
dst := NewMat()
defer dst.Close()
Flip(src, &dst, 0)
if dst.Empty() {
t.Error("TestMatFlip dst should not be empty.")
}
if dst.Rows() != src.Rows() {
t.Error("TestMatFlip src and dst size should be same.")
}
} | explode_data.jsonl/81742 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 136
} | [
2830,
3393,
11575,
46808,
1155,
353,
8840,
836,
8,
341,
41144,
1669,
1532,
11575,
2354,
1695,
7,
16,
15,
11,
220,
16,
15,
11,
6867,
929,
19589,
18,
17,
37,
340,
16867,
2286,
10421,
2822,
52051,
1669,
1532,
11575,
741,
16867,
10648,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSVG(t *testing.T) {
tcs := []struct {
name string
test func(*testing.T)
}{
{"empty svg", empty},
{"svg with a point", withAPoint},
{"svg with a multipoint", withAMultiPoint},
{"svg with a linestring", withALineString},
{"svg with a multilinestring", withAMultiLineString},
{"svg with a polygon... | explode_data.jsonl/77427 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 330
} | [
2830,
3393,
64397,
1155,
353,
8840,
836,
8,
341,
3244,
4837,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
18185,
2915,
4071,
8840,
836,
340,
197,
59403,
197,
197,
4913,
3194,
26852,
497,
4287,
1583,
197,
197,
4913,
15196,
448,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestDeviceTags(t *testing.T) {
db := tests.Tempfile()
defer os.Remove(db)
// Create the app
app := glusterfs.NewTestApp(db)
defer app.Close()
// Setup the server
ts := setupHeketiServer(app)
defer ts.Close()
// Create cluster
c := NewClient(ts.URL, "admin", TEST_ADMIN_KEY)
tests.Assert(t, c != nil)
... | explode_data.jsonl/18017 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1852
} | [
2830,
3393,
6985,
15930,
1155,
353,
8840,
836,
8,
341,
20939,
1669,
7032,
65009,
1192,
741,
16867,
2643,
13270,
9791,
692,
197,
322,
4230,
279,
906,
198,
28236,
1669,
2770,
4993,
3848,
7121,
2271,
2164,
9791,
340,
16867,
906,
10421,
282... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBundleSignVerification(t *testing.T) {
// files to be included in the bundle
files := map[string]string{
"/.manifest": `{"revision": "quickbrownfaux"}`,
"/a/b/c/data.json": "[1,2,3]",
"/a/b/d/data.json": "true",
"/a/b/y/data.yaml": `foo: 1`,
"/example/example.rego": `pack... | explode_data.jsonl/46764 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 722
} | [
2830,
3393,
8409,
7264,
62339,
1155,
353,
8840,
836,
8,
1476,
197,
322,
3542,
311,
387,
5230,
304,
279,
12894,
198,
74075,
1669,
2415,
14032,
30953,
515,
197,
197,
3115,
13,
42315,
788,
310,
1565,
4913,
28342,
788,
330,
27763,
64461,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestContext2Plan_destroy(t *testing.T) {
m := testModule(t, "plan-destroy")
p := testProvider("aws")
p.DiffFn = testDiffFn
s := MustShimLegacyState(&State{
Modules: []*ModuleState{
&ModuleState{
Path: rootModulePath,
Resources: map[string]*ResourceState{
"aws_instance.one": &ResourceState{
... | explode_data.jsonl/28689 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 628
} | [
2830,
3393,
1972,
17,
20485,
18066,
1155,
353,
8840,
836,
8,
341,
2109,
1669,
1273,
3332,
1155,
11,
330,
10393,
12,
15518,
1138,
3223,
1669,
1273,
5179,
445,
8635,
1138,
3223,
98063,
24911,
284,
1273,
21751,
24911,
198,
1903,
1669,
1546... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCancelUnknownJob(t *testing.T) {
ctx := context.Background()
s, err := standard.New(ctx, standard.WithLogLevel(zerolog.Disabled), standard.WithMonitor(&nullmetrics.Service{}))
require.NoError(t, err)
require.NotNil(t, s)
assert.EqualError(t, s.CancelJob(ctx, "Unknown job"), scheduler.ErrNoSuchJob.Error()... | explode_data.jsonl/44209 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 117
} | [
2830,
3393,
9269,
13790,
12245,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
1903,
11,
1848,
1669,
5297,
7121,
7502,
11,
5297,
26124,
72676,
7,
7070,
1609,
89576,
701,
5297,
26124,
30098,
2099,
2921,
43262,
13860,
6257,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAPIReposGitBlobs(t *testing.T) {
defer prepareTestEnv(t)()
user2 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}).(*user_model.User) // owner of the repo1 & repo16
user3 := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 3}).(*user_model.User) // owner of the repo3
user4... | explode_data.jsonl/74268 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1533
} | [
2830,
3393,
7082,
693,
966,
46562,
33,
68164,
1155,
353,
8840,
836,
8,
341,
16867,
10549,
2271,
14359,
1155,
8,
741,
19060,
17,
1669,
19905,
11711,
15575,
3036,
5879,
10437,
1155,
11,
609,
872,
5047,
7344,
90,
915,
25,
220,
17,
16630,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDefaultValues(t *testing.T) {
actual := wsFromFile(t, "./testdata/wallets_extra.json")
expected := WalletStore{
Wallets: []cash.GenesisAccount{
{
Address: toWeaveAddress(t, "3AFCDAB4CFBF066E959D139251C8F0EE91E99D5A"),
Set: cash.Set{
Coins: []*coin.Coin{
{
Ticker: "IOV",
... | explode_data.jsonl/11365 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1025
} | [
2830,
3393,
3675,
6227,
1155,
353,
8840,
836,
8,
341,
88814,
1669,
17624,
43633,
1155,
11,
5924,
92425,
6324,
7464,
82,
31858,
4323,
1138,
42400,
1669,
36483,
6093,
515,
197,
17300,
7464,
82,
25,
3056,
41271,
65384,
13774,
7365,
515,
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 TestRsyncCmd(t *testing.T) {
encoderCfg := zapcore.EncoderConfig{
MessageKey: "msg",
LevelKey: "level",
NameKey: "logger",
EncodeLevel: zapcore.LowercaseLevelEncoder,
EncodeTime: zapcore.ISO8601TimeEncoder,
EncodeDuration: zapcore.StringDurationEncoder,
}
core := zapcore.NewC... | explode_data.jsonl/65810 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 495
} | [
2830,
3393,
49,
12996,
15613,
1155,
353,
8840,
836,
8,
341,
197,
27008,
42467,
1669,
32978,
2153,
26598,
4316,
2648,
515,
197,
46733,
1592,
25,
257,
330,
3236,
756,
197,
197,
4449,
1592,
25,
981,
330,
3294,
756,
197,
21297,
1592,
25,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestHelperCreate(t *testing.T) {
expectPost := func(req *http.Request) bool {
if req.Method != "POST" {
t.Errorf("unexpected method: %#v", req)
return false
}
parts := splitPath(req.URL.Path)
if parts[1] != "bar" {
t.Errorf("url doesn't contain namespace: %#v", req)
return false
}
return t... | explode_data.jsonl/64157 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1416
} | [
2830,
3393,
5511,
4021,
1155,
353,
8840,
836,
8,
341,
24952,
4133,
1669,
2915,
6881,
353,
1254,
9659,
8,
1807,
341,
197,
743,
4232,
20798,
961,
330,
2946,
1,
341,
298,
3244,
13080,
445,
53859,
1714,
25,
52406,
85,
497,
4232,
340,
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... | 3 |
func TestVersionSkewFilterDenySkewed(t *testing.T) {
verbs := []string{"PUT", "DELETE"}
doNothingHandler := http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
})
config := MasterConfig{}
config.Options.PolicyConfig.UserAgentMatchingConfig.RequiredClients = []configapi.UserAgentMatchRule{
{Regex: `... | explode_data.jsonl/16337 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 689
} | [
2830,
3393,
5637,
19290,
365,
5632,
23619,
88,
19290,
92076,
1155,
353,
8840,
836,
8,
341,
197,
54939,
1669,
3056,
917,
4913,
6221,
497,
330,
14424,
16707,
19935,
23780,
3050,
1669,
1758,
89164,
18552,
3622,
1758,
37508,
11,
4232,
353,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestWithNothing(t *testing.T) {
r1 := mocks.NewRequest()
r2, err := Prepare(r1, WithNothing())
if err != nil {
t.Fatalf("autorest: WithNothing returned an unexpected error (%v)", err)
}
if !reflect.DeepEqual(r1, r2) {
t.Fatal("azure: WithNothing modified the passed HTTP Request")
}
} | explode_data.jsonl/20949 | {
"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,
2354,
23780,
1155,
353,
8840,
836,
8,
972,
7000,
16,
1669,
68909,
75274,
3568,
7000,
17,
11,
1848,
1669,
31166,
2601,
16,
11,
3085,
23780,
13116,
743,
1848,
961,
2092,
972,
197,
3244,
30762,
445,
2717,
41419,
25,
3085,
237... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func Test_Mock_Called_For_SetTime_Expectation(t *testing.T) {
var mockedService = new(TestExampleImplementation)
mockedService.On("TheExampleMethod", 1, 2, 3).Return(5, "6", true).Times(4)
mockedService.TheExampleMethod(1, 2, 3)
mockedService.TheExampleMethod(1, 2, 3)
mockedService.TheExampleMethod(1, 2... | explode_data.jsonl/8595 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 185
} | [
2830,
3393,
1245,
1176,
920,
4736,
84368,
14812,
1462,
62,
17536,
367,
1155,
353,
8840,
836,
8,
8022,
2405,
46149,
1860,
284,
501,
31159,
13314,
36850,
7229,
2109,
67385,
1860,
8071,
445,
785,
13314,
3523,
497,
220,
16,
11,
220,
17,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestDeleteFromBuffer(t *testing.T) {
// prepare
buffer := newRingBuffer(2)
traceID := pdata.NewTraceID([]byte{1, 2, 3, 4})
buffer.put(traceID)
// test
deleted := buffer.delete(traceID)
// verify
assert.True(t, deleted)
assert.False(t, buffer.contains(traceID))
} | explode_data.jsonl/74368 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 108
} | [
2830,
3393,
6435,
3830,
4095,
1155,
353,
8840,
836,
8,
341,
197,
322,
10549,
198,
31122,
1669,
501,
43466,
4095,
7,
17,
340,
65058,
915,
1669,
70311,
7121,
6550,
915,
10556,
3782,
90,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
351... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIntegrationTLSConnectUnknownDNS(t *testing.T) {
ctx := context.Background()
results := TLSConnect(ctx, TLSConnectConfig{
Address: "ooni.io:443",
DNSServerNetwork: "antani",
})
if !strings.HasSuffix(results.Error.Error(), "unsupported network value") {
t.Fatal("not the error that we expected"... | explode_data.jsonl/53541 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 120
} | [
2830,
3393,
52464,
45439,
14611,
13790,
61088,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
55497,
1669,
41654,
14611,
7502,
11,
41654,
14611,
2648,
515,
197,
98090,
25,
688,
330,
9009,
72,
4245,
25,
19,
19,
18,
756,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestPollServices(t *testing.T) {
clus := &api.EtcdCluster{
ObjectMeta: metav1.ObjectMeta{
Name: "example-etcd-cluster123456789123456789123456789123456789123456",
Namespace: metav1.NamespaceDefault,
UID: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
},
}
tests := []struct {
name string
... | explode_data.jsonl/57632 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1788
} | [
2830,
3393,
49207,
11025,
1155,
353,
8840,
836,
8,
341,
197,
4163,
1669,
609,
2068,
5142,
83,
4385,
28678,
515,
197,
23816,
12175,
25,
77520,
16,
80222,
515,
298,
21297,
25,
414,
330,
8687,
96010,
4385,
93208,
16,
17,
18,
19,
20,
21... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWriteProxyMetric(t *testing.T) {
tests := map[string]struct {
proxyMetrics RouteMetric
total testMetric
valid testMetric
invalid testMetric
orphaned testMetric
root testMetric
}{
"simple": {
proxyMetrics: RouteMetric{
Total: map[Meta]int{
{Namespace: "... | explode_data.jsonl/10548 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2245
} | [
2830,
3393,
7985,
16219,
54310,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
2415,
14032,
60,
1235,
341,
197,
197,
22803,
27328,
9572,
54310,
198,
197,
34493,
286,
1273,
54310,
198,
197,
56322,
286,
1273,
54310,
198,
197,
197,
11808,
414,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLockCheckInvertedStack(t *testing.T) {
runTest(t, func(test *testHelper) {
test.ExpectedErrors = make(map[string]struct{})
test.ExpectedErrors["ERROR: "+lockInversionLog] = struct{}{}
test.ExpectedErrors["ERROR: Stack: %s\n%s"] = struct{}{}
workspace := test.NewWorkspace()
test.AssertNoErr(testutil... | explode_data.jsonl/1833 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 338
} | [
2830,
3393,
11989,
3973,
641,
21630,
4336,
1155,
353,
8840,
836,
8,
341,
56742,
2271,
1155,
11,
2915,
8623,
353,
1944,
5511,
8,
341,
197,
18185,
5121,
4046,
13877,
284,
1281,
9147,
14032,
60,
1235,
37790,
197,
18185,
5121,
4046,
13877,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetRuleReceiptLog(t *testing.T) {
pre := &auty.AutonomyProposalRule{
PropRule: &auty.ProposalRule{Year: 1800, Month: 1},
VoteResult: &auty.VoteResult{TotalVotes: 100},
Status: 1,
Address: "121",
}
cur := &auty.AutonomyProposalRule{
PropRule: &auty.ProposalRule{Year: 1900, Month: 1},
V... | explode_data.jsonl/34709 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 309
} | [
2830,
3393,
1949,
11337,
67461,
2201,
1155,
353,
8840,
836,
8,
341,
40346,
1669,
609,
57951,
875,
332,
16974,
98637,
11337,
515,
197,
197,
2008,
11337,
25,
256,
609,
57951,
42483,
32556,
11337,
90,
9490,
25,
220,
16,
23,
15,
15,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestMinimizeCallIndex(t *testing.T) {
target, rs, iters := initTest(t)
ct := target.DefaultChoiceTable()
r := rand.New(rs)
for i := 0; i < iters; i++ {
p := target.Generate(rs, 5, ct)
ci := r.Intn(len(p.Calls))
p1, ci1 := Minimize(p, ci, r.Intn(2) == 0, func(p1 *Prog, callIndex int) bool {
return r.In... | explode_data.jsonl/78063 | {
"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,
6217,
11853,
7220,
1552,
1155,
353,
8840,
836,
8,
341,
28861,
11,
10036,
11,
432,
388,
1669,
2930,
2271,
1155,
340,
89216,
1669,
2169,
13275,
24728,
2556,
741,
7000,
1669,
10382,
7121,
17027,
340,
2023,
600,
1669,
220,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestEndpointDeleteWithActiveContainer(t *testing.T) {
if !testutils.IsRunningInContainer() {
defer testutils.SetupTestOSContext(t)()
}
n, err := createTestNetwork(bridgeNetType, "testnetwork", options.Generic{
netlabel.GenericData: options.Generic{
"BridgeName": "testnetwork",
},
}, nil, nil)
if err... | explode_data.jsonl/6366 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 525
} | [
2830,
3393,
27380,
6435,
2354,
5728,
4502,
1155,
353,
8840,
836,
8,
341,
743,
753,
1944,
6031,
4506,
18990,
641,
4502,
368,
341,
197,
16867,
1273,
6031,
39820,
2271,
3126,
1972,
1155,
8,
741,
197,
630,
9038,
11,
1848,
1669,
1855,
2271... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRenderSimpleElseStatement(t *testing.T) {
template, _ := ParseString("A-{% if 0 == 2 %}in if{% elseif 2 == 0 %}in elseif{% else %}in else{% endif %}-Z", nil)
assertRender(t, template, nil, `A-in else-Z`)
} | explode_data.jsonl/42415 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 87
} | [
2830,
3393,
6750,
16374,
22971,
8636,
1155,
353,
8840,
836,
8,
341,
22832,
11,
716,
1669,
14775,
703,
445,
32,
63347,
4,
421,
220,
15,
621,
220,
17,
1018,
92,
258,
421,
66365,
11755,
220,
17,
621,
220,
15,
1018,
92,
258,
11755,
66... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConfigGetProvider(t *testing.T) {
assert := assert.New(t)
c, _ := NewConfig([]string{})
// Should be able to get "google" provider
p, err := c.GetProvider("google")
assert.Nil(err)
assert.Equal(&c.Providers.Google, p)
// Should be able to get "oidc" provider
p, err = c.GetProvider("oidc")
assert.Nil... | explode_data.jsonl/33762 | {
"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,
2648,
1949,
5179,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
340,
1444,
11,
716,
1669,
1532,
2648,
10556,
917,
6257,
692,
197,
322,
12260,
387,
2952,
311,
633,
330,
17485,
1,
9109,
198,
3223,
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... | 2 |
func TestAnalyticsSettings(t *testing.T) {
assertRate := func(t *testing.T, mt mocktracer.Tracer, rate interface{}, opts ...ClientOption) {
client := NewClient(&redis.Options{Addr: "127.0.0.1:6379"}, opts...)
client.Set("test_key", "test_value", 0)
pipeline := client.Pipeline()
pipeline.Expire("pipeline_counte... | explode_data.jsonl/43240 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 671
} | [
2830,
3393,
60539,
6086,
1155,
353,
8840,
836,
8,
341,
6948,
11564,
1669,
2915,
1155,
353,
8840,
836,
11,
11965,
7860,
94941,
8240,
9584,
11,
4379,
3749,
22655,
12185,
2503,
2959,
5341,
8,
341,
197,
25291,
1669,
1532,
2959,
2099,
21748,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTimerSave(t *testing.T) {
Config.Retentions = []Retention{{10, 10, 100, 0}, {20, 10, 200, 1}}
Config.RedisHost = "127.0.0.1"
Config.RedisPort = 6379
SetupDatastore()
timer := NewTimer("testttttt").(*Timer)
timer.Values[0] = []float64{1, 2, 3, 4, 5}
now := time.Now()
go func() {
obs := <-datastore.re... | explode_data.jsonl/4425 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 438
} | [
2830,
3393,
10105,
8784,
1155,
353,
8840,
836,
8,
341,
66156,
52846,
63701,
284,
3056,
86329,
2979,
16,
15,
11,
220,
16,
15,
11,
220,
16,
15,
15,
11,
220,
15,
2137,
314,
17,
15,
11,
220,
16,
15,
11,
220,
17,
15,
15,
11,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestFormatterForegroundColors(test *testing.T) {
formatted, err := formatter.Format("{yellow | foreground}yellow{normal}")
assert.NoError(test, err)
assert.Equal(test, "\x1b[33myellow\x1b[0m", formatted)
} | explode_data.jsonl/39761 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 78
} | [
2830,
3393,
14183,
25982,
13108,
8623,
353,
8840,
836,
8,
341,
37410,
12127,
11,
1848,
1669,
24814,
9978,
13976,
27869,
760,
39305,
92,
27869,
90,
8252,
55266,
6948,
35699,
8623,
11,
1848,
340,
6948,
12808,
8623,
11,
2917,
87,
16,
65,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBoundedReadWriteSeeker_Seek__SeekEnd_Positive(t *testing.T) {
sb := NewSeekableBuffer()
brws, err := NewBoundedReadWriteSeeker(sb, 55, 99)
log.PanicIf(err)
_, err = brws.Seek(10, os.SEEK_END)
if err == nil {
t.Fatalf("Expected error for seek beyond boundary.")
} else if err != ErrSeekBeyondBound {
... | explode_data.jsonl/21769 | {
"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,
33,
13082,
58610,
39350,
261,
26920,
1225,
563,
39350,
3727,
44246,
3404,
1155,
353,
8840,
836,
8,
341,
24842,
1669,
1532,
39350,
480,
4095,
2822,
80255,
8915,
11,
1848,
1669,
1532,
33,
13082,
58610,
39350,
261,
36384,
11,
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... | 3 |
func TestAssetYorcAwsParsing(t *testing.T) {
t.Parallel()
reg := registry.GetRegistry()
data, err := reg.GetToscaDefinition("yorc-aws-types.yml")
assert.Nil(t, err, "Can't load yorc aws types")
assert.NotNil(t, data, "Can't load yorc aws types")
var topo Topology
err = yaml.Unmarshal(data, &topo)
assert.Nil(t,... | explode_data.jsonl/28752 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 150
} | [
2830,
3393,
16604,
56,
49822,
47359,
68839,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
37013,
1669,
19424,
2234,
15603,
741,
8924,
11,
1848,
1669,
1217,
2234,
51,
436,
924,
10398,
445,
47220,
66,
12,
8635,
20817,
33936,
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 TestReadNextChunk(t *testing.T) {
s := wire.NewSyncScanner(strings.NewReader(
"DATA\006\000\000\000hello DATA\005\000\000\000worldDONE"))
// Read 1st chunk
reader, err := readNextChunk(s)
assert.NoError(t, err)
assert.Equal(t, int64(6), reader.(*io.LimitedReader).N)
buf := make([]byte, 10)
n, err := read... | explode_data.jsonl/50766 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 338
} | [
2830,
3393,
4418,
5847,
28304,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
9067,
7121,
12154,
31002,
51442,
68587,
1006,
197,
197,
1,
17777,
59,
15,
15,
21,
59,
15,
15,
15,
59,
15,
15,
15,
59,
15,
15,
15,
14990,
14112,
59,
15,
15,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestStr2bytes(t *testing.T) {
Convey("TestStr2bytes", t, func() {
result := Str2bytes("too")
So(result, ShouldNotBeNil)
So(len(result), ShouldEqual, 3)
So(result, ShouldResemble, []byte{116, 111, 111})
})
} | explode_data.jsonl/64730 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 93
} | [
2830,
3393,
2580,
17,
9651,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
445,
2271,
2580,
17,
9651,
497,
259,
11,
2915,
368,
341,
197,
9559,
1669,
4509,
17,
9651,
445,
36127,
1138,
197,
76912,
4456,
11,
12260,
2623,
3430,
19064,
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... | 1 |
func TestMonthlyWithDifferentConfig(t *testing.T) {
defer ResetConfig()
ParseConfig.SetMonthlyPattern(`jeden (\d{1,2})\.?$`)
for i := 1; i <= 28; i++ {
re := parseRe(fmt.Sprintf("[] bla (jeden %d.)", i))
assert.NotNil(t, re)
assert.Equal(t, moment.RecurMonthly, re.Recurrence)
assert.Equal(t, i, re.RefDate.T... | explode_data.jsonl/67516 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 150
} | [
2830,
3393,
72007,
2354,
69123,
2648,
1155,
353,
8840,
836,
8,
341,
16867,
16932,
2648,
741,
10025,
2583,
2648,
4202,
72007,
15760,
5809,
73,
14134,
19788,
67,
90,
16,
11,
17,
5410,
18831,
46311,
63,
692,
2023,
600,
1669,
220,
16,
26,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestControl_PrintStorageScanResponseVerbose(t *testing.T) {
var (
standardScan = control.MockServerScanResp(t, "standard")
withNamespaceScan = control.MockServerScanResp(t, "withNamespace")
noNVMEScan = control.MockServerScanResp(t, "noNVME")
noSCMScan = control.MockServerScanResp(t, "... | explode_data.jsonl/70552 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 3504
} | [
2830,
3393,
3273,
45788,
5793,
26570,
2582,
63404,
1155,
353,
8840,
836,
8,
341,
2405,
2399,
197,
197,
20270,
26570,
414,
284,
2524,
24664,
5475,
26570,
36555,
1155,
11,
330,
20270,
1138,
197,
46948,
22699,
26570,
284,
2524,
24664,
5475,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestReportToString(t *testing.T) {
testCases := []reportToStringTestCase{
reportToStringTestCase{
name: "No items",
expectedString: fmt.Sprintf("\n%sNo problems found.\n%sRun `%s` if you want show pod logs\n\n", paddingLeft, paddingLeft, ansi.Color("devspace logs --pick", "white+b")),
},
rep... | explode_data.jsonl/45356 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 398
} | [
2830,
3393,
10361,
5870,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
11736,
5870,
16458,
515,
197,
69931,
5870,
16458,
515,
298,
11609,
25,
1843,
330,
2753,
3589,
756,
298,
42400,
703,
25,
8879,
17305,
4921,
77,
12952,
2753,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIncorrectMethodName(t *testing.T) {
res, err := requester.GetResponseBodyContract(
launchnet.TestRPCUrl,
requester.ContractRequest{
Request: requester.Request{
Version: "2.0",
ID: 1,
Method: "foo.bar",
},
},
"MEQCIAvgBR42vSccBKynBIC7gb5GffqtW8q2XWRP+DlJ0IeUAiAeKCxZNSSRSsYcz2d49... | explode_data.jsonl/26357 | {
"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,
40468,
75648,
1155,
353,
8840,
836,
8,
341,
10202,
11,
1848,
1669,
83584,
2234,
29637,
14067,
1006,
197,
197,
4260,
359,
2125,
295,
8787,
29528,
2864,
345,
197,
23555,
261,
69465,
1900,
515,
298,
73806,
25,
83584,
9659,
515,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestClient_DescribeVpcs(t *testing.T) {
client := NewVpcTestClientForDebug()
client.SetSecurityToken(TestSecurityToken)
args := &DescribeVpcsArgs{
RegionId: TestRegionID,
Pagination: common.Pagination{
PageNumber: 1,
PageSize: 50,
},
}
vpcs, _, err := client.DescribeVpcs(args)
if err != nil {... | explode_data.jsonl/56411 | {
"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,
2959,
98054,
3114,
53,
47313,
1155,
353,
8840,
836,
8,
341,
25291,
1669,
1532,
53,
3992,
2271,
2959,
2461,
7939,
741,
25291,
4202,
15352,
3323,
31159,
15352,
3323,
692,
31215,
1669,
609,
74785,
53,
47313,
4117,
515,
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... | 2 |
func TestHydraConsent_Error(t *testing.T) {
s, _, _, h, _, err := setupHydraTest(true)
if err != nil {
t.Fatalf("setupHydraTest() failed: %v", err)
}
h.GetConsentRequestResp = &hydraapi.ConsentRequest{}
h.RejectConsentResp = &hydraapi.RequestHandlerResponse{RedirectTo: hydraPublicURL}
// Send Request.
query ... | explode_data.jsonl/18504 | {
"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,
30816,
22248,
15220,
306,
28651,
1155,
353,
8840,
836,
8,
341,
1903,
11,
8358,
8358,
305,
11,
8358,
1848,
1669,
6505,
30816,
22248,
2271,
3715,
340,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
15188,
30816,
22248,
2271... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBitcoinStringer(t *testing.T) {
rx := `^[13][1-9A-Za-z][^OIl]{20,40}`
res := fmt.Sprintf("%s", Bitcoin())
if m, _ := regexp.MatchString(rx, res); !m {
t.Errorf("expected %v to match %v", res, rx)
}
} | explode_data.jsonl/42739 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 102
} | [
2830,
3393,
48287,
703,
261,
1155,
353,
8840,
836,
8,
341,
7000,
87,
1669,
1565,
27736,
16,
18,
1457,
16,
12,
24,
32,
39279,
9141,
1457,
61,
46,
12050,
15370,
17,
15,
11,
19,
15,
31257,
10202,
1669,
8879,
17305,
4430,
82,
497,
131... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSkipElementsContent(t *testing.T) {
input := "<tag>test</tag>"
outputFail := "test"
outputOk := ""
p := NewPolicy()
if output := p.Sanitize(input); output != outputFail {
t.Errorf(
"test failed;\ninput : %s\noutput : %s\nexpected: %s",
input,
output,
outputFail,
)
}
p.SkipElementsC... | explode_data.jsonl/28803 | {
"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,
35134,
11868,
2762,
1155,
353,
8840,
836,
8,
341,
22427,
1669,
4055,
4578,
29,
1944,
522,
4578,
19134,
21170,
19524,
1669,
330,
1944,
698,
21170,
11578,
1669,
35829,
3223,
1669,
1532,
13825,
2822,
743,
2550,
1669,
281,
808,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSSOverTLS(t *testing.T) {
httpSrv := httptest.NewServer(httpTestHandler)
defer httpSrv.Close()
sendData := make([]byte, 128)
rand.Read(sendData)
for i, tc := range ssProxyTests {
err := ssOverTLSRoundtrip(httpSrv.URL, sendData,
nil,
tc.clientCipher,
tc.serverCipher,
)
if err == nil {
i... | explode_data.jsonl/69776 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 242
} | [
2830,
3393,
1220,
1918,
45439,
1155,
353,
8840,
836,
8,
341,
28080,
50,
10553,
1669,
54320,
70334,
7121,
5475,
19886,
2271,
3050,
340,
16867,
1758,
50,
10553,
10421,
2822,
32817,
1043,
1669,
1281,
10556,
3782,
11,
220,
16,
17,
23,
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... | 5 |
func TestTeamsService_ListIDPGroupsForTeamBySlug(t *testing.T) {
client, mux, _, teardown := setup()
defer teardown()
mux.HandleFunc("/orgs/o/teams/slug/team-sync/group-mappings", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "GET")
fmt.Fprint(w, `{"groups": [{"group_id": "1", "group_name": "... | explode_data.jsonl/4555 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 557
} | [
2830,
3393,
60669,
1860,
27104,
915,
47,
22173,
2461,
14597,
1359,
54968,
1155,
353,
8840,
836,
8,
341,
25291,
11,
59807,
11,
8358,
49304,
1669,
6505,
741,
16867,
49304,
2822,
2109,
2200,
63623,
4283,
1775,
82,
20271,
14,
38496,
2687,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestThresholdBreaker(t *testing.T) {
cb := NewThresholdBreaker(2)
if cb.Tripped() {
t.Fatal("expected threshold breaker to be open")
}
cb.Fail()
if cb.Tripped() {
t.Fatal("expected threshold breaker to still be open")
}
cb.Fail()
if !cb.Tripped() {
t.Fatal("expected threshold breaker to be tripped... | explode_data.jsonl/60800 | {
"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,
37841,
22524,
261,
1155,
353,
8840,
836,
8,
341,
63810,
1669,
1532,
37841,
22524,
261,
7,
17,
692,
743,
9858,
836,
461,
6924,
368,
341,
197,
3244,
26133,
445,
7325,
12171,
66767,
311,
387,
1787,
1138,
197,
630,
63810,
5724... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPanics(t *testing.T) {
for i, tt := range panictests {
s := Sprintf(tt.fmt, tt.in)
if s != tt.out {
t.Errorf("%d: %q: got %q expected %q", i, tt.fmt, s, tt.out)
}
}
} | explode_data.jsonl/46268 | {
"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,
35693,
1211,
1155,
353,
8840,
836,
8,
341,
2023,
600,
11,
17853,
1669,
2088,
7215,
849,
17966,
341,
197,
1903,
1669,
328,
2517,
47152,
833,
2501,
11,
17853,
1858,
340,
197,
743,
274,
961,
17853,
2532,
341,
298,
3244,
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 TestParseDDL(t *testing.T) {
querys := []string{"create table t1(a UInt32, b Int32,x String) Engine = Memory"}
for _, query := range querys {
ast, err := Parse(query)
node := ast.(*sqlparser.DDL)
fmt.Printf("%+v, %+v\n", node.TableSpec.Options, err)
buf := sqlparser.NewTrackedBuffer(nil)
node.Format(... | explode_data.jsonl/44459 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 155
} | [
2830,
3393,
14463,
58781,
1155,
353,
8840,
836,
8,
341,
27274,
82,
1669,
3056,
917,
4913,
3182,
1965,
259,
16,
2877,
22275,
18,
17,
11,
293,
1333,
18,
17,
12803,
923,
8,
8200,
284,
13850,
63159,
2023,
8358,
3239,
1669,
2088,
3239,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestTextOverlap(t *testing.T) {
f := &testFace{}
dst, _ := ebiten.NewImage(testFaceSize*2, testFaceSize, ebiten.FilterDefault)
// With testFace, 'b' is rendered at the previous position as 0xff.
// 'a' is rendered at the current position as 0x80.
Draw(dst, "ab", f, 0, 0, color.White)
for j := 0; j < testFac... | explode_data.jsonl/29470 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 409
} | [
2830,
3393,
1178,
82171,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
609,
1944,
16281,
16094,
52051,
11,
716,
1669,
384,
4489,
268,
7121,
1906,
8623,
16281,
1695,
9,
17,
11,
1273,
16281,
1695,
11,
384,
4489,
268,
31696,
3675,
692,
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... | 7 |
func TestPlatformArgsOrString_UnmarshalYAML(t *testing.T) {
testCases := map[string]struct {
inContent []byte
wantedStruct PlatformArgsOrString
wantedError error
}{
"returns error if both string and args specified": {
inContent: []byte(`platform: linux/amd64
osfamily: linux
architecture: amd64`),
... | explode_data.jsonl/79731 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1081
} | [
2830,
3393,
17296,
4117,
2195,
703,
40687,
27121,
56,
31102,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
2415,
14032,
60,
1235,
341,
197,
17430,
2762,
3056,
3782,
271,
197,
6692,
7566,
9422,
17458,
4117,
2195,
703,
198,
197,
6692,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIstanbulConsensus_ValidateShutdown_IsValidatorRpcError(t *testing.T) {
var (
istanbulIsValidatorResp = `{"error": {"code":111,"message":"someerror","data":{"additional":"context"}}}`
istanbulStatusResp = `{"result": {"numBlocks":10, "sealerActivity": {"minterone":10, "mintertwo":10, "minterthree":10,... | explode_data.jsonl/59658 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 335
} | [
2830,
3393,
40,
45116,
15220,
13626,
62,
17926,
62004,
31879,
14256,
60248,
1454,
1155,
353,
8840,
836,
8,
341,
2405,
2399,
197,
197,
8944,
16110,
3872,
14256,
36555,
284,
1565,
4913,
841,
788,
5212,
1851,
788,
16,
16,
16,
1335,
1994,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEnvAddOnManagedNodeGroupsCNI(t *testing.T) {
cfg := NewDefault()
defer func() {
os.RemoveAll(cfg.ConfigPath)
os.RemoveAll(cfg.KubectlCommandsOutputPath)
os.RemoveAll(cfg.RemoteAccessCommandsOutputPath)
}()
os.Setenv("AWS_K8S_TESTER_EKS_ADD_ON_MANAGED_NODE_GROUPS_ENABLE", `true`)
defer os.Unsetenv("... | explode_data.jsonl/69900 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 950
} | [
2830,
3393,
14359,
2212,
1925,
27192,
1955,
22173,
34,
14912,
1155,
353,
8840,
836,
8,
341,
50286,
1669,
1532,
3675,
741,
16867,
2915,
368,
341,
197,
25078,
84427,
28272,
10753,
1820,
340,
197,
25078,
84427,
28272,
11352,
53380,
30479,
50... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewExpressionCommonJS(t *testing.T) {
default_suite.expectBundled(t, bundled{
files: map[string]string{
"/entry.js": `
new (require("./foo.js")).Foo();
`,
"/foo.js": `
class Foo {}
module.exports = {Foo};
`,
},
entryPaths: []string{"/entry.js"},
options: config.Options{
Mode... | explode_data.jsonl/38439 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 187
} | [
2830,
3393,
3564,
9595,
10839,
12545,
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,
8638,
320,
4310,
13988,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPrintNonTerminatedPod(t *testing.T) {
tests := []struct {
pod api.Pod
expect []metav1.TableRow
}{
{
// Test pod phase Running should be printed
api.Pod{
ObjectMeta: metav1.ObjectMeta{Name: "test1"},
Spec: api.PodSpec{Containers: make([]api.Container, 2)},
Status: api.PodStatu... | explode_data.jsonl/21601 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1531
} | [
2830,
3393,
8994,
8121,
21209,
51199,
23527,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
3223,
347,
262,
6330,
88823,
198,
197,
24952,
3056,
4059,
402,
16,
18257,
3102,
198,
197,
59403,
197,
197,
515,
298,
197,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func Test_hcsTask_KillExec_InitExecID_All_Success(t *testing.T) {
lt, init, second := setupTestHcsTask(t)
err := lt.KillExec(context.TODO(), "", 0xf, true)
if err != nil {
t.Fatalf("should not have failed, got: %v", err)
}
if init.state != shimExecStateExited {
t.Fatalf("init should be in exited state got: %v... | explode_data.jsonl/56374 | {
"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,
1523,
4837,
6262,
10102,
483,
10216,
15644,
10216,
915,
53629,
87161,
1155,
353,
8840,
836,
8,
341,
197,
4832,
11,
2930,
11,
2086,
1669,
6505,
2271,
39,
4837,
6262,
1155,
692,
9859,
1669,
25175,
11352,
483,
10216,
5378,
9098... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWatchRestore(t *testing.T) {
test := func(delay time.Duration) func(t *testing.T) {
return func(t *testing.T) {
b, tmpPath := backend.NewDefaultTmpBackend()
s := newWatchableStore(zap.NewExample(), b, &lease.FakeLessor{}, cindex.NewConsistentIndex(b.BatchTx()), StoreConfig{})
defer cleanup(s, b, tm... | explode_data.jsonl/67207 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 571
} | [
2830,
3393,
14247,
56284,
1155,
353,
8840,
836,
8,
341,
18185,
1669,
2915,
60344,
882,
33795,
8,
2915,
1155,
353,
8840,
836,
8,
341,
197,
853,
2915,
1155,
353,
8840,
836,
8,
341,
298,
2233,
11,
4174,
1820,
1669,
19163,
7121,
3675,
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... | 6 |
func TestEventsMappedMatchToContentReceived(t *testing.T) {
testCases := []struct {
given string
expected []mb.Event
}{
{"./_meta/test/empty.json", []mb.Event(nil)},
{"./_meta/test/task.622.json", []mb.Event{
mb.Event{
RootFields: common.MapStr{
"service": common.MapStr{
"name": "elastics... | explode_data.jsonl/45502 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1466
} | [
2830,
3393,
7900,
83345,
8331,
1249,
2762,
23260,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
3174,
2071,
262,
914,
198,
197,
42400,
3056,
3096,
6904,
198,
197,
59403,
197,
197,
4913,
1725,
62,
5490,
12697,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestApiDevAuthSubmitAuthReq(t *testing.T) {
t.Parallel()
// enforce specific field naming in errors returned by API
updateRestErrorFieldName()
privkey := mtest.LoadPrivKey("testdata/private.pem")
pubkeyStr := mtest.LoadPubKeyStr("testdata/public.pem")
testCases := []struct {
req *http.Request
devAuth... | explode_data.jsonl/626 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1967
} | [
2830,
3393,
6563,
14592,
5087,
8890,
5087,
27234,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
197,
322,
28162,
3151,
2070,
34948,
304,
5975,
5927,
553,
5333,
198,
27175,
12416,
1454,
51241,
2822,
71170,
792,
1669,
296,
1944,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTx_CreateTx(t *testing.T) {
t.Parallel()
tx := bt.NewTx()
assert.NotNil(t, tx)
err := tx.From(
"3c8edde27cb9a9132c22038dac4391496be9db16fd21351565cc1006966fdad5",
0,
"76a914eb0bd5edba389198e73f8efabddfc61666969ff788ac",
2000000)
assert.NoError(t, err)
err = tx.PayTo("n2wmGVP89x3DsLNqk3NvctfQy9... | explode_data.jsonl/28741 | {
"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,
31584,
34325,
31584,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
46237,
1669,
19592,
7121,
31584,
741,
6948,
93882,
1155,
11,
9854,
692,
9859,
1669,
9854,
11439,
1006,
197,
197,
1,
18,
66,
23,
291,
450,
17,
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 TestNestedComposites(t *testing.T) {
assertParseOneTerm(t, "nested composites", "[{foo: [\"bar\", {baz}]}]", ArrayTerm(ObjectTerm(Item(VarTerm("foo"), ArrayTerm(StringTerm("bar"), SetTerm(VarTerm("baz")))))))
} | explode_data.jsonl/50463 | {
"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,
71986,
1092,
80139,
1155,
353,
8840,
836,
8,
341,
6948,
14463,
3966,
17249,
1155,
11,
330,
59271,
469,
80139,
497,
10545,
90,
7975,
25,
508,
2105,
2257,
16215,
314,
42573,
92,
13989,
19076,
2910,
17249,
12526,
17249,
29771,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEmail(t *testing.T) {
to := "pras.p.in@gmail.com"
from := "pras.p.in@gmail.com"
password := "7@NotForget"
subject := "subject line of email"
msg := "a one-line email message"
emailTemplate := `To: %s
Subject: %s
%s
`
body := fmt.Sprintf(emailTemplate, to, subject, msg)
auth := sm... | explode_data.jsonl/67072 | {
"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,
4781,
1155,
353,
8840,
836,
8,
972,
31709,
1669,
330,
81222,
556,
1858,
10375,
905,
5031,
42727,
1669,
330,
81222,
556,
1858,
10375,
905,
5031,
58199,
1669,
330,
22,
31,
2623,
87283,
5031,
28624,
583,
1669,
330,
11501,
1555,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCalculateSeek_SeekCur_Negative_Large(t *testing.T) {
finalOffset, err := CalculateSeek(11, -20, os.SEEK_CUR, 0)
log.PanicIf(err)
if finalOffset != 0 {
t.Fatalf("Offset not correct: (%d)", finalOffset)
}
} | explode_data.jsonl/45041 | {
"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,
47866,
39350,
26920,
1225,
16704,
1604,
15060,
2351,
2744,
1155,
353,
8840,
836,
8,
341,
14213,
6446,
11,
1848,
1669,
20517,
39350,
7,
16,
16,
11,
481,
17,
15,
11,
2643,
808,
32262,
33834,
11,
220,
15,
340,
6725,
1069,
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... | 2 |
func TestAnnotationsWithCustomSchemaSuccess(t *testing.T) {
schema := &KubeValidatorConfigSchema{
Version: "1.10.0",
}
var schemas []*KubeValidatorConfigSchema
schemas = append(schemas, schema)
candidate := NewCandidate(
&Context{
Event: &github.CheckSuiteEvent{},
}, &github.CommitFile{
BlobURL: githu... | explode_data.jsonl/53895 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 316
} | [
2830,
3393,
21418,
2354,
10268,
8632,
7188,
1155,
353,
8840,
836,
8,
341,
1903,
3416,
1669,
609,
42,
3760,
14256,
2648,
8632,
515,
197,
77847,
25,
330,
16,
13,
16,
15,
13,
15,
756,
197,
532,
2405,
61800,
29838,
42,
3760,
14256,
2648... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSlice(t *testing.T) {
type Type3 struct {
A []string
}
t3p := &Type3{[]string{"hello", "world"}}
var t3 Type3
if err := encAndDec(t3, t3p); err != nil {
t.Error(err)
}
} | explode_data.jsonl/43386 | {
"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,
33236,
1155,
353,
8840,
836,
8,
341,
13158,
3990,
18,
2036,
341,
197,
22985,
3056,
917,
198,
197,
532,
3244,
18,
79,
1669,
609,
929,
18,
90,
1294,
917,
4913,
14990,
497,
330,
14615,
95642,
2405,
259,
18,
3990,
18,
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 TestTypeSystem_FieldArgumentsMustHaveInputTypes_AcceptsAnInputTypeAsFieldArgType(t *testing.T) {
for _, ttype := range inputTypes {
_, err := schemaWithArgOfType(ttype)
if err != nil {
t.Fatalf(`unexpected error: %v for type "%v"`, err, ttype)
}
}
} | explode_data.jsonl/79184 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 102
} | [
2830,
3393,
929,
2320,
46272,
19139,
31776,
12116,
2505,
4173,
1566,
66,
57771,
2082,
2505,
929,
2121,
1877,
2735,
929,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
259,
1313,
1669,
2088,
1946,
4173,
341,
197,
197,
6878,
1848,
1669,
10802,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestNullCallArg(t *testing.T) {
const SCRIPT = `
f(null);
`
vm := New()
prg := MustCompile("test.js", SCRIPT, false)
vm.Set("f", func(x *int) bool {
return x == nil
})
v, err := vm.RunProgram(prg)
if err != nil {
t.Fatal(err)
}
if !v.StrictEquals(valueTrue) {
t.Fatalf("Unexpected result: %v", v)... | explode_data.jsonl/10495 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 150
} | [
2830,
3393,
3280,
7220,
2735,
1155,
353,
8840,
836,
8,
341,
4777,
53679,
284,
22074,
1166,
4967,
317,
197,
3989,
54879,
1669,
1532,
741,
25653,
70,
1669,
15465,
46126,
445,
1944,
2857,
497,
53679,
11,
895,
340,
54879,
4202,
445,
69,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestTxnDiscard(t *testing.T) {
path, err := ioutil.TempDir(os.TempDir(), "testing_badger_")
if err != nil {
t.Fatal(err)
}
defer os.RemoveAll(path)
d, err := NewDatastore(path, nil)
defer os.RemoveAll(path)
if err != nil {
t.Fatal(err)
}
txn, err := d.NewTransaction(bg, false)
if err != nil {
t.F... | explode_data.jsonl/932 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 283
} | [
2830,
3393,
31584,
77,
23477,
567,
1155,
353,
8840,
836,
8,
341,
26781,
11,
1848,
1669,
43144,
65009,
6184,
9638,
65009,
6184,
1507,
330,
8840,
34199,
1389,
62,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
532,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestClientPost(t *testing.T) {
t.Parallel()
s := startEchoServer(t, "tcp", "127.0.0.1:")
defer s.Stop()
testClientPost(t, &defaultClient, "http://"+s.Addr(), 100)
} | explode_data.jsonl/79379 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 78
} | [
2830,
3393,
2959,
4133,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
1903,
1669,
1191,
74994,
5475,
1155,
11,
330,
27161,
497,
330,
16,
17,
22,
13,
15,
13,
15,
13,
16,
34403,
16867,
274,
30213,
2822,
18185,
2959,
4133,
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,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestExecuteUserErrorsInApiCalls(t *testing.T) {
cache, cleanup := withCache(t)
defer cleanup()
checksum := createTestContract(t, cache)
maxGas := TESTING_GAS_LIMIT
gasMeter1 := NewMockGasMeter(maxGas)
igasMeter1 := GasMeter(gasMeter1)
// instantiate it with this store
store := NewLookup(gasMeter1)
balanc... | explode_data.jsonl/62559 | {
"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,
17174,
1474,
13877,
641,
6563,
55292,
1155,
353,
8840,
836,
8,
341,
52680,
11,
21290,
1669,
448,
8233,
1155,
340,
16867,
21290,
741,
25157,
1242,
1669,
1855,
2271,
14067,
1155,
11,
6500,
692,
22543,
58728,
1669,
95535,
2646,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNotFollowRedirect(t *testing.T) {
gateway, err := benchGateway.CreateGateway(
defaultTestConfig,
&testGateway.Options{
LogWhitelist: map[string]bool{
"Could not emit statusCode metric": true,
},
KnownHTTPBackends: []string{"bar"},
ConfigFiles: util.DefaultConfigFiles("example-gateway... | explode_data.jsonl/58108 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 658
} | [
2830,
3393,
2623,
12480,
17725,
1155,
353,
8840,
836,
8,
341,
3174,
12043,
11,
1848,
1669,
13425,
40709,
7251,
40709,
1006,
197,
11940,
2271,
2648,
345,
197,
197,
5,
1944,
40709,
22179,
515,
298,
24201,
1639,
57645,
25,
2415,
14032,
964... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCounterGeo(t *testing.T) {
geoip := &geoIpLookupProvider{ips: map[string]string{
"127.0.0.1": "LO",
}}
collector := metrics.New(geoip)
counter, err := collector.CreateCounterGeo("test", "seconds", "Hello world!")
assert.Nil(t, err, "creating counter returned an error")
m := collector.ListMetrics()
as... | explode_data.jsonl/71467 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 636
} | [
2830,
3393,
14099,
37344,
1155,
353,
8840,
836,
8,
341,
197,
13052,
573,
1669,
609,
13052,
23378,
34247,
5179,
90,
3077,
25,
2415,
14032,
30953,
515,
197,
197,
1,
16,
17,
22,
13,
15,
13,
15,
13,
16,
788,
330,
1593,
756,
197,
11248... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestForEach(t *testing.T) {
Result{}.ForEach(nil)
Result{Type: String, Str: "Hello"}.ForEach(func(_, value Result) bool {
assert(t, value.String() == "Hello")
return false
})
Result{Type: JSON, Raw: "*invalid*"}.ForEach(nil)
jsonStr := ` {"name": {"first": "Janet","last": "Prichard"},
"asd\nf":"\ud83d\u... | explode_data.jsonl/43426 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 231
} | [
2830,
3393,
91392,
1155,
353,
8840,
836,
8,
341,
56503,
46391,
91392,
27907,
340,
56503,
90,
929,
25,
923,
11,
4509,
25,
330,
9707,
1,
7810,
91392,
18552,
41117,
897,
5714,
8,
1807,
341,
197,
6948,
1155,
11,
897,
6431,
368,
621,
330... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestIntegrationHTTPDoBadURL(t *testing.T) {
ctx := context.Background()
results := HTTPDo(ctx, HTTPDoConfig{
URL: "\t",
})
if !strings.HasSuffix(results.Error.Error(), "invalid control character in URL") {
t.Fatal("not the error we expected")
}
} | explode_data.jsonl/53537 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 93
} | [
2830,
3393,
52464,
9230,
5404,
17082,
3144,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
55497,
1669,
10130,
5404,
7502,
11,
10130,
5404,
2648,
515,
197,
79055,
25,
2917,
83,
756,
197,
3518,
743,
753,
18594,
16152,
40177... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMeasures(t *testing.T) {
for m := start_measures + 1; m < end_measures; m += 1 {
if m.String() == "" {
t.Errorf("measure #%d is missing name", uint(m))
}
if m.Dim().Exp(2).Equals(m.Dim()) {
t.Errorf("measure #%d is missing dimension", uint(m))
}
}
} | explode_data.jsonl/36449 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 121
} | [
2830,
3393,
7823,
23471,
1155,
353,
8840,
836,
8,
341,
2023,
296,
1669,
1191,
16612,
23471,
488,
220,
16,
26,
296,
366,
835,
16612,
23471,
26,
296,
1421,
220,
16,
341,
197,
743,
296,
6431,
368,
621,
1591,
341,
298,
3244,
13080,
445,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestTransportReadHeadResponseWithBody(t *testing.T) {
// This test use not valid response format.
// Discarding logger output to not spam tests output.
log.SetOutput(ioutil.Discard)
defer log.SetOutput(os.Stderr)
response := "redirecting to /elsewhere"
ct := newClientTester(t)
clientDone := make(chan struc... | explode_data.jsonl/16121 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 672
} | [
2830,
3393,
27560,
4418,
12346,
2582,
2354,
5444,
1155,
353,
8840,
836,
8,
341,
197,
322,
1096,
1273,
990,
537,
2697,
2033,
3561,
624,
197,
322,
11735,
28410,
5925,
2550,
311,
537,
25328,
7032,
2550,
624,
6725,
4202,
5097,
1956,
30158,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAgent_Monitor_ACLDeny(t *testing.T) {
t.Parallel()
a := NewTestAgent(t.Name(), TestACLConfig())
defer a.Shutdown()
// Try without a token.
req, _ := http.NewRequest("GET", "/v1/agent/monitor", nil)
if _, err := a.srv.AgentMonitor(nil, req); !acl.IsErrPermissionDenied(err) {
t.Fatalf("err: %v", err)
}... | explode_data.jsonl/33648 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 190
} | [
2830,
3393,
16810,
1245,
30314,
97627,
23619,
88,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
11323,
1669,
1532,
2271,
16810,
1155,
2967,
1507,
3393,
55393,
2648,
2398,
16867,
264,
10849,
18452,
2822,
197,
322,
9735,
2041,
264,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestPullWithSecrets(t *testing.T) {
// auth value is equivalent to: "username":"passed-user","password":"passed-password"
dockerCfg := map[string]map[string]string{"index.docker.io/v1/": {"email": "passed-email", "auth": "cGFzc2VkLXVzZXI6cGFzc2VkLXBhc3N3b3Jk"}}
dockercfgContent, err := json.Marshal(dockerCfg)
... | explode_data.jsonl/11451 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 970
} | [
2830,
3393,
36068,
2354,
19773,
82,
1155,
353,
8840,
836,
8,
341,
197,
322,
4166,
897,
374,
13578,
311,
25,
330,
5113,
3252,
35422,
8694,
2198,
3833,
3252,
35422,
33069,
698,
2698,
13659,
42467,
1669,
2415,
14032,
60,
2186,
14032,
30953... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParseDownsamplingParamMillis(t *testing.T) {
var tests = []struct {
maxSourceResolutionParam string
result int64
step time.Duration
fail bool
enableAutodownsampling bool
}{
{
maxSourceResolutionParam: "0s",
enableAutodownsampling: ... | explode_data.jsonl/72408 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1397
} | [
2830,
3393,
14463,
4454,
96959,
2001,
17897,
1155,
353,
8840,
836,
8,
341,
2405,
7032,
284,
3056,
1235,
341,
197,
22543,
3608,
38106,
2001,
914,
198,
197,
9559,
4293,
526,
21,
19,
198,
197,
77093,
3824,
882,
33795,
198,
197,
63052,
38... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.