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 TestUpdateUserToRestrictedDomain(t *testing.T) {
th := Setup(t)
defer th.TearDown()
user := th.CreateUser()
defer th.App.PermanentDeleteUser(user)
th.App.UpdateConfig(func(cfg *model.Config) {
*cfg.TeamSettings.RestrictCreationToDomains = "foo.com"
})
_, err := th.App.UpdateUser(user, false)
assert.Tr... | explode_data.jsonl/31413 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 177
} | [
2830,
3393,
4289,
1474,
1249,
86405,
13636,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1155,
340,
16867,
270,
836,
682,
4454,
2822,
19060,
1669,
270,
7251,
1474,
741,
16867,
270,
5105,
1069,
4753,
306,
6435,
1474,
4277,
692,
7047... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHelloWorldFromShell(t *testing.T) {
//add test case specific name to its own logger
logger := test.GetContextLogger("TestHelloWorldFromShell")
imagePath := strings.Join([]string{test.Flags.DockerRepo, "helloworld"}, "/")
logger.Infof("Creating manifest")
// Create manifest file.
newYaml, err := ioutil... | explode_data.jsonl/81796 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 987
} | [
2830,
3393,
9707,
10134,
3830,
25287,
1155,
353,
8840,
836,
8,
341,
197,
322,
718,
1273,
1142,
3151,
829,
311,
1181,
1828,
5925,
198,
17060,
1669,
1273,
2234,
1972,
7395,
445,
2271,
9707,
10134,
3830,
25287,
5130,
31426,
1820,
1669,
906... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStartCmdWithMissingTokenURLArg(t *testing.T) {
startCmd := GetStartCmd(&mockServer{})
var args []string
args = append(args, hostURLArg()...)
args = append(args, endpointAuthURLArg()...)
startCmd.SetArgs(args)
err := startCmd.Execute()
require.Contains(t, err.Error(),
"Neither token-url (command line... | explode_data.jsonl/23758 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 135
} | [
2830,
3393,
3479,
15613,
2354,
25080,
3323,
3144,
2735,
1155,
353,
8840,
836,
8,
341,
21375,
15613,
1669,
2126,
3479,
15613,
2099,
16712,
5475,
6257,
692,
2405,
2827,
3056,
917,
198,
31215,
284,
8737,
7356,
11,
3468,
3144,
2735,
368,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestContains(t *testing.T) {
m := NewSimpleLongConcurrentHashMap()
if m.Contains(1) == true {
t.Error("map should not contain this key")
}
amy := Girl{"Amy"}
m.Put(7, amy)
if m.Contains(7) == false {
t.Error("map should contain this key")
}
} | explode_data.jsonl/19660 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 103
} | [
2830,
3393,
23805,
1155,
353,
8840,
836,
8,
341,
2109,
1669,
1532,
16374,
6583,
1109,
3231,
18497,
2822,
743,
296,
11545,
7,
16,
8,
621,
830,
341,
197,
3244,
6141,
445,
2186,
1265,
537,
6644,
419,
1376,
1138,
197,
630,
197,
26228,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetArchivePathInjection(t *testing.T) {
locator := config.NewLocator(config.Config)
serverSocketPath, stop := runRepoServer(t, locator)
defer stop()
client, conn := newRepositoryClient(t, serverSocketPath)
defer conn.Close()
testRepo, testRepoPath, cleanupFn := testhelper.NewTestRepoWithWorktree(t)
de... | explode_data.jsonl/60645 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 851
} | [
2830,
3393,
1949,
42502,
1820,
36653,
1155,
353,
8840,
836,
8,
341,
197,
68033,
1669,
2193,
7121,
33831,
8754,
10753,
340,
41057,
10286,
1820,
11,
2936,
1669,
1598,
25243,
5475,
1155,
11,
47117,
340,
16867,
2936,
2822,
25291,
11,
4534,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestIsCaseSensitiveFilesystem(t *testing.T) {
isLinux := runtime.GOOS == "linux"
isWindows := runtime.GOOS == "windows"
isMacOS := runtime.GOOS == "darwin"
if !isLinux && !isWindows && !isMacOS {
t.Skip("Run this test on Windows, Linux and macOS only")
}
dir, err := ioutil.TempDir("", "TestCaseS... | explode_data.jsonl/72202 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 315
} | [
2830,
3393,
3872,
4207,
63316,
1703,
8948,
1155,
353,
8840,
836,
8,
972,
19907,
46324,
1669,
15592,
97574,
3126,
621,
330,
14210,
5031,
19907,
13164,
1669,
15592,
97574,
3126,
621,
330,
27077,
5031,
19907,
19552,
3126,
1669,
15592,
97574,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIfdBuilder_Replace(t *testing.T) {
im := NewIfdMapping()
err := LoadStandardIfds(im)
log.PanicIf(err)
ti := NewTagIndex()
ib := NewIfdBuilder(im, ti, exifcommon.IfdStandardIfdIdentity, exifcommon.TestDefaultByteOrder)
bt := &BuilderTag{
ifdPath: exifcommon.IfdStandardIfdIdentity.UnindexedString(),
... | explode_data.jsonl/36635 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 710
} | [
2830,
3393,
2679,
67,
3297,
62,
23107,
1155,
353,
8840,
836,
8,
341,
54892,
1669,
1532,
2679,
67,
6807,
2822,
9859,
1669,
8893,
19781,
2679,
5356,
25107,
340,
6725,
1069,
31270,
2679,
3964,
692,
72859,
1669,
1532,
5668,
1552,
741,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestTimeRetention(t *testing.T) {
db, delete := openTestDB(t, &Options{
BlockRanges: []int64{1000},
})
defer func() {
testutil.Ok(t, db.Close())
delete()
}()
blocks := []*BlockMeta{
{MinTime: 500, MaxTime: 900}, // Oldest block
{MinTime: 1000, MaxTime: 1500},
{MinTime: 1500, MaxTime: 2000}, // Ne... | explode_data.jsonl/64377 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 440
} | [
2830,
3393,
1462,
86329,
1155,
353,
8840,
836,
8,
341,
20939,
11,
3698,
1669,
1787,
2271,
3506,
1155,
11,
609,
3798,
515,
197,
94940,
74902,
25,
3056,
396,
21,
19,
90,
16,
15,
15,
15,
1583,
197,
3518,
16867,
2915,
368,
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... | 1 |
func TestPunctuationMark(t *testing.T) {
const want = "jiendo"
got, err := KanaToRomaji("ジ・エンド")
assert.Equal(t, want, got)
assert.Nil(t, err)
} | explode_data.jsonl/11340 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 67
} | [
2830,
3393,
47,
72299,
8949,
1155,
353,
8840,
836,
8,
341,
4777,
1366,
284,
330,
7754,
8691,
698,
3174,
354,
11,
1848,
1669,
730,
3362,
1249,
44359,
41788,
445,
75328,
9274,
75639,
126973,
5130,
6948,
12808,
1155,
11,
1366,
11,
2684,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestService_Binding(t *testing.T) {
Convey("test binding", t, WithService(func(s *Service) {
logMid := int64(1)
p := &bws.ParamBinding{
Bid: 1,
Key: "",
}
err := s.Binding(context.Background(), logMid, p)
So(err, ShouldBeNil)
}))
} | explode_data.jsonl/70581 | {
"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,
1860,
1668,
3961,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
445,
1944,
10970,
497,
259,
11,
3085,
1860,
18552,
1141,
353,
1860,
8,
341,
197,
6725,
33648,
1669,
526,
21,
19,
7,
16,
340,
197,
3223,
1669,
609,
65,
8915,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAsPathAs4Trans2(t *testing.T) {
as1 := []uint16{65000, 4000}
param1 := bgp.NewAsPathParam(bgp.BGP_ASPATH_ATTR_TYPE_SEQ, as1)
as2 := []uint16{10, 20, 30}
param2 := bgp.NewAsPathParam(bgp.BGP_ASPATH_ATTR_TYPE_SET, as2)
as3 := []uint16{bgp.AS_TRANS, bgp.AS_TRANS, 40001}
param3 := bgp.NewAsPathParam(bgp.BGP_... | explode_data.jsonl/29050 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 909
} | [
2830,
3393,
2121,
1820,
2121,
19,
3167,
17,
1155,
353,
8840,
836,
8,
341,
60451,
16,
1669,
3056,
2496,
16,
21,
90,
21,
20,
15,
15,
15,
11,
220,
19,
15,
15,
15,
532,
36037,
16,
1669,
8951,
79,
7121,
2121,
93492,
1883,
21888,
1785... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_BeginAuth(t *testing.T) {
t.Parallel()
a := assert.New(t)
p := deezerProvider()
session, err := p.BeginAuth("test_state")
s := session.(*deezer.Session)
a.NoError(err)
a.Contains(s.AuthURL, "https://connect.deezer.com/oauth/auth.php")
} | explode_data.jsonl/82098 | {
"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,
93447,
5087,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
11323,
1669,
2060,
7121,
1155,
340,
3223,
1669,
44733,
7070,
5179,
741,
25054,
11,
1848,
1669,
281,
28467,
5087,
445,
1944,
4387,
1138,
1903,
1669,
3797,
413... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSortedArray_PopRight(t *testing.T) {
gtest.C(t, func(t *gtest.T) {
array1 := garray.NewSortedArrayFrom(
[]interface{}{"a", "d", "c", "b"},
gutil.ComparatorString,
)
i1, ok := array1.PopRight()
t.Assert(ok, true)
t.Assert(gconv.String(i1), "d")
t.Assert(array1.Len(), 3)
t.Assert(array1, []i... | explode_data.jsonl/67011 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 379
} | [
2830,
3393,
51051,
1857,
1088,
453,
5979,
1155,
353,
8840,
836,
8,
341,
3174,
1944,
727,
1155,
11,
2915,
1155,
353,
82038,
836,
8,
341,
197,
11923,
16,
1669,
342,
1653,
7121,
51051,
1857,
3830,
1006,
298,
197,
1294,
4970,
6257,
4913,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestScaledWindowConnect(t *testing.T) {
// This test ensures that window scaling is used when the peer
// does advertise it and connection is established with Connect().
c := context.New(t, defaultMTU)
defer c.Cleanup()
// Set the window size greater than the maximum non-scaled window.
c.CreateConnectedWith... | explode_data.jsonl/75958 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 424
} | [
2830,
3393,
94201,
4267,
14611,
1155,
353,
8840,
836,
8,
341,
197,
322,
1096,
1273,
25351,
429,
3241,
26943,
374,
1483,
979,
279,
14397,
198,
197,
322,
1558,
50836,
432,
323,
3633,
374,
9555,
448,
13015,
25829,
1444,
1669,
2266,
7121,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestIsRestrictedPrivilege(t *testing.T) {
assert := assert.New(t)
assert.True(IsRestrictedPrivilege("RESTRICTED_TABLES_ADMIN"))
assert.True(IsRestrictedPrivilege("RESTRICTED_STATUS_VARIABLES_ADMIN"))
assert.False(IsRestrictedPrivilege("CONNECTION_ADMIN"))
assert.False(IsRestrictedPrivilege("BACKUP_ADMIN"))
... | explode_data.jsonl/35836 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 131
} | [
2830,
3393,
3872,
86405,
32124,
42769,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
6948,
32443,
65473,
86405,
32124,
42769,
445,
38307,
39477,
1479,
16039,
50,
30460,
5455,
6948,
32443,
65473,
86405,
32124,
42769,
445,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestPostAllocate(t *testing.T) {
response := new(pluginapi.AllocateResponse)
cresp := new(pluginapi.ContainerAllocateResponse)
response.ContainerResponses = append(response.ContainerResponses, cresp)
testMap := map[string]string{
"QAT29": "03:04.1",
"QAT13": "03:04.2",
"QAT6": "03:04.3",
"QAT21": "03:... | explode_data.jsonl/17453 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 491
} | [
2830,
3393,
4133,
75380,
1155,
353,
8840,
836,
8,
341,
21735,
1669,
501,
46801,
2068,
9636,
22401,
2582,
340,
1444,
18243,
1669,
501,
46801,
2068,
33672,
75380,
2582,
340,
21735,
33672,
70743,
284,
8737,
5684,
33672,
70743,
11,
272,
18243... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPlayer_ControlledBot(t *testing.T) {
dave := &Player{
Name: "Dave",
IsBot: true,
}
demoInfoProvider := &demoInfoProviderMock{
playersByHandle: map[int]*Player{
12: dave,
},
}
pl := playerWithProperty("m_iControlledBotEntIndex", st.PropertyValue{IntVal: 0})
pl.demoInfoProvider = demoInfoProvi... | explode_data.jsonl/12190 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 200
} | [
2830,
3393,
4476,
45376,
832,
23502,
1155,
353,
8840,
836,
8,
341,
2698,
523,
1669,
609,
4476,
515,
197,
21297,
25,
220,
330,
55730,
756,
197,
197,
3872,
23502,
25,
830,
345,
197,
532,
2698,
6726,
1731,
5179,
1669,
609,
25762,
1731,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestCaptureGoneWhileMovingTable(t *testing.T) {
t.Parallel()
mockCaptureInfos := map[model.CaptureID]*model.CaptureInfo{
"capture-1": {
ID: "capture-1",
AdvertiseAddr: "fakeip:1",
},
"capture-2": {
ID: "capture-2",
AdvertiseAddr: "fakeip:2",
},
}
ctx := cdcContext.Ne... | explode_data.jsonl/28505 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 889
} | [
2830,
3393,
27429,
38,
603,
7983,
39732,
2556,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
77333,
27429,
38059,
1669,
2415,
79938,
727,
11850,
915,
8465,
2528,
727,
11850,
1731,
515,
197,
197,
1,
45070,
12,
16,
788,
341,
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 TestSortedArray_Sort(t *testing.T) {
gtest.C(t, func(t *gtest.T) {
a1 := []interface{}{"a", "f", "c"}
func1 := func(v1, v2 interface{}) int {
return strings.Compare(gconv.String(v1), gconv.String(v2))
}
array1 := garray.NewSortedArrayFrom(a1, func1)
array1.Sort()
t.Assert(array1.Len(), 3)
t.Asser... | explode_data.jsonl/67007 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 175
} | [
2830,
3393,
51051,
1857,
1098,
371,
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,
69,
497,
330,
66,
16707,
197,
29244,
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... | 1 |
func TestCollectCustomErrorsPerServer(t *testing.T) {
invalidType := &ingress.Ingress{}
customErrors := collectCustomErrorsPerServer(invalidType)
if customErrors != nil {
t.Errorf("Expected %v but returned %v", nil, customErrors)
}
server := &ingress.Server{
Locations: []*ingress.Location{
{CustomHTTPError... | explode_data.jsonl/80600 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 236
} | [
2830,
3393,
47504,
10268,
13877,
3889,
5475,
1155,
353,
8840,
836,
8,
341,
197,
11808,
929,
1669,
609,
287,
673,
5337,
2483,
16094,
1444,
1450,
13877,
1669,
6530,
10268,
13877,
3889,
5475,
5900,
1891,
929,
340,
743,
2526,
13877,
961,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestBackOffFlow(t *testing.T) {
cl := clock.NewFakeClock(time.Now())
q := NewTestQueue(context.Background(), newDefaultQueueSort(), WithClock(cl))
steps := []struct {
wantBackoff time.Duration
}{
{wantBackoff: time.Second},
{wantBackoff: 2 * time.Second},
{wantBackoff: 4 * time.Second},
{wantBackoff:... | explode_data.jsonl/68206 | {
"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,
3707,
4596,
18878,
1155,
353,
8840,
836,
8,
341,
39407,
1669,
8866,
7121,
52317,
26104,
9730,
13244,
2398,
18534,
1669,
1532,
2271,
7554,
5378,
19047,
1507,
501,
3675,
7554,
10231,
1507,
3085,
26104,
9849,
1171,
18388,
7124,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestOpenStackSuites(t *testing.T) {
suite.Run(t, &CinderTestSuite{BaseOpenStackTestSuite: BaseOpenStackTestSuite{ServiceName: "volume"}})
suite.Run(t, &NovaTestSuite{BaseOpenStackTestSuite: BaseOpenStackTestSuite{ServiceName: "compute"}})
suite.Run(t, &NeutronTestSuite{BaseOpenStackTestSuite: BaseOpenStackTestS... | explode_data.jsonl/7559 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 170
} | [
2830,
3393,
5002,
4336,
62898,
288,
1155,
353,
8840,
836,
8,
341,
96572,
16708,
1155,
11,
609,
34,
5744,
2271,
28000,
90,
3978,
5002,
4336,
2271,
28000,
25,
5351,
5002,
4336,
2271,
28000,
90,
1860,
675,
25,
330,
25060,
30975,
340,
965... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_ListRealms(t *testing.T) {
// given
realm := getDummyRealm()
handler := http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
assert.Equal(t, RealmsCreatePath, req.URL.Path)
assert.Equal(t, req.Method, http.MethodGet)
var list []*v1alpha1.KeycloakRealm
list = append(list, realm)
... | explode_data.jsonl/49877 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 337
} | [
2830,
3393,
2959,
27104,
12768,
1011,
1155,
353,
8840,
836,
8,
341,
197,
322,
2661,
198,
17200,
7673,
1669,
633,
43344,
64290,
2822,
53326,
1669,
1758,
89164,
18552,
3622,
1758,
37508,
11,
4232,
353,
1254,
9659,
8,
341,
197,
6948,
12808... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_OCRContractTracker_LatestBlockHeight(t *testing.T) {
t.Parallel()
t.Run("on L2 chains, always returns 0", func(t *testing.T) {
uni := newContractTrackerUni(t, evmtest.ChainOptimismMainnet(t))
l, err := uni.tracker.LatestBlockHeight(context.Background())
require.NoError(t, err)
assert.Equal(t, uint... | explode_data.jsonl/31061 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 855
} | [
2830,
3393,
2232,
8973,
14067,
31133,
2351,
13893,
4713,
3640,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
3244,
16708,
445,
263,
444,
17,
26179,
11,
2677,
4675,
220,
15,
497,
2915,
1155,
353,
8840,
836,
8,
341,
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 TestReconcile_FailedVGCreate(t *testing.T) {
var (
fLVG = lvgCR1
e = &mocks.GoMockExecutor{}
expectedErr = errors.New("vgcreate failed")
)
fLVG.Finalizers = []string{lvgFinalizer}
c := setup(t, node1ID, fLVG)
req := ctrl.Request{NamespacedName: types.NamespacedName{Namespace: ns, Name... | explode_data.jsonl/51723 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 436
} | [
2830,
3393,
693,
40446,
457,
1400,
5687,
46641,
4021,
1155,
353,
8840,
836,
8,
341,
2405,
2399,
197,
1166,
40258,
38,
286,
284,
326,
7239,
8973,
16,
198,
197,
7727,
1843,
284,
609,
16712,
82,
67131,
11571,
25255,
16094,
197,
42400,
77... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAny2String(t *testing.T) {
Convey("Cast any to string", t, func() {
var foo interface{}
origin := "1"
foo = origin
any2String := MustAny2String(foo)
So(any2String, ShouldEqual, origin)
foo = 2
any2String, err := Any2String(foo)
So(err, ShouldNotBeNil)
So(any2String, ShouldBeEmpty)
})
} | explode_data.jsonl/34304 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 131
} | [
2830,
3393,
8610,
17,
703,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
445,
18714,
894,
311,
914,
497,
259,
11,
2915,
368,
341,
197,
2405,
15229,
3749,
16094,
197,
197,
8611,
1669,
330,
16,
698,
197,
197,
7975,
284,
6238,
271,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_ObjectTracker_Canceled_Expectations(t *testing.T) {
g := gomega.NewWithT(t)
ot := newObjTracker(schema.GroupVersionKind{}, nil)
const count = 10
ct := makeCTSlice("ct-", count)
for i := 0; i < len(ct); i++ {
ot.Expect(ct[i])
}
g.Expect(ot.Satisfied()).NotTo(gomega.BeTrue(), "should not be satisfied ... | explode_data.jsonl/52318 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 334
} | [
2830,
3393,
27839,
31133,
920,
38392,
62,
17536,
804,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
342,
32696,
7121,
2354,
51,
1155,
340,
197,
354,
1669,
74259,
31133,
42735,
5407,
5637,
10629,
22655,
2092,
692,
4777,
1760,
284,
220,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestApp01maVendorHndlrRowDelete(t *testing.T) {
var err error
var td *TestData_App01maVendor
var rcd App01maVendor.App01maVendor
//expectedBody := ""
t.Logf("TestRowDelete()...\n")
td = &TestData_App01maVendor{}
td.Setup(t)
// Delete a record.
rcd.T... | explode_data.jsonl/78273 | {
"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,
2164,
15,
16,
1728,
44691,
39,
303,
19018,
3102,
6435,
1155,
353,
8840,
836,
8,
341,
262,
762,
1848,
260,
1465,
198,
262,
762,
17941,
688,
353,
83920,
36117,
15,
16,
1728,
44691,
198,
262,
762,
435,
4385,
260,
1845,
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... | 2 |
func TestNotePagination(t *testing.T) {
integration.Skip(t)
table := []struct {
// name of test
name string
// total number of notifications to request
total int
// number of notifications per page to test
pageSize uint64
}{
{
name: "check total zero",
total: 0,
pageSize: 1,
},
{
... | explode_data.jsonl/76739 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1188
} | [
2830,
3393,
9112,
44265,
1155,
353,
8840,
836,
8,
341,
2084,
17376,
57776,
1155,
692,
26481,
1669,
3056,
1235,
341,
197,
197,
322,
829,
315,
1273,
198,
197,
11609,
914,
198,
197,
197,
322,
2790,
1372,
315,
21969,
311,
1681,
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... | 8 |
func TestParsingEmptyList(t *testing.T) {
buf := bytes.NewBufferString("[]")
p := &JSONEventParser{}
evs, err := p.Parse(buf)
assert.NoError(t, err)
assert.Len(t, evs, 0)
} | explode_data.jsonl/10879 | {
"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,
68839,
3522,
852,
1155,
353,
8840,
836,
8,
341,
26398,
1669,
5820,
7121,
4095,
703,
445,
1294,
5130,
3223,
1669,
609,
5370,
1556,
6570,
16094,
74837,
82,
11,
1848,
1669,
281,
8937,
10731,
340,
6948,
35699,
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 |
func TestMarshalingQuorumCertToProto(t *testing.T) {
qc1 := data.CreateQuorumCert(&testBlock)
pc1, _ := data.CreatePartialCert(0, &pk, &testBlock)
qc1.AddPartial(pc1)
pqc := QuorumCertToProto(qc1)
qc2 := pqc.FromProto()
if !bytes.Equal(qc1.BlockHash[:], qc2.BlockHash[:]) {
t.Errorf("Hashes don't match! Got %v,... | explode_data.jsonl/69358 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 236
} | [
2830,
3393,
79712,
6132,
2183,
33006,
36934,
1249,
31549,
1155,
353,
8840,
836,
8,
341,
18534,
66,
16,
1669,
821,
7251,
2183,
33006,
36934,
2099,
1944,
4713,
340,
82013,
16,
11,
716,
1669,
821,
7251,
37314,
36934,
7,
15,
11,
609,
2081... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewFunction(t *testing.T) {
t.Parallel()
ctx := NewIsolate().NewContext()
cons, _ := ctx.Eval(`(function(){ this.x = 1; })`, "")
obj, err := cons.New()
if err != nil {
t.Fatal(err)
}
res, err := obj.Get("x")
if err != nil {
t.Fatal(err)
} else if num := res.Int64(); num != 1 {
t.Errorf("Expected... | explode_data.jsonl/81561 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 158
} | [
2830,
3393,
3564,
5152,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
20985,
1669,
1532,
3872,
33066,
1005,
3564,
1972,
741,
197,
6254,
11,
716,
1669,
5635,
5142,
831,
5809,
7,
1688,
11895,
419,
1993,
284,
220,
16,
26,
6413,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMultipleAssignmentsGetAssignments(t *testing.T) {
a := assert.New(t)
var (
DefaultFleetAssignmentID1 = DefaultFleetAssignmentID + "-1"
DefaultFleetAssignmentID2 = DefaultFleetAssignmentID + "-2"
DefaultFleetAssignmentID3 = DefaultFleetAssignmentID + "-3"
DefaultFleetEventID1 = DefaultFleetEvent... | explode_data.jsonl/58071 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1114
} | [
2830,
3393,
32089,
28933,
1368,
1949,
28933,
1368,
1155,
353,
8840,
836,
8,
341,
11323,
1669,
2060,
7121,
1155,
692,
2405,
2399,
197,
91084,
37,
18973,
41613,
915,
16,
284,
7899,
37,
18973,
41613,
915,
488,
6523,
16,
698,
197,
91084,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDestroy(t *testing.T) {
t.Parallel()
sessionManager := New()
mux := http.NewServeMux()
mux.HandleFunc("/put", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
sessionManager.Put(r.Context(), "foo", "bar")
}))
mux.HandleFunc("/destroy", http.HandlerFunc(func(w http.ResponseWriter, r *ht... | explode_data.jsonl/454 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 603
} | [
2830,
3393,
14245,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
25054,
2043,
1669,
1532,
2822,
2109,
2200,
1669,
1758,
7121,
60421,
44,
2200,
741,
2109,
2200,
63623,
4283,
628,
497,
1758,
89164,
18552,
3622,
1758,
37508,
11,
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 TestWithdrawInternationalBank(t *testing.T) {
p.SetDefaults()
TestSetup(t)
if areTestAPIKeysSet() && !canManipulateRealOrders {
t.Skip("API keys set, canManipulateRealOrders false, skipping test")
}
var withdrawFiatRequest = exchange.WithdrawRequest{}
_, err := p.WithdrawFiatFundsToInternationalBank(&wi... | explode_data.jsonl/23577 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 162
} | [
2830,
3393,
92261,
33646,
25828,
1155,
353,
8840,
836,
8,
341,
3223,
4202,
16273,
741,
73866,
21821,
1155,
692,
743,
525,
2271,
7082,
8850,
1649,
368,
1009,
753,
4814,
92876,
6334,
12768,
24898,
341,
197,
3244,
57776,
445,
7082,
6894,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestViperUnmarshal(t *testing.T) {
var err error
cfg := &lib.CAConfig{}
vp := viper.New()
vp.SetConfigFile("../testdata/testviperunmarshal.yaml")
err = vp.ReadInConfig()
if err != nil {
t.Errorf("Failed to read config file: %s", err)
}
sliceFields := []string{
"db.tls",
}
err = ViperUnmarshal(cfg, ... | explode_data.jsonl/75464 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 262
} | [
2830,
3393,
53,
12858,
1806,
27121,
1155,
353,
8840,
836,
8,
341,
2405,
1848,
1465,
271,
50286,
1669,
609,
2740,
727,
32,
2648,
16094,
5195,
79,
1669,
95132,
7121,
741,
5195,
79,
4202,
2648,
1703,
17409,
92425,
12697,
85,
12858,
359,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSearchArchive(t *testing.T) {
if len(os.Getenv("API_KEY")) == 0 {
t.Skip("API_KEY required")
return
}
setup()
parameter := map[string]string{
"api_key": os.Getenv("API_KEY"),
"q": "Coffee",
"location": "Portland"}
client := NewGoogleSearch(parameter)
rsp, err := client.GetJSON()
if ... | explode_data.jsonl/19469 | {
"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,
5890,
42502,
1155,
353,
8840,
836,
8,
341,
743,
2422,
9638,
64883,
445,
7082,
6600,
2761,
621,
220,
15,
341,
197,
3244,
57776,
445,
7082,
6600,
2567,
1138,
197,
853,
198,
197,
630,
84571,
741,
197,
16181,
1669,
2415,
14032... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMakeSecrets(t *testing.T) {
ctx := TestContextWithLogger(t)
ctx = config.ToContext(ctx, &config.Config{
Istio: &config.Istio{
IngressGateways: []config.Gateway{{
GatewayName: "test-gateway",
// The namespace of Istio gateway service is istio-system.
ServiceURL: "istio-ingressgateway.istio-sy... | explode_data.jsonl/18884 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 921
} | [
2830,
3393,
8078,
19773,
82,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
3393,
1972,
2354,
7395,
1155,
340,
20985,
284,
2193,
3274,
1972,
7502,
11,
609,
1676,
10753,
515,
197,
24486,
267,
815,
25,
609,
1676,
2447,
267,
815,
515,
298,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestClusterConfig_translateAddressAndPort_EmptyAddr(t *testing.T) {
cfg := NewCluster()
cfg.AddressTranslator = staticAddressTranslator(net.ParseIP("10.10.10.10"), 5432)
newAddr, newPort := cfg.translateAddressPort(net.IP([]byte{}), 0)
assertTrue(t, "translated address is still empty", len(newAddr) == 0)
asse... | explode_data.jsonl/36656 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 133
} | [
2830,
3393,
28678,
2648,
66381,
4286,
3036,
7084,
76060,
1595,
13986,
1155,
353,
8840,
836,
8,
341,
50286,
1669,
1532,
28678,
741,
50286,
26979,
51653,
284,
1099,
4286,
51653,
30723,
8937,
3298,
445,
16,
15,
13,
16,
15,
13,
16,
15,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDft01(tst *testing.T) {
//verbose()
chk.PrintTitle("Dft01. FFT")
// forward dft
x := []complex128{1 + 2i, 3 + 4i, 5 + 6i, 7 + 8i}
X := make([]complex128, len(x))
copy(X, x)
Dft1d(X, false)
// check
Xref := dft1dslow(x)
chk.ArrayC(tst, "X = DFT[x] = Xref", 1e-14, X, Xref)
// inverse dft
Y := mak... | explode_data.jsonl/43537 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 277
} | [
2830,
3393,
35,
723,
15,
16,
1155,
267,
353,
8840,
836,
8,
1476,
197,
322,
14883,
741,
23049,
74,
7918,
3851,
445,
35,
723,
15,
16,
13,
60036,
5130,
197,
322,
4637,
294,
723,
198,
10225,
1669,
3056,
23247,
16,
17,
23,
90,
16,
48... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestResourcesGetMatch(t *testing.T) {
c := qt.New(t)
spec := newTestResourceSpec(specDescriptor{c: c})
resources := resource.Resources{
spec.newGenericResource(nil, nil, nil, "/a/foo1.css", "foo1.css", media.CSSType),
spec.newGenericResource(nil, nil, nil, "/a/logo1.png", "logo1.png", pngType),
spec.newGe... | explode_data.jsonl/75614 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 940
} | [
2830,
3393,
11277,
1949,
8331,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
38949,
7121,
1155,
340,
98100,
1669,
501,
2271,
4783,
8327,
38209,
11709,
90,
66,
25,
272,
3518,
10202,
2360,
1669,
5101,
21703,
515,
197,
98100,
4618,
19964,
4783... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPropertyAsRawType(t *testing.T) {
Convey("With value raw test PropertyAsRawType", t, func() {
type testCase struct {
v *sfxmodel.PropertyValue
exp interface{}
}
cases := []testCase{
{
v: nil,
exp: nil,
},
{
v: &sfxmodel.PropertyValue{
BoolValue: proto.Bool(false),
... | explode_data.jsonl/81469 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 419
} | [
2830,
3393,
3052,
2121,
20015,
929,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
445,
2354,
897,
7112,
1273,
8655,
2121,
20015,
929,
497,
259,
11,
2915,
368,
341,
197,
13158,
54452,
2036,
341,
298,
5195,
256,
353,
82,
8298,
2528,
15727,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMockStorage(t *testing.T) {
store := newStorage(nil)
store.put("key1", "val1")
store.put("key2", "val2")
store.put("key3", "val3")
val, err := store.get("key1")
if err != nil || *val != "val1" {
t.Errorf("mock storage get return wrong value")
}
valMap, err := store.getPrefix("key", false)
if err != ... | explode_data.jsonl/82206 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 232
} | [
2830,
3393,
11571,
5793,
1155,
353,
8840,
836,
8,
341,
57279,
1669,
501,
5793,
27907,
340,
57279,
3597,
445,
792,
16,
497,
330,
831,
16,
1138,
57279,
3597,
445,
792,
17,
497,
330,
831,
17,
1138,
57279,
3597,
445,
792,
18,
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... | 5 |
func TestBeego(t *testing.T) {
r, _ := http.NewRequest("GET", "/", nil)
w := httptest.NewRecorder()
beego.BeeApp.Handlers.ServeHTTP(w, r)
beego.Trace("testing", "TestBeego", "Code[%d]\n%s", w.Code, w.Body.String())
Convey("Subject: Test Station Endpoint\n", t, func() {
Convey("Status Code Should Be 200"... | explode_data.jsonl/16279 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 248
} | [
2830,
3393,
3430,
13243,
1155,
353,
8840,
836,
8,
341,
7000,
11,
716,
1669,
1758,
75274,
445,
3806,
497,
64657,
2092,
340,
6692,
1669,
54320,
70334,
7121,
47023,
741,
73142,
13243,
1785,
2127,
2164,
35308,
9254,
83535,
9230,
3622,
11,
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 TestInitCmdFactoryFailures(t *testing.T) {
defer resetFlags()
assert := assert.New(t)
cryptoProvider, err := sw.NewDefaultSecurityLevelWithKeystore(sw.NewDummyKeyStore())
assert.Nil(err)
// failure validating peer connection parameters
resetFlags()
peerAddresses = []string{"peer0", "peer1"}
tlsRootCertFi... | explode_data.jsonl/46376 | {
"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,
3803,
15613,
4153,
19524,
1413,
1155,
353,
8840,
836,
8,
341,
16867,
7585,
9195,
741,
6948,
1669,
2060,
7121,
1155,
692,
1444,
9444,
5179,
11,
1848,
1669,
2021,
7121,
3675,
15352,
4449,
2354,
6608,
63373,
58902,
7121,
43344,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestActionEnums(t *testing.T) {
t.Parallel()
for _, enum := range pluginEventValues() {
enum := enum
t.Run(enum.String()+" matches existing client messages", func(t *testing.T) {
t.Parallel()
_, err := client.ClientMessageTypeString(enum.String())
if err != nil {
t.Errorf("action type of %v no... | explode_data.jsonl/26486 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 141
} | [
2830,
3393,
2512,
71586,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
2023,
8358,
7618,
1669,
2088,
9006,
1556,
6227,
368,
341,
197,
37777,
1669,
7618,
198,
197,
3244,
16708,
64545,
6431,
25589,
9071,
6350,
2943,
6605,
497,
29... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestCT_OMathParaPrMarshalUnmarshal(t *testing.T) {
v := math.NewCT_OMathParaPr()
buf, _ := xml.Marshal(v)
v2 := math.NewCT_OMathParaPr()
xml.Unmarshal(buf, v2)
} | explode_data.jsonl/54222 | {
"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,
1162,
83169,
587,
30205,
3533,
55438,
1806,
27121,
1155,
353,
8840,
836,
8,
341,
5195,
1669,
6888,
7121,
1162,
83169,
587,
30205,
3533,
741,
26398,
11,
716,
1669,
8396,
37271,
3747,
340,
5195,
17,
1669,
6888,
7121,
1162,
831... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSpecArg(t *testing.T) {
var s *string
init := func(c *Cmd) {
s = c.StringArg("ARG", "", "")
}
spec := "ARG"
okCmd(t, spec, init, []string{"value"})
require.Equal(t, "value", *s)
badCases := [][]string{
{},
{"-g"},
{"-f", "xxx"},
{"xxx", "-f"},
}
for _, args := range badCases {
failCmd(t, ... | explode_data.jsonl/23923 | {
"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,
8327,
2735,
1155,
353,
8840,
836,
8,
341,
2405,
274,
353,
917,
198,
28248,
1669,
2915,
1337,
353,
15613,
8,
341,
197,
1903,
284,
272,
6431,
2735,
445,
7581,
497,
7342,
14676,
197,
532,
98100,
1669,
330,
7581,
698,
59268,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIPolUpgrade(t *testing.T) {
// default policy, this should succeed
testIPolUpgrade(t, "", true)
// policy involving an unknown ORG, this should fail
testIPolUpgrade(t, "AND('ORG.admin')", false)
} | explode_data.jsonl/9391 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 70
} | [
2830,
3393,
3298,
337,
43861,
1155,
353,
8840,
836,
8,
341,
197,
322,
1638,
4842,
11,
419,
1265,
11996,
198,
18185,
3298,
337,
43861,
1155,
11,
7342,
830,
340,
197,
322,
4842,
15860,
458,
9788,
2726,
38,
11,
419,
1265,
3690,
198,
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 |
func TestMapProxy_ReplaceWithNilValue(t *testing.T) {
_, err := mp.Replace("test", nil)
AssertErrorNotNil(t, err, "replace did not return an error for nil value")
mp.Clear()
} | explode_data.jsonl/56999 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 66
} | [
2830,
3393,
2227,
16219,
62,
23107,
2354,
19064,
1130,
1155,
353,
8840,
836,
8,
341,
197,
6878,
1848,
1669,
10490,
20858,
445,
1944,
497,
2092,
340,
18017,
1454,
96144,
1155,
11,
1848,
11,
330,
8156,
1521,
537,
470,
458,
1465,
369,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestWriteJSON(t *testing.T) {
s := testStruct{
Field1: 123,
Field2: "Hello World!",
}
expectWrite := []byte("{\"field_1\":123,\"field_2\":\"Hello World!\"}\n")
rec := httptest.NewRecorder()
WriteJSON(t, rec, s)
data, err := ioutil.ReadAll(rec.Body)
require.NoError(t, err)
assert.Equal(t, expectWri... | explode_data.jsonl/73731 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 170
} | [
2830,
3393,
7985,
5370,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
1273,
9422,
515,
197,
94478,
16,
25,
220,
16,
17,
18,
345,
197,
94478,
17,
25,
330,
9707,
4337,
33436,
197,
630,
24952,
7985,
1669,
3056,
3782,
99141,
2566,
62,
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... | 1 |
func TestMarshalRegexSerde(t *testing.T) {
r := RegexSerde{regexp.MustCompile(`(?i)^I approve\s*(?P<version>\S*)`)}
var buf bytes.Buffer
e := json.NewEncoder(&buf)
e.SetEscapeHTML(false)
err := e.Encode(r)
if err != nil {
t.Fatal("Unable to marshal regex serde", err)
}
s := string(bytes.TrimSpace(buf.Bytes())... | explode_data.jsonl/56833 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 196
} | [
2830,
3393,
55438,
32464,
31745,
450,
1155,
353,
8840,
836,
8,
341,
7000,
1669,
26146,
31745,
450,
90,
55796,
98626,
5809,
33294,
72,
29776,
40,
28151,
32407,
6599,
30,
47,
27,
4366,
8449,
50,
3764,
63,
10569,
2405,
6607,
5820,
22622,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIsScaleTargetInitialized(t *testing.T) {
p := PodAutoscaler{}
if got, want := p.Status.IsScaleTargetInitialized(), false; got != want {
t.Errorf("before marking initially active: got: %v, want: %v", got, want)
}
p.Status.MarkScaleTargetInitialized()
if got, want := p.Status.IsScaleTargetInitialized(), t... | explode_data.jsonl/27243 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 142
} | [
2830,
3393,
3872,
6947,
6397,
22495,
1155,
353,
8840,
836,
8,
341,
3223,
1669,
16821,
19602,
436,
63084,
16094,
743,
2684,
11,
1366,
1669,
281,
10538,
4506,
6947,
6397,
22495,
1507,
895,
26,
2684,
961,
1366,
341,
197,
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... | 3 |
func TestUnionComplexity(t *testing.T) {
assert := assert.New(t)
vs := newTestValueStore()
numSets := 256
numElemsPerSet := 1000
logNumSets := int(math.Ceil(math.Log2(float64(numSets))))
totalElems := numSets * numElemsPerSet
expectedMax := logNumSets*totalElems + numSets
callCount1 := 0
itrs, err := create... | explode_data.jsonl/11001 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 463
} | [
2830,
3393,
32658,
31137,
487,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
5195,
82,
1669,
501,
2271,
1130,
6093,
2822,
22431,
30175,
1669,
220,
17,
20,
21,
198,
22431,
36,
39616,
3889,
1649,
1669,
220,
16,
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 TestWalkTree(t *testing.T) {
_, file, _, _ := runtime.Caller(0)
ctx := context.Background()
t.Run("CanceledContext", func(t *testing.T) {
tctx, cancel := context.WithCancel(ctx)
cancel()
out, err := walkLocalTree(tctx, filepath.Dir(file))
assert.Error(t, err)
assert.Nil(t, out)
})
t.Run("MissingPat... | explode_data.jsonl/6761 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 254
} | [
2830,
3393,
48849,
6533,
1155,
353,
8840,
836,
8,
341,
197,
6878,
1034,
11,
8358,
716,
1669,
15592,
727,
13956,
7,
15,
340,
20985,
1669,
2266,
19047,
2822,
3244,
16708,
445,
63263,
1972,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestGetLiferayHomeRelease6_1Ga1(t *testing.T) {
release := Release{Tag: "6.1-ce-ga1-tomcat-hsql"}
assert := assert.New(t)
assert.Equal("/usr/local/liferay-portal-6.1.0-ce-ga1", release.GetLiferayHome())
} | explode_data.jsonl/11708 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 95
} | [
2830,
3393,
1949,
43,
33204,
7623,
16077,
21,
62,
16,
80788,
16,
1155,
353,
8840,
836,
8,
341,
17200,
1623,
1669,
17381,
90,
5668,
25,
330,
21,
13,
16,
53212,
2371,
64,
16,
2385,
316,
4616,
2832,
3544,
63159,
6948,
1669,
2060,
7121,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestEventWriting(t *testing.T) {
kubelet, fakeEtcd, _ := makeTestKubelet(t)
expectedEvent := api.Event{
Event: "test",
Container: &api.Container{
Name: "foo",
},
}
err := kubelet.LogEvent(&expectedEvent)
if err != nil {
t.Errorf("unexpected error: %v", err)
}
if fakeEtcd.Ix != 1 {
t.Errorf("Un... | explode_data.jsonl/2835 | {
"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,
1556,
39313,
1155,
353,
8840,
836,
8,
341,
16463,
3760,
1149,
11,
12418,
31860,
4385,
11,
716,
1669,
1281,
2271,
42,
3760,
1149,
1155,
340,
42400,
1556,
1669,
6330,
6904,
515,
197,
56055,
25,
330,
1944,
756,
197,
197,
4502... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConfigureRBDStats(t *testing.T) {
var (
s = runtime.NewScheme()
context = &clusterd.Context{}
namespace = "rook-ceph"
)
executor := &exectest.MockExecutor{
MockExecuteCommandWithTimeout: func(timeout time.Duration, command string, args ...string) (string, error) {
logger.Infof("Command... | explode_data.jsonl/62477 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1104
} | [
2830,
3393,
28560,
49,
9548,
16635,
1155,
353,
8840,
836,
8,
341,
2405,
2399,
197,
1903,
260,
284,
15592,
7121,
28906,
741,
197,
28413,
256,
284,
609,
18855,
67,
9328,
16094,
197,
56623,
284,
330,
299,
562,
53212,
759,
698,
197,
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... | 8 |
func TestLs(t *testing.T) {
assert := assert.New(t)
ls := &subcmd.LsCmd{
Path: "foo/bar/",
Page: 1,
Recursive: true,
}
driver := NewMockDriver(t)
printer := &MockPrinterImpl{}
driver.MockListOrTagSearch = func(path string, postNum int, recursive bool) ([]*model.Post, bool, error) {
assert.Equ... | explode_data.jsonl/28551 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 473
} | [
2830,
3393,
43,
82,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
197,
4730,
1669,
609,
1966,
8710,
1214,
82,
15613,
515,
197,
69640,
25,
414,
330,
7975,
49513,
35075,
197,
65439,
25,
414,
220,
16,
345,
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 TestMongo_List(t *testing.T) {
m, skip := prepMongo(t, true) // adds two comments
if skip {
return
}
// add one more for https://radio-t.com/2
comment := store.Comment{
ID: "12345",
Text: `some text, <a href="http://radio-t.com">link</a>`,
Timestamp: time.Date(2017, 12, 20, 15, 18, 22, 0, ... | explode_data.jsonl/54199 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 702
} | [
2830,
3393,
54998,
27104,
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,
197,
322,
912,
825,
803,
369,
3703,
1110,
12636,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_parseTypeMetaSkeleton(t *testing.T) {
type args struct {
object interface{}
}
tests := []struct {
name string
args args
want interface{}
wantErr bool
}{
{
name: "test valid but unknown object type",
args: args{
object: corev1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: "de... | explode_data.jsonl/78920 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 736
} | [
2830,
3393,
21039,
929,
12175,
77568,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
35798,
3749,
16094,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
31215,
262,
2827,
198,
197,
50780,
262,
3749,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTableListProp_MakeValid(t *testing.T) {
cases := []struct {
name string
tableListProp *props.TableList
assert func(t *testing.T, m *props.TableList)
}{
{
"When HeaderProp/ContentProp is not defined",
&props.TableList{
HeaderProp: props.TableListContent{},
ContentProp: p... | explode_data.jsonl/68879 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1356
} | [
2830,
3393,
2556,
852,
2008,
1245,
726,
4088,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
11609,
688,
914,
198,
197,
26481,
852,
2008,
353,
4761,
18257,
852,
198,
197,
6948,
286,
2915,
1155,
353,
8840,
836,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSpecIntsOpt(t *testing.T) {
var f *[]int
init := func(c *Cmd) {
f = c.IntsOpt("f", nil, "")
}
spec := "-f..."
cases := [][]string{
{"-f1"},
{"-f", "1"},
{"-f=1"},
}
for _, args := range cases {
okCmd(t, spec, init, args)
require.Equal(t, []int{1}, *f)
}
cases = [][]string{
{"-f1", "-f",... | explode_data.jsonl/23921 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 367
} | [
2830,
3393,
8327,
1072,
82,
21367,
1155,
353,
8840,
836,
8,
341,
2405,
282,
353,
1294,
396,
198,
28248,
1669,
2915,
1337,
353,
15613,
8,
341,
197,
1166,
284,
272,
7371,
82,
21367,
445,
69,
497,
2092,
11,
14676,
197,
532,
98100,
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_MailMergeFileds_GetDocumentFieldNames(t *testing.T) {
config := ReadConfiguration(t)
client, ctx := PrepareTest(t, config)
remoteDataFolder := remoteBaseTestDataFolder + "/DocumentActions/MailMerge"
remoteFileName := "TestGetDocumentFieldNames.docx"
UploadNextFileToStorage(t, ctx, client,... | explode_data.jsonl/64358 | {
"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,
1245,
604,
52096,
1703,
5356,
13614,
7524,
1877,
7980,
1155,
353,
8840,
836,
8,
341,
262,
2193,
1669,
4457,
7688,
1155,
340,
262,
2943,
11,
5635,
1669,
31166,
2271,
1155,
11,
2193,
340,
262,
8699,
1043,
13682,
1669,
8699,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestTable(t *testing.T) {
for _, entry := range testData {
t.Run(entry.Result, func(t *testing.T) {
fs := afero.NewMemMapFs()
for name, content := range entry.Files {
afero.WriteFile(fs, name, []byte(content), 0644)
}
out, err := itpl.NewLoader().Fs(fs).Load("/entry")
if err != nil {
t.Er... | explode_data.jsonl/73197 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 199
} | [
2830,
3393,
2556,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
4343,
1669,
2088,
67348,
341,
197,
3244,
16708,
18238,
18456,
11,
2915,
1155,
353,
8840,
836,
8,
341,
298,
53584,
1669,
264,
802,
78,
7121,
18816,
2227,
48300,
741,
298,
2023... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExpandVars(t *testing.T) {
const multilineWithComment = `
type ${0:Interface} interface {
${1:/* TODO: add methods */}
}`
const multilineWithCommentExpanded = `
type Foo interface {
/* TODO: add methods */
}`
for _, tt := range []struct {
name string
given string
... | explode_data.jsonl/40129 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 397
} | [
2830,
3393,
38946,
28305,
1155,
353,
8840,
836,
8,
341,
4777,
85218,
2354,
10677,
284,
22074,
13158,
3570,
15,
25,
5051,
92,
3749,
341,
260,
3570,
16,
25,
1057,
5343,
25,
912,
5413,
21654,
257,
335,
3989,
4777,
85218,
2354,
10677,
519... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_server_PingHandler(t *testing.T) {
type fields struct {
externalAlive chan bool
isAlive bool
isReady bool
pingChannel chan bool
pingInterval time.Duration
updateReady chan bool
server *http.Server
}
type args struct {
method string
path string
}
type want struc... | explode_data.jsonl/58775 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 724
} | [
2830,
3393,
12015,
1088,
287,
3050,
1155,
353,
8840,
836,
8,
341,
13158,
5043,
2036,
341,
197,
197,
20921,
32637,
26023,
1807,
198,
197,
19907,
32637,
981,
1807,
198,
197,
19907,
19202,
981,
1807,
198,
197,
3223,
287,
9629,
256,
26023,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAccDataSourceKeyValue_basicNoLabel(t *testing.T) {
key := "myKey"
value := "myValuesdfsdfds"
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { preCheck(t) },
Providers: testProviders,
Steps: []resource.TestStep{
{
Config: buildTerraformConfigDataSourceKeyValue(key),
Check: re... | explode_data.jsonl/9937 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 300
} | [
2830,
3393,
14603,
17173,
72082,
34729,
2753,
2476,
1155,
353,
8840,
836,
8,
341,
23634,
1669,
330,
2408,
1592,
698,
16309,
1669,
330,
2408,
6227,
34378,
2940,
5356,
1837,
50346,
41288,
7957,
2271,
1155,
11,
5101,
31363,
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... | 1 |
func TestReceiversBuilder_DataTypeError(t *testing.T) {
factories, err := componenttest.ExampleComponents()
assert.NoError(t, err)
attrFactory := attributesprocessor.NewFactory()
factories.Processors[attrFactory.Type()] = attrFactory
cfg, err := configtest.LoadConfigFile(t, "testdata/pipelines_builder.yaml", fact... | explode_data.jsonl/50904 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 378
} | [
2830,
3393,
693,
346,
1945,
3297,
17817,
80076,
1155,
353,
8840,
836,
8,
341,
1166,
52893,
11,
1848,
1669,
3692,
1944,
5121,
1516,
10443,
741,
6948,
35699,
1155,
11,
1848,
692,
60943,
4153,
1669,
8201,
29474,
7121,
4153,
741,
1166,
5289... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIntArray_PopRight(t *testing.T) {
gtest.C(t, func(t *gtest.T) {
array := garray.NewIntArrayFrom(g.SliceInt{1, 2, 3})
v, ok := array.PopRight()
t.Assert(v, 3)
t.Assert(ok, true)
t.Assert(array.Len(), 2)
v, ok = array.PopRight()
t.Assert(v, 2)
t.Assert(ok, true)
t.Assert(array.Len(), 1)
v... | explode_data.jsonl/47603 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 214
} | [
2830,
3393,
95338,
1088,
453,
5979,
1155,
353,
8840,
836,
8,
341,
3174,
1944,
727,
1155,
11,
2915,
1155,
353,
82038,
836,
8,
341,
197,
11923,
1669,
342,
1653,
7121,
95338,
3830,
3268,
95495,
1072,
90,
16,
11,
220,
17,
11,
220,
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 TestSlackReporterValidation(t *testing.T) {
testCases := []struct {
name string
config func() Config
successExpected bool
}{
{
name: "Valid config w/ slack_reporter - no error",
config: func() Config {
slack := &SlackReporter{
Channel: "my-channel",
}
return Con... | explode_data.jsonl/8088 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1935
} | [
2830,
3393,
7442,
473,
52766,
13799,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
11609,
310,
914,
198,
197,
25873,
688,
2915,
368,
5532,
198,
197,
30553,
18896,
1807,
198,
197,
59403,
197,
197,
515,
298,
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 TestRequestWithArguments(t *testing.T) {
assert := assert.New(t)
params := []string{"Khadgar"}
options := map[string]string{"locale": "en_GB", "jsonp": "callback"}
r := resource{Region: "eu", Endpoint: "wow/auction/data/", Params: params, Options: options}
request, _ := r.buildRequest()
expectedURL := "h... | explode_data.jsonl/20031 | {
"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,
1900,
2354,
19139,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
25856,
1669,
3056,
917,
4913,
42,
31245,
12164,
16707,
35500,
1669,
2415,
14032,
30953,
4913,
14484,
788,
330,
268,
98631,
497,
330,
57045,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestServerFwd(t *testing.T) {
data := "this #@ THE_data"
s := startTestServer(t)
rch := make(chan readerDone)
s.putFwd("abc.xyz", rch)
done := make(chan struct{})
go func() {
rd := <-rch
b, err := ioutil.ReadAll(rd.r)
close(rd.done)
if err != nil {
t.Errorf("error while reading body: %v", err)
}... | explode_data.jsonl/19962 | {
"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,
5475,
37,
6377,
1155,
353,
8840,
836,
8,
341,
8924,
1669,
330,
574,
91027,
3168,
1769,
698,
1903,
1669,
1191,
2271,
5475,
1155,
340,
7000,
331,
1669,
1281,
35190,
6604,
17453,
340,
1903,
3597,
37,
6377,
445,
13683,
55699,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAddSequencedLeavesUnordered(t *testing.T) {
ctx := context.Background()
const (
chunk = leavesToInsert
count = chunk * 5
extraCount = 16
)
leaves := createTestLeaves(count, 0)
aslt := initAddSequencedLeavesTest(t)
mustSignAndStoreLogRoot(ctx, aslt.t, aslt.s, aslt.tree, 0)
for _, idx ... | explode_data.jsonl/30679 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 281
} | [
2830,
3393,
2212,
1514,
446,
5767,
2304,
4693,
1806,
10544,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
2822,
4777,
2399,
197,
23049,
3122,
414,
284,
10901,
1249,
13780,
198,
197,
18032,
414,
284,
11879,
353,
220,
20,
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 Test_verifyToken_InvalidToken(t *testing.T) {
t.Parallel()
rec, storer, _ := testSetup()
storer.Users["a"] = authboss.Attributes{
StoreRecoverToken: testStdBase64Token,
}
ctx := rec.Authboss.NewContext()
req, _ := http.NewRequest("GET", "/?token=asdf", nil)
if _, err := verifyToken(ctx, req); err != aut... | explode_data.jsonl/61508 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 147
} | [
2830,
3393,
35638,
3323,
62,
7928,
3323,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
67904,
11,
357,
14827,
11,
716,
1669,
1273,
21821,
741,
18388,
14827,
36782,
1183,
64,
1341,
284,
4166,
33314,
31384,
515,
197,
197,
6093,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUpdateSCMigrationSuccess(t *testing.T) {
// given
suite := NewBrokerSuiteTest(t)
mockBTPOperatorClusterID()
defer suite.TearDown()
id := "InstanceID-SCMigration"
resp := suite.CallAPI("PUT", fmt.Sprintf("oauth/cf-eu10/v2/service_instances/%s?accepts_incomplete=true&plan_id=7d55d31d-35ae-4438-bf13-6ffdfa... | explode_data.jsonl/8134 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2111
} | [
2830,
3393,
4289,
3540,
20168,
7188,
1155,
353,
8840,
836,
8,
341,
197,
322,
2661,
198,
96572,
1669,
1532,
65545,
28000,
2271,
1155,
340,
77333,
17602,
2045,
76866,
28678,
915,
741,
16867,
16182,
836,
682,
4454,
741,
15710,
1669,
330,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestValidateReCAPTCHA(t *testing.T) {
g := initTestGoogleCaptcha(t)
server := testproxyhelpers.FakeCaptchaService(t, testproxyhelpers.DefaultFakeCaptchaHost)
server.Start()
defer server.Close()
tests := []struct {
name string
testFunc func()
}{
{
name: "test normal token",
testFunc: func() {... | explode_data.jsonl/60459 | {
"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,
17926,
693,
31400,
70158,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
2930,
2271,
14444,
34,
25431,
1155,
340,
41057,
1669,
1273,
22803,
21723,
991,
726,
34,
25431,
1860,
1155,
11,
1273,
22803,
21723,
13275,
52317,
34,
25431,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNot(t *testing.T) {
if !(Not{False{}}).Match(nil) {
t.Error("Not False shouldn't be false ...")
}
if (Not{True{}}).Match(nil) {
t.Error("Not True shouldn't be true ...")
}
} | explode_data.jsonl/33184 | {
"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,
2623,
1155,
353,
8840,
836,
8,
341,
743,
18208,
2623,
90,
4049,
90,
3417,
568,
8331,
27907,
8,
341,
197,
3244,
6141,
445,
2623,
3557,
13133,
944,
387,
895,
2503,
1138,
197,
630,
743,
320,
2623,
90,
2514,
90,
3417,
568,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 3 |
func TestAccountsSerialization(t *testing.T) {
require := require.New(t)
kind := KindNodeCompute
// NOTE: These cases should be synced with tests in runtime/src/consensus/staking.rs.
for _, tc := range []struct {
rr Account
expectedBase64 string
}{
{Account{}, "oA=="},
{Account{General: Genera... | explode_data.jsonl/36024 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 951
} | [
2830,
3393,
41369,
35865,
1155,
353,
8840,
836,
8,
341,
17957,
1669,
1373,
7121,
1155,
692,
197,
15314,
1669,
16840,
1955,
46254,
198,
197,
322,
16743,
25,
4220,
5048,
1265,
387,
85028,
448,
7032,
304,
15592,
13437,
14,
6254,
13626,
142... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestOpen_ErrInvalid(t *testing.T) {
path := tempfile()
defer os.RemoveAll(path)
f, err := os.Create(path)
if err != nil {
t.Fatal(err)
}
if _, err := fmt.Fprintln(f, "this is not a bolt database"); err != nil {
t.Fatal(err)
}
if err := f.Close(); err != nil {
t.Fatal(err)
}
if _, err := bolt.Open... | explode_data.jsonl/27460 | {
"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,
5002,
93623,
7928,
1155,
353,
8840,
836,
8,
341,
26781,
1669,
54819,
741,
16867,
2643,
84427,
5581,
692,
1166,
11,
1848,
1669,
2643,
7251,
5581,
340,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
532,
743,
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... | 5 |
func TestMakeBuilderMap(t *testing.T) {
wantBuilderMap1 := map[string]builder{
"/gFoo/": {matchers: []matcher{{key: "k1", names: []string{"n1"}}, {key: "k2", names: []string{"n1"}}}},
}
wantBuilderMap2 := map[string]builder{
"/gFoo/": {matchers: []matcher{{key: "k1", names: []string{"n1"}}, {key: "k2", na... | explode_data.jsonl/81169 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 598
} | [
2830,
3393,
8078,
3297,
2227,
1155,
353,
8840,
836,
8,
341,
50780,
3297,
2227,
16,
1669,
2415,
14032,
60,
17850,
515,
197,
197,
3115,
70,
40923,
14,
788,
314,
6347,
388,
25,
3056,
70826,
2979,
792,
25,
330,
74,
16,
497,
5036,
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 TestErrorReasonCode(t *testing.T) {
assert.Equal(t, reasoncode.ErrorUnclassified, ErrorReasonCode(errors.New("test")))
assert.Equal(t, reasoncode.ErrorUnclassified, ErrorReasonCode(provider.Error{}))
} | explode_data.jsonl/17708 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 69
} | [
2830,
3393,
1454,
25139,
2078,
1155,
353,
8840,
836,
8,
341,
6948,
12808,
1155,
11,
2874,
1851,
6141,
63718,
447,
1870,
11,
4600,
25139,
2078,
38881,
7121,
445,
1944,
29836,
6948,
12808,
1155,
11,
2874,
1851,
6141,
63718,
447,
1870,
11,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestDecrypt(t *testing.T){
fmt.Println("Test Decrypt ***")
key := ReadFile("./keyfile")
secret := Base64Decode(key)
data := ReadFile("./encrypted.txt")
result, err := Decrypt(string(data), secret)
fmt.Println("decrypted result", result)
fmt.Println("decryption err", err)
fmt.Println("")
} | explode_data.jsonl/37323 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 114
} | [
2830,
3393,
89660,
1155,
353,
8840,
836,
1264,
11009,
12419,
445,
2271,
89146,
17160,
1138,
23634,
1669,
4457,
1703,
13988,
792,
1192,
1138,
197,
20474,
1669,
5351,
21,
19,
32564,
4857,
692,
8924,
1669,
4457,
1703,
13988,
36444,
3909,
113... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBreakOutOfTry(t *testing.T) {
const SCRIPT = `
function A() {
var x = 1;
B: {
try {
x = 2;
} catch(e) {
x = 3;
} finally {
break B;
x = 4;
}
}
return x;
}
A();
`
testScript1(SCRIPT, intToValue(2), t)
} | explode_data.jsonl/75233 | {
"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,
22524,
31731,
21453,
1155,
353,
8840,
836,
8,
341,
4777,
53679,
284,
22074,
7527,
362,
368,
341,
197,
2405,
856,
284,
220,
16,
280,
197,
12791,
25,
341,
298,
6799,
341,
571,
10225,
284,
220,
17,
280,
298,
197,
92,
2287,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEngine_WriteConflictingBatch(t *testing.T) {
engine := NewDefaultEngine()
defer engine.Close()
engine.MustOpen()
name := tsdb.EncodeNameString(engine.org, engine.bucket)
err := engine.Engine.WritePoints(context.TODO(), []models.Point{
models.MustNewPoint(
name,
models.NewTags(map[string]string{m... | explode_data.jsonl/5992 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 310
} | [
2830,
3393,
4571,
31825,
15578,
78208,
21074,
1155,
353,
8840,
836,
8,
341,
80118,
1669,
1532,
3675,
4571,
741,
16867,
4712,
10421,
741,
80118,
50463,
5002,
2822,
11609,
1669,
10591,
1999,
50217,
675,
703,
48974,
2659,
11,
4712,
71626,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestSkipList_Len(t *testing.T) {
sl := newSkipList()
if sl == nil {
t.Fatalf("%v: got nil", t.Name())
}
if got := sl.Len(); got != 0 {
t.Fatalf("Len: got %d, want %d", got, 0)
}
for i := 0; i < 10000; i++ {
sl.Set(i, i)
}
if got := sl.Len(); got != 10000 {
t.Fatalf("Len: got %d, want %d", got, 1... | explode_data.jsonl/54831 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 156
} | [
2830,
3393,
35134,
852,
2351,
268,
1155,
353,
8840,
836,
8,
341,
78626,
1669,
501,
35134,
852,
741,
743,
1739,
621,
2092,
341,
197,
3244,
30762,
4430,
85,
25,
2684,
2092,
497,
259,
2967,
2398,
197,
630,
743,
2684,
1669,
1739,
65819,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetPositions(t *testing.T) {
t.Parallel()
if !areTestAPIKeysSet() {
t.Skip()
}
_, err := f.GetPositions(context.Background())
if err != nil {
t.Error(err)
}
} | explode_data.jsonl/15165 | {
"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,
1949,
45793,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
743,
753,
546,
2271,
7082,
8850,
1649,
368,
341,
197,
3244,
57776,
741,
197,
532,
197,
6878,
1848,
1669,
282,
2234,
45793,
5378,
19047,
2398,
743,
1848,
96... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCollectorSecrets(t *testing.T) {
jaeger := v1.NewJaeger(types.NamespacedName{Name: "my-instance"})
secret := "mysecret"
jaeger.Spec.Storage.SecretName = secret
collector := NewCollector(jaeger)
dep := collector.Get()
assert.Equal(t, "mysecret", dep.Spec.Template.Spec.Containers[0].EnvFrom[0].SecretRef.... | explode_data.jsonl/59523 | {
"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,
53694,
19773,
82,
1155,
353,
8840,
836,
8,
341,
197,
5580,
1878,
1669,
348,
16,
7121,
52445,
1878,
52613,
98932,
68552,
675,
63121,
25,
330,
2408,
73655,
23625,
197,
20474,
1669,
330,
2408,
20474,
698,
197,
5580,
1878,
36473... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPropertyProfile(t *testing.T) {
// GIVEN
graphName := "mygraph"
g := NewGraph(graphName)
require.NotNil(t, g)
v := NewVertexG(g)
require.NotNil(t, v)
p := NewPropertyV(v)
require.NotNil(t, p)
// WHEN
qb := p.Profile()
// THEN
assert.NotNil(t, qb)
assert.Equal(t, fmt.Sprintf("%s.executionProfile... | explode_data.jsonl/38216 | {
"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,
3052,
8526,
1155,
353,
8840,
836,
8,
1476,
197,
322,
89836,
198,
66616,
675,
1669,
330,
2408,
4439,
698,
3174,
1669,
1532,
11212,
24312,
675,
340,
17957,
93882,
1155,
11,
342,
340,
5195,
1669,
1532,
8320,
38,
3268,
340,
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 |
func TestMempoolTxConcurrentWithCommit(t *testing.T) {
state, privVals := randGenesisState(1, false, 10)
blockDB := dbm.NewMemDB()
stateStore := sm.NewStore(blockDB)
cs := newStateWithConfigAndBlockStore(config, state, privVals[0], NewCounterApplication(), blockDB)
err := stateStore.Save(state)
require.NoError(t,... | explode_data.jsonl/23671 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 290
} | [
2830,
3393,
44,
3262,
1749,
31584,
1109,
3231,
2354,
33441,
1155,
353,
8840,
836,
8,
341,
24291,
11,
6095,
52452,
1669,
10382,
84652,
1397,
7,
16,
11,
895,
11,
220,
16,
15,
340,
47996,
3506,
1669,
2927,
76,
7121,
18816,
3506,
741,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestBoolConversion(t *testing.T) {
t.Parallel()
ctx := NewIsolate().NewContext()
testcases := []struct {
js string
expected bool
isBool bool
}{
// These are the only values that are KindBoolean. Everything else below is
// implicitly converted.
{`true`, true, true},
{`false`, false, true... | explode_data.jsonl/81538 | {
"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,
11233,
48237,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
20985,
1669,
1532,
3872,
33066,
1005,
3564,
1972,
2822,
18185,
23910,
1669,
3056,
1235,
341,
197,
95636,
981,
914,
198,
197,
42400,
1807,
198,
197,
19907,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetTag(t *testing.T) {
s := TestStruct{}
rt := reflect.TypeOf(s)
for i := 0; i < rt.NumField(); i++ {
f := rt.Field(i)
fmt.Println(f.Tag.Get("json"))
}
} | explode_data.jsonl/81132 | {
"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,
1949,
5668,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
3393,
9422,
16094,
55060,
1669,
8708,
73921,
1141,
340,
2023,
600,
1669,
220,
15,
26,
600,
366,
16677,
39847,
1877,
2129,
600,
1027,
341,
197,
1166,
1669,
16677,
17087,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSuccessfulDistributedTransaction(t *testing.T) {
ctx := context.Background()
var remoteState interface{}
remote := NewTxManager(&fakeBroadcaster{})
remote.SetCommitFn(func(ctx context.Context, tx *Transaction) error {
remoteState = tx.Payload
return nil
})
local := NewTxManager(&wrapTxManagerAsBroad... | explode_data.jsonl/5853 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 199
} | [
2830,
3393,
36374,
35,
25146,
8070,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
2822,
2405,
8699,
1397,
3749,
16094,
197,
18147,
1669,
1532,
31584,
2043,
2099,
30570,
68324,
32020,
37790,
197,
18147,
4202,
33441,
24911,
18552,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUintUint64(t *testing.T) {
var expected uint64 = 123456789
ti := Uint{
ValidFlag: true,
uint: expected,
}
if ti.Uint64() != expected {
t.Errorf("actual:%d, expected:%d", ti.Uint64(), expected)
}
} | explode_data.jsonl/13399 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 99
} | [
2830,
3393,
21570,
21570,
21,
19,
1155,
353,
8840,
836,
8,
341,
2405,
3601,
2622,
21,
19,
284,
220,
16,
17,
18,
19,
20,
21,
22,
23,
24,
198,
72859,
1669,
27883,
515,
197,
197,
4088,
12135,
25,
830,
345,
197,
8254,
25,
414,
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... | 2 |
func TestFeatureDerivation(t *testing.T) {
a := assert.New(t)
// Prepare feature derivation test table in MySQL.
db, err := NewDB("mysql://root:root@tcp/?maxAllowedPacket=0")
if err != nil {
a.Fail("error connect to mysql: %v", err)
}
err = testdata.Popularize(db.DB, testdata.FeatureDerivationCaseSQL)
if err !... | explode_data.jsonl/24027 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1659
} | [
2830,
3393,
13859,
22171,
39127,
1155,
353,
8840,
836,
8,
341,
11323,
1669,
2060,
7121,
1155,
340,
197,
322,
31166,
4565,
95254,
1273,
1965,
304,
26339,
624,
20939,
11,
1848,
1669,
1532,
3506,
445,
12272,
1110,
2888,
25,
2888,
31,
27161... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIsEnglish(t *testing.T) {
{
sample := `A perennial also-ran, Stallings won his seat when longtime lawmaker David Holmes
died 11 days after the filing deadline. Suddenly, Stallings was a shoo-in, not
the long shot. In short order, the Legislature attempted to pass a law allowing
former U.S. Rep. Caroly... | explode_data.jsonl/18661 | {
"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,
3872,
22574,
1155,
353,
8840,
836,
8,
341,
197,
515,
197,
1903,
1516,
1669,
1565,
32,
73618,
1083,
3795,
276,
11,
71870,
819,
2765,
806,
10723,
979,
35404,
70376,
6798,
39301,
198,
197,
2698,
1122,
220,
16,
16,
2849,
1283,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUserFriendDeleteEXAMPLE1EXAMPLE2(t *testing.T) {
resp, _ := sendDelete("http://localhost:8080/EXAMPLE2&q=undofriendship", UserFriendRequestEXAMPLE1, auth.Header.Get("Authorization"))
response := responseToString(resp)
compareResults(t, response, HyperText.CustomResponses["success-delete"])
} | explode_data.jsonl/59362 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 101
} | [
2830,
3393,
1474,
41637,
6435,
95875,
16,
95875,
17,
1155,
353,
8840,
836,
8,
341,
34653,
11,
716,
1669,
3624,
6435,
445,
1254,
1110,
8301,
25,
23,
15,
23,
15,
14,
95875,
17,
62735,
28,
1241,
1055,
5039,
5270,
497,
2657,
41637,
1900... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCalcFamilyTimeRange(t *testing.T) {
t1, _ := ParseTimestamp("20190702 12:00:00", "20060102 15:04:05")
calc := dayCalculator
t2, _ := calc.ParseSegmentTime("20190702")
assert.Equal(t, t1, calc.CalcFamilyStartTime(t2, 12))
t3, _ := ParseTimestamp("20190702 13:00:00", "20060102 15:04:05")
assert.Equal(t, t3... | explode_data.jsonl/75708 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 434
} | [
2830,
3393,
47168,
15192,
1462,
6046,
1155,
353,
8840,
836,
8,
341,
3244,
16,
11,
716,
1669,
14775,
20812,
445,
17,
15,
16,
24,
15,
22,
15,
17,
220,
16,
17,
25,
15,
15,
25,
15,
15,
497,
330,
17,
15,
15,
21,
15,
16,
15,
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 |
func TestGetCurlCommand_specialCharsInBody(t *testing.T) {
req, _ := http.NewRequest("POST", "http://www.example.com/abc/def.ghi?jlk=mno&pqr=stu", bytes.NewBufferString(`Hello $123 o'neill -"-`))
req.Header.Set("Content-Type", "application/json")
libCommand, _ := http2curl.GetCurlCommand(req)
command, _ := GetCurl... | explode_data.jsonl/61004 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 244
} | [
2830,
3393,
1949,
34,
1085,
4062,
41629,
32516,
641,
5444,
1155,
353,
8840,
836,
8,
341,
24395,
11,
716,
1669,
1758,
75274,
445,
2946,
497,
330,
1254,
1110,
2136,
7724,
905,
14,
13683,
14,
750,
13,
75076,
30,
73,
41748,
27221,
2152,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEnqueueWF(t *testing.T) {
var err error
var un *unstructured.Unstructured
var ten int32 = 10
controller := newTTLController()
// Veirfy we do not enqueue if not completed
wf := test.LoadWorkflowFromBytes([]byte(completedWf))
un, err = util.ToUnstructured(wf)
assert.NoError(t, err)
controller.enqueue... | explode_data.jsonl/48741 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 380
} | [
2830,
3393,
1702,
4584,
32131,
1155,
353,
8840,
836,
8,
341,
2405,
1848,
1465,
198,
2405,
650,
353,
359,
51143,
10616,
51143,
198,
2405,
5779,
526,
18,
17,
284,
220,
16,
15,
271,
61615,
1669,
501,
51,
13470,
2051,
2822,
197,
322,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.