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 TestIDPCanHandlePostRequestWithExistingSession(t *testing.T) {
test := NewIdentifyProviderTest(t)
test.IDP.SessionProvider = &mockSessionProvider{
GetSessionFunc: func(w http.ResponseWriter, r *http.Request, req *IdpAuthnRequest) *Session {
return &Session{
ID: "f00df00df00d",
UserName: "alice... | explode_data.jsonl/19825 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 412
} | [
2830,
3393,
915,
4872,
276,
6999,
4133,
1900,
2354,
53067,
5283,
1155,
353,
8840,
836,
8,
341,
18185,
1669,
1532,
28301,
1437,
5179,
2271,
1155,
340,
18185,
9910,
47,
20674,
5179,
284,
609,
16712,
5283,
5179,
515,
197,
37654,
5283,
9626... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestBeaconDiversity(t *testing.T) {
var tests = []struct {
name string
beacon []common.IFIDType
diversity int
}{
{
name: "Same beacon",
beacon: []common.IFIDType{graph.If_130_A_110_X, graph.If_110_X_210_X,
graph.If_210_X_220_X},
diversity: 0,
},
{
name: "Share one link",
be... | explode_data.jsonl/35788 | {
"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,
3430,
22379,
35,
2977,
1155,
353,
8840,
836,
8,
341,
2405,
7032,
284,
3056,
1235,
341,
197,
11609,
414,
914,
198,
197,
73142,
22379,
262,
3056,
5464,
2447,
37,
915,
929,
198,
197,
63278,
388,
487,
526,
198,
197,
59403,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetOSFileState(t *testing.T) {
file, err := ioutil.TempFile("", "")
assert.NoError(t, err)
fileinfo, err := file.Stat()
assert.NoError(t, err)
state := GetOSState(fileinfo)
assert.True(t, state.Inode > 0)
if runtime.GOOS == "openbsd" {
// The first device on OpenBSD has an ID of 0 so allow this.
... | explode_data.jsonl/69456 | {
"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,
3126,
1703,
1397,
1155,
353,
8840,
836,
8,
341,
17661,
11,
1848,
1669,
43144,
65009,
1703,
19814,
14676,
6948,
35699,
1155,
11,
1848,
692,
17661,
2733,
11,
1848,
1669,
1034,
53419,
741,
6948,
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... | 2 |
func TestOkMessage8(t *testing.T) {
// Check header
msg := NewPacket(VERSION_2).Ok(M_USER_AUTH)
if msg.Header.GetSize() != 6 {
t.Fail()
}
} | explode_data.jsonl/29150 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 64
} | [
2830,
3393,
11578,
2052,
23,
1155,
353,
8840,
836,
8,
341,
197,
322,
4248,
4247,
198,
21169,
1669,
1532,
16679,
7,
17636,
62,
17,
568,
11578,
3189,
9107,
22675,
340,
743,
3750,
15753,
87472,
368,
961,
220,
21,
341,
197,
3244,
57243,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetInstanceStock(t *testing.T) {
args := &CreateInstanceStockArgs{
FlavorId: "BBC-G4-PDDAS",
ZoneName: "cn-su-a",
}
if res, err := BBC_CLIENT.GetInstanceCreateStock(args); err != nil {
fmt.Println("Get specific instance eni failed: ", err)
} else {
fmt.Println("Get specific instance eni success, re... | explode_data.jsonl/4075 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 129
} | [
2830,
3393,
42761,
19369,
1155,
353,
8840,
836,
8,
341,
31215,
1669,
609,
4021,
2523,
19369,
4117,
515,
197,
197,
3882,
3292,
764,
25,
330,
66755,
12010,
19,
9299,
4103,
1911,
756,
197,
197,
15363,
675,
25,
330,
14271,
86129,
7409,
75... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_ReplaceDockerImageURL(t *testing.T) {
const replacedWithData = "testImage!"
testData := []struct {
testName string
data File
expectedResult File
shouldFail bool
}{
{
testName: "correct data test",
data: File{Content: []map[string]interface{}{{
"apiVersion": "installe... | explode_data.jsonl/64711 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 809
} | [
2830,
3393,
62,
23107,
35,
13659,
1906,
3144,
1155,
353,
8840,
836,
8,
341,
4777,
12575,
80356,
284,
330,
1944,
1906,
24734,
18185,
1043,
1669,
3056,
1235,
341,
197,
18185,
675,
981,
914,
198,
197,
8924,
1843,
2887,
198,
197,
42400,
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 TestInsertionSort(t *testing.T) {
ints := []int{1, 2, 8, 9, 0, -9, 8}
InsertionSortInts(ints)
if !checkIntsInOrder(ints) {
t.Error("insertion sort failed!")
}
} | explode_data.jsonl/77665 | {
"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,
13780,
290,
10231,
1155,
353,
8840,
836,
8,
341,
2084,
82,
1669,
3056,
396,
90,
16,
11,
220,
17,
11,
220,
23,
11,
220,
24,
11,
220,
15,
11,
481,
24,
11,
220,
23,
532,
197,
13780,
290,
10231,
1072,
82,
1548,
82,
340... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestNewRunCommandFailingCompletion(t *testing.T) {
var scripts []string
f := newFakeKoolRun([]builder.Command{}, nil)
f.parser.(*parser.FakeParser).MockScripts = []string{"testing_script"}
f.parser.(*parser.FakeParser).MockParseAvailableScriptsError = errors.New("parsing error")
cmd := NewRunCommand(f)
scri... | explode_data.jsonl/60862 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 156
} | [
2830,
3393,
3564,
6727,
4062,
37,
14277,
33190,
1155,
353,
8840,
836,
8,
341,
2405,
19502,
3056,
917,
198,
1166,
1669,
501,
52317,
42,
1749,
6727,
10556,
17850,
12714,
22655,
2092,
340,
1166,
25617,
41399,
9657,
991,
726,
6570,
568,
115... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConcurrentT_Barrier(t *testing.T) {
const N = 64
const M = 32
t.Run("happy", func(t *testing.T) {
ct := test.NewConcurrent(t)
for i := 0; i < N; i++ {
go ct.StageN("loop", N, func(t test.ConcT) {
for j := 0; j < M; j++ {
t.BarrierN(fmt.Sprintf("barrier %d", j), N)
}
})
}
ct.Wait... | explode_data.jsonl/69827 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 366
} | [
2830,
3393,
1109,
3231,
51,
91069,
7253,
1155,
353,
8840,
836,
8,
341,
4777,
451,
284,
220,
21,
19,
198,
4777,
386,
284,
220,
18,
17,
271,
3244,
16708,
445,
56521,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
89216,
1669,
1273,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestServicePackageUpdate(t *testing.T) {
assert := assert.New(t)
k := servicePackagesCollection()
svc1 := ServicePackage{
ServicePackage: konnect.ServicePackage{
ID: kong.String("foo-id"),
Name: kong.String("foo-name"),
},
}
assert.Nil(k.Add(svc1))
svc1.Name = kong.String("bar-name")
assert.Nil... | explode_data.jsonl/51006 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 241
} | [
2830,
3393,
1860,
13100,
4289,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
340,
16463,
1669,
2473,
69513,
6482,
741,
1903,
7362,
16,
1669,
5362,
13100,
515,
197,
91619,
13100,
25,
16540,
2321,
13860,
13100,
515,
298,
295... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHTMLValidation(t *testing.T) {
tests := []struct {
param string
expected bool
}{
{"<html>", true},
{"<script>", true},
{"<stillworks>", true},
{"</html", false},
{"</script>", true},
{"<//script>", false},
{"<123nonsense>", false},
{"test", false},
{"&example", false},
}
validate ... | explode_data.jsonl/77357 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 351
} | [
2830,
3393,
5835,
13799,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
36037,
262,
914,
198,
197,
42400,
1807,
198,
197,
59403,
197,
197,
4913,
27,
1551,
21156,
830,
1583,
197,
197,
4913,
27,
2282,
21156,
830,
1583,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEntry_SetText_Overflow(t *testing.T) {
entry := widget.NewEntry()
assert.Equal(t, 0, entry.CursorColumn)
test.Type(entry, "test")
assert.Equal(t, 4, entry.CursorColumn)
entry.SetText("x")
assert.Equal(t, 1, entry.CursorColumn)
key := &fyne.KeyEvent{Name: fyne.KeyDelete}
entry.TypedKey(key)
assert... | explode_data.jsonl/12370 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 223
} | [
2830,
3393,
5874,
14812,
1178,
62,
42124,
1155,
353,
8840,
836,
8,
341,
48344,
1669,
9086,
7121,
5874,
2822,
6948,
12808,
1155,
11,
220,
15,
11,
4343,
29929,
2933,
692,
18185,
10184,
18238,
11,
330,
1944,
1138,
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 TestConnection(t *testing.T) {
env.LoadEnv()
// Generate random jwt key
authenticate.GenerateRandomKey()
// Make server sent event
// Connect to database
appDB, err := legatoDb.Connect()
if err != nil {
panic(err)
}
timeoutContext := time.Duration(viper.GetInt("context.timeout")) * time.Second
use... | explode_data.jsonl/38805 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 314
} | [
2830,
3393,
4526,
1155,
353,
8840,
836,
8,
1476,
57538,
13969,
14359,
2822,
197,
322,
19813,
4194,
24589,
1376,
198,
197,
50060,
57582,
13999,
1592,
2822,
197,
322,
7405,
3538,
3208,
1538,
271,
197,
322,
13015,
311,
4625,
198,
28236,
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... | 4 |
func TestDNSNameValidTLD(t *testing.T) {
inputPath := "dnsNameValidTLD.pem"
expected := lint.Pass
out := test.TestLint("e_dnsname_not_valid_tld", inputPath)
if out.Status != expected {
t.Errorf("%s: expected %s, got %s", inputPath, expected, out.Status)
}
} | explode_data.jsonl/24841 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 108
} | [
2830,
3393,
61088,
675,
4088,
51,
12335,
1155,
353,
8840,
836,
8,
341,
22427,
1820,
1669,
330,
45226,
675,
4088,
51,
12335,
49373,
698,
42400,
1669,
57920,
87768,
198,
13967,
1669,
1273,
8787,
47556,
445,
68,
71125,
606,
7913,
8337,
528... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCheckHypervisorConfig(t *testing.T) {
assert := assert.New(t)
dir, err := ioutil.TempDir(testDir, "")
if err != nil {
t.Fatal(err)
}
defer os.RemoveAll(dir)
// Not created on purpose
imageENOENT := filepath.Join(dir, "image-ENOENT.img")
initrdENOENT := filepath.Join(dir, "initrd-ENOENT.img")
imag... | explode_data.jsonl/11751 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1022
} | [
2830,
3393,
3973,
39,
1082,
31396,
2648,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
48532,
11,
1848,
1669,
43144,
65009,
6184,
8623,
6184,
11,
14676,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
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... | 7 |
func TestCreateNamespace(t *testing.T) {
namespaceObject := &v1.Namespace{}
namespaceObject.Name = "my-namespace"
f, tf, codec, ns := cmdtesting.NewAPIFactory()
tf.Printer = &testPrinter{}
tf.Client = &fake.RESTClient{
GroupVersion: schema.GroupVersion{Version: "v1"},
NegotiatedSerializer: ns,
Client... | explode_data.jsonl/20780 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 394
} | [
2830,
3393,
4021,
22699,
1155,
353,
8840,
836,
8,
341,
56623,
1190,
1669,
609,
85,
16,
46011,
16094,
56623,
1190,
2967,
284,
330,
2408,
12,
2231,
698,
1166,
11,
6409,
11,
34647,
11,
12268,
1669,
5439,
8840,
7121,
7082,
4153,
741,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func Test_Basic2(t *testing.T) {
config := `log-path = "logs"`
gtest.Case(t, func() {
path := gcfg.DEFAULT_CONFIG_FILE
err := gfile.PutContents(path, config)
gtest.Assert(err, nil)
defer func() {
_ = gfile.Remove(path)
}()
c := gcfg.New()
gtest.Assert(c.Get("log-path"), "logs")
})
} | explode_data.jsonl/24447 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 144
} | [
2830,
3393,
1668,
5971,
17,
1155,
353,
8840,
836,
8,
341,
25873,
1669,
1565,
839,
33095,
284,
330,
22081,
8805,
3174,
1944,
727,
519,
1155,
11,
2915,
368,
341,
197,
26781,
1669,
342,
14072,
14864,
12568,
8087,
198,
197,
9859,
1669,
34... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestPrettyConsole_Write(t *testing.T) {
color.NoColor = false
tests := []struct {
name string
input string
want string
wantError bool
}{
{
"headline",
`{"ts":1523537728.7260377, "level":"info", "msg":"top level"}`,
"2018-04-12T12:55:28Z \x1b[37m[INFO] \x1b[0mtop level ... | explode_data.jsonl/51671 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 754
} | [
2830,
3393,
51940,
12372,
31825,
1155,
353,
8840,
836,
8,
341,
21481,
16766,
1636,
284,
895,
271,
78216,
1669,
3056,
1235,
341,
197,
11609,
414,
914,
198,
197,
22427,
257,
914,
198,
197,
50780,
414,
914,
198,
197,
50780,
1454,
1807,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRunInvalidTransaction(t *testing.T) {
anteOpt := func(bapp *BaseApp) {
bapp.SetAnteHandler(func(ctx sdk.Context, tx sdk.Tx, simulate bool) (newCtx sdk.Context, err error) {
return
})
}
routerOpt := func(bapp *BaseApp) {
bapp.Router().AddRoute(routeMsgCounter, func(ctx sdk.Context, msg sdk.Msg) (*sd... | explode_data.jsonl/67058 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1247
} | [
2830,
3393,
6727,
7928,
8070,
1155,
353,
8840,
836,
8,
341,
197,
4942,
21367,
1669,
2915,
1883,
676,
353,
3978,
2164,
8,
341,
197,
2233,
676,
4202,
17117,
68,
3050,
18552,
7502,
45402,
9328,
11,
9854,
45402,
81362,
11,
37453,
1807,
8,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestPullRequestReviewDismissalRequest_String(t *testing.T) {
v := PullRequestReviewDismissalRequest{
Message: String(""),
}
want := `github.PullRequestReviewDismissalRequest{Message:""}`
if got := v.String(); got != want {
t.Errorf("PullRequestReviewDismissalRequest.String = %v, want %v", got, want)
}
} | explode_data.jsonl/33272 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 112
} | [
2830,
3393,
36068,
1900,
19432,
51702,
278,
1900,
31777,
1155,
353,
8840,
836,
8,
341,
5195,
1669,
31828,
1900,
19432,
51702,
278,
1900,
515,
197,
46733,
25,
923,
445,
4461,
197,
532,
50780,
1669,
1565,
5204,
97357,
1900,
19432,
51702,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestThrowNativeConstructorName(t *testing.T) {
const SCRIPT = `
function A() {
try {
throw new TypeError();
} catch(e) {
return e;
}
}
A().constructor.name;
`
testScript1(SCRIPT, asciiString("TypeError"), t)
} | explode_data.jsonl/75229 | {
"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,
23079,
20800,
13288,
675,
1155,
353,
8840,
836,
8,
341,
4777,
53679,
284,
1565,
1406,
7527,
362,
368,
341,
197,
6799,
341,
298,
9581,
501,
25030,
543,
197,
197,
92,
2287,
2026,
8,
341,
298,
853,
384,
280,
197,
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 TestJoinIntSet(t *testing.T) {
testCases := []struct {
name string
set map[int]struct{}
delim string
expect []string // maps are unordered, therefore we expect one of these to be correct
}{
{
name: "single value",
set: map[int]struct{}{0: {}},
delim: ", ",
expect: []string{"0"},... | explode_data.jsonl/73737 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 349
} | [
2830,
3393,
12292,
1072,
1649,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
11609,
256,
914,
198,
197,
8196,
262,
2415,
18640,
60,
1235,
16094,
197,
2698,
39795,
220,
914,
198,
197,
24952,
3056,
917,
442,
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... | 3 |
func Test_Problem0060(t *testing.T) {
ast := assert.New(t)
qs := []question{
question{
para{
4,
4,
},
ans{
"1342",
},
},
question{
para{
0,
4,
},
ans{
"",
},
},
question{
para{
3,
3,
},
ans{
"213",
},
},
// 如需多个测试,可以复制上方元素。
}
... | explode_data.jsonl/11541 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 319
} | [
2830,
3393,
16670,
10121,
15,
15,
21,
15,
1155,
353,
8840,
836,
8,
341,
88836,
1669,
2060,
7121,
1155,
692,
18534,
82,
1669,
3056,
7841,
4257,
197,
197,
7841,
515,
298,
197,
14794,
515,
571,
197,
19,
345,
571,
197,
19,
345,
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... | 2 |
func TestCloseTelemetryConnection(t *testing.T) {
tb.Cancel()
time.Sleep(300 * time.Millisecond)
if len(tb.connections) != 0 {
t.Errorf("server didn't close connection")
}
} | explode_data.jsonl/49197 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 69
} | [
2830,
3393,
7925,
6639,
35958,
4526,
1155,
353,
8840,
836,
8,
341,
62842,
36491,
741,
21957,
31586,
7,
18,
15,
15,
353,
882,
71482,
340,
743,
2422,
61414,
78975,
8,
961,
220,
15,
341,
197,
3244,
13080,
445,
4030,
3207,
944,
3265,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRmSuccess(t *testing.T) {
testRepo := newTestRepo(t)
defer testRepo.cleanup(t)
require.Nil(t, testRepo.sut.Rm(true, testRepo.testFileName))
_, err := os.Stat(testRepo.testFileName)
require.True(t, os.IsNotExist(err))
} | explode_data.jsonl/14024 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 105
} | [
2830,
3393,
49,
76,
7188,
1155,
353,
8840,
836,
8,
341,
18185,
25243,
1669,
501,
2271,
25243,
1155,
340,
16867,
1273,
25243,
87689,
1155,
692,
17957,
59678,
1155,
11,
1273,
25243,
514,
332,
2013,
76,
3715,
11,
1273,
25243,
5958,
10903,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParseConfig_PartSize(t *testing.T) {
input := []byte(`bucket: "bucket-name"
endpoint: "s3-endpoint"
access_key: "access_key"
insecure: false
signature_version2: false
secret_key: "secret_key"
http_config:
insecure_skip_verify: false
idle_conn_timeout: 50s`)
cfg, err := parseConfig(input)
testutil.Ok(t,... | explode_data.jsonl/6238 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 321
} | [
2830,
3393,
14463,
2648,
97938,
1695,
1155,
353,
8840,
836,
8,
341,
22427,
1669,
3056,
3782,
5809,
30410,
25,
330,
30410,
11494,
698,
32540,
25,
330,
82,
18,
13068,
2768,
698,
5211,
3097,
25,
330,
5211,
3097,
698,
258,
25132,
25,
895,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPreparedCommand_Output_Verbose(t *testing.T) {
os.Setenv(mg.VerboseEnv, "true")
defer os.Unsetenv(mg.VerboseEnv)
stdout := shx.RecordStdout()
defer stdout.Release()
stderr := shx.RecordStderr()
defer stderr.Release()
gotOutput, err := shx.Output("go", "run", "echo.go", "hello world")
gotStdout := std... | explode_data.jsonl/57104 | {
"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,
4703,
7212,
4062,
65062,
2334,
261,
8297,
1155,
353,
8840,
836,
8,
341,
25078,
4202,
3160,
1255,
70,
42505,
8297,
14359,
11,
330,
1866,
1138,
16867,
2643,
10616,
746,
3160,
1255,
70,
42505,
8297,
14359,
692,
6736,
411,
1669,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestUnitReadJSONFailure(t *testing.T) {
var headers httpbinheaders
client := newClient()
client.BaseURL = "\t\t\t\t"
err := client.GetJSON(context.Background(), "/headers", &headers)
if err == nil || !strings.HasSuffix(err.Error(), "invalid control character in URL") {
t.Fatal("not the error we expected")
... | explode_data.jsonl/60975 | {
"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,
4562,
4418,
5370,
17507,
1155,
353,
8840,
836,
8,
341,
2405,
7102,
1758,
6863,
7713,
198,
25291,
1669,
501,
2959,
741,
25291,
13018,
3144,
284,
2917,
83,
4955,
4955,
4955,
698,
9859,
1669,
2943,
2234,
5370,
5378,
19047,
1507... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestHandleDynamoDbStream(t *testing.T) {
region := testConfig.Aws.Region
key := testConfig.Aws.AccessKey
secret := testConfig.Aws.AccessSecret
endpoint := testConfig.Aws.Sqs.Endpoint
var awsConfig = aws.Config{
Endpoint: aws.String(endpoint),
Region: aws.String(region),
Credentials: credentials... | explode_data.jsonl/64856 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 471
} | [
2830,
3393,
6999,
35,
85608,
7994,
3027,
1155,
353,
8840,
836,
8,
341,
197,
3943,
1669,
1273,
2648,
875,
8915,
65642,
198,
23634,
1669,
1273,
2648,
875,
8915,
35645,
1592,
198,
197,
20474,
1669,
1273,
2648,
875,
8915,
35645,
19773,
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... | 3 |
func TestTCMDPostDataType(t *testing.T) {
data := DataType{
Name: "test-type",
Label: "test-type",
Description: "test asset data type from import tool",
BuiltIn: false,
ComplexType: false,
}
resp, err := post(fmt.Sprintf("%s/%s/datatype", TCDataspace, TCDataset), data)
assert.NoError(t, e... | explode_data.jsonl/64293 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 296
} | [
2830,
3393,
7749,
6076,
4133,
22653,
1155,
353,
8840,
836,
8,
341,
8924,
1669,
33172,
515,
197,
21297,
25,
286,
330,
1944,
10604,
756,
197,
82126,
25,
981,
330,
1944,
10604,
756,
197,
47414,
25,
330,
1944,
9329,
821,
943,
504,
1159,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetSNMPConnection_v3_blumenthal(t *testing.T) {
testCases := []struct {
Name string
Algorithm gosnmp.SnmpV3PrivProtocol
Config *Snmp
}{
{
Name: "AES192",
Algorithm: gosnmp.AES192,
Config: &Snmp{
Agents: []string{"1.2.3.4"},
ClientConfig: snmp.ClientConfig{
Version: ... | explode_data.jsonl/50787 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1692
} | [
2830,
3393,
1949,
18966,
5781,
4526,
2273,
18,
13141,
1123,
11866,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
21297,
414,
914,
198,
197,
197,
27847,
342,
436,
77,
1307,
87066,
1307,
53,
18,
32124,
20689,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRot1Left(t *testing.T) {
table := []struct {
input *RBNode
expect string
}{
{&RBNode{
10, false,
&RBNode{5, true, nil, nil},
&RBNode{
20, true,
&RBNode{17, false, nil, nil},
&RBNode{25, false, nil, nil},
},
}, "B:20(R:10(R:5(,),B:17(,)),B:25(,))"},
}
for _, te := range tab... | explode_data.jsonl/9582 | {
"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,
36936,
16,
5415,
1155,
353,
8840,
836,
8,
341,
26481,
1669,
3056,
1235,
341,
197,
22427,
220,
353,
29259,
1955,
198,
197,
24952,
914,
198,
197,
59403,
197,
197,
90,
5,
29259,
1955,
515,
298,
197,
16,
15,
11,
895,
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... | 3 |
func TestRangeCacheHandleDoubleSplit(t *testing.T) {
defer leaktest.AfterTest(t)()
defer log.Scope(t).Close(t)
// The tests starts with the descriptor [a-an) in the cache.
// There are 3 ranges of interest: [a-an)[an-at)[at-b).
// We're going to start a bunch of range lookups in order, and we'll assert
// what h... | explode_data.jsonl/28189 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 2409
} | [
2830,
3393,
6046,
8233,
6999,
7378,
20193,
1155,
353,
8840,
836,
8,
341,
16867,
23352,
1944,
36892,
2271,
1155,
8,
741,
16867,
1487,
77940,
1155,
568,
7925,
1155,
692,
197,
322,
576,
7032,
8471,
448,
279,
16414,
508,
64,
18883,
8,
304... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 Test_ComponentList_Add(t *testing.T) {
t.Run("Add Component in default namespace", func(t *testing.T) {
compList := newCompList(t, "../test/data/componentlist.yaml")
compList.Add("comp4", "")
require.Equal(t, "comp4", compList.Components[3].Name)
require.Equal(t, defaultNamespace, compList.Components[3].N... | explode_data.jsonl/4587 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 247
} | [
2830,
3393,
80760,
852,
21346,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
2212,
5578,
304,
1638,
4473,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
197,
5689,
852,
1669,
501,
13552,
852,
1155,
11,
7005,
1944,
13167,
62958,
1607,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReconcileServiceInstanceWithTemporaryProvisionFailure(t *testing.T) {
fakeKubeClient, fakeCatalogClient, fakeClusterServiceBrokerClient, testController, sharedInformers := newTestController(t, fakeosb.FakeClientConfiguration{
ProvisionReaction: &fakeosb.ProvisionReaction{
Error: osb.HTTPStatusCodeError{
... | explode_data.jsonl/58139 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1365
} | [
2830,
3393,
693,
40446,
457,
1860,
2523,
2354,
59362,
1336,
13013,
17507,
1155,
353,
8840,
836,
8,
341,
1166,
726,
42,
3760,
2959,
11,
12418,
41606,
2959,
11,
12418,
28678,
1860,
65545,
2959,
11,
1273,
2051,
11,
6094,
37891,
388,
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 TestRunWithCancelledContext(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
cancel() // cause failure
measurer := tlstool.NewExperimentMeasurer(tlstool.Config{})
measurement := new(model.Measurement)
measurement.Input = "dns.google:853"
err := measurer.Run(
ctx,
&mockable.Session{... | explode_data.jsonl/4139 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 240
} | [
2830,
3393,
51918,
39473,
1972,
1155,
353,
8840,
836,
8,
341,
20985,
11,
9121,
1669,
2266,
26124,
9269,
5378,
19047,
2398,
84441,
368,
442,
5240,
7901,
198,
49294,
56294,
1669,
29796,
267,
1749,
7121,
77780,
7823,
56294,
1155,
36687,
1749... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetStateValidateChannel(t *testing.T) {
assert := assert.New(t)
pn := NewPubNub(NewDemoConfig())
opts := &getStateOpts{
pubnub: pn,
}
assert.Equal("pubnub/validation: pubnub: \v: Missing Channel or Channel Group", opts.validate().Error())
} | explode_data.jsonl/32499 | {
"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,
1949,
1397,
17926,
9629,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
340,
3223,
77,
1669,
1532,
29162,
45,
392,
35063,
37413,
2648,
2398,
64734,
1669,
609,
62353,
43451,
515,
197,
62529,
77,
392,
25,
43050,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestSchemaParser_SimpleNonNullType(t *testing.T) {
body := `
type Hello {
world: String!
}`
astDoc := parse(t, body)
expected := &ast.Document{
Loc: testLoc(1, 32),
Definitions: []ast.Node{
&ast.ObjectDefinition{
Loc: testLoc(1, 32),
Name: &ast.Name{
Value: "Hello",
Loc: testLoc(6, ... | explode_data.jsonl/51219 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 459
} | [
2830,
3393,
8632,
6570,
1098,
6456,
16834,
929,
1155,
353,
8840,
836,
8,
341,
35402,
1669,
22074,
1313,
21927,
341,
220,
1879,
25,
923,
4894,
31257,
88836,
9550,
1669,
4715,
1155,
11,
2487,
340,
42400,
1669,
609,
559,
26256,
515,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestGetEvent_ReadAnnotations(t *testing.T) {
want := map[string]string{
"topic": "function.deployed",
}
val, _ := json.Marshal(want)
os.Setenv("Http_Annotations", string(val))
eventInfo, err := getEventFromEnv()
if err != nil {
t.Errorf(err.Error())
t.Fail()
}
for k, v := range want {
if _, ok ... | explode_data.jsonl/11971 | {
"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,
1556,
38381,
21418,
1155,
353,
8840,
836,
8,
1476,
50780,
1669,
2415,
14032,
30953,
515,
197,
197,
1,
16411,
788,
330,
1688,
67121,
291,
756,
197,
630,
19302,
11,
716,
1669,
2951,
37271,
3622,
517,
340,
25078,
4202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetShortNameMode(t *testing.T) {
tests := []struct {
path string
mode types.ShortNameMode
mustFail bool
}{
{
"testdata/aliases.conf",
types.ShortNameModeEnforcing,
false,
},
{
"testdata/registries.conf.d/config-2.conf",
types.ShortNameModePermissive,
false,
},
{
"... | explode_data.jsonl/62242 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 384
} | [
2830,
3393,
1949,
12472,
675,
3636,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
26781,
257,
914,
198,
197,
60247,
257,
4494,
55958,
675,
3636,
198,
197,
2109,
590,
19524,
1807,
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... | 3 |
func TestIssue3797(t *testing.T) {
rex := docker.AuthConfiguration{
Username: "rex",
Password: "tiny arms",
Email: "rex@example.com",
}
dk := &credentialprovider.BasicDockerKeyring{}
dk.Add(credentialprovider.DockerConfig{
"https://quay.io/v1/": credentialprovider.DockerConfigEntry{
Username: rex.Use... | explode_data.jsonl/11454 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 407
} | [
2830,
3393,
42006,
18,
22,
24,
22,
1155,
353,
8840,
836,
8,
341,
17200,
87,
1669,
26588,
25233,
7688,
515,
197,
197,
11115,
25,
330,
37539,
756,
197,
197,
4876,
25,
330,
46116,
11715,
756,
197,
197,
4781,
25,
262,
330,
37539,
35487,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStorageClassOnlyBootstrap(t *testing.T) {
const scName = "storageclass-only"
orchestrator := getOrchestrator(t)
originalSC, err := orchestrator.AddStorageClass(
ctx(), &storageclass.Config{
Name: scName,
Attributes: map[string]sa.Request{
sa.Media: sa.NewStringRequest("hdd"),
sa.... | explode_data.jsonl/62731 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 352
} | [
2830,
3393,
5793,
1957,
7308,
45511,
1155,
353,
8840,
836,
8,
341,
4777,
1136,
675,
284,
330,
16172,
1040,
15382,
1837,
197,
21584,
15111,
850,
1669,
633,
2195,
331,
15111,
850,
1155,
340,
197,
9889,
3540,
11,
1848,
1669,
65128,
850,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
func Test_Mock_Return_After(t *testing.T) {
// make a test impl object
var mockedService = new(TestExampleImplementation)
c := mockedService.Mock.
On("TheExampleMethod", "A", "B", true).
Return(1, "two", true).
After(time.Second)
require.Equal(t, []*Call{c}, mockedService.ExpectedCalls)
call ... | explode_data.jsonl/8581 | {
"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,
1245,
1176,
53316,
1566,
1046,
1155,
353,
8840,
836,
8,
8022,
197,
322,
1281,
264,
1273,
11605,
1633,
319,
2405,
46149,
1860,
284,
501,
31159,
13314,
36850,
7229,
1444,
1669,
46149,
1860,
24664,
3224,
197,
86391,
445,
785,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_newFunctionTests(t *testing.T) {
// Download templates
templatePullLocalTemplateRepo(t)
defer tearDownFetchTemplates(t)
for _, testcase := range NewFunctionTests {
t.Run(testcase.title, func(t *testing.T) {
defer tearDownNewFunction(t, testcase.funcName)
runNewFunctionTest(t, testcase)
})
}
} | explode_data.jsonl/47227 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 121
} | [
2830,
3393,
5921,
5152,
18200,
1155,
353,
8840,
836,
8,
341,
197,
322,
8577,
19911,
198,
22832,
36068,
7319,
7275,
25243,
1155,
340,
16867,
32825,
20714,
51195,
1155,
692,
2023,
8358,
70080,
1669,
2088,
1532,
5152,
18200,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestIssue11333(t *testing.T) {
store, clean := testkit.CreateMockStore(t)
defer clean()
tk := testkit.NewTestKit(t, store)
tk.MustExec("use test")
tk.MustExec("drop table if exists t;")
tk.MustExec("drop table if exists t1;")
tk.MustExec("create table t(col1 decimal);")
tk.MustExec(" insert into t values(... | explode_data.jsonl/65567 | {
"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,
42006,
16,
16,
18,
18,
18,
1155,
353,
8840,
836,
8,
341,
57279,
11,
4240,
1669,
1273,
8226,
7251,
11571,
6093,
1155,
340,
16867,
4240,
2822,
3244,
74,
1669,
1273,
8226,
7121,
2271,
7695,
1155,
11,
3553,
340,
3244,
74,
50... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestU128_EncodeDecode(t *testing.T) {
assertRoundtrip(t, NewU128(*big.NewInt(0)))
assertRoundtrip(t, NewU128(*big.NewInt(12)))
bigPos := big.NewInt(0)
bigPos.SetBytes([]byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16})
assertRoundtrip(t, NewU128(*bigPos))
} | explode_data.jsonl/18415 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 127
} | [
2830,
3393,
52,
16,
17,
23,
93529,
534,
32564,
1155,
353,
8840,
836,
8,
341,
6948,
27497,
32981,
1155,
11,
1532,
52,
16,
17,
23,
4071,
16154,
7121,
1072,
7,
15,
5929,
6948,
27497,
32981,
1155,
11,
1532,
52,
16,
17,
23,
4071,
16154... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCStore_AnyContains(t *testing.T) {
cs := New()
cs.StoreKey("_com_liferay_portal_redirect")
cs.StoreKey("some_body_once_told_me_the_world_is_gonna_roll_me")
cs.StoreKey("potato")
type args struct {
pattern string
}
tests := []struct {
name string
args args
want bool
}{
{"contains substr", ar... | explode_data.jsonl/59222 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 274
} | [
2830,
3393,
34,
6093,
1566,
3834,
23805,
1155,
353,
8840,
836,
8,
341,
71899,
1669,
1532,
2822,
71899,
38047,
1592,
16975,
874,
907,
33204,
97077,
30043,
1138,
71899,
38047,
1592,
445,
14689,
14114,
7630,
528,
813,
16612,
16068,
31792,
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 TestEmbeddedStructA2(t *testing.T) {
testJsonFromStruct(t, A2{}, `{
"swagger.A2": {
"id": "swagger.A2",
"required": [
"B"
],
"properties": {
"B": {
"type": "integer",
"description": "",
"format": "int32"
}
}
}
}`)
} | explode_data.jsonl/39935 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 138
} | [
2830,
3393,
83466,
9422,
32,
17,
1155,
353,
8840,
836,
8,
341,
18185,
5014,
3830,
9422,
1155,
11,
362,
17,
22655,
1565,
515,
220,
330,
74755,
875,
17,
788,
341,
256,
330,
307,
788,
330,
74755,
875,
17,
756,
256,
330,
6279,
788,
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 |
func TestNumber(t *testing.T) {
t.Parallel()
fabBlock, err := getBlock("./mock/sampleblock.pb")
assert.NoError(t, err)
block, _ := FromFabricBlock(fabBlock)
number := block.Number()
assert.Equal(t, uint64(7), number)
} | explode_data.jsonl/40040 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 89
} | [
2830,
3393,
2833,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
1166,
370,
4713,
11,
1848,
1669,
633,
4713,
13988,
16712,
69851,
4574,
37916,
1138,
6948,
35699,
1155,
11,
1848,
692,
47996,
11,
716,
1669,
5542,
81731,
4713,
955,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSnmpTableCache_hit(t *testing.T) {
snmpTableCaches = map[string]snmpTableCache{
"foo": {
mibName: "a",
oidNum: "b",
oidText: "c",
fields: []Field{{Name: "d"}},
err: fmt.Errorf("e"),
},
}
mibName, oidNum, oidText, fields, err := snmpTable("foo")
require.Equal(t, "a", mibName)
requi... | explode_data.jsonl/50800 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 224
} | [
2830,
3393,
20720,
1307,
2556,
8233,
37697,
1155,
353,
8840,
836,
8,
341,
48251,
1307,
2556,
34,
14242,
284,
2415,
14032,
60,
9613,
1307,
2556,
8233,
515,
197,
197,
1,
7975,
788,
341,
298,
2109,
59344,
25,
330,
64,
756,
298,
197,
58... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestJobRestrictedManager(t *testing.T) {
c := NewCtx(t)
defer c.Close()
build := testBuild(1)
build.Manager = "restricted-manager"
c.client2.UploadBuild(build)
crash := testCrash(build, 1)
crash.ReproSyz = []byte("repro syz")
c.client2.ReportCrash(crash)
c.client2.pollAndFailBisectJob(build.Manager)
se... | explode_data.jsonl/51142 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 413
} | [
2830,
3393,
12245,
86405,
2043,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
1532,
23684,
1155,
340,
16867,
272,
10421,
2822,
69371,
1669,
1273,
11066,
7,
16,
340,
69371,
58298,
284,
330,
50797,
44896,
698,
1444,
6581,
17,
86597,
11066,
43... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestLaunchRequestNoDebug_GoodStatus(t *testing.T) {
runTest(t, "increment", func(client *daptest.Client, fixture protest.Fixture) {
runNoDebugDebugSession(t, client, func() {
client.LaunchRequestWithArgs(map[string]interface{}{
"noDebug": true,
"mode": "debug",
"program": fixture.Source,
"... | explode_data.jsonl/17347 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 151
} | [
2830,
3393,
32067,
1900,
2753,
7939,
2646,
1386,
2522,
1155,
353,
8840,
836,
8,
341,
56742,
2271,
1155,
11,
330,
35744,
497,
2915,
12805,
353,
91294,
1944,
11716,
11,
12507,
8665,
991,
12735,
8,
341,
197,
56742,
2753,
7939,
7939,
5283,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSub(t *testing.T) {
t.Parallel()
v := viper.New()
v.Set("sub", map[string]interface{}{
"key": "value",
})
provider := &Provider{v}
sub := provider.Sub("sub")
val := getString(sub.Get("key"))
if val != "value" {
t.Fatalf("expected 'value', got '%#v'", val)
}
} | explode_data.jsonl/74511 | {
"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,
3136,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
5195,
1669,
95132,
7121,
741,
5195,
4202,
445,
1966,
497,
2415,
14032,
31344,
67066,
197,
197,
1,
792,
788,
330,
957,
756,
197,
3518,
197,
19979,
1669,
609,
5179,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestAccPingFederateKerberosRealmResource(t *testing.T) {
resourceName := "pingfederate_kerberos_realm.demo"
resource.ParallelTest(t, resource.TestCase{
Providers: testAccProviders,
CheckDestroy: testAccCheckPingFederateKerberosRealmResourceDestroy,
Steps: []resource.TestStep{
{
Config: testAccPi... | explode_data.jsonl/78172 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 386
} | [
2830,
3393,
14603,
69883,
37,
7294,
349,
42,
261,
92795,
64290,
4783,
1155,
353,
8840,
836,
8,
341,
50346,
675,
1669,
330,
9989,
69,
7294,
349,
4698,
261,
92795,
1288,
7673,
26260,
1837,
50346,
41288,
7957,
2271,
1155,
11,
5101,
31363,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReadNodeConfigLocalVolumeDirQuota(t *testing.T) {
tests := map[string]struct {
config string
expected string
}{
"null quota": {
config: `
apiVersion: v1
volumeConfig:
localQuota:
perFSGroup: null
`,
expected: "",
},
"missing quota": {
config: `
apiVersion: v1
volumeConfig:
local... | explode_data.jsonl/15630 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 977
} | [
2830,
3393,
4418,
1955,
2648,
7319,
18902,
6184,
2183,
6089,
1155,
353,
8840,
836,
8,
1476,
78216,
1669,
2415,
14032,
60,
1235,
341,
197,
25873,
256,
914,
198,
197,
42400,
914,
198,
197,
59403,
197,
197,
1,
2921,
42042,
788,
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... | 8 |
func TestHashDeterministicFieldsOnly(t *testing.T) {
tr1 := abci.ExecTxResult{
Code: 1,
Data: []byte("transaction"),
Log: "nondeterministic data: abc",
Info: "nondeterministic data: abc",
GasWanted: 1000,
GasUsed: 1000,
Events: []abci.Event{},
Codespace: "nondeterministic.data... | explode_data.jsonl/22082 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 402
} | [
2830,
3393,
6370,
92648,
4532,
8941,
7308,
1155,
353,
8840,
836,
8,
341,
25583,
16,
1669,
668,
5855,
30798,
31584,
2077,
515,
197,
90774,
25,
414,
220,
16,
345,
197,
40927,
25,
414,
3056,
3782,
445,
13528,
4461,
197,
24201,
25,
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... | 1 |
func TestMetricFromProto(t *testing.T) {
var m Metric
inputs := []metricpb.TimedMetric{testMetric1Proto, testMetric2Proto}
expected := []Metric{testMetric1, testMetric2}
for i := 0; i < len(inputs); i++ {
require.NoError(t, m.FromProto(inputs[i]))
require.Equal(t, expected[i], m)
}
} | explode_data.jsonl/75076 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 128
} | [
2830,
3393,
54310,
3830,
31549,
1155,
353,
8840,
836,
8,
341,
2405,
296,
52458,
198,
22427,
82,
1669,
3056,
15903,
16650,
836,
75485,
54310,
90,
1944,
54310,
16,
31549,
11,
1273,
54310,
17,
31549,
532,
42400,
1669,
3056,
54310,
90,
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... | 2 |
func TestAccessLog(t *testing.T) {
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {}))
testCases := []struct {
desc string
routersConfig map[string]*dynamic.Router
serviceConfig map[string]*dynamic.Service
middlewaresConfig map[string]*dynamic.... | explode_data.jsonl/25181 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1355
} | [
2830,
3393,
6054,
2201,
1155,
353,
8840,
836,
8,
341,
41057,
1669,
54320,
70334,
7121,
5475,
19886,
89164,
18552,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
4687,
4390,
18185,
37302,
1669,
3056,
1235,
341,
197,
41653,
1060,
914,
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 TestShouldHashArgon2idPassword(t *testing.T) {
hash, err := HashPassword("password", "BpLnfgDsc2WD8F2q", HashingAlgorithmArgon2id,
schema.DefaultCIPasswordConfiguration.Iterations, schema.DefaultCIPasswordConfiguration.Memory*1024,
schema.DefaultCIPasswordConfiguration.Parallelism, schema.DefaultCIPasswordCon... | explode_data.jsonl/40165 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 413
} | [
2830,
3393,
14996,
6370,
2735,
263,
17,
307,
4876,
1155,
353,
8840,
836,
8,
341,
50333,
11,
1848,
1669,
6531,
4876,
445,
3833,
497,
330,
33,
79,
40101,
4817,
35,
2388,
17,
17563,
23,
37,
17,
80,
497,
6531,
287,
27847,
2735,
263,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestWsKlineUpdate(t *testing.T) {
t.Parallel()
pressXToJSON := []byte(`{"stream":"btcusdt@kline_1m","data":{
"e": "kline",
"E": 123456789,
"s": "BNBBTC",
"k": {
"t": 123400000,
"T": 123460000,
"s": "BNBBTC",
"i": "1m",
"f": 100,
"L": 200,
"o": "0.0010... | explode_data.jsonl/76684 | {
"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,
74733,
42,
1056,
4289,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
197,
1873,
55,
1249,
5370,
1669,
3056,
3782,
5809,
4913,
4027,
3252,
92634,
355,
8047,
31,
74,
1056,
62,
16,
76,
2198,
691,
12602,
3677,
330,
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... | 2 |
func TestIncident_SnoozeIncident(t *testing.T) {
setup()
defer teardown()
mux.HandleFunc("/incidents/1/snooze", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "POST")
_, _ = w.Write([]byte(`{"incident": {"id": "1", "pending_actions": [{"type": "unacknowledge", "at":"2019-12-31T16:58:35Z"}]}}`))... | explode_data.jsonl/76398 | {
"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,
39245,
1713,
1098,
2152,
90153,
39245,
1713,
1155,
353,
8840,
836,
8,
341,
84571,
741,
16867,
49304,
2822,
2109,
2200,
63623,
4283,
2840,
6880,
14,
16,
2687,
2152,
90153,
497,
2915,
3622,
1758,
37508,
11,
435,
353,
1254,
965... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestMapOfGCKeys(t *testing.T) {
type T *uintptr
tt := TypeOf(T(nil))
mt := MapOf(tt, TypeOf(false))
// NOTE: The garbage collector handles allocated maps specially,
// so we have to save pointers to maps in x; the pointer code will
// use the gc info in the newly constructed map type.
const n = 100
var x ... | explode_data.jsonl/29612 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 409
} | [
2830,
3393,
2227,
2124,
38,
3021,
68,
1047,
1155,
353,
8840,
836,
8,
341,
13158,
350,
353,
51380,
198,
3244,
83,
1669,
3990,
2124,
4140,
27907,
1171,
2109,
83,
1669,
5027,
2124,
47152,
11,
3990,
2124,
3576,
4390,
197,
322,
16743,
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... | 7 |
func TestValidateAccountAlias(t *testing.T) {
validAliases := []string{
"tf-alias",
"0tf-alias1",
}
for _, s := range validAliases {
_, errors := validateAccountAlias(s, "account_alias")
if len(errors) > 0 {
t.Fatalf("%q should be a valid account alias: %v", s, errors)
}
}
invalidAliases := []string... | explode_data.jsonl/78608 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 269
} | [
2830,
3393,
17926,
7365,
22720,
1155,
353,
8840,
836,
8,
341,
56322,
95209,
1669,
3056,
917,
515,
197,
197,
1,
8935,
12,
14956,
756,
197,
197,
1,
15,
8935,
12,
14956,
16,
756,
197,
630,
2023,
8358,
274,
1669,
2088,
2697,
95209,
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... | 5 |
func TestPodLogOptions(t *testing.T) {
sinceSeconds := int64(1)
sinceTime := metav1.NewTime(time.Date(2000, 1, 1, 12, 34, 56, 0, time.UTC).Local())
tailLines := int64(2)
limitBytes := int64(3)
versionedLogOptions := &v1.PodLogOptions{
Container: "mycontainer",
Follow: true,
Previous: true,
Si... | explode_data.jsonl/27247 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 992
} | [
2830,
3393,
23527,
2201,
3798,
1155,
353,
8840,
836,
8,
341,
1903,
1701,
15343,
1669,
526,
21,
19,
7,
16,
340,
1903,
1701,
1462,
1669,
77520,
16,
7121,
1462,
9730,
8518,
7,
17,
15,
15,
15,
11,
220,
16,
11,
220,
16,
11,
220,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 9 |
func TestMultipleLiteralReturnStatement(t *testing.T) {
p := createParser(`return "twenty", "thirty"`)
bvmUtils.Assert(t, isReturnStatement(p), "should detect return statement")
parseReturnStatement(p)
u := p.scope.Next()
bvmUtils.AssertNow(t, u.Type() == ast.ReturnStatement, "wrong return type")
r := u.(*ast.Re... | explode_data.jsonl/49727 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 215
} | [
2830,
3393,
32089,
17350,
5598,
8636,
1155,
353,
8840,
836,
8,
341,
3223,
1669,
1855,
6570,
5809,
689,
330,
93965,
497,
330,
339,
16531,
1,
24183,
2233,
7338,
4209,
11711,
1155,
11,
374,
5598,
8636,
1295,
701,
330,
5445,
11140,
470,
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 Test_BlindingFactors(t *testing.T) {
p := new(eccutil.Point)
p.X, p.Y = new(big.Int), new(big.Int)
n := NewBlindingFactors(p)
b, err := n.Marshal()
if err != nil {
t.Fatalf("Marshalling failed: %s", err)
}
_, err = n.Unmarshal(b)
if err != nil {
t.Fatalf("UnMarshalling failed: %s", err)
}
n.PubKey.X ... | explode_data.jsonl/8838 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 203
} | [
2830,
3393,
56947,
3961,
97769,
1155,
353,
8840,
836,
8,
341,
3223,
1669,
501,
2026,
638,
1314,
3775,
340,
3223,
4338,
11,
281,
7507,
284,
501,
75616,
7371,
701,
501,
75616,
7371,
340,
9038,
1669,
1532,
4923,
3961,
97769,
1295,
340,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestPeerConnection_AnswerWithoutOffer(t *testing.T) {
pc, err := NewPeerConnection(Configuration{})
if err != nil {
t.Errorf("New PeerConnection: got error: %v", err)
}
_, err = pc.CreateAnswer(nil)
if !reflect.DeepEqual(&rtcerr.InvalidStateError{Err: ErrNoRemoteDescription}, err) {
t.Errorf("CreateAnswer... | explode_data.jsonl/37348 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 131
} | [
2830,
3393,
30888,
4526,
32699,
3559,
26040,
39462,
1155,
353,
8840,
836,
8,
341,
82013,
11,
1848,
1669,
1532,
30888,
4526,
45443,
37790,
743,
1848,
961,
2092,
341,
197,
3244,
13080,
445,
3564,
45147,
4526,
25,
2684,
1465,
25,
1018,
85,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHandshakeServerRSAAES(t *testing.T) {
test := &serverTest{
name: "RSA-AES",
command: []string{"openssl", "s_client", "-no_ticket", "-cipher", "AES128-SHA"},
}
runServerTestTLS10(t, test)
runServerTestTLS12(t, test)
} | explode_data.jsonl/36326 | {
"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,
2314,
29661,
5475,
11451,
6029,
1570,
1155,
353,
8840,
836,
8,
341,
18185,
1669,
609,
4030,
2271,
515,
197,
11609,
25,
262,
330,
73564,
6691,
1570,
756,
197,
45566,
25,
3056,
917,
4913,
53612,
497,
330,
82,
8179,
497,
6523... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPrometheusTracer_ValidationDidStart(t *testing.T) {
mockTime, cleanup := mockTime()
defer cleanup()
tests := []struct {
name string
allowList []string
delta time.Duration
err error
runs int
want string
}{
{
name: "omitted from allow list",
allowList: []str... | explode_data.jsonl/82524 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1372
} | [
2830,
3393,
35186,
39705,
1282,
9584,
62,
13799,
6986,
3479,
1155,
353,
8840,
836,
8,
341,
77333,
1462,
11,
21290,
1669,
7860,
1462,
741,
16867,
21290,
2822,
78216,
1669,
3056,
1235,
341,
197,
11609,
414,
914,
198,
197,
197,
7183,
852,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHandshakeServerALPNFallback(t *testing.T) {
config := testConfig.Clone()
config.NextProtos = []string{"proto1", "h2", "proto2"}
test := &serverTest{
name: "ALPN-Fallback",
// Note that this needs OpenSSL 1.0.2 because that is the first
// version that supports the -alpn flag.
command: []string{"ope... | explode_data.jsonl/36339 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 293
} | [
2830,
3393,
2314,
29661,
5475,
969,
17896,
87206,
1155,
353,
8840,
836,
8,
341,
25873,
1669,
1273,
2648,
64463,
741,
25873,
18501,
12423,
436,
284,
3056,
917,
4913,
15110,
16,
497,
330,
71,
17,
497,
330,
15110,
17,
63159,
18185,
1669,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestValidReferenceMode(t *testing.T) {
wf := test.LoadTestWorkflow("testdata/workflow-template-ref.yaml")
wfTmpl := test.LoadTestWorkflowTemplate("testdata/workflow-template-submittable.yaml")
cancel, controller := newController(wf, wfTmpl)
defer cancel()
ctx := context.Background()
controller.Config.Workfl... | explode_data.jsonl/71014 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 499
} | [
2830,
3393,
4088,
8856,
3636,
1155,
353,
8840,
836,
8,
341,
6692,
69,
1669,
1273,
13969,
2271,
62768,
445,
92425,
35062,
4965,
33409,
43007,
33406,
1138,
6692,
69,
51,
54010,
1669,
1273,
13969,
2271,
62768,
7275,
445,
92425,
35062,
4965,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestIsTChannelTimeoutError(t *testing.T) {
tests := []struct {
name string
giveErr error
wantResult bool
}{
{
name: "plain error",
giveErr: errors.New("test"),
wantResult: false,
},
{
name: "no timeout tchannel error",
giveErr: tchannel.NewSystemError(tchanne... | explode_data.jsonl/53843 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 342
} | [
2830,
3393,
3872,
51,
9629,
7636,
1454,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
11609,
981,
914,
198,
197,
3174,
533,
7747,
262,
1465,
198,
197,
50780,
2077,
1807,
198,
197,
59403,
197,
197,
515,
298,
11609,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestJoinChannelNoAnchorPeers(t *testing.T) {
// Scenario: The channel we're joining has 2 orgs but no anchor peers
// The test ensures that JoinChan is called with a JoinChannelMessage with Members
// that consist of the organizations of the configuration given.
var joinChanCalled sync.WaitGroup
joinChanCall... | explode_data.jsonl/20854 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 471
} | [
2830,
3393,
12292,
9629,
2753,
14677,
10197,
388,
1155,
353,
8840,
836,
8,
341,
197,
322,
58663,
25,
576,
5496,
582,
2299,
18169,
702,
220,
17,
1240,
82,
714,
902,
17105,
25029,
198,
197,
322,
576,
1273,
25351,
429,
16471,
46019,
374,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInitPid_Negative(t *testing.T) {
c, err := NewContainer(ContainerName)
if err != nil {
t.Errorf(err.Error())
}
if c.InitPid() != -1 {
t.Errorf("InitPid failed...")
}
} | explode_data.jsonl/2750 | {
"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,
3803,
32339,
1604,
15060,
1155,
353,
8840,
836,
8,
341,
1444,
11,
1848,
1669,
1532,
4502,
75145,
675,
340,
743,
1848,
961,
2092,
341,
197,
3244,
13080,
3964,
6141,
2398,
197,
630,
743,
272,
26849,
32339,
368,
961,
481,
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
] | 3 |
func TestGetSetValidatorSigningInfo(t *testing.T) {
ctx, _, _, _, keeper := createTestInput(t, DefaultParams())
info, found := keeper.getValidatorSigningInfo(ctx, sdk.ConsAddress(addrs[0]))
require.False(t, found)
newInfo := NewValidatorSigningInfo(
sdk.ConsAddress(addrs[0]),
int64(4),
int64(3),
time.Unix(2... | explode_data.jsonl/30930 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 299
} | [
2830,
3393,
1949,
1649,
14256,
93358,
1731,
1155,
353,
8840,
836,
8,
341,
20985,
11,
8358,
8358,
8358,
53416,
1669,
1855,
2271,
2505,
1155,
11,
7899,
4870,
2398,
27043,
11,
1730,
1669,
53416,
670,
14256,
93358,
1731,
7502,
11,
45402,
94... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHMAC_Write(t *testing.T) {
w := httptest.NewRecorder()
sig := signed.ContentHMAC{
Algorithm: "sha512",
}
sig.Write(w, []byte(`Hello Gophers`))
const wantSig = `sha512 48656c6c6f20476f7068657273`
if have, want := w.Header().Get(signed.HeaderContentHMAC), wantSig; have != want {
t.Errorf("Have: %v Wan... | explode_data.jsonl/80671 | {
"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,
39,
25788,
31825,
1155,
353,
8840,
836,
8,
341,
6692,
1669,
54320,
70334,
7121,
47023,
741,
84841,
1669,
8499,
12614,
39,
25788,
515,
197,
197,
27847,
25,
330,
15247,
20,
16,
17,
756,
197,
532,
84841,
4073,
3622,
11,
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... | 2 |
func TestSkipList_Search(t *testing.T) {
sl := newSkipList()
if sl == nil {
t.Fatalf("%v: got nil", t.Name())
}
if ok := sl.Search(1); ok {
t.Fatalf("got %v want %v", ok, false)
}
sl.Set(1, 2)
if got := sl.Len(); got != 1 {
t.Fatalf("Len: got %d, want %d", got, 1)
}
if ok := sl.Search(1); !ok {
t.F... | explode_data.jsonl/54834 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 256
} | [
2830,
3393,
35134,
852,
65913,
1155,
353,
8840,
836,
8,
341,
78626,
1669,
501,
35134,
852,
741,
743,
1739,
621,
2092,
341,
197,
3244,
30762,
4430,
85,
25,
2684,
2092,
497,
259,
2967,
2398,
197,
630,
743,
5394,
1669,
1739,
31903,
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... | 8 |
func TestInferStringValue(t *testing.T) {
a := assert.New(t)
for _, s := range []string{"true", "TRUE", "True"} {
a.Equal(inferStringValue(s), true)
a.Equal(inferStringValue(fmt.Sprintf("\"%s\"", s)), s)
a.Equal(inferStringValue(fmt.Sprintf("'%s'", s)), s)
}
for _, s := range []string{"false", "FALSE", "False... | explode_data.jsonl/45945 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 377
} | [
2830,
3393,
641,
802,
82696,
1155,
353,
8840,
836,
8,
341,
11323,
1669,
2060,
7121,
1155,
340,
2023,
8358,
274,
1669,
2088,
3056,
917,
4913,
1866,
497,
330,
20611,
497,
330,
2514,
9207,
341,
197,
11323,
12808,
5900,
802,
82696,
1141,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSetCgroupItem(t *testing.T) {
c, err := NewContainer(ContainerName)
if err != nil {
t.Errorf(err.Error())
}
maxMem := c.CgroupItem("memory.max_usage_in_bytes")[0]
currentMem := c.CgroupItem("memory.limit_in_bytes")[0]
if err := c.SetCgroupItem("memory.limit_in_bytes", maxMem); err != nil {
t.Errorf(... | explode_data.jsonl/2774 | {
"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,
1649,
34,
4074,
1234,
1155,
353,
8840,
836,
8,
341,
1444,
11,
1848,
1669,
1532,
4502,
75145,
675,
340,
743,
1848,
961,
2092,
341,
197,
3244,
13080,
3964,
6141,
2398,
197,
630,
22543,
18816,
1669,
272,
727,
4074,
1234,
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... | 4 |
func TestJob_FailedRecords(t *testing.T) {
type fields struct {
session session.ServiceFormatter
info Response
}
tests := []struct {
name string
fields fields
want []FailedRecord
wantErr bool
}{
{
name: "Passing",
fields: fields{
info: Response{
ID: "1234",
C... | explode_data.jsonl/19887 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1362
} | [
2830,
3393,
12245,
1400,
5687,
25876,
1155,
353,
8840,
836,
8,
341,
13158,
5043,
2036,
341,
197,
25054,
3797,
13860,
14183,
198,
197,
27043,
262,
5949,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
262,
914,
198,
197,
55276,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestContextNegotiationFormatWithAccept(t *testing.T) {
c, _ := CreateTestContext(httptest.NewRecorder())
c.Request, _ = http.NewRequest("POST", "/", nil)
c.Request.Header.Add("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9;q=0.8")
assert.Equal(t, MIMEXML, c.NegotiateFormat(MIMEJSON, MIMEXML))... | explode_data.jsonl/26807 | {
"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,
1972,
47800,
354,
7101,
4061,
2354,
16646,
1155,
353,
8840,
836,
8,
341,
1444,
11,
716,
1669,
4230,
2271,
1972,
73392,
83,
70334,
7121,
47023,
2398,
1444,
9659,
11,
716,
284,
1758,
75274,
445,
2946,
497,
64657,
2092,
340,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_Handler_CheckPipeOrder(t *testing.T) {
executionStep := 0
pipe1 := getPipeStep(t, 1, &executionStep)
pipe2 := getPipeStep(t, 2, &executionStep)
pipe3 := getPipeStep(t, 3, &executionStep)
pipe4 := getPipeStep(t, 4, &executionStep)
pipe5 := getPipeStep(t, 5, &executionStep)
pipe6 := getPipeStep(t, 6, &... | explode_data.jsonl/45771 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 406
} | [
2830,
3393,
41879,
28188,
34077,
4431,
1155,
353,
8840,
836,
8,
1476,
67328,
1488,
8304,
1669,
220,
15,
271,
197,
13768,
16,
1669,
633,
34077,
8304,
1155,
11,
220,
16,
11,
609,
52721,
8304,
340,
197,
13768,
17,
1669,
633,
34077,
8304,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestOnlyOneControlPlaneIsAllowedPerNamespace(t *testing.T) {
controlPlane1 := newControlPlane("my-smcp", "istio-system")
validator, _, _ := createControlPlaneValidatorTestFixture(controlPlane1)
controlPlane2 := newControlPlane("my-smcp2", "istio-system")
response := validator.Handle(ctx, createCreateRequest(co... | explode_data.jsonl/20788 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 145
} | [
2830,
3393,
7308,
3966,
3273,
34570,
3872,
35382,
3889,
22699,
1155,
353,
8840,
836,
8,
341,
82786,
34570,
16,
1669,
501,
3273,
34570,
445,
2408,
4668,
4672,
497,
330,
380,
815,
36648,
1138,
197,
16112,
11,
8358,
716,
1669,
1855,
3273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSlashBoth(t *testing.T) {
app, ctx, addrDels, addrVals := bootstrapSlashTest(t, 10)
fraction := sdk.NewDecWithPrec(5, 1)
bondDenom := app.StakingKeeper.BondDenom(ctx)
// set a redelegation with expiration timestamp beyond which the
// redelegation shouldn't be slashed
rdATokens := sdk.TokensFromConsensu... | explode_data.jsonl/25505 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1292
} | [
2830,
3393,
88004,
20629,
1155,
353,
8840,
836,
8,
341,
28236,
11,
5635,
11,
10789,
35,
2010,
11,
10789,
52452,
1669,
26925,
88004,
2271,
1155,
11,
220,
16,
15,
340,
1166,
16199,
1669,
45402,
7121,
4900,
2354,
68833,
7,
20,
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... | 1 |
func TestMalleability(t *testing.T) {
// https://tools.ietf.org/html/rfc8032#section-5.1.7 adds an additional test
// that s be in [0, order). This prevents someone from adding a multiple of
// order to s and obtaining a second valid sig for the same message.
message := []byte{0x54, 0x65, 0x73, 0x74}
sig := []byte... | explode_data.jsonl/55568 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 584
} | [
2830,
3393,
44,
5054,
2897,
1155,
353,
8840,
836,
8,
341,
197,
322,
3703,
1110,
15918,
13,
74068,
2659,
13739,
93982,
23,
15,
18,
17,
2,
2809,
12,
20,
13,
16,
13,
22,
11367,
458,
5107,
1273,
198,
197,
322,
429,
274,
387,
304,
50... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func Test_Web_Basic_NoRace(t *testing.T) {
Convey("Make sure no race between requests", t, func() {
m := New()
handlers := []Handler{func() {}, func() {}}
// Ensure append will not realloc to trigger the race condition
m.handlers = handlers[:1]
m.Get("/", func() {})
for i := 0; i < 2; i++ {
go func() {
... | explode_data.jsonl/44980 | {
"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,
62,
5981,
1668,
5971,
36989,
55991,
1155,
353,
8840,
836,
8,
341,
93070,
5617,
445,
8078,
2704,
902,
6957,
1948,
7388,
497,
259,
11,
2915,
368,
341,
197,
2109,
1669,
1532,
741,
197,
9598,
437,
9254,
1669,
3056,
3050,
90,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreateSigningRoundTripperWithCredentials(t *testing.T) {
defaultRoundTripper := (http.RoundTripper)(http.DefaultTransport.(*http.Transport).Clone())
// Some form of AWS credentials must be set up for tests to succeed
awsCreds := fetchMockCredentials()
tests := []struct {
name string
creds ... | explode_data.jsonl/19763 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 576
} | [
2830,
3393,
4021,
93358,
27497,
21884,
6922,
2354,
27025,
1155,
353,
8840,
836,
8,
341,
11940,
27497,
21884,
6922,
1669,
320,
1254,
37646,
21884,
6922,
2376,
1254,
13275,
27560,
41399,
1254,
87669,
568,
37677,
12367,
197,
322,
4329,
1352,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestConfigActiveNamespace(t *testing.T) {
mk := NewMockKubeSettings()
cfg := config.NewConfig(mk)
assert.Nil(t, cfg.Load("testdata/k9s.yml"))
assert.Equal(t, "kube-system", cfg.ActiveNamespace())
} | explode_data.jsonl/19253 | {
"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,
2648,
5728,
22699,
1155,
353,
8840,
836,
8,
341,
2109,
74,
1669,
1532,
11571,
42,
3760,
6086,
741,
50286,
1669,
2193,
7121,
2648,
1255,
74,
692,
6948,
59678,
1155,
11,
13286,
13969,
445,
92425,
14109,
24,
82,
33936,
5455,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValidateIPSet(t *testing.T) {
testCases := []struct {
ipset *IPSet
valid bool
desc string
}{
{ // case[0]
ipset: &IPSet{
Name: "test",
SetType: HashIPPort,
HashFamily: ProtocolFamilyIPV4,
HashSize: 1024,
MaxElem: 1024,
},
valid: true,
},
{ // case[1]
... | explode_data.jsonl/74020 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 995
} | [
2830,
3393,
17926,
3298,
1649,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
46531,
746,
353,
3298,
1649,
198,
197,
56322,
1807,
198,
197,
41653,
220,
914,
198,
197,
59403,
197,
197,
90,
442,
1142,
58,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestMarshalServerBoundLoginStart(t *testing.T) {
tt := []struct {
mcName string
}{
{
mcName: "test",
},
{
mcName: "infrared",
},
{
mcName: "",
},
}
for _, tc := range tt {
t.Run(tc.mcName, func(t *testing.T) {
expectedPk := mc.Packet{
ID: mc.ServerBoundLoginStartPacketID,
... | explode_data.jsonl/45008 | {
"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,
55438,
5475,
19568,
6231,
3479,
1155,
353,
8840,
836,
8,
341,
3244,
83,
1669,
3056,
1235,
341,
197,
97662,
675,
914,
198,
197,
59403,
197,
197,
515,
298,
97662,
675,
25,
330,
1944,
756,
197,
197,
1583,
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... | 3 |
func TestBadQueryV1(t *testing.T) {
f := newFixture(t)
expectedErr := `{
"code": "invalid_parameter",
"message": "error(s) occurred while parsing query",
"errors": [
{
"code": "rego_parse_error",
"message": "no match found",
"location": {
"file": "",
"row": 1,
"col... | explode_data.jsonl/79026 | {
"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,
17082,
2859,
53,
16,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
501,
18930,
1155,
692,
42400,
7747,
1669,
1565,
515,
220,
330,
1851,
788,
330,
11808,
24899,
756,
220,
330,
1994,
788,
330,
841,
1141,
8,
10017,
1393,
22314,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReverseInt(t *testing.T) {
type args struct {
s []int
}
tests := []struct {
name string
args args
want []int
}{
{name: "testcase1", args: args{s: []int{1, 2, 3, 4, 5}}, want: []int{5, 4, 3, 2, 1}},
{name: "testcase2", args: args{s: []int{}}, want: []int{}},
{name: "testcase3", args: args{s: [... | explode_data.jsonl/73902 | {
"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,
45695,
1072,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
1903,
3056,
396,
198,
197,
532,
78216,
1669,
3056,
1235,
341,
197,
11609,
914,
198,
197,
31215,
2827,
198,
197,
50780,
3056,
396,
198,
197,
59403,
197... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func Test_run(t *testing.T) {
type args struct {
cmd *cobra.Command
args []string
}
before := func(file string, testWorkflow formatter.Workflow, testConfig formatter.Config) {
os.Create(file)
workflow = testWorkflow
config = testConfig
config.InputFile = formatter.InputFile(file)
}
after := func(file ... | explode_data.jsonl/27050 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 844
} | [
2830,
3393,
14007,
1155,
353,
8840,
836,
8,
341,
13158,
2827,
2036,
341,
197,
25920,
220,
353,
59410,
12714,
198,
197,
31215,
3056,
917,
198,
197,
532,
63234,
1669,
2915,
4866,
914,
11,
1273,
62768,
24814,
28748,
4965,
11,
1273,
2648,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMultiClusterAllocationOnLocalCluster(t *testing.T) {
t.Parallel()
fixtures := []apis.SchedulingStrategy{apis.Packed, apis.Distributed}
for _, strategy := range fixtures {
strategy := strategy
t.Run(string(strategy), func(t *testing.T) {
t.Parallel()
namespace := fmt.Sprintf("gsa-multicluster-loc... | explode_data.jsonl/63307 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1932
} | [
2830,
3393,
20358,
28678,
78316,
1925,
7319,
28678,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
1166,
941,
18513,
1669,
3056,
13725,
808,
44356,
19816,
90,
13725,
1069,
11191,
11,
97723,
909,
25146,
532,
2023,
8358,
8282,
1669,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestContext_Expand_Resource(t *testing.T) {
manager := endly.New()
context := manager.NewContext(toolbox.NewContext())
_, err := context.ExpandResource(nil)
assert.NotNil(t, err)
_, err = context.ExpandResource(&url.Resource{})
assert.NotNil(t, err)
{
state := context.State()
state.Put("host", "127.0.... | explode_data.jsonl/31799 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 245
} | [
2830,
3393,
1972,
62,
38946,
86346,
1155,
353,
8840,
836,
8,
341,
92272,
1669,
835,
398,
7121,
741,
28413,
1669,
6645,
7121,
1972,
48950,
2011,
7121,
1972,
12367,
197,
6878,
1848,
1669,
2266,
49844,
437,
4783,
27907,
340,
6948,
93882,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetLocalIp(t *testing.T) {
addrs, err := net.InterfaceAddrs()
if err != nil {
fmt.Println(err)
os.Exit(1)
}
for _, address := range addrs {
if ipnet, ok := address.(*net.IPNet); ok && !ipnet.IP.IsLoopback() {
if ipnet.IP.To4() != nil {
fmt.Println(ipnet.IP.String())
}
}
}
} | explode_data.jsonl/44307 | {
"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,
1949,
7319,
23378,
1155,
353,
8840,
836,
8,
341,
12718,
5428,
11,
1848,
1669,
4179,
41065,
2212,
5428,
741,
743,
1848,
961,
2092,
341,
197,
11009,
12419,
3964,
340,
197,
25078,
34358,
7,
16,
340,
197,
532,
2023,
8358,
2621... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreateOrdersHandlersCorrectly(t *testing.T) {
middlewareBase := func(tag string) Middleware {
return func(h http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte(tag))
h.ServeHTTP(w, r)
})
}
}
t1 := middlewareBase("t1\n")
t2 :... | explode_data.jsonl/46277 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 381
} | [
2830,
3393,
4021,
24898,
39949,
33092,
398,
1155,
353,
8840,
836,
8,
1476,
2109,
11603,
3978,
1669,
2915,
19343,
914,
8,
72012,
341,
197,
853,
2915,
3203,
1758,
31010,
8,
1758,
31010,
341,
298,
853,
1758,
89164,
18552,
3622,
1758,
37508... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPercentile(t *testing.T) {
input := []struct {
name string
data []float64
percent float64
interpolate bool
expected float64
absent bool
}{
{"simple", []float64{1, 2, 3}, 50, false, 2, false},
{"80", []float64{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, 80, false, 9, false},
}
... | explode_data.jsonl/74405 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 288
} | [
2830,
3393,
32010,
457,
1155,
353,
8840,
836,
8,
341,
22427,
1669,
3056,
1235,
341,
197,
11609,
286,
914,
198,
197,
8924,
286,
3056,
3649,
21,
19,
198,
197,
197,
24422,
257,
2224,
21,
19,
198,
197,
58915,
45429,
1807,
198,
197,
4240... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPerfCollector(t *testing.T) {
canTestPerf(t)
collector, err := NewPerfCollector(log.NewNopLogger())
if err != nil {
t.Fatal(err)
}
// Setup background goroutine to capture metrics.
metrics := make(chan prometheus.Metric)
defer close(metrics)
go func() {
for range metrics {
}
}()
if err := coll... | explode_data.jsonl/30595 | {
"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,
3889,
69,
53694,
1155,
353,
8840,
836,
8,
341,
92936,
2271,
3889,
69,
1155,
340,
1444,
24605,
269,
11,
1848,
1669,
1532,
3889,
69,
53694,
12531,
7121,
45,
453,
7395,
2398,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHealthCheck(t *testing.T) {
defer leaktest.AfterTest(t)()
cfg := config.DefaultZoneConfig()
cfg.NumReplicas = proto.Int32(1)
s, err := serverutils.StartServerRaw(base.TestServerArgs{
Knobs: base.TestingKnobs{
Server: &TestingKnobs{
DefaultZoneConfigOverride: &cfg,
},
},
})
if err != nil {... | explode_data.jsonl/70826 | {
"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,
14542,
3973,
1155,
353,
8840,
836,
8,
341,
16867,
23352,
1944,
36892,
2271,
1155,
8,
2822,
50286,
1669,
2193,
13275,
15363,
2648,
741,
50286,
39847,
18327,
52210,
284,
18433,
7371,
18,
17,
7,
16,
340,
1903,
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... | 5 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.