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 TestNodeUpdateErrors(t *testing.T) {
testCases := []struct {
args []string
flags map[string]string
nodeInspectFunc func() (swarm.Node, []byte, error)
nodeUpdateFunc func(nodeID string, version swarm.Version, node swarm.NodeSpec) error
expectedError string
}{
{
expectedError... | explode_data.jsonl/54560 | {
"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,
1955,
4289,
13877,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
31215,
310,
3056,
917,
198,
197,
59516,
1843,
2415,
14032,
30953,
198,
197,
20831,
58533,
9626,
2915,
368,
320,
2280,
2178,
21714,
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 TestObjectNamesAll(t *testing.T) {
ctx := context.Background()
c, rollback := makeConnectionWithObjectHeaders(t)
defer rollback()
objects, err := c.ObjectNamesAll(ctx, CONTAINER, nil)
if err != nil {
t.Fatal(err)
}
if len(objects) != 1 || objects[0] != OBJECT {
t.Error("Incorrect listing", objects)
}
} | explode_data.jsonl/12695 | {
"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,
1190,
7980,
2403,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
1444,
11,
60414,
1669,
1281,
4526,
2354,
1190,
10574,
1155,
340,
16867,
60414,
741,
197,
19210,
11,
1848,
1669,
272,
8348,
7980,
2403,
7502,
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 TestFinWithPartialAck(t *testing.T) {
c := context.New(t, defaultMTU)
defer c.Cleanup()
c.CreateConnected(789, 30000, nil)
// Write something out, and acknowledge it to get cwnd to 2. Also send
// FIN from the test side.
view := buffer.NewView(10)
if _, _, err := c.EP.Write(tcpip.SlicePayload(view), tcpip... | explode_data.jsonl/22314 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1211
} | [
2830,
3393,
9134,
2354,
37314,
55559,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
2266,
7121,
1155,
11,
1638,
8505,
52,
340,
16867,
272,
727,
60639,
2822,
1444,
7251,
21146,
7,
22,
23,
24,
11,
220,
18,
15,
15,
15,
15,
11,
2092,
692,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestSeriesFile_Open_WhenFileCorrupt_ShouldReturnErr(t *testing.T) {
f := NewBrokenSeriesFile([]byte{0, 0, 0, 0, 0})
defer f.Close()
f.Logger = zaptest.NewLogger(t)
err := f.Open()
if err == nil {
t.Fatalf("should report error")
}
} | explode_data.jsonl/78506 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 104
} | [
2830,
3393,
25544,
1703,
51747,
62,
4498,
1703,
10580,
6585,
36578,
616,
5598,
7747,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
1532,
90526,
25544,
1703,
10556,
3782,
90,
15,
11,
220,
15,
11,
220,
15,
11,
220,
15,
11,
220,
15,
3518,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestShouldNotHashArgon2idPasswordDueToMemoryLessThanEight(t *testing.T) {
hash, err := HashPassword("password", "BpLnfgDsc2WD8F2q", HashingAlgorithmArgon2id,
schema.DefaultCIPasswordConfiguration.Iterations, 1, schema.DefaultCIPasswordConfiguration.Parallelism,
schema.DefaultCIPasswordConfiguration.KeyLength,... | explode_data.jsonl/40171 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 166
} | [
2830,
3393,
14996,
2623,
6370,
2735,
263,
17,
307,
4876,
33060,
1249,
10642,
27451,
26067,
59085,
1155,
353,
8840,
836,
8,
341,
50333,
11,
1848,
1669,
6531,
4876,
445,
3833,
497,
330,
33,
79,
40101,
4817,
35,
2388,
17,
17563,
23,
37,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTag_TypeId(t *testing.T) {
cases := []struct {
name string
tag Tag
want TagType
}{
{
name: `Valid Case: EndTag`,
tag: &EndTag{},
want: TagEnd,
},
{
name: `Valid Case: ByteTag`,
tag: &ByteTag{},
want: TagByte,
},
{
name: `Valid Case: ShortTag`,
tag: &ShortTag{},
... | explode_data.jsonl/73742 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 663
} | [
2830,
3393,
5668,
13729,
764,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
60439,
220,
12353,
198,
197,
50780,
12353,
929,
198,
197,
59403,
197,
197,
515,
298,
11609,
25,
1565,
4088,
1153... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetNamesrv(t *testing.T) {
Convey("Test GetNamesrv round-robin strategy", t, func() {
ns := &namesrvs{
srvs: []string{"192.168.100.1",
"192.168.100.2",
"192.168.100.3",
"192.168.100.4",
"192.168.100.5",
},
lock: new(sync.Mutex),
}
index1 := ns.index
IP1 := ns.getNameServerAdd... | explode_data.jsonl/49161 | {
"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,
1949,
7980,
10553,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
445,
2271,
2126,
7980,
10553,
4778,
51934,
6863,
8282,
497,
259,
11,
2915,
368,
341,
197,
84041,
1669,
609,
11400,
10553,
82,
515,
298,
1903,
10553,
82,
25,
305... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestServiceReplaceEmitter(t *testing.T) {
if dipper.Logger == nil {
f, _ := os.OpenFile(os.DevNull, os.O_APPEND, 0o777)
defer f.Close()
dipper.GetLogger("test service", "DEBUG", f, f)
}
svc := &Service{
name: "testsvc",
driverRuntimes: map[string]*driver.Runtime{
"driver:d1": {
State: driver.D... | explode_data.jsonl/12391 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1287
} | [
2830,
3393,
1860,
23107,
21971,
1155,
353,
8840,
836,
8,
341,
743,
23604,
712,
12750,
621,
2092,
341,
197,
1166,
11,
716,
1669,
2643,
12953,
1703,
9638,
77611,
3280,
11,
2643,
8382,
65851,
11,
220,
15,
78,
22,
22,
22,
340,
197,
1686... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCT_ColorReplaceEffectMarshalUnmarshal(t *testing.T) {
v := dml.NewCT_ColorReplaceEffect()
buf, _ := xml.Marshal(v)
v2 := dml.NewCT_ColorReplaceEffect()
xml.Unmarshal(buf, v2)
} | explode_data.jsonl/64424 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 82
} | [
2830,
3393,
1162,
43387,
23107,
7738,
55438,
1806,
27121,
1155,
353,
8840,
836,
8,
341,
5195,
1669,
294,
1014,
7121,
1162,
43387,
23107,
7738,
741,
26398,
11,
716,
1669,
8396,
37271,
3747,
340,
5195,
17,
1669,
294,
1014,
7121,
1162,
433... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRequest_SetMethod(t *testing.T) {
testCases := []struct {
name string
success bool
request *Request
expected string
}{
{
name: "Set method",
success: true,
request: NewRequest().SetMethod("test"),
expected: `{"jsonrpc": "2.0", "method": "test"}`,
},
}
for _, tt := range... | explode_data.jsonl/66299 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 228
} | [
2830,
3393,
1900,
14812,
3523,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
30553,
220,
1807,
198,
197,
23555,
220,
353,
1900,
198,
197,
42400,
914,
198,
197,
59403,
197,
197,
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 TestManifestExists(t *testing.T) {
require := require.New(t)
ctx, cleanup := context.BuildContextFixture()
defer cleanup()
p, err := PullClientFixtureWithAlpine(ctx)
require.NoError(err)
exists, err := p.manifestExists(testutil.SampleImageTag)
require.NoError(err)
require.True(exists)
} | explode_data.jsonl/63638 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 109
} | [
2830,
3393,
38495,
15575,
1155,
353,
8840,
836,
8,
341,
17957,
1669,
1373,
7121,
1155,
340,
20985,
11,
21290,
1669,
2266,
25212,
1972,
18930,
741,
16867,
21290,
2822,
3223,
11,
1848,
1669,
31828,
2959,
18930,
2354,
2101,
38038,
7502,
340,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestNewCACertAndKey(t *testing.T) {
certCfg := &certutil.Config{CommonName: "kubernetes"}
caCert, _, err := NewCACertAndKey(certCfg)
if err != nil {
t.Fatalf("failed call NewCACertAndKey: %v", err)
}
certstestutil.AssertCertificateIsCa(t, caCert)
} | explode_data.jsonl/58623 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 110
} | [
2830,
3393,
3564,
92832,
529,
3036,
1592,
1155,
353,
8840,
836,
8,
341,
1444,
529,
42467,
1669,
609,
12246,
1314,
10753,
90,
10839,
675,
25,
330,
74,
29827,
16707,
197,
924,
36934,
11,
8358,
1848,
1669,
1532,
92832,
529,
3036,
1592,
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 TestNamespaceNestParam(t *testing.T) {
r, _ := http.NewRequest("GET", "/v1/admin/order/123", nil)
w := httptest.NewRecorder()
ns := NewNamespace("/v1")
ns.Namespace(
NewNamespace("/admin").
Get("/order/:id", func(ctx *context.Context) {
ctx.Output.Body([]byte(ctx.Input.Param(":id")))
}),
)
AddNa... | explode_data.jsonl/12607 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 208
} | [
2830,
3393,
22699,
45,
477,
2001,
1155,
353,
8840,
836,
8,
341,
7000,
11,
716,
1669,
1758,
75274,
445,
3806,
497,
3521,
85,
16,
17402,
43395,
14,
16,
17,
18,
497,
2092,
340,
6692,
1669,
54320,
70334,
7121,
47023,
2822,
84041,
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 Test_scsi_DeleteSCSIDeviceByPath(t *testing.T) {
type args struct {
ctx context.Context
devPath string
}
ctx := context.Background()
defaultArgs := args{ctx: ctx, devPath: fmt.Sprintf("/sys/class/block/%s/device", mh.ValidDeviceName)}
ctrl := gomock.NewController(t)
defer ctrl.Finish()
sysPath :... | explode_data.jsonl/65983 | {
"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,
643,
63229,
57418,
3540,
36499,
63924,
1359,
1820,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
20985,
257,
2266,
9328,
198,
197,
27302,
1820,
914,
198,
197,
630,
20985,
1669,
2266,
19047,
2822,
11940,
4117,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestCrawl(t *testing.T) {
t.Run("returns non-nil error and 0 issues on failed crawl", func(t *testing.T) {
numIssues, err := Crawl(context.Background(), Config{
Root: "non-existent-root",
}, io.Discard, io.Discard)
require.Error(t, err)
assert.Equal(t, int64(0), numIssues)
})
t.Run("returns nil err... | explode_data.jsonl/7795 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 226
} | [
2830,
3393,
34,
33683,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
4216,
2477,
83248,
1465,
323,
220,
15,
4714,
389,
4641,
45664,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
22431,
85828,
11,
1848,
1669,
356,
33683,
5378,
19047,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSimpleFindLimit1(t *testing.T) {
if testing.Verbose() {
logp.LogInit(logp.LOG_DEBUG, "", false, true, []string{"mongodb", "mongodbdetailed"})
}
mongodb := mongodbModForTests()
// request and response from tests/pcaps/mongo_one_row.pcap
reqData, err := hex.DecodeString(
"320000000a000000ffffffffd4070... | explode_data.jsonl/35541 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1050
} | [
2830,
3393,
16374,
9885,
16527,
16,
1155,
353,
8840,
836,
8,
341,
743,
7497,
42505,
8297,
368,
341,
197,
6725,
79,
5247,
3803,
12531,
79,
36202,
11139,
11,
7342,
895,
11,
830,
11,
3056,
917,
4913,
37197,
497,
330,
71155,
347,
8940,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUsernameSavedLowercase(t *testing.T) {
inputDetails := config.ArtifactoryDetails{
Url: "http://localhost:8080/artifactory",
DistributionUrl: "http://localhost:8080/distribution",
User: "ADMIN", Password: "password",
ApiKey: "", SshKeyPath: "", AccessToken: "",
ServerId: "test... | explode_data.jsonl/23157 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 203
} | [
2830,
3393,
11115,
41133,
9053,
5638,
1155,
353,
8840,
836,
8,
341,
22427,
7799,
1669,
2193,
50064,
333,
2919,
7799,
515,
197,
197,
2864,
25,
1797,
330,
1254,
1110,
8301,
25,
23,
15,
23,
15,
55549,
333,
2919,
756,
197,
10957,
13107,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetJSON(t *testing.T) {
ctx := context.Background()
t.Run("invalid input", func(t *testing.T) {
m := NewManager(nil)
_, err := m.GetJSON(ctx, &hub.GetPackageInput{})
assert.True(t, errors.Is(err, hub.ErrInvalidInput))
})
t.Run("database query succeeded", func(t *testing.T) {
db := &tests.DBMock{}... | explode_data.jsonl/74680 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 411
} | [
2830,
3393,
1949,
5370,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
2822,
3244,
16708,
445,
11808,
1946,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
2109,
1669,
1532,
2043,
27907,
340,
197,
197,
6878,
1848,
1669,
296,
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 TestOrphans(t *testing.T) {
//If you create a sequence of saved versions
//Then randomly delete versions other than the first and last until only those two remain
//Any remaining orphan nodes should be constrained to just the first version
require := require.New(t)
tree := NewMutableTree(db.NewMemDB(), 100)
... | explode_data.jsonl/25136 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 355
} | [
2830,
3393,
2195,
84311,
1155,
353,
8840,
836,
8,
341,
197,
322,
2679,
498,
1855,
264,
8500,
315,
6781,
10795,
198,
197,
322,
12209,
26618,
3698,
10795,
1008,
1091,
279,
1156,
323,
1537,
3080,
1172,
1846,
1378,
7146,
198,
197,
322,
86... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSortModuleClassesUndefined(t *testing.T) {
ms := NewModuleSystem(map[string][]string{}, map[string][]string{}, false)
err := ms.RegisterClass(ModuleClass{
Name: "a",
NamePlural: "as",
DependsOn: []string{"c"},
})
assert.NoError(t, err)
err = ms.RegisterClass(ModuleClass{
Name: "b",
... | explode_data.jsonl/34592 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 220
} | [
2830,
3393,
10231,
3332,
20077,
30571,
1155,
353,
8840,
836,
8,
341,
47691,
1669,
1532,
3332,
2320,
9147,
14032,
45725,
917,
22655,
2415,
14032,
45725,
917,
22655,
895,
340,
9859,
1669,
9829,
19983,
1957,
75295,
1957,
515,
197,
21297,
25,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestTransformBundleFile(t *testing.T) {
t.Parallel()
// FIXME: windows CI test times out in this test.
if runtime.GOOS == "windows" {
return
}
bundlePath := writeTempFile(t, "transform.arraiz", createBundle(t, transformScript))
output := runSyslWithOutput(t, ".sysl", nil,
"transform", "../../tests/simp... | explode_data.jsonl/54905 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 140
} | [
2830,
3393,
8963,
8409,
1703,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
197,
322,
27475,
25,
11030,
20694,
1273,
3039,
700,
304,
419,
1273,
624,
743,
15592,
97574,
3126,
621,
330,
27077,
1,
341,
197,
853,
198,
197,
630,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestSetJob(t *testing.T) {
processor := Processor{}
job := scheduler.Job{}
processor.SetPollJob(&job)
assert.NotNil(t, processor.pollJob)
assert.Equal(t, processor.pollJob, &job)
} | explode_data.jsonl/74690 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 73
} | [
2830,
3393,
1649,
12245,
1155,
353,
8840,
836,
8,
341,
197,
29474,
1669,
43377,
16094,
68577,
1669,
28809,
45293,
31483,
197,
29474,
4202,
49207,
12245,
2099,
8799,
692,
6948,
93882,
1155,
11,
17654,
41477,
12245,
340,
6948,
12808,
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 |
func TestSuccessHead(t *testing.T) {
testRepo := newTestRepo(t)
defer testRepo.cleanup(t)
head, err := testRepo.sut.Head()
require.Nil(t, err)
require.Equal(t, testRepo.thirdBranchCommit, head)
} | explode_data.jsonl/13981 | {
"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,
7188,
12346,
1155,
353,
8840,
836,
8,
341,
18185,
25243,
1669,
501,
2271,
25243,
1155,
340,
16867,
1273,
25243,
87689,
1155,
692,
46081,
11,
1848,
1669,
1273,
25243,
514,
332,
90478,
741,
17957,
59678,
1155,
11,
1848,
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 |
func TestProduceFeeInPRVTrade(t *testing.T) {
setTestTradeConfig()
type TestData struct {
Metadata metadataPdexv3.TradeRequest `json:"metadata"`
}
type TestResult struct {
Instructions [][]string `json:"instructions"`
}
var testcases []Testcase = mustReadTestcases("produce_trade_fee_prv.json")
f... | explode_data.jsonl/16349 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 359
} | [
2830,
3393,
1336,
13373,
41941,
641,
6480,
53,
39173,
1155,
353,
8840,
836,
8,
972,
8196,
2271,
39173,
2648,
3568,
13158,
93200,
2036,
972,
197,
9209,
7603,
11160,
47,
91769,
85,
18,
8240,
1021,
1900,
1565,
2236,
2974,
17637,
39917,
319... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPslqSimple(t *testing.T) {
prec := uint(64)
//one := float64(1<<60)
in := make([]big.Float, 2)
in[0].SetPrec(prec).SetInt64(1)
in[1].SetPrec(prec).SetInt64(-2)
pslq := New(prec).SetVerbose(verbose)
out, err := pslq.Run(in)
if err != nil {
t.Error("Got error", err)
}
if verbose {
printBigIntVect... | explode_data.jsonl/66847 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 181
} | [
2830,
3393,
47,
3226,
80,
16374,
1155,
353,
8840,
836,
8,
341,
197,
10645,
1669,
2622,
7,
21,
19,
340,
197,
322,
603,
1669,
2224,
21,
19,
7,
16,
2442,
21,
15,
692,
17430,
1669,
1281,
10556,
16154,
29794,
11,
220,
17,
340,
17430,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestHighPriorityBackoff(t *testing.T) {
q := NewTestQueue(context.Background(), newDefaultQueueSort())
midPod := v1.Pod{
ObjectMeta: metav1.ObjectMeta{
Name: "test-midpod",
Namespace: "ns1",
UID: types.UID("tp-mid"),
},
Spec: v1.PodSpec{
Priority: &midPriority,
},
Status: v1.Pod... | explode_data.jsonl/68200 | {
"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,
11976,
20555,
3707,
1847,
1155,
353,
8840,
836,
8,
341,
18534,
1669,
1532,
2271,
7554,
5378,
19047,
1507,
501,
3675,
7554,
10231,
12367,
2109,
307,
23527,
1669,
348,
16,
88823,
515,
197,
23816,
12175,
25,
77520,
16,
80222,
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 Test_query_ExternalQuery(t *testing.T) {
type fields struct {
session session.ServiceFormatter
}
type args struct {
querier ExternalQuerier
}
tests := []struct {
name string
fields fields
args args
want *sfdc.Record
wantErr bool
}{
{
name: "Request Error",
fields: fields{
... | explode_data.jsonl/52251 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2098
} | [
2830,
3393,
5738,
62,
25913,
2859,
1155,
353,
8840,
836,
8,
341,
13158,
5043,
2036,
341,
197,
25054,
3797,
13860,
14183,
198,
197,
532,
13158,
2827,
2036,
341,
197,
197,
15959,
1268,
30936,
2183,
261,
1268,
198,
197,
532,
78216,
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 TestMinConfig(t *testing.T) {
store := storage.NewMemoryStorage("dam-min", "testdata/config")
server, err := fakeoidcissuer.New(hydraPublicURL, &testkeys.PersonaBrokerKey, "dam-min", "testdata/config", false)
if err != nil {
t.Fatalf("fakeoidcissuer.New(%q, _, _) failed: %v", hydraPublicURL, err)
}
opts := ... | explode_data.jsonl/18480 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 797
} | [
2830,
3393,
6217,
2648,
1155,
353,
8840,
836,
8,
341,
57279,
1669,
5819,
7121,
10642,
5793,
445,
15408,
13398,
497,
330,
92425,
14730,
1138,
41057,
11,
1848,
1669,
12418,
588,
66,
66817,
7121,
3203,
88,
22248,
12676,
3144,
11,
609,
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 TestOriginalFileBackupRestore(t *testing.T) {
testDir, cleanup := setupTempDirWithEtc(t)
defer cleanup()
// Write a normal file as a control to make sure normal case works
controlFile := filepath.Join(testDir, "control-file")
err := ioutil.WriteFile(controlFile, []byte("control file contents"), 0755)
assert... | explode_data.jsonl/28217 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 615
} | [
2830,
3393,
18395,
1703,
56245,
56284,
1155,
353,
8840,
836,
8,
341,
18185,
6184,
11,
21290,
1669,
6505,
12151,
6184,
2354,
36,
10413,
1155,
340,
16867,
21290,
2822,
197,
322,
9645,
264,
4622,
1034,
438,
264,
2524,
311,
1281,
2704,
4622... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExtendVoteCalledWhenEnabled(t *testing.T) {
for _, testCase := range []struct {
name string
enabled bool
}{
{
name: "enabled",
enabled: true,
},
{
name: "disabled",
enabled: false,
},
} {
t.Run(testCase.name, func(t *testing.T) {
config := configSetup(t)
ctx, cancel ... | explode_data.jsonl/54280 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1399
} | [
2830,
3393,
72136,
41412,
20960,
4498,
5462,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
54452,
1669,
2088,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
197,
15868,
1807,
198,
197,
59403,
197,
197,
515,
298,
11609,
25,
262,
330,
158... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestClient_GetSendMessageURL(t *testing.T) {
type fields struct {
Host string
Port string
roomID string
userAlias string
debug bool
https bool
auth *authInfo
httpClient *http.Client
}
tests := []struct {
name string
fields fields
want string
}{
{
... | explode_data.jsonl/60409 | {
"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,
2959,
13614,
80863,
3144,
1155,
353,
8840,
836,
8,
341,
13158,
5043,
2036,
341,
197,
197,
9296,
981,
914,
198,
197,
98459,
981,
914,
198,
197,
197,
2966,
915,
257,
914,
198,
197,
19060,
22720,
220,
914,
198,
197,
39730,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestImportRootCert(t *testing.T) {
certStr := `-----BEGIN CERTIFICATE-----
MIIBWDCB/6ADAgECAhBKKoVsRNJdGsGh6tPWnE4rMAoGCCqGSM49BAMCMBMxETAP
BgNVBAMTCGRvY2tlci8qMB4XDTE3MDQyODIwMTczMFoXDTI3MDQyNjIwMTczMFow
EzERMA8GA1UEAxMIZG9ja2VyLyowWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAQQ
6RhA8sX/kWedbPPFzNqOMI+AnWOQV+u0+FQfeNO+k/U... | explode_data.jsonl/77484 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1318
} | [
2830,
3393,
11511,
8439,
36934,
1155,
353,
8840,
836,
8,
1476,
1444,
529,
2580,
1669,
1565,
15081,
37588,
62357,
82023,
34764,
9773,
3256,
54,
5626,
33,
14,
21,
1808,
9042,
36,
5049,
71,
33,
50457,
78,
51737,
50195,
41,
67,
81152,
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... | 1 |
func Test_defaultModelBuilder_buildTargetGroupHealthCheckPort(t *testing.T) {
tests := []struct {
testName string
svc *corev1.Service
defaultPort string
want intstr.IntOrString
wantErr error
}{
{
testName: "default traffic-port",
svc: &corev1.Service{},
defaultPor... | explode_data.jsonl/40062 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 894
} | [
2830,
3393,
9993,
1712,
3297,
20801,
6397,
2808,
14542,
3973,
7084,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
18185,
675,
262,
914,
198,
197,
1903,
7362,
260,
353,
98645,
16,
13860,
198,
197,
11940,
7084,
914,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFluxCompiler(t *testing.T) {
ctx := context.Background()
for _, tc := range []struct {
q string
ok bool
}{
{q: `from(bucket: "foo")`, ok: true},
{q: `t=""t.t`},
{q: `t=0t.s`},
{q: `x = from(bucket: "foo")`},
{q: `x = from(bucket: "foo") |> yield()`, ok: true},
{q: `from(bucket: "foo")`, ok... | explode_data.jsonl/51324 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 364
} | [
2830,
3393,
3882,
2200,
38406,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
2822,
2023,
8358,
17130,
1669,
2088,
3056,
1235,
341,
197,
18534,
220,
914,
198,
197,
59268,
1807,
198,
197,
59403,
197,
197,
90,
80,
25,
1565,
149... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSymmetricEncryption(t *testing.T) {
buf := new(bytes.Buffer)
plaintext, err := SymmetricallyEncrypt(buf, []byte("testing"), nil, nil)
if err != nil {
t.Errorf("error writing headers: %s", err)
return
}
message := []byte("hello world\n")
_, err = plaintext.Write(message)
if err != nil {
t.Errorf("e... | explode_data.jsonl/28630 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 362
} | [
2830,
3393,
27912,
15903,
79239,
1155,
353,
8840,
836,
8,
341,
26398,
1669,
501,
23158,
22622,
340,
197,
71223,
11,
1848,
1669,
11375,
15903,
745,
61520,
10731,
11,
3056,
3782,
445,
8840,
3975,
2092,
11,
2092,
340,
743,
1848,
961,
2092,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestDeleteArguments(t *testing.T) {
defer func() {
if _, ok := recover().(*CompilerSyntaxError); !ok {
t.Fatal("Expected syntax error")
}
}()
const SCRIPT = `
'use strict';
function f() {
delete arguments;
}
`
testScript1(SCRIPT, _undefined, t)
} | explode_data.jsonl/75308 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 110
} | [
2830,
3393,
6435,
19139,
1155,
353,
8840,
836,
8,
341,
16867,
2915,
368,
341,
197,
743,
8358,
5394,
1669,
11731,
1005,
4071,
38406,
33890,
1454,
1215,
753,
562,
341,
298,
3244,
26133,
445,
18896,
19482,
1465,
1138,
197,
197,
532,
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 TestOrganizeImports(t *testing.T) {
runner.Run(t, disorganizedProgram, func(t *testing.T, env *Env) {
env.OpenFile("main.go")
env.OrganizeImports("main.go")
got := env.Editor.BufferText("main.go")
want := env.ReadWorkspaceFile("main.go.organized")
if got != want {
t.Errorf("unexpected formatting resu... | explode_data.jsonl/42821 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 143
} | [
2830,
3393,
23227,
551,
31250,
1155,
353,
8840,
836,
8,
341,
197,
41736,
16708,
1155,
11,
827,
62216,
10690,
11,
2915,
1155,
353,
8840,
836,
11,
6105,
353,
14359,
8,
341,
197,
57538,
12953,
1703,
445,
3817,
18002,
1138,
197,
57538,
83... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMarshalSlice(t *testing.T) {
m := make([]int, 1)
m[0] = 1
var buf bytes.Buffer
err := NewEncoder(&buf).Encode(&m)
if err == nil {
t.Error("expected error, got nil")
return
}
if err.Error() != "Only pointer to struct can be marshaled to TOML" {
t.Fail()
}
} | explode_data.jsonl/46342 | {
"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,
55438,
33236,
1155,
353,
8840,
836,
8,
341,
2109,
1669,
1281,
10556,
396,
11,
220,
16,
340,
2109,
58,
15,
60,
284,
220,
16,
271,
2405,
6607,
5820,
22622,
198,
9859,
1669,
1532,
19921,
2099,
5909,
568,
32535,
2099,
76,
34... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestCacheKVStoreNested(t *testing.T) {
mem := dbadapter.Store{DB: dbm.NewMemDB()}
st := cachekv.NewStore(mem)
// set. check its there on st and not on mem.
st.Set(keyFmt(1), valFmt(1))
require.Empty(t, mem.Get(keyFmt(1)))
require.Equal(t, valFmt(1), st.Get(keyFmt(1)))
// make a new from st and check
st2 ... | explode_data.jsonl/6649 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 394
} | [
2830,
3393,
8233,
82707,
6093,
71986,
1155,
353,
8840,
836,
8,
341,
14145,
1669,
2927,
19731,
38047,
90,
3506,
25,
2927,
76,
7121,
18816,
3506,
23509,
18388,
1669,
60287,
1225,
85,
7121,
6093,
39908,
692,
197,
322,
738,
13,
1779,
1181,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestProduces(test *testing.T) {
schema, err := parseRDLString(`
resource Any GET "/foo" {
produces application/json, application/xml , text/plain // some comment
}
`)
if err != nil {
test.Errorf("cannot parse valid RDL with produces: %v", err)
} else {
if len(schema.Resources) != 1 {
test.Errorf... | explode_data.jsonl/74351 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 399
} | [
2830,
3393,
49112,
8623,
353,
8840,
836,
8,
341,
1903,
3416,
11,
1848,
1669,
4715,
49,
16524,
703,
61528,
9233,
5765,
7890,
3521,
7975,
1,
341,
220,
18644,
3766,
8931,
11,
3766,
36524,
262,
1154,
256,
1467,
36971,
256,
442,
1045,
3980... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMessageFormatter(t *testing.T) {
buf := &bytes.Buffer{}
entry := zapcore.Entry{Message: "some message text \n\n"}
f := fabenc.MessageFormatter{FormatVerb: "%s"}
f.Format(buf, entry, nil)
assert.Equal(t, "some message text ", buf.String())
} | explode_data.jsonl/10934 | {
"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,
2052,
14183,
1155,
353,
8840,
836,
8,
341,
26398,
1669,
609,
9651,
22622,
16094,
48344,
1669,
32978,
2153,
22330,
90,
2052,
25,
330,
14689,
1943,
1467,
1124,
77,
1699,
16707,
1166,
1669,
9570,
954,
8472,
14183,
90,
4061,
669... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAdd(t *testing.T) {
testCases := []struct {
name string
sel Selector
key string
operator selection.Operator
values []string
refSelector Selector
}{
{
"keyInOperator",
internalSelector{},
"key",
selection.In,
[]string{"value"},
internalSelector{Re... | explode_data.jsonl/29777 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 447
} | [
2830,
3393,
2212,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
11609,
286,
914,
198,
197,
1903,
301,
260,
49610,
198,
197,
23634,
260,
914,
198,
197,
83041,
262,
6589,
85546,
198,
197,
45939,
414,
3056,
917,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDPAReconciler_updateRegistrySVC(t *testing.T) {
tests := []struct {
name string
svc *corev1.Service
bsl *velerov1.BackupStorageLocation
dpa *oadpv1alpha1.DataProtectionApplication
wantErr bool
}{
{
name: "Given Velero CR and BSL and SVC instance, appropriate registry svc gets... | explode_data.jsonl/45546 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1702
} | [
2830,
3393,
35,
8041,
693,
40446,
5769,
8882,
15603,
50,
11287,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
1903,
7362,
257,
353,
98645,
16,
13860,
198,
197,
93801,
75,
257,
353,
889,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Test_createQueue(t *testing.T) {
tests := []struct {
name string
ruleArn string
client *mockSQSclient
want *sqsClient
err bool
}{
{
name: "create SQS queue",
ruleArn: ruleArn,
client: &mockSQSclient{
queueURL: aws.String(queueURL),
},
want: &sqsClient{
client: &mockSQS... | explode_data.jsonl/40272 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 499
} | [
2830,
3393,
8657,
7554,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
271,
197,
7000,
1111,
58331,
914,
198,
197,
25291,
220,
353,
16712,
64308,
50,
2972,
198,
197,
50780,
262,
353,
82,
26358,
2959,
271,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTaskQueueFlush_Multiple_FlushesQueue(t *testing.T) {
v := validator{t: t}
tq := NewTaskQueue(3)
v.Add(3 + 5)
tq.Do(func() { v.Done("a") })
tq.Do(func() { v.Done("b") })
tq.Do(func() { v.Done("c") })
for i := 0; i < 5; i++ {
go func() {
tq.Flush()
v.Is("abc")
v.Done("")
}()
}
v.Validate("a... | explode_data.jsonl/22725 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 172
} | [
2830,
3393,
6262,
7554,
46874,
1245,
12229,
1400,
34604,
288,
7554,
1155,
353,
8840,
836,
8,
341,
5195,
1669,
22935,
90,
83,
25,
259,
532,
3244,
80,
1669,
1532,
6262,
7554,
7,
18,
340,
5195,
1904,
7,
18,
488,
220,
20,
340,
3244,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestStreamLen(t *testing.T) {
s, err := Run()
ok(t, err)
defer s.Close()
c, err := redis.Dial("tcp", s.Addr())
ok(t, err)
defer c.Close()
_, err = redis.String(c.Do("XADD", "s", "*", "one", "1", "two", "2"))
ok(t, err)
_, err = redis.String(c.Do("XADD", "s", "*", "one", "11", "two", "22"))
ok(t, err)
... | explode_data.jsonl/31880 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 405
} | [
2830,
3393,
3027,
11271,
1155,
353,
8840,
836,
8,
341,
1903,
11,
1848,
1669,
6452,
741,
59268,
1155,
11,
1848,
340,
16867,
274,
10421,
741,
1444,
11,
1848,
1669,
20870,
98462,
445,
27161,
497,
274,
93626,
2398,
59268,
1155,
11,
1848,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestActivatePreviousTask(t *testing.T) {
Convey("With two tasks and a build", t, func() {
require.NoError(t, db.ClearCollections(task.Collection, build.Collection),
"Error clearing task and build collections")
// create two tasks
displayName := "testTask"
b := &build.Build{
Id: "testBuild",
}
pr... | explode_data.jsonl/60427 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 704
} | [
2830,
3393,
31242,
21291,
6262,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
445,
2354,
1378,
9079,
323,
264,
1936,
497,
259,
11,
2915,
368,
341,
197,
17957,
35699,
1155,
11,
2927,
13524,
52730,
17483,
28629,
11,
1936,
28629,
1326,
298,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestMapperMethodsByName(t *testing.T) {
type C struct {
C0 string
C1 int
}
type B struct {
B0 *C `db:"B0"`
B1 C `db:"B1"`
B2 string `db:"B2"`
}
type A struct {
A0 *B `db:"A0"`
B `db:"A1"`
A2 int
a3 int
}
val := &A{
A0: &B{
B0: &C{C0: "0", C1: 1},
B1: C{C0: "2", C1: 3},
... | explode_data.jsonl/59107 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1655
} | [
2830,
3393,
10989,
17856,
16898,
1155,
353,
8840,
836,
8,
341,
13158,
356,
2036,
341,
197,
6258,
15,
914,
198,
197,
6258,
16,
526,
198,
197,
532,
13158,
425,
2036,
341,
197,
12791,
15,
353,
34,
257,
1565,
1999,
2974,
33,
15,
8805,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLogsFailed(t *testing.T) {
f := newPLMFixture(t)
defer f.TearDown()
f.kClient.ContainerLogsError = fmt.Errorf("my-error")
state := f.store.LockMutableStateForTesting()
p := store.Pod{
PodID: podID,
Containers: []store.Container{NewRunningContainer(cName, cID)},
}
state.UpsertManifestTarget(m... | explode_data.jsonl/65266 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 222
} | [
2830,
3393,
51053,
9408,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
501,
2916,
44,
18930,
1155,
340,
16867,
282,
836,
682,
4454,
2822,
1166,
5202,
2959,
33672,
51053,
1454,
284,
8879,
13080,
445,
2408,
18917,
5130,
24291,
1669,
282,
1611... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReactorValidatorSetChanges(t *testing.T) {
nPeers := 7
nVals := 4
css, cleanup := randConsensusNetWithPeers(nVals, nPeers, "consensus_val_set_changes_test", newMockTickerFunc(true), newPersistentKVStore)
defer cleanup()
logger := log.TestingLogger()
reactors, blocksSubs, eventBuses := startConsensusNet(... | explode_data.jsonl/7895 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1591
} | [
2830,
3393,
693,
5621,
14256,
1649,
11317,
1155,
353,
8840,
836,
8,
341,
9038,
10197,
388,
1669,
220,
22,
198,
9038,
52452,
1669,
220,
19,
198,
1444,
778,
11,
21290,
1669,
10382,
15220,
13626,
6954,
2354,
10197,
388,
1445,
52452,
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 TestDeletingExpiredJobShouldDeleteJobFromQueue(t *testing.T) {
withRepository(func(r *RedisJobRepository) {
job := addLeasedJob(t, r, "queue1", "cluster1")
deadline := time.Now()
_, e := r.ExpireLeases("queue1", deadline)
assert.Nil(t, e)
deletionResult, err := r.DeleteJobs([]*api.Job{job})
if err !... | explode_data.jsonl/32042 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 264
} | [
2830,
3393,
60475,
54349,
12245,
14996,
6435,
12245,
3830,
7554,
1155,
353,
8840,
836,
8,
341,
46948,
4624,
18552,
2601,
353,
48137,
12245,
4624,
8,
341,
197,
68577,
1669,
912,
2304,
1475,
12245,
1155,
11,
435,
11,
330,
4584,
16,
497,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestSortedArray_Range(t *testing.T) {
gtest.C(t, func(t *gtest.T) {
a1 := []interface{}{"a", "d", "c", "b", "e", "f"}
func1 := func(v1, v2 interface{}) int {
return strings.Compare(gconv.String(v1), gconv.String(v2))
}
array1 := garray.NewSortedArrayFrom(a1, func1)
array2 := garray.NewSortedArrayFrom... | explode_data.jsonl/67017 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 360
} | [
2830,
3393,
51051,
1857,
2568,
844,
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,
4913,
64,
497,
330,
67,
497,
330,
66,
497,
330,
65,
497,
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 TestProposalQueues(t *testing.T) {
mapp, keeper, _, _, _, _ := getMockApp(t, 0, GenesisState{}, nil)
header := abci.Header{Height: mapp.LastBlockHeight() + 1}
mapp.BeginBlock(abci.RequestBeginBlock{Header: header})
ctx := mapp.BaseApp.NewContext(false, abci.Header{})
mapp.InitChainer(ctx, abci.RequestInitCh... | explode_data.jsonl/60869 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 404
} | [
2830,
3393,
98637,
25776,
1137,
1155,
353,
8840,
836,
8,
341,
2109,
676,
11,
53416,
11,
8358,
8358,
8358,
716,
1669,
633,
11571,
2164,
1155,
11,
220,
15,
11,
40788,
1397,
22655,
2092,
692,
20883,
1669,
668,
5855,
15753,
90,
3640,
25,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestHandshakeUpdatesValidators(t *testing.T) {
val, _ := factory.RandValidator(true, 10)
vals := types.NewValidatorSet([]*types.Validator{val})
app := &initChainApp{vals: types.TM2PB.ValidatorUpdates(vals)}
clientCreator := abciclient.NewLocalCreator(app)
cfg, err := ResetConfig("handshake_test_")
require.N... | explode_data.jsonl/6604 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 576
} | [
2830,
3393,
2314,
29661,
37091,
31748,
1155,
353,
8840,
836,
8,
341,
19302,
11,
716,
1669,
8633,
2013,
437,
14256,
3715,
11,
220,
16,
15,
340,
19302,
82,
1669,
4494,
7121,
14256,
1649,
85288,
9242,
13,
14256,
90,
831,
3518,
28236,
166... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestontainerInvalidLeave(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 != nil {
t... | explode_data.jsonl/6369 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 623
} | [
2830,
3393,
544,
1743,
7928,
21833,
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,
12320... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAddHTLCNegativeBalance(t *testing.T) {
t.Parallel()
// We'll kick off the test by creating our channels which both are
// loaded with 5 BTC each.
aliceChannel, _, cleanUp, err := CreateTestChannels(
channeldb.SingleFunderTweaklessBit,
)
if err != nil {
t.Fatalf("unable to create test channels: %v", ... | explode_data.jsonl/72474 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 486
} | [
2830,
3393,
2212,
2545,
8556,
38489,
21190,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
197,
322,
1205,
3278,
10323,
1007,
279,
1273,
553,
6825,
1039,
11744,
892,
2176,
525,
198,
197,
322,
6661,
448,
220,
20,
36045,
1817,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestTextGenerator_GenerateDataBySchema_MaxLengthLessThan5_RandomStringOfGivenLength(t *testing.T) {
textGeneratorInstance := &textGenerator{}
schema := openapi3.NewSchema()
var maxLength uint64 = 4
schema.MaxLength = &maxLength
data, err := textGeneratorInstance.GenerateDataBySchema(context.Background(), sch... | explode_data.jsonl/45035 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 128
} | [
2830,
3393,
1178,
12561,
2646,
13220,
1043,
1359,
8632,
58843,
4373,
27451,
26067,
20,
2568,
2206,
703,
2124,
22043,
4373,
1155,
353,
8840,
836,
8,
341,
15425,
12561,
2523,
1669,
609,
1318,
12561,
16094,
1903,
3416,
1669,
1787,
2068,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestBlockWireErrors(t *testing.T) {
// Use protocol version 60002 specifically here instead of the latest
// because the test data is using bytes encoded with that protocol
// version.
pver := uint32(60002)
tests := []struct {
in *MsgBlock // Value to encode
buf []byte // Wire e... | explode_data.jsonl/16744 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 845
} | [
2830,
3393,
4713,
37845,
13877,
1155,
353,
8840,
836,
8,
341,
197,
322,
5443,
11507,
2319,
220,
21,
15,
15,
15,
17,
11689,
1588,
4518,
315,
279,
5535,
198,
197,
322,
1576,
279,
1273,
821,
374,
1667,
5820,
20498,
448,
429,
11507,
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... | 4 |
func TestSplitMapping(t *testing.T) {
t.Parallel()
r, err := buildRelabeling(config.RelabelConfig{Split: 2})
if err != nil {
t.Error(err)
}
assertMapping(t, r, "foo bar", "bar")
} | explode_data.jsonl/49264 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 79
} | [
2830,
3393,
20193,
6807,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
7000,
11,
1848,
1669,
1936,
6740,
780,
287,
8754,
38939,
780,
2648,
90,
20193,
25,
220,
17,
3518,
743,
1848,
961,
2092,
341,
197,
3244,
6141,
3964,
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
] | 2 |
func Test_increaseWidth(t *testing.T) {
testcases := []struct {
colsWidth map[int]int
want int
}{
{colsWidth: map[int]int{0: 10}, want: 14}, // current width 10 chars, want to be 14
{colsWidth: map[int]int{0: 254}, want: 256}, // current width 254 chars, want to be 256
}
wg := sync.WaitGroup{}
fo... | explode_data.jsonl/69224 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 342
} | [
2830,
3393,
73807,
3327,
1155,
353,
8840,
836,
8,
341,
18185,
23910,
1669,
3056,
1235,
341,
197,
1444,
3069,
3327,
2415,
18640,
63025,
198,
197,
50780,
414,
526,
198,
197,
59403,
197,
197,
90,
21380,
3327,
25,
2415,
18640,
63025,
90,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSubscribeToGroupLabel(t *testing.T) {
mux, server, client := setup(t)
defer teardown(server)
mux.HandleFunc("/api/v4/groups/1/labels/5/subscribe", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, http.MethodPost)
fmt.Fprint(w, `{ "id" : 5, "name" : "kind/bug", "color" : "#d9534f", "desc... | explode_data.jsonl/34993 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 345
} | [
2830,
3393,
28573,
1249,
2808,
2476,
1155,
353,
8840,
836,
8,
341,
2109,
2200,
11,
3538,
11,
2943,
1669,
6505,
1155,
340,
16867,
49304,
21421,
692,
2109,
2200,
63623,
4283,
2068,
5457,
19,
77685,
14,
16,
14,
16873,
14,
20,
14,
9384,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPushWithContentTypeCustom(t *testing.T) {
contentType := fmt.Sprintf("%s-test", defaultChartsContentType)
t.Logf("Test basic push action with --content-type='%s'", contentType)
name := "test-push"
dir := "charts"
setupRepo(t, name, dir)
defer teardownRepo(t, name)
key := dir + "/foo-1.2.3.tgz"
// se... | explode_data.jsonl/13706 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 326
} | [
2830,
3393,
16644,
2354,
29504,
10268,
1155,
353,
8840,
836,
8,
341,
27751,
929,
1669,
8879,
17305,
4430,
82,
16839,
497,
1638,
64878,
29504,
340,
3244,
98954,
445,
2271,
6770,
4484,
1917,
448,
1177,
1796,
10604,
41782,
82,
22772,
32103,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStickyBuffer(t *testing.T) {
for _, tt := range []struct {
s string
want DataPos
wantErr bool
}{
{
s: "pkt_data",
want: pktData,
wantErr: false,
},
{
s: "foobarbaz",
want: pktData,
wantErr: true,
},
{
s: "http_request_line",
want: ht... | explode_data.jsonl/59697 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 329
} | [
2830,
3393,
623,
18964,
4095,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17853,
1669,
2088,
3056,
1235,
341,
197,
1903,
981,
914,
198,
197,
50780,
262,
2885,
4859,
198,
197,
50780,
7747,
1807,
198,
197,
59403,
197,
197,
515,
298,
1903,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewGitCommand(t *testing.T) {
actual, err := os.Getwd()
assert.NoError(t, err)
defer func() {
assert.NoError(t, os.Chdir(actual))
}()
type scenario struct {
testName string
setup func()
test func(*GitCommand, error)
}
scenarios := []scenario{
{
"An error occurred, folder doesn't c... | explode_data.jsonl/38353 | {
"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,
3564,
46562,
4062,
1155,
353,
8840,
836,
8,
341,
88814,
11,
1848,
1669,
2643,
2234,
6377,
741,
6948,
35699,
1155,
11,
1848,
692,
16867,
2915,
368,
341,
197,
6948,
35699,
1155,
11,
2643,
6353,
3741,
29721,
1171,
197,
66816,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDuplicateEndpoint(t *testing.T) {
if !testutils.IsRunningInContainer() {
defer testutils.SetupTestOSContext(t)()
}
netOption := options.Generic{
netlabel.GenericData: options.Generic{
"BridgeName": "testnetwork",
},
}
n, err := createTestNetwork(bridgeNetType, "testnetwork", netOption, nil, nil)... | explode_data.jsonl/6360 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 413
} | [
2830,
3393,
53979,
27380,
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,
59486,
5341,
1669,
2606,
4341,
515,
197,
59486,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUpdateReleaseNoChanges(t *testing.T) {
c := helm.NewContext()
rs := rsFixture()
rel := releaseStub()
rs.env.Releases.Create(rel)
req := &services.UpdateReleaseRequest{
Name: rel.Name,
DisableHooks: true,
Chart: rel.GetChart(),
}
_, err := rs.UpdateRelease(c, req)
if err != nil {
... | explode_data.jsonl/82243 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 153
} | [
2830,
3393,
4289,
16077,
2753,
11317,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
33765,
7121,
1972,
741,
41231,
1669,
10036,
18930,
741,
197,
3748,
1669,
4879,
33838,
741,
41231,
9265,
2817,
28299,
7251,
49235,
692,
24395,
1669,
609,
12779... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIsNumber(t *testing.T) {
testCases := []struct {
pr PullRequest
isPR bool
}{
{
pr: PullRequest{
Number: 0,
},
isPR: false,
},
{
pr: PullRequest{
Number: 123,
},
isPR: true,
},
}
for _, testCase := range testCases {
if testCase.pr.IsNumber() != testCase.isPR {
t.... | explode_data.jsonl/37417 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 193
} | [
2830,
3393,
3872,
2833,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
25653,
256,
31828,
1900,
198,
197,
19907,
6480,
1807,
198,
197,
59403,
197,
197,
515,
298,
25653,
25,
31828,
1900,
515,
571,
197,
2833,
25... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestNamespaceQuery(t *testing.T) {
gotNamespace := make(chan string, 1)
ctx := context.Background()
client := &Client{
client: &fakeClient{
queryFn: func(req *pb.RunQueryRequest) (*pb.RunQueryResponse, error) {
if part := req.PartitionId; part != nil {
gotNamespace <- part.NamespaceId
} else {... | explode_data.jsonl/50246 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 435
} | [
2830,
3393,
22699,
2859,
1155,
353,
8840,
836,
8,
341,
3174,
354,
22699,
1669,
1281,
35190,
914,
11,
220,
16,
340,
20985,
1669,
2266,
19047,
741,
25291,
1669,
609,
2959,
515,
197,
25291,
25,
609,
30570,
2959,
515,
298,
27274,
24911,
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 TestSelect(t *testing.T) {
tree, err := Parse("select * from t where a = 1")
if err != nil {
t.Error(err)
}
expr := tree.(*Select).Where.Expr
sel := &Select{}
sel.AddWhere(expr)
buf := NewTrackedBuffer(nil)
sel.Where.Format(buf)
want := " where a = 1"
if buf.String() != want {
t.Errorf("where: %q, w... | explode_data.jsonl/3369 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 634
} | [
2830,
3393,
3379,
1155,
353,
8840,
836,
8,
341,
51968,
11,
1848,
1669,
14775,
445,
1742,
353,
504,
259,
1380,
264,
284,
220,
16,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
6141,
3964,
340,
197,
532,
8122,
649,
1669,
4916,
41399,
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... | 9 |
func TestClusterAddMember(t *testing.T) {
st := &storeRecorder{}
c := newTestCluster(nil)
c.SetStore(st)
c.AddMember(newTestMember(1, nil, "node1", nil))
wactions := []testutil.Action{
{
Name: "Create",
Params: []interface{}{
path.Join(storeMembersPrefix, "1", "raftAttributes"),
false,
`{"peer... | explode_data.jsonl/52339 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 220
} | [
2830,
3393,
28678,
2212,
9366,
1155,
353,
8840,
836,
8,
341,
18388,
1669,
609,
4314,
47023,
16094,
1444,
1669,
501,
2271,
28678,
27907,
340,
1444,
4202,
6093,
5895,
340,
1444,
1904,
9366,
1755,
2271,
9366,
7,
16,
11,
2092,
11,
330,
35... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestBackend_basic(t *testing.T) {
logicaltest.Test(t, logicaltest.TestCase{
AcceptanceTest: true,
Factory: Factory,
Steps: []logicaltest.TestStep{
testAccStepMapAppId(t),
testAccStepMapUserId(t),
testAccLogin(t, ""),
testAccLoginAppIDInPath(t, ""),
testAccLoginInvalid(t),
testAccSte... | explode_data.jsonl/11668 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 166
} | [
2830,
3393,
29699,
34729,
1155,
353,
8840,
836,
8,
341,
6725,
938,
1944,
8787,
1155,
11,
19819,
1944,
31363,
515,
197,
197,
16646,
681,
2271,
25,
830,
345,
197,
197,
4153,
25,
286,
16937,
345,
197,
197,
33951,
25,
3056,
30256,
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... | 1 |
func TestUpdate(t *testing.T) {
storage := map[string]RESTStorage{}
simpleStorage := SimpleRESTStorage{}
ID := "id"
storage["simple"] = &simpleStorage
handler := New(storage, "/prefix/version")
server := httptest.NewServer(handler)
item := Simple{
Name: "bar",
}
body, err := api.Encode(item)
expectNoError(... | explode_data.jsonl/30460 | {
"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,
4289,
1155,
353,
8840,
836,
8,
341,
197,
16172,
1669,
2415,
14032,
60,
38307,
5793,
16094,
1903,
6456,
5793,
1669,
8993,
38307,
5793,
16094,
29580,
1669,
330,
307,
698,
197,
16172,
1183,
22944,
1341,
284,
609,
22944,
5793,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNodeMaintenance(t *testing.T) {
RegisterFailHandler(Fail)
rr := []Reporter{}
rr = append(rr, NewJUnitReporter("node-maintenance"))
RunSpecsWithDefaultAndCustomReporters(t, "Node Maintenance Operator e2e tests", rr)
} | explode_data.jsonl/63040 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 77
} | [
2830,
3393,
1955,
92735,
1155,
353,
8840,
836,
8,
341,
79096,
19524,
3050,
7832,
604,
692,
197,
634,
1669,
3056,
52766,
16094,
197,
634,
284,
8737,
80818,
11,
1532,
56248,
52766,
445,
3509,
1448,
24559,
5455,
85952,
8327,
16056,
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 |
func TestSelect(t *testing.T) {
gopClTest(t, `
func consume(xchg chan int) {
select {
case c := <-xchg:
println(c)
case xchg <- 1:
println("send ok")
default:
println(0)
}
}
`, `package main
import fmt "fmt"
func consume(xchg chan int) {
select {
case c := <-xchg:
fmt.Println(c)
case xchg <- 1:
fm... | explode_data.jsonl/73600 | {
"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,
3379,
1155,
353,
8840,
836,
8,
341,
3174,
453,
5066,
2271,
1155,
11,
1565,
271,
2830,
24057,
2075,
65940,
26023,
526,
8,
341,
38010,
341,
2722,
272,
1669,
9119,
87,
65940,
510,
197,
81168,
1337,
340,
2722,
856,
65940,
9119... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRunLength(t *testing.T) {
cases := []struct {
T uint
X int64
Expect Sum
}{
{
T: 4,
X: 0xff,
Expect: Sum{
{D: big.NewInt(0xf), E: 0},
{D: big.NewInt(0xf), E: 4},
},
},
{
T: 0,
X: 0xff,
Expect: Sum{
{D: big.NewInt(0xff), E: 0},
},
},
{
T: 4,
X... | explode_data.jsonl/75060 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 559
} | [
2830,
3393,
6727,
4373,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
10261,
414,
2622,
198,
197,
22123,
414,
526,
21,
19,
198,
197,
35911,
8116,
198,
197,
59403,
197,
197,
515,
298,
10261,
25,
220,
19,
345,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestDockerStopSuccess(t *testing.T) {
composeMock, docker, imageMock := getComposeMocks()
imageMock.On("GetImageLabels").Return(map[string]string{}, nil)
composeMock.On("Stop", mock.Anything, mock.Anything, mock.Anything).Return(nil)
err := docker.Stop()
assert.NoError(t, err)
} | explode_data.jsonl/50544 | {
"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,
35,
13659,
10674,
7188,
1155,
353,
8840,
836,
8,
341,
32810,
2900,
11571,
11,
26588,
11,
2168,
11571,
1669,
633,
70492,
72577,
741,
31426,
11571,
8071,
445,
1949,
1906,
23674,
1827,
5598,
9147,
14032,
30953,
22655,
2092,
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 Test_postEnvironmentImportHandler_NewEnvFromYAMLWithKeysAndSecrets(t *testing.T) {
api, db, _, end := newTestAPI(t)
defer end()
u, pass := assets.InsertAdminUser(t, db)
proj := assets.InsertTestProject(t, db, api.Cache, sdk.RandomString(10), sdk.RandomString(10))
test.NotNil(t, proj)
//We will create an en... | explode_data.jsonl/20307 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1378
} | [
2830,
3393,
6333,
12723,
11511,
3050,
39582,
14359,
3830,
56,
31102,
2354,
8850,
3036,
19773,
82,
1155,
353,
8840,
836,
8,
341,
54299,
11,
2927,
11,
8358,
835,
1669,
501,
2271,
7082,
1155,
340,
16867,
835,
2822,
10676,
11,
1494,
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... | 6 |
func TestPusher_truncateLogEvent(t *testing.T) {
p, tmpFolder := newMockPusher()
defer os.RemoveAll(tmpFolder)
largeEventContent := strings.Repeat("a", MaxEventPayloadBytes)
logEvent := NewLogEvent(timestampInMillis, largeEventContent)
expectedTruncatedContent := (*logEvent.InputLogEvent.Message)[0:(MaxEventPaylo... | explode_data.jsonl/61464 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 166
} | [
2830,
3393,
16644,
261,
3547,
26900,
2201,
1556,
1155,
353,
8840,
836,
8,
341,
3223,
11,
4174,
13682,
1669,
501,
11571,
16644,
261,
741,
16867,
2643,
84427,
10368,
13682,
340,
8810,
2744,
1556,
2762,
1669,
9069,
2817,
10979,
445,
64,
49... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestProperties_ValidateManagedIdentity(t *testing.T) {
tests := []struct {
name string
orchestratorRelease string
useManagedIdentity bool
userAssignedID string
masterProfile MasterProfile
expectedErr string
agentPoolProfiles []*AgentPoolProfile
}{
{
name: ... | explode_data.jsonl/17880 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1572
} | [
2830,
3393,
7903,
62,
17926,
27192,
18558,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
394,
914,
198,
197,
197,
21584,
15111,
850,
16077,
914,
198,
197,
41819,
27192,
18558,
220,
1807,
198,
197,
19060,
94025,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMissingHashFunction(t *testing.T) {
// missingHashFunctionHex contains a signature packet that uses
// RIPEMD160, which isn't compiled in. Since that's the only signature
// packet we don't find any suitable packets and end up with ErrUnknownIssuer
kring, _ := ReadKeyRing(readerFromHex(testKeys1And2Hex))
... | explode_data.jsonl/2288 | {
"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,
25080,
6370,
5152,
1155,
353,
8840,
836,
8,
341,
197,
322,
7402,
6370,
5152,
20335,
5610,
264,
11957,
10151,
429,
5711,
198,
197,
322,
47497,
1740,
6076,
16,
21,
15,
11,
892,
4436,
944,
19697,
304,
13,
220,
8704,
429,
59... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestListChaining(t *testing.T) {
list := New()
list.Add("a", "b", "c")
chainedList := list.Select(func(index int, value interface{}) bool {
return value.(string) > "a"
}).Map(func(index int, value interface{}) interface{} {
return value.(string) + value.(string)
})
if chainedList.Size() != 2 {
t.Errorf... | explode_data.jsonl/18299 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 237
} | [
2830,
3393,
852,
1143,
2056,
1155,
353,
8840,
836,
8,
341,
14440,
1669,
1532,
741,
14440,
1904,
445,
64,
497,
330,
65,
497,
330,
66,
1138,
23049,
2627,
852,
1669,
1140,
14752,
18552,
7195,
526,
11,
897,
3749,
28875,
1807,
341,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestLabelSubmatch(t *testing.T) {
testConfig := []byte(`metrics:
- name: submatch
event_matcher:
- key: Message
expr: Volume (.*) mount failed for Instance (.*)
- key: Type
expr: Normal
labels:
volume: Message[1]
instance: Message[2]
`)
testEvent = v1.Event{
Message: "Volume vol-1234 moun... | explode_data.jsonl/36669 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 276
} | [
2830,
3393,
2476,
3136,
6347,
1155,
353,
8840,
836,
8,
341,
18185,
2648,
1669,
3056,
3782,
5809,
43262,
510,
12,
829,
25,
1186,
6347,
198,
220,
1538,
10708,
261,
510,
220,
481,
1376,
25,
4856,
198,
262,
15169,
25,
20265,
29465,
3764,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestServerPromoteSelf(t *testing.T) {
e0, _ := newLogEntry(newLog(), 1, 1, &testCommand1{Val: "foo", I: 20})
s := newTestServerWithLog("1", &testTransporter{}, []*LogEntry{e0})
// start as a follower
s.Start()
defer s.Stop()
time.Sleep(2 * testElectionTimeout)
if s.State() != Leader {
t.Fatalf("Server ... | explode_data.jsonl/44062 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 143
} | [
2830,
3393,
5475,
35186,
1272,
12092,
1155,
353,
8840,
836,
8,
341,
7727,
15,
11,
716,
1669,
501,
2201,
5874,
1755,
2201,
1507,
220,
16,
11,
220,
16,
11,
609,
1944,
4062,
16,
90,
2208,
25,
330,
7975,
497,
358,
25,
220,
17,
15,
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 TestAtomicBool(t *testing.T) {
var b AtomicBool
assert.False(t, b.Load())
b = NewAtomicBool(true)
assert.True(t, b.Load())
assert.False(t, b.CompareAndSwap(false, true))
assert.True(t, b.Swap(false))
assert.False(t, b.Load())
assert.True(t, b.CompareAndSwap(false, true))
assert.Tr... | explode_data.jsonl/35134 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 209
} | [
2830,
3393,
65857,
11233,
1155,
353,
8840,
836,
8,
972,
2405,
293,
30316,
11233,
871,
6948,
50757,
1155,
11,
293,
13969,
79189,
2233,
284,
1532,
65857,
11233,
3715,
7229,
6948,
32443,
1155,
11,
293,
13969,
79189,
6948,
50757,
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 TestTrimPrefix(t *testing.T) {
testCases := []struct {
input string
output string
}{
{
input: "/hello",
output: "/",
},
{
input: "/static/vendor.js",
output: "static/vendor.js",
},
}
for _, testCase := range testCases {
called := false
actualURL := ""
h := http.HandlerFunc(fu... | explode_data.jsonl/1925 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 311
} | [
2830,
3393,
25656,
14335,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
22427,
220,
914,
198,
197,
21170,
914,
198,
197,
59403,
197,
197,
515,
298,
22427,
25,
220,
3521,
14990,
756,
298,
21170,
25,
3521,
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 |
func TestPatchOptionReturnsUnauthorized(t *testing.T) {
t.Parallel()
Convey("Patch option of an instance returns unauthorized", t, func() {
body := strings.NewReader(`[
{"op": "add", "path": "/order", "value": 0},
{"op": "add", "path": "/node_id", "value": "11"}
]`)
r, err := http.NewRequest(http.MethodPa... | explode_data.jsonl/20833 | {
"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,
43622,
5341,
16446,
51181,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
93070,
5617,
445,
43622,
2999,
315,
458,
2867,
4675,
44471,
497,
259,
11,
2915,
368,
341,
197,
35402,
1669,
9069,
68587,
5809,
9640,
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... | 1 |
func TestPrevPointerAddition(t *testing.T) {
world, ri, _, blockingSender, _, secretUI, tlf := setupTest(t, 1)
defer world.Cleanup()
u := world.GetUsers()[0]
uid := u.User.GetUID().ToBytes()
tc := userTc(t, world, u)
trip := newConvTriple(t, tlf, u.Username)
res, err := ri.NewConversationRemote2(context.TODO(),... | explode_data.jsonl/50759 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 785
} | [
2830,
3393,
33528,
9084,
2212,
680,
1155,
353,
8840,
836,
8,
341,
76508,
11,
24185,
11,
8358,
22188,
20381,
11,
8358,
6234,
2275,
11,
259,
11008,
1669,
6505,
2271,
1155,
11,
220,
16,
340,
16867,
1879,
727,
60639,
2822,
10676,
1669,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestNewMutatorController(t *testing.T) {
assert := assert.New(t)
store := &mockstore.MockStore{}
ctl := NewMutatorController(store)
assert.NotNil(ctl)
assert.Equal(store, ctl.store)
} | explode_data.jsonl/12865 | {
"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,
3564,
51440,
850,
2051,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
57279,
1669,
609,
16712,
4314,
24664,
6093,
16094,
197,
12373,
1669,
1532,
51440,
850,
2051,
31200,
340,
6948,
93882,
7,
12373,
340,
69... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBundle_ReconcileApplication(t *testing.T) {
b := NewBundle(yaml.GetName())
spec := &v1beta1.ToolsetSpec{}
app := application.NewTestYAMLApplication(t)
out, _ := yamlv3.Marshal(testHelperResource)
app.SetDeploy(spec, true).SetGetYaml(spec, string(out))
b.AddApplication(app.Application())
resources :=... | explode_data.jsonl/48064 | {
"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,
8409,
50693,
40446,
457,
4988,
1155,
353,
8840,
836,
8,
341,
2233,
1669,
1532,
8409,
7021,
9467,
60304,
12367,
98100,
1669,
609,
85,
16,
19127,
16,
24439,
746,
8327,
16094,
28236,
1669,
3766,
7121,
2271,
56,
31102,
4988,
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,
1,
1... | 1 |
func TestEquivalentError(t *testing.T) {
tests := []struct {
Err1, Err2 error
Want bool
}{
{Err1: errors.New("not etcd"), Err2: errors.New("not etcd"), Want: true},
{Err1: errors.New("not etcd"), Err2: errors.New("not etcd but different")},
{Err1: errors.New("not etcd"), Err2: rpctypes.ErrUnhealthy},
... | explode_data.jsonl/45337 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 293
} | [
2830,
3393,
91060,
1454,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
197,
7747,
16,
11,
15495,
17,
1465,
198,
197,
17300,
517,
981,
1807,
198,
197,
59403,
197,
197,
90,
7747,
16,
25,
5975,
7121,
445,
1921,
1842,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestJvInvalid(t *testing.T) {
jv := jq.JvInvalid()
if jv.IsValid() == true {
t.Errorf("IsValid() returned true for JvInvalid()")
}
if _, ok := jv.Copy().GetInvalidMessageAsString(); ok {
t.Errorf("GetInvalidMessageAsString() returned string for no value")
}
if jv.GetInvalidMessage().Kind() != jq.JvKin... | explode_data.jsonl/38760 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 152
} | [
2830,
3393,
41,
85,
7928,
1155,
353,
8840,
836,
8,
341,
12428,
85,
1669,
44648,
3503,
85,
7928,
741,
743,
502,
85,
28992,
368,
621,
830,
341,
197,
3244,
13080,
445,
55470,
368,
5927,
830,
369,
619,
85,
7928,
90208,
197,
630,
743,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestLineNum(t *testing.T) {
const count = 100
text := strings.Repeat("{{printf 1234}}\n", count)
tree, err := New("bench").Parse(text, "", "", make(map[string]*Tree), builtins)
if err != nil {
t.Fatal(err)
}
// Check the line numbers. Each line is an action containing a template, followed by text.
// That... | explode_data.jsonl/68976 | {
"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,
2460,
4651,
1155,
353,
8840,
836,
8,
341,
4777,
1760,
284,
220,
16,
15,
15,
198,
15425,
1669,
9069,
2817,
10979,
445,
2979,
2517,
220,
16,
17,
18,
19,
3417,
59,
77,
497,
1760,
340,
51968,
11,
1848,
1669,
1532,
445,
270... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetDaemonEndpoints1(t *testing.T) { // default address set to udp and tcp
udpAddr := "127.0.0.1:2000"
tcpAddr := "127.0.0.1:2000"
udpEndpt, _ := resolveUDPAddr(udpAddr)
tcpEndpt, _ := resolveTCPAddr(tcpAddr)
dEndpt := GetDaemonEndpoints()
assert.Equal(t, dEndpt.UDPAddr, udpEndpt)
assert.Equal(t, dEndpt... | explode_data.jsonl/49929 | {
"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,
1949,
89177,
80786,
16,
1155,
353,
8840,
836,
8,
314,
442,
1638,
2621,
738,
311,
49219,
323,
28051,
198,
197,
31101,
13986,
1669,
330,
16,
17,
22,
13,
15,
13,
15,
13,
16,
25,
17,
15,
15,
15,
698,
3244,
4672,
13986,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestClusterNames(t *testing.T) {
g := gomega.NewGomegaWithT(t)
// Setup the Manager and Controller. Wrap the Controller Reconcile function so it writes each request to a
// channel when it is finished.
mgr, err := manager.New(cfg, manager.Options{MetricsBindAddress: "0"})
g.Expect(err).NotTo(gomega.HaveOccu... | explode_data.jsonl/48693 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 807
} | [
2830,
3393,
28678,
7980,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
342,
32696,
7121,
38,
32696,
2354,
51,
1155,
692,
197,
322,
18626,
279,
10567,
323,
9771,
13,
220,
42187,
279,
9771,
1032,
40446,
457,
729,
773,
432,
13914,
1817,
1681... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestKubeConfigWrite(t *testing.T) {
tests := []struct {
name string
expectedContent string
expectedErrorContains string
readWrite io.ReadWriter
options []kubeconfig.Option
src kubeconfig.KubeSourceFunc
}{
{
name: "Basic write",
src: kubec... | explode_data.jsonl/31796 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 635
} | [
2830,
3393,
42,
3760,
2648,
7985,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
1698,
914,
198,
197,
42400,
2762,
981,
914,
198,
197,
42400,
1454,
23805,
914,
271,
197,
37043,
7985,
6399,
6503,
6492,
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 TestGenerateKeyPairs(t *testing.T) {
pri, pub, err := GenerateKeyPairs()
t.Logf("%s %s %v", pri, pub, err)
prikey, err := LoadPrivateKey(pri)
if err != nil {
t.Error(err)
}
pubkey, err := LoadPublicKey(pub)
if err != nil {
t.Error(err)
}
txt := "blockchain Is good"
hash := sha256.New().Sum([]byte(tx... | explode_data.jsonl/48737 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 256
} | [
2830,
3393,
31115,
1592,
54228,
1155,
353,
8840,
836,
8,
341,
3223,
461,
11,
6675,
11,
1848,
1669,
19813,
1592,
54228,
741,
3244,
98954,
4430,
82,
1018,
82,
1018,
85,
497,
12493,
11,
6675,
11,
1848,
340,
3223,
461,
792,
11,
1848,
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... | 5 |
func TestVirtual_memory(t *testing.T) {
v, err := VirtualMemory()
if err != nil {
t.Errorf("error %v", err)
}
empty := &VirtualMemoryStat{}
if v == empty {
t.Errorf("error %v", v)
}
assert.True(t, v.Total > 0)
assert.True(t, v.Available > 0)
assert.True(t, v.Used > 0)
assert.Equal(t, v.Total, v.Availabl... | explode_data.jsonl/971 | {
"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,
33026,
19195,
1155,
353,
8840,
836,
8,
341,
5195,
11,
1848,
1669,
20721,
10642,
741,
743,
1848,
961,
2092,
341,
197,
3244,
13080,
445,
841,
1018,
85,
497,
1848,
340,
197,
532,
197,
3194,
1669,
609,
33026,
10642,
15878,
160... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestUnsubscribeOk(t *testing.T) {
defer testdb.Reset()
var sendedMessage string
bot := bot{
connect: sqlx.MustOpen("testdb", ""),
telebot: &testSender{
send: func(recipient telebot.Recipient, message string, _ *telebot.SendOptions) error {
sendedMessage = message
return nil
},
},
}
tes... | explode_data.jsonl/8504 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 474
} | [
2830,
3393,
1806,
9384,
11578,
1155,
353,
8840,
836,
8,
341,
16867,
1273,
1999,
36660,
741,
2405,
274,
2883,
2052,
914,
271,
2233,
354,
1669,
10924,
515,
197,
56905,
25,
5704,
87,
50463,
5002,
445,
1944,
1999,
497,
72712,
197,
197,
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 TestAddFeedShouldShowErrorMessageWhenFeedIsMissingURL(t *testing.T) {
expected := command.MissingFeedInformation
conf := config.Config{"redis", test.ValidRedisConnection}
test.InitializeRedis(conf)
actual := Add(conf, common.Feed{"Mock Feed", ""})
test.AssertFailure(t, expected, actual)
} | explode_data.jsonl/75098 | {
"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,
2212,
28916,
14996,
7812,
21349,
4498,
28916,
3872,
25080,
3144,
1155,
353,
8840,
836,
8,
341,
42400,
1669,
3210,
1321,
13577,
28916,
14873,
198,
67850,
1669,
2193,
10753,
4913,
21748,
497,
1273,
47156,
48137,
4526,
532,
18185,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIsElasticsearchSizeAllChange(t *testing.T) {
helper := func(kibanaSize, masterSize, dataSize, expectedNewSize string, kibana, dedicatedMaster, expectedIsAll bool) {
newSize, isAllChange := isElasticsearchSizeAllChange(kibanaSize, masterSize, dataSize, kibana, dedicatedMaster)
if isAllChange != expectedIsA... | explode_data.jsonl/3823 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 680
} | [
2830,
3393,
3872,
36,
51179,
1836,
1695,
2403,
4072,
1155,
353,
8840,
836,
8,
341,
9598,
2947,
1669,
2915,
5969,
579,
3362,
1695,
11,
7341,
1695,
11,
89961,
11,
3601,
3564,
1695,
914,
11,
595,
579,
3362,
11,
12235,
18041,
11,
3601,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.