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 Test_Properties_ValidateContainerRuntime(t *testing.T) {
p := &Properties{}
p.OrchestratorProfile = &OrchestratorProfile{}
p.OrchestratorProfile.OrchestratorType = Kubernetes
for _, runtime := range ContainerRuntimeValues {
p.OrchestratorProfile.KubernetesConfig = &KubernetesConfig{}
p.OrchestratorProfile... | explode_data.jsonl/17875 | {
"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,
1088,
9249,
62,
17926,
4502,
15123,
1155,
353,
8840,
836,
8,
341,
3223,
1669,
609,
7903,
16094,
3223,
90449,
331,
15111,
850,
8526,
284,
609,
2195,
331,
15111,
850,
8526,
16094,
3223,
90449,
331,
15111,
850,
8526,
90449,
331... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSerialization(t *testing.T) {
s, port := tcpudp.NewUDPServer(&defaultConf, true)
defer s.Stop()
m := createTimelineManager(port, false, false, defaultTransportSize, time.Second, nil)
defer m.Shutdown()
number := newNumberPoint(15)
serialized, err := m.SerializeJSON(numberPoint, toGenericParametersN(n... | explode_data.jsonl/68116 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 179
} | [
2830,
3393,
35865,
1155,
353,
8840,
836,
8,
1476,
1903,
11,
2635,
1669,
28051,
31101,
7121,
4656,
5012,
2836,
2099,
2258,
15578,
11,
830,
340,
16867,
274,
30213,
2822,
2109,
1669,
1855,
59641,
2043,
21230,
11,
895,
11,
895,
11,
1638,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAssessMetricStatusConsecutiveErrors(t *testing.T) {
metric := v1alpha1.Metric{
Name: "success-rate",
Interval: "60s",
}
result := v1alpha1.MetricResult{
ConsecutiveError: 5,
Count: 5,
Measurements: []v1alpha1.Measurement{{
Phase: v1alpha1.AnalysisPhaseError,
StartedAt: t... | explode_data.jsonl/75820 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 340
} | [
2830,
3393,
5615,
433,
54310,
2522,
1109,
85780,
13877,
1155,
353,
8840,
836,
8,
341,
2109,
16340,
1669,
348,
16,
7141,
16,
1321,
16340,
515,
197,
21297,
25,
257,
330,
5630,
43026,
756,
197,
197,
10256,
25,
330,
21,
15,
82,
756,
197... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestAggregateClosedConnectionsTimestamp(t *testing.T) {
conn := ConnectionStats{
Pid: 123,
Type: TCP,
Family: AFINET,
Source: util.AddressFromString("127.0.0.1"),
Dest: util.AddressFromString("127.0.0.1"),
MonotonicSentBytes: 3,
}
c... | explode_data.jsonl/22153 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 341
} | [
2830,
3393,
64580,
26884,
54751,
20812,
1155,
353,
8840,
836,
8,
341,
32917,
1669,
11032,
16635,
515,
197,
10025,
307,
25,
394,
220,
16,
17,
18,
345,
197,
27725,
25,
2290,
26656,
345,
197,
12727,
5174,
25,
1797,
362,
16750,
1348,
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... | 1 |
func Test_write_val_int_ptr(t *testing.T) {
should := require.New(t)
buf := &bytes.Buffer{}
stream := NewStream(ConfigDefault, buf, 4096)
val := 1001
stream.WriteVal(&val)
stream.Flush()
should.Nil(stream.Error)
should.Equal("1001", buf.String())
} | explode_data.jsonl/51206 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 100
} | [
2830,
3393,
9165,
6189,
4042,
4348,
1155,
353,
8840,
836,
8,
341,
197,
5445,
1669,
1373,
7121,
1155,
340,
26398,
1669,
609,
9651,
22622,
16094,
44440,
1669,
1532,
3027,
33687,
3675,
11,
6607,
11,
220,
19,
15,
24,
21,
340,
19302,
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 TestContainsString(t *testing.T) {
cases := []struct {
slice []string
value string
expect bool
}{
{[]string{"1"}, "1", true},
{[]string{"1"}, "2", false},
{[]string{"1", "2"}, "1", true},
{[]string{"1", "2"}, "3", false},
{nil, "3", false},
{nil, "", false},
}
for _, each := range cases {
... | explode_data.jsonl/76720 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 206
} | [
2830,
3393,
23805,
703,
1155,
353,
8840,
836,
8,
341,
1444,
2264,
1669,
3056,
1235,
341,
197,
1903,
4754,
220,
3056,
917,
198,
197,
16309,
220,
914,
198,
197,
24952,
1807,
198,
197,
59403,
197,
197,
90,
1294,
917,
4913,
16,
14345,
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 TestEnvironmentVariableOverrideArgument(t *testing.T) {
var args struct {
Foo string `arg:"env"`
}
setenv(t, "FOO", "bar")
os.Args = []string{"example", "--foo", "baz"}
MustParse(&args)
assert.Equal(t, "baz", args.Foo)
} | explode_data.jsonl/13037 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 97
} | [
2830,
3393,
12723,
7827,
2177,
9171,
1155,
353,
8840,
836,
8,
341,
2405,
2827,
2036,
341,
197,
12727,
2624,
914,
1565,
858,
2974,
3160,
8805,
197,
532,
8196,
3160,
1155,
11,
330,
3788,
46,
497,
330,
2257,
1138,
25078,
51015,
284,
3056... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParse(t *testing.T) {
domain := newSplitQuery("test")
table := &Table{hashBy: "_col5", sortBy: "NA"}
queries, err := parseThriftDomain(domain, table.hashBy, table.sortBy)
assert.NoError(t, err)
assert.Len(t, queries, 1)
} | explode_data.jsonl/74843 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 91
} | [
2830,
3393,
14463,
1155,
353,
8840,
836,
8,
341,
2698,
3121,
1669,
501,
20193,
2859,
445,
1944,
1138,
26481,
1669,
609,
2556,
90,
8296,
1359,
25,
9000,
2074,
20,
497,
66913,
25,
330,
7326,
16707,
197,
42835,
11,
1848,
1669,
4715,
1001... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAddExtraVar(t *testing.T) {
tests := []struct {
desc string
options *AnsibleAdhocOptions
err error
extraVarName string
extraVarValue interface{}
res map[string]interface{}
}{
{
desc: "Testing add an extraVar to a nil data structure",
options: &AnsibleAd... | explode_data.jsonl/69691 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 709
} | [
2830,
3393,
2212,
11612,
3962,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
41653,
688,
914,
198,
197,
35500,
981,
353,
69599,
1238,
2589,
88473,
3798,
198,
197,
9859,
1843,
1465,
198,
197,
8122,
2172,
3962,
675,
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 TestGenerateFixedName(t *testing.T) {
testCases := map[string]struct {
uid string
prefix string
expected string
}{
"standard": {
uid: "2d6c09e1-aa54-11e9-9d6a-42010a8a0062",
prefix: "default-text-extractor",
expected: "default-text-extractor-2d6c09e1-aa54-11e9-9d6a-42010a8a0062",
... | explode_data.jsonl/53356 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 698
} | [
2830,
3393,
31115,
13520,
675,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
2415,
14032,
60,
1235,
341,
197,
197,
2423,
414,
914,
198,
197,
3223,
5060,
256,
914,
198,
197,
42400,
914,
198,
197,
59403,
197,
197,
1,
20270,
788,
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 TestRequestUrlFor(t *testing.T) {
req := defaultRequest("GET", "http://localhost", nil, t)
path := "/foo/bar"
urlObj := req.UrlFor(path, nil)
if urlObj.Path != path {
t.Error(path + " was expected to be the path, but got " + urlObj.Path)
}
expected := "http://localhost/foo/bar"
if urlObj.String() != ex... | explode_data.jsonl/31841 | {
"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,
1900,
2864,
2461,
1155,
353,
8840,
836,
8,
341,
24395,
1669,
1638,
1900,
445,
3806,
497,
330,
1254,
1110,
8301,
497,
2092,
11,
259,
692,
26781,
1669,
3521,
7975,
49513,
1837,
19320,
5261,
1669,
4232,
41024,
2461,
5581,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestVet(t *testing.T) {
t.Parallel()
dir := fs.NewDir(t, "test-vet",
fs.WithFile("file.go", vetFile("root")),
fs.WithFile("file_test.go", vetExternalPackageFile("root_test")),
fs.WithDir("sub",
fs.WithFile("file.go", vetFile("sub"))),
fs.WithDir("excluded",
fs.WithFile("file.go", vetFile("excluded... | explode_data.jsonl/19399 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 709
} | [
2830,
3393,
53,
295,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
48532,
1669,
8619,
7121,
6184,
1155,
11,
330,
1944,
8273,
295,
756,
197,
53584,
26124,
1703,
445,
1192,
18002,
497,
23313,
1703,
445,
2888,
30154,
197,
53584,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLogActions(t *testing.T) {
f := newPLMFixture(t)
defer f.TearDown()
f.kClient.SetLogsForPodContainer(podID, cName, "hello world!\ngoodbye world!\n")
state := f.store.LockMutableStateForTesting()
p := store.Pod{
PodID: podID,
Containers: []store.Container{NewRunningContainer(cName, cID)},
}
s... | explode_data.jsonl/65265 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 213
} | [
2830,
3393,
2201,
12948,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
501,
2916,
44,
18930,
1155,
340,
16867,
282,
836,
682,
4454,
2822,
1166,
5202,
2959,
4202,
51053,
2461,
23527,
4502,
1295,
347,
915,
11,
272,
675,
11,
330,
14990,
1879... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMicrositeGet(t *testing.T) {
setup()
defer teardown()
addRestHandlerFunc("/assets/microsite/1005", func(w http.ResponseWriter, req *http.Request) {
testURLParam(t, req, "depth", "complete")
testMethod(t, req, "GET")
fmt.Fprint(w, `{"assetType":"Microsite","id":"10005","name":"A Test Microsite", "upda... | explode_data.jsonl/7513 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 265
} | [
2830,
3393,
34609,
9513,
1949,
1155,
353,
8840,
836,
8,
341,
84571,
741,
16867,
49304,
2822,
12718,
12416,
3050,
9626,
4283,
5160,
3183,
2754,
9513,
14,
16,
15,
15,
20,
497,
2915,
3622,
1758,
37508,
11,
4232,
353,
1254,
9659,
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 TestLogger_NewLogger(t *testing.T) {
l := loggerDefaults
l.File = t.TempDir() + "test.log"
l.Fields = []string{
"source=peaches",
"priority=1",
}
logger := l.NewLogger()
assert.NotNil(t, logger)
logger.Debug("hello world")
l.Package = log.LogrusLogger
logger = l.NewLogger()
assert.NotNil(t, logger)
... | explode_data.jsonl/20569 | {
"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,
7395,
39582,
7395,
1155,
353,
8840,
836,
8,
341,
8810,
1669,
5925,
16273,
198,
8810,
8576,
284,
259,
65009,
6184,
368,
488,
330,
1944,
1665,
698,
8810,
42809,
284,
3056,
917,
515,
197,
197,
1,
2427,
28,
375,
14242,
756,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestWorkflowParallelismLimit(t *testing.T) {
cancel, controller := newController()
defer cancel()
ctx := context.Background()
wfcset := controller.wfclientset.ArgoprojV1alpha1().Workflows("")
wf := unmarshalWF(workflowParallelismLimit)
wf, err := wfcset.Create(ctx, wf, metav1.CreateOptions{})
assert.NoErro... | explode_data.jsonl/70961 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 421
} | [
2830,
3393,
62768,
16547,
2142,
16527,
1155,
353,
8840,
836,
8,
341,
84441,
11,
6461,
1669,
501,
2051,
741,
16867,
9121,
2822,
20985,
1669,
2266,
19047,
741,
6692,
8316,
746,
1669,
6461,
1418,
69,
2972,
746,
18979,
45926,
73,
53,
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 TestToInt(t *testing.T) {
type args struct {
s string
}
tests := []struct {
name string
args args
want int
}{
{
name: "",
args: args{
s: "21",
},
want: 21,
},
{
name: "",
args: args{
s: "not_int",
},
want: 0,
},
}
for _, tt := range tests {
t.Run(tt.name, fun... | explode_data.jsonl/5470 | {
"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,
38544,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
1903,
914,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
31215,
2827,
198,
197,
50780,
526,
198,
197,
59403,
197,
197,
515,
298,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestExtractExampleCasesFromStatement(t *testing.T) {
for _, testCase := range []struct {
statement string
expectedOutput map[string]*common.LiteralCaseSettings
}{
{
statement: `Sumas
||input
First input
||output
First output
||description
yeah...
||input
Second input
||output
Second output
||end`,
... | explode_data.jsonl/63170 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 534
} | [
2830,
3393,
28959,
13314,
37302,
3830,
8636,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
54452,
1669,
2088,
3056,
1235,
341,
197,
89566,
414,
914,
198,
197,
42400,
5097,
2415,
14032,
8465,
5464,
1214,
9953,
4207,
6086,
198,
197,
59403,
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... | 3 |
func TestOperatorRestart(t *testing.T) {
namespace := "ns"
context := newTestStartCluster(namespace)
c := newCluster(context, namespace, cephv1.NetworkSpec{}, true, v1.ResourceRequirements{})
c.ClusterInfo = test.CreateConfigDir(1)
// start a basic cluster
info, err := c.Start(c.ClusterInfo, c.rookVersion, ceph... | explode_data.jsonl/57255 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 275
} | [
2830,
3393,
18461,
59354,
1155,
353,
8840,
836,
8,
1476,
56623,
1669,
330,
4412,
698,
28413,
1669,
501,
2271,
3479,
28678,
52397,
340,
1444,
1669,
501,
28678,
5378,
11,
4473,
11,
272,
23544,
85,
16,
30149,
8327,
22655,
830,
11,
348,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCheckStandard(t *testing.T) {
conf.Cfg = conf.InitConfig([]string{})
testTxout.scriptPubKey.ParsedOpCodes = make([]opcodes.ParsedOpCode, 5)
poc := opcodes.NewParsedOpCode(opcodes.OP_RETURN, 1, []byte{0x6a})
testTxout.scriptPubKey.ParsedOpCodes[0] = *poc
var p int
p, _ = testTxout.IsStandard()
assert.... | explode_data.jsonl/38869 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 458
} | [
2830,
3393,
3973,
19781,
1155,
353,
8840,
836,
8,
341,
67850,
727,
4817,
284,
2335,
26849,
2648,
10556,
917,
37790,
18185,
31584,
411,
46713,
29162,
1592,
1069,
18112,
7125,
20871,
284,
1281,
10556,
453,
25814,
1069,
18112,
7125,
2078,
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 TestPriorityQueueBasic(t *testing.T) {
queue := NewPriorityQueue(nil)
assert.Equal(t, 0, queue.Length(), "Expected length = 0")
queue.Enqueue(simpleItem(1))
assert.Equal(t, 1, queue.Length(), "Expected length = 1")
i, ok := queue.Dequeue().(simpleItem)
assert.True(t, ok, "Expected cast to succeed")
assert... | explode_data.jsonl/69349 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 170
} | [
2830,
3393,
20555,
7554,
15944,
1155,
353,
8840,
836,
8,
341,
46993,
1669,
1532,
20555,
7554,
27907,
340,
6948,
12808,
1155,
11,
220,
15,
11,
7177,
6833,
1507,
330,
18896,
3084,
284,
220,
15,
5130,
46993,
65625,
1141,
6456,
1234,
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... | 1 |
func TestBuildPipelines_NotSupportedDataType(t *testing.T) {
factories := createTestFactories()
tests := []struct {
configFile string
}{
{
configFile: "not_supported_processor_logs.yaml",
},
{
configFile: "not_supported_processor_metrics.yaml",
},
{
configFile: "not_supported_processor_traces.y... | explode_data.jsonl/24782 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 348
} | [
2830,
3393,
11066,
47,
93997,
60816,
34636,
22653,
1155,
353,
8840,
836,
8,
341,
1166,
52893,
1669,
1855,
2271,
17417,
2433,
2822,
78216,
1669,
3056,
1235,
341,
197,
25873,
1703,
914,
198,
197,
59403,
197,
197,
515,
298,
25873,
1703,
25... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestGetIssueWatchers(t *testing.T) {
assert.NoError(t, unittest.PrepareTestDatabase())
iws, err := GetIssueWatchers(1, db.ListOptions{})
assert.NoError(t, err)
// Watcher is inactive, thus 0
assert.Len(t, iws, 0)
iws, err = GetIssueWatchers(2, db.ListOptions{})
assert.NoError(t, err)
// Watcher is explic... | explode_data.jsonl/11892 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 250
} | [
2830,
3393,
1949,
42006,
14247,
388,
1155,
353,
8840,
836,
8,
341,
6948,
35699,
1155,
11,
19905,
28770,
3380,
2271,
5988,
12367,
8230,
8915,
11,
1848,
1669,
2126,
42006,
14247,
388,
7,
16,
11,
2927,
5814,
3798,
37790,
6948,
35699,
1155,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestCanGetTagByNameOrID(t *testing.T) {
// Setup
db, err := sql.Open("knowledge", "identifier")
defer db.Close()
checkError(err)
rec := httptest.NewRecorder()
e := echo.New()
h := NewHandler(db, "secret")
// First register the user.
assert.NoError(t, registerUser(db, e, rec, h, user1JSON))
// Login th... | explode_data.jsonl/59033 | {
"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,
6713,
1949,
5668,
16898,
2195,
915,
1155,
353,
8840,
836,
8,
341,
197,
322,
18626,
198,
20939,
11,
1848,
1669,
5704,
12953,
445,
89053,
497,
330,
15909,
1138,
16867,
2927,
10421,
741,
25157,
1454,
3964,
692,
67904,
1669,
543... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCustomer_UpdatePendingLineItem(t *testing.T) {
key := "test api key"
mockResponse := new(invdendpoint.PendingLineItem)
mockResponse.Id = int64(1234)
mockResponse.Name = "entity example 2"
server, err := invdmockserver.New(200, mockResponse, "json", true)
if err != nil {
t.Fatal(err)
}
defer server.... | explode_data.jsonl/15026 | {
"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,
12792,
47393,
32027,
2460,
1234,
1155,
353,
8840,
836,
8,
341,
23634,
1669,
330,
1944,
6330,
1376,
1837,
77333,
2582,
1669,
501,
5900,
16598,
32540,
96624,
2460,
1234,
340,
77333,
2582,
6444,
284,
526,
21,
19,
7,
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,
1... | 4 |
func TestExpireat(t *testing.T) {
s, err := Run()
ok(t, err)
defer s.Close()
c, err := redis.Dial("tcp", s.Addr())
ok(t, err)
// Not volatile yet
{
equals(t, 0, s.Expire("foo"))
b, err := redis.Int(c.Do("TTL", "foo"))
ok(t, err)
equals(t, -2, b)
}
// Set something
{
_, err := c.Do("SET", "foo", "b... | explode_data.jsonl/23144 | {
"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,
8033,
554,
266,
1155,
353,
8840,
836,
8,
341,
1903,
11,
1848,
1669,
6452,
741,
59268,
1155,
11,
1848,
340,
16867,
274,
10421,
741,
1444,
11,
1848,
1669,
20870,
98462,
445,
27161,
497,
274,
93626,
2398,
59268,
1155,
11,
184... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPlaceSpotOrderLimit(t *testing.T) {
TestSetRealOrderDefaults(t)
request := okgroup.PlaceOrderRequest{
InstrumentID: spotCurrency,
Type: order.Limit.Lower(),
Side: order.Buy.Lower(),
Price: "-100",
Size: "100",
}
_, err := o.PlaceSpotOrder(&request)
testStandardErr... | explode_data.jsonl/30155 | {
"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,
17371,
47049,
4431,
16527,
1155,
353,
8840,
836,
8,
341,
73866,
1649,
12768,
4431,
16273,
1155,
340,
23555,
1669,
5394,
4074,
86675,
4431,
1900,
515,
197,
197,
56324,
915,
25,
7702,
26321,
345,
197,
27725,
25,
260,
1973,
121... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestKymaFlags(t *testing.T) {
t.Parallel()
o := &cli.Options{}
c := NewCmd(o)
c.SetOutput(ioutil.Discard) // not interested in the command's output
// test default flag values
require.Equal(t, "", o.KubeconfigPath, "kubeconfig path must be empty when default")
require.False(t, o.Verbose, "Verbose flag must... | explode_data.jsonl/19896 | {
"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,
42,
1600,
64,
9195,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
22229,
1669,
609,
19521,
22179,
16094,
1444,
1669,
1532,
15613,
10108,
340,
1444,
4202,
5097,
1956,
30158,
909,
47560,
8,
442,
537,
8014,
304,
279,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMarshalResponse(t *testing.T) {
p := buildResponseBody()
output, err := json.Marshal(p)
if err != nil {
t.Error(err)
}
expected := `{"error":{"status":"INVALID_ARGUMENT","message":"The registration token is not a valid FCM registration token","details":[{"@type":"type.googleapis.com/google.firebase.fcm... | explode_data.jsonl/33446 | {
"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,
55438,
2582,
1155,
353,
8840,
836,
8,
341,
3223,
1669,
1936,
29637,
741,
21170,
11,
1848,
1669,
2951,
37271,
1295,
340,
743,
1848,
961,
2092,
341,
197,
3244,
6141,
3964,
340,
197,
630,
42400,
1669,
1565,
4913,
841,
22317,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetTransferAmount(t *testing.T) {
testCases := []struct {
name string
packet channeltypes.Packet
expAmount string
expError bool
}{
{
"empty packet",
channeltypes.Packet{},
"",
true,
},
{
"invalid packet data",
channeltypes.Packet{
Data: ibctesting.MockFailPacketDa... | explode_data.jsonl/59294 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1067
} | [
2830,
3393,
1949,
21970,
10093,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
11609,
414,
914,
198,
197,
68802,
262,
5496,
9242,
93971,
198,
197,
48558,
10093,
914,
198,
197,
48558,
1454,
220,
1807,
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 TestGetSubChainDBPath(t *testing.T) {
t.Parallel()
chainDBPath := getSubChainDBPath(1, config.Default.Chain.ChainDBPath)
trieDBPath := getSubChainDBPath(1, config.Default.Chain.TrieDBPath)
assert.Equal(t, "chain-1-chain.db", chainDBPath)
assert.Equal(t, "chain-1-trie.db", trieDBPath)
} | explode_data.jsonl/22965 | {
"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,
1949,
3136,
18837,
3506,
1820,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
197,
8819,
3506,
1820,
1669,
633,
3136,
18837,
3506,
1820,
7,
16,
11,
2193,
13275,
98269,
98269,
3506,
1820,
340,
197,
8927,
3506,
1820,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDeleteOrder(t *testing.T) {
t.Parallel()
if !areTestAPIKeysSet() || !canManipulateRealOrders {
t.Skip("skipping test, either api keys or canManipulateRealOrders isnt set correctly")
}
_, err := f.DeleteOrder(context.Background(), "1031")
if err != nil {
t.Error(err)
}
} | explode_data.jsonl/15193 | {
"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,
6435,
4431,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
743,
753,
546,
2271,
7082,
8850,
1649,
368,
1369,
753,
4814,
92876,
6334,
12768,
24898,
341,
197,
3244,
57776,
445,
4886,
5654,
1273,
11,
2987,
6330,
6894,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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) {
confFile := configfile(`{}`)
defer os.Remove(confFile)
conf := config.NewConfig()
err := conf.Load(confFile, logConfPath)
AssertThat(t, err, Is{nil})
} | explode_data.jsonl/37913 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 75
} | [
2830,
3393,
2648,
1155,
353,
8840,
836,
8,
341,
67850,
1703,
1669,
2193,
1192,
5809,
90,
27085,
16867,
2643,
13270,
29879,
1703,
340,
67850,
1669,
2193,
7121,
2648,
741,
9859,
1669,
2335,
13969,
29879,
1703,
11,
1487,
15578,
1820,
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 |
func Test_Finalizer_AppendDefault(t *testing.T) {
// Arrange
handler, _ := newErrorsFakeHandler(mockErrorsArangoClientBackup{})
obj, deployment := newObjectSet(backupApi.ArangoBackupStateNone)
obj.Finalizers = []string{
"RANDOM",
"FINALIZERS",
}
// Act
createArangoDeployment(t, handler, deployment)
creat... | explode_data.jsonl/5632 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 209
} | [
2830,
3393,
77072,
3135,
36117,
408,
3675,
1155,
353,
8840,
836,
8,
341,
197,
322,
40580,
198,
53326,
11,
716,
1669,
501,
13877,
52317,
3050,
30389,
13877,
6953,
5170,
2959,
56245,
6257,
692,
22671,
11,
23172,
1669,
501,
1190,
1649,
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 TestPhases(t *testing.T) {
rand.Seed(time.Now().UTC().UnixNano())
color.Disable(true)
defer color.Disable(false)
spec.Run(t, "phases", testPhases, spec.Report(report.Terminal{}), spec.Sequential())
} | explode_data.jsonl/10024 | {
"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,
3357,
2264,
1155,
353,
8840,
836,
8,
341,
7000,
437,
5732,
291,
9730,
13244,
1005,
21183,
1005,
55832,
83819,
12367,
21481,
10166,
480,
3715,
340,
16867,
1894,
10166,
480,
3576,
692,
98100,
16708,
1155,
11,
330,
759,
2264,
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 |
func TestInvocationBasic(t *testing.T) {
i := &Invocation{
Bindings: nil,
SuiteName: "test:mock",
Filename: "../demos/mock.yaml",
Dir: "",
Env: nil,
Seed: 42,
Verbose: true,
}
ctx := dsl.NewCtx(nil)
err := i.Exec(ctx)
if err != nil {
t.Fatal(err)
}
} | explode_data.jsonl/22496 | {
"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,
37443,
15944,
1155,
353,
8840,
836,
8,
341,
8230,
1669,
609,
37443,
515,
197,
197,
52843,
25,
220,
2092,
345,
197,
7568,
9302,
675,
25,
330,
1944,
25,
16712,
756,
197,
12727,
4033,
25,
220,
7005,
67,
14946,
90386,
33406,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestShouldDetectPasswordPatterns(t *testing.T) {
filename := "secret.txt"
values := [7]string{"password", "secret", "key", "pwd", "pass", "pword", "passphrase"}
for i := 0; i < len(values); i++ {
shouldPassDetectionOfSecretPattern(filename, []byte(strings.ToTitle(values[i])+":UnsafeString"), t)
shouldPassDe... | explode_data.jsonl/82118 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 717
} | [
2830,
3393,
14996,
57193,
4876,
57656,
1155,
353,
8840,
836,
8,
341,
66434,
1669,
330,
20474,
3909,
698,
45939,
1669,
508,
22,
30953,
4913,
3833,
497,
330,
20474,
497,
330,
792,
497,
330,
25565,
497,
330,
6385,
497,
330,
79,
1158,
497... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestInstallPluginFromURL(t *testing.T) {
replace := true
t.Run("incompatible server version", func(t *testing.T) {
h := &plugin.HelpersImpl{}
api := &plugintest.API{}
api.On("GetServerVersion").Return("5.1.0")
h.API = api
_, err := h.InstallPluginFromURL("", true)
assert.Error(t, err)
assert.Equ... | explode_data.jsonl/68787 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1043
} | [
2830,
3393,
24690,
11546,
3830,
3144,
1155,
353,
8840,
836,
8,
341,
197,
8156,
1669,
830,
271,
3244,
16708,
445,
258,
34842,
3538,
2319,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
9598,
1669,
609,
9138,
47651,
9673,
16094,
197,
542... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTransportCancelRequestInDial(t *testing.T) {
defer afterTest(t)
if testing.Short() {
t.Skip("skipping test in -short mode")
}
var logbuf bytes.Buffer
eventLog := log.New(&logbuf, "", 0)
unblockDial := make(chan bool)
defer close(unblockDial)
inDial := make(chan bool)
tr := &Transport{
Dial: func... | explode_data.jsonl/4901 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 495
} | [
2830,
3393,
27560,
9269,
1900,
641,
35,
530,
1155,
353,
8840,
836,
8,
341,
16867,
1283,
2271,
1155,
340,
743,
7497,
55958,
368,
341,
197,
3244,
57776,
445,
4886,
5654,
1273,
304,
481,
8676,
3856,
1138,
197,
532,
2405,
1487,
5909,
5820... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTwoTimers(t *testing.T) {
MockMode = true
timer1 := NewTimer(5 * time.Second)
done1 := make(chan struct{})
timer2 := NewTimer(5 * time.Millisecond)
done2 := make(chan struct{})
go func() {
<-timer1.C()
done1 <- struct{}{}
}()
go func() {
<-timer2.C()
done2 <- struct{}{}
}()
Elapse(5 * tim... | explode_data.jsonl/68926 | {
"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,
11613,
20217,
388,
1155,
353,
8840,
836,
8,
341,
9209,
1176,
3636,
284,
830,
198,
51534,
16,
1669,
1532,
10105,
7,
20,
353,
882,
32435,
340,
40495,
16,
1669,
1281,
35190,
2036,
6257,
692,
51534,
17,
1669,
1532,
10105,
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 TestTxnDelete(t *testing.T) {
ctx := setupTest(t)
defer ctx.teardownTest()
txn := ctx.dataBroker.NewTxn()
Expect(txn).NotTo(BeNil())
txn = txn.Delete("key")
Expect(txn).NotTo(BeNil())
err := txn.Commit(context.Background())
Expect(err).ToNot(HaveOccurred())
} | explode_data.jsonl/29441 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 122
} | [
2830,
3393,
31584,
77,
6435,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
6505,
2271,
1155,
340,
16867,
5635,
31853,
37496,
2271,
2822,
3244,
42967,
1669,
5635,
2196,
65545,
7121,
31584,
77,
741,
35911,
27301,
77,
568,
2623,
1249,
76860,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDisk_usage(t *testing.T) {
path := "/"
if runtime.GOOS == "windows" {
path = "C:"
}
v, err := Usage(path)
skipIfNotImplementedErr(t, err)
if err != nil {
t.Errorf("error %v", err)
}
if v.Path != path {
t.Errorf("error %v", err)
}
} | explode_data.jsonl/25908 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 119
} | [
2830,
3393,
47583,
31507,
1155,
353,
8840,
836,
8,
341,
26781,
1669,
80455,
743,
15592,
97574,
3126,
621,
330,
27077,
1,
341,
197,
26781,
284,
330,
34,
34300,
197,
532,
5195,
11,
1848,
1669,
24567,
5581,
340,
1903,
13389,
2679,
2623,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSaveCommit(t *testing.T) {
s := objmock.NewStore()
com1 := objhelpers.RandomCommit()
buf := bytes.NewBuffer(nil)
_, err := com1.WriteTo(buf)
require.NoError(t, err)
sum1, err := objects.SaveCommit(s, buf.Bytes())
require.NoError(t, err)
obj, err := objects.GetCommit(s, sum1)
require.NoError(t, err)
... | explode_data.jsonl/57831 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 450
} | [
2830,
3393,
8784,
33441,
1155,
353,
8840,
836,
8,
341,
1903,
1669,
2839,
16712,
7121,
6093,
2822,
32810,
16,
1669,
2839,
21723,
26709,
33441,
741,
26398,
1669,
5820,
7121,
4095,
27907,
340,
197,
6878,
1848,
1669,
469,
16,
4073,
1249,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestQuery(t *testing.T) {
env := NewTestVDBEnv(t)
env.Cleanup("testquery_")
env.Cleanup("testquery_ns1")
env.Cleanup("testquery_ns2")
env.Cleanup("testquery_ns3")
defer env.Cleanup("testquery_")
defer env.Cleanup("testquery_ns1")
defer env.Cleanup("testquery_ns2")
defer env.Cleanup("testquery_ns3")
commo... | explode_data.jsonl/594 | {
"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,
2859,
1155,
353,
8840,
836,
8,
341,
57538,
1669,
1532,
2271,
53,
3506,
14359,
1155,
340,
57538,
727,
60639,
445,
1944,
1631,
62,
1138,
57538,
727,
60639,
445,
1944,
1631,
34728,
16,
1138,
57538,
727,
60639,
445,
1944,
1631,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetSecret(t *testing.T) {
tests := []struct {
name string
secretNS string
secretName string
wantErr bool
want *corev1.Secret
}{
{
name: "Case: Valid request for retrieving a secret",
secretNS: "",
secretName: "foo",
want: &corev1.Secret{
ObjectMeta: metav1... | explode_data.jsonl/65156 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 629
} | [
2830,
3393,
1949,
19773,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
981,
914,
198,
197,
197,
20474,
2448,
256,
914,
198,
197,
197,
20474,
675,
914,
198,
197,
50780,
7747,
262,
1807,
198,
197,
50780,
981,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNetStatsBasic(t *testing.T) {
logrus.SetLevel(logrus.DebugLevel)
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
ps := NewNetStats(ctx, 120*time.Second, 2*time.Second, 1)
time.Sleep(4 * time.Second)
assert.GreaterOrEqual(t, len(ps.NICs), 1)
for _, n := range ps.NICs {
_, ok := ... | explode_data.jsonl/1476 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 185
} | [
2830,
3393,
6954,
16635,
15944,
1155,
353,
8840,
836,
8,
341,
90822,
4202,
4449,
12531,
20341,
20345,
4449,
340,
20985,
11,
9121,
1669,
2266,
26124,
9269,
5378,
19047,
2398,
16867,
9121,
741,
35009,
1669,
1532,
6954,
16635,
7502,
11,
220,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestSpacing(t *testing.T) {
var testTable = []struct {
input, expect string
}{
{"(=?ISO-8859-1?Q?a?=)", "(a)"},
{"(=?ISO-8859-1?Q?a?= b)", "(a b)"},
{"(=?ISO-8859-1?Q?a?= =?ISO-8859-1?Q?b?=)", "(ab)"},
{"(=?ISO-8859-1?Q?a?= =?ISO-8859-1?Q?b?=)", "(ab)"},
{"(=?ISO-8859-1?Q?a?=\r\n =?ISO-8859-1?Q?b?=... | explode_data.jsonl/31261 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 350
} | [
2830,
3393,
27026,
1155,
353,
8840,
836,
8,
341,
2405,
1273,
2556,
284,
3056,
1235,
341,
197,
22427,
11,
1720,
914,
198,
197,
59403,
197,
197,
4913,
7,
19884,
24167,
12,
23,
23,
20,
24,
12,
16,
30,
48,
98461,
59567,
11583,
11993,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestOfferAddedToStorage(t *testing.T) {
storage := MakeMemoryStorage()
m := MakeMarket(time.Now, storage, makeMockAccounts())
o := Offer{Symbol: "m"}
m.Offer(o)
if len(storage.offers["m"]) != 1 {
t.Fatalf("%+v", storage)
}
} | explode_data.jsonl/66398 | {
"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,
39462,
19337,
1249,
5793,
1155,
353,
8840,
836,
8,
341,
197,
16172,
1669,
7405,
10642,
5793,
741,
2109,
1669,
7405,
38822,
9730,
13244,
11,
5819,
11,
1281,
11571,
41369,
2398,
22229,
1669,
24498,
90,
15090,
25,
330,
76,
1670... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParsePosOverflow(t *testing.T) {
t.Parallel()
// If line/col numbers gets larger than 16-bit, we should probably use a
// custom reader instead.
tests := []struct {
name, in, want string
}{
{
"LineOverflowIsValid",
strings.Repeat("\n", (1<<16)-1) + "foo; bar",
"<nil>",
},
{
"LineOverf... | explode_data.jsonl/55112 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 560
} | [
2830,
3393,
14463,
4859,
42124,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
197,
322,
1416,
1555,
14,
2074,
5109,
5221,
8131,
1091,
220,
16,
21,
15257,
11,
582,
1265,
4658,
990,
264,
198,
197,
322,
2526,
6604,
4518,
624,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_segmentNormalizedName(t *testing.T) {
testCases := []normalizedBankRecordID{
normalizeBankRecordID("20201212 575073 2,000 202,012,128,756"),
}
for _, tc := range testCases {
segments := segmentNormalizedName(tc)
t.Logf("%q got split into %d segments", string(tc), len(segments))
if cap(segments) !=... | explode_data.jsonl/61108 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 216
} | [
2830,
3393,
28061,
12206,
20167,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
38460,
25828,
6471,
915,
515,
197,
197,
30590,
25828,
6471,
915,
445,
17,
15,
17,
15,
16,
17,
16,
17,
220,
20,
22,
20,
15,
22,
18,
220,
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... | 4 |
func TestTimestamp(t *testing.T) {
assert.NotNil(t, testGetOptionsProvider(t, Timestamp(time.Now())), "it should be registered as a default option")
now := time.Now()
o := Timestamp(now)
assert.NotNil(t, o, "should not return a nil option")
assert.Implements(t, (*Option)(nil), o, "it should implement the Op... | explode_data.jsonl/37942 | {
"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,
20812,
1155,
353,
8840,
836,
8,
972,
6948,
93882,
1155,
11,
1273,
1949,
3798,
5179,
1155,
11,
32758,
9730,
13244,
96501,
330,
275,
1265,
387,
9681,
438,
264,
1638,
2999,
30218,
80922,
1669,
882,
13244,
3568,
22229,
1669,
327... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetChaincodeDeploymentSpec(t *testing.T) {
pr := platforms.NewRegistry(&golang.Platform{})
_, err := utils.GetChaincodeDeploymentSpec([]byte("bad spec"), pr)
assert.Error(t, err, "Expected error with malformed spec")
cds, _ := proto.Marshal(&pb.ChaincodeDeploymentSpec{
ChaincodeSpec: &pb.ChaincodeSpec{... | explode_data.jsonl/39986 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 276
} | [
2830,
3393,
1949,
18837,
1851,
75286,
8327,
1155,
353,
8840,
836,
8,
341,
25653,
1669,
15409,
7121,
15603,
2099,
70,
37287,
51227,
6257,
692,
197,
6878,
1848,
1669,
12439,
2234,
18837,
1851,
75286,
8327,
10556,
3782,
445,
13855,
1398,
397... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetTeamsForUser(t *testing.T) {
th := Setup(t).InitBasic()
defer th.TearDown()
Client := th.Client
team2 := &model.Team{DisplayName: "Name", Name: GenerateTestTeamName(), Email: th.GenerateTestEmail(), Type: model.TEAM_INVITE}
rteam2, _ := Client.CreateTeam(team2)
teams, resp := Client.GetTeamsForUser(... | explode_data.jsonl/70720 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 398
} | [
2830,
3393,
1949,
60669,
2461,
1474,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1155,
568,
3803,
15944,
741,
16867,
270,
836,
682,
4454,
741,
71724,
1669,
270,
11716,
271,
197,
9196,
17,
1669,
609,
2528,
65842,
90,
26456,
25,
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... | 4 |
func TestClient_wrongVersion(t *testing.T) {
process := helperProcess("test-proto-upgraded-plugin")
c := NewClient(&ClientConfig{
Cmd: process,
HandshakeConfig: testHandshake,
Plugins: testGRPCPluginMap,
AllowedProtocols: []Protocol{ProtocolGRPC},
})
defer c.Kill()
// Get the client... | explode_data.jsonl/57856 | {
"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,
2959,
75198,
5637,
1155,
353,
8840,
836,
8,
341,
53314,
1669,
13137,
7423,
445,
1944,
9838,
983,
5239,
23343,
23629,
1138,
1444,
1669,
1532,
2959,
2099,
2959,
2648,
515,
197,
6258,
2277,
25,
1060,
1882,
345,
197,
197,
2314,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIsRunningAndReady(t *testing.T) {
set := newStatefulSet(3)
pod := newStatefulSetPod(set, 1)
if isRunningAndReady(pod) {
t.Error("isRunningAndReady does not respect Pod phase")
}
pod.Status.Phase = v1.PodRunning
if isRunningAndReady(pod) {
t.Error("isRunningAndReady does not respect Pod condition")
}... | explode_data.jsonl/68372 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 187
} | [
2830,
3393,
3872,
18990,
3036,
19202,
1155,
353,
8840,
836,
8,
341,
8196,
1669,
36848,
1262,
1649,
7,
18,
340,
3223,
347,
1669,
36848,
1262,
1649,
23527,
14171,
11,
220,
16,
340,
743,
374,
18990,
3036,
19202,
1295,
347,
8,
341,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestGenerateMetricDatas(t *testing.T) {
mds, err := GenerateMetrics("testdata/generated_pict_pairs_metrics.txt")
require.NoError(t, err)
require.Equal(t, 25, len(mds))
} | explode_data.jsonl/31243 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 72
} | [
2830,
3393,
31115,
54310,
47663,
1155,
353,
8840,
836,
8,
341,
2109,
5356,
11,
1848,
1669,
19813,
27328,
445,
92425,
79372,
620,
849,
36430,
37686,
3909,
1138,
17957,
35699,
1155,
11,
1848,
340,
17957,
12808,
1155,
11,
220,
17,
20,
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 |
func TestContext2Plan_computedAttrRefTypeMismatch(t *testing.T) {
m := testModule(t, "plan-computed-attr-ref-type-mismatch")
p := testProvider("aws")
p.DiffFn = testDiffFn
p.ValidateResourceTypeConfigFn = func(req providers.ValidateResourceTypeConfigRequest) providers.ValidateResourceTypeConfigResponse {
var diag... | explode_data.jsonl/28722 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 845
} | [
2830,
3393,
1972,
17,
20485,
2965,
19292,
13371,
3945,
929,
82572,
1155,
353,
8840,
836,
8,
341,
2109,
1669,
1273,
3332,
1155,
11,
330,
10393,
11476,
19292,
12,
2991,
43007,
10604,
1448,
24976,
1138,
3223,
1669,
1273,
5179,
445,
8635,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSessionDestroy(t *testing.T) {
t.Skip("s.destroy(true) is flakey")
t.Parallel()
sp, _, cleanup := setup(t, SessionPoolConfig{MinOpened: 1})
defer cleanup()
<-time.After(10 * time.Millisecond) // maintainer will create one session, we wait for it create session to avoid flakiness in test
sh, err := sp.t... | explode_data.jsonl/78701 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 300
} | [
2830,
3393,
5283,
14245,
1155,
353,
8840,
836,
8,
341,
3244,
57776,
445,
82,
17278,
3715,
8,
374,
1320,
726,
88,
1138,
3244,
41288,
7957,
2822,
41378,
11,
8358,
21290,
1669,
6505,
1155,
11,
9164,
10551,
2648,
90,
6217,
53522,
25,
220,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
func TestAssessRunStatusMultipleFailures(t *testing.T) {
status, message, dryRunSummary := StartAssessRunStatusMultipleFailures(t, false)
assert.Equal(t, v1alpha1.AnalysisPhaseFailed, status)
assert.Equal(t, "Metric \"run-forever\" assessed Failed due to failed (1) > failureLimit (0)", message)
expectedDryRunSummar... | explode_data.jsonl/75846 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 197
} | [
2830,
3393,
5615,
433,
6727,
2522,
32089,
19524,
1413,
1155,
353,
8840,
836,
8,
341,
23847,
11,
1943,
11,
9058,
6727,
19237,
1669,
5145,
5615,
433,
6727,
2522,
32089,
19524,
1413,
1155,
11,
895,
340,
6948,
12808,
1155,
11,
348,
16,
71... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGenerateToken(t *testing.T) {
resource.Require(t, resource.UnitTest)
manager := createManager(t)
identity := account.Identity{
ID: uuid.NewV4(),
Username: "testuser",
}
token, err := manager.Generate(identity)
ident, err := manager.Extract(token)
if err != nil {
t.Fatal("Could not extract... | explode_data.jsonl/54985 | {
"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,
31115,
3323,
1155,
353,
8840,
836,
8,
341,
50346,
81288,
1155,
11,
5101,
25159,
2271,
692,
92272,
1669,
1855,
2043,
1155,
692,
197,
16912,
1669,
2692,
24423,
515,
197,
29580,
25,
981,
16040,
7121,
53,
19,
3148,
197,
197,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestIndexedVars(t *testing.T) {
c := make(testVarContainer, 4)
c[0] = NewDInt(3)
c[1] = NewDInt(5)
c[2] = NewDInt(6)
c[3] = NewDInt(0)
h := MakeIndexedVarHelper(c, 4)
// We use only the first three variables.
v0 := h.IndexedVar(0)
v1 := h.IndexedVar(1)
v2 := h.IndexedVar(2)
if !h.IndexedVarUsed(0) ||... | explode_data.jsonl/72686 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 802
} | [
2830,
3393,
69941,
28305,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
1281,
8623,
3962,
4502,
11,
220,
19,
340,
1444,
58,
15,
60,
284,
1532,
35,
1072,
7,
18,
340,
1444,
58,
16,
60,
284,
1532,
35,
1072,
7,
20,
340,
1444,
58,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestInsertInsertOneOpt(t *testing.T) {
var bundle1 *OneBundle
bundle1 = bundle1.BypassDocumentValidation(true).BypassDocumentValidation(false)
testhelpers.RequireNotNil(t, bundle1, "created bundle was nil")
bundle1Opts := []option.Optioner{
BypassDocumentValidation(true).ConvertInsertOption(),
BypassDocume... | explode_data.jsonl/81177 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1929
} | [
2830,
3393,
13780,
13780,
3966,
21367,
1155,
353,
8840,
836,
8,
341,
2405,
12894,
16,
353,
3966,
8409,
198,
2233,
4206,
16,
284,
12894,
16,
1785,
49911,
7524,
13799,
3715,
568,
33,
49911,
7524,
13799,
3576,
340,
18185,
21723,
81288,
961... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValidateResultsBlockFailsOnBadGenesis(t *testing.T) {
with.Context(func(ctx context.Context) {
with.Logging(t, func(harness *with.LoggingHarness) {
s := newHarness(harness.Logger, false)
s.management.Reset()
setManagementValues(s.management, 1, primitives.TimestampSeconds(time.Now().Unix()), primit... | explode_data.jsonl/11018 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 250
} | [
2830,
3393,
17926,
9801,
4713,
37,
6209,
1925,
17082,
84652,
1155,
353,
8840,
836,
8,
341,
46948,
9328,
18552,
7502,
2266,
9328,
8,
341,
197,
46948,
41945,
1155,
11,
2915,
3203,
23518,
353,
4197,
41945,
74248,
8,
341,
298,
1903,
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 TestData(t *testing.T) {
defer abtest.SetupDataDir(t)()
f := mbtest.NewReportingMetricSetV2(t, getConfig())
// Set lastState and add test process to cache so it will be reported as stopped.
f.(*MetricSet).lastState = time.Now()
s := testSocket()
f.(*MetricSet).cache.DiffAndUpdateCache(convertToCacheable([]... | explode_data.jsonl/37026 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 279
} | [
2830,
93200,
1155,
353,
8840,
836,
8,
341,
16867,
668,
1944,
39820,
1043,
6184,
1155,
8,
2822,
1166,
1669,
10016,
1944,
7121,
70131,
54310,
1649,
53,
17,
1155,
11,
66763,
12367,
197,
322,
2573,
1537,
1397,
323,
912,
1273,
1882,
311,
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... | 3 |
func TestGenerateManifests_K8SAPIResetCache(t *testing.T) {
service := newService("../..")
src := argoappv1.ApplicationSource{Path: "manifests/base"}
q := apiclient.ManifestRequest{
KubeVersion: "v1.16.0",
Repo: &argoappv1.Repository{}, ApplicationSource: &src,
}
cachedFakeResponse := &apiclient.Manif... | explode_data.jsonl/5661 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 333
} | [
2830,
3393,
31115,
38495,
82,
10102,
23,
50,
7082,
14828,
8233,
1155,
353,
8840,
836,
8,
341,
52934,
1669,
501,
1860,
17409,
496,
5130,
41144,
1669,
1392,
78,
676,
85,
16,
17521,
3608,
90,
1820,
25,
330,
42315,
82,
26090,
16707,
18534... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAddDependency(t *testing.T) {
w := &Workflow{}
a, _ := w.NewStep("a")
b, _ := w.NewStep("b")
otherW := &Workflow{}
c, _ := otherW.NewStep("c")
tests := []struct {
desc string
in1, in2 *Step
shouldErr bool
}{
{"good case", a, b, false},
{"idempotent good case", a, b, false},
{"bad cas... | explode_data.jsonl/3861 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 365
} | [
2830,
3393,
2212,
36387,
1155,
353,
8840,
836,
8,
341,
6692,
1669,
609,
62768,
16094,
11323,
11,
716,
1669,
289,
7121,
8304,
445,
64,
1138,
2233,
11,
716,
1669,
289,
7121,
8304,
445,
65,
5130,
197,
1575,
54,
1669,
609,
62768,
16094,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGteField(t *testing.T) {
validate := New()
type TimeTest struct {
Start *time.Time `validate:"required,gte"`
End *time.Time `validate:"required,gte,gtefield=Start"`
}
now := time.Now()
start := now.Add(time.Hour * 24)
end := start.Add(time.Hour * 24)
timeTest := &TimeTest{
Start: &start,
E... | explode_data.jsonl/77303 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1653
} | [
2830,
3393,
38,
665,
1877,
1155,
353,
8840,
836,
8,
1476,
197,
7067,
1669,
1532,
2822,
13158,
4120,
2271,
2036,
341,
197,
65999,
353,
1678,
16299,
1565,
7067,
2974,
6279,
21644,
665,
8805,
197,
38407,
256,
353,
1678,
16299,
1565,
7067,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetOrderHistory(t *testing.T) {
b.SetDefaults()
TestSetup(t)
var getOrdersRequest = exchange.GetOrdersRequest{
OrderType: exchange.AnyOrderType,
Currencies: []currency.Pair{currency.NewPair(currency.LTC,
currency.BTC)},
}
_, err := b.GetOrderHistory(&getOrdersRequest)
if areTestAPIKeysSet() && e... | explode_data.jsonl/49005 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 179
} | [
2830,
3393,
1949,
4431,
13424,
1155,
353,
8840,
836,
8,
341,
2233,
4202,
16273,
741,
73866,
21821,
1155,
692,
2405,
633,
24898,
1900,
284,
9289,
2234,
24898,
1900,
515,
197,
197,
4431,
929,
25,
9289,
13311,
4431,
929,
345,
197,
6258,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTwoLineFile(t *testing.T) {
_, err := newWithContents(t, `{"user":"scheduler", "readonly": true, "resource": "pods"}
{"user":"scheduler", "readonly": true, "resource": "services"}
`)
if err != nil {
t.Errorf("unable to read policy file: %v", err)
}
} | explode_data.jsonl/46826 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 103
} | [
2830,
3393,
11613,
2460,
1703,
1155,
353,
8840,
836,
8,
341,
197,
6878,
1848,
1669,
501,
2354,
14803,
1155,
11,
1565,
4913,
872,
3252,
63122,
497,
220,
330,
22569,
788,
830,
11,
330,
9233,
788,
330,
79,
29697,
16707,
4913,
872,
3252,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetRepoNames(t *testing.T) {
b := bytes.NewBuffer(nil)
m := &Manager{
Out: b,
RepositoryConfig: repoConfig,
RepositoryCache: repoCache,
}
tests := []struct {
name string
req []*chart.Dependency
expect map[string]string
err bool
}{
{
name: "no repo definition, but r... | explode_data.jsonl/24397 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 925
} | [
2830,
3393,
1949,
25243,
7980,
1155,
353,
8840,
836,
8,
341,
2233,
1669,
5820,
7121,
4095,
27907,
340,
2109,
1669,
609,
2043,
515,
197,
197,
2662,
25,
1060,
293,
345,
197,
197,
4624,
2648,
25,
15867,
2648,
345,
197,
197,
4624,
8233,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParseAny(t *testing.T) {
assert(t, Parse("100").Float() == 100)
assert(t, Parse("true").Bool())
assert(t, Parse("false").Bool() == false)
assert(t, Parse("yikes").Exists() == false)
} | explode_data.jsonl/43417 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 80
} | [
2830,
3393,
14463,
8610,
1155,
353,
8840,
836,
8,
341,
6948,
1155,
11,
14775,
445,
16,
15,
15,
1827,
5442,
368,
621,
220,
16,
15,
15,
340,
6948,
1155,
11,
14775,
445,
1866,
1827,
11233,
2398,
6948,
1155,
11,
14775,
445,
3849,
1827,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestVariables_ListsAndNullability_DoesNotAllowUnknownTypesToBeUsedAsValues(t *testing.T) {
doc := `
query q($input: UnknownType!) {
fieldWithObjectInput(input: $input)
}
`
params := map[string]interface{}{
"input": "whoknows",
}
expected := &graphql.Result{
Data: nil,
Errors: [... | explode_data.jsonl/6465 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 417
} | [
2830,
3393,
22678,
27104,
82,
3036,
3280,
2897,
1557,
7072,
2623,
18605,
13790,
4173,
1249,
3430,
22743,
2121,
6227,
1155,
353,
8840,
836,
8,
341,
59536,
1669,
22074,
286,
3239,
2804,
699,
1355,
25,
21693,
929,
16315,
341,
688,
2070,
23... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestDelete(t *testing.T) {
type want struct {
cr *v1beta1.SecurityGroup
err error
}
cases := map[string]struct {
args
want
}{
"Successful": {
args: args{
sg: &fake.MockSecurityGroupClient{
MockDelete: func(ctx context.Context, input *awsec2.DeleteSecurityGroupInput, opts []func(*awsec2.... | explode_data.jsonl/79624 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 935
} | [
2830,
3393,
6435,
1155,
353,
8840,
836,
8,
341,
13158,
1366,
2036,
341,
197,
91492,
220,
353,
85,
16,
19127,
16,
21567,
2808,
198,
197,
9859,
1465,
198,
197,
630,
1444,
2264,
1669,
2415,
14032,
60,
1235,
341,
197,
31215,
198,
197,
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... | 1 |
func TestNumberDataPoint_StartTimestamp(t *testing.T) {
ms := NewNumberDataPoint()
assert.EqualValues(t, Timestamp(0), ms.StartTimestamp())
testValStartTimestamp := Timestamp(1234567890)
ms.SetStartTimestamp(testValStartTimestamp)
assert.EqualValues(t, testValStartTimestamp, ms.StartTimestamp())
} | explode_data.jsonl/32723 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 102
} | [
2830,
3393,
2833,
1043,
2609,
38056,
20812,
1155,
353,
8840,
836,
8,
341,
47691,
1669,
1532,
2833,
1043,
2609,
741,
6948,
12808,
6227,
1155,
11,
32758,
7,
15,
701,
9829,
12101,
20812,
2398,
18185,
2208,
3479,
20812,
1669,
32758,
7,
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 TestCombinedStatus(t *testing.T) {
ts := httptest.NewTLSServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if r.Method != http.MethodGet {
t.Errorf("Bad method: %s", r.Method)
}
if r.URL.Path == "/repos/k8s/kuber/commits/SHA/status" {
statuses := CombinedStatus{
SHA: "SHA"... | explode_data.jsonl/6303 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 653
} | [
2830,
3393,
94268,
2522,
1155,
353,
8840,
836,
8,
341,
57441,
1669,
54320,
70334,
7121,
13470,
1220,
2836,
19886,
89164,
18552,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
197,
743,
435,
20798,
961,
1758,
20798,
1949,
341,
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... | 6 |
func TestChannelClientRollsBackPvtDataIfMvccReadConflict(t *testing.T) {
orgsContext := setupMultiOrgContext(t, mainSDK)
require.NoError(t, integration.EnsureChannelCreatedAndPeersJoined(t, mainSDK, orgChannelID, "orgchannel.tx", orgsContext))
// private data collection used for test
const coll = "collection1"
// ... | explode_data.jsonl/5048 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1177
} | [
2830,
3393,
9629,
2959,
32355,
82,
3707,
47,
9708,
1043,
2679,
44,
85,
638,
4418,
57974,
1155,
353,
8840,
836,
8,
341,
87625,
82,
1972,
1669,
6505,
20358,
42437,
1972,
1155,
11,
1887,
31534,
340,
17957,
35699,
1155,
11,
17590,
22834,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPaginatedBase_Last(t *testing.T) {
b := PaginatedBase{
pagination: APIResponseMetadataPagination{
TotalPages: 10,
},
getFunc: func(parameters APIRequestParameters) (Paginated, error) {
assert.Equal(t, 10, parameters.Pagination.Page)
return &PaginatedBase{
parameters: parameters,
}, nil
... | explode_data.jsonl/44636 | {
"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,
47712,
15479,
3978,
84672,
1155,
353,
8840,
836,
8,
341,
2233,
1669,
42355,
15479,
3978,
515,
197,
3223,
10353,
25,
5333,
2582,
14610,
44265,
515,
298,
197,
7595,
17713,
25,
220,
16,
15,
345,
197,
197,
1583,
197,
10366,
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... | 1 |
func TestPlayer_HasDefuseKit(t *testing.T) {
pl := playerWithProperty("m_bHasDefuser", st.PropertyValue{IntVal: 0})
assert.False(t, pl.HasDefuseKit())
pl = playerWithProperty("m_bHasDefuser", st.PropertyValue{IntVal: 1})
assert.True(t, pl.HasDefuseKit())
} | explode_data.jsonl/12185 | {
"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,
4476,
2039,
300,
2620,
810,
7695,
1155,
353,
8840,
836,
8,
341,
72213,
1669,
2781,
2354,
3052,
445,
76,
880,
10281,
2620,
872,
497,
357,
15727,
1130,
90,
1072,
2208,
25,
220,
15,
8824,
6948,
50757,
1155,
11,
625,
16152,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestUpdate(t *testing.T) {
storage := map[string]RESTStorage{}
simpleStorage := SimpleRESTStorage{}
ID := "id"
storage["simple"] = &simpleStorage
selfLinker := &setTestSelfLinker{
t: t,
expectedSet: "/prefix/version/simple/" + ID,
}
handler := Handle(storage, codec, "/prefix/version", selfLink... | explode_data.jsonl/71497 | {
"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,
4289,
1155,
353,
8840,
836,
8,
341,
197,
16172,
1669,
2415,
14032,
60,
38307,
5793,
16094,
1903,
6456,
5793,
1669,
8993,
38307,
5793,
16094,
29580,
1669,
330,
307,
698,
197,
16172,
1183,
22944,
1341,
284,
609,
22944,
5793,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func TestOrdererAddresses(t *testing.T) {
cc := &ChannelConfig{protos: &ChannelProtos{OrdererAddresses: &cb.OrdererAddresses{}}}
assert.Error(t, cc.validateOrdererAddresses(), "Must supply orderer addresses")
cc = &ChannelConfig{protos: &ChannelProtos{OrdererAddresses: &cb.OrdererAddresses{Addresses: []string{"127.... | explode_data.jsonl/30624 | {
"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,
4431,
261,
52290,
1155,
353,
8840,
836,
8,
341,
63517,
1669,
609,
9629,
2648,
90,
4391,
436,
25,
609,
9629,
12423,
436,
90,
4431,
261,
52290,
25,
609,
7221,
19664,
261,
52290,
90,
3417,
532,
6948,
6141,
1155,
11,
12527,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_Export_isExists(t *testing.T) {
tst := []string{"../testdata/voice.pcm", "../testdata/raw-http-post-json.txt"}
for _, fName := range tst {
assert.Equal(t, isExists(fName), true, fName)
}
notExists := []string{"a.txt", "b.txt"}
for _, fName := range notExists {
assert.Equal(t, isExists(fName), false... | explode_data.jsonl/43932 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 143
} | [
2830,
3393,
62,
16894,
6892,
15575,
1155,
353,
8840,
836,
8,
341,
3244,
267,
1669,
3056,
917,
4913,
1244,
92425,
14,
9862,
556,
6226,
497,
7005,
92425,
75909,
71312,
24410,
56080,
3909,
63159,
2023,
8358,
92409,
1669,
2088,
71707,
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... | 3 |
func TestDeletePost(t *testing.T) {
th := Setup(t).InitBasic()
defer th.TearDown()
Client := th.Client
_, resp := Client.DeletePost("")
CheckNotFoundStatus(t, resp)
_, resp = Client.DeletePost("junk")
CheckBadRequestStatus(t, resp)
_, resp = Client.DeletePost(th.BasicPost.Id)
CheckForbiddenStatus(t, resp)
... | explode_data.jsonl/5255 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 316
} | [
2830,
3393,
6435,
4133,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1155,
568,
3803,
15944,
741,
16867,
270,
836,
682,
4454,
741,
71724,
1669,
270,
11716,
271,
197,
6878,
9039,
1669,
8423,
18872,
4133,
31764,
69472,
10372,
2522,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLocalIP(t *testing.T) {
t.Parallel()
ip, err := LocalIP()
if err != nil {
t.Error(err)
}
if ip.String() == "" {
t.Error("expected IP address")
}
t.Log(ip)
} | explode_data.jsonl/58671 | {
"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,
7319,
3298,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
46531,
11,
1848,
1669,
8774,
3298,
741,
743,
1848,
961,
2092,
341,
197,
3244,
6141,
3964,
340,
197,
630,
743,
5997,
6431,
368,
621,
1591,
341,
197,
3244,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBrokerThreadSafety(t *testing.T) {
count := 100000
var handled int32
handler1 := func(msg interface{}) {
atomic.AddInt32(&handled, 1)
}
handler2 := func(msg interface{}) {
atomic.AddInt32(&handled, 1)
}
handler3 := func(msg interface{}) {
atomic.AddInt32(&handled, 1)
}
b := NewBroker()
sub1 :=... | explode_data.jsonl/37066 | {
"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,
65545,
6855,
73037,
1155,
353,
8840,
836,
8,
341,
18032,
1669,
220,
16,
15,
15,
15,
15,
15,
198,
2405,
17608,
526,
18,
17,
198,
53326,
16,
1669,
2915,
8119,
3749,
28875,
341,
197,
78739,
1904,
1072,
18,
17,
2099,
38821,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMatchIgnoreMissingBodyDefinition(t *testing.T) {
hreq := &definition.Request{}
hreq.Body = "HelloWorld"
mreq := &definition.Request{}
m := MockMatch{}
if m, err := m.Match(hreq, mreq); !m {
t.Error(err)
}
} | explode_data.jsonl/1096 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 91
} | [
2830,
3393,
8331,
12497,
25080,
5444,
10398,
1155,
353,
8840,
836,
8,
341,
9598,
2958,
1669,
609,
18375,
9659,
16094,
9598,
2958,
20934,
284,
330,
9707,
10134,
698,
2109,
2958,
1669,
609,
18375,
9659,
16094,
2109,
1669,
14563,
8331,
31483... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTx_CreateBucket(t *testing.T) {
db := MustOpenDB()
defer db.MustClose()
// Create a bucket.
if err := db.Update(func(tx *bolt.Tx) error {
b, err := tx.CreateBucket([]byte("widgets"))
if err != nil {
t.Fatal(err)
} else if b == nil {
t.Fatal("expected bucket")
}
return nil
}); err != nil {... | explode_data.jsonl/1689 | {
"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,
31584,
34325,
36018,
1155,
353,
8840,
836,
8,
341,
20939,
1669,
15465,
5002,
3506,
741,
16867,
2927,
50463,
7925,
2822,
197,
322,
4230,
264,
15621,
624,
743,
1848,
1669,
2927,
16689,
18552,
27301,
353,
52433,
81362,
8,
1465,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReadFull(t *testing.T) {
var out [4]byte
b := bytes.NewBufferString("foo")
n, err := readFull(b, out[:3])
if n != 3 || err != nil {
t.Errorf("full read failed n:%d err:%s", n, err)
}
b = bytes.NewBufferString("foo")
n, err = readFull(b, out[:4])
if n != 3 || err != io.ErrUnexpectedEOF {
t.Errorf(... | explode_data.jsonl/52942 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 233
} | [
2830,
3393,
4418,
9432,
1155,
353,
8840,
836,
8,
341,
2405,
700,
508,
19,
90184,
271,
2233,
1669,
5820,
7121,
4095,
703,
445,
7975,
1138,
9038,
11,
1848,
1669,
1349,
9432,
1883,
11,
700,
3447,
18,
2546,
743,
308,
961,
220,
18,
1369,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPartitionActive(t *testing.T) {
tests := []struct {
lighthouseJobs []v1alpha1.LighthouseJob
pending sets.String
triggered sets.String
aborted sets.String
}{
{
lighthouseJobs: []v1alpha1.LighthouseJob{
{
ObjectMeta: metav1.ObjectMeta{
Name: "foo",
},
Status: v1alpha1... | explode_data.jsonl/51120 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1061
} | [
2830,
3393,
49978,
5728,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
8810,
57909,
40667,
3056,
85,
16,
7141,
16,
1214,
57909,
12245,
271,
197,
3223,
2459,
256,
7289,
6431,
198,
197,
83228,
291,
7289,
6431,
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... | 8 |
func TestFormat_StringInterfaceMap(t *testing.T) {
str := "some test {abc} {{abc}} {key2}"
kwArgs := map[String]interface{}{"abc": "123"}
got := Format(str, kwArgs)
want := "some test 123 {abc} {key2}"
assert.Equal(t, want, got)
} | explode_data.jsonl/54325 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 92
} | [
2830,
3393,
4061,
31777,
5051,
2227,
1155,
353,
8840,
836,
8,
341,
11355,
1669,
330,
14689,
1273,
314,
13683,
92,
5867,
13683,
3417,
314,
792,
17,
11195,
16463,
86,
4117,
1669,
2415,
18498,
31344,
6257,
4913,
13683,
788,
330,
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... | 1 |
func TestDomainType(t *testing.T) {
testWithAndWithoutPreferSimpleProtocol(t, func(t *testing.T, conn *pgx.Conn) {
skipCockroachDB(t, conn, "Server does support domain types (https://github.com/cockroachdb/cockroach/issues/27796)")
var n uint64
// Domain type uint64 is a PostgreSQL domain of underlying type nu... | explode_data.jsonl/40027 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 603
} | [
2830,
3393,
13636,
929,
1155,
353,
8840,
836,
8,
341,
18185,
2354,
3036,
26040,
4703,
802,
16374,
20689,
1155,
11,
2915,
1155,
353,
8840,
836,
11,
4534,
353,
3517,
87,
50422,
8,
341,
197,
1903,
13389,
34,
1176,
64500,
3506,
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... | 8 |
func TestRuleTimestampDefault(t *testing.T) {
common.Log.Debug("Entering function: %s", common.GetFunctionName())
sqls := [][]string{
{
"CREATE TABLE tbl( `id` bigint not null, `create_time` timestamp) ENGINE=InnoDB DEFAULT CHARSET=utf8;",
"ALTER TABLE t1 MODIFY b timestamp NOT NULL;",
},
{
"CREATE TAB... | explode_data.jsonl/76834 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 453
} | [
2830,
3393,
11337,
20812,
3675,
1155,
353,
8840,
836,
8,
341,
83825,
5247,
20345,
445,
82867,
729,
25,
1018,
82,
497,
4185,
2234,
5152,
675,
2398,
30633,
82,
1669,
52931,
917,
515,
197,
197,
515,
298,
197,
1,
22599,
14363,
21173,
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... | 7 |
func TestStreamFlush(t *testing.T) {
var w bytes.Buffer
writer := NewWriter(&w)
reader := NewReader(&w)
payload := "cc" // keep the payload short to make sure it will not be automatically flushed by zstd
buf := make([]byte, len(payload))
for i := 0; i < 5; i++ {
_, err := writer.Write([]byte(payload))
failO... | explode_data.jsonl/70463 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 276
} | [
2830,
3393,
3027,
46874,
1155,
353,
8840,
836,
8,
341,
2405,
289,
5820,
22622,
198,
38959,
1669,
1532,
6492,
2099,
86,
340,
61477,
1669,
1532,
5062,
2099,
86,
692,
76272,
1669,
330,
638,
1,
442,
2506,
279,
7729,
2805,
311,
1281,
2704,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestServerCloseTelemetryConnection(t *testing.T) {
// create server telemetrybuffer and start server
tb = NewTelemetryBuffer(hostAgentUrl)
err := tb.StartServer()
if err == nil {
go tb.BufferAndPushData(0)
}
// create client telemetrybuffer and connect to server
tb1 := NewTelemetryBuffer(hostAgentUrl)
i... | explode_data.jsonl/49198 | {
"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,
5475,
7925,
6639,
35958,
4526,
1155,
353,
8840,
836,
8,
341,
197,
322,
1855,
3538,
61037,
7573,
323,
1191,
3538,
198,
62842,
284,
1532,
6639,
35958,
4095,
19973,
16810,
2864,
340,
9859,
1669,
16363,
12101,
5475,
741,
743,
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... | 5 |
func TestPageWithShortCodeInSummary(t *testing.T) {
t.Parallel()
assertFunc := func(t *testing.T, ext string, pages page.Pages) {
p := pages[0]
checkPageTitle(t, p, "Simple")
checkPageContent(t, p, normalizeExpected(ext, "<p>Summary Next Line. <figure> <img src=\"/not/real\"/> </figure> . More text here.</p><p>... | explode_data.jsonl/60613 | {
"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,
2665,
2354,
12472,
2078,
641,
19237,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
6948,
9626,
1669,
2915,
1155,
353,
8840,
836,
11,
1303,
914,
11,
6816,
2150,
68829,
8,
341,
197,
3223,
1669,
6816,
58,
15,
921,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreateTeamWithUser(t *testing.T) {
th := Setup(t).InitBasic()
defer th.TearDown()
id := model.NewId()
team := &model.Team{
DisplayName: "dn_" + id,
Name: "name" + id,
Email: "success+" + id + "@simulator.amazonses.com",
Type: model.TEAM_OPEN,
}
_, err := th.App.CreateTeamWit... | explode_data.jsonl/30268 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 229
} | [
2830,
3393,
4021,
14597,
2354,
1474,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1155,
568,
3803,
15944,
741,
16867,
270,
836,
682,
4454,
2822,
15710,
1669,
1614,
7121,
764,
741,
197,
9196,
1669,
609,
2528,
65842,
515,
197,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestFromError(t *testing.T) {
dummyErr := errors.New("dummy error")
err := FromError(http.StatusInternalServerError, dummyErr)
assert.Error(t, err)
assert.Equal(t, dummyErr.Error(), err.Error())
} | explode_data.jsonl/30242 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 76
} | [
2830,
3393,
3830,
1454,
1155,
353,
8840,
836,
8,
341,
2698,
8574,
7747,
1669,
5975,
7121,
445,
31390,
1465,
1138,
9859,
1669,
5542,
1454,
19886,
66760,
11,
17292,
7747,
340,
6948,
6141,
1155,
11,
1848,
340,
6948,
12808,
1155,
11,
17292,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStructPtrCallMethod(t *testing.T) {
foo := &contact{
Name: "bill",
}
out, err := starlight.Eval([]byte(`out = foo.GetName()`), map[string]interface{}{"foo": foo}, nil)
if err != nil {
t.Fatal(err)
}
o, ok := out["out"]
if !ok {
t.Fatal("out param not found")
}
s, ok := o.(string)
if !ok {
t.... | explode_data.jsonl/47070 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 201
} | [
2830,
3393,
9422,
5348,
7220,
3523,
1155,
353,
8840,
836,
8,
341,
197,
7975,
1669,
609,
6287,
515,
197,
21297,
25,
330,
29642,
756,
197,
630,
13967,
11,
1848,
1669,
6774,
4145,
5142,
831,
10556,
3782,
5809,
411,
284,
15229,
60304,
542... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIntDataPoint_Timestamp(t *testing.T) {
ms := NewIntDataPoint()
assert.EqualValues(t, Timestamp(0), ms.Timestamp())
testValTimestamp := Timestamp(1234567890)
ms.SetTimestamp(testValTimestamp)
assert.EqualValues(t, testValTimestamp, ms.Timestamp())
} | explode_data.jsonl/32714 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 95
} | [
2830,
3393,
1072,
1043,
2609,
1139,
4702,
1155,
353,
8840,
836,
8,
341,
47691,
1669,
1532,
1072,
1043,
2609,
741,
6948,
12808,
6227,
1155,
11,
32758,
7,
15,
701,
9829,
49024,
2398,
18185,
2208,
20812,
1669,
32758,
7,
16,
17,
18,
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 TestFromURL(t *testing.T) {
endSystem, err := net.Listen("tcp", "127.0.0.1:0")
if err != nil {
t.Fatalf("net.Listen failed: %v", err)
}
defer endSystem.Close()
gateway, err := net.Listen("tcp", "127.0.0.1:0")
if err != nil {
t.Fatalf("net.Listen failed: %v", err)
}
defer gateway.Close()
var wg sync.W... | explode_data.jsonl/72577 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 392
} | [
2830,
3393,
3830,
3144,
1155,
353,
8840,
836,
8,
341,
6246,
2320,
11,
1848,
1669,
4179,
68334,
445,
27161,
497,
330,
16,
17,
22,
13,
15,
13,
15,
13,
16,
25,
15,
1138,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
4711,
68334,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTagsDirection(t *testing.T) {
assert.NoError(t, PrepareEngine())
type OnlyFromDBStruct struct {
Id int64
Name string
Uuid string `xorm:"<- default '1'"`
}
assertSync(t, new(OnlyFromDBStruct))
cnt, err := testEngine.Insert(&OnlyFromDBStruct{
Name: "test",
Uuid: "2",
})
assert.NoError(t, er... | explode_data.jsonl/19216 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 580
} | [
2830,
3393,
15930,
9268,
1155,
353,
8840,
836,
8,
341,
6948,
35699,
1155,
11,
31166,
4571,
12367,
13158,
8278,
3830,
3506,
9422,
2036,
341,
197,
67211,
256,
526,
21,
19,
198,
197,
21297,
914,
198,
197,
15980,
2423,
914,
1565,
87,
493,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.