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 TestBackgroundTLFUpdater(t *testing.T) {
tc := libkb.SetupTest(t, "TestBackgroundTLFUpdater", 1)
defer tc.Cleanup()
_, err := kbtest.CreateAndSignupFakeUser("gregr", tc.G)
require.NoError(t, err)
api := &testAPIServer{}
u := NewBackgroundTLFUpdater(tc.G)
u.testingDisableKBFS = true
u.testingAPIServer = ap... | explode_data.jsonl/3433 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 453
} | [
2830,
3393,
8706,
13470,
37,
79854,
1155,
353,
8840,
836,
8,
341,
78255,
1669,
3051,
21310,
39820,
2271,
1155,
11,
330,
2271,
8706,
13470,
37,
79854,
497,
220,
16,
340,
16867,
17130,
727,
60639,
741,
197,
6878,
1848,
1669,
38653,
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 TestAttrsUpdateV2SafeString(t *testing.T) {
c := setupTest([]string{"update", "attrs", "--host", "orion", "--id", "urn:ngsi-ld:Product:010", "--data", "{\"specialOffer\":{\"value\": true}}", "--safeString", "on"})
reqRes := helper.MockHTTPReqRes{}
reqRes.Res.StatusCode = http.StatusNoContent
reqRes.Path = "/v... | explode_data.jsonl/33072 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 188
} | [
2830,
3393,
53671,
4289,
53,
17,
25663,
703,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
6505,
2271,
10556,
917,
4913,
2386,
497,
330,
20468,
497,
14482,
3790,
497,
330,
269,
290,
497,
14482,
307,
497,
330,
399,
25,
968,
6321,
12,
507... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFilterByFirstLineOnlyGivesFirstLineOfInput(t *testing.T) {
t.Parallel()
p := script.Echo("hello\nworld").Filter(func(r io.Reader, w io.Writer) error {
scanner := bufio.NewScanner(r)
for scanner.Scan() {
fmt.Fprintln(w, scanner.Text())
break
}
return scanner.Err()
})
want := "hello\n"
got, er... | explode_data.jsonl/51473 | {
"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,
5632,
1359,
5338,
2460,
7308,
38,
1886,
5338,
2460,
2124,
2505,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
3223,
1669,
5316,
5142,
958,
445,
14990,
1699,
14615,
1827,
5632,
18552,
2601,
6399,
47431,
11,
289,
6399,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEnv(t *testing.T) {
for i, element := range EnvCases {
input := element.Input
output := element.Output
t.Run("case "+strconv.Itoa(i), func(t *testing.T) {
t.Parallel()
got := ExecuteEnvsDetectionPlugin(input.pluginDetails, input.RuntimeVersion, input.Root)
if !reflect.DeepEqual(got, output) {
... | explode_data.jsonl/21420 | {
"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,
14359,
1155,
353,
8840,
836,
8,
341,
2023,
600,
11,
2392,
1669,
2088,
37039,
37302,
341,
197,
22427,
1669,
2392,
16130,
198,
197,
21170,
1669,
2392,
34246,
198,
197,
3244,
16708,
445,
5638,
6630,
51848,
64109,
1956,
701,
291... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUnmarshalEscape(t *testing.T) {
for testName, test := range escapeTests {
t.Run(testName, func(t *testing.T) {
var result string
err := phpserialize.Unmarshal([]byte(test.Serialized), &result)
expectErrorToNotHaveOccurred(t, err)
if test.Unserialized != result {
t.Errorf("Expected:\n %#+v\... | explode_data.jsonl/27034 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 164
} | [
2830,
3393,
1806,
27121,
48124,
1155,
353,
8840,
836,
8,
341,
2023,
94396,
11,
1273,
1669,
2088,
12449,
18200,
341,
197,
3244,
16708,
8623,
675,
11,
2915,
1155,
353,
8840,
836,
8,
341,
298,
2405,
1102,
914,
198,
298,
9859,
1669,
24362... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNullTypeString(t *testing.T) {
var b Sqlizer
var name sql.NullString
b = Eq{"name": name}
sql, args, err := b.ToSql()
assert.NoError(t, err)
assert.Empty(t, args)
assert.Equal(t, "name IS NULL", sql)
name.Scan("Name")
b = Eq{"name": name}
sql, args, err = b.ToSql()
assert.NoError(t, err)
assert... | explode_data.jsonl/44171 | {
"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,
3280,
929,
703,
1155,
353,
8840,
836,
8,
341,
2405,
293,
7224,
3135,
198,
2405,
829,
5704,
23979,
703,
271,
2233,
284,
33122,
4913,
606,
788,
829,
532,
30633,
11,
2827,
11,
1848,
1669,
293,
3274,
8269,
2822,
6948,
35699,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestTokenConfig_Success(t *testing.T) {
assert := assertlib.New(t)
globalConfig := viper.New()
monkey.Patch(token.Initialize, func(config *viper.Viper) (*token.Config, error) {
return &token.Config{PlatformName: "test"}, nil
})
defer monkey.UnpatchAll()
config, err := TokenConfig(globalConfig)
assert.NoEr... | explode_data.jsonl/61940 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 130
} | [
2830,
3393,
3323,
2648,
87161,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
2740,
7121,
1155,
340,
18842,
2648,
1669,
95132,
7121,
741,
197,
96016,
1069,
754,
13274,
45829,
11,
2915,
8754,
353,
85,
12858,
5058,
12858,
8,
4609,
5839,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSchemaParser_SimpleTypeInheritingMultipleInterfaces(t *testing.T) {
body := `type Hello implements Wo, rld { }`
astDoc := parse(t, body)
expected := &ast.Document{
Loc: testLoc(0, 33),
Definitions: []ast.Node{
&ast.ObjectDefinition{
Loc: testLoc(0, 33),
Name: &ast.Name{
Value: "Hello",
... | explode_data.jsonl/51221 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 422
} | [
2830,
3393,
8632,
6570,
1098,
6456,
929,
641,
1923,
5853,
32089,
41066,
1155,
353,
8840,
836,
8,
341,
35402,
1669,
1565,
1313,
21927,
5169,
27258,
11,
435,
507,
314,
335,
3989,
88836,
9550,
1669,
4715,
1155,
11,
2487,
340,
42400,
1669,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestDefinitionListItemNodeType(t *testing.T) {
n := &DefinitionListItemNode{Type: NodeDefinitionListItem}
if n.NodeType() != NodeDefinitionListItem {
t.Error("n.Type != NodeDefinitionListItem")
}
} | explode_data.jsonl/1874 | {
"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,
10398,
19045,
66137,
1155,
353,
8840,
836,
8,
341,
9038,
1669,
609,
10398,
19045,
1955,
90,
929,
25,
6018,
10398,
19045,
532,
743,
308,
21714,
929,
368,
961,
6018,
10398,
19045,
341,
197,
3244,
6141,
445,
77,
10184,
961,
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
] | 2 |
func TestGetSchedulable_Invalid(t *testing.T) {
g := testGraph(t)
tcs := []struct {
name string
finished []string
}{{
// x can't be completed on its own b/c it depends on a
name: "only-x",
finished: []string{"x"},
}, {
// y can't be completed on its own b/c it depends on a and x
name: "onl... | explode_data.jsonl/69246 | {
"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,
1949,
50,
2397,
360,
480,
62,
7928,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
1273,
11212,
1155,
340,
3244,
4837,
1669,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
1166,
24657,
3056,
917,
198,
197,
15170,
515,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestIssue18(t *testing.T) {
p := UGCPolicy()
p.AllowAttrs("color").OnElements("font")
p.AllowElements("font")
tt := test{
in: `<font face="Arial">No link here. <a href="http://link.com">link here</a>.</font> Should not be linked here.`,
expected: `No link here. <a href="http://link.com" rel="nofoll... | explode_data.jsonl/28800 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 230
} | [
2830,
3393,
42006,
16,
23,
1155,
353,
8840,
836,
8,
341,
3223,
1669,
547,
38,
7123,
8018,
2822,
3223,
29081,
53671,
445,
3423,
1827,
1925,
11868,
445,
4026,
1138,
3223,
29081,
11868,
445,
4026,
5130,
3244,
83,
1669,
1273,
515,
197,
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... | 2 |
func TestClustersUpdate_Run(t *testing.T) {
ctrl := gomock.NewController(t)
mockStore := mocks.NewMockClusterStore(ctrl)
defer ctrl.Finish()
expected := &mongodbatlas.Cluster{
ProviderSettings: &mongodbatlas.ProviderSettings{},
}
t.Run("flags run", func(t *testing.T) {
updateOpts := &ClustersUpdateOpts{
... | explode_data.jsonl/51346 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 876
} | [
2830,
3393,
94992,
4289,
84158,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
342,
316,
1176,
7121,
2051,
1155,
340,
77333,
6093,
1669,
68909,
7121,
11571,
28678,
6093,
62100,
692,
16867,
23743,
991,
18176,
741,
42400,
1669,
609,
71155,
347,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_DirectedCycle(t *testing.T) {
gb := NewGraphBuilder(BuilderOptions{IsDirected: true})
gb.AddNode(1)
gb.AddNode(2)
gb.AddNode(3)
gb.AddEdge(1, 2)
gb.AddEdge(2, 3)
gb.AddEdge(3, 1)
actual_graph, err := gb.Build()
assert.NoError(t, err)
expected_graph := rawDirectedGraph{
Nodes: map[NodeID]*rawDirec... | explode_data.jsonl/81783 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 373
} | [
2830,
3393,
1557,
74612,
44820,
1155,
353,
8840,
836,
8,
341,
3174,
65,
1669,
1532,
11212,
3297,
7,
3297,
3798,
90,
3872,
92669,
25,
830,
3518,
3174,
65,
1904,
1955,
7,
16,
340,
3174,
65,
1904,
1955,
7,
17,
340,
3174,
65,
1904,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestDistSQLDrainingHosts(t *testing.T) {
defer leaktest.AfterTest(t)()
defer log.Scope(t).Close(t)
const numNodes = 2
tc := serverutils.StartTestCluster(
t,
numNodes,
base.TestClusterArgs{
ReplicationMode: base.ReplicationManual,
ServerArgs: base.TestServerArgs{Knobs: base.TestingKnobs{DistSQ... | explode_data.jsonl/43683 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1582
} | [
2830,
3393,
23356,
6688,
8847,
2056,
9296,
82,
1155,
353,
8840,
836,
8,
341,
16867,
23352,
1944,
36892,
2271,
1155,
8,
741,
16867,
1487,
77940,
1155,
568,
7925,
1155,
692,
4777,
1629,
12288,
284,
220,
17,
198,
78255,
1669,
3538,
6031,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPopulateCluster_APIServerCount(t *testing.T) {
c := buildMinimalCluster()
full, err := build(c)
if err != nil {
t.Fatalf("error during build: %v", err)
}
if fi.Int32Value(full.Spec.KubeAPIServer.APIServerCount) != 3 {
t.Fatalf("Unexpected APIServerCount: %v", fi.Int32Value(full.Spec.KubeAPIServer.AP... | explode_data.jsonl/75047 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 137
} | [
2830,
3393,
11598,
6334,
28678,
21899,
1637,
2836,
2507,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
1936,
88328,
28678,
2822,
94042,
11,
1848,
1669,
1936,
1337,
340,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
841,
2337,
1936,
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 TestHelloExtensionUnmarshal(t *testing.T) {
buf := bytes.NewBuffer([]byte{
// extension[0] type
0x10, 0x11,
// extension[0] length
0x00, 0x05,
// extension[0] data
0x20, 0x21, 0x22, 0x23, 0x24,
// debris
0x30,
})
var val recordfmt.HelloExtension
if err := val.Decode(buf); err != nil {
t.Fat... | explode_data.jsonl/53622 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 275
} | [
2830,
3393,
9707,
12049,
1806,
27121,
1155,
353,
8840,
836,
8,
341,
26398,
1669,
5820,
7121,
4095,
10556,
3782,
515,
197,
197,
322,
8894,
58,
15,
60,
943,
198,
197,
197,
15,
87,
16,
15,
11,
220,
15,
87,
16,
16,
345,
197,
197,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestParseLevelError(t *testing.T) {
verifyLevelError := func(levels ...string) {
for _, level := range levels {
_, err := ParseLevel(level)
require.Error(t, err, "not supposed to succeed while parsing level string [%s]", level)
}
}
verifyLevelError("", "D", "DE BUG", ".")
} | explode_data.jsonl/79298 | {
"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,
14463,
4449,
1454,
1155,
353,
8840,
836,
8,
1476,
93587,
4449,
1454,
1669,
2915,
98008,
2503,
917,
8,
341,
197,
2023,
8358,
2188,
1669,
2088,
5866,
341,
298,
197,
6878,
1848,
1669,
14775,
4449,
23669,
340,
298,
17957,
6141,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestUnmarshalExact(t *testing.T) {
vip := New()
target := &testUnmarshalExtra{}
vip.SetConfigType("yaml")
r := bytes.NewReader(yamlExampleWithExtras)
vip.ReadConfig(r)
err := vip.UnmarshalExact(target)
if err == nil {
t.Fatal("UnmarshalExact should error when populating a struct from a conf that contains ... | explode_data.jsonl/5546 | {
"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,
1806,
27121,
57954,
1155,
353,
8840,
836,
8,
341,
5195,
573,
1669,
1532,
741,
28861,
1669,
609,
1944,
1806,
27121,
11612,
16094,
5195,
573,
4202,
2648,
929,
445,
41466,
1138,
7000,
1669,
5820,
68587,
7021,
9467,
13314,
2354,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestMergePodSpec(t *testing.T) {
g := gomega.NewGomegaWithT(t)
scenarios := map[string]struct {
podSpecBase *v1alpha1.ServingRuntimePodSpec
podSpecOverride *v1beta1.PodSpec
expected *v1.PodSpec
}{
"BasicMerge": {
podSpecBase: &v1alpha1.ServingRuntimePodSpec{
NodeSelector: map[string]s... | explode_data.jsonl/54485 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1349
} | [
2830,
3393,
52096,
23527,
8327,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
342,
32696,
7121,
38,
32696,
2354,
51,
1155,
692,
29928,
60494,
1669,
2415,
14032,
60,
1235,
341,
197,
3223,
347,
8327,
3978,
257,
353,
85,
16,
7141,
16,
808,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestGetSvcatWithNamespacedBrokerFeatureDisabled(t *testing.T) {
// Verify that commands work with the feature disabled, and don't return errors
testcases := []struct {
cmd string
wantOutput string
}{
{"get brokers", "my-cluster-broker"},
{"get classes", "my-cluster-class"},
{"get class my-clust... | explode_data.jsonl/71173 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1216
} | [
2830,
3393,
1949,
50,
85,
4616,
2354,
7980,
68552,
65545,
13859,
25907,
1155,
353,
8840,
836,
8,
341,
197,
322,
25429,
429,
11293,
975,
448,
279,
4565,
8386,
11,
323,
1513,
944,
470,
5975,
198,
18185,
23910,
1669,
3056,
1235,
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 Test_part1(t *testing.T) {
type args struct {
in []string
}
tests := []struct {
name string
args args
want int
}{
{"Test Input", args{testInput}, 35},
{"Given Input", args{input.GetInputStrings()}, 5622},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := part1(tt.arg... | explode_data.jsonl/57628 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 186
} | [
2830,
3393,
10495,
16,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
17430,
3056,
917,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
31215,
2827,
198,
197,
50780,
526,
198,
197,
59403,
197,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestParseFilesWithDependencies(t *testing.T) {
// Create some file contents that import a non-well-known proto.
// (One of the protos in internal/testprotos is fine.)
contents := map[string]string{
"test.proto": `
syntax = "proto3";
import "desc_test_wellknowntypes.proto";
message TestImportedType {... | explode_data.jsonl/18031 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1032
} | [
2830,
3393,
14463,
10809,
2354,
48303,
1155,
353,
8840,
836,
8,
341,
197,
322,
4230,
1045,
1034,
8794,
429,
1159,
264,
2477,
2630,
613,
21309,
18433,
624,
197,
322,
320,
3966,
315,
279,
1724,
436,
304,
5306,
12697,
4391,
436,
374,
691... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNodeToStringNoLabels(t *testing.T) {
node := neo4j.Node{
Id: 2,
Labels: []string{},
Props: map[string]interface{}{
"Prop1": 2,
"Prop2": "Hello world",
},
}
actual := input.ToString(node)
expected := `( {"Prop1":2,"Prop2":"Hello world"})`
if actual != expected {
t.Fatalf(`expected '%v' ... | explode_data.jsonl/7075 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 157
} | [
2830,
3393,
1955,
5870,
2753,
23674,
1155,
353,
8840,
836,
8,
341,
20831,
1669,
35082,
19,
73,
21714,
515,
197,
67211,
25,
257,
220,
17,
345,
197,
197,
23674,
25,
3056,
917,
38837,
197,
197,
5992,
25,
2415,
14032,
31344,
67066,
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 TestSearchProducts(t *testing.T) {
t.Parallel()
migration := sqltest.New(t, sqltest.Options{
Force: *force,
Path: "../../migrations",
})
pool := migration.Setup(context.Background(), "")
db := &DB{
Postgres: pool,
}
// On this test, reuse the same connection for executing SQL commands
// to check ... | explode_data.jsonl/25452 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2363
} | [
2830,
3393,
5890,
17746,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
2109,
5033,
1669,
5704,
1944,
7121,
1155,
11,
5704,
1944,
22179,
515,
197,
197,
18573,
25,
353,
8833,
345,
197,
69640,
25,
220,
10208,
76,
17824,
756,
197,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 7 |
func TestAutofollowBasedOnRootPost(t *testing.T) {
th := Setup(t).InitBasic()
defer th.TearDown()
os.Setenv("MM_FEATUREFLAGS_COLLAPSEDTHREADS", "true")
defer os.Unsetenv("MM_FEATUREFLAGS_COLLAPSEDTHREADS")
th.App.UpdateConfig(func(cfg *model.Config) {
*cfg.ServiceSettings.ThreadAutoFollow = true
*cfg.ServiceS... | explode_data.jsonl/26445 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 493
} | [
2830,
3393,
19602,
1055,
1544,
28715,
1925,
8439,
4133,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1155,
568,
3803,
15944,
741,
16867,
270,
836,
682,
4454,
741,
25078,
4202,
3160,
445,
8035,
30827,
32748,
74317,
2537,
20275,
47519,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLocalhost(t *testing.T) {
if !setup(t) {
return
}
h := &Handler{
mcPool: NewPool("localhost:11213", 8, 100),
}
testWithClient(t, h)
} | explode_data.jsonl/19460 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 68
} | [
2830,
3393,
7319,
3790,
1155,
353,
8840,
836,
8,
341,
743,
753,
15188,
1155,
8,
341,
197,
853,
198,
197,
532,
9598,
1669,
609,
3050,
515,
197,
97662,
10551,
25,
1532,
10551,
445,
8301,
25,
16,
16,
17,
16,
18,
497,
220,
23,
11,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 2 |
func Test_IfdByteEncoder_encodeTagToBytes_childIfd__withoutAllocate(t *testing.T) {
ibe := NewIfdByteEncoder()
im := NewIfdMapping()
err := LoadStandardIfds(im)
log.PanicIf(err)
ti := NewTagIndex()
ib := NewIfdBuilder(im, ti, exifcommon.IfdPathStandard, exifcommon.TestDefaultByteOrder)
b := new(bytes.Buffer)... | explode_data.jsonl/52749 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 471
} | [
2830,
3393,
62,
2679,
67,
7153,
19921,
11224,
5668,
1249,
7078,
17268,
2679,
67,
563,
28996,
75380,
1155,
353,
8840,
836,
8,
341,
197,
23549,
1669,
1532,
2679,
67,
7153,
19921,
2822,
54892,
1669,
1532,
2679,
67,
6807,
2822,
9859,
1669,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestIgnoresInvalidBackend(t *testing.T) {
dc := testdataclient.New([]*eskip.Route{{Id: "route1", Path: "/some-path", Backend: "invalid backend"}})
tr, err := newTestRouting(dc)
if err != nil {
t.Error(err)
}
defer tr.close()
if err = tr.log.WaitFor("invalid backend", time.Second); err != nil {
t.Error(... | explode_data.jsonl/58577 | {
"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,
40,
70,
2152,
416,
7928,
29699,
1155,
353,
8840,
836,
8,
341,
87249,
1669,
1273,
691,
2972,
7121,
85288,
288,
13389,
58004,
2979,
764,
25,
330,
8966,
16,
497,
7933,
25,
3521,
14689,
33095,
497,
55260,
25,
330,
11808,
19163... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFromHex(t *testing.T) {
if clr, err := FromHex("8e0cf2"); err != nil {
t.Error("failed parsing hex:", err)
} else if !rgbaEquals(clr, refClr) {
t.Errorf("color is unequal ref color: %+v", clr)
}
if clr, err := FromHex("#8e0cf2"); err != nil {
t.Error("failed parsing hex:", err)
} else if !rgbaEqual... | explode_data.jsonl/37824 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 325
} | [
2830,
3393,
3830,
20335,
1155,
353,
8840,
836,
8,
341,
743,
62127,
11,
1848,
1669,
5542,
20335,
445,
23,
68,
15,
9792,
17,
5038,
1848,
961,
2092,
341,
197,
3244,
6141,
445,
16091,
22314,
12371,
12147,
1848,
340,
197,
92,
770,
421,
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... | 9 |
func TestTimestamp(t *testing.T) {
require := require.New(t)
now := time.Now().UTC()
v, err := Timestamp.Convert(now)
require.Nil(err)
require.Equal(now, v)
v, err = Timestamp.Convert(now.Format(TimestampLayout))
require.Nil(err)
require.Equal(
now.Format(TimestampLayout),
v.(time.Time).Format(TimestampLa... | explode_data.jsonl/54302 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 278
} | [
2830,
3393,
20812,
1155,
353,
8840,
836,
8,
341,
17957,
1669,
1373,
7121,
1155,
692,
80922,
1669,
882,
13244,
1005,
21183,
741,
5195,
11,
1848,
1669,
32758,
36179,
32263,
340,
17957,
59678,
3964,
340,
17957,
12808,
32263,
11,
348,
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... | 1 |
func TestFilterPluginsWithNominatedPods(t *testing.T) {
tests := []struct {
name string
preFilterPlugin *TestPlugin
filterPlugin *TestPlugin
pod *v1.Pod
nominatedPod *v1.Pod
node *v1.Node
nodeInfo *framework.NodeInfo
wantStatus *framework.Status
}{
... | explode_data.jsonl/35744 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1918
} | [
2830,
3393,
5632,
45378,
2354,
45,
49515,
23527,
82,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
310,
914,
198,
197,
40346,
5632,
11546,
353,
2271,
11546,
198,
197,
50108,
11546,
262,
353,
2271,
11546,
198,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestSyncDeploymentDontDoAnythingDuringDeletion(t *testing.T) {
f := newFixture(t)
d := newDeployment("foo", 1, nil, nil, nil, map[string]string{"foo": "bar"})
now := metav1.Now()
d.DeletionTimestamp = &now
f.dLister = append(f.dLister, d)
f.objects = append(f.objects, d)
f.expectUpdateDeploymentStatusActi... | explode_data.jsonl/66036 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 145
} | [
2830,
3393,
12154,
75286,
35,
544,
5404,
77303,
16014,
1912,
52625,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
501,
18930,
1155,
692,
2698,
1669,
501,
75286,
445,
7975,
497,
220,
16,
11,
2092,
11,
2092,
11,
2092,
11,
2415,
14032,
30953... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestHoverUnexported(t *testing.T) {
const proxy = `
-- golang.org/x/structs@v1.0.0/go.mod --
module golang.org/x/structs
go 1.12
-- golang.org/x/structs@v1.0.0/types.go --
package structs
type Mixed struct {
Exported int
unexported string
}
`
const mod = `
-- go.mod --
module mod.com
go 1.12
require gol... | explode_data.jsonl/68797 | {
"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,
34379,
1806,
1533,
291,
1155,
353,
8840,
836,
8,
341,
4777,
13291,
284,
22074,
313,
342,
37287,
2659,
10776,
14,
1235,
82,
31,
85,
16,
13,
15,
13,
15,
25525,
10929,
39514,
4352,
342,
37287,
2659,
10776,
14,
1235,
82,
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 TestStrokedPathBevelFlat(t *testing.T) {
run(t, func(o *op.Ops) {
const width = 2.5
sty := clip.StrokeStyle{
Cap: clip.FlatCap,
Join: clip.BevelJoin,
}
p := new(clip.Path)
p.Begin(o)
p.Move(f32.Pt(10, 50))
p.Line(f32.Pt(10, 0))
p.Arc(f32.Pt(10, 0), f32.Pt(20, 0), math.Pi)
p.Line(f32.Pt(1... | explode_data.jsonl/18108 | {
"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,
623,
299,
47159,
1820,
3430,
889,
31019,
1155,
353,
8840,
836,
8,
341,
56742,
1155,
11,
2915,
10108,
353,
453,
8382,
1690,
8,
341,
197,
4777,
2374,
284,
220,
17,
13,
20,
198,
197,
18388,
88,
1669,
12327,
7758,
7441,
2323... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCredentialIssued_ExecuteInbound(t *testing.T) {
followup, action, err := (&credentialIssued{}).ExecuteInbound(&metaData{})
require.NoError(t, err)
require.Equal(t, &noOp{}, followup)
require.NoError(t, action(nil))
} | explode_data.jsonl/53010 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 90
} | [
2830,
3393,
48265,
28216,
3260,
83453,
641,
10891,
1155,
353,
8840,
836,
8,
341,
1166,
1544,
454,
11,
1917,
11,
1848,
1669,
15899,
66799,
28216,
3260,
6257,
568,
17174,
641,
10891,
2099,
5490,
1043,
37790,
17957,
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,
1,
1,
1,
1,
1,
1
] | 1 |
func TestBlockedRetrieval(t *testing.T) {
tev, fl := initialize(t)
defer tev.tearDown()
it, num := fl.Iterator(&ab.SeekPosition{Type: &ab.SeekPosition_Specified{Specified: &ab.SeekSpecified{Number: 1}}})
assert.Equal(t, uint64(1), num, "Expected block iterator at 1, but got %d", num)
signal := it.ReadyChan()
sel... | explode_data.jsonl/35031 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 527
} | [
2830,
3393,
95847,
12020,
7231,
831,
1155,
353,
8840,
836,
8,
341,
197,
665,
85,
11,
1320,
1669,
9468,
1155,
340,
16867,
1013,
85,
31853,
59342,
741,
23374,
11,
1629,
1669,
1320,
40846,
2099,
370,
76465,
3812,
90,
929,
25,
609,
370,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFilterMatchMultipleWildcards(t *testing.T) {
p, err := graphite.NewParser([]string{
"*.* .wrong.measurement*",
"servers.* .host.measurement*", // should match this
"servers.localhost .wrong.measurement*",
"*.localhost .wrong.measurement*",
}, nil)
if err != nil {
t.Fatalf("unexpected error creati... | explode_data.jsonl/32185 | {
"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,
5632,
8331,
32089,
40603,
25024,
1155,
353,
8840,
836,
8,
341,
3223,
11,
1848,
1669,
94173,
7121,
6570,
10556,
917,
515,
197,
197,
61593,
4908,
659,
34870,
17326,
24359,
9,
756,
197,
197,
40787,
18729,
4908,
659,
3790,
17326... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTimer_Exit(t *testing.T) {
gtest.Case(t, func() {
timer := New()
array := garray.New()
timer.Add(200*time.Millisecond, func() {
array.Append(1)
gtimer.Exit()
})
time.Sleep(1000*time.Millisecond)
gtest.Assert(array.Len(), 1)
})
} | explode_data.jsonl/3727 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 159
} | [
2830,
3393,
10105,
62,
15339,
1155,
353,
8840,
836,
8,
341,
256,
342,
1944,
727,
519,
1155,
11,
2915,
368,
341,
981,
9021,
1669,
1532,
741,
981,
1334,
1669,
342,
1653,
7121,
741,
981,
9021,
1904,
7,
17,
15,
15,
77053,
71482,
11,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestGetDashboard(t *testing.T) {
client := newClientAndRunServer(t)
ctx, cancel := context.WithTimeout(context.Background(), 3*time.Second)
defer cancel()
res, err := client.GetDashboard(ctx, &api.GetDashboardRequest{WorkPageSize: 50})
if err != nil {
t.Fatal(err)
}
if expected := 5; expected != len(res... | explode_data.jsonl/50632 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 249
} | [
2830,
3393,
1949,
26947,
1155,
353,
8840,
836,
8,
341,
25291,
1669,
501,
2959,
3036,
6727,
5475,
1155,
692,
20985,
11,
9121,
1669,
2266,
26124,
7636,
5378,
19047,
1507,
220,
18,
77053,
32435,
340,
16867,
9121,
2822,
10202,
11,
1848,
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... | 5 |
func TestMatchOutputsOnlyMatchingLinesOfInput(t *testing.T) {
t.Parallel()
input := "This is the first line in the file.\nHello, world.\nThis is another line in the file.\n"
tcs := []struct {
match, want string
}{
{
match: "line",
want: "This is the first line in the file.\nThis is another line in the fi... | explode_data.jsonl/51493 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 289
} | [
2830,
3393,
8331,
61438,
7308,
64430,
16794,
2124,
2505,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
22427,
1669,
330,
1986,
374,
279,
1156,
1555,
304,
279,
1034,
7110,
77,
9707,
11,
1879,
7110,
77,
1986,
374,
2441,
1555,
30... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHandler_listCharts(t *testing.T) {
loggerWriter := logrus.StandardLogger().Out
logrus.SetOutput(ioutil.Discard)
defer logrus.SetOutput(loggerWriter)
tcs := []struct {
svc *fakeService
repoName string
expectedStatus int
expectedCharts []model.ChartInfo
expectedErrCode sgerrors.ErrorCode
... | explode_data.jsonl/12102 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 753
} | [
2830,
3393,
3050,
2019,
64878,
1155,
353,
8840,
836,
8,
341,
17060,
6492,
1669,
1487,
20341,
53615,
7395,
1005,
2662,
198,
90822,
4202,
5097,
1956,
30158,
909,
47560,
340,
16867,
1487,
20341,
4202,
5097,
37833,
6492,
692,
3244,
4837,
1669... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestOCMProvider_GetCloudProviderRegions(t *testing.T) {
type fields struct {
ocmClient ocm.Client
}
type args struct {
providerInfo types.CloudProviderInfo
}
providerId1 := "provider-id-1"
providerName1 := "provider-name-1"
providerDisplayName1 := "provider-display-name-1"
regionId1 := "region-id-1"... | explode_data.jsonl/4843 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1389
} | [
2830,
3393,
7612,
44,
5179,
13614,
16055,
5179,
79284,
1155,
353,
8840,
836,
8,
341,
13158,
5043,
2036,
341,
197,
197,
509,
76,
2959,
297,
6226,
11716,
198,
197,
630,
13158,
2827,
2036,
341,
197,
197,
19979,
1731,
4494,
94492,
5179,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCounterRoundTrip(t *testing.T) {
var (
pb metricpb.TimedMetric
res Metric
)
inputs := []Metric{testMetric1, testMetric2}
for i := 0; i < len(inputs); i++ {
require.NoError(t, inputs[i].ToProto(&pb))
require.NoError(t, res.FromProto(pb))
require.Equal(t, inputs[i], res)
}
} | explode_data.jsonl/75078 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 134
} | [
2830,
3393,
14099,
27497,
56352,
1155,
353,
8840,
836,
8,
341,
2405,
2399,
197,
3223,
65,
220,
18266,
16650,
836,
75485,
54310,
198,
197,
10202,
52458,
198,
197,
340,
22427,
82,
1669,
3056,
54310,
90,
1944,
54310,
16,
11,
1273,
54310,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPad(t *testing.T) {
signal, err := newInput("TestPad", 1, 16)
if err != nil {
t.Fatalf("error setting up test; %s", err)
}
for _, tc := range []struct {
desc string
ok bool
rfErr error // MockReadFile error.
spiValue int // Current SPI value.
isEnabled bool
}{
// Supported s... | explode_data.jsonl/34844 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 466
} | [
2830,
3393,
13731,
1155,
353,
8840,
836,
8,
341,
81319,
11,
1848,
1669,
501,
2505,
445,
2271,
13731,
497,
220,
16,
11,
220,
16,
21,
340,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
841,
6243,
705,
1273,
26,
1018,
82,
497,
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... | 7 |
func TestFetchDepositAddress(t *testing.T) {
t.Parallel()
if !areTestAPIKeysSet() {
t.Skip()
}
_, err := f.FetchDepositAddress(context.Background(), currency.NewCode("tUsD"))
if err != nil {
t.Error(err)
}
} | explode_data.jsonl/15180 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 91
} | [
2830,
3393,
20714,
78982,
4286,
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,
78506,
78982,
4286,
5378,
19047,
1507,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 3 |
func TestDate(t *testing.T) {
GenerateValuesAsYaml(t, "date.test.schema.json",
func(console *tests.ConsoleWrapper, donec chan struct{}) {
defer close(donec)
// Test boolean type
console.ExpectString("Enter a value for dateValue")
console.SendLine("abc")
console.ExpectString("Sorry, your reply was inva... | explode_data.jsonl/61764 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 198
} | [
2830,
3393,
1916,
1155,
353,
8840,
836,
8,
341,
197,
31115,
6227,
2121,
56,
9467,
1155,
11,
330,
1028,
5958,
30892,
4323,
756,
197,
29244,
52818,
353,
23841,
46298,
11542,
11,
2814,
66,
26023,
2036,
28875,
341,
298,
16867,
3265,
34232,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_ELFHash(t *testing.T) {
var x uint32 = 7244206
gtest.C(t, func(t *gtest.T) {
j := ghash.ELFHash(strBasic)
t.Assert(j, x)
})
} | explode_data.jsonl/60236 | {
"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,
2089,
22609,
6370,
1155,
353,
8840,
836,
8,
341,
2405,
856,
2622,
18,
17,
284,
220,
22,
17,
19,
19,
17,
15,
21,
198,
3174,
1944,
727,
1155,
11,
2915,
1155,
353,
82038,
836,
8,
341,
197,
12428,
1669,
342,
8296,
13,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestSourceRefBuildSourceURI(t *testing.T) {
tests := []struct {
name string
input string
expected string
}{
{
name: "URL without hash",
input: "https://github.com/openshift/ruby-hello-world.git",
expected: "https://github.com/openshift/ruby-hello-world.git",
},
{
name: "... | explode_data.jsonl/23742 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 332
} | [
2830,
3393,
3608,
3945,
11066,
3608,
10301,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
22427,
262,
914,
198,
197,
42400,
914,
198,
197,
59403,
197,
197,
515,
298,
11609,
25,
257,
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... | 3 |
func TestDelegationEqual(t *testing.T) {
d1 := NewDelegation(sdk.AccAddress(addr1), addr2, sdk.NewDec(100))
d2 := d1
ok := d1.Equal(d2)
require.True(t, ok)
d2.ValidatorAddress = addr3
d2.Shares = sdk.NewDec(200)
ok = d1.Equal(d2)
require.False(t, ok)
} | explode_data.jsonl/58934 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 126
} | [
2830,
3393,
1912,
87566,
2993,
1155,
353,
8840,
836,
8,
341,
2698,
16,
1669,
1532,
1912,
87566,
1141,
7584,
77538,
4286,
24497,
16,
701,
10789,
17,
11,
45402,
7121,
4900,
7,
16,
15,
15,
1171,
2698,
17,
1669,
294,
16,
271,
59268,
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 TestNewOnlineDDL(t *testing.T) {
migrationContext := "354b-11eb-82cd-f875a4d24e90"
tt := []struct {
sql string
isError bool
}{
{
sql: "drop table t",
},
{
sql: "create table t (id int primary key)",
},
{
sql: "alter table t engine=innodb",
},
{
sql: "revert 4e5dcf80_354b_11eb_8... | explode_data.jsonl/42829 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 918
} | [
2830,
3393,
3564,
19598,
58781,
1155,
353,
8840,
836,
8,
341,
2109,
5033,
1972,
1669,
330,
18,
20,
19,
65,
12,
16,
16,
3065,
12,
23,
17,
4385,
2220,
23,
22,
20,
64,
19,
67,
17,
19,
68,
24,
15,
698,
3244,
83,
1669,
3056,
1235,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func Test_removePath(t *testing.T) {
tests := []struct {
name string
patchMap map[string]interface{}
path contract.Path
want map[string]interface{}
}{
{
name: "Remove value",
patchMap: map[string]interface{}{
"foo": "123",
},
path: contract.Path([]string{"foo"}),
want: map[str... | explode_data.jsonl/29457 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 958
} | [
2830,
3393,
18193,
1820,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
3223,
754,
2227,
2415,
14032,
31344,
16094,
197,
26781,
257,
5116,
17474,
198,
197,
50780,
257,
2415,
14032,
31344,
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... | 1 |
func TestUAccountForcedOrders(t *testing.T) {
t.Parallel()
if !areTestAPIKeysSet() {
t.Skip("skipping test: api keys not set")
}
_, err := b.UAccountForcedOrders(context.Background(), currency.NewPair(currency.BTC, currency.USDT), "ADL", 5, time.Time{}, time.Time{})
if err != nil {
t.Error(err)
}
} | explode_data.jsonl/76591 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 124
} | [
2830,
3393,
52,
7365,
2461,
1998,
24898,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
743,
753,
546,
2271,
7082,
8850,
1649,
368,
341,
197,
3244,
57776,
445,
4886,
5654,
1273,
25,
6330,
6894,
537,
738,
1138,
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... | 3 |
func TestClientReceiveTimeout(t *testing.T) {
s, c := makeTestServer()
c.SetTimeout(time.Second)
c.SetRetries(2)
s.readHandler = func(filename string, rf io.ReaderFrom) error {
r := &slowReader{
r: io.LimitReader(newRandReader(rand.NewSource(42)), 80000),
n: 3,
delay: 8 * time.Second,
}
_, er... | explode_data.jsonl/17561 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 331
} | [
2830,
3393,
2959,
14742,
7636,
1155,
353,
8840,
836,
8,
341,
1903,
11,
272,
1669,
1281,
2271,
5475,
741,
1444,
4202,
7636,
9730,
32435,
340,
1444,
4202,
12020,
4019,
7,
17,
340,
1903,
4125,
3050,
284,
2915,
10961,
914,
11,
36026,
6399... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLegacyQueryIndicators(t *testing.T) {
input := CreateTestInput(t)
querier := NewLegacyQuerier(input.TreasuryKeeper, input.Cdc)
sh := staking.NewHandler(input.StakingKeeper)
stakingAmt := sdk.TokensFromConsensusPower(1, sdk.DefaultPowerReduction)
addr, val := ValAddrs[0], ValPubKeys[0]
addr1, val1 := Val... | explode_data.jsonl/6694 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 587
} | [
2830,
3393,
77415,
2859,
1425,
42052,
1155,
353,
8840,
836,
8,
341,
22427,
1669,
4230,
2271,
2505,
1155,
340,
197,
15959,
1268,
1669,
1532,
77415,
2183,
261,
1268,
5384,
836,
265,
26102,
77233,
11,
1946,
727,
7628,
340,
36196,
1669,
357... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBucketStore_e2e(t *testing.T) {
bkt, cleanup := testutil.NewObjectStoreBucket(t)
defer cleanup()
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
dir, err := ioutil.TempDir("", "test_bucketstore_e2e")
testutil.Ok(t, err)
defer os.RemoveAll(dir)
series := []labels.Labels{
labe... | explode_data.jsonl/39687 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2281
} | [
2830,
3393,
36018,
6093,
2204,
17,
68,
1155,
353,
8840,
836,
8,
341,
2233,
5840,
11,
21290,
1669,
1273,
1314,
7121,
1190,
6093,
36018,
1155,
340,
16867,
21290,
2822,
20985,
11,
9121,
1669,
2266,
26124,
9269,
5378,
19047,
2398,
16867,
91... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTypeSystem_UnionsMustRepresentObjectTypes_RejectsAUnionOfNonObjectTypes(t *testing.T) {
_, err := schemaWithUnionOfType(nil)
expectedError := `BadUnion may only contain Object types, it cannot contain: <nil>.`
if err == nil || err.Error() != expectedError {
t.Fatalf("Expected error: %v, got %v", expectedE... | explode_data.jsonl/79181 | {
"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,
929,
2320,
40687,
908,
31776,
65743,
1190,
4173,
50693,
583,
82,
32,
32658,
2124,
8121,
1190,
4173,
1155,
353,
8840,
836,
8,
341,
197,
6878,
1848,
1669,
10802,
2354,
32658,
34696,
27907,
340,
42400,
1454,
1669,
1565,
17082,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func Test_Parser(t *testing.T) {
parser := NewDefault()
document, err := parser.Parse("test.tf", []byte(have))
require.NoError(t, err)
require.Len(t, document, 1)
require.Contains(t, document[0], "resource")
require.Contains(t, document[0]["resource"], "aws_s3_bucket")
} | explode_data.jsonl/40761 | {
"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,
1088,
10425,
1155,
353,
8840,
836,
8,
341,
55804,
1669,
1532,
3675,
741,
17470,
11,
1848,
1669,
6729,
8937,
445,
1944,
68994,
497,
3056,
3782,
3203,
523,
4390,
17957,
35699,
1155,
11,
1848,
340,
17957,
65819,
1155,
11,
2197,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAnalyzeNextRawErrorNoLeak(t *testing.T) {
store, clean := testkit.CreateMockStore(t)
defer clean()
tk := testkit.NewTestKit(t, store)
tk.MustExec("use test")
tk.MustExec("drop table if exists t1")
tk.MustExec("create table t1(id int, c varchar(32))")
tk.MustExec("set @@session.tidb_analyze_version = 2"... | explode_data.jsonl/38157 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 205
} | [
2830,
3393,
2082,
55856,
5847,
20015,
1454,
2753,
2304,
585,
1155,
353,
8840,
836,
8,
341,
57279,
11,
4240,
1669,
1273,
8226,
7251,
11571,
6093,
1155,
340,
16867,
4240,
2822,
3244,
74,
1669,
1273,
8226,
7121,
2271,
7695,
1155,
11,
3553,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestAdmin_BlockedList(t *testing.T) {
srv, ts := prep(t)
assert.NotNil(t, srv)
defer cleanup(ts)
client := http.Client{}
// block user1
req, err := http.NewRequest(http.MethodPut,
fmt.Sprintf("%s/api/v1/admin/user/%s?site=radio-t&block=%d", ts.URL, "user1", 1), nil)
assert.Nil(t, err)
req.SetBasicAuth(... | explode_data.jsonl/70320 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 439
} | [
2830,
3393,
7210,
1668,
24633,
852,
1155,
353,
8840,
836,
8,
341,
1903,
10553,
11,
10591,
1669,
21327,
1155,
340,
6948,
93882,
1155,
11,
43578,
340,
16867,
21290,
35864,
692,
25291,
1669,
1758,
11716,
31483,
197,
322,
2504,
1196,
16,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestRingBufferCapacity(t *testing.T) {
// prepare
buffer := newRingBuffer(5)
// test
traceIDs := []pdata.TraceID{
{1, 2, 3, 4},
{2, 3, 4, 5},
{3, 4, 5, 6},
{4, 5, 6, 7},
{5, 6, 7, 8},
{6, 7, 8, 9},
}
for _, traceID := range traceIDs {
buffer.put(traceID)
}
// verify
for i := 5; i > 0; i-- ... | explode_data.jsonl/74367 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 230
} | [
2830,
3393,
43466,
4095,
29392,
1155,
353,
8840,
836,
8,
341,
197,
322,
10549,
198,
31122,
1669,
501,
43466,
4095,
7,
20,
692,
197,
322,
1273,
198,
65058,
30466,
1669,
3056,
57796,
46920,
915,
515,
197,
197,
90,
16,
11,
220,
17,
11,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestRemoveImage(t *testing.T) {
dm, err := getDockerManager()
if err != nil {
t.Errorf("test new docker manager failed. %v ", err)
}
newImage := kubecontainer.ImageSpec{"willRemove:latest"}
_, err = dm.PullImage(newImage, []v1.Secret{})
if err != nil {
t.Errorf("TestRemoveImage failed, pull Image(%v) fa... | explode_data.jsonl/24911 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 312
} | [
2830,
3393,
13021,
1906,
1155,
353,
8840,
836,
8,
341,
2698,
76,
11,
1848,
1669,
633,
35,
13659,
2043,
741,
743,
1848,
961,
2092,
341,
197,
3244,
13080,
445,
1944,
501,
26588,
6645,
4641,
13,
1018,
85,
3670,
1848,
340,
197,
630,
863... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestOrderingServicePermanentCrash(t *testing.T) {
testOrderingServicePermanentCrash(t, blockDelivererConsumerWithRecv)
testOrderingServicePermanentCrash(t, blockDelivererConsumerWithSend)
assert.Equal(t, 0, connNumber)
} | explode_data.jsonl/38316 | {
"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,
4431,
287,
1860,
78793,
16001,
988,
1155,
353,
8840,
836,
8,
341,
18185,
4431,
287,
1860,
78793,
16001,
988,
1155,
11,
2504,
16532,
1524,
261,
29968,
2354,
63483,
340,
18185,
4431,
287,
1860,
78793,
16001,
988,
1155,
11,
250... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBytes8_EncodedLength(t *testing.T) {
assertEncodedLength(t, []encodedLengthAssert{
{NewBytes8([8]byte{}), 8},
{NewBytes8([8]byte{7, 6, 5, 4, 3, 2, 1, 0}), 8},
})
} | explode_data.jsonl/70600 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 84
} | [
2830,
3393,
7078,
23,
93529,
6737,
4373,
1155,
353,
8840,
836,
8,
341,
6948,
46795,
4373,
1155,
11,
3056,
19329,
4373,
8534,
515,
197,
197,
90,
3564,
7078,
23,
2561,
23,
90184,
6257,
701,
220,
23,
1583,
197,
197,
90,
3564,
7078,
23,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestRegistry_TLS(t *testing.T) {
ts := httptest.NewTLSServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if r.Method != http.MethodGet || r.URL.Path != "/v2/" {
t.Errorf("unexpected access: %s %s", r.Method, r.URL)
w.WriteHeader(http.StatusNotFound)
return
}
}))
defer ts.Close()... | explode_data.jsonl/82486 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 280
} | [
2830,
3393,
15603,
69067,
1155,
353,
8840,
836,
8,
341,
57441,
1669,
54320,
70334,
7121,
13470,
1220,
2836,
19886,
89164,
18552,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
197,
743,
435,
20798,
961,
1758,
20798,
1949,
1369,
43... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDaoTxUpdateAttrTagRes(t *testing.T) {
var (
tid = int64(0)
oid = int64(0)
tp = int32(0)
attr = int32(0)
)
convey.Convey("TxUpdateAttrTagRes", t, func(ctx convey.C) {
tx, err := d.BeginTran(context.TODO())
if err != nil {
return
}
rowsCount, err := d.TxUpdateAttrTagRes(tx, tid, oid, tp... | explode_data.jsonl/46402 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 250
} | [
2830,
3393,
12197,
31584,
4289,
13371,
5668,
1061,
1155,
353,
8840,
836,
8,
341,
2405,
2399,
197,
3244,
307,
220,
284,
526,
21,
19,
7,
15,
340,
197,
197,
588,
220,
284,
526,
21,
19,
7,
15,
340,
197,
73423,
256,
284,
526,
18,
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 TestCreateHash(t *testing.T) {
var tests = []struct {
input string
expectedOutput string
}{
{"test", "098f6bcd4621d373cade4e832627b4f6"},
{"log", "dc1d71bbb5c4d2a5e936db79ef10c19f"},
{"log", "dc1d71bbb5c4d2a5e936db79ef10c19f"},
}
for _, test := range tests {
if output := createHash(test.in... | explode_data.jsonl/46189 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 211
} | [
2830,
3393,
4021,
6370,
1155,
353,
8840,
836,
8,
341,
2405,
7032,
284,
3056,
1235,
341,
197,
22427,
688,
914,
198,
197,
42400,
5097,
914,
198,
197,
59403,
197,
197,
4913,
1944,
497,
330,
15,
24,
23,
69,
21,
91490,
19,
21,
17,
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 TestRemittanceOriginatorNameAlphaNumeric(t *testing.T) {
ro := mockRemittanceOriginator()
ro.RemittanceData.Name = "®"
err := ro.Validate()
require.EqualError(t, err, fieldError("Name", ErrNonAlphanumeric, ro.RemittanceData.Name).Error())
} | explode_data.jsonl/32921 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 85
} | [
2830,
3393,
6590,
87191,
13298,
850,
675,
19384,
36296,
1155,
353,
8840,
836,
8,
341,
197,
299,
1669,
7860,
6590,
87191,
13298,
850,
741,
197,
299,
11398,
87191,
1043,
2967,
284,
330,
11909,
1837,
9859,
1669,
926,
47667,
2822,
17957,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestRCWithAuth(t *testing.T) {
tests := []testRun{{
Name: "core-command",
URL: "core/command",
Method: "POST",
Body: `command=version`,
ContentType: "application/x-www-form-urlencoded",
Status: http.StatusOK,
Expected: fmt.Sprintf(`{
"error": false,
"result": "rclon... | explode_data.jsonl/12962 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 740
} | [
2830,
3393,
7380,
2354,
5087,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1944,
6727,
90,
515,
197,
21297,
25,
286,
330,
2153,
48419,
756,
197,
79055,
25,
260,
330,
2153,
83205,
756,
197,
84589,
25,
414,
330,
2946,
756,
197,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestGetDimensionsReturnsNotFound(t *testing.T) {
t.Parallel()
Convey("Get dimensions returns not found", t, func() {
r, err := createRequestWithToken("GET", "http://localhost:21800/instances/123/dimensions", nil)
So(err, ShouldBeNil)
w := httptest.NewRecorder()
mockedDataStore, isLocked := storeMockWith... | explode_data.jsonl/20840 | {
"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,
1949,
21351,
16446,
10372,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
93070,
5617,
445,
1949,
15336,
4675,
537,
1730,
497,
259,
11,
2915,
368,
341,
197,
7000,
11,
1848,
1669,
1855,
1900,
2354,
3323,
445,
3806,
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 TestComment(t *testing.T) {
orgMember := "cjwagner"
bot := "k8s-ci-robot"
type testCase struct {
name string
action github.GenericCommentEventAction
body string
expectedMessages map[string][]string
issueLabels []string
repoLabels []string
commenter ... | explode_data.jsonl/52610 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1677
} | [
2830,
3393,
10677,
1155,
353,
8840,
836,
8,
341,
87625,
9366,
1669,
330,
79446,
86,
39438,
698,
2233,
354,
1669,
330,
74,
23,
82,
62384,
12,
18247,
698,
13158,
54452,
2036,
341,
197,
11609,
1797,
914,
198,
197,
38933,
1843,
31004,
434... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInvokeRequest(t *testing.T) {
req := NewInvokeMethodRequest("test_method")
assert.Equal(t, internalv1pb.APIVersion_V1, req.r.GetVer())
assert.Equal(t, "test_method", req.r.Message.GetMethod())
} | explode_data.jsonl/46237 | {
"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,
17604,
1900,
1155,
353,
8840,
836,
8,
341,
24395,
1669,
1532,
17604,
3523,
1900,
445,
1944,
9032,
5130,
6948,
12808,
1155,
11,
5306,
85,
16,
16650,
24922,
5637,
2334,
16,
11,
4232,
1746,
2234,
10141,
2398,
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,
1,
1,
1,
1
] | 1 |
func TestTextDocumentSyncKind_String(t *testing.T) {
tests := []struct {
name string
k TextDocumentSyncKind
want string
}{
{
name: "NoneKind",
k: None,
want: "None",
},
{
name: "FullKind",
k: Full,
want: "Full",
},
{
name: "IncrementalKind",
k: Incremental,
want:... | explode_data.jsonl/10252 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 324
} | [
2830,
3393,
1178,
7524,
12154,
10629,
31777,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
16463,
262,
2918,
7524,
12154,
10629,
198,
197,
50780,
914,
198,
197,
59403,
197,
197,
515,
298,
11609,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCrDoubleResolutionRmTree(t *testing.T) {
test(t,
users("alice", "bob", "charlie"),
as(alice,
write("a/b/c/d/e", "test1"),
write("a/b/c/d/f", "test2"),
),
as(bob,
disableUpdates(),
),
as(charlie,
disableUpdates(),
),
as(alice,
write("g", "hello"),
),
as(bob, noSync(),
// R... | explode_data.jsonl/31370 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 866
} | [
2830,
3393,
16001,
7378,
38106,
49,
76,
6533,
1155,
353,
8840,
836,
8,
341,
18185,
1155,
345,
197,
90896,
445,
63195,
497,
330,
47086,
497,
330,
1762,
11567,
4461,
197,
60451,
17643,
558,
345,
298,
24945,
445,
64,
3470,
2899,
3446,
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 TestRecipientChannelIDNotStartWithAt(t *testing.T) {
testData := []struct {
channel string
expected string
}{
{channel: "channel", expected: "@channel"},
{channel: "@channel", expected: "@channel"},
{channel: "107401628", expected: "107401628"}, // numeric ChanID should be preserved
{channel: "-1001... | explode_data.jsonl/50728 | {
"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,
74432,
9629,
915,
2623,
3479,
2354,
1655,
1155,
353,
8840,
836,
8,
341,
18185,
1043,
1669,
3056,
1235,
341,
197,
71550,
220,
914,
198,
197,
42400,
914,
198,
197,
59403,
197,
197,
90,
10119,
25,
330,
10119,
497,
3601,
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 TestPVCControlUpdateMetaInfoConflictSuccess(t *testing.T) {
g := NewGomegaWithT(t)
tc := newTidbCluster()
pvc := newPVC(tc)
oldPVC := newPVC(tc)
pod := newPod(tc)
fakeClient, pvcLister, pvcIndexer, recorder := newFakeClientAndRecorder()
pvcIndexer.Add(oldPVC)
control := NewRealPVCControl(fakeClient, record... | explode_data.jsonl/66722 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 333
} | [
2830,
3393,
47,
11287,
3273,
4289,
12175,
1731,
57974,
7188,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
1532,
38,
32696,
2354,
51,
1155,
340,
78255,
1669,
501,
51,
307,
65,
28678,
741,
3223,
7362,
1669,
501,
47,
11287,
44415,
340,
6182... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUpdateRemoteUUID(t *testing.T) {
require.NoError(t, os.MkdirAll("data", 0777))
defer os.RemoveAll("data")
s := DefaultServer()
m := memory.Open()
uuid, err := getOrSetUUID("./data", "./data")
require.NoError(t, err)
s.UUID = uuid
err = s.updateRemoteUUID(m)
require.NoError(t, err)
exists, err := ... | explode_data.jsonl/38344 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 265
} | [
2830,
3393,
4289,
24703,
24754,
1155,
353,
8840,
836,
8,
341,
17957,
35699,
1155,
11,
2643,
1321,
12438,
2403,
445,
691,
497,
220,
15,
22,
22,
22,
1171,
16867,
2643,
84427,
445,
691,
5130,
1903,
1669,
7899,
5475,
741,
2109,
1669,
4938... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDeletePanic(t *testing.T) {
store, clean := realtikvtest.CreateMockStoreAndSetup(t)
defer clean()
tk := testkit.NewTestKit(t, store)
tk.MustExec("use test")
tk.MustExec("create table t (c int)")
tk.MustExec("insert into t values (1), (2), (3)")
tk.MustExec("delete from `t` where `c` = ?", 1)
tk.MustEx... | explode_data.jsonl/5772 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 145
} | [
2830,
3393,
6435,
47,
31270,
1155,
353,
8840,
836,
8,
341,
57279,
11,
4240,
1669,
1931,
83,
1579,
85,
1944,
7251,
11571,
6093,
3036,
21821,
1155,
340,
16867,
4240,
2822,
3244,
74,
1669,
1273,
8226,
7121,
2271,
7695,
1155,
11,
3553,
34... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestExpiration(t *testing.T) {
expirationDate := time.Now().Add(time.Minute)
id1 := &pmsp.SerializedIdentity{
Mspid: "X509BasedMSP",
IdBytes: []byte("X509BasedIdentity"),
}
x509IdentityBytes, _ := proto.Marshal(id1)
id2 := &pmsp.SerializedIdentity{
Mspid: "nonX509BasedMSP",
IdBytes: []byte("nonX... | explode_data.jsonl/20528 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 782
} | [
2830,
3393,
66301,
1155,
353,
8840,
836,
8,
341,
48558,
19629,
1916,
1669,
882,
13244,
1005,
2212,
9730,
75770,
340,
15710,
16,
1669,
609,
79,
92545,
13412,
1506,
18558,
515,
197,
9209,
2154,
307,
25,
256,
330,
55,
20,
15,
24,
28715,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTokenResponseMap(t *testing.T) {
r := NewTokenResponse("foo", "bar", 1)
r.RefreshToken = "baz"
r.Scope = Scope{"qux"}
r.State = "quuz"
assert.Equal(t, map[string]string{
"token_type": "foo",
"access_token": "bar",
"expires_in": "1",
"refresh_token": "baz",
"scope": "qux",
"stat... | explode_data.jsonl/1727 | {
"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,
3323,
2582,
2227,
1155,
353,
8840,
836,
8,
341,
7000,
1669,
1532,
3323,
2582,
445,
7975,
497,
330,
2257,
497,
220,
16,
340,
7000,
49841,
3323,
284,
330,
42573,
698,
7000,
77940,
284,
34920,
4913,
446,
87,
16707,
7000,
1894... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBytes_EncodeDecode(t *testing.T) {
assertRoundtrip(t, NewBytes(MustHexDecodeString("0x00")))
assertRoundtrip(t, NewBytes(MustHexDecodeString("0xab1234")))
assertRoundtrip(t, NewBytes(MustHexDecodeString("0x0001")))
} | explode_data.jsonl/70592 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 89
} | [
2830,
3393,
7078,
93529,
534,
32564,
1155,
353,
8840,
836,
8,
341,
6948,
27497,
32981,
1155,
11,
1532,
7078,
3189,
590,
20335,
32564,
703,
445,
15,
87,
15,
15,
29836,
6948,
27497,
32981,
1155,
11,
1532,
7078,
3189,
590,
20335,
32564,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMempoolProgressInHigherRound(t *testing.T) {
config := ResetConfig("consensus_mempool_txs_available_test")
defer os.RemoveAll(config.RootDir)
config.Consensus.CreateEmptyBlocks = false
state, privVals := randGenesisState(1, false, 10)
cs := newStateWithConfig(config, state, privVals[0], NewCounterApplicat... | explode_data.jsonl/23670 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 565
} | [
2830,
3393,
44,
3262,
1749,
9496,
641,
87445,
27497,
1155,
353,
8840,
836,
8,
341,
25873,
1669,
16932,
2648,
445,
6254,
13626,
717,
3262,
1749,
17805,
82,
26962,
4452,
1138,
16867,
2643,
84427,
8754,
45345,
6184,
340,
25873,
94594,
13626,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func Test_Middleware_BasicAuth(t *testing.T) {
t.Parallel()
app := fiber.New()
app.Use(New(Config{
Users: map[string]string{
"john": "doe",
"admin": "123456",
},
}))
app.Get("/testauth", func(c *fiber.Ctx) error {
username := c.Locals("username").(string)
password := c.Locals("password").(string)
... | explode_data.jsonl/8244 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 618
} | [
2830,
3393,
1245,
11603,
1668,
5971,
5087,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
28236,
1669,
23788,
7121,
2822,
28236,
9046,
35063,
33687,
515,
197,
197,
7137,
25,
2415,
14032,
30953,
515,
298,
197,
1,
47817,
788,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestSupportedTimezones(t *testing.T) {
th := Setup().InitBasic()
defer th.TearDown()
Client := th.Client
supportedTimezonesFromConfig := th.App.Timezones()
supportedTimezones, resp := Client.GetSupportedTimezone()
CheckNoError(t, resp)
assert.Equal(t, supportedTimezonesFromConfig, supportedTimezones)
} | explode_data.jsonl/10693 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 106
} | [
2830,
3393,
34636,
1462,
67534,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1005,
3803,
15944,
741,
16867,
270,
836,
682,
4454,
741,
71724,
1669,
270,
11716,
271,
1903,
12513,
1462,
67534,
3830,
2648,
1669,
270,
5105,
16299,
67534,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCommandLine_LoginLogout(t *testing.T) {
options := server.Options{}.WithAuth(true).WithInMemoryStore(true).WithAdminPassword(auth.SysAdminPassword)
bs := servertest.NewBufconnServer(options)
bs.Start()
cl := commandline{}
cmd, _ := cl.NewCmd()
dialOptions := []grpc.DialOption{
grpc.WithContextDialer(b... | explode_data.jsonl/54119 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 858
} | [
2830,
3393,
71885,
79232,
27958,
1155,
353,
8840,
836,
8,
341,
35500,
1669,
3538,
22179,
46391,
2354,
5087,
3715,
568,
2354,
641,
10642,
6093,
3715,
568,
2354,
7210,
4876,
27435,
59418,
7210,
4876,
340,
93801,
1669,
1420,
1621,
477,
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... | 3 |
func TestShouldNotFindSliceDifferencesDelta(t *testing.T) {
before := []string{"abc", "onetwothree"}
after := []string{"abc", "onetwothree"}
added, removed := StringSlicesDelta(before, after)
require.Len(t, added, 0)
require.Len(t, removed, 0)
} | explode_data.jsonl/45964 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 90
} | [
2830,
3393,
14996,
2623,
9885,
33236,
35,
58326,
20277,
1155,
353,
8840,
836,
8,
341,
63234,
1669,
3056,
917,
4913,
13683,
497,
330,
68686,
1126,
27856,
16707,
197,
10694,
1669,
3056,
917,
4913,
13683,
497,
330,
68686,
1126,
27856,
63159,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestListCommandRunEClosure(t *testing.T) {
assert := assert.New(t)
cli := test.NewCLI()
client := cli.Client.(*client.MockClient)
resources := []corev2.User{}
client.On("List", mock.Anything, &resources, mock.Anything, mock.Anything).Return(nil).Run(
func(args mock.Arguments) {
resources := args[1].(*[]... | explode_data.jsonl/11553 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 239
} | [
2830,
3393,
852,
4062,
6727,
7498,
11653,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
86448,
1669,
1273,
7121,
63959,
741,
25291,
1669,
21348,
11716,
41399,
2972,
24664,
2959,
340,
10202,
2360,
1669,
3056,
98645,
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 TestWebhookHandler2(t *testing.T) {
g := gomega.NewGomegaWithT(t)
mgr, err := manager.New(cfg, manager.Options{MetricsBindAddress: "0"})
g.Expect(err).NotTo(gomega.HaveOccurred())
c = mgr.GetClient()
stopMgr, mgrStopped := StartTestManager(mgr, g)
defer func() {
close(stopMgr)
mgrStopped.Wait()
}()
... | explode_data.jsonl/59424 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 670
} | [
2830,
3393,
5981,
20873,
3050,
17,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
342,
32696,
7121,
38,
32696,
2354,
51,
1155,
692,
2109,
901,
11,
1848,
1669,
6645,
7121,
28272,
11,
6645,
22179,
90,
27328,
9950,
4286,
25,
330,
15,
23625,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestParseHexColor(t *testing.T) {
colorTestCases := []struct {
test string
valid bool // If valid format
R byte
G byte
B byte
}{
{"#123", false, 0, 0, 0},
{"#1234567", false, 0, 0, 0},
{"$123456", false, 0, 0, 0},
{"#12345+", false, 0, 0, 0},
{"#fFGG00", false, 0, 0, 0},
{"", f... | explode_data.jsonl/15899 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 430
} | [
2830,
3393,
14463,
20335,
1636,
1155,
353,
8840,
836,
8,
341,
21481,
2271,
37302,
1669,
3056,
1235,
341,
197,
18185,
220,
914,
198,
197,
56322,
1807,
442,
1416,
2697,
3561,
198,
197,
11143,
257,
4922,
198,
197,
9600,
257,
4922,
198,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 9 |
func TestJSONLoadConfig(t *testing.T) {
factories, err := componenttest.NopFactories()
assert.Nil(t, err)
factory := NewFactory()
factories.Exporters[config.Type(typeStr)] = factory
cfg, err := servicetest.LoadConfig(filepath.Join("testdata", "config.yaml"), factories)
require.NoError(t, err)
require.NotNil(t,... | explode_data.jsonl/73121 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 627
} | [
2830,
3393,
5370,
5879,
2648,
1155,
353,
8840,
836,
8,
341,
1166,
52893,
11,
1848,
1669,
3692,
1944,
2067,
453,
17417,
2433,
741,
6948,
59678,
1155,
11,
1848,
692,
1166,
2919,
1669,
1532,
4153,
741,
1166,
52893,
81077,
388,
58,
1676,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTranscodingMOV(t *testing.T) {
var inputPath = "/tmp/ffmpeg/mov"
var outputPath = "/tmp/ffmpeg/out/mov.mp4"
trans := new(transcoder.Transcoder)
err := trans.Initialize(inputPath, outputPath)
assert.Nil(t, err)
done := trans.Run(false)
err = <-done
assert.Nil(t, err)
} | explode_data.jsonl/57661 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 119
} | [
2830,
3393,
3167,
48367,
66022,
1155,
353,
8840,
836,
8,
1476,
2405,
1946,
1820,
284,
3521,
5173,
14,
72422,
3183,
859,
698,
2405,
95017,
284,
3521,
5173,
14,
72422,
48316,
3183,
859,
16870,
19,
1837,
72453,
1669,
501,
33089,
40170,
118... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCACaps(t *testing.T) {
server, _, teardown := newServer(t)
defer teardown()
url := server.URL + "/scep?operation=GetCACaps"
resp, err := http.Get(url)
if err != nil {
t.Fatal(err)
}
if resp.StatusCode != http.StatusOK {
t.Error("expected", http.StatusOK, "got", resp.StatusCode)
}
} | explode_data.jsonl/70653 | {
"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,
92832,
2625,
1155,
353,
8840,
836,
8,
341,
41057,
11,
8358,
49304,
1669,
501,
5475,
1155,
340,
16867,
49304,
741,
19320,
1669,
3538,
20893,
488,
3521,
82,
31652,
30,
9262,
28,
1949,
92832,
2625,
698,
34653,
11,
1848,
1669,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestChangeTokenOwnerHandler(t *testing.T) {
var (
aliceCond = weavetest.NewCondition()
bobbyCond = weavetest.NewCondition()
)
cases := map[string]struct {
Tx weave.Tx
Auth x.Authenticator
WantCheckErr *errors.Error
WantDeliverErr *errors.Error
}{
"success": {
Tx: &weav... | explode_data.jsonl/1791 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1100
} | [
2830,
3393,
4072,
3323,
13801,
3050,
1155,
353,
8840,
836,
8,
341,
2405,
2399,
197,
197,
63195,
49696,
284,
582,
402,
57824,
7121,
10547,
741,
197,
2233,
10317,
49696,
284,
582,
402,
57824,
7121,
10547,
741,
197,
692,
1444,
2264,
1669,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestGenerateName(t *testing.T) {
cookieName := GenerateName("containous")
assert.Len(t, "_8a7bc", 6)
assert.Equal(t, "_8a7bc", cookieName)
} | explode_data.jsonl/58889 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 62
} | [
2830,
3393,
31115,
675,
1155,
353,
8840,
836,
8,
341,
197,
16236,
675,
1669,
19813,
675,
445,
52095,
782,
5130,
6948,
65819,
1155,
11,
9000,
23,
64,
22,
8904,
497,
220,
21,
340,
6948,
12808,
1155,
11,
9000,
23,
64,
22,
8904,
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 |
func TestPlaceMultipleSpotOrdersOverPairLimits(t *testing.T) {
ord := okgroup.PlaceOrderRequest{
InstrumentID: spotCurrency,
Type: order.Limit.Lower(),
Side: order.Buy.Lower(),
Size: "-100",
Price: "1",
}
request := []okgroup.PlaceOrderRequest{
ord,
}
pairs := currency.... | explode_data.jsonl/30159 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 330
} | [
2830,
3393,
17371,
32089,
47049,
24898,
1918,
12443,
94588,
1155,
353,
8840,
836,
8,
341,
197,
539,
1669,
5394,
4074,
86675,
4431,
1900,
515,
197,
197,
56324,
915,
25,
7702,
26321,
345,
197,
27725,
25,
260,
1973,
1214,
2353,
1214,
1202,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStatResponse(t *testing.T) {
res := &StatResponse{
CanLongPoll: true,
}
enc, err := json.MarshalIndent(res, " ", "")
if err != nil {
t.Fatal(err)
}
if got := string(enc); !strings.Contains(got, `"stat": []`) {
t.Errorf("Wanted stat to have value []; got %s", got)
}
} | explode_data.jsonl/16530 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 123
} | [
2830,
3393,
15878,
2582,
1155,
353,
8840,
836,
8,
341,
10202,
1669,
609,
15878,
2582,
515,
197,
6258,
276,
6583,
49207,
25,
830,
345,
197,
532,
197,
954,
11,
1848,
1669,
2951,
37271,
42729,
4590,
11,
330,
220,
3670,
14676,
743,
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... | 3 |
func TestConsulRunnerRunBadUpdaterFlags(t *testing.T) {
ctrl := gomock.NewController(assert.Tracing(t))
defer ctrl.Finish()
mockUpdaterFromFlags := rotor.NewMockUpdaterFromFlags(ctrl)
mockUpdaterFromFlags.EXPECT().Validate().Return(errors.New("bad updater flags"))
cmd := Cmd(mockUpdaterFromFlags)
cmd.Flags.Pars... | explode_data.jsonl/71905 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 190
} | [
2830,
3393,
15220,
360,
19486,
6727,
17082,
79854,
9195,
1155,
353,
8840,
836,
8,
341,
84381,
1669,
342,
316,
1176,
7121,
2051,
75846,
8240,
4527,
1155,
1171,
16867,
23743,
991,
18176,
2822,
77333,
79854,
3830,
9195,
1669,
62025,
7121,
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 TestLessWriter(t *testing.T) {
var builder strings.Builder
w := newLessWriter(&builder, 500)
for i := 0; i < 100; i++ {
_, err := w.Write([]byte("hello"))
assert.Nil(t, err)
}
assert.Equal(t, "hello", builder.String())
} | explode_data.jsonl/59124 | {
"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,
27451,
6492,
1155,
353,
8840,
836,
8,
341,
2405,
7363,
9069,
15641,
198,
6692,
1669,
501,
27451,
6492,
2099,
17850,
11,
220,
20,
15,
15,
340,
2023,
600,
1669,
220,
15,
26,
600,
366,
220,
16,
15,
15,
26,
600,
1027,
341,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestServerRemoteAddr(t *testing.T) {
s := &Server{
Handler: func(ctx *RequestCtx) {
h := &ctx.Request.Header
ctx.Success("text/html", []byte(fmt.Sprintf("requestURI=%s, remoteAddr=%s, remoteIP=%s",
h.RequestURI(), ctx.RemoteAddr(), ctx.RemoteIP())))
},
}
rw := &readWriter{}
rw.r.WriteString("GET... | explode_data.jsonl/73310 | {
"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,
5475,
24703,
13986,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
609,
5475,
515,
197,
197,
3050,
25,
2915,
7502,
353,
1900,
23684,
8,
341,
298,
9598,
1669,
609,
3773,
9659,
15753,
198,
298,
20985,
33320,
445,
1318,
13739,
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... | 1 |
func TestNilRemoteDriver(t *testing.T) {
_, err := controller.NewNetwork("framerelay", "dummy",
libnetwork.NetworkOptionGeneric(getEmptyGenericOption()))
if err == nil {
t.Fatal("Expected to fail. But instead succeeded")
}
if _, ok := err.(types.NotFoundError); !ok {
t.Fatalf("Did not fail with expected erro... | explode_data.jsonl/6352 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 122
} | [
2830,
3393,
19064,
24703,
11349,
1155,
353,
8840,
836,
8,
341,
197,
6878,
1848,
1669,
6461,
7121,
12320,
445,
1626,
15232,
6895,
497,
330,
31390,
756,
197,
93459,
17511,
30149,
5341,
19964,
5433,
3522,
19964,
5341,
12145,
743,
1848,
621,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestApplicationContext_NestedBean(t *testing.T) {
c := gs.New()
c.Object(new(MyGrouper)).Export((*Grouper)(nil))
c.Object(new(ProxyGrouper))
err := c.Refresh()
assert.Nil(t, err)
} | explode_data.jsonl/17400 | {
"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,
19736,
1604,
9980,
10437,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
28081,
7121,
741,
1444,
8348,
1755,
37485,
38,
581,
712,
4579,
16894,
26609,
38,
581,
712,
2376,
8385,
1171,
1444,
8348,
1755,
7,
16219,
38,
581,
712,
117... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.