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 TestJetStream_ClusterPlacement(t *testing.T) {
size := 3
t.Run("default cluster", func(t *testing.T) {
cluster := "PLC1"
withJSCluster(t, cluster, size, func(t *testing.T, nodes ...*jsServer) {
srvA := nodes[0]
nc, err := nats.Connect(srvA.ClientURL())
if err != nil {
t.Error(err)
}
defer... | explode_data.jsonl/29181 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 956
} | [
2830,
3393,
35641,
3027,
85110,
4993,
28237,
1155,
353,
8840,
836,
8,
341,
13832,
1669,
220,
18,
271,
3244,
16708,
445,
2258,
10652,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
197,
18855,
1669,
330,
2916,
34,
16,
698,
197,
46948,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreate_SeedError(t *testing.T) {
cfg := &testConfigSeedError{}
got, err := New(cfg).Create()
assert.NoError(t, err)
assert.NotNil(t, got)
ctx, cnl := context.WithCancel(context.Background())
defer cnl()
err = got.Harvest(ctx)
assert.Error(t, err)
} | explode_data.jsonl/47207 | {
"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,
4021,
1098,
12051,
1454,
1155,
353,
8840,
836,
8,
341,
50286,
1669,
609,
1944,
2648,
41471,
1454,
16094,
3174,
354,
11,
1848,
1669,
1532,
28272,
568,
4021,
741,
6948,
35699,
1155,
11,
1848,
340,
6948,
93882,
1155,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestSearch__fedwireNameOnlySearchRequest(t *testing.T) {
u, _ := url.Parse("https://moov.io/fed/wire/search?name=MIDWest")
req := readFEDSearchRequest(u)
if req.Name != "MIDWEST" {
t.Errorf("req.Name=%s", req.Name)
}
if !req.nameOnly() {
t.Error("req is not name only")
}
} | explode_data.jsonl/71097 | {
"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,
5890,
563,
51123,
35531,
675,
7308,
5890,
1900,
1155,
353,
8840,
836,
8,
341,
10676,
11,
716,
1669,
2515,
8937,
445,
2428,
1110,
6355,
859,
4245,
6663,
291,
6324,
554,
23167,
30,
606,
49682,
915,
23306,
1138,
24395,
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 TestWriter_Write(t *testing.T) {
for _, v := range writerWriteTests {
w := new(bytes.Buffer)
e, err := NewWriter(w, v.LineBreak, v.Encoding)
if err != nil {
if v.Error == "" {
t.Errorf("%s: unexpected error %q", v.Name, err.Error())
} else if v.Error != err.Error() {
t.Errorf("%s: error %q, w... | explode_data.jsonl/50133 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 306
} | [
2830,
3393,
6492,
31825,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
348,
1669,
2088,
6916,
7985,
18200,
341,
197,
6692,
1669,
501,
23158,
22622,
692,
197,
7727,
11,
1848,
1669,
1532,
6492,
3622,
11,
348,
16420,
22524,
11,
348,
58764,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 7 |
func TestSetTerminalReason(t *testing.T) {
expectedTerminalReason := "Failed to provision resource"
overrideTerminalReason := "should not override terminal reason"
task := &Task{}
// set terminal reason string
task.SetTerminalReason(expectedTerminalReason)
assert.Equal(t, expectedTerminalReason, task.GetTermin... | explode_data.jsonl/37233 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 144
} | [
2830,
3393,
1649,
47890,
25139,
1155,
353,
8840,
836,
8,
1476,
42400,
47890,
25139,
1669,
330,
9408,
311,
17136,
5101,
698,
50284,
47890,
25139,
1669,
330,
5445,
537,
2812,
15022,
2874,
1837,
49115,
1669,
609,
6262,
31483,
197,
322,
738,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReconcileInterfaceDoesntExist(t *testing.T) {
fcmd := exec.FakeCmd{
CombinedOutputScript: []exec.FakeCombinedOutputAction{
func() ([]byte, error) { return []byte("\n"), nil },
func() ([]byte, error) { return []byte("\n"), nil },
},
}
fexec := exec.FakeExec{
CommandScript: []exec.FakeCommandActi... | explode_data.jsonl/5412 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 671
} | [
2830,
3393,
693,
40446,
457,
5051,
21468,
406,
25613,
1155,
353,
8840,
836,
8,
341,
1166,
8710,
1669,
3883,
991,
726,
15613,
515,
197,
197,
94268,
5097,
5910,
25,
3056,
11748,
991,
726,
94268,
5097,
2512,
515,
298,
29244,
368,
34923,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_RedisEnterprise_Spec_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) {
t.Parallel()
parameters := gopter.DefaultTestParameters()
parameters.MaxSize = 10
properties := gopter.NewProperties(parameters)
properties.Property(
"Round trip of RedisEnterprise_Spec via JSON returns original",
prop.ForA... | explode_data.jsonl/44557 | {
"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,
2568,
41825,
85647,
1098,
992,
62,
4498,
77521,
78967,
98054,
2848,
4756,
2121,
2993,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
67543,
1669,
728,
73137,
13275,
2271,
9706,
741,
67543,
14535,
1695,
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,
1... | 1 |
func TestHyphenAsPositional(t *testing.T) {
var args struct {
Foo string `arg:"positional"`
}
err := parse("-", &args)
require.NoError(t, err)
assert.Equal(t, "-", args.Foo)
} | explode_data.jsonl/13068 | {
"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,
30816,
14769,
2121,
3812,
278,
1155,
353,
8840,
836,
8,
341,
2405,
2827,
2036,
341,
197,
12727,
2624,
914,
1565,
858,
2974,
966,
3005,
8805,
197,
532,
9859,
1669,
4715,
68046,
609,
2116,
340,
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 |
func TestLoggingServiceV2DeleteLogError(t *testing.T) {
errCode := codes.Internal
mockLogging.err = grpc.Errorf(errCode, "test error")
var formattedLogName string = LoggingLogPath("[PROJECT]", "[LOG]")
var request = &loggingpb.DeleteLogRequest{
LogName: formattedLogName,
}
c, err := NewClient(context.Backgrou... | explode_data.jsonl/77758 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 193
} | [
2830,
3393,
34575,
1860,
53,
17,
6435,
2201,
1454,
1155,
353,
8840,
836,
8,
341,
9859,
2078,
1669,
13912,
32579,
198,
77333,
34575,
18441,
284,
47900,
13080,
3964,
2078,
11,
330,
1944,
1465,
5130,
2405,
23126,
2201,
675,
914,
284,
41706... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMemberAdd(t *testing.T) {
h := newHelper(t)
helpers.AllowMe(h, types.RoleRbacResource(0), "members.manage")
r := h.repoMakeRole(h.randEmail())
u := h.createUserWithEmail(h.randEmail())
h.apiInit().
Post(fmt.Sprintf("/roles/%d/member/%d", r.ID, u.ID)).
Expect(t).
Status(http.StatusOK).
Assert(hel... | explode_data.jsonl/8350 | {
"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,
9366,
2212,
1155,
353,
8840,
836,
8,
341,
9598,
1669,
501,
5511,
1155,
340,
197,
21723,
29081,
7823,
3203,
11,
4494,
35955,
49,
55877,
4783,
7,
15,
701,
330,
22974,
50821,
5130,
7000,
1669,
305,
46169,
8078,
9030,
3203,
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 TestCatalogError_Http(t *testing.T) {
tc := testutils.Setup(t)
testutils.LoadFixtures(t, tc.FixturePath())
// User with catalog:refresh scope
agent, token, err := tc.AgentWithScopes("agent-001", "catalog:refresh")
assert.Equal(t, agent.AgentName, "agent-001")
assert.NoError(t, err)
CatalogErrorChecker(tc)... | explode_data.jsonl/73431 | {
"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,
41606,
1454,
2039,
1209,
1155,
353,
8840,
836,
8,
341,
78255,
1669,
1273,
6031,
39820,
1155,
340,
18185,
6031,
13969,
25958,
18513,
1155,
11,
17130,
991,
12735,
1820,
12367,
197,
322,
2657,
448,
16403,
25,
17168,
6891,
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 TestPageHelper2(t *testing.T) {
pFac := New(gobatis.NewFactory(
gobatis.SetMaxConn(100),
gobatis.SetMaxIdleConn(50),
gobatis.SetDataSource(&datasource.MysqlDataSource{
Host: "localhost",
Port: 3306,
DBName: "test",
Username: "test",
Password: "test",
Charset: "utf8",
})))
ses... | explode_data.jsonl/64343 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 256
} | [
2830,
3393,
2665,
5511,
17,
1155,
353,
8840,
836,
8,
341,
3223,
28702,
1669,
1532,
3268,
674,
3605,
7121,
4153,
1006,
197,
3174,
674,
3605,
4202,
5974,
9701,
7,
16,
15,
15,
1326,
197,
3174,
674,
3605,
4202,
5974,
41370,
9701,
7,
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... | 1 |
func TestNewContext(t *testing.T) {
New([]config.Client{
{
Serial: "12FF9503829A3A0DDE9CB87191A472D4",
Scopes: []string{"READ", "WRITE"},
},
})
c := new(big.Int)
c.SetString("12FF9503829A3A0DDE9CB87191A472D4", 16)
ctx1 := NewContext(context.Background(), c)
if _, ok := FromContext(ctx1); !ok {
t.Fatal... | explode_data.jsonl/65814 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 210
} | [
2830,
3393,
3564,
1972,
1155,
353,
8840,
836,
8,
341,
197,
3564,
10556,
1676,
11716,
515,
197,
197,
515,
298,
93658,
25,
330,
16,
17,
1748,
24,
20,
15,
18,
23,
17,
24,
32,
18,
32,
15,
35,
1150,
24,
12979,
23,
22,
16,
24,
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 TestInstallation(t *testing.T) {
logf.SetLogger(zap.New(zap.WriteTo(GinkgoWriter), zap.UseDevMode(true), zap.Level(uzap.NewAtomicLevelAt(uzap.DebugLevel))))
RegisterFailHandler(Fail)
junitReporter := reporters.NewJUnitReporter("../../../report/installation_controller_suite.xml")
RunSpecsWithDefaultAndCustomRep... | explode_data.jsonl/51707 | {
"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,
55453,
1155,
353,
8840,
836,
8,
341,
6725,
69,
4202,
7395,
13174,
391,
7121,
13174,
391,
4073,
1249,
6699,
766,
3346,
6492,
701,
32978,
9046,
14592,
3636,
3715,
701,
32978,
25259,
7,
5197,
391,
7121,
65857,
4449,
1655,
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... | 1 |
func TestUCompositeIndexInfo(t *testing.T) {
t.Parallel()
cp, err := currency.NewPairFromString("DEFI-USDT")
if err != nil {
t.Error(err)
}
_, err = b.UCompositeIndexInfo(context.Background(), cp)
if err != nil {
t.Error(err)
}
_, err = b.UCompositeIndexInfo(context.Background(), currency.EMPTYPAIR)
if err... | explode_data.jsonl/76569 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 149
} | [
2830,
3393,
52,
41685,
1552,
1731,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
52018,
11,
1848,
1669,
11413,
7121,
12443,
44491,
445,
13649,
40,
32340,
10599,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
6141,
3964,
340,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestCheckRetryClosesBody(t *testing.T) {
count := 0
ch := make(chan struct{})
testServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
count++
t.Logf("attempt %d", count)
if count >= 5 {
w.WriteHeader(http.StatusOK)
close(ch)
return
}
w.Header().Set("... | explode_data.jsonl/13272 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 461
} | [
2830,
3393,
3973,
51560,
34,
49341,
5444,
1155,
353,
8840,
836,
8,
341,
18032,
1669,
220,
15,
198,
23049,
1669,
1281,
35190,
2036,
37790,
18185,
5475,
1669,
54320,
70334,
7121,
5475,
19886,
89164,
18552,
3622,
1758,
37508,
11,
4232,
353,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestEditHistoryRenameParentAcrossDirs(t *testing.T) {
// Bob writes one file, and alice renames the parent dir into a
// different subdirectory.
expectedEdits := []expectedEdit{
{
"alice,bob",
keybase1.FolderType_PRIVATE,
"bob",
[]string{"/keybase/private/alice,bob/d/c/b"},
nil,
},
}
expec... | explode_data.jsonl/54762 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 475
} | [
2830,
3393,
4036,
13424,
88757,
8387,
91931,
97384,
1155,
353,
8840,
836,
8,
341,
197,
322,
14261,
13914,
825,
1034,
11,
323,
70433,
5672,
971,
279,
2681,
5419,
1119,
264,
198,
197,
322,
2155,
1186,
23037,
624,
42400,
2715,
1199,
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 TestConsulDiscovery_Register(t *testing.T) {
t.Parallel()
c, s := testConsulServer(t)
defer closecs(s)
d := testNewConsulDiscovery(c)
type args struct {
rs RegisterService
}
tests := []struct {
name string
args args
panic bool
}{
{
name: "Register a service",
args: args{
rs: Convert... | explode_data.jsonl/69056 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 750
} | [
2830,
3393,
15220,
360,
67400,
73124,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
1444,
11,
274,
1669,
1273,
15220,
360,
5475,
1155,
340,
16867,
3265,
4837,
1141,
340,
2698,
1669,
1273,
3564,
15220,
360,
67400,
1337,
692,
131... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestFilePoolCloseError(t *testing.T) {
dir, err := ioutil.TempDir("", "fastzip-filepool")
require.NoError(t, err)
defer os.RemoveAll(dir)
fp, err := New(dir, 16, -1)
require.NoError(t, err)
for _, file := range fp.files {
f := fp.Get()
_, err := f.Write([]byte("foobar"))
assert.NoError(t, err)
fp.P... | explode_data.jsonl/60248 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 266
} | [
2830,
3393,
1703,
10551,
7925,
1454,
1155,
353,
8840,
836,
8,
341,
48532,
11,
1848,
1669,
43144,
65009,
6184,
19814,
330,
9349,
9964,
14203,
10285,
1138,
17957,
35699,
1155,
11,
1848,
340,
16867,
2643,
84427,
14161,
692,
65219,
11,
1848,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestLoadBalanceWorksWithServiceRemoval(t *testing.T) {
loadBalancer := NewLoadBalancerRR()
fooServiceP := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testnamespace", Name: "foo"}, Port: "p"}
barServiceP := proxy.ServicePortName{NamespacedName: types.NamespacedName{Namespace: "testname... | explode_data.jsonl/66178 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1013
} | [
2830,
3393,
5879,
21190,
6776,
16056,
1860,
6590,
13516,
1155,
353,
8840,
836,
8,
341,
49386,
93825,
1669,
1532,
5879,
93825,
8106,
741,
197,
7975,
1860,
47,
1669,
13291,
13860,
7084,
675,
90,
7980,
68552,
675,
25,
4494,
98932,
68552,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestRouter_StaticFiles_ServerStaticFileFromDir(t *testing.T) {
mainRouter := Router{}
_ = mainRouter.StaticFiles("/path1", "./fixtures")
req, _ := http.NewRequest("GET", "/path1/test.html", nil)
res := httptest.NewRecorder()
mainRouter.ServeHTTP(res, req)
assertEqual(t, 200, res.Code)
file, _ := ioutil.Re... | explode_data.jsonl/31742 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 298
} | [
2830,
3393,
9523,
27049,
10809,
62320,
11690,
1703,
3830,
6184,
1155,
353,
8840,
836,
8,
341,
36641,
9523,
1669,
10554,
31483,
197,
62,
284,
1887,
9523,
58826,
10809,
4283,
2343,
16,
497,
5924,
45247,
5130,
24395,
11,
716,
1669,
1758,
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... | 2 |
func TestFilter_SingleMatchingProcess_SingleOHIRecipe(t *testing.T) {
r := []types.OpenInstallationRecipe{
{
ID: "1",
Name: "cassandra-open-source-integration",
ProcessMatch: []string{"cassandra", "cassandradaemon", "cqlsh"},
},
}
processes := []types.GenericProcess{
mockProcess{
... | explode_data.jsonl/15737 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2241
} | [
2830,
3393,
5632,
1098,
2173,
64430,
7423,
1098,
2173,
46,
23913,
28780,
1155,
353,
8840,
836,
8,
341,
7000,
1669,
3056,
9242,
12953,
55453,
28780,
515,
197,
197,
515,
298,
29580,
25,
1843,
330,
16,
756,
298,
21297,
25,
260,
330,
66,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestSample2(t *testing.T) {
L, H := 3, 5
S := "baaaababababbababbab"
a, b := 6, 3
runSample(t, L, H, S, a, b)
} | explode_data.jsonl/74393 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 64
} | [
2830,
3393,
17571,
17,
1155,
353,
8840,
836,
8,
341,
15070,
11,
472,
1669,
220,
18,
11,
220,
20,
198,
7568,
1669,
330,
4645,
5305,
370,
370,
370,
12523,
370,
12523,
370,
698,
11323,
11,
293,
1669,
220,
21,
11,
220,
18,
198,
56742,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestComplexDeleteWithoutAllPrimarykeys(t *testing.T) {
ranInt := rand.Intn(writerComplexDeletePkTestData.InsertCount)
w := newWriter()
c, err := NewClient(WithURI(fmt.Sprintf("postgres://127.0.0.1:5432/%s?sslmode=disable", writerComplexDeletePkTestData.DB)))
if err != nil {
t.Fatalf("unable to initialize con... | explode_data.jsonl/32015 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 383
} | [
2830,
3393,
31137,
6435,
26040,
2403,
15972,
10563,
1155,
353,
8840,
836,
8,
341,
197,
6576,
1072,
1669,
10382,
7371,
77,
38356,
31137,
6435,
58415,
83920,
23142,
2507,
340,
6692,
1669,
501,
6492,
741,
1444,
11,
1848,
1669,
1532,
2959,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRollingUpdater_extractMaxValue(t *testing.T) {
tests := []struct {
field intstr.IntOrString
original int
expected int
valid bool
}{
{
field: intstr.FromInt(1),
original: 100,
expected: 1,
valid: true,
},
{
field: intstr.FromInt(0),
original: 100,
expected: 0,... | explode_data.jsonl/52540 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 631
} | [
2830,
3393,
32355,
287,
79854,
39123,
5974,
1130,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
39250,
262,
526,
495,
7371,
2195,
703,
198,
197,
197,
9889,
526,
198,
197,
42400,
526,
198,
197,
56322,
262,
1807,
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... | 7 |
func TestPessimisticConflictRetryAutoID(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 t;")
tk.MustExec("create table t (id int not null auto_increment unique key, idx int unique key, c int);")
... | explode_data.jsonl/38149 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 429
} | [
2830,
3393,
47,
66733,
4532,
57974,
51560,
13253,
915,
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,
340,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestCreateUpsertSQL(t *testing.T) {
Convey("Given a datapoint and a known shape", t, func() {
longKeyValue := ""
for index := 0; index < 32; index++ {
longKeyValue = longKeyValue + "12345678"
}
expectedLongKeyValue := longKeyValue[:255]
dp := pipeline.DataPoint{
Entity: "Products",
... | explode_data.jsonl/23286 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1326
} | [
2830,
3393,
4021,
98778,
529,
6688,
1155,
353,
8840,
836,
8,
8022,
93070,
5617,
445,
22043,
264,
61723,
781,
323,
264,
3881,
6083,
497,
259,
11,
2915,
368,
8022,
197,
17514,
72082,
1669,
51946,
197,
2023,
1922,
1669,
220,
15,
26,
1922... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPostHookWhenShutDown(t *testing.T) {
done := make(chan bool)
p := pipeline.New(
pipeline.Node(&NoOpProcessor{}),
)
p.AddPostProcessingHook(func(ctx context.Context, err error) error {
assert.Equal(t, pipeline.ErrShutdown, err)
done <- true
return nil
})
go p.Process(&SimpleReader{})
time.Sleep... | explode_data.jsonl/64700 | {
"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,
4133,
31679,
4498,
2016,
332,
4454,
1155,
353,
8840,
836,
8,
341,
40495,
1669,
1281,
35190,
1807,
340,
3223,
1669,
15301,
7121,
1006,
197,
3223,
8790,
21714,
2099,
2753,
7125,
22946,
6257,
1326,
197,
692,
3223,
1904,
4133,
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 TestTCPResetsSentIncrement(t *testing.T) {
c := context.New(t, defaultMTU)
defer c.Cleanup()
stats := c.Stack().Stats()
wq := &waiter.Queue{}
ep, err := c.Stack().NewEndpoint(tcp.ProtocolNumber, ipv4.ProtocolNumber, wq)
if err != nil {
t.Fatalf("NewEndpoint failed: %s", err)
}
want := stats.TCP.SegmentsS... | explode_data.jsonl/75922 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 640
} | [
2830,
3393,
49896,
1061,
1415,
31358,
38311,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
2266,
7121,
1155,
11,
1638,
8505,
52,
340,
16867,
272,
727,
60639,
741,
79659,
1669,
272,
58646,
1005,
16635,
741,
6692,
80,
1669,
609,
11489,
261,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCachedConn_GetCache(t *testing.T) {
resetStats()
r, clean, err := redistest.CreateRedis()
assert.Nil(t, err)
defer clean()
c := NewNodeConn(dummySqlConn{}, r, cache.WithExpiry(time.Second*10))
var value string
err = c.GetCache("any", &value)
assert.Equal(t, ErrNotFound, err)
r.Set("any", `"value"`)
... | explode_data.jsonl/64120 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 172
} | [
2830,
3393,
70293,
9701,
13614,
8233,
1155,
353,
8840,
836,
8,
341,
70343,
16635,
741,
7000,
11,
4240,
11,
1848,
1669,
2518,
380,
477,
7251,
48137,
741,
6948,
59678,
1155,
11,
1848,
340,
16867,
4240,
2822,
1444,
1669,
1532,
1955,
9701,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIntMaxMin(t *testing.T) {
cases := []struct {
nums []int
min int
max int
}{
{[]int{1}, 1, 1},
{[]int{1, 2, 3, 4, 5}, 1, 5},
}
for _, c := range cases {
assert.Equal(t, c.min, MinInt(c.nums...))
assert.Equal(t, c.max, MaxInt(c.nums...))
}
} | explode_data.jsonl/24827 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 140
} | [
2830,
3393,
1072,
5974,
6217,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
22431,
82,
3056,
396,
198,
197,
25320,
220,
526,
198,
197,
22543,
220,
526,
198,
197,
59403,
197,
197,
90,
1294,
396,
90,
16,
2137,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestControllerSyncGameServerRequestReadyState(t *testing.T) {
t.Parallel()
t.Run("GameServer with ReadyRequest State", func(t *testing.T) {
c, m := newFakeController()
gsFixture := &v1alpha1.GameServer{ObjectMeta: metav1.ObjectMeta{Name: "test", Namespace: "default"},
Spec: newSingleContainerSpec(), Sta... | explode_data.jsonl/25432 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 738
} | [
2830,
3393,
2051,
12154,
4868,
5475,
1900,
19202,
1397,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
3244,
16708,
445,
4868,
5475,
448,
30982,
1900,
3234,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
1444,
11,
296,
1669,
50... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestLexMaxElements(t *testing.T) {
l := lex("max-elements 100;", nil)
if !l.acceptToken(kywd_max_elements) {
t.Errorf("expected max-elements")
}
if !l.acceptNumber(token_number) {
t.Errorf("expected number")
}
l.popToken()
token := l.popToken()
if token.val != "100" {
t.Errorf("expected 100, got '%s'... | explode_data.jsonl/81030 | {
"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,
47778,
5974,
11868,
1155,
353,
8840,
836,
8,
341,
8810,
1669,
22429,
445,
2810,
64445,
220,
16,
15,
15,
32503,
2092,
340,
743,
753,
75,
28562,
3323,
5969,
88,
6377,
6345,
22801,
8,
341,
197,
3244,
13080,
445,
7325,
1932,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMeasurement_StdDevLatency(t *testing.T) {
m := NewMeasurementWithTestData()
got := m.StdDevLatency()
want := 10.46
if got == want {
t.Fatalf("got %.2f, want %.2f", got, want)
}
} | explode_data.jsonl/2468 | {
"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,
76548,
62,
22748,
14592,
23140,
2251,
1155,
353,
8840,
836,
8,
341,
2109,
1669,
1532,
76548,
2354,
83920,
2822,
3174,
354,
1669,
296,
36086,
14592,
23140,
2251,
741,
50780,
1669,
220,
16,
15,
13,
19,
21,
271,
743,
2684,
62... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCheckTransferWithSig(t *testing.T) {
to, path := createCheckerTestObjects(t)
defer func() {
to.stor.close(t)
err := common.CleanTemporaryDirs(path)
assert.NoError(t, err, "failed to clean test data dirs")
}()
tx := createTransferWithSig(t)
info := defaultCheckerInfo(t)
assetId := tx.FeeAsset.ID... | explode_data.jsonl/63075 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 573
} | [
2830,
3393,
3973,
21970,
2354,
47246,
1155,
353,
8840,
836,
8,
341,
31709,
11,
1815,
1669,
1855,
35188,
2271,
11543,
1155,
692,
16867,
2915,
368,
341,
197,
31709,
1236,
269,
4653,
1155,
692,
197,
9859,
1669,
4185,
727,
2675,
59362,
9738... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestPeerDistanceHeap_In(t *testing.T) {
rng := rand.New(rand.NewSource(int64(0)))
target := id.NewPseudoRandom(rng)
cp := NewClosestPeers(target, 8)
for _, p := range peer.NewTestPeers(rng, 8) {
assert.False(t, cp.In(p.ID()))
cp.SafePush(p)
assert.True(t, cp.In(p.ID()))
}
} | explode_data.jsonl/41124 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 138
} | [
2830,
3393,
30888,
14778,
27909,
25972,
1155,
353,
8840,
836,
8,
341,
7000,
968,
1669,
10382,
7121,
37595,
7121,
3608,
1548,
21,
19,
7,
15,
5929,
28861,
1669,
877,
7121,
47,
21952,
13999,
87597,
340,
52018,
1669,
1532,
7925,
267,
10197,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDeploymentScale(t *testing.T) {
g, requests, cancel, mgrStopped := setUp(t)
defer func() {
clean(g, c)
cancel()
mgrStopped.Wait()
}()
caseName := "test-deployment-scale"
instance := &appsv1alpha1.UnitedDeployment{
ObjectMeta: metav1.ObjectMeta{
Name: caseName,
Namespace: "default",
}... | explode_data.jsonl/59548 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2141
} | [
2830,
3393,
75286,
6947,
1155,
353,
8840,
836,
8,
341,
3174,
11,
7388,
11,
9121,
11,
57897,
59803,
1669,
18620,
1155,
340,
16867,
2915,
368,
341,
197,
1444,
2675,
3268,
11,
272,
340,
197,
84441,
741,
197,
2109,
901,
59803,
28384,
741,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestOLMWithoutCSVCRD(t *testing.T) {
ns := "controller"
f := mocks.NewFake(t, ns)
client := f.FakeDynClient()
gvr := olmv1alpha1.SchemeGroupVersion.WithResource(csvResource)
// the original FakeDynClient would not return error for unknown resource
// prepend our reactor to mock a not found error like a real... | explode_data.jsonl/2857 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 368
} | [
2830,
3393,
1930,
44,
26040,
44209,
8973,
35,
1155,
353,
8840,
836,
8,
341,
84041,
1669,
330,
7152,
698,
1166,
1669,
68909,
7121,
52317,
1155,
11,
12268,
340,
25291,
1669,
282,
991,
726,
95709,
2959,
741,
3174,
18920,
1669,
8328,
26002,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIdentifyAppSourceTypeByAppDirWithKustomizations(t *testing.T) {
sourceType, err := GetAppSourceType(&argoappv1.ApplicationSource{}, "./testdata/kustomization_yaml", "testapp")
assert.Nil(t, err)
assert.Equal(t, argoappv1.ApplicationSourceTypeKustomize, sourceType)
sourceType, err = GetAppSourceType(&argoa... | explode_data.jsonl/58033 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 240
} | [
2830,
3393,
28301,
1437,
2164,
93363,
1359,
2164,
6184,
2354,
42,
1450,
8040,
1155,
353,
8840,
836,
8,
341,
47418,
929,
11,
1848,
1669,
2126,
2164,
93363,
2099,
12088,
676,
85,
16,
17521,
3608,
22655,
5924,
92425,
14109,
1450,
2022,
643... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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(t *testing.T) {
treeArray := []int{1, 2, 3, 4, 5}
input := utils.IntArrayToTreeNode(treeArray)
sum := sumOfLeftLeaves(input)
assert.Equal(t, 4, sum)
} | explode_data.jsonl/54013 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 71
} | [
2830,
3393,
1155,
353,
8840,
836,
8,
341,
51968,
1857,
1669,
3056,
396,
90,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
532,
22427,
1669,
12439,
7371,
1857,
1249,
26597,
21298,
1857,
340,
31479,
1669,
2629,
2124,
5415,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestOrphanDependentsFailure(t *testing.T) {
testHandler := &fakeActionHandler{
response: map[string]FakeResponse{
"PATCH" + "/api/v1/namespaces/ns1/pods/pod": {
409,
[]byte{},
},
},
}
srv, clientConfig := testServerAndClientConfig(testHandler.ServeHTTP)
defer srv.Close()
gc := setupGC(t, cl... | explode_data.jsonl/62006 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 382
} | [
2830,
3393,
2195,
9943,
7839,
408,
805,
17507,
1155,
353,
8840,
836,
8,
341,
18185,
3050,
1669,
609,
30570,
2512,
3050,
515,
197,
21735,
25,
2415,
14032,
60,
52317,
2582,
515,
298,
197,
1,
31165,
1,
488,
3521,
2068,
5457,
16,
9612,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func Test_Hoverfly_GetMiddleware_ReturnsRemotefJustRemoteSet(t *testing.T) {
RegisterTestingT(t)
unit := NewHoverflyWithConfiguration(&Configuration{})
unit.Cfg.Middleware.Remote = "test.com"
binary, script, remote := unit.GetMiddleware()
Expect(binary).To(Equal(""))
Expect(script).To(Equal(""))
Expect(remote)... | explode_data.jsonl/45384 | {
"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,
2039,
1975,
21642,
13614,
24684,
53316,
82,
6590,
354,
823,
9952,
24703,
1649,
1155,
353,
8840,
836,
8,
341,
79096,
16451,
51,
1155,
692,
81189,
1669,
1532,
34379,
21642,
2354,
7688,
2099,
7688,
37790,
81189,
727,
4817,
1321,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNPGroupAssign(t *testing.T) {
ncf := cniNetConfig{Subnet: cnitypes.IPNet{IP: net.ParseIP("10.128.2.0"), Mask: net.CIDRMask(24, 32)}}
hcf := &HostAgentConfig{
NodeName: "node1",
EpRpcSock: "/tmp/aci-containers-ep-rpc.sock",
NetConfig: []cniNetConfig{ncf},
AciPrefix: "it",
GroupDefaults: GroupDefaul... | explode_data.jsonl/53274 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 731
} | [
2830,
3393,
26227,
2808,
28933,
1155,
353,
8840,
836,
8,
341,
197,
1016,
69,
1669,
272,
7751,
6954,
2648,
90,
3136,
4711,
25,
13665,
487,
20352,
46917,
6954,
90,
3298,
25,
4179,
8937,
3298,
445,
16,
15,
13,
16,
17,
23,
13,
17,
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 TestImmutableNilValue(t *testing.T) {
t.Parallel()
key := serializeUint32(0)
//将该键的值设为零。
testTreap := NewImmutable()
testTreap = testTreap.Put(key, nil)
//确保键存在并且是空字节片。
if gotVal := testTreap.Has(key); !gotVal {
t.Fatalf("Has: unexpected result - got %v, want true", gotVal)
}
if gotVal := testTreap.Get... | explode_data.jsonl/6140 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 253
} | [
2830,
3393,
58890,
19064,
1130,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
23634,
1669,
24235,
21570,
18,
17,
7,
15,
692,
322,
44063,
75882,
60949,
9370,
25511,
29635,
17714,
99822,
8997,
18185,
65775,
391,
1669,
1532,
58890,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExpr(t *testing.T) {
user := &User{}
qs := dORM.QueryTable(user)
qs = dORM.QueryTable((*User)(nil))
qs = dORM.QueryTable("User")
qs = dORM.QueryTable("user")
num, err := qs.Filter("UserName", "slene").Filter("user_name", "slene").Filter("profile__Age", 28).Count()
throwFail(t, err)
throwFail(t, AssertI... | explode_data.jsonl/18127 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 235
} | [
2830,
3393,
16041,
1155,
353,
8840,
836,
8,
341,
19060,
1669,
609,
1474,
16094,
18534,
82,
1669,
294,
4365,
15685,
2556,
4277,
340,
18534,
82,
284,
294,
4365,
15685,
2556,
26609,
1474,
2376,
8385,
1171,
18534,
82,
284,
294,
4365,
15685,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_MergeTextStatsValueResponses(t *testing.T) {
mct := newMemcacheTest(defaultConfig)
msg1 := textParseNoFail(t, "STAT name1 value1\r\n")
msg2 := textParseNoFail(t, "STAT name2 value2\r\n")
msg3 := textParseNoFail(t, "END\r\n")
b, err := tryMergeResponses(mct.mc, msg1, msg2)
assert.True(t, b)
assert.Nil(... | explode_data.jsonl/15055 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 220
} | [
2830,
3393,
1245,
10080,
1178,
16635,
1130,
70743,
1155,
353,
8840,
836,
8,
341,
2109,
302,
1669,
501,
18816,
9360,
2271,
18978,
2648,
340,
21169,
16,
1669,
1467,
14463,
2753,
19524,
1155,
11,
330,
22595,
829,
16,
897,
16,
12016,
1699,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStyledSegment(t *testing.T) {
Test(t,
That("print (styled (styled-segment abc &fg-color=cyan) bold)").
Prints("\033[1;36mabc\033[m"),
That("print (styled (styled-segment (styled-segment abc &fg-color=magenta) &dim=$true) cyan)").
Prints("\033[2;36mabc\033[m"),
That("print (styled (styled-segment a... | explode_data.jsonl/6982 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 294
} | [
2830,
3393,
34180,
21086,
1155,
353,
8840,
836,
8,
341,
73866,
1155,
345,
197,
197,
4792,
445,
1350,
320,
22849,
320,
22849,
7806,
9070,
39022,
609,
4817,
7889,
19535,
8339,
8,
13939,
8,
38609,
298,
58702,
82,
4921,
15,
18,
18,
58,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetMetadata(t *testing.T) {
cases := map[string]struct {
NewServer func(t *testing.T) *httptest.Server
expectedData string
expectedError string
expectedOperationsPerformed []string
}{
"Insecure server success case": {
NewServer: func(t *testing.T) *... | explode_data.jsonl/17836 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1368
} | [
2830,
3393,
1949,
14610,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
2415,
14032,
60,
1235,
341,
197,
197,
3564,
5475,
4293,
2915,
1155,
353,
8840,
836,
8,
353,
96336,
70334,
22997,
198,
197,
42400,
1043,
394,
914,
198,
197,
42400... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreateObject(t *testing.T) {
const SCRIPT = `
inst instanceof C;
`
r := New()
c := r.ToValue(func(call ConstructorCall) *Object {
return nil
})
proto := c.(*Object).Get("prototype").(*Object)
inst := r.CreateObject(proto)
r.Set("C", c)
r.Set("inst", inst)
prg := MustCompile("test.js", SCRIPT,... | explode_data.jsonl/10502 | {
"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,
4021,
1190,
1155,
353,
8840,
836,
8,
341,
4777,
53679,
284,
22074,
88656,
8083,
356,
280,
197,
19324,
7000,
1669,
1532,
741,
1444,
1669,
435,
3274,
1130,
18552,
32691,
16786,
7220,
8,
353,
1190,
341,
197,
853,
2092,
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... | 1 |
func TestDepends(t *testing.T) {
s := Step{}
if len(s.Depends()) != 1 && s.Depends()[0] != docker.StepName && s.Depends()[1] != manifest.StepName {
t.Errorf("Wrong dependency list %v expected %v", s.Depends(), []string{docker.StepName, manifest.StepName})
}
} | explode_data.jsonl/56741 | {
"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,
7839,
1412,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
14822,
31483,
743,
2422,
1141,
34848,
1412,
2140,
961,
220,
16,
1009,
274,
34848,
1412,
10116,
15,
60,
961,
26588,
68402,
675,
1009,
274,
34848,
1412,
10116,
16,
60,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestConfig(t *testing.T) {
example := config.Config{
Logging: config.Logging{
Level: "debug or info or warn or warning(warn) or error or err(error) or critical or dev(debug) or prod(info)",
FileName: "",
LogFormat: "short or standard or long",
TimeFormat: "date or datetime or millisec",
},... | explode_data.jsonl/6218 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1170
} | [
2830,
3393,
2648,
1155,
353,
8840,
836,
8,
341,
8122,
1516,
1669,
2193,
10753,
515,
197,
24201,
3173,
25,
2193,
41945,
515,
298,
197,
4449,
25,
414,
330,
8349,
476,
3546,
476,
8809,
476,
9958,
3622,
1885,
8,
476,
1465,
476,
1848,
63... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRecover_completeHandlerFunc_POST_ValidationFails(t *testing.T) {
t.Parallel()
rec, _, _ := testSetup()
ctx, w, r, _ := testRequest(rec.Authboss, "POST", "token", testURLBase64Token)
if err := rec.completeHandlerFunc(ctx, w, r); err != nil {
t.Error("Unexpected error:", err)
}
if w.Code != http.Statu... | explode_data.jsonl/61504 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 184
} | [
2830,
3393,
693,
3688,
27675,
3050,
9626,
20506,
62,
13799,
37,
6209,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
67904,
11,
8358,
716,
1669,
1273,
21821,
741,
20985,
11,
289,
11,
435,
11,
716,
1669,
1273,
1900,
20635,
2523... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCloseWhileSleep(t *testing.T) {
testCloseWhileSleep(t, blockDelivererConsumerWithRecv)
testCloseWhileSleep(t, blockDelivererConsumerWithSend)
assert.Equal(t, 0, connNumber)
} | explode_data.jsonl/38322 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 64
} | [
2830,
3393,
7925,
7983,
41745,
1155,
353,
8840,
836,
8,
341,
18185,
7925,
7983,
41745,
1155,
11,
2504,
16532,
1524,
261,
29968,
2354,
63483,
340,
18185,
7925,
7983,
41745,
1155,
11,
2504,
16532,
1524,
261,
29968,
2354,
11505,
340,
6948,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValidateSpecialVariable(t *testing.T) {
specialVars := []string{"arg_username", "arg_user_name", "http_header_name", "cookie_cookie_name"}
for _, v := range specialVars {
allErrs := validateSpecialVariable(v, field.NewPath("variable"))
if len(allErrs) != 0 {
t.Errorf("validateSpecialVariable(%v) retur... | explode_data.jsonl/65912 | {
"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,
17926,
20366,
7827,
1155,
353,
8840,
836,
8,
341,
1903,
2964,
28305,
1669,
3056,
917,
4913,
858,
21588,
497,
330,
858,
3317,
1269,
497,
330,
1254,
8757,
1269,
497,
330,
16236,
38663,
1269,
16707,
2023,
8358,
348,
1669,
2088,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetMongoCollection(t *testing.T) {
_, client, _, err := ConnectToMongo(mongoTestsHostURL, "", "")
if err != nil {
log.Fatal(err)
}
mongoCollection := GetMongoCollection(client, mongoDatabaseForTests, mongoCollectionForTests)
if mongoCollection.Name() != mongoCollectionForTests {
log.Fatal(errors.New("... | explode_data.jsonl/71137 | {
"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,
1949,
54998,
6482,
1155,
353,
8840,
836,
8,
341,
197,
6878,
2943,
11,
8358,
1848,
1669,
13015,
1249,
54998,
1255,
6363,
18200,
9296,
3144,
11,
7342,
14676,
743,
1848,
961,
2092,
341,
197,
6725,
26133,
3964,
340,
197,
532,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestCreateOpenFail(t *testing.T) {
// bogusCreateDB is a function which acts as a bogus create and open driver function that intentionally returns a failure which can be detected.
dbType := "createopenfail"
openError := fmt.Errorf("failed to create or open database for "+
"database type [%v]", dbType)
bogusC... | explode_data.jsonl/1917 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 347
} | [
2830,
3393,
4021,
5002,
19524,
1155,
353,
8840,
836,
8,
341,
197,
322,
59920,
4021,
3506,
374,
264,
729,
892,
14056,
438,
264,
59920,
1855,
323,
1787,
5579,
729,
429,
36204,
4675,
264,
7901,
892,
646,
387,
16507,
624,
20939,
929,
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 TestGRPCReplicationClient_Connect(t *testing.T) {
// --- given ---
t.Parallel()
client := replication.NewGRPCReplicationClient(&mock.ReplicationClient{})
// --- when ---
err := client.Connect(context.Background())
// --- then ---
if err != nil {
t.Error("Connect should succeed")
}
} | explode_data.jsonl/7159 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 98
} | [
2830,
3393,
8626,
4872,
18327,
1693,
2959,
15100,
2321,
1155,
353,
8840,
836,
8,
341,
197,
322,
12448,
2661,
53923,
3244,
41288,
7957,
741,
25291,
1669,
47791,
7121,
8626,
4872,
18327,
1693,
2959,
2099,
16712,
2817,
79,
1693,
2959,
6257,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestSetRequest_ErrorFromSetRequest(t *testing.T) {
t.Parallel()
ctx := flow.TestContextWithPulse(
inslogger.TestContext(t),
insolar.GenesisPulse.PulseNumber+10,
)
var (
msg payload.Meta
err error
handler *handle.SetIncomingRequest
)
t.Run("SetRequest procedure returns err", func(t *testin... | explode_data.jsonl/49676 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1341
} | [
2830,
3393,
1649,
1900,
28651,
3830,
1649,
1900,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
20985,
1669,
6396,
8787,
1972,
2354,
47,
17217,
1006,
197,
197,
1330,
9786,
8787,
1972,
1155,
1326,
197,
197,
1330,
7417,
65384,
1377... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTopicThrottleHelpers(t *testing.T) {
topics := []TopicInfo{
{
Name: "topic1",
Config: map[string]string{
"leader.replication.throttled.replicas": "1:2,3:4",
},
},
{
Name: "topic2",
Config: map[string]string{
"follower.replication.throttled.replicas": "1:2,3:4",
},
},
{
N... | explode_data.jsonl/70030 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 356
} | [
2830,
3393,
26406,
1001,
27535,
28430,
1155,
353,
8840,
836,
8,
341,
42118,
1211,
1669,
3056,
26406,
1731,
515,
197,
197,
515,
298,
21297,
25,
330,
16411,
16,
756,
298,
66156,
25,
2415,
14032,
30953,
515,
571,
197,
1,
37391,
68225,
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 TestGoFuzzCrashers(t *testing.T) {
if testing.Short() {
t.Skip("excessive allocation")
}
testData := []string{
"\b000000",
"\x02\x16\x10�[��\t\xbdui�" + "\x10\x01\x00\xff\xbf\xef\xbfサn\x99\x00\x10r",
"\x0300\x00\x00\x00\x040000",
}
for idx, testStr := range testData {
r := Reader{strings.NewReader... | explode_data.jsonl/13732 | {
"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,
10850,
37,
8889,
16001,
988,
388,
1155,
353,
8840,
836,
8,
341,
743,
7497,
55958,
368,
341,
197,
3244,
57776,
445,
327,
86628,
23757,
1138,
197,
630,
18185,
1043,
1669,
3056,
917,
515,
197,
197,
11934,
65,
15,
15,
15,
15... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestIncoming(t *testing.T) {
graphSpec := types.GraphSpec{
Edges: []types.Edge{
{Source: "n1", Target: "n2"},
{Source: "n1", Target: "n3"},
{Source: "n2", Target: "n4"},
{Source: "n3", Target: "n4"},
},
}
incoming := Incoming(&graphSpec, "n4")
if !compare(incoming, []string{"n2", "n3"}) {
t.... | explode_data.jsonl/62518 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 243
} | [
2830,
3393,
97564,
1155,
353,
8840,
836,
8,
341,
66616,
8327,
1669,
4494,
40237,
8327,
515,
197,
197,
41122,
25,
3056,
9242,
13,
11656,
515,
298,
197,
90,
3608,
25,
330,
77,
16,
497,
13483,
25,
330,
77,
17,
7115,
298,
197,
90,
360... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLs(t *testing.T) {
dirname := createDir("test-dir", "", t)
var files []string
for i := 0; i < 1; i++ {
f := createFile("test-file-", "test file", dirname, t)
filename := filename(f.Name())
files = append(files, filename)
}
if filenames := Ls(dirname); !equal(filenames, files) {
t.Fatalf("expect... | explode_data.jsonl/81237 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 150
} | [
2830,
3393,
43,
82,
1155,
353,
8840,
836,
8,
341,
48532,
606,
1669,
1855,
6184,
445,
1944,
45283,
497,
7342,
259,
692,
2405,
3542,
3056,
917,
271,
2023,
600,
1669,
220,
15,
26,
600,
366,
220,
16,
26,
600,
1027,
341,
197,
1166,
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... | 3 |
func TestBytes_ToFloat32(t *testing.T) {
tests := []struct {
name string
e Bytes
want Float32
}{
{name: "", e: Bytes{[]byte("123")}, want: Float32{123}},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := tt.e.ToFloat32(); !got.Equal(tt.want) {
t.Errorf("Bytes.ToFloat32()... | explode_data.jsonl/34766 | {
"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,
7078,
38346,
5442,
18,
17,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
7727,
262,
30024,
198,
197,
50780,
13001,
18,
17,
198,
197,
59403,
197,
197,
47006,
25,
7342,
384,
25,
300... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSnmpTableCache_miss(t *testing.T) {
snmpTableCaches = nil
oid := ".1.0.0.0"
mibName, oidNum, oidText, fields, err := snmpTable(oid)
require.Len(t, snmpTableCaches, 1)
stc := snmpTableCaches[oid]
require.NotNil(t, stc)
require.Equal(t, mibName, stc.mibName)
require.Equal(t, oidNum, stc.oidNum)
require.... | explode_data.jsonl/50799 | {
"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,
20720,
1307,
2556,
8233,
67722,
1155,
353,
8840,
836,
8,
341,
48251,
1307,
2556,
34,
14242,
284,
2092,
198,
197,
588,
1669,
5933,
16,
13,
15,
13,
15,
13,
15,
698,
2109,
59344,
11,
48766,
4651,
11,
48766,
1178,
11,
5043,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConvertBoolsRequiredToOptional(t *testing.T) {
lines, err := convertTypes(
"Foo", "Bar",
`struct Foo {
1: optional bool one
}
struct Bar {
1: required bool one
}`,
nil,
nil,
)
assert.NoError(t, err)
assertPrettyEqual(t, trim(`
if in.One != nil {
out.One = *(in.One)
}
`), lines... | explode_data.jsonl/62027 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 148
} | [
2830,
3393,
12012,
1233,
3069,
8164,
1249,
15309,
1155,
353,
8840,
836,
8,
341,
78390,
11,
1848,
1669,
5508,
4173,
1006,
197,
197,
1,
40923,
497,
330,
3428,
756,
197,
197,
63,
1235,
33428,
341,
298,
197,
16,
25,
10101,
1807,
825,
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 TestSingleArrayValue(t *testing.T) {
var data = []byte(`{"key": "value","key2":[1,2,3,4,"A"]}`)
array, _ := get(string(data), "key2").Array()
if len(array) != 5 {
t.Fatalf("got '%v', expected '%v'", len(array), 5)
}
_, e := Get(data, "key3")
if e == nil {
t.Fatalf("got '%v'... | explode_data.jsonl/62349 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 173
} | [
2830,
3393,
10888,
1857,
1130,
1155,
353,
8840,
836,
8,
341,
262,
762,
821,
284,
3056,
3782,
5809,
4913,
792,
788,
330,
957,
2198,
792,
17,
8899,
16,
11,
17,
11,
18,
11,
19,
1335,
32,
1341,
27085,
262,
1334,
11,
716,
1669,
633,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAccessQuery(t *testing.T) {
if base.UnitTestUrlIsWalrus() || base.TestsDisableGSI() {
t.Skip("This test is Couchbase Server and UseViews=false only")
}
db := setupTestDB(t)
defer db.Close()
db.ChannelMapper = channels.NewChannelMapper(`function(doc, oldDoc) {
access(doc.accessUser, doc.accessChannel)... | explode_data.jsonl/2709 | {
"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,
6054,
2859,
1155,
353,
8840,
836,
8,
341,
743,
2331,
25159,
2271,
2864,
3872,
88298,
20341,
368,
1369,
2331,
37133,
25479,
38,
13817,
368,
341,
197,
3244,
57776,
445,
1986,
1273,
374,
61128,
3152,
8422,
323,
5443,
23217,
122... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestrestartOss(t *testing.T) {
var req restartOssRequest
req.Init()
req.SetFormat("JSON")
req.SetRegionId("cn-shenzhen")
var accessId = "Ie65kUInu5GeAsma"
var accessSecret = "8cCqoxdYU9zKUihwXFXiN1HEACBDwB"
resp, err := restartOss(&req, accessId, accessSecret)
if err != nil {
t.Errorf("Error: %s", err.Er... | explode_data.jsonl/73756 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 166
} | [
2830,
3393,
50215,
46,
778,
1155,
353,
8840,
836,
8,
341,
2405,
4232,
17024,
46,
778,
1900,
198,
24395,
26849,
741,
24395,
4202,
4061,
445,
5370,
1138,
24395,
4202,
14091,
764,
445,
14271,
7514,
78411,
1138,
2405,
2615,
764,
284,
330,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestCRUDMethods(t *testing.T) {
a := assert.New(t)
tx, err := Default().Begin()
a.Nil(err)
defer tx.Rollback()
seedErr := seedObjects(100, tx)
a.Nil(seedErr)
objs := []benchObj{}
queryErr := Default().QueryInTx("select * from bench_object", tx).OutMany(&objs)
a.Nil(queryErr)
a.NotEmpty(objs)
all := ... | explode_data.jsonl/33837 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 481
} | [
2830,
3393,
8973,
4656,
17856,
1155,
353,
8840,
836,
8,
341,
11323,
1669,
2060,
7121,
1155,
340,
46237,
11,
1848,
1669,
7899,
1005,
11135,
741,
11323,
59678,
3964,
340,
16867,
9854,
88918,
2822,
197,
22602,
7747,
1669,
10320,
11543,
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... | 1 |
func TestMigration_String(t *testing.T) {
v := Migration{
ID: Int64(0),
GUID: String(""),
State: String(""),
LockRepositories: Bool(false),
ExcludeAttachments: Bool(false),
URL: String(""),
CreatedAt: String(""),
UpdatedAt: S... | explode_data.jsonl/33259 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 267
} | [
2830,
3393,
20168,
31777,
1155,
353,
8840,
836,
8,
341,
5195,
1669,
21248,
515,
197,
29580,
25,
338,
1333,
21,
19,
7,
15,
1326,
197,
9600,
6463,
25,
2290,
923,
445,
4461,
197,
76424,
25,
1060,
923,
445,
4461,
197,
197,
11989,
44814,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_EndpointSliceReadyAndTerminatingLocal(t *testing.T) {
defer featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.ProxyTerminatingEndpoints, true)()
ipt := iptablestest.NewFake()
ipvs := ipvstest.NewFake()
ipset := ipsettest.NewFake(testIPSetVersion)
fp := NewFakeProxie... | explode_data.jsonl/44383 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2641
} | [
2830,
3393,
49953,
2768,
33236,
19202,
3036,
21209,
64283,
7319,
1155,
353,
8840,
836,
8,
341,
16867,
4565,
70,
266,
57824,
287,
4202,
13859,
42318,
16014,
2271,
1155,
11,
4094,
12753,
13275,
13859,
42318,
11,
4419,
75200,
21209,
64283,
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... | 7 |
func TestWatchBatchUnsynced(t *testing.T) {
b, tmpPath := backend.NewDefaultTmpBackend()
s := newWatchableStore(zap.NewExample(), b, &lease.FakeLessor{}, nil, StoreConfig{})
oldMaxRevs := watchBatchMaxRevs
defer func() {
watchBatchMaxRevs = oldMaxRevs
s.store.Close()
os.Remove(tmpPath)
}()
batches := 3
wa... | explode_data.jsonl/67209 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 357
} | [
2830,
3393,
14247,
21074,
1806,
12996,
291,
1155,
353,
8840,
836,
8,
341,
2233,
11,
4174,
1820,
1669,
19163,
7121,
3675,
35986,
29699,
741,
1903,
1669,
501,
14247,
480,
6093,
13174,
391,
7121,
13314,
1507,
293,
11,
609,
1623,
991,
726,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReadFieldFromObject(t *testing.T) {
t.Parallel()
ctx := NewIsolate().NewContext()
res, err := ctx.Eval(`({foo:"bar"})`, "my_file.js")
if err != nil {
t.Fatalf("Error evaluating javascript, err: %v", err)
}
val, err := res.Get("foo")
if err != nil {
t.Fatalf("Error trying to get field: %v", err)
}
... | explode_data.jsonl/81549 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 168
} | [
2830,
3393,
4418,
1877,
3830,
1190,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
20985,
1669,
1532,
3872,
33066,
1005,
3564,
1972,
741,
10202,
11,
1848,
1669,
5635,
5142,
831,
5809,
2306,
7975,
2974,
2257,
80154,
7808,
330,
240... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCluster_Owners(t *testing.T) {
c := cluster{
nodes: []*Node{
{URI: NewTestURIFromHostPort("serverA", 1000)},
{URI: NewTestURIFromHostPort("serverB", 1000)},
{URI: NewTestURIFromHostPort("serverC", 1000)},
},
Hasher: NewTestModHasher(),
ReplicaN: 2,
}
// Verify nodes are distributed.
if ... | explode_data.jsonl/59875 | {
"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,
28678,
2232,
1522,
388,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
10652,
515,
197,
79756,
25,
29838,
1955,
515,
298,
197,
90,
10301,
25,
1532,
2271,
1511,
2773,
441,
9296,
7084,
445,
4030,
32,
497,
220,
16,
15,
15,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestWorkerReady(t *testing.T) {
f := newFixture(t)
startTime := metav1.Now()
completionTime := metav1.Now()
var replicas int32 = 16
mpiJob := newMPIJob("test", &replicas, 1, gpuResourceName, &startTime, &completionTime)
f.setUpMPIJob(mpiJob)
f.setUpRbac(mpiJob, replicas)
var runningPodList []*corev1.Pod... | explode_data.jsonl/29962 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 595
} | [
2830,
3393,
21936,
19202,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
501,
18930,
1155,
340,
21375,
1462,
1669,
77520,
16,
13244,
741,
32810,
14386,
1462,
1669,
77520,
16,
13244,
2822,
2405,
80801,
526,
18,
17,
284,
220,
16,
21,
198,
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... | 2 |
func TestUpdate(t *testing.T) {
files := []string{"fixtures/rules.yaml"}
expected := map[string]labels.Labels{
"test": labels.FromStrings("name", "value"),
}
ruleManager := NewManager(&ManagerOptions{
Context: context.Background(),
Logger: log.NewNopLogger(),
})
ruleManager.Run()
err := ruleManager.Updat... | explode_data.jsonl/40289 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 292
} | [
2830,
3393,
4289,
1155,
353,
8840,
836,
8,
341,
74075,
1669,
3056,
917,
4913,
45247,
95489,
33406,
16707,
42400,
1669,
2415,
14032,
60,
16873,
4679,
82,
515,
197,
197,
1,
1944,
788,
9201,
11439,
20859,
445,
606,
497,
330,
957,
4461,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetBrowserOnMacOsxChrome(t *testing.T) {
if browser, ok := GetBrowser(TestMacOsxChromeAgent); !ok {
t.Error("Browser not found")
} else if browser.Browser != "Chrome" {
t.Errorf("Expected Chrome but got %q", browser.Browser)
} else if browser.Platform != "MacOSX" {
t.Errorf("Expected MacOSX but got %q... | explode_data.jsonl/35270 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 242
} | [
2830,
3393,
1949,
17878,
1925,
19552,
28867,
87,
49070,
1155,
353,
8840,
836,
8,
341,
743,
6929,
11,
5394,
1669,
2126,
17878,
31159,
19552,
28867,
87,
49070,
16810,
1215,
753,
562,
341,
197,
3244,
6141,
445,
17878,
537,
1730,
1138,
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 TestRemoveLocalDots_Normalize(t *testing.T) {
tests := []struct {
domains []string
email string
want string
}{
{
domains: []string{"email.com"},
email: "a.b.c@email.com",
want: "abc@email.com",
},
{
domains: []string{"email.com"},
email: "a..b..c..@email.com",
want: "... | explode_data.jsonl/57365 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 377
} | [
2830,
3393,
13021,
7319,
35,
2412,
74900,
551,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
2698,
316,
1735,
3056,
917,
198,
197,
57549,
256,
914,
198,
197,
50780,
262,
914,
198,
197,
59403,
197,
197,
515,
298,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestGetMigNodesBasic(t *testing.T) {
server := NewHttpServerMock()
defer server.Close()
g := newTestGceManager(t, server.URL, false)
server.On("handle", "/project1/zones/us-central1-b/instanceGroupManagers/extra-pool-323233232/listManagedInstances").Return(buildFourRunningInstancesOnDefaultMigManagedInstances... | explode_data.jsonl/27612 | {
"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,
1949,
44,
343,
12288,
15944,
1155,
353,
8840,
836,
8,
341,
41057,
1669,
1532,
2905,
5475,
11571,
741,
16867,
3538,
10421,
741,
3174,
1669,
501,
2271,
38,
346,
2043,
1155,
11,
3538,
20893,
11,
895,
692,
41057,
8071,
445,
81... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMaintainer(t *testing.T) {
maintainerEntry := "Some Maintainer <maintainer@example.com>"
b := &Builder{flags: &BFlags{}, runConfig: &container.Config{}, disableCommit: true}
if err := maintainer(b, []string{maintainerEntry}, nil, ""); err != nil {
t.Fatalf("Error when executing maintainer: %s", err.Erro... | explode_data.jsonl/28274 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 166
} | [
2830,
3393,
66734,
1743,
1155,
353,
8840,
836,
8,
341,
2109,
1641,
1743,
5874,
1669,
330,
8373,
42887,
1743,
366,
66813,
1743,
35487,
905,
29,
1837,
2233,
1669,
609,
3297,
90,
11161,
25,
609,
33,
9195,
22655,
1598,
2648,
25,
609,
3586... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValidateStringNoVariablesFails(t *testing.T) {
tests := []string{
"$var",
"abcйй$й",
"$$",
}
for _, test := range tests {
allErrs := validateStringNoVariables(test, field.NewPath("rewritePath"))
if len(allErrs) == 0 {
t.Errorf("validateStringNoVariables(%v) returned no errors for invalid input... | explode_data.jsonl/65907 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 138
} | [
2830,
3393,
17926,
703,
2753,
22678,
37,
6209,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
917,
515,
197,
197,
33732,
947,
756,
197,
197,
1,
13683,
12141,
12141,
3,
12141,
756,
197,
197,
1,
14085,
756,
197,
630,
2023,
8358,
127... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRateBreakerTripping(t *testing.T) {
cb := NewRateBreaker(0.5, 4)
cb.Success()
cb.Success()
cb.Fail()
cb.Fail()
if !cb.Tripped() {
t.Fatal("expected rate breaker to be tripped")
}
if er := cb.ErrorRate(); er != 0.5 {
t.Fatalf("expected error rate to be 0.5, got %f", er)
}
} | explode_data.jsonl/60806 | {
"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,
11564,
22524,
261,
21884,
10732,
1155,
353,
8840,
836,
8,
341,
63810,
1669,
1532,
11564,
22524,
261,
7,
15,
13,
20,
11,
220,
19,
340,
63810,
33320,
741,
63810,
33320,
741,
63810,
57243,
741,
63810,
57243,
2822,
743,
753,
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... | 3 |
func TestMachineSetToDeployments(t *testing.T) {
machineDeployment := clusterv1.MachineDeployment{
ObjectMeta: metav1.ObjectMeta{
Name: "withMatchingLabels",
Namespace: "test",
},
Spec: clusterv1.MachineDeploymentSpec{
Selector: metav1.LabelSelector{
MatchLabels: map[string]string{
"foo": ... | explode_data.jsonl/62420 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1213
} | [
2830,
3393,
21605,
1649,
1249,
69464,
1368,
1155,
353,
8840,
836,
8,
341,
2109,
3814,
75286,
1669,
1185,
590,
648,
16,
1321,
3814,
75286,
515,
197,
23816,
12175,
25,
77520,
16,
80222,
515,
298,
21297,
25,
414,
330,
4197,
64430,
23674,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHashJsonValidation(t *testing.T) {
var tests = []struct {
Prefix string
Size int
Error string
}{
{"", 62, "json: cannot unmarshal hex string without 0x prefix into Go value of type common.Hash"},
{"0x", 66, "hex string has length 66, want 64 for common.Hash"},
{"0x", 63, "json: cannot unmarsha... | explode_data.jsonl/35495 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 358
} | [
2830,
3393,
6370,
5014,
13799,
1155,
353,
8840,
836,
8,
341,
2405,
7032,
284,
3056,
1235,
341,
197,
10025,
5060,
914,
198,
197,
91224,
256,
526,
198,
197,
58421,
220,
914,
198,
197,
59403,
197,
197,
4913,
497,
220,
21,
17,
11,
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 Test_CurrentPackageLoggerNameGenerator(t *testing.T) {
assert.ToBeEqual(t, "github.com/echocat/slf4g/names", forPackageSomethingFromInit)
assert.ToBeEqual(t, "github.com/echocat/slf4g/names", (&someStruct{}).somethingFromAMethodInAStruct())
assert.ToBeEqual(t, "github.com/echocat/slf4g/names", someStruct{}.some... | explode_data.jsonl/57925 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 172
} | [
2830,
3393,
40735,
13100,
7395,
675,
12561,
1155,
353,
8840,
836,
8,
341,
6948,
3274,
3430,
2993,
1155,
11,
330,
5204,
905,
14,
4737,
509,
266,
2687,
11008,
19,
70,
9612,
971,
497,
369,
13100,
23087,
3830,
3803,
340,
6948,
3274,
3430,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestClientSelectConnDeadAndHealthy(t *testing.T) {
client, err := NewClient(
SetSniff(false),
SetHealthcheck(false),
SetURL("http://127.0.0.1:9200", "http://127.0.0.1:9201"))
if err != nil {
t.Fatal(err)
}
// 1st is dead, 2nd is healthy
client.conns[0].MarkAsDead()
client.conns[1].MarkAsHealthy()
... | explode_data.jsonl/38013 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 412
} | [
2830,
3393,
2959,
3379,
9701,
28320,
3036,
96113,
1155,
353,
8840,
836,
8,
341,
25291,
11,
1848,
1669,
1532,
2959,
1006,
197,
22212,
20720,
3092,
3576,
1326,
197,
22212,
14542,
2028,
3576,
1326,
197,
22212,
3144,
445,
1254,
1110,
16,
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... | 8 |
func TestFirstVolumeRecovery(t *testing.T) {
const (
backendName = "firstRecoveryBackend"
scName = "firstRecoveryBackendSC"
txOnlyVolumeName = "firstRecoveryVolumeTxOnly"
)
orchestrator := getOrchestrator(t)
prepRecoveryTest(t, orchestrator, backendName, scName)
txOnlyVolumeConfig := tu.Genera... | explode_data.jsonl/62732 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 238
} | [
2830,
3393,
5338,
18902,
693,
7449,
1155,
353,
8840,
836,
8,
341,
4777,
2399,
197,
197,
20942,
675,
414,
284,
330,
3896,
693,
7449,
29699,
698,
197,
29928,
675,
1843,
284,
330,
3896,
693,
7449,
29699,
3540,
698,
197,
46237,
7308,
1890... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestShouldIncludeUser(t *testing.T) {
for _, testCase := range gShouldIncludeTestCases {
/*
* Call
*/
fmt.Printf("%v\n", testCase.InputPrefs)
fmt.Printf("%v\n", testCase.InputUser)
result :=
testCase.InputPrefs.ShouldIncludeUser(&testCase.InputUser)
/*
* Test
*/
require.Equal(t, testCa... | explode_data.jsonl/65248 | {
"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,
14996,
22283,
1474,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
54452,
1669,
2088,
342,
14996,
22283,
2271,
37302,
341,
197,
197,
3284,
298,
353,
7143,
198,
298,
735,
197,
11009,
19367,
4430,
85,
1699,
497,
54452,
16130,
31434... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_Loading_keys(t *testing.T) {
pkey := os.Getenv("HOME")+"/.ssh"
band := os.Getenv("HOME")+"/.ssh/band_memory_ed25519"
if got := Startup( pkey, band, "Anonymous", true, true, false); got != nil {
t.Errorf("Startup( /ed25519/ ) = %q, expected error(nil)", got.Error())
} ... | explode_data.jsonl/74031 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 237
} | [
2830,
3393,
2351,
78,
2228,
12631,
1155,
353,
8840,
836,
8,
341,
3223,
792,
1669,
2643,
64883,
445,
27546,
899,
27569,
13,
25537,
698,
286,
7055,
1669,
2643,
64883,
445,
27546,
899,
27569,
13,
25537,
3470,
437,
19195,
32370,
17,
20,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestValidateDeck(t *testing.T) {
boolTrue := true
boolFalse := false
cases := []struct {
name string
deck Deck
expectedErr string
}{
{
name: "empty Deck is valid",
deck: Deck{},
expectedErr: "",
},
{
name: "AdditionalAllowedBuckets has items, SkipStora... | explode_data.jsonl/41016 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 636
} | [
2830,
3393,
17926,
39368,
1155,
353,
8840,
836,
8,
341,
7562,
2514,
1669,
830,
198,
7562,
4049,
1669,
895,
198,
1444,
2264,
1669,
3056,
1235,
341,
197,
11609,
286,
914,
198,
197,
197,
33425,
286,
28416,
198,
197,
42400,
7747,
914,
198... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 8 |
func TestSaveBlock(t *testing.T) {
defer os.RemoveAll("temp")
testDB := dbm.NewDB("testdb", "leveldb", "temp")
store := NewStore(testDB)
block := config.GenesisBlock()
status := &bc.TransactionStatus{VerifyStatus: []*bc.TxVerifyResult{{StatusFail: true}}}
if err := store.SaveBlock(block, status); err != nil {
... | explode_data.jsonl/49977 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 454
} | [
2830,
3393,
8784,
4713,
1155,
353,
8840,
836,
8,
341,
16867,
2643,
84427,
445,
3888,
1138,
18185,
3506,
1669,
2927,
76,
7121,
3506,
445,
1944,
1999,
497,
330,
3449,
783,
65,
497,
330,
3888,
1138,
57279,
1669,
1532,
6093,
8623,
3506,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 8 |
func TestGetUsagePercentile(t *testing.T) {
reqs, hSource := newSource(t)
usage, samples, err := hSource.GetUsagePercentile(api.ResourceCPU, 90, testImageWithVersion(), "16a8884e4c155457ee38a8901df6b536", true, time.Now(), time.Now())
assert.NoError(t, err)
assert.Equal(t, 1, len(reqs))
assert.Equal(t, "", reqs[... | explode_data.jsonl/55852 | {
"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,
1949,
14783,
32010,
457,
1155,
353,
8840,
836,
8,
341,
24395,
82,
11,
305,
3608,
1669,
501,
3608,
1155,
692,
88777,
11,
10469,
11,
1848,
1669,
305,
3608,
2234,
14783,
32010,
457,
24827,
20766,
31615,
11,
220,
24,
15,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestGroupConventions(t *testing.T) {
for _, g := range cfg.Groups {
// groups are easier to reason about if email and name match
expectedEmailId := g.Name + "@knative.team"
if g.EmailId != expectedEmailId {
t.Errorf("group '%s': expected email '%s', got '%s'", g.Name, expectedEmailId, g.EmailId)
}
}
} | explode_data.jsonl/24790 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 120
} | [
2830,
3393,
2808,
1109,
30659,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
342,
1669,
2088,
13286,
59800,
341,
197,
197,
322,
5203,
525,
8661,
311,
2874,
911,
421,
2551,
323,
829,
2432,
198,
197,
42400,
4781,
764,
1669,
342,
2967,
488,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_etcdRepository_CreateDetectorLink(t *testing.T) {
r := &etcdRepository{}
assert.Panics(t, func() { _ = r.CreateDetectorLink(context.Background(), "a", "b", 5) })
} | explode_data.jsonl/11281 | {
"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,
45668,
4385,
4624,
34325,
31606,
3939,
1155,
353,
8840,
836,
8,
341,
7000,
1669,
609,
295,
4385,
4624,
16094,
6948,
1069,
276,
1211,
1155,
11,
2915,
368,
314,
716,
284,
435,
7251,
31606,
3939,
5378,
19047,
1507,
330,
64,
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 |
func TestExprSemanticsCheckerUpdateSteps(t *testing.T) {
c := NewExprSemanticsChecker(false)
ty := NewEmptyObjectType()
prev := c.vars["steps"]
c.UpdateSteps(ty)
if c.vars["steps"] == prev {
t.Fatalf("Global variables map was not copied")
}
prev = c.vars["steps"]
c.UpdateSteps(ty)
if c.vars["steps"] != prev ... | explode_data.jsonl/43653 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 153
} | [
2830,
3393,
16041,
29499,
36233,
35188,
4289,
33951,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
1532,
16041,
29499,
36233,
35188,
3576,
340,
197,
1881,
1669,
1532,
3522,
49530,
741,
50728,
1669,
272,
59628,
1183,
24080,
7026,
1444,
16689,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMoveTile(t *testing.T) {
pos := [][]int{[]int{0, 0}, []int{0, 1}}
game := Game{gridSize: 4}
game.setup(GameInfo{TileState: createTileState(4, pos)})
game.moveTile(&Tile{x: 0, y: 0, value: 4}, &Tile{x: 3, y: 3})
if game.grid.cells[3][3].value != 4 {
t.Error("Moved cell should be equal to 4")
}
} | explode_data.jsonl/59004 | {
"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,
9860,
15628,
1155,
353,
8840,
836,
8,
341,
28164,
1669,
52931,
396,
90,
1294,
396,
90,
15,
11,
220,
15,
2137,
3056,
396,
90,
15,
11,
220,
16,
11248,
30677,
1669,
4050,
90,
4203,
1695,
25,
220,
19,
532,
30677,
25338,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestJoinFederatedRoomWithUnverifiableEvents(t *testing.T) {
deployment := Deploy(t, b.BlueprintAlice)
defer deployment.Destroy(t)
srv := federation.NewServer(t, deployment,
federation.HandleKeyRequests(),
federation.HandleMakeSendJoinRequests(),
federation.HandleTransactionRequests(nil, nil),
)
srv.Une... | explode_data.jsonl/37599 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2478
} | [
2830,
3393,
12292,
37,
7294,
657,
14003,
2354,
1806,
423,
22619,
7900,
1155,
353,
8840,
836,
8,
341,
197,
82213,
1669,
70595,
1155,
11,
293,
60159,
1350,
61686,
340,
16867,
23172,
57011,
1155,
692,
1903,
10553,
1669,
79275,
7121,
5475,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestToValueNilValue(t *testing.T) {
r := New()
var a Value
r.Set("a", a)
ret, err := r.RunString(`
""+a;
`)
if err != nil {
t.Fatal(err)
}
if !asciiString("null").SameAs(ret) {
t.Fatalf("ret: %v", ret)
}
} | explode_data.jsonl/10517 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 115
} | [
2830,
3393,
1249,
1130,
19064,
1130,
1155,
353,
8840,
836,
8,
341,
7000,
1669,
1532,
741,
2405,
264,
5162,
198,
7000,
4202,
445,
64,
497,
264,
340,
11262,
11,
1848,
1669,
435,
16708,
703,
61528,
197,
3014,
10,
64,
280,
197,
24183,
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... | 3 |
func TestNasTypeRequestedNSSAI(t *testing.T) {
for i, table := range RequestedNSSAITestTable {
t.Logf("Test Cnt:%d", i)
a := nasType.NewRequestedNSSAI(nasMessage.RegistrationRequestRequestedNSSAIType)
a.SetIei(table.in.GetIei())
a.SetLen(table.in.Len)
a.SetSNSSAIValue(table.in.Buffer)
assert.Equalf(t, ta... | explode_data.jsonl/38095 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 288
} | [
2830,
3393,
45,
300,
929,
37630,
53302,
15469,
1155,
353,
8840,
836,
8,
341,
2023,
600,
11,
1965,
1669,
2088,
6145,
291,
53302,
18587,
477,
2556,
341,
197,
3244,
98954,
445,
2271,
356,
406,
7533,
67,
497,
600,
340,
197,
11323,
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 TestEqual(t *testing.T) {
dp1 := newBasicNodeWithLen(nil)
dp2 := newBasicNodeWithLen(nil)
dp3 := newBasicNodeWithLen([]int{1, 2, 3})
if !Equal(dp1, dp2) {
t.Errorf("Expected dp1 and dp2 to be equal.\n")
}
if Equal(dp1, dp3) {
t.Errorf("Expected dp1 and dp3 to be unequal.\n")
}
} | explode_data.jsonl/9176 | {
"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,
2993,
1155,
353,
8840,
836,
8,
341,
55256,
16,
1669,
501,
15944,
1955,
2354,
11271,
27907,
340,
55256,
17,
1669,
501,
15944,
1955,
2354,
11271,
27907,
340,
55256,
18,
1669,
501,
15944,
1955,
2354,
11271,
10556,
396,
90,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.