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 TestReplyToPostWithLag(t *testing.T) {
if !replicaFlag {
t.Skipf("requires test flag -mysql-replica")
}
th := Setup(t).InitBasic()
defer th.TearDown()
if *th.App.Srv().Config().SqlSettings.DriverName != model.DATABASE_DRIVER_MYSQL {
t.Skipf("requires %q database driver", model.DATABASE_DRIVER_MYSQL)
}
... | explode_data.jsonl/26448 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 502
} | [
2830,
3393,
20841,
1249,
4133,
2354,
43,
351,
1155,
353,
8840,
836,
8,
341,
743,
753,
9995,
15317,
12135,
341,
197,
3244,
57776,
69,
445,
41375,
1273,
5181,
481,
12272,
5504,
79,
15317,
1138,
197,
630,
70479,
1669,
18626,
1155,
568,
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... | 1 |
func TestNewPointFloatScientific(t *testing.T) {
test(t, `cpu value=6.632243e+06 1000000000`,
NewTestPoint(
"cpu",
models.NewTags(map[string]string{}),
models.Fields{
"value": float64(6632243),
},
time.Unix(1, 0)),
)
} | explode_data.jsonl/16951 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 113
} | [
2830,
3393,
3564,
2609,
5442,
50565,
1086,
1155,
353,
8840,
836,
8,
341,
18185,
1155,
11,
1565,
16475,
897,
28,
21,
13,
21,
18,
17,
17,
19,
18,
68,
10,
15,
21,
220,
16,
15,
15,
15,
15,
15,
15,
15,
15,
15,
12892,
197,
197,
35... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestDataProvenanceSingleBundle(t *testing.T) {
f := newFixture(t)
// Dummy up since we are not using ld...
// Note: No bundle 'revision'...
version.Version = "0.10.7"
version.Vcs = "ac23eb45"
version.Timestamp = "today"
version.Hostname = "foo.bar.com"
// Initialize as if a bundle plugin is running
bp... | explode_data.jsonl/78999 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 771
} | [
2830,
93200,
1336,
1037,
681,
10888,
8409,
1155,
353,
8840,
836,
8,
1476,
1166,
1669,
501,
18930,
1155,
692,
197,
322,
50567,
705,
2474,
582,
525,
537,
1667,
26129,
9338,
197,
322,
7036,
25,
220,
2308,
12894,
364,
28342,
6,
9338,
7495... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFinalizeBlockValidatorUpdates(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
app := &testApp{}
logger := log.NewNopLogger()
cc := abciclient.NewLocalClient(logger, app)
proxyApp := proxy.New(cc, logger, proxy.NopMetrics())
err := proxyApp.Start(ctx)
require.NoEr... | explode_data.jsonl/49117 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 974
} | [
2830,
3393,
19357,
551,
4713,
14256,
37091,
1155,
353,
8840,
836,
8,
341,
20985,
11,
9121,
1669,
2266,
26124,
9269,
5378,
19047,
2398,
16867,
9121,
2822,
28236,
1669,
609,
1944,
2164,
16094,
17060,
1669,
1487,
7121,
45,
453,
7395,
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... | 4 |
func TestGetFileHeaders(t *testing.T) {
th := Setup().InitBasic()
defer th.TearDown()
Client := th.Client
channel := th.BasicChannel
if *th.App.Config().FileSettings.DriverName == "" {
t.Skip("skipping because no file driver is enabled")
}
testHeaders := func(data []byte, filename string, expectedContentTyp... | explode_data.jsonl/67440 | {
"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,
1949,
1703,
10574,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1005,
3803,
15944,
741,
16867,
270,
836,
682,
4454,
2822,
71724,
1669,
270,
11716,
198,
71550,
1669,
270,
48868,
9629,
271,
743,
353,
339,
5105,
10753,
100... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFloat32_EachE(t *testing.T) {
inputErr := errors.New("s error")
testcases := []struct {
name string
origin Float32
breakEach bool
inputErr error
expectLen int
expectErr error
}{
{
name: "test Float32 EachE",
origin: map[float32]struct{}{1: {}, 2: {}, 3: {}},
expectLen... | explode_data.jsonl/60113 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 546
} | [
2830,
3393,
5442,
18,
17,
2089,
610,
36,
1155,
353,
8840,
836,
8,
341,
22427,
7747,
1669,
5975,
7121,
445,
82,
1465,
1138,
18185,
23910,
1669,
3056,
1235,
341,
197,
11609,
414,
914,
198,
197,
197,
8611,
262,
13001,
18,
17,
198,
197,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestRunDetach(t *testing.T) {
stdout, stdoutPipe := io.Pipe()
cpty, tty, err := pty.Open()
if err != nil {
t.Fatal(err)
}
cli := client.NewDockerCli(tty, stdoutPipe, ioutil.Discard, "", testDaemonProto, testDaemonAddr, nil)
defer cleanup(globalEngine, t)
ch := make(chan struct{})
go func() {
defer cl... | explode_data.jsonl/9932 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 489
} | [
2830,
3393,
6727,
89306,
1155,
353,
8840,
836,
8,
341,
6736,
411,
11,
20075,
34077,
1669,
6399,
1069,
3444,
741,
1444,
1595,
11,
60067,
11,
1848,
1669,
281,
1881,
12953,
741,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
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... | 1 |
func TestGetOrderBook(t *testing.T) {
t.Parallel()
_, err := b.GetOrderBook(context.Background(),
OrderBookDataRequestParams{
Symbol: currency.NewPair(currency.BTC, currency.USDT),
Limit: 1000,
})
if err != nil {
t.Error("Binance GetOrderBook() error", err)
}
} | explode_data.jsonl/76643 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 110
} | [
2830,
3393,
1949,
4431,
7134,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
197,
6878,
1848,
1669,
293,
2234,
4431,
7134,
5378,
19047,
3148,
197,
197,
4431,
7134,
1043,
1900,
4870,
515,
298,
7568,
4001,
25,
11413,
7121,
12443,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLoopBackManager_updateDevicesFromSetConfigWithSize(t *testing.T) {
var mockexec = &mocks.GoMockExecutor{}
var manager = NewLoopBackManager(mockexec, "", "", logger)
config := []byte("defaultDriveSize: 30Mi \ndefaultDrivePerNodeCount: 3")
testConfigPath := "/tmp/config.yaml"
err := ioutil.WriteFile(testC... | explode_data.jsonl/73565 | {
"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,
14620,
3707,
2043,
8882,
40835,
3830,
1649,
2648,
2354,
1695,
1155,
353,
8840,
836,
8,
341,
2405,
7860,
11748,
284,
609,
16712,
82,
67131,
11571,
25255,
31483,
2405,
6645,
284,
1532,
14620,
3707,
2043,
30389,
11748,
11,
7342,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRenegotiationRejected(t *testing.T) {
config := testConfig.Clone()
test := &clientTest{
name: "RenegotiationRejected",
args: []string{"-state"},
config: config,
numRenegotiations: 1,
renegotiationExpectedToFail: 1,
check... | explode_data.jsonl/27721 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 297
} | [
2830,
3393,
34625,
65978,
7101,
77693,
1155,
353,
8840,
836,
8,
341,
25873,
1669,
1273,
2648,
64463,
741,
18185,
1669,
609,
2972,
2271,
515,
197,
11609,
25,
664,
330,
34625,
65978,
7101,
77693,
756,
197,
31215,
25,
664,
3056,
917,
4913,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestConstrainedPrefAttachmentSelectGreedyAllocation(t *testing.T) {
t.Parallel()
prand.Seed(time.Now().Unix())
const (
minChanSize = 0
maxChanSize = btcutil.Amount(btcutil.SatoshiPerBitcoin)
chanLimit = 3
threshold = 0.5
)
skipNodes := make(map[NodeID]struct{})
for _, graph := range chanGraphs... | explode_data.jsonl/28784 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1385
} | [
2830,
3393,
1109,
57727,
29978,
33569,
3379,
64747,
9313,
78316,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
25653,
437,
5732,
291,
9730,
13244,
1005,
55832,
12367,
4777,
2399,
197,
25320,
46019,
1695,
284,
220,
15,
198,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestWriteRetries(t *testing.T) {
t.Parallel()
for _, sleep := range []bool{false, true} {
sleep := sleep
t.Run(fmt.Sprintf("sleep=%t", sleep), func(t *testing.T) {
t.Parallel()
f := setup(t)
defer f.shutDown()
if sleep {
f.fake.sleepDelay = time.Second
client.RPCTimeouts(map[string]time.D... | explode_data.jsonl/5606 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 329
} | [
2830,
3393,
7985,
12020,
4019,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
2023,
8358,
6084,
1669,
2088,
3056,
2641,
90,
3849,
11,
830,
92,
341,
197,
52533,
1669,
6084,
198,
197,
3244,
16708,
28197,
17305,
445,
25809,
7846,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPortConflictWithSameDaemonPodDoesNotDeletePod(t *testing.T) {
for _, strategy := range updateStrategies() {
podSpec := v1.PodSpec{
NodeName: "port-conflict",
Containers: []v1.Container{{
Ports: []v1.ContainerPort{{
HostPort: 666,
}},
}},
}
manager, podControl, _, err := newTestCont... | explode_data.jsonl/50319 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 317
} | [
2830,
3393,
7084,
57974,
2354,
19198,
89177,
23527,
21468,
2623,
6435,
23527,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
8282,
1669,
2088,
2647,
2580,
69388,
368,
341,
197,
3223,
347,
8327,
1669,
348,
16,
88823,
8327,
515,
298,
30217,
67... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestApiDevAuthGetTenantDeviceStatus(t *testing.T) {
t.Parallel()
// enforce specific field naming in errors returned by API
updateRestErrorFieldName()
tcases := map[string]struct {
tid string
did string
daStatus *model.Status
daErr error
checker mt.ResponseChecker
}{
"ok": {
tid: "foo",
... | explode_data.jsonl/644 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 820
} | [
2830,
3393,
6563,
14592,
5087,
1949,
71252,
6985,
2522,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
197,
322,
28162,
3151,
2070,
34948,
304,
5975,
5927,
553,
5333,
198,
27175,
12416,
1454,
51241,
2822,
3244,
23910,
1669,
2415,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConverterRecursiveMapOptional(t *testing.T) {
fieldMap := make(map[string]codegen.FieldMapperEntry)
fieldMap["Seven.Two"] = codegen.FieldMapperEntry{
QualifiedName: "Five.One",
Override: false,
}
fieldMap["Five.One"] = codegen.FieldMapperEntry{
QualifiedName: "Five.Two",
Override: false,
... | explode_data.jsonl/62099 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 822
} | [
2830,
3393,
14920,
78542,
2227,
15309,
1155,
353,
8840,
836,
8,
341,
39250,
2227,
1669,
1281,
9147,
14032,
60,
95859,
17087,
10989,
5874,
340,
39250,
2227,
1183,
59528,
836,
1126,
1341,
284,
2038,
4370,
17087,
10989,
5874,
515,
197,
16995... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewAdminStorage_CheckDatabaseAccessible(t *testing.T) {
cleanTestDB(t, db)
s := NewAdminStorage(db)
if err := s.CheckDatabaseAccessible(context.Background()); err != nil {
t.Errorf("CheckDatabaseAccessible() = %v, want = nil", err)
}
} | explode_data.jsonl/30674 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 86
} | [
2830,
3393,
3564,
7210,
5793,
28188,
5988,
55390,
1155,
353,
8840,
836,
8,
341,
1444,
2675,
2271,
3506,
1155,
11,
2927,
340,
1903,
1669,
1532,
7210,
5793,
9791,
692,
743,
1848,
1669,
274,
10600,
5988,
55390,
5378,
19047,
13426,
1848,
96... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestHTTPFetcher_Meta(t *testing.T) {
empty := adapterResponse{}
handler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
var req fetcherRequest
body, _ := ioutil.ReadAll(r.Body)
err := json.Unmarshal(body, &req)
require.NoError(t, err)
require.Equal(t, float64(10), req.Meta["latestAn... | explode_data.jsonl/26496 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 310
} | [
2830,
3393,
9230,
97492,
59812,
1155,
353,
8840,
836,
8,
341,
197,
3194,
1669,
12956,
2582,
31483,
53326,
1669,
1758,
89164,
18552,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
197,
2405,
4232,
7807,
261,
1900,
198,
197,
35402,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUnitTransactionRecordQueryValidateWrong(t *testing.T) {
client := ClientForTestnet()
client.SetAutoValidateChecksums(true)
accountID, err := AccountIDFromString("0.0.123-rmkykd")
transactionID := TransactionIDGenerate(accountID)
assert.NoError(t, err)
recordQuery := NewTransactionRecordQuery().
SetTra... | explode_data.jsonl/78873 | {
"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,
4562,
8070,
6471,
2859,
17926,
29185,
1155,
353,
8840,
836,
8,
341,
25291,
1669,
8423,
2461,
2271,
4711,
741,
25291,
4202,
13253,
17926,
73190,
82,
3715,
340,
86866,
915,
11,
1848,
1669,
8615,
915,
44491,
445,
15,
13,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func Test_Auto_HTML_Show(t *testing.T) {
r := require.New(t)
err := withHTMLFile("cars/show.html", "Show: <%= car.Name %>", func(e *render.Engine) {
app := buffalo.New(buffalo.Options{})
app.GET("/cars/{id}", func(c buffalo.Context) error {
return c.Render(200, e.Auto(c, Car{Name: "Honda"}))
})
w := will... | explode_data.jsonl/2623 | {
"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,
1566,
1535,
56726,
79665,
1155,
353,
8840,
836,
8,
341,
7000,
1669,
1373,
7121,
1155,
692,
9859,
1669,
448,
5835,
1703,
445,
50708,
34175,
2564,
497,
330,
7812,
25,
90194,
1803,
2967,
1018,
21156,
2915,
2026,
353,
7322,
5442... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConfigRedirectsEmpty(t *testing.T) {
var data = "redirects: "
newTestConfig(data, func(c Config, seq sequence) {
c.loadRedirects(seq)
assert.Equal(t, 0, len(c.redirects))
})
} | explode_data.jsonl/8664 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 81
} | [
2830,
3393,
2648,
17725,
82,
3522,
1155,
353,
8840,
836,
8,
341,
2405,
821,
284,
330,
8117,
82,
25,
220,
6228,
8638,
2271,
2648,
2592,
11,
2915,
1337,
5532,
11,
12981,
8500,
8,
341,
197,
1444,
5104,
17725,
82,
34820,
340,
197,
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,
1,
1,
1,
1,
1,
1
] | 1 |
func TestUAccountTradesHistory(t *testing.T) {
t.Parallel()
if !areTestAPIKeysSet() {
t.Skip("skipping test: api keys not set")
}
_, err := b.UAccountTradesHistory(context.Background(), currency.NewPair(currency.BTC, currency.USDT), "", 5, time.Time{}, time.Time{})
if err != nil {
t.Error(err)
}
} | explode_data.jsonl/76587 | {
"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,
52,
7365,
1282,
3452,
13424,
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 TestClusterListenAddressForSingleReplica(t *testing.T) {
a := monitoringv1.Alertmanager{}
replicas := int32(1)
a.Spec.Version = operator.DefaultAlertmanagerVersion
a.Spec.Replicas = &replicas
statefulSet, err := makeStatefulSetSpec(&a, defaultTestConfig)
if err != nil {
t.Fatal(err)
}
amArgs := statefu... | explode_data.jsonl/25264 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 227
} | [
2830,
3393,
28678,
38714,
4286,
2461,
10888,
18327,
15317,
1155,
353,
8840,
836,
8,
341,
11323,
1669,
16558,
85,
16,
40143,
13297,
16094,
73731,
52210,
1669,
526,
18,
17,
7,
16,
340,
11323,
36473,
35842,
284,
5675,
13275,
9676,
13297,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestBlockedDiscardStatsOnClose(t *testing.T) {
dir, err := ioutil.TempDir("", "badger-test")
require.NoError(t, err)
defer os.Remove(dir)
db, err := Open(getTestOptions(dir))
require.NoError(t, err)
db.vlog.lfDiscardStats.m = map[uint32]int64{0: 0}
// This is important. Set updateSinceFlush to discardStats... | explode_data.jsonl/39106 | {
"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,
95847,
23477,
567,
16635,
1925,
7925,
1155,
353,
8840,
836,
8,
341,
48532,
11,
1848,
1669,
43144,
65009,
6184,
19814,
330,
13855,
1389,
16839,
1138,
17957,
35699,
1155,
11,
1848,
340,
16867,
2643,
13270,
14161,
692,
20939,
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 TestJobSpecsController_Show_MultipleTasks(t *testing.T) {
t.Parallel()
rpcClient, gethClient, _, assertMocksCalled := cltest.NewEthMocksWithStartupAssertions(t)
defer assertMocksCalled()
app, cleanup := cltest.NewApplication(t,
eth.NewClientWith(rpcClient, gethClient),
)
defer cleanup()
require.NoError(t... | explode_data.jsonl/31820 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 465
} | [
2830,
3393,
12245,
8327,
82,
2051,
79665,
1245,
12229,
25449,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
7000,
3992,
2959,
11,
633,
71,
2959,
11,
8358,
2060,
72577,
20960,
1669,
1185,
1944,
7121,
65390,
11571,
16056,
39076,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_can_remove_an_admin_role_to_user(t *testing.T) {
ctx, client, err := tests.NewClient(context.TODO())
require.NoError(t, err)
p := &okta.PasswordCredential{
Value: "Abcd1234",
}
uc := &okta.UserCredentials{
Password: p,
}
profile := okta.UserProfile{}
profile["firstName"] = "John"
profile["lastNam... | explode_data.jsonl/31227 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 647
} | [
2830,
3393,
27421,
18193,
12008,
12207,
19792,
2346,
3317,
1155,
353,
8840,
836,
8,
341,
20985,
11,
2943,
11,
1848,
1669,
7032,
7121,
2959,
5378,
90988,
2398,
17957,
35699,
1155,
11,
1848,
340,
3223,
1669,
609,
562,
2565,
25690,
48265,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRouterRegistryPcre(t *testing.T) {
s, c := initial(t)
defer s.Stop()
router := rregistry.NewRouter(
router.WithHandler(rpc.Handler),
router.WithRegistry(s.Options().Registry),
)
hrpc := rpc.NewHandler(
handler.WithClient(c),
handler.WithRouter(router),
)
hsrv := &http.Server{
Handler: ... | explode_data.jsonl/58076 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 327
} | [
2830,
3393,
9523,
15603,
47,
837,
1155,
353,
8840,
836,
8,
341,
1903,
11,
272,
1669,
2856,
1155,
340,
16867,
274,
30213,
2822,
67009,
1669,
435,
29172,
7121,
9523,
1006,
197,
67009,
26124,
3050,
2601,
3992,
31010,
1326,
197,
67009,
2612... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestClient_DeleteAggregator(t *testing.T) {
ctx := context.Background()
asUser := userClient(t)
withToken := withToken(t, asUser)
created, err := withToken.CreateAggregator(ctx, types.CreateAggregator{
Name: "test-aggregator",
AddHealthCheckPipeline: true,
})
wantEqual(t, err, nil)
e... | explode_data.jsonl/30420 | {
"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,
2959,
57418,
9042,
58131,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
60451,
1474,
1669,
1196,
2959,
1155,
340,
46948,
3323,
1669,
448,
3323,
1155,
11,
438,
1474,
692,
197,
7120,
11,
1848,
1669,
448,
3323,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStatus_SetMapping(t *testing.T) {
status := NewStatus(nil)
status.SetMapping(map[string]interface{}{"11": "test"})
if status.mapping[11] != "test" {
t.FailNow()
}
} | explode_data.jsonl/79123 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 74
} | [
2830,
3393,
2522,
14812,
6807,
1155,
353,
8840,
836,
8,
341,
23847,
1669,
1532,
2522,
27907,
340,
23847,
4202,
6807,
9147,
14032,
31344,
6257,
4913,
16,
16,
788,
330,
1944,
23625,
743,
2639,
56748,
58,
16,
16,
60,
961,
330,
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
] | 2 |
func TestTooBigBody(t *testing.T) {
r := NewTestRouter(t)
type Input struct {
ID string
}
r.Resource("/test", MaxBodyBytes(5)).Put("desc", func(input *Input) string {
return "hello, " + input.ID
})
w := httptest.NewRecorder()
req, _ := http.NewRequest(http.MethodPut, "/test", strings.NewReader(`{"id": "fo... | explode_data.jsonl/66546 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 181
} | [
2830,
3393,
31246,
15636,
5444,
1155,
353,
8840,
836,
8,
341,
7000,
1669,
1532,
2271,
9523,
1155,
692,
13158,
5571,
2036,
341,
197,
29580,
914,
198,
197,
630,
7000,
20766,
4283,
1944,
497,
7487,
5444,
7078,
7,
20,
4579,
19103,
445,
86... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestContextGetTime(t *testing.T) {
c, _ := CreateTestContext(httptest.NewRecorder())
t1, _ := time.Parse("1/2/2006 15:04:05", "01/01/2017 12:00:00")
c.Set("time", t1)
assert.Equal(t, t1, c.GetTime("time"))
} | explode_data.jsonl/26751 | {
"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,
1972,
1949,
1462,
1155,
353,
8840,
836,
8,
341,
1444,
11,
716,
1669,
4230,
2271,
1972,
73392,
83,
70334,
7121,
47023,
2398,
3244,
16,
11,
716,
1669,
882,
8937,
445,
16,
14,
17,
14,
17,
15,
15,
21,
220,
16,
20,
25,
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 TestKubernetesTraits(t *testing.T) {
env := createTestEnv(t, v1alpha1.IntegrationPlatformClusterKubernetes, "from('timer:tick').to('log:info')")
res := processTestEnv(t, env)
assert.NotNil(t, env.GetTrait(ID("deployment")))
assert.Nil(t, env.GetTrait(ID("service")))
assert.Nil(t, env.GetTrait(ID("route")))
a... | explode_data.jsonl/54525 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 246
} | [
2830,
3393,
42,
29827,
42820,
1155,
353,
8840,
836,
8,
341,
57538,
1669,
1855,
2271,
14359,
1155,
11,
348,
16,
7141,
16,
7371,
17376,
17296,
28678,
42,
29827,
11,
330,
1499,
492,
19278,
25,
34155,
1823,
983,
492,
839,
25,
2733,
96335,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPublicDeployment(t *testing.T) {
t.Parallel()
terraformOptions := &terraform.Options{
TerraformDir: "../examples",
Vars: map[string]interface{}{
"is_private": false,
},
NoColor: true,
}
defer terraform.Destroy(t, terraformOptions)
terraform.InitAndApply(t, terraformOptions)
// Getting outp... | explode_data.jsonl/47388 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 334
} | [
2830,
3393,
12676,
75286,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
197,
61385,
3798,
1669,
609,
61385,
22179,
515,
197,
10261,
13886,
627,
6184,
25,
7005,
51668,
756,
197,
17446,
1561,
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,
1... | 1 |
func TestFlipManagerLoadFlip(t *testing.T) {
runWithMemberTypes(t, func(mt chat1.ConversationMembersType) {
ctc := makeChatTestContext(t, "FlipManager", 2)
defer ctc.cleanup()
users := ctc.users()
ui0 := kbtest.NewChatUI()
ui1 := kbtest.NewChatUI()
ctc.as(t, users[0]).h.mockChatUI = ui0
ctc.as(t, users[... | explode_data.jsonl/51275 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1097
} | [
2830,
3393,
46808,
2043,
5879,
46808,
1155,
353,
8840,
836,
8,
341,
56742,
2354,
9366,
4173,
1155,
11,
2915,
81618,
6236,
16,
4801,
22323,
24371,
929,
8,
341,
197,
89216,
66,
1669,
1281,
15672,
2271,
1972,
1155,
11,
330,
46808,
2043,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_findErrorNums(t *testing.T) {
type args struct {
nums []int
}
tests := []struct {
name string
args args
want []int
}{
{
name: "ex1",
args: args{
nums: []int{1, 2, 2, 4},
},
want: []int{2, 3},
},
{
name: "ex2",
args: args{
nums: []int{1, 1},
},
want: []int{1, 2... | explode_data.jsonl/22103 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 491
} | [
2830,
3393,
21814,
1454,
4651,
82,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
22431,
82,
3056,
396,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
31215,
2827,
198,
197,
50780,
3056,
396,
198,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestGetSpotTransactionDetails(t *testing.T) {
request := okgroup.GetSpotTransactionDetailsRequest{
OrderID: 1234,
InstrumentID: spotCurrency,
}
_, err := o.GetSpotTransactionDetails(request)
testStandardErrorHandling(t, err)
} | explode_data.jsonl/30166 | {
"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,
1949,
47049,
8070,
7799,
1155,
353,
8840,
836,
8,
341,
23555,
1669,
5394,
4074,
2234,
47049,
8070,
7799,
1900,
515,
197,
197,
4431,
915,
25,
414,
220,
16,
17,
18,
19,
345,
197,
197,
56324,
915,
25,
7702,
26321,
345,
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 TestInterFloat64_Simple(t *testing.T) {
z1 := NewFloat64()
z1.Add(0, "1")
z2 := NewFloat64()
z2.Add(0, "1")
z3 := NewFloat64()
z3.Add(0, "2")
z := InterFloat64(z1, z2, z3)
assert.Zero(t, z.Len())
} | explode_data.jsonl/25010 | {
"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,
3306,
5442,
21,
19,
1098,
6456,
1155,
353,
8840,
836,
8,
341,
20832,
16,
1669,
1532,
5442,
21,
19,
741,
20832,
16,
1904,
7,
15,
11,
330,
16,
1138,
20832,
17,
1669,
1532,
5442,
21,
19,
741,
20832,
17,
1904,
7,
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 TestValidateDataPlanePods(t *testing.T) {
t.Run("Returns an error if no inject pods were found", func(t *testing.T) {
err := validateDataPlanePods([]*pb.Pod{}, "emojivoto")
if err == nil {
t.Fatal("Expected error, got nothing")
}
if err.Error() != "No \"linkerd-proxy\" containers found in the \"emojiv... | explode_data.jsonl/19144 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1097
} | [
2830,
3393,
17926,
1043,
34570,
23527,
82,
1155,
353,
8840,
836,
8,
1476,
3244,
16708,
445,
16446,
458,
1465,
421,
902,
15551,
54587,
1033,
1730,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
9859,
1669,
9593,
1043,
34570,
23527,
82,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPool(t *testing.T) {
assertAllocation := func(t *testing.T, s signal.Signal, e expectedAllocation) {
t.Helper()
if e.channels != s.Channels() {
t.Fatalf("Invalid number of channels: %v expected: %v", s.Channels(), e.channels)
}
if e.length != s.Length() {
t.Fatalf("Invalid buffer length: %v expe... | explode_data.jsonl/36809 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1273
} | [
2830,
3393,
10551,
1155,
353,
8840,
836,
8,
341,
6948,
78316,
1669,
2915,
1155,
353,
8840,
836,
11,
274,
8286,
75669,
11,
384,
3601,
78316,
8,
341,
197,
3244,
69282,
741,
197,
743,
384,
39895,
961,
274,
6353,
6680,
368,
341,
298,
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... | 6 |
func TestLedgerQueries(t *testing.T) {
testSetup := mainTestSetup
aKey := integration.GetKeyName(t)
bKey := integration.GetKeyName(t)
moveTxArg := integration.ExampleCCTxArgs(aKey, bKey, "1")
queryArg := integration.ExampleCCQueryArgs(bKey)
// Setup tests with a random chaincode ID.
sdk, targets := initializeL... | explode_data.jsonl/65669 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 942
} | [
2830,
3393,
60850,
1389,
55261,
1155,
353,
8840,
836,
8,
341,
18185,
21821,
1669,
1887,
2271,
21821,
271,
11323,
1592,
1669,
17590,
51723,
675,
1155,
340,
2233,
1592,
1669,
17590,
51723,
675,
1155,
340,
49288,
31584,
2735,
1669,
17590,
51... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestProxyModeDefaults(t *testing.T) {
// Test that default is what we expect
mockCS := getMockBaseContainerService("1.10.12")
properties := mockCS.Properties
properties.OrchestratorProfile.OrchestratorType = Kubernetes
properties.MasterProfile.Count = 1
mockCS.setOrchestratorDefaults(true, true)
if propert... | explode_data.jsonl/33888 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 375
} | [
2830,
3393,
16219,
3636,
16273,
1155,
353,
8840,
836,
8,
341,
197,
322,
3393,
429,
1638,
374,
1128,
582,
1720,
198,
77333,
6412,
1669,
633,
11571,
3978,
4502,
1860,
445,
16,
13,
16,
15,
13,
16,
17,
1138,
86928,
1669,
7860,
6412,
159... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBucketStore_ManyParts_e2e(t *testing.T) {
objtesting.ForeachStore(t, func(t *testing.T, bkt objstore.Bucket) {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
dir, err := ioutil.TempDir("", "test_bucketstore_e2e")
testutil.Ok(t, err)
defer func() { testutil.Ok(t, os.RemoveAll... | explode_data.jsonl/18715 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 282
} | [
2830,
3393,
36018,
6093,
1245,
3767,
28921,
2204,
17,
68,
1155,
353,
8840,
836,
8,
341,
22671,
8840,
991,
8539,
6093,
1155,
11,
2915,
1155,
353,
8840,
836,
11,
293,
5840,
2839,
4314,
1785,
11152,
8,
341,
197,
20985,
11,
9121,
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 TestMap(t *testing.T) {
orig := map[string]int{
"test": 1,
"test2": 2,
"test3": 4,
}
enum := FromMap(orig)
mappedEnum := Map(enum, func(k string, v int) (int, string) {
return v, k
})
expected := map[int]string{
1: "test",
2: "test2",
4: "test3",
}
actual := make(map[int]string)
for {
... | explode_data.jsonl/70411 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 208
} | [
2830,
3393,
2227,
1155,
353,
8840,
836,
8,
341,
197,
4670,
1669,
2415,
14032,
63025,
515,
197,
197,
1,
1944,
788,
220,
220,
16,
345,
197,
197,
1,
1944,
17,
788,
220,
17,
345,
197,
197,
1,
1944,
18,
788,
220,
19,
345,
197,
630,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestNewTransferDetailsEnv(t *testing.T) {
os.Setenv("OSG_DISABLE_PROXY_FALLBACK", "")
transfers := NewTransferDetails("cache.edu", false)
assert.Equal(t, 1, len(transfers))
assert.Equal(t, true, transfers[0].Proxy)
transfers = NewTransferDetails("cache.edu", true)
assert.Equal(t, 2, len(transfers))
assert.... | explode_data.jsonl/22511 | {
"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,
3564,
21970,
7799,
14359,
1155,
353,
8840,
836,
8,
341,
25078,
4202,
3160,
445,
3126,
38,
25680,
59065,
83962,
15839,
497,
14676,
72453,
49793,
1669,
1532,
21970,
7799,
445,
9360,
12586,
497,
895,
340,
6948,
12808,
1155,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestDuplicateRegisterEncoder(t *testing.T) {
testEncoders(func() {
RegisterEncoder("foo", newNilEncoder)
assert.Error(t, RegisterEncoder("foo", newNilEncoder), "expected an error when registering an encoder with the same name twice")
})
} | explode_data.jsonl/54644 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 82
} | [
2830,
3393,
53979,
8690,
19921,
1155,
353,
8840,
836,
8,
341,
18185,
7408,
52498,
18552,
368,
341,
197,
79096,
19921,
445,
7975,
497,
501,
19064,
19921,
340,
197,
6948,
6141,
1155,
11,
8451,
19921,
445,
7975,
497,
501,
19064,
19921,
701... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNodeSetMetaH(t *testing.T) {
stg, _ := storage.Get("mock")
envs.Get().SetStorage(stg)
viper.Set("verbose", 0)
strPointer := func(s string) *string { return &s }
var (
ctx = context.Background()
n1 = getNodeAsset("test1", "", true)
n2 = getNodeAsset("test2", "", true)
uo = v1.Request().Node().Upd... | explode_data.jsonl/47398 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1291
} | [
2830,
3393,
1955,
1649,
12175,
39,
1155,
353,
8840,
836,
8,
341,
18388,
70,
11,
716,
1669,
5819,
2234,
445,
16712,
1138,
57538,
82,
2234,
1005,
1649,
5793,
5895,
70,
340,
5195,
12858,
4202,
445,
14883,
497,
220,
15,
340,
11355,
9084,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCounterquoteQuerySingle(t *testing.T) {
keeper, ctx := setupKeeper(t)
wctx := sdk.WrapSDKContext(ctx)
msgs := createNCounterquote(keeper, ctx, 2)
for _, tc := range []struct {
desc string
request *types.QueryGetCounterquoteRequest
response *types.QueryGetCounterquoteResponse
err error
}{... | explode_data.jsonl/9747 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 486
} | [
2830,
3393,
14099,
2949,
2859,
10888,
1155,
353,
8840,
836,
8,
341,
197,
18861,
11,
5635,
1669,
6505,
77233,
1155,
340,
6692,
3773,
1669,
45402,
38968,
31534,
1972,
7502,
340,
21169,
82,
1669,
1855,
45,
14099,
2949,
7,
18861,
11,
5635,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestExitCode(t *testing.T) {
myErr := errors.New("some error")
errExitCode := fehler.ExitCode(42, myErr)
err := fmt.Errorf("got error: %w", errExitCode)
t.Run("Find exit code error", func(t *testing.T) {
var errExit interface {
ExitCode() int
}
if !errors.As(err, &errExit) {
t.Errorf("unwrapping e... | explode_data.jsonl/21318 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 154
} | [
2830,
3393,
15339,
2078,
1155,
353,
8840,
836,
8,
341,
13624,
7747,
1669,
5975,
7121,
445,
14689,
1465,
1138,
9859,
15339,
2078,
1669,
1152,
71,
1536,
34358,
2078,
7,
19,
17,
11,
847,
7747,
340,
9859,
1669,
8879,
13080,
445,
22390,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestCommissionValidateNewRate(t *testing.T) {
now := time.Now().UTC()
c1 := NewCommission(sdk.MustNewDecFromStr("0.40"), sdk.MustNewDecFromStr("0.80"), sdk.MustNewDecFromStr("0.10"))
c1.UpdateTime = now
testCases := []struct {
input Commission
newRate sdk.Dec
blockTime time.Time
expectErr bool
... | explode_data.jsonl/82249 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 508
} | [
2830,
3393,
73750,
17926,
3564,
11564,
1155,
353,
8840,
836,
8,
341,
80922,
1669,
882,
13244,
1005,
21183,
741,
1444,
16,
1669,
1532,
73750,
1141,
7584,
50463,
3564,
4900,
3830,
2580,
445,
15,
13,
19,
15,
3975,
45402,
50463,
3564,
4900,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPushForceAndIgnoreIfExists(t *testing.T) {
t.Log("Test push action with both --force and --ignore-if-exists flags")
name := "test-push-force-and-ignore-if-exists"
dir := "charts"
setupRepo(t, name, dir)
defer teardownRepo(t, name)
cmd, stdout, stderr := command(fmt.Sprintf("helm s3 push testdata/foo-1.... | explode_data.jsonl/13709 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 301
} | [
2830,
3393,
16644,
18573,
3036,
12497,
40232,
1155,
353,
8840,
836,
8,
341,
3244,
5247,
445,
2271,
4484,
1917,
448,
2176,
1177,
8833,
323,
1177,
13130,
44637,
10187,
1671,
8042,
5130,
11609,
1669,
330,
1944,
98643,
80049,
9777,
43171,
446... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRongCloud_ChatroomBroadcast(t *testing.T) {
rc := NewRongCloud(
os.Getenv("APP_KEY"),
os.Getenv("APP_SECRET"),
)
msg := TXTMsg{
Content: "hello",
Extra: "helloExtra",
}
err := rc.ChatRoomBroadcast(
"7Szq13MKRVortoknTAk7W8",
"RC:TxtMsg",
&msg,
)
t.Log(err)
} | explode_data.jsonl/39000 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 146
} | [
2830,
3393,
49,
644,
16055,
920,
9198,
2966,
43362,
1155,
353,
8840,
836,
8,
1476,
30295,
1669,
1532,
49,
644,
16055,
1006,
197,
25078,
64883,
445,
14707,
6600,
4461,
197,
25078,
64883,
445,
14707,
31408,
4461,
197,
692,
21169,
1669,
72... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestErrorList(t *testing.T) {
storage := map[string]RESTStorage{}
simpleStorage := SimpleRESTStorage{
errors: map[string]error{"list": fmt.Errorf("test Error")},
}
storage["simple"] = &simpleStorage
handler := Handle(storage, codec, "/prefix/version", selfLinker)
server := httptest.NewServer(handler)
res... | explode_data.jsonl/71491 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 207
} | [
2830,
3393,
1454,
852,
1155,
353,
8840,
836,
8,
341,
197,
16172,
1669,
2415,
14032,
60,
38307,
5793,
16094,
1903,
6456,
5793,
1669,
8993,
38307,
5793,
515,
197,
73424,
25,
2415,
14032,
60,
841,
4913,
1607,
788,
8879,
13080,
445,
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... | 3 |
func TestFieldSetDec(t *testing.T) {
f := &field{}
f.setType("N")
f.setLen(5)
f.setDec(2)
require.Equal(t, byte(2), f.Dec)
} | explode_data.jsonl/79443 | {
"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,
1877,
1649,
4900,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
609,
2566,
16094,
1166,
42433,
445,
45,
1138,
1166,
980,
11271,
7,
20,
340,
1166,
980,
4900,
7,
17,
340,
17957,
12808,
1155,
11,
4922,
7,
17,
701,
282,
22442,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStoreSafeGet(t *testing.T) {
st, closer := makeStore()
defer closer()
firstItem, err := st.Set(schema.KeyValue{Key: []byte(`first`), Value: []byte(`firstValue`)})
assert.NoError(t, err)
seconditem, err := st.Set(schema.KeyValue{Key: []byte(`second`), Value: []byte(`secondValue`)})
assert.NoError(t, err)... | explode_data.jsonl/77969 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 585
} | [
2830,
3393,
6093,
25663,
1949,
1155,
353,
8840,
836,
8,
341,
18388,
11,
12128,
1669,
1281,
6093,
741,
16867,
12128,
2822,
42190,
1234,
11,
1848,
1669,
357,
4202,
42735,
9610,
1130,
90,
1592,
25,
3056,
3782,
5809,
3896,
63,
701,
5162,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConvertStructRequiredToOptional(t *testing.T) {
lines, err := convertTypes(
"Foo", "Bar",
`struct NestedFoo {
1: required string one
2: optional string two
}
struct NestedBar {
1: required string one
2: optional string two
}
struct Foo {
3: optional NestedFoo three
}
struct B... | explode_data.jsonl/62035 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 268
} | [
2830,
3393,
12012,
9422,
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,
71742,
40923,
341,
298,
197,
16,
25,
2567,
914,
825,
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 TestNewTeam_String(t *testing.T) {
v := NewTeam{
Name: "",
Description: String(""),
ParentTeamID: Int64(0),
Permission: String(""),
Privacy: String(""),
LDAPDN: String(""),
}
want := `github.NewTeam{Name:"", Description:"", ParentTeamID:0, Permission:"", Privacy:"", LDAPDN:""}`... | explode_data.jsonl/33262 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 177
} | [
2830,
3393,
3564,
14597,
31777,
1155,
353,
8840,
836,
8,
341,
5195,
1669,
1532,
14597,
515,
197,
21297,
25,
260,
8324,
197,
47414,
25,
220,
923,
445,
4461,
197,
197,
8387,
14597,
915,
25,
1333,
21,
19,
7,
15,
1326,
197,
197,
14966,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMoreLikeThis(t *testing.T) {
client := setupTestClientAndCreateIndex(t)
tweet1 := tweet{User: "olivere", Message: "Welcome to Golang and ElasticSearch."}
tweet2 := tweet{User: "olivere", Message: "Another Golang topic."}
tweet3 := tweet{User: "sandrae", Message: "Cycling is fun."}
// Add all documents
... | explode_data.jsonl/66481 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 442
} | [
2830,
3393,
7661,
12949,
1986,
1155,
353,
8840,
836,
8,
341,
25291,
1669,
6505,
2271,
2959,
3036,
4021,
1552,
1155,
692,
3244,
4488,
16,
1669,
11809,
90,
1474,
25,
330,
337,
344,
485,
497,
4856,
25,
330,
13936,
311,
479,
37287,
323,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 7 |
func Test_mime_MediaTypes_(t *testing.T) {
zr.TBegin(t)
if len(MediaTypes) != len(expectMediaTypes) {
zr.TFail(t,
`MediaTypes has `, len(MediaTypes), ` items.`,
` must have `, len(expectMediaTypes), ` items.`,
)
}
for i, itm := range MediaTypes {
if itm != expectMediaTypes[i] {
zr.TFail(t, `MediaType... | explode_data.jsonl/7183 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 189
} | [
2830,
3393,
83624,
1245,
4495,
4173,
8361,
83,
353,
8840,
836,
8,
341,
20832,
81,
836,
11135,
1155,
340,
743,
2422,
33826,
4173,
8,
961,
2422,
89443,
12661,
4173,
8,
341,
197,
20832,
81,
836,
19524,
1155,
345,
298,
197,
63,
12661,
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... | 4 |
func TestGreetWithName(t *testing.T) {
name := "Gopher"
t.Run("Morning", func(t *testing.T) {
got := greet(name, 9)
expected := "Good morning, Gopher!"
if got != expected {
t.Errorf("Unexpected greeting. Got %q but expected %q", got, expected)
}
})
t.Run("Afternoon", func(t *testing.T) {
got := greet(... | explode_data.jsonl/64680 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 346
} | [
2830,
3393,
38,
3744,
54523,
1155,
353,
8840,
836,
8,
341,
11609,
1669,
330,
38,
16940,
1837,
3244,
16708,
445,
84344,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
3174,
354,
1669,
40786,
3153,
11,
220,
24,
340,
197,
42400,
1669,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestDeleteApp(t *testing.T) {
ctx := context.Background()
appServer := newTestAppServer()
createReq := application.ApplicationCreateRequest{
Application: *newTestApp(),
}
app, err := appServer.Create(ctx, &createReq)
assert.Nil(t, err)
app, err = appServer.Get(ctx, &application.ApplicationQuery{Name: &ap... | explode_data.jsonl/46616 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 498
} | [
2830,
3393,
6435,
2164,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
2266,
19047,
741,
28236,
5475,
1669,
501,
2271,
2164,
5475,
741,
39263,
27234,
1669,
3766,
17521,
4021,
1900,
515,
197,
78329,
25,
353,
931,
2271,
2164,
3148,
197,
532,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestInt(t *testing.T) {
val := int(1)
m := map[string]interface{}{"value": val, "nothing": nil}
assert.Equal(t, val, New(m).Get("value").Int())
assert.Equal(t, val, New(m).Get("value").MustInt())
assert.Equal(t, int(0), New(m).Get("nothing").Int())
assert.Equal(t, val, New(m).Get("nothing").Int(1))
assert... | explode_data.jsonl/23416 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 161
} | [
2830,
3393,
1072,
1155,
353,
8840,
836,
8,
1476,
19302,
1669,
526,
7,
16,
340,
2109,
1669,
2415,
14032,
31344,
6257,
4913,
957,
788,
1044,
11,
330,
41212,
788,
2092,
532,
6948,
12808,
1155,
11,
1044,
11,
1532,
1255,
568,
1949,
445,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestAllScalars(t *testing.T) {
var a allScalars
err := Unmarshal([]byte(testScalarsInput), &a)
if err != nil {
t.Fatal(err)
}
if !reflect.DeepEqual(a, all) {
t.Errorf("have %+v want %+v", a, all)
}
} | explode_data.jsonl/48614 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 104
} | [
2830,
3393,
2403,
54005,
1155,
353,
8840,
836,
8,
341,
2405,
264,
678,
54005,
198,
9859,
1669,
1230,
27121,
10556,
3782,
8623,
54005,
2505,
701,
609,
64,
692,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
532,
743,
753,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPlanMigration_downApplyAll(t *testing.T) {
db := dbtest.OpenWithoutMigrations(t)
session, err := dbpkg.Open(db.DSN)
require.NoError(t, err)
n, err := Migrate(session, migrate.Up, 2)
require.NoError(t, err)
require.Equal(t, 2, n)
migrations, err := PlanMigration(session, migrate.Down, 0)
require.NoErr... | explode_data.jsonl/39321 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 194
} | [
2830,
3393,
20485,
20168,
13998,
28497,
2403,
1155,
353,
8840,
836,
8,
341,
20939,
1669,
2927,
1944,
12953,
26040,
44,
17824,
1155,
340,
25054,
11,
1848,
1669,
2927,
30069,
12953,
9791,
909,
18966,
340,
17957,
35699,
1155,
11,
1848,
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 TestNextMany(t *testing.T) {
count := 70000
for _, gap := range []uint64{1, 8, 32, 128} {
expected := make([]uint64, count)
{
v := uint64(0)
for i := range expected {
expected[i] = v
v += gap
}
}
bm := BitmapOf(expected...)
for _, bufSize := range []int{1, 64, 4096, count} {
buf :=... | explode_data.jsonl/20341 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 372
} | [
2830,
3393,
5847,
8441,
1155,
353,
8840,
836,
8,
341,
18032,
1669,
220,
22,
15,
15,
15,
15,
271,
2023,
8358,
12929,
1669,
2088,
3056,
2496,
21,
19,
90,
16,
11,
220,
23,
11,
220,
18,
17,
11,
220,
16,
17,
23,
92,
341,
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... | 8 |
func TestZoektIndexedRepos_single(t *testing.T) {
repoRev := func(revSpec string) *search.RepositoryRevisions {
return &search.RepositoryRevisions{
Repo: &types.Repo{ID: api.RepoID(0), Name: "test/repo"},
Revs: []search.RevisionSpecifier{
{RevSpec: revSpec},
},
}
}
zoektRepos := map[string]*zoekt.Re... | explode_data.jsonl/52666 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1207
} | [
2830,
3393,
57,
78,
17149,
69941,
693,
966,
19487,
1155,
353,
8840,
836,
8,
341,
17200,
5368,
36184,
1669,
2915,
5801,
85,
8327,
914,
8,
353,
1836,
25170,
693,
40015,
341,
197,
853,
609,
1836,
25170,
693,
40015,
515,
298,
197,
25243,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReconcileRouteSetLabels(t *testing.T) {
routeAPIFound = true
ctx := context.Background()
logf.SetLogger(ZapLogger(true))
argoCD := makeArgoCD(func(a *argov1alpha1.ArgoCD) {
a.Spec.Server.Route.Enabled = true
labels := make(map[string]string)
labels["my-key"] = "my-value"
a.Spec.Server.Route.Labels ... | explode_data.jsonl/26671 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 426
} | [
2830,
3393,
693,
40446,
457,
4899,
1649,
23674,
1155,
353,
8840,
836,
8,
341,
7000,
2133,
7082,
6650,
284,
830,
198,
20985,
1669,
2266,
19047,
741,
6725,
69,
4202,
7395,
27855,
391,
7395,
3715,
1171,
197,
12088,
6484,
1669,
1281,
2735,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRetry(t *testing.T) {
f := errorGenerator(4, true)
if err := Retry(5, f); err != nil {
t.Fatalf("Error should not have been raised by retry.")
}
f = errorGenerator(5, true)
if err := Retry(4, f); err == nil {
t.Fatalf("Error should have been raised by retry.")
}
} | explode_data.jsonl/30068 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 111
} | [
2830,
3393,
51560,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
1465,
12561,
7,
19,
11,
830,
340,
743,
1848,
1669,
78870,
7,
20,
11,
282,
1215,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
1454,
1265,
537,
614,
1012,
9226,
553,
22683,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreate(t *testing.T) {
storage, server := newStorage(t)
defer server.Terminate(t)
defer storage.Store.DestroyFunc()
test := registrytest.New(t, storage.Store).ClusterScope()
psp := validNewPodSecurityPolicy()
psp.ObjectMeta = metav1.ObjectMeta{GenerateName: "foo-"}
test.TestCreate(
// valid
psp,
/... | explode_data.jsonl/24895 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 162
} | [
2830,
3393,
4021,
1155,
353,
8840,
836,
8,
341,
197,
16172,
11,
3538,
1669,
501,
5793,
1155,
340,
16867,
3538,
836,
261,
34016,
1155,
340,
16867,
5819,
38047,
57011,
9626,
741,
18185,
1669,
19424,
1944,
7121,
1155,
11,
5819,
38047,
568,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestConfigServiceV2ListSinks(t *testing.T) {
var nextPageToken string = ""
var sinksElement *loggingpb.LogSink = &loggingpb.LogSink{}
var sinks = []*loggingpb.LogSink{sinksElement}
var expectedResponse = &loggingpb.ListSinksResponse{
NextPageToken: nextPageToken,
Sinks: sinks,
}
mockConfig.err =... | explode_data.jsonl/77767 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 448
} | [
2830,
3393,
2648,
1860,
53,
17,
852,
50,
15504,
1155,
353,
8840,
836,
8,
341,
2405,
83595,
3323,
914,
284,
8389,
2405,
56952,
1691,
353,
25263,
16650,
5247,
45094,
284,
609,
25263,
16650,
5247,
45094,
16094,
2405,
56952,
284,
29838,
252... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAdditionalConfigMap(t *testing.T) {
sset, err := makeStatefulSet(&monitoringv1.Alertmanager{
Spec: monitoringv1.AlertmanagerSpec{
ConfigMaps: []string{"test-cm1"},
},
}, defaultTestConfig, "")
if err != nil {
t.Fatalf("Unexpected error while making StatefulSet: %v", err)
}
cmVolumeFound := false... | explode_data.jsonl/25253 | {
"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,
29019,
2648,
2227,
1155,
353,
8840,
836,
8,
341,
1903,
746,
11,
1848,
1669,
1281,
1397,
1262,
1649,
2099,
32225,
287,
85,
16,
40143,
13297,
515,
197,
7568,
992,
25,
16558,
85,
16,
40143,
13297,
8327,
515,
298,
66156,
36562... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRegressionPolicyNamespaceOrdering3059(t *testing.T) {
// Test for race condition between namespace and networkpolicy events
// https://github.com/weaveworks/weave/issues/3059
sourceNamespace := &coreapi.Namespace{
ObjectMeta: metav1.ObjectMeta{
Name: "source",
Labels: map[string]string{
"app": ... | explode_data.jsonl/31786 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 764
} | [
2830,
3393,
45200,
13825,
22699,
4431,
287,
18,
15,
20,
24,
1155,
353,
8840,
836,
8,
341,
197,
322,
3393,
369,
6957,
2971,
1948,
4473,
323,
3922,
34790,
4357,
198,
197,
322,
3703,
1110,
5204,
905,
53686,
402,
2445,
82,
53686,
523,
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... | 1 |
func TestCmdAddNoPrevResult(t *testing.T) {
confNoPrevResult := `{
"cniVersion": "0.3.0",
"name": "istio-plugin-sample-test",
"type": "sample",
"runtimeconfig": {
"sampleconfig": []
},
"loglevel": "debug",
"kubernetes": {
"k8sapiroot": "APIRoot",
"kubeconfig": "testK8sCon... | explode_data.jsonl/17802 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 252
} | [
2830,
3393,
15613,
2212,
2753,
33528,
2077,
1155,
353,
8840,
836,
8,
341,
67850,
2753,
33528,
2077,
1669,
1565,
515,
262,
330,
66,
7751,
5637,
788,
330,
15,
13,
18,
13,
15,
756,
197,
31486,
788,
330,
380,
815,
23629,
83879,
16839,
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 TestReedSolomonMultiply(t *testing.T) {
cases := [][3]byte{
{0x00, 0x00, 0x00},
{0x01, 0x01, 0x01},
{0x02, 0x02, 0x04},
{0x00, 0x6E, 0x00},
{0xB2, 0xDD, 0xE6},
{0x41, 0x11, 0x25},
{0xB0, 0x1F, 0x11},
{0x05, 0x75, 0xBC},
{0x52, 0xB5, 0xAE},
{0xA8, 0x20, 0xA4},
{0x0E, 0x44, 0x9F},
{0xD4, 0x1... | explode_data.jsonl/54184 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 388
} | [
2830,
3393,
693,
291,
48812,
34585,
95155,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
508,
1457,
18,
90184,
515,
197,
197,
90,
15,
87,
15,
15,
11,
220,
15,
87,
15,
15,
11,
220,
15,
87,
15,
15,
1583,
197,
197,
90,
15,
87,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIncident_CreateIncidentNote(t *testing.T) {
setup()
defer teardown()
input := IncidentNote{
Content: "foo",
}
mux.HandleFunc("/incidents/1/notes", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "POST")
_, _ = w.Write([]byte(`{"note": {"id": "1","content": "foo"}}`))
})
client :=... | explode_data.jsonl/76396 | {
"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,
39245,
1713,
34325,
39245,
1713,
9112,
1155,
353,
8840,
836,
8,
341,
84571,
741,
16867,
49304,
2822,
22427,
1669,
68735,
9112,
515,
197,
197,
2762,
25,
330,
7975,
756,
197,
630,
2109,
2200,
63623,
4283,
2840,
6880,
14,
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 Test_NewSubscriber(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
Convey("Given a valid manipulator with a backend", t, func() {
m := maniptest.NewTestManipulator()
s := maniptest.NewTestSubscriber()
d, err := newDatastore()
So(err, ShouldBeNil)
v, err := New... | explode_data.jsonl/66555 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 548
} | [
2830,
3393,
39582,
40236,
1155,
353,
8840,
836,
8,
1476,
20985,
11,
9121,
1669,
2266,
26124,
9269,
5378,
19047,
2398,
16867,
9121,
2822,
93070,
5617,
445,
22043,
264,
2697,
14609,
10511,
448,
264,
19163,
497,
259,
11,
2915,
368,
341,
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 TestGetConfirm(t *testing.T) {
t.Parallel()
h := testSetup()
r, w, _ := h.newHTTP("GET")
if err := h.totp.GetConfirm(w, r); err == nil {
t.Error("should fail because there is no totp secret")
}
secret := "secret"
h.setSession(SessionTOTPSecret, secret)
h.loadClientState(w, &r)
if err := h.totp.GetCo... | explode_data.jsonl/63399 | {
"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,
1949,
16728,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
9598,
1669,
1273,
21821,
2822,
7000,
11,
289,
11,
716,
1669,
305,
4618,
9230,
445,
3806,
5130,
743,
1848,
1669,
305,
734,
48708,
2234,
16728,
3622,
11,
435... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWalletVerifyAddress(t *testing.T) {
if testing.Short() {
t.SkipNow()
}
t.Parallel()
st, err := createServerTester(t.Name())
if err != nil {
t.Fatal(err)
}
defer st.server.panicClose()
var res WalletVerifyAddressGET
fakeaddr := "thisisaninvalidwalletaddress"
if err = st.getAPI("/wallet/verify/ad... | explode_data.jsonl/28974 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 308
} | [
2830,
3393,
38259,
32627,
4286,
1155,
353,
8840,
836,
8,
341,
743,
7497,
55958,
368,
341,
197,
3244,
57776,
7039,
741,
197,
532,
3244,
41288,
7957,
2822,
18388,
11,
1848,
1669,
1855,
5475,
58699,
1155,
2967,
2398,
743,
1848,
961,
2092,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 8 |
func Test_resolveSemanticVersionTag(t *testing.T) {
cases := []struct {
input string
expect []string
}{
// invalid semantic version
{"1", []string{"1"}},
{"master", []string{"master"}},
{"20190921-actions", []string{"20190921-actions"}},
// valid semantic version
{"0.0.0", []string{"0", "0.0", "0.0.... | explode_data.jsonl/29142 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 462
} | [
2830,
3393,
77291,
97931,
5637,
5668,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
22427,
220,
914,
198,
197,
24952,
3056,
917,
198,
197,
59403,
197,
197,
322,
8318,
41733,
2319,
198,
197,
197,
4913,
16,
497,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestHideConfigSecrets(t *testing.T) {
c, err := LoadFile("testdata/conf.good.yml")
if err != nil {
t.Fatalf("Error parsing %s: %s", "testdata/conf.good.yml", err)
}
// String method must not reveal authentication credentials.
s := c.String()
if strings.Count(s, "<secret>") != 15 || strings.Contains(s, "my... | explode_data.jsonl/72906 | {
"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,
21692,
2648,
19773,
82,
1155,
353,
8840,
836,
8,
341,
1444,
11,
1848,
1669,
8893,
1703,
445,
92425,
59241,
59569,
33936,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
1454,
22314,
1018,
82,
25,
1018,
82,
497,
330... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestOnStepCancelCustomCancelReason(t *testing.T) {
w := testWorkflow()
w.cancelReason = "failed horribly"
s := &Step{name: "s", w: w}
err := w.onStepCancel(s, "Dummy")
expectedErrorMessage := "Step \"s\" (Dummy) failed horribly."
if err.Error() != expectedErrorMessage {
t.Errorf("Expected error message `%v... | explode_data.jsonl/3894 | {
"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,
1925,
8304,
9269,
10268,
9269,
25139,
1155,
353,
8840,
836,
8,
341,
6692,
1669,
1273,
62768,
741,
6692,
22253,
25139,
284,
330,
16091,
76004,
698,
1903,
1669,
609,
8304,
47006,
25,
330,
82,
497,
289,
25,
289,
532,
9859,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestKeyAppendSplitMerge(t *testing.T) {
var key, newKey Key
// append a single bit
key = Key{0xf0}
newKey = key.AppendBit(4, true)
require.Equal(t, Key{0xf8}, newKey)
key = Key{0xff}
newKey = key.AppendBit(4, false)
require.Equal(t, Key{0xf7}, newKey)
key = Key{0xff}
newKey = key.AppendBit(8, true)
req... | explode_data.jsonl/41421 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 902
} | [
2830,
3393,
1592,
23877,
20193,
52096,
1155,
353,
8840,
836,
8,
341,
2405,
1376,
11,
501,
1592,
5309,
271,
197,
322,
8737,
264,
3175,
2699,
198,
23634,
284,
5309,
90,
15,
5848,
15,
532,
8638,
1592,
284,
1376,
8982,
8344,
7,
19,
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 TestLstat(t *testing.T) {
type file struct {
name string
size int64
mode fs.FileMode // mode & (fs.ModeDir|0x700): only check 'user' permissions
isDir bool
}
testCases := []struct {
name string
overlay string
path string
want file
wantErr bool
}{
{
"regular_file",
`{}
--... | explode_data.jsonl/56056 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1146
} | [
2830,
3393,
43,
9878,
1155,
353,
8840,
836,
8,
341,
13158,
1034,
2036,
341,
197,
11609,
220,
914,
198,
197,
13832,
220,
526,
21,
19,
198,
197,
60247,
220,
8619,
8576,
3636,
442,
3856,
609,
320,
3848,
42852,
6184,
91,
15,
87,
22,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 9 |
func TestJSONUnmarshal(t *testing.T) {
for _, tc := range validMessages {
if tc.name == "PrefixedTopicOnly" {
continue
}
b, err := json.Marshal(tc.req)
if err != nil {
t.Errorf("Marshal(%s) = %v; want = nil", tc.name, err)
}
var target Message
if err := json.Unmarshal(b, &target); err != nil {
t... | explode_data.jsonl/70171 | {
"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,
5370,
1806,
27121,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
17130,
1669,
2088,
2697,
15820,
341,
197,
743,
17130,
2644,
621,
330,
29978,
3286,
26406,
7308,
1,
341,
298,
11664,
198,
197,
197,
532,
197,
2233,
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... | 6 |
func TestDifferentFuncTypes(t *testing.T) {
suite := NewSuite(t, WithFeaturesPath("features/func_types.feature"))
suite.AddStep(`I add ([+-]?[0-9]*[.]?[0-9]+) and ([+-]?[0-9]*[.]?[0-9]+)`, addf)
suite.AddStep(`the result should equal ([+-]?[0-9]*[.]?[0-9]+)`, checkf)
suite.Run()
} | explode_data.jsonl/69366 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 139
} | [
2830,
3393,
69123,
9626,
4173,
1155,
353,
8840,
836,
8,
341,
96572,
1669,
1532,
28000,
1155,
11,
3085,
21336,
1820,
445,
20304,
14,
2830,
9763,
29591,
5455,
96572,
1904,
8304,
5809,
40,
912,
11743,
21473,
49964,
58,
15,
12,
24,
8465,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFlushInstance(t *testing.T) {
var req FlushInstanceRequest
req.Init()
req.SetFormat("JSON")
req.SetRegionId("cn-shenzhen")
var accessId = "Ie65kUInu5GeAsma"
var accessSecret = "8cCqoxdYU9zKUihwXFXiN1HEACBDwB"
resp, err := FlushInstance(&req, accessId, accessSecret)
if err != nil {
t.Errorf("Error: %s... | explode_data.jsonl/82672 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 165
} | [
2830,
3393,
46874,
2523,
1155,
353,
8840,
836,
8,
341,
2405,
4232,
57626,
2523,
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,
40,
68,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAccountUpdate(t *testing.T) {
defer tests.Recover(t)
tr := roleTests[auth.RoleAdmin]
// Add claims to the context for the user.
ctx := context.WithValue(tests.Context(), auth.Key, tr.Claims)
// Test create with invalid data.
{
expectedStatus := http.StatusBadRequest
invalidStatus := account.Accou... | explode_data.jsonl/36721 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 761
} | [
2830,
3393,
7365,
4289,
1155,
353,
8840,
836,
8,
341,
16867,
7032,
2817,
3688,
1155,
692,
25583,
1669,
3476,
18200,
58,
3242,
35955,
7210,
2533,
197,
322,
2691,
8186,
311,
279,
2266,
369,
279,
1196,
624,
20985,
1669,
2266,
26124,
1130,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInitializing(t *testing.T) {
var isq StruQL
err := isq.Init(29)
if err == nil {
t.Error("Should be initialized only by struct value")
}
} | explode_data.jsonl/46145 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 57
} | [
2830,
3393,
76775,
1155,
353,
8840,
836,
8,
341,
2405,
374,
80,
4509,
84,
3588,
271,
9859,
1669,
374,
80,
26849,
7,
17,
24,
340,
743,
1848,
621,
2092,
341,
197,
3244,
6141,
445,
14996,
387,
17271,
1172,
553,
2036,
897,
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
] | 2 |
func TestGetUser(t *testing.T) {
for idx, tt := range getUserTests {
tt := tt
t.Run(fmt.Sprintf("%d", idx), func(t *testing.T) {
t.Parallel()
u := &mockUsers{}
s := &svc{rest: v3client{
Users: u,
}}
resp, err := s.GetUser(context.Background(), tt.username)
assert.NoError(t, err)
assert.... | explode_data.jsonl/10366 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 180
} | [
2830,
3393,
1949,
1474,
1155,
353,
8840,
836,
8,
341,
2023,
7187,
11,
17853,
1669,
2088,
23197,
18200,
341,
197,
3244,
83,
1669,
17853,
198,
197,
3244,
16708,
28197,
17305,
4430,
67,
497,
7187,
701,
2915,
1155,
353,
8840,
836,
8,
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... | 1 |
func TestNewCurrencyPairDelimiter(t *testing.T) {
t.Parallel()
pair := NewCurrencyPairDelimiter("BTC-USD", "-")
actual := pair.Pair()
expected := CurrencyItem("BTC-USD")
if actual != expected {
t.Errorf(
"Test failed. Pair(): %s was not equal to expected value: %s",
actual, expected,
)
}
actual = Curr... | explode_data.jsonl/55834 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 191
} | [
2830,
3393,
3564,
26321,
12443,
91098,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
3223,
1310,
1669,
1532,
26321,
12443,
91098,
445,
59118,
12,
26749,
497,
6523,
1138,
88814,
1669,
6716,
1069,
1310,
741,
42400,
1669,
28453,
1234... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFlatConfigTransformer(t *testing.T) {
g := Graph{Path: addrs.RootModuleInstance}
tf := &FlatConfigTransformer{
Config: testModule(t, "transform-flat-config-basic"),
}
if err := tf.Transform(&g); err != nil {
t.Fatalf("err: %s", err)
}
actual := strings.TrimSpace(g.String())
expected := strings.Trim... | explode_data.jsonl/71471 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 158
} | [
2830,
3393,
31019,
2648,
46358,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
12165,
90,
1820,
25,
912,
5428,
45345,
3332,
2523,
532,
3244,
69,
1669,
609,
31019,
2648,
46358,
515,
197,
66156,
25,
1273,
3332,
1155,
11,
330,
4701,
65468,
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 TestCheckAnnotationInference(t *testing.T) {
tests := []struct {
note string
modules map[string]string
schemas map[string]string
exp map[string]types.Type
}{
{
note: "rule scope",
modules: map[string]string{
"test.rego": `
package test
# METADATA
# scope: rule
# schemas:
# - input: s... | explode_data.jsonl/14575 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 700
} | [
2830,
3393,
3973,
19711,
641,
2202,
1155,
353,
8840,
836,
8,
1476,
78216,
1669,
3056,
1235,
341,
197,
9038,
1272,
262,
914,
198,
197,
42228,
2425,
2415,
14032,
30953,
198,
197,
1903,
31126,
2415,
14032,
30953,
198,
197,
48558,
257,
2415... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTileMatchesAvailable(t *testing.T) {
game := Game{gridSize: 4}
gameInfo := GameInfo{TileState: createTileState(4, [][]int{[]int{3, 3}, []int{0, 3}})}
game.setup(gameInfo)
if game.tileMatchesAvailable() != false {
t.Error("The game still has empty cells. So it should return false")
}
gameInfo = GameInf... | explode_data.jsonl/59008 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 311
} | [
2830,
3393,
15628,
42470,
16485,
1155,
353,
8840,
836,
8,
341,
30677,
1669,
4050,
90,
4203,
1695,
25,
220,
19,
532,
30677,
1731,
1669,
4050,
1731,
90,
15628,
1397,
25,
1855,
15628,
1397,
7,
19,
11,
52931,
396,
90,
1294,
396,
90,
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... | 4 |
func TestPing(t *testing.T) {
pver := wire.ProtocolVersion
// Ensure we get the same nonce back out.
nonce, err := wire.RandomUint64()
if err != nil {
t.Errorf("RandomUint64: Error generating nonce: %v", err)
}
msg := wire.NewMsgPing(nonce)
if msg.Nonce != nonce {
t.Errorf("NewMsgPing: wrong nonce - got %v,... | explode_data.jsonl/1143 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 323
} | [
2830,
3393,
69883,
1155,
353,
8840,
836,
8,
341,
3223,
423,
1669,
9067,
54096,
5637,
271,
197,
322,
29279,
582,
633,
279,
1852,
39676,
1182,
700,
624,
197,
39593,
11,
1848,
1669,
9067,
26709,
21570,
21,
19,
741,
743,
1848,
961,
2092,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestMigrate(t *testing.T) {
allModels := []interface{}{&User{}, &Account{}, &Pet{}, &Company{}, &Toy{}, &Language{}}
rand.Seed(time.Now().UnixNano())
rand.Shuffle(len(allModels), func(i, j int) { allModels[i], allModels[j] = allModels[j], allModels[i] })
DB.Migrator().DropTable("user_speaks", "user_friends", "... | explode_data.jsonl/6492 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 761
} | [
2830,
3393,
44,
34479,
1155,
353,
8840,
836,
8,
341,
50960,
16969,
1669,
3056,
4970,
6257,
90,
5,
1474,
22655,
609,
7365,
22655,
609,
34819,
22655,
609,
14491,
22655,
609,
67970,
22655,
609,
13806,
6257,
532,
7000,
437,
5732,
291,
9730,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAdminPriviledge(t *testing.T) {
r := NewRequest()
r.PathParams["event"] = "testevent"
r.Env["REMOTE_USER"] = "testevent-admin"
assert.True(t, hasAdminPriviledge(r))
assert.False(t, hasSuperAdminPriviledge(r))
} | explode_data.jsonl/6969 | {
"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,
7210,
32124,
2181,
709,
1155,
353,
8840,
836,
8,
341,
7000,
1669,
1532,
1900,
741,
7000,
17474,
4870,
1183,
3087,
1341,
284,
330,
1944,
3087,
698,
7000,
81214,
1183,
56020,
9107,
1341,
284,
330,
1944,
3087,
27225,
698,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestQueue_Close(t *testing.T) {
const cap = 10
queue := New(cap)
ch := make(chan bool, 1)
go func() {
for {
if _, closed := queue.Pop(); closed {
ch <- true
break
}
}
}()
if queue.Close() != nil {
t.FailNow()
}
if queue.Close() != ErrClosed {
t.FailNow()
}
<-ch
} | explode_data.jsonl/81009 | {
"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,
7554,
68185,
1155,
353,
8840,
836,
8,
1476,
4777,
2062,
284,
220,
16,
15,
198,
46993,
1669,
1532,
51386,
692,
23049,
1669,
1281,
35190,
1807,
11,
220,
16,
692,
30680,
2915,
368,
341,
197,
2023,
341,
298,
743,
8358,
7877,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreateMetricsExporter(t *testing.T) {
f := Factory{OptionsFactory: DefaultOptions}
mReceiver, err := f.CreateMetricsExporter(context.Background(), component.ExporterCreateParams{}, f.CreateDefaultConfig())
assert.Equal(t, err, configerror.ErrDataTypeIsNotSupported)
assert.Nil(t, mReceiver)
} | explode_data.jsonl/3447 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 99
} | [
2830,
3393,
4021,
27328,
88025,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
16937,
90,
3798,
4153,
25,
7899,
3798,
532,
2109,
25436,
11,
1848,
1669,
282,
7251,
27328,
88025,
5378,
19047,
1507,
3692,
81077,
261,
4021,
4870,
22655,
282,
725... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestReconcile_DoesntChangeStartTime(t *testing.T) {
startTime := time.Date(2000, 1, 1, 1, 1, 1, 1, time.UTC)
taskRun := tb.TaskRun("test-taskrun", tb.TaskRunNamespace("foo"), tb.TaskRunSpec(
tb.TaskRunTaskRef(simpleTask.Name)),
tb.TaskRunStatus(
tb.TaskRunStartTime(startTime),
tb.PodName("the-pod"),
... | explode_data.jsonl/878 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 400
} | [
2830,
3393,
693,
40446,
457,
1557,
7072,
406,
4072,
40203,
1155,
353,
8840,
836,
8,
341,
21375,
1462,
1669,
882,
8518,
7,
17,
15,
15,
15,
11,
220,
16,
11,
220,
16,
11,
220,
16,
11,
220,
16,
11,
220,
16,
11,
220,
16,
11,
882,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPulumiToTerraformNameWithSchemaInfoOverride(t *testing.T) {
tfs := map[string]*schema.Schema{
"list_property": {
Type: schema.TypeList,
},
}
maxItemsOne := true
ps := map[string]*SchemaInfo{
"list_property": {
MaxItemsOne: &maxItemsOne,
},
}
name := PulumiToTerraformName("listProperty", s... | explode_data.jsonl/36107 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 182
} | [
2830,
3393,
47,
65482,
1249,
51,
13886,
627,
675,
2354,
8632,
1731,
2177,
1155,
353,
8840,
836,
8,
341,
3244,
3848,
1669,
2415,
14032,
8465,
17349,
21105,
515,
197,
197,
1,
1607,
16638,
788,
341,
298,
27725,
25,
10802,
10184,
852,
345... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestAddMultiplePods(t *testing.T) {
labels := map[string]string{
"app": "test-pod",
}
podObj1 := createPod("test-pod-1", "test-namespace", "0", "1.2.3.4", labels, NonHostNetwork, corev1.PodRunning)
podObj2 := createPod("test-pod-2", "test-namespace", "0", "1.2.3.5", labels, NonHostNetwork, corev1.PodRunning)... | explode_data.jsonl/35404 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1004
} | [
2830,
3393,
2212,
32089,
23527,
82,
1155,
353,
8840,
836,
8,
341,
95143,
1669,
2415,
14032,
30953,
515,
197,
197,
1,
676,
788,
330,
1944,
2268,
347,
756,
197,
532,
3223,
347,
5261,
16,
1669,
1855,
23527,
445,
1944,
2268,
347,
12,
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 TestStakeThreshold(t *testing.T) {
require := require.New(t)
// Empty stake threshold is invalid.
st := StakeThreshold{}
_, err := st.Value(nil)
require.Error(err, "empty stake threshold is invalid")
// Global threshold reference is resolved correctly.
tm := map[ThresholdKind]quantity.Quantity{
KindEnti... | explode_data.jsonl/36021 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 673
} | [
2830,
3393,
623,
726,
37841,
1155,
353,
8840,
836,
8,
341,
17957,
1669,
1373,
7121,
1155,
692,
197,
322,
22228,
18279,
12171,
374,
8318,
624,
18388,
1669,
98246,
37841,
16094,
197,
6878,
1848,
1669,
357,
6167,
27907,
340,
17957,
6141,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.