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_HistoryDBLedgerSourceNextLedger(t *testing.T) {
state := &State{
RWMutex: sync.RWMutex{},
current: Status{
HorizonStatus: HorizonStatus{
ExpHistoryLatest: 3,
},
},
}
ledgerSource := HistoryDBSource{
updateFrequency: 0,
state: state,
}
ledgerChan := ledgerSource.NextLedger(... | explode_data.jsonl/34564 | {
"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,
2039,
2579,
3506,
60850,
1389,
3608,
5847,
60850,
1389,
1155,
353,
8840,
836,
8,
341,
24291,
1669,
609,
1397,
515,
197,
11143,
15210,
9371,
25,
12811,
2013,
15210,
9371,
38837,
197,
20121,
25,
8104,
515,
298,
13292,
269,
169... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCustomDefs(t *testing.T) {
callErr, funcErr, assert, callBuffer, funcBuffer := testOpenAPITypeWriter(t, `
package foo
// Blah is a custom type
type Blah struct {
}
func (_ Blah) OpenAPISchemaType() []string { return []string{"string"} }
func (_ Blah) OpenAPISchemaFormat() string { return "date-time" }
`)
i... | explode_data.jsonl/3357 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 317
} | [
2830,
3393,
10268,
56031,
1155,
353,
8840,
836,
8,
341,
67288,
7747,
11,
2915,
7747,
11,
2060,
11,
1618,
4095,
11,
2915,
4095,
1669,
1273,
5002,
7082,
929,
6492,
1155,
11,
22074,
1722,
15229,
271,
322,
2502,
1466,
374,
264,
2526,
943,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestStream_CanRead(t *testing.T) {
t.Run("test can not read", func(t *testing.T) {
assert := base.NewAssert(t)
for i := streamPosBody; i < 2*streamBlockSize; i++ {
stream := NewStream()
stream.SetWritePos(i)
assert(stream.SetReadPos(i)).IsTrue()
assert(stream.CanRead()).IsFalse()
if (i+1)%stre... | explode_data.jsonl/21188 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 313
} | [
2830,
3393,
3027,
920,
276,
4418,
1155,
353,
8840,
836,
8,
341,
3244,
16708,
445,
1944,
646,
537,
1349,
497,
2915,
1155,
353,
8840,
836,
8,
341,
197,
6948,
1669,
2331,
7121,
8534,
1155,
692,
197,
2023,
600,
1669,
4269,
4859,
5444,
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 TestAlphaVolumeSnapshotDataSource(t *testing.T) {
successTestCases := []core.PersistentVolumeClaimSpec{
*testVolumeSnapshotDataSourceInSpec("test_snapshot", "VolumeSnapshot", "snapshot.storage.k8s.io"),
}
failedTestCases := []core.PersistentVolumeClaimSpec{
*testVolumeSnapshotDataSourceInSpec("", "VolumeSna... | explode_data.jsonl/25622 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 332
} | [
2830,
3393,
19384,
18902,
15009,
17173,
1155,
353,
8840,
836,
8,
341,
30553,
2271,
37302,
1669,
3056,
2153,
61655,
18902,
45544,
8327,
515,
197,
197,
9,
1944,
18902,
15009,
17173,
641,
8327,
445,
1944,
53265,
497,
330,
18902,
15009,
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... | 5 |
func TestPacketDot11MgmtBeacon(t *testing.T) {
p := gopacket.NewPacket(testPacketDot11MgmtBeacon, LinkTypeIEEE80211Radio, gopacket.Default)
if p.ErrorLayer() != nil {
t.Error("Failed to decode packet:", p.ErrorLayer().Error())
}
expectedLayers := []gopacket.LayerType{LayerTypeRadioTap, LayerTypeDot11, LayerTypeDo... | explode_data.jsonl/7561 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 318
} | [
2830,
3393,
16679,
34207,
16,
16,
44,
46063,
3430,
22379,
1155,
353,
8840,
836,
8,
341,
3223,
1669,
342,
453,
5709,
7121,
16679,
8623,
16679,
34207,
16,
16,
44,
46063,
3430,
22379,
11,
5948,
929,
76705,
23,
15,
17,
16,
16,
28203,
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... | 6 |
func TestCastOperator(t *testing.T) {
testStr := `<?
$var = (double) 1.0; ?>`
p := NewParser()
p.disableScoping = true
a, _ := p.Parse("test.php", testStr)
tree := []ast.Node{
ast.ExprStmt{Expr: ast.AssignmentExpr{
Assignee: ast.NewVariable("var"),
Value: ast.UnaryCallExpr{
Operand: &ast.Literal{Ty... | explode_data.jsonl/28451 | {
"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,
18714,
18461,
1155,
353,
8840,
836,
8,
341,
18185,
2580,
1669,
1565,
53075,
220,
400,
947,
284,
320,
4331,
8,
220,
16,
13,
15,
26,
3370,
3989,
3223,
1669,
1532,
6570,
741,
3223,
42628,
3326,
33707,
284,
830,
198,
11323,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestFavoritesAddAsync(t *testing.T) {
mockCtrl, config, ctx := favTestInit(t, false)
// Only one task at a time
f := newFavoritesWithChan(config, make(chan *favReq, 1))
f.InitForTest()
defer favTestShutdown(t, mockCtrl, config, f)
// Call Add twice in a row, but only get one Add KBPKI call
fav1 := favorite... | explode_data.jsonl/14683 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 418
} | [
2830,
3393,
85221,
2212,
6525,
1155,
353,
8840,
836,
8,
341,
77333,
15001,
11,
2193,
11,
5635,
1669,
9244,
2271,
3803,
1155,
11,
895,
340,
197,
322,
8278,
825,
3383,
518,
264,
882,
198,
1166,
1669,
501,
85221,
2354,
46019,
8754,
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 TestGetUserIdFromJwt(t *testing.T) {
// Invalid token layout without two dots
_, err := readAuthToken("abc")
util.AssertError(t, err)
// Invalid base64 data in signature part
_, err = readAuthToken("0.a.a")
util.AssertError(t, err)
// Invalid signature
_, err = readAuthToken("0.a.eyJmb28iOiAiYmFyIn0=")
... | explode_data.jsonl/30509 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 137
} | [
2830,
3393,
1949,
13504,
3830,
72756,
1155,
353,
8840,
836,
8,
341,
197,
322,
13882,
3950,
6789,
2041,
1378,
30994,
198,
197,
6878,
1848,
1669,
1349,
84708,
445,
13683,
1138,
79138,
11711,
1454,
1155,
11,
1848,
692,
197,
322,
13882,
233... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestControllerBuilder_OnLeadingFunc_ControllerError(t *testing.T) {
startedCh := make(chan struct{})
stoppedCh := make(chan struct{})
ctx := context.Background()
fatals := []string{}
b := &ControllerBuilder{
nonZeroExitFn: func(args ...interface{}) {
fatals = append(fatals, fmt.Sprintf("%v", args[0]))
... | explode_data.jsonl/67865 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 468
} | [
2830,
3393,
2051,
3297,
35482,
69750,
9626,
30674,
1454,
1155,
353,
8840,
836,
8,
341,
21375,
291,
1143,
1669,
1281,
35190,
2036,
37790,
18388,
17573,
1143,
1669,
1281,
35190,
2036,
37790,
20985,
1669,
2266,
19047,
2822,
1166,
266,
1127,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCallLessArgs(t *testing.T) {
const SCRIPT = `
function A(a, b, c) {
return String(a) + " " + String(b) + " " + String(c);
}
var rv = A(1, 2);
`
testScript(SCRIPT, asciiString("1 2 undefined"), t)
} | explode_data.jsonl/75211 | {
"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,
7220,
27451,
4117,
1155,
353,
8840,
836,
8,
341,
4777,
53679,
284,
22074,
1688,
362,
2877,
11,
293,
11,
272,
8,
341,
853,
923,
2877,
8,
488,
330,
330,
488,
923,
1883,
8,
488,
330,
330,
488,
923,
1337,
317,
630,
947,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestImportSymlinks(t *testing.T) {
switch runtime.GOOS {
case "windows", "plan9":
t.Skipf("skipping test on %q as there are no symlinks", runtime.GOOS)
}
newGoPath, err := ioutil.TempDir("", "symlinktest")
if err != nil {
t.Fatal(err)
}
defer os.RemoveAll(newGoPath)
targetPath := newGoPath + "/target... | explode_data.jsonl/12423 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 598
} | [
2830,
3393,
11511,
34667,
1014,
15504,
1155,
353,
8840,
836,
8,
341,
8961,
15592,
97574,
3126,
341,
2722,
330,
27077,
497,
330,
10393,
24,
4660,
197,
3244,
57776,
69,
445,
4886,
5654,
1273,
389,
1018,
80,
438,
1052,
525,
902,
6568,
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... | 3 |
func TestImageRef_SVG_1(t *testing.T) {
Startup(nil)
raw, err := ioutil.ReadFile(resources + "svg_1.svg")
require.NoError(t, err)
img, err := NewImageFromBuffer(raw)
require.NoError(t, err)
require.NotNil(t, img)
defer img.Close()
assert.Equal(t, ImageTypeSVG, img.Metadata().Format)
} | explode_data.jsonl/38814 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 126
} | [
2830,
3393,
1906,
3945,
1098,
46641,
62,
16,
1155,
353,
8840,
836,
8,
341,
197,
39076,
27907,
692,
76559,
11,
1848,
1669,
43144,
78976,
52607,
488,
330,
15196,
62,
16,
15228,
1138,
17957,
35699,
1155,
11,
1848,
692,
39162,
11,
1848,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestDialAccessDeniedWithRestrictedSD(t *testing.T) {
c := PipeConfig{
SecurityDescriptor: "D:P(A;;0x1200FF;;;WD)",
}
l, err := ListenPipe(testPipeName, &c)
if err != nil {
t.Fatal(err)
}
defer l.Close()
_, err = DialPipe(testPipeName, nil)
if err.(*os.PathError).Err != syscall.ERROR_ACCESS_DENIED {
t... | explode_data.jsonl/11422 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 168
} | [
2830,
3393,
35,
530,
6054,
54481,
2354,
86405,
5491,
1155,
353,
8840,
836,
8,
341,
1444,
1669,
27805,
2648,
515,
197,
7568,
18429,
11709,
25,
330,
35,
92411,
4346,
6768,
15,
87,
16,
17,
15,
15,
1748,
36328,
17563,
15752,
197,
532,
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... | 3 |
func TestReshard(t *testing.T) {
size := 10 // Make bigger to find more races.
n := config.DefaultQueueConfig.Capacity * size
samples, series := createTimeseries(n)
c := NewTestStorageClient()
c.expectSamples(samples, series)
cfg := config.DefaultQueueConfig
cfg.MaxShards = 1
dir, err := ioutil.TempDir("", "... | explode_data.jsonl/1310 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 376
} | [
2830,
3393,
1061,
18703,
1155,
353,
8840,
836,
8,
341,
13832,
1669,
220,
16,
15,
442,
7405,
11243,
311,
1477,
803,
20588,
624,
9038,
1669,
2193,
13275,
7554,
2648,
78963,
4018,
353,
1379,
198,
1903,
4023,
11,
4013,
1669,
1855,
18889,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestNewNodeRegistration(t *testing.T) {
testcases := []struct {
name string
expected kubeadmv1beta1.NodeRegistrationOptions
actual kubeadmv1beta1.NodeRegistrationOptions
}{
{
name: "simple test",
expected: kubeadmv1beta1.NodeRegistrationOptions{
Name: "test name",
CRISocket: "/te... | explode_data.jsonl/68723 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1048
} | [
2830,
3393,
3564,
1955,
23365,
1155,
353,
8840,
836,
8,
341,
18185,
23910,
1669,
3056,
1235,
341,
197,
11609,
257,
914,
198,
197,
42400,
595,
392,
3149,
26002,
16,
19127,
16,
21714,
23365,
3798,
198,
197,
88814,
256,
595,
392,
3149,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestDependencyMockOutputMergeWithStateTrueNotAllowed(t *testing.T) {
t.Parallel()
cleanupTerraformFolder(t, TEST_FIXTURE_GET_OUTPUT)
tmpEnvPath := copyEnvironment(t, TEST_FIXTURE_GET_OUTPUT)
rootPath := util.JoinPath(tmpEnvPath, TEST_FIXTURE_GET_OUTPUT, "mock-outputs-merge-with-state", "merge-with-state-true-... | explode_data.jsonl/10137 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 522
} | [
2830,
3393,
36387,
11571,
5097,
52096,
2354,
1397,
2514,
97634,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
1444,
60639,
51,
13886,
627,
13682,
1155,
11,
13602,
42635,
41486,
12702,
23981,
340,
20082,
14359,
1820,
1669,
2975,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestEncode(t *testing.T) {
tests := []struct {
src []byte
dst []byte
out []byte
sz uint32
sameAsDst bool
}{
{
dst: nil,
src: []byte("test"),
out: []byte("\x04\ftest"),
sz: 6,
},
{
src: nil,
out: []byte("\x00"),
sz: 1,
},
{
src: []byte("test")... | explode_data.jsonl/52600 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 950
} | [
2830,
3393,
32535,
1155,
353,
8840,
836,
8,
341,
78216,
1669,
3056,
1235,
341,
197,
41144,
981,
3056,
3782,
198,
197,
52051,
981,
3056,
3782,
198,
197,
13967,
981,
3056,
3782,
198,
197,
1903,
89,
286,
2622,
18,
17,
198,
197,
1903,
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... | 6 |
func TestGetInstalledChaincodesErrorPaths(t *testing.T) {
//获取现有的chaincode安装路径值并设置它
//做完测试后再回来
cip := chaincodeInstallPath
defer SetChaincodesPath(cip)
//创建一个临时目录并在末尾将其删除
dir, err := ioutil.TempDir(os.TempDir(), "chaincodes")
assert.NoError(t, err)
defer os.RemoveAll(dir)
//将上面创建的目录设置为chaincode安装路径
SetChaincode... | explode_data.jsonl/10596 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 335
} | [
2830,
3393,
1949,
60800,
18837,
25814,
1454,
26901,
1155,
353,
8840,
836,
8,
341,
322,
45912,
110857,
8819,
1851,
103999,
76837,
25511,
62926,
43918,
99652,
198,
322,
112555,
81705,
107646,
104150,
198,
1444,
573,
1669,
8781,
1851,
24690,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCertificateDeleteNoID(t *testing.T) {
withTestClient(t, func(config *CmdConfig, tm *tcMocks) {
err := RunCertificateDelete(config)
assert.Error(t, err)
})
} | explode_data.jsonl/4822 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 66
} | [
2830,
3393,
33202,
6435,
2753,
915,
1155,
353,
8840,
836,
8,
341,
46948,
2271,
2959,
1155,
11,
2915,
8754,
353,
15613,
2648,
11,
17333,
353,
10413,
72577,
8,
341,
197,
9859,
1669,
6452,
33202,
6435,
8754,
340,
197,
6948,
6141,
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 |
func TestInsertPageNumbers(t *testing.T) {
localFilePath := commonTestFile
remoteFolder := path.Join(remoteBaseTestDataFolder, "DocumentElements", "Fields")
remoteName := "TestInsertPageNumbers.docx"
pageNumber := models.PageNumber{
Alignment: "center",
Format: "{PAGE} of {NUMPAGES}",
}
options := map[str... | explode_data.jsonl/23192 | {
"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,
13780,
2665,
27237,
1155,
353,
8840,
836,
8,
1476,
8854,
19090,
1669,
4185,
2271,
1703,
198,
197,
18147,
13682,
1669,
1815,
22363,
61381,
3978,
83920,
13682,
11,
330,
7524,
11868,
497,
330,
8941,
1138,
197,
18147,
675,
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 TestMultipleEntries(t *testing.T) {
wg := &sync.WaitGroup{}
wg.Add(2)
cron := New()
cron.AddFunc("0 0 0 1 1 ?", func() {})
cron.AddFunc("* * * * * ?", func() { wg.Done() })
cron.AddFunc("0 0 0 31 12 ?", func() {})
cron.AddFunc("* * * * * ?", func() { wg.Done() })
cron.Start()
defer cron.Stop()
select ... | explode_data.jsonl/10558 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 186
} | [
2830,
3393,
32089,
24533,
1155,
353,
8840,
836,
8,
341,
72079,
1669,
609,
12996,
28384,
2808,
16094,
72079,
1904,
7,
17,
692,
1444,
2248,
1669,
1532,
741,
1444,
2248,
1904,
9626,
445,
15,
220,
15,
220,
15,
220,
16,
220,
16,
42313,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestReportWorkflowResource_WorkflowCompleted(t *testing.T) {
store, manager, run := initWithOneTimeRun(t)
namespace := "kubeflow"
defer store.Close()
// report workflow
workflow := util.NewWorkflow(&v1alpha1.Workflow{
ObjectMeta: v1.ObjectMeta{
Name: run.Name,
Namespace: namespace,
UID: ... | explode_data.jsonl/77058 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 298
} | [
2830,
3393,
10361,
62768,
4783,
87471,
4965,
22724,
1155,
353,
8840,
836,
8,
341,
57279,
11,
6645,
11,
1598,
1669,
13864,
3966,
1462,
6727,
1155,
340,
56623,
1669,
330,
74,
392,
823,
10303,
698,
16867,
3553,
10421,
741,
197,
322,
1895,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestInterpreterCollections(t *testing.T) {
s, err := parseFile("src/parse/asp/test_data/interpreter/collections.build")
require.NoError(t, err)
assert.EqualValues(t, True, s.Lookup("x"))
assert.EqualValues(t, True, s.Lookup("y"))
assert.EqualValues(t, False, s.Lookup("z"))
} | explode_data.jsonl/81058 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 113
} | [
2830,
3393,
58426,
52730,
1155,
353,
8840,
836,
8,
341,
1903,
11,
1848,
1669,
4715,
1703,
445,
3548,
14,
6400,
14,
13367,
12697,
1769,
14,
90554,
2899,
3107,
13239,
1138,
17957,
35699,
1155,
11,
1848,
340,
6948,
12808,
6227,
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 TestTokenManager_GenerateToken(t *testing.T) {
const sub = "subject"
const tokenType = "apitoken"
const tokenText = "token"
generator := new(MockTokenGenerator)
generator.On("GenerateToken", sub, NoExpiration, tokenType, tokenText).Return("id", "token", nil)
generator.On("GenerateToken", sub, NoExpiration, ... | explode_data.jsonl/43103 | {
"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,
3323,
2043,
2646,
13220,
3323,
1155,
353,
8840,
836,
8,
341,
4777,
1186,
284,
330,
11501,
698,
4777,
3950,
929,
284,
330,
391,
275,
1679,
698,
4777,
3950,
1178,
284,
330,
5839,
1837,
3174,
15312,
1669,
501,
66436,
3323,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestIsCompressed(t *testing.T) {
for _, test := range pubKeyTests {
isCompressed := IsCompressedPubKey(test.key)
wantCompressed := (test.format == pubkeyCompressed)
if isCompressed != wantCompressed {
t.Fatalf("%s (%x) pubkey: unexpected compressed result, "+
"got %v, want %v", test.name, test.key,
... | explode_data.jsonl/71133 | {
"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,
3872,
1092,
14318,
1155,
353,
8840,
836,
8,
341,
2023,
8358,
1273,
1669,
2088,
6675,
1592,
18200,
341,
197,
19907,
1092,
14318,
1669,
2160,
1092,
14318,
29162,
1592,
8623,
4735,
340,
197,
50780,
1092,
14318,
1669,
320,
1944,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestGetDaemonEndpointsFromString1(t *testing.T) {
udpAddr := "127.0.0.1:2000"
tcpAddr := "127.0.0.1:2000"
udpEndpt, _ := resolveUDPAddr(udpAddr)
tcpEndpt, _ := resolveTCPAddr(tcpAddr)
dAddr := udpAddr
dEndpt, err := GetDaemonEndpointsFromString(dAddr)
assert.Nil(t, err)
assert.Equal(t, dEndpt.UDPAddr, udp... | explode_data.jsonl/49931 | {
"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,
1949,
89177,
80786,
44491,
16,
1155,
353,
8840,
836,
8,
341,
197,
31101,
13986,
1669,
330,
16,
17,
22,
13,
15,
13,
15,
13,
16,
25,
17,
15,
15,
15,
698,
3244,
4672,
13986,
1669,
330,
16,
17,
22,
13,
15,
13,
15,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestReconnectServerStats(t *testing.T) {
ts := RunServerOnPort(TEST_PORT)
opts := reconnectOpts
nc, _ := opts.Connect()
defer nc.Close()
nc.Flush()
ts.Shutdown()
// server is stopped here...
ts = RunServerOnPort(TEST_PORT)
defer ts.Shutdown()
if err := nc.FlushTimeout(5 * time.Second); err != nil {
... | explode_data.jsonl/44906 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 236
} | [
2830,
3393,
693,
6459,
5475,
16635,
1155,
353,
8840,
836,
8,
341,
57441,
1669,
6452,
5475,
1925,
7084,
50320,
12377,
692,
64734,
1669,
50036,
43451,
198,
197,
1016,
11,
716,
1669,
12185,
43851,
741,
16867,
25126,
10421,
741,
197,
1016,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGreaterEqualFloat32s(t *testing.T) {
t.Parallel()
match, err := path.GreaterEqual(&testType1{
Float32s: []float32{3.1415, 2.7182},
}, "float32s", "2.7181")
require.Nil(t, err)
require.True(t, match)
match, err = path.GreaterEqual(&testType1{
Float32s: []float32{3.1415, 2.7182},
}, "float32s", "3.1... | explode_data.jsonl/78476 | {
"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,
41366,
2993,
5442,
18,
17,
82,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
47706,
11,
1848,
1669,
1815,
1224,
28362,
2993,
2099,
1944,
929,
16,
515,
197,
197,
5442,
18,
17,
82,
25,
3056,
3649,
18,
17,
90,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestGetOrderEvents(t *testing.T) {
t.Skip()
client := NewClient(&Config{
URL: "https://api-kylin.eosasia.one",
Debug: true,
})
events, err := client.GetOrderEvents("helloworld54")
if err != nil {
t.Error(err)
}
event := <-events
fmt.Println(event)
} | explode_data.jsonl/58354 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 113
} | [
2830,
3393,
1949,
4431,
7900,
1155,
353,
8840,
836,
8,
341,
3244,
57776,
741,
25291,
1669,
1532,
2959,
2099,
2648,
515,
197,
79055,
25,
256,
330,
2428,
1110,
2068,
12,
7891,
3732,
1734,
436,
35159,
30973,
756,
197,
34424,
25,
830,
345... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestNewMqService(t *testing.T) {
seedBroker, leader := NewBrokersWith2Responses(t)
defer seedBroker.Close()
defer leader.Close()
testCases := []struct {
cfg Config
}{
{
cfg: Config{},
},
// todo wait cm chang rpc
{
cfg: Config{
MQ: MQConfig{
BlobDeleteTopic: "test1",
Sh... | explode_data.jsonl/7363 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 528
} | [
2830,
3393,
3564,
44,
80,
1860,
1155,
353,
8840,
836,
8,
341,
197,
22602,
65545,
11,
7653,
1669,
1532,
26272,
26177,
2354,
17,
70743,
1155,
340,
16867,
10320,
65545,
10421,
741,
16867,
7653,
10421,
2822,
18185,
37302,
1669,
3056,
1235,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func Test_decreaseWidth(t *testing.T) {
testcases := []struct {
colsWidth map[int]int
cols []string
want int
}{
{colsWidth: map[int]int{0: 18}, cols: []string{"datname"}, want: 14}, // current width 18 chars, want to be 14
{colsWidth: map[int]int{0: 8}, cols: []string{"datname"}, want: 7}, // c... | explode_data.jsonl/69225 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 388
} | [
2830,
3393,
2259,
19947,
3327,
1155,
353,
8840,
836,
8,
341,
18185,
23910,
1669,
3056,
1235,
341,
197,
1444,
3069,
3327,
2415,
18640,
63025,
198,
197,
1444,
3069,
414,
3056,
917,
198,
197,
50780,
414,
526,
198,
197,
59403,
197,
197,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMineAtv(t *testing.T) {
assert := assert.New(t)
mockMiner := NewMockMiner()
var publicationData entities.PublicationData
publicationData.ContextInfo = []byte{1, 2, 3, 4}
publicationData.Header = []byte{1, 2, 3, 4, 5}
publicationData.Identifier = 10
publicationData.PayoutInfo = []byte{1, 2, 3, 4, 5, 6}... | explode_data.jsonl/39849 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 264
} | [
2830,
3393,
63495,
1655,
85,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
77333,
6217,
261,
1669,
1532,
11571,
6217,
261,
2822,
2405,
16599,
1043,
14744,
49139,
367,
1043,
198,
1219,
367,
1043,
9328,
1731,
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 TestIssue1736(t *testing.T) {
withTestProcess("testvariables2", t, func(p *proc.Target, fixture protest.Fixture) {
assertNoError(p.Continue(), t, "Continue()")
ch1BufVar := evalVariable(p, t, "*(ch1.buf)")
q := fmt.Sprintf("*(*%q)(%d)", ch1BufVar.DwarfType.Common().Name, ch1BufVar.Addr)
t.Logf("%s", q)
... | explode_data.jsonl/56338 | {
"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,
42006,
16,
22,
18,
21,
1155,
353,
8840,
836,
8,
341,
46948,
2271,
7423,
445,
1944,
18616,
17,
497,
259,
11,
2915,
1295,
353,
15782,
35016,
11,
12507,
8665,
991,
12735,
8,
341,
197,
6948,
2753,
1454,
1295,
2451,
6232,
150... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPullerPeerNotEligible(t *testing.T) {
// Scenario: p1 pulls from p2 or from p3
// but it's not eligible for pulling data from p2 or from p3
gn := &gossipNetwork{}
policyStore := newCollectionStore().withPolicy("col1", uint64(100)).thatMapsTo("p2", "p3")
factoryMock1 := &mocks.CollectionAccessFactory{}
ac... | explode_data.jsonl/53264 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1108
} | [
2830,
3393,
36068,
261,
30888,
2623,
6582,
343,
1238,
1155,
353,
8840,
836,
8,
341,
197,
322,
58663,
25,
281,
16,
33045,
504,
281,
17,
476,
504,
281,
18,
198,
197,
322,
714,
432,
594,
537,
17013,
369,
22266,
821,
504,
281,
17,
476... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMetadataPayloadAttrsMatchFields(t *testing.T) {
setup := metadataProcSetup()
eventFields := getMetadataEventAttrs(t, "")
var mappingFields = []tests.FieldTemplateMapping{
{Template: "system.container.", Mapping: "container."}, // move system.container.*
{Template: "system.container", Mappin... | explode_data.jsonl/64805 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 621
} | [
2830,
3393,
14610,
29683,
53671,
8331,
8941,
1155,
353,
8840,
836,
8,
341,
84571,
1669,
11160,
24508,
21821,
741,
28302,
8941,
1669,
633,
14610,
1556,
53671,
1155,
11,
85617,
2405,
12731,
8941,
284,
3056,
23841,
17087,
7275,
6807,
515,
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 Test_ObjectTracker_No_Expectations(t *testing.T) {
g := gomega.NewWithT(t)
ot := newObjTracker(schema.GroupVersionKind{}, nil)
ot.ExpectationsDone()
g.Expect(ot.Satisfied()).To(gomega.BeTrue(), "populated tracker with no expectations should be satisfied")
} | explode_data.jsonl/52314 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 96
} | [
2830,
3393,
27839,
31133,
36989,
62,
17536,
804,
1155,
353,
8840,
836,
8,
341,
3174,
1669,
342,
32696,
7121,
2354,
51,
1155,
340,
197,
354,
1669,
74259,
31133,
42735,
5407,
5637,
10629,
22655,
2092,
340,
197,
354,
81893,
804,
17453,
741... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestCloseIssue(t *testing.T) {
ts := httptest.NewTLSServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if r.Method != http.MethodPatch {
t.Errorf("Bad method: %s", r.Method)
}
if r.URL.Path != "/repos/k8s/kuber/issues/5" {
t.Errorf("Bad request path: %s", r.URL.Path)
}
b, err :... | explode_data.jsonl/6276 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 380
} | [
2830,
3393,
7925,
42006,
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,
43622,
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... | 7 |
func TestNewPRSignedBaseLayer(t *testing.T) {
testBLI := NewPRMMatchExact()
// Success
_pr, err := NewPRSignedBaseLayer(testBLI)
require.NoError(t, err)
pr, ok := _pr.(*prSignedBaseLayer)
require.True(t, ok)
assert.Equal(t, &prSignedBaseLayer{
prCommon: prCommon{prTypeSignedBaseLayer},
BaseLayerIde... | explode_data.jsonl/36508 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 181
} | [
2830,
3393,
3564,
6480,
49312,
3978,
9188,
1155,
353,
8840,
836,
8,
341,
18185,
9389,
40,
1669,
1532,
6480,
8035,
754,
57954,
2822,
197,
322,
13047,
198,
197,
5294,
11,
1848,
1669,
1532,
6480,
49312,
3978,
9188,
8623,
9389,
40,
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... | 1 |
func TestUnregisterCluster_DBError(t *testing.T) {
manager := GetManagerInstance()
manager.SetDBConnection(&database.MockDBConnection{
DeleteClusterReturnErr: true,
})
clearManager()
name, color := "cluster", uint32(42)
cluster := CreateCluster(name, color)
manager.clusterCache[*cluster.Name] = cluster
_, e... | explode_data.jsonl/24680 | {
"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,
1806,
6343,
28678,
16310,
1454,
1155,
353,
8840,
836,
8,
341,
92272,
1669,
2126,
2043,
2523,
741,
92272,
4202,
3506,
4526,
2099,
12216,
24664,
3506,
4526,
515,
197,
96672,
28678,
5598,
7747,
25,
830,
345,
197,
3518,
40408,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestUnitScheduleCreateTransactionValidateWrong(t *testing.T) {
client := ClientForTestnet()
client.SetAutoValidateChecksums(true)
accountID, err := AccountIDFromString("0.0.123-rmkykd")
assert.NoError(t, err)
scheduleCreate := NewScheduleCreateTransaction().
SetPayerAccountID(accountID)
err = scheduleCre... | explode_data.jsonl/19813 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 162
} | [
2830,
3393,
4562,
32210,
4021,
8070,
17926,
29185,
1155,
353,
8840,
836,
8,
341,
25291,
1669,
8423,
2461,
2271,
4711,
741,
25291,
4202,
13253,
17926,
73190,
82,
3715,
340,
86866,
915,
11,
1848,
1669,
8615,
915,
44491,
445,
15,
13,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestGetExchangeInfo(t *testing.T) {
t.Parallel()
info, err := b.GetExchangeInfo(context.Background())
if err != nil {
t.Error(err)
}
if mockTests {
serverTime := time.Date(2022, 2, 25, 3, 50, 40, int(601*time.Millisecond), time.UTC)
if !info.Servertime.Equal(serverTime) {
t.Errorf("Expected %v, got %... | explode_data.jsonl/76641 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 155
} | [
2830,
3393,
1949,
31564,
1731,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
27043,
11,
1848,
1669,
293,
2234,
31564,
1731,
5378,
19047,
2398,
743,
1848,
961,
2092,
341,
197,
3244,
6141,
3964,
340,
197,
532,
743,
7860,
18200,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTick(t *testing.T) {
ht := StartHTTPTest(t, "base")
defer ht.Finish()
// Just sanity-check that we return the context error...
ctx, cancel := context.WithCancel(context.Background())
cancel()
err := ht.App.Tick(ctx)
ht.Assert.EqualError(err, context.Canceled.Error())
} | explode_data.jsonl/46410 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 106
} | [
2830,
3393,
22213,
1155,
353,
8840,
836,
8,
341,
197,
426,
1669,
5145,
9230,
2271,
1155,
11,
330,
3152,
1138,
16867,
34323,
991,
18176,
2822,
197,
322,
4599,
46842,
15934,
429,
582,
470,
279,
2266,
1465,
9338,
20985,
11,
9121,
1669,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestMosaicDefinitionTransactionSerialization(t *testing.T) {
nsId, err := NewNamespaceIdFromName("sname")
assert.Nilf(t, err, "NewNamespaceIdFromName returned error: %s", err)
tx, err := NewMosaicDefinitionTransaction(fakeDeadline, "mosaics", nsId, NewMosaicProperties(true, true, true, 4, big.NewInt(10000)), ... | explode_data.jsonl/69190 | {
"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,
44,
44783,
10398,
8070,
35865,
1155,
353,
8840,
836,
8,
341,
84041,
764,
11,
1848,
1669,
1532,
22699,
764,
3830,
675,
445,
82,
606,
5130,
6948,
59678,
69,
1155,
11,
1848,
11,
330,
3564,
22699,
764,
3830,
675,
5927,
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... | 1 |
func TestFiles_List(t *testing.T) {
setup()
defer teardown()
fixture := `
{
"files": [
{
"content_type": "text/plain",
"crc32": "66a1512f",
"created_at": "2013-09-07T21:32:03",
"first_accessed_at": null,
"icon": "https://put.io/images/file_types/text.png",
"id": 6546533,
"is_mp4_available": false,
... | explode_data.jsonl/48315 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1044
} | [
2830,
3393,
10809,
27104,
1155,
353,
8840,
836,
8,
341,
84571,
741,
16867,
49304,
2822,
1166,
12735,
1669,
22074,
515,
1,
7198,
788,
2278,
197,
515,
197,
197,
1,
1796,
1819,
788,
330,
1318,
36971,
756,
197,
197,
1,
66083,
18,
17,
78... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRestartRepublish(t *testing.T) {
ctx := createSweeperTestContext(t)
_, err := ctx.sweeper.SweepInput(spendableInputs[0], defaultFeePref)
if err != nil {
t.Fatal(err)
}
ctx.tick()
sweepTx := ctx.receiveTx()
// Restart sweeper again. No action is expected.
ctx.restartSweeper()
republishedTx := ct... | explode_data.jsonl/34230 | {
"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,
59354,
18327,
2538,
1155,
353,
8840,
836,
8,
341,
20985,
1669,
1855,
50,
896,
10436,
2271,
1972,
1155,
692,
197,
6878,
1848,
1669,
5635,
514,
896,
10436,
808,
48542,
2505,
1141,
3740,
480,
31946,
58,
15,
1125,
1638,
41941,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHostSimpleProxyNoHeaderForward(t *testing.T) {
var requestHost string
backend := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
requestHost = r.Host
w.Write([]byte("Hello, client"))
}))
defer backend.Close()
// set up proxy
p := &Proxy{
Next: httpserver.Emp... | explode_data.jsonl/64239 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 324
} | [
2830,
3393,
9296,
16374,
16219,
2753,
4047,
25925,
1155,
353,
8840,
836,
8,
341,
2405,
1681,
9296,
914,
198,
197,
20942,
1669,
54320,
70334,
7121,
5475,
19886,
89164,
18552,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
197,
2355... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRunnerWithOptionsFromEnv(t *testing.T) {
if err := os.Setenv(envScenarigoColor, "true"); err != nil {
t.Fatalf("%+v", err)
}
defer os.Unsetenv(envScenarigoColor)
runner, err := NewRunner(
WithOptionsFromEnv(true),
)
if err != nil {
t.Fatal(err)
}
if !runner.enabledColor {
t.Fatalf("failed to se... | explode_data.jsonl/56027 | {
"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,
19486,
74238,
3830,
14359,
1155,
353,
8840,
836,
8,
341,
743,
1848,
1669,
2643,
4202,
3160,
16978,
3326,
268,
277,
7836,
1636,
11,
330,
1866,
5038,
1848,
961,
2092,
341,
197,
3244,
30762,
4430,
10,
85,
497,
1848,
340,
197,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
func TestAwaitImportInsideTry(t *testing.T) {
default_suite.expectBundled(t, bundled{
files: map[string]string{
"/entry.js": `
async function main(name) {
try {
return await import(name)
} catch {
}
}
main('fs')
`,
},
entryPaths: []string{"/entry.js"},
options: config.Opt... | explode_data.jsonl/38486 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 195
} | [
2830,
3393,
37352,
11511,
24480,
21453,
1155,
353,
8840,
836,
8,
341,
11940,
57239,
25952,
33,
1241,
832,
1155,
11,
51450,
515,
197,
74075,
25,
2415,
14032,
30953,
515,
298,
197,
3115,
4085,
2857,
788,
22074,
571,
52384,
729,
1887,
3153... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestRunCreateToken(t *testing.T) {
var buf bytes.Buffer
fakeClient := &fake.Clientset{}
fakeClient.AddReactor("get", "secrets", func(action core.Action) (handled bool, ret runtime.Object, err error) {
return true, nil, errors.NewNotFound(v1.Resource("secrets"), "foo")
})
testCases := []struct {
name ... | explode_data.jsonl/11811 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1450
} | [
2830,
3393,
6727,
4021,
3323,
1155,
353,
8840,
836,
8,
341,
2405,
6607,
5820,
22622,
198,
1166,
726,
2959,
1669,
609,
30570,
11716,
746,
16094,
1166,
726,
2959,
1904,
693,
5621,
445,
455,
497,
330,
325,
52710,
497,
2915,
15306,
6200,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestDynamicDiscoverySimple(t *testing.T) {
dd := &DynamicDiscovery{
ps: mockProcess{
[]facts.Process{
{
PID: 1547,
PPID: 1,
CreateTime: time.Now(),
CmdLineList: []string{"/usr/bin/memcached", "-m", "64", "-p", "11211", "-u", "memcache", "-l", "127.0.0.1", "-P", "/var/r... | explode_data.jsonl/27781 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 661
} | [
2830,
3393,
21752,
67400,
16374,
1155,
353,
8840,
836,
8,
341,
92265,
1669,
609,
21752,
67400,
515,
197,
35009,
25,
7860,
7423,
515,
298,
197,
1294,
68053,
29012,
515,
571,
197,
515,
464,
10025,
915,
25,
260,
220,
16,
20,
19,
22,
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... | 6 |
func TestValidateParentAndDrain(t *testing.T) {
type ParentDrainTime struct {
Parent types.Duration
Drain types.Duration
Valid bool
}
combinations := []ParentDrainTime{
{
Parent: types.Duration{Seconds: 2},
Drain: types.Duration{Seconds: 1},
Valid: true,
},
{
Parent: types.Duration{Secon... | explode_data.jsonl/56896 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 657
} | [
2830,
3393,
17926,
8387,
3036,
8847,
466,
1155,
353,
8840,
836,
8,
341,
13158,
17022,
8847,
466,
1462,
2036,
341,
197,
197,
8387,
4494,
33795,
198,
197,
197,
8847,
466,
220,
4494,
33795,
198,
197,
197,
4088,
220,
1807,
198,
197,
630,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestFsnotifyFakeSymlink(t *testing.T) {
// Create an fsnotify watcher instance and initialize it
watcher, err := NewWatcher()
if err != nil {
t.Fatalf("NewWatcher() failed: %s", err)
}
const testDir string = "_test"
// Create directory to watch
if err := os.Mkdir(testDir, 0777); err != nil {
t.Fatalf(... | explode_data.jsonl/50088 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 685
} | [
2830,
3393,
48300,
21948,
52317,
34667,
44243,
1155,
353,
8840,
836,
8,
341,
197,
322,
4230,
458,
8619,
21948,
55727,
2867,
323,
9468,
432,
198,
6692,
28058,
11,
1848,
1669,
1532,
47248,
741,
743,
1848,
961,
2092,
341,
197,
3244,
30762,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestSafeAddClip(t *testing.T) {
assert.EqualValues(t, math.MaxInt64, safeAddClip(math.MaxInt64, 10))
assert.EqualValues(t, math.MaxInt64, safeAddClip(math.MaxInt64, math.MaxInt64))
assert.EqualValues(t, math.MinInt64, safeAddClip(math.MinInt64, -10))
} | explode_data.jsonl/28323 | {
"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,
25663,
2212,
20935,
1155,
353,
8840,
836,
8,
341,
6948,
12808,
6227,
1155,
11,
6888,
14535,
1072,
21,
19,
11,
6092,
2212,
20935,
37270,
14535,
1072,
21,
19,
11,
220,
16,
15,
1171,
6948,
12808,
6227,
1155,
11,
6888,
14535,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestParseDuration(t *testing.T) {
_, err := parseDuration("12:34:56,1234", ",", 3)
assert.EqualError(t, err, "astisub: Invalid number of millisecond digits detected in 12:34:56,1234")
_, err = parseDuration("12,123", ",", 3)
assert.EqualError(t, err, "astisub: No hours, minutes or seconds detected in 12,123")
... | explode_data.jsonl/13621 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 462
} | [
2830,
3393,
14463,
12945,
1155,
353,
8840,
836,
8,
341,
197,
6878,
1848,
1669,
4715,
12945,
445,
16,
17,
25,
18,
19,
25,
20,
21,
11,
16,
17,
18,
19,
497,
82978,
220,
18,
340,
6948,
12808,
1454,
1155,
11,
1848,
11,
330,
559,
285,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestValidateExternalInitiator(t *testing.T) {
t.Parallel()
store, cleanup := cltest.NewStore(t)
defer cleanup()
url := cltest.WebURL(t, "https://a.web.url")
// Add duplicate
exi := models.ExternalInitiator{
Name: "duplicate",
URL: &url,
}
assert.NoError(t, store.CreateExternalInitiator(&exi))
t... | explode_data.jsonl/75331 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 465
} | [
2830,
3393,
17926,
25913,
3803,
36122,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
57279,
11,
21290,
1669,
1185,
1944,
7121,
6093,
1155,
340,
16867,
21290,
2822,
19320,
1669,
1185,
1944,
6473,
3144,
1155,
11,
330,
2428,
1110,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetVirtualProjectMatch(t *testing.T) {
fixture.EnsureCleanState(t)
err := createAndConfigGlobalProject()
assert.NoError(t, err)
//Create project which matches global project settings
projectName := "proj-" + fixture.Name()
_, err = fixture.RunCli("proj", "create", projectName,
"--description", "Test d... | explode_data.jsonl/58449 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 626
} | [
2830,
3393,
1949,
33026,
7849,
8331,
1155,
353,
8840,
836,
8,
341,
1166,
12735,
22834,
19098,
27529,
1397,
1155,
340,
9859,
1669,
1855,
3036,
2648,
11646,
7849,
741,
6948,
35699,
1155,
11,
1848,
692,
197,
322,
4021,
2390,
892,
9071,
364... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHostPortPodConnectivity(t *testing.T) {
data, err := setupTest(t)
if err != nil {
t.Fatalf("Error when setting up test: %v", err)
}
defer teardownTest(t, data)
data.testHostPortPodConnectivity(t)
} | explode_data.jsonl/49176 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 83
} | [
2830,
3393,
9296,
7084,
23527,
14611,
1927,
1155,
353,
8840,
836,
8,
341,
8924,
11,
1848,
1669,
6505,
2271,
1155,
340,
743,
1848,
961,
2092,
341,
197,
3244,
30762,
445,
1454,
979,
6243,
705,
1273,
25,
1018,
85,
497,
1848,
340,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 2 |
func TestSeveralNFPMsWithTheSameID(t *testing.T) {
var ctx = &context.Context{
Config: config.Project{
NFPMs: []config.NFPM{
{
ID: "a",
},
{
ID: "a",
},
},
},
}
require.EqualError(t, Pipe{}.Default(ctx), "found 2 nfpms with the ID 'a', please fix your config")
} | explode_data.jsonl/21989 | {
"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,
34762,
38067,
8795,
16056,
785,
19198,
915,
1155,
353,
8840,
836,
8,
341,
2405,
5635,
284,
609,
2147,
9328,
515,
197,
66156,
25,
2193,
30944,
515,
298,
18317,
37,
8795,
82,
25,
3056,
1676,
2067,
37,
8795,
515,
571,
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 TestAuthOnlyAllowedGroups(t *testing.T) {
testCases := []struct {
name string
allowedGroups []string
groups []string
querystring string
expectedStatusCode int
}{
{
name: "NoAllowedGroups",
allowedGroups: []string{},
groups: ... | explode_data.jsonl/36427 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1671
} | [
2830,
3393,
5087,
7308,
35382,
22173,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
11609,
2290,
914,
198,
197,
197,
20967,
22173,
414,
3056,
917,
198,
197,
44260,
82,
1797,
3056,
917,
198,
197,
27274,
917,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestClient_azure_special(t *testing.T) {
client, _ := New("https://dev.azure.com", "org", "")
if client != nil {
t.Errorf("Want nil client, got %v", client)
}
client2, _ := New("https://dev.azure.com", "", "proj")
if client2 != nil {
t.Errorf("Want nil client, got %v", client2)
}
} | explode_data.jsonl/82300 | {
"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,
2959,
62,
39495,
41629,
1155,
353,
8840,
836,
8,
341,
25291,
11,
716,
1669,
1532,
445,
2428,
1110,
3583,
70240,
905,
497,
330,
1775,
497,
14676,
743,
2943,
961,
2092,
341,
197,
3244,
13080,
445,
28823,
2092,
2943,
11,
2684... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestUnsupported(t *testing.T) {
b := []byte{0xc0}
{
var v, r uintptr
_, err := msgpack.Marshal(v)
if !strings.Contains(err.Error(), "type(uintptr) is unsupported") {
t.Error("test error", err)
}
err = msgpack.Unmarshal(b, &r)
if !strings.Contains(err.Error(), "type(uintptr) is unsupported") {
t... | explode_data.jsonl/64221 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 594
} | [
2830,
3393,
41884,
1155,
353,
8840,
836,
8,
341,
2233,
1669,
3056,
3782,
90,
15,
8148,
15,
532,
197,
515,
197,
2405,
348,
11,
435,
38190,
198,
197,
197,
6878,
1848,
1669,
3750,
4748,
37271,
3747,
340,
197,
743,
753,
18594,
11545,
39... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestListReviews(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/pulls/15/reviews" {
reviews := []Review{{ID: 1}}
b, err := json.Marsh... | explode_data.jsonl/6272 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 528
} | [
2830,
3393,
852,
45206,
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 TestRecordingDecissionSuccessOnHeaderAdd(t *testing.T) {
tCases := []struct {
contentTypes []string
shouldRecord bool
}{
{[]string{"text/plain"}, false},
{[]string{"application/json"}, true},
{[]string{"application/json", "charset=utf-8"}, true},
{[]string{"application/json; charset=utf-8"}, true},
... | explode_data.jsonl/2386 | {
"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,
52856,
4900,
7558,
7188,
1925,
4047,
2212,
1155,
353,
8840,
836,
8,
341,
3244,
37302,
1669,
3056,
1235,
341,
197,
27751,
4173,
3056,
917,
198,
197,
197,
5445,
6471,
1807,
198,
197,
59403,
197,
197,
90,
1294,
917,
4913,
131... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestFutureEpoch(t *testing.T) {
tf.UnitTest(t)
blockTime := clock.DefaultEpochDuration
genTime := time.Unix(1234567890, 1234567890%int64(time.Second))
fc := clock.NewFake(genTime)
mclock := clock.NewChainClockFromClock(uint64(genTime.Unix()), blockTime, fc)
validator := consensus.NewDefaultBlockValidator(mc... | explode_data.jsonl/31027 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 195
} | [
2830,
3393,
24206,
44338,
1155,
353,
8840,
836,
8,
341,
3244,
69,
25159,
2271,
1155,
692,
47996,
1462,
1669,
8866,
13275,
44338,
12945,
198,
82281,
1462,
1669,
882,
10616,
941,
7,
16,
17,
18,
19,
20,
21,
22,
23,
24,
15,
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... | 1 |
func TestParallelValid(t *testing.T) {
parallelism := 100
numIters := 1000
wg := sync.WaitGroup{}
wg.Add(parallelism)
for i := 0; i < parallelism; i++ {
go func() {
defer wg.Done()
for j := 0; j < numIters; j++ {
tcase := validSQL[rand.Intn(len(validSQL))]
if tcase.output == "" {
tcase.output... | explode_data.jsonl/27179 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 318
} | [
2830,
3393,
16547,
4088,
1155,
353,
8840,
836,
8,
341,
197,
46103,
2142,
1669,
220,
16,
15,
15,
198,
22431,
2132,
388,
1669,
220,
16,
15,
15,
15,
271,
72079,
1669,
12811,
28384,
2808,
16094,
72079,
1904,
31975,
7957,
2142,
340,
2023,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMapProxy_AddIndex(t *testing.T) {
mp2, _ := client.GetMap("mp2")
err := mp2.AddIndex("age", true)
if err != nil {
t.Fatal("addIndex failed")
}
mp2.Clear()
} | explode_data.jsonl/57024 | {
"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,
2227,
16219,
21346,
1552,
1155,
353,
8840,
836,
8,
341,
53230,
17,
11,
716,
1669,
2943,
2234,
2227,
445,
1307,
17,
1138,
9859,
1669,
10490,
17,
1904,
1552,
445,
424,
497,
830,
340,
743,
1848,
961,
2092,
341,
197,
3244,
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
] | 2 |
func TestTimeoutMostImportant(t *testing.T) {
t.Parallel()
ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second)
defer cancel()
ctrl, ctx := gomock.WithContext(ctx, t)
defer ctrl.Finish()
ms := mock_store.NewMockStore(ctrl)
var s store.Store = ms
pod := createPodWithLabel(podNamespace, pod... | explode_data.jsonl/35145 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 339
} | [
2830,
3393,
7636,
13319,
52280,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
20985,
11,
9121,
1669,
2266,
26124,
7636,
5378,
19047,
1507,
220,
16,
77053,
32435,
340,
16867,
9121,
2822,
84381,
11,
5635,
1669,
342,
316,
1176,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetLoadBalancerSourceRanges(t *testing.T) {
checkError := func(v string) {
annotations := make(map[string]string)
annotations[v1.AnnotationLoadBalancerSourceRangesKey] = v
svc := v1.Service{}
svc.Annotations = annotations
_, err := GetLoadBalancerSourceRanges(&svc)
if err == nil {
t.Errorf("Exp... | explode_data.jsonl/23291 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1163
} | [
2830,
3393,
1949,
5879,
93825,
3608,
74902,
1155,
353,
8840,
836,
8,
341,
25157,
1454,
1669,
2915,
3747,
914,
8,
341,
197,
197,
39626,
1669,
1281,
9147,
14032,
30953,
340,
197,
197,
39626,
16529,
16,
93292,
5879,
93825,
3608,
74902,
159... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestHttpParser_censorPasswordPOST(t *testing.T) {
logp.TestingSetup(logp.WithSelectors("http", "httpdetailed"))
http := httpModForTests(nil)
http.hideKeywords = []string{"password"}
http.parserConfig.sendHeaders = true
http.parserConfig.sendAllHeaders = true
data1 :=
"POST /users/login HTTP/1.1\r\n" +
... | explode_data.jsonl/16508 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 343
} | [
2830,
3393,
2905,
6570,
666,
3805,
4876,
2946,
1155,
353,
8840,
836,
8,
341,
6725,
79,
8787,
287,
21821,
12531,
79,
26124,
96995,
445,
1254,
497,
330,
1254,
67,
10111,
28075,
28080,
1669,
1758,
4459,
2461,
18200,
27907,
340,
28080,
1824... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestLang_English_ToMonthString(t *testing.T) {
assert := assert.New(t)
tests := []struct {
input string // 输入值
expected string // 期望值
}{
{"", ""},
{"0", ""},
{"0000-00-00", ""},
{"00:00:00", ""},
{"0000-00-00 00:00:00", ""},
{"2020-01-05", "January"},
{"2020-02-05", "February"},
{"2020-... | explode_data.jsonl/29473 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 367
} | [
2830,
3393,
26223,
2089,
968,
1672,
38346,
11318,
703,
1155,
353,
8840,
836,
8,
341,
6948,
1669,
2060,
7121,
1155,
692,
78216,
1669,
3056,
1235,
341,
197,
22427,
262,
914,
442,
69058,
25511,
198,
197,
42400,
914,
442,
220,
106076,
25511... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPlainGenomeWriter_WriteNetworkNode_writeError(t *testing.T) {
errorWriter := ErrorWriter(1)
wr := plainGenomeWriter{w: bufio.NewWriterSize(&errorWriter, 1)}
err := wr.writeNetworkNode(network.NewNNode(1, network.InputNeuron))
assert.EqualError(t, err, alwaysErrorText)
} | explode_data.jsonl/18933 | {
"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,
26982,
9967,
635,
6492,
31825,
12320,
1955,
9165,
1454,
1155,
353,
8840,
836,
8,
341,
18290,
6492,
1669,
4600,
6492,
7,
16,
340,
6692,
81,
1669,
14396,
9967,
635,
6492,
90,
86,
25,
96917,
7121,
6492,
1695,
2099,
841,
6492,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestHandlerServeCSRFToken(t *testing.T) {
th := Setup(t).InitBasic()
defer th.TearDown()
session := &model.Session{
UserId: th.BasicUser.Id,
CreateAt: model.GetMillis(),
Roles: model.SYSTEM_USER_ROLE_ID,
IsOAuth: false,
}
session.GenerateCSRF()
th.App.SetSessionExpireInDays(session, 1)
sessio... | explode_data.jsonl/11784 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1474
} | [
2830,
3393,
3050,
60421,
6412,
17612,
3323,
1155,
353,
8840,
836,
8,
341,
70479,
1669,
18626,
1155,
568,
3803,
15944,
741,
16867,
270,
836,
682,
4454,
2822,
25054,
1669,
609,
2528,
20674,
515,
197,
197,
13504,
25,
256,
270,
48868,
1474,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCreateOrUpdateIPAllocator(t *testing.T) {
stopCh := make(chan struct{})
defer close(stopCh)
controller := newController(nil)
controller.crdInformerFactory.Start(stopCh)
controller.crdInformerFactory.WaitForCacheSync(stopCh)
ipPool := newExternalIPPool("ipPoolA", "1.1.1.0/30", "", "")
changed := control... | explode_data.jsonl/10260 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 767
} | [
2830,
3393,
4021,
56059,
3298,
42730,
1155,
353,
8840,
836,
8,
341,
62644,
1143,
1669,
1281,
35190,
2036,
37790,
16867,
3265,
60170,
1143,
340,
61615,
1669,
501,
2051,
27907,
340,
61615,
520,
6498,
641,
34527,
4153,
12101,
60170,
1143,
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 TestStatus(t *testing.T) {
RegisterFailHandler(Fail)
junitReporter := reporters.NewJUnitReporter("../../../report/authentication_suite.xml")
RunSpecsWithDefaultAndCustomReporters(t, "pkg/controller/authentication Suite", []Reporter{junitReporter})
} | explode_data.jsonl/79414 | {
"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,
2522,
1155,
353,
8840,
836,
8,
341,
79096,
19524,
3050,
7832,
604,
340,
12428,
3843,
52766,
1669,
19040,
7121,
56248,
52766,
445,
26744,
11736,
90577,
57239,
9028,
1138,
85952,
8327,
16056,
3675,
3036,
10268,
10361,
388,
1155,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func Test_genPodCgroupParentDirWithSystemdDriver(t *testing.T) {
system.SetupCgroupPathFormatter(system.Systemd)
defer system.SetupCgroupPathFormatter(system.Systemd)
tests := []struct {
name string
args *corev1.Pod
want string
}{
{
name: "Guaranteed",
args: &corev1.Pod{
ObjectMeta: metav1.ObjectM... | explode_data.jsonl/22682 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 633
} | [
2830,
3393,
16322,
23527,
34,
4074,
8387,
6184,
2354,
2320,
67,
11349,
1155,
353,
8840,
836,
8,
341,
40293,
39820,
34,
4074,
1820,
14183,
46006,
16620,
67,
340,
16867,
1849,
39820,
34,
4074,
1820,
14183,
46006,
16620,
67,
340,
78216,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
func TestLicense_String(t *testing.T) {
v := License{
Key: String(""),
Name: String(""),
URL: String(""),
SPDXID: String(""),
HTMLURL: String(""),
Featured: Bool(false),
Description: String(""),
Implementation: String(""),
Body: String... | explode_data.jsonl/33257 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 248
} | [
2830,
3393,
9827,
31777,
1155,
353,
8840,
836,
8,
341,
5195,
1669,
1876,
515,
197,
55242,
25,
310,
923,
445,
4461,
197,
21297,
25,
1843,
923,
445,
4461,
197,
79055,
25,
310,
923,
445,
4461,
197,
96174,
16591,
915,
25,
260,
923,
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... | 2 |
func TestSentry(t *testing.T) {
if testing.Short() {
t.SkipNow()
}
client := &http.Client{Timeout: 5 * time.Second, Transport: &http.Transport{
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
}}
testDir, _ := fileutils.FindDir("tests")
t.Run("sentry is disabled, should not receive a report", func(t ... | explode_data.jsonl/47833 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 1485
} | [
2830,
3393,
50,
4085,
1155,
353,
8840,
836,
8,
341,
743,
7497,
55958,
368,
341,
197,
3244,
57776,
7039,
741,
197,
630,
25291,
1669,
609,
1254,
11716,
90,
7636,
25,
220,
20,
353,
882,
32435,
11,
16742,
25,
609,
1254,
87669,
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... | 1 |
func TestAddIfNotPresent(t *testing.T) {
t.Parallel()
flight := newSyncU64set()
if !flight.AddIfNotPresent(10) {
t.Error("could not add the first value")
}
if flight.AddIfNotPresent(10) {
t.Error("value added twice")
}
} | explode_data.jsonl/7434 | {
"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,
2212,
2679,
2623,
21195,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
1166,
4145,
1669,
501,
12154,
52,
21,
19,
746,
741,
743,
753,
38390,
1904,
2679,
2623,
21195,
7,
16,
15,
8,
341,
197,
3244,
6141,
445,
28077,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPostStoreGetPostsCreatedAt(t *testing.T) {
Setup()
createTime := model.GetMillis()
o0 := &model.Post{}
o0.ChannelId = model.NewId()
o0.UserId = model.NewId()
o0.Message = "zz" + model.NewId() + "b"
o0.CreateAt = createTime
o0 = (<-store.Post().Save(o0)).Data.(*model.Post)
o1 := &model.Post{}
o1.Ch... | explode_data.jsonl/55957 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 510
} | [
2830,
3393,
4133,
6093,
1949,
19631,
70387,
1155,
353,
8840,
836,
8,
341,
197,
21821,
2822,
39263,
1462,
1669,
1614,
2234,
17897,
2822,
22229,
15,
1669,
609,
2528,
23442,
16094,
22229,
15,
38716,
764,
284,
1614,
7121,
764,
741,
22229,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestMiddleware(t *testing.T) {
r := New()
r.GET("/foo", func(rw http.ResponseWriter, r *http.Request) {
rw.Write([]byte("bar"))
})
rec := request(t, r, "GET", "/foo")
if rec.Code != http.StatusOK {
t.Errorf("request failed")
}
if rec.Body.String() != "bar" {
t.Errorf("unexpected body")
}
} | explode_data.jsonl/10766 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 130
} | [
2830,
3393,
24684,
1155,
353,
8840,
836,
8,
341,
7000,
1669,
1532,
741,
7000,
17410,
4283,
7975,
497,
2915,
2601,
86,
1758,
37508,
11,
435,
353,
1254,
9659,
8,
341,
197,
7000,
86,
4073,
10556,
3782,
445,
2257,
5455,
197,
8824,
67904,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestGetAllDomains(t *testing.T) {
e, _ := NewEnforcer("examples/rbac_with_domains_model.conf", "examples/rbac_with_domains_policy.csv")
testGetAllDomains(t, e, []string{"domain1", "domain2"})
} | explode_data.jsonl/65638 | {
"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,
1949,
2403,
74713,
1155,
353,
8840,
836,
8,
341,
7727,
11,
716,
1669,
1532,
1702,
82010,
445,
51668,
7382,
55877,
6615,
70199,
5047,
13937,
497,
330,
51668,
7382,
55877,
6615,
70199,
22773,
11219,
5130,
18185,
1949,
2403,
7471... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestShouldSplitIntoEvenStringsOfFour(t *testing.T) {
input := testStringInput
arrayOfStrings := SliceString(input, 4)
assert.Equal(t, len(arrayOfStrings), 3)
assert.Equal(t, "abcd", arrayOfStrings[0])
assert.Equal(t, "efgh", arrayOfStrings[1])
assert.Equal(t, "ijkl", arrayOfStrings[2])
} | explode_data.jsonl/45960 | {
"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,
14996,
20193,
26591,
13159,
20859,
2124,
26972,
1155,
353,
8840,
836,
8,
341,
22427,
1669,
1273,
703,
2505,
271,
11923,
2124,
20859,
1669,
56476,
703,
5384,
11,
220,
19,
692,
6948,
12808,
1155,
11,
2422,
6110,
2124,
20859,
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 TestGetContinuousKlineData(t *testing.T) {
t.Parallel()
_, err := b.GetContinuousKlineData(context.Background(), "BTCUSD", "CURRENT_QUARTER", "1M", 5, time.Time{}, time.Time{})
if err != nil {
t.Error(err)
}
_, err = b.GetContinuousKlineData(context.Background(), "BTCUSD", "CURRENT_QUARTER", "1M", 5, time.U... | explode_data.jsonl/76603 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 169
} | [
2830,
3393,
1949,
94780,
42,
1056,
1043,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
741,
197,
6878,
1848,
1669,
293,
2234,
94780,
42,
1056,
1043,
5378,
19047,
1507,
330,
59118,
26749,
497,
330,
44690,
16332,
2992,
640,
497,
330,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
func TestExecFailureCloseBefore(t *testing.T) {
t.Parallel()
conn := mustConnectString(t, os.Getenv("PGX_TEST_DATABASE"))
closeConn(t, conn)
_, err := conn.Exec(context.Background(), "select 1")
require.Error(t, err)
assert.True(t, pgconn.SafeToRetry(err))
} | explode_data.jsonl/40010 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 104
} | [
2830,
3393,
10216,
17507,
7925,
10227,
1155,
353,
8840,
836,
8,
341,
3244,
41288,
7957,
2822,
32917,
1669,
1969,
14611,
703,
1155,
11,
2643,
64883,
445,
11383,
55,
11641,
45510,
5455,
27873,
9701,
1155,
11,
4534,
692,
197,
6878,
1848,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
func TestMapProxy_TryPutWithNilValue(t *testing.T) {
testKey := "testingKey"
_, err := mp.TryPut(testKey, nil)
AssertErrorNotNil(t, err, "tryPut did not return an error for nil value")
mp.Clear()
} | explode_data.jsonl/56963 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 77
} | [
2830,
3393,
2227,
16219,
1139,
884,
19103,
2354,
19064,
1130,
1155,
353,
8840,
836,
8,
341,
18185,
1592,
1669,
330,
8840,
1592,
698,
197,
6878,
1848,
1669,
10490,
19824,
19103,
8623,
1592,
11,
2092,
340,
18017,
1454,
96144,
1155,
11,
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 |
func TestCastTimeToDate(t *testing.T) {
store, clean := realtikvtest.CreateMockStoreAndSetup(t)
defer clean()
tk := testkit.NewTestKit(t, store)
tk.MustExec("use test")
tk.MustExec("set time_zone = '-8:00'")
date := time.Now().In(time.FixedZone("", -8*int(time.Hour/time.Second)))
tk.MustQuery("select cast(time(... | explode_data.jsonl/5769 | {
"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,
18714,
1462,
76054,
1155,
353,
8840,
836,
8,
341,
57279,
11,
4240,
1669,
1931,
83,
1579,
85,
1944,
7251,
11571,
6093,
3036,
21821,
1155,
340,
16867,
4240,
2822,
3244,
74,
1669,
1273,
8226,
7121,
2271,
7695,
1155,
11,
3553,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestUpdateFields(t *testing.T) {
resetTest()
req, err := http.NewRequest("GET", s.server.URL+"/updatefields", nil)
if err != nil {
t.Fatal(err)
}
var counter, counter2 string
{
resp, err := s.client.Do(req)
if err != nil {
t.Fatal(err)
}
defer resp.Body.Close()
counter = resp.Header.Get("x-cou... | explode_data.jsonl/77625 | {
"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,
4289,
8941,
1155,
353,
8840,
836,
8,
341,
70343,
2271,
741,
24395,
11,
1848,
1669,
1758,
75274,
445,
3806,
497,
274,
12638,
20893,
27569,
2386,
9007,
497,
2092,
340,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
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... | 7 |
func TestAddServerIDV6(t *testing.T) {
req, err := dhcpv6.NewMessage()
if err != nil {
t.Fatal(err)
}
v6ServerID = makeTestDUID("0000000000000000")
req.MessageType = dhcpv6.MessageTypeRebind
dhcpv6.WithClientID(*makeTestDUID("1000000000000000"))(req)
stub, err := dhcpv6.NewReplyFromMessage(req)
if err != ni... | explode_data.jsonl/39208 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 302
} | [
2830,
3393,
2212,
5475,
915,
53,
21,
1155,
353,
8840,
836,
8,
341,
24395,
11,
1848,
1669,
85787,
85,
21,
7121,
2052,
741,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
532,
5195,
21,
5475,
915,
284,
1281,
2271,
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... | 6 |
func TestIncident_ManageAlerts(t *testing.T) {
setup()
defer teardown()
mux.HandleFunc("/incidents/1/alerts/", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "PUT")
_, _ = w.Write([]byte(`{"alerts": [{"id": "1"}]}`))
})
client := defaultTestClient(server.URL, "foo")
incidentID := "1"
inp... | explode_data.jsonl/76404 | {
"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,
39245,
1713,
71628,
424,
9676,
82,
1155,
353,
8840,
836,
8,
341,
84571,
741,
16867,
49304,
2822,
2109,
2200,
63623,
4283,
2840,
6880,
14,
16,
79688,
82,
28105,
2915,
3622,
1758,
37508,
11,
435,
353,
1254,
9659,
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... | 1 |
func TestJson2Struct_map_struct(t *testing.T) {
ret, err := Json2Struct("auto_name", `{"23":{"int": 23, "string": "2323"}, "1": {"int": 23, "string": "2323", "float": 23.2}}`, GoStructType)
fmt.Printf("ret:\n %s, %v\n", ret, err)
} | explode_data.jsonl/72757 | {
"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,
5014,
17,
9422,
5376,
15126,
1155,
353,
8840,
836,
8,
341,
11262,
11,
1848,
1669,
8308,
17,
9422,
445,
3902,
1269,
497,
1565,
4913,
17,
18,
22317,
396,
788,
220,
17,
18,
11,
330,
917,
788,
330,
17,
18,
17,
18,
14345,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCommit(t *testing.T) {
db := openTestConn(t)
defer db.Close()
_, err := db.Exec("CREATE TEMP TABLE temp (a int)")
if err != nil {
t.Fatal(err)
}
sqlInsert := "INSERT INTO temp VALUES (1)"
sqlSelect := "SELECT * FROM temp"
tx, err := db.Begin()
if err != nil {
t.Fatal(err)
}
_, err = tx.Exec(sql... | explode_data.jsonl/63444 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 259
} | [
2830,
3393,
33441,
1155,
353,
8840,
836,
8,
341,
20939,
1669,
1787,
2271,
9701,
1155,
340,
16867,
2927,
10421,
2822,
197,
6878,
1848,
1669,
2927,
30798,
445,
22599,
57431,
14363,
2730,
320,
64,
526,
19107,
743,
1848,
961,
2092,
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... | 7 |
func TestSizeof(t *testing.T) {
const _64bit = unsafe.Sizeof(uintptr(0)) == 8
var tests = []struct {
val interface{} // type as a value
_32bit uintptr // size on 32bit platforms
_64bit uintptr // size on 64bit platforms
}{
{Addr{}, 52, 80},
{LSym{}, 80, 136},
{Prog{}, 196, 288},
}
for _, t... | explode_data.jsonl/3290 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 244
} | [
2830,
3393,
1695,
1055,
1155,
353,
8840,
836,
8,
341,
4777,
716,
21,
19,
4489,
284,
19860,
2465,
1055,
8488,
3505,
7,
15,
593,
621,
220,
23,
271,
2405,
7032,
284,
3056,
1235,
341,
197,
19302,
262,
3749,
6257,
442,
943,
438,
264,
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... | 4 |
func TestDMap_Atomic_Incr(t *testing.T) {
cluster := testcluster.New(NewService)
s := cluster.AddMember(nil).(*Service)
defer cluster.Shutdown()
var wg sync.WaitGroup
var start chan struct{}
key := "incr"
ctx := context.Background()
incr := func(dm *DMap) {
<-start
defer wg.Done()
_, err := dm.Incr(ctx... | explode_data.jsonl/64501 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 344
} | [
2830,
3393,
35,
2227,
55581,
3075,
25972,
5082,
1155,
353,
8840,
836,
8,
341,
197,
18855,
1669,
1273,
18855,
7121,
35063,
1860,
340,
1903,
1669,
10652,
1904,
9366,
27907,
568,
4071,
1860,
340,
16867,
10652,
10849,
18452,
2822,
2405,
63581... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestReferencedBytesStat(t *testing.T) {
//overwrite package variables
smapsFilePathPattern = "testdata/smaps%d"
clearRefsFilePathPattern = "testdata/clear_refs%d"
pids := []int{4, 6, 8}
stat, err := referencedBytesStat(pids, 1, 3)
assert.Nil(t, err)
assert.Equal(t, uint64(416*1024), stat)
clearRefsFiles ... | explode_data.jsonl/43789 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 267
} | [
2830,
3393,
47447,
5767,
7078,
15878,
1155,
353,
8840,
836,
8,
341,
197,
322,
64915,
6328,
7332,
198,
1903,
17640,
19090,
15760,
284,
330,
92425,
2687,
17640,
14841,
698,
40408,
82807,
19090,
15760,
284,
330,
92425,
2899,
1547,
60638,
148... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestCert(t *testing.T) {
mc, err := GlobalCert.GetMITMConfig()
if err != nil {
t.Fatal(err)
}
proxy := martian.NewProxy()
proxy.SetRequestModifier(&Skip{})
proxy.SetMITM(mc)
listener, err := net.Listen("tcp", ":1080")
if err != nil {
t.Fatal(err)
}
err = proxy.Serve(listener)
if err != nil {
t.... | explode_data.jsonl/20570 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 149
} | [
2830,
3393,
36934,
1155,
353,
8840,
836,
8,
341,
97662,
11,
1848,
1669,
7962,
36934,
2234,
18330,
44,
2648,
741,
743,
1848,
961,
2092,
341,
197,
3244,
26133,
3964,
340,
197,
630,
197,
22803,
1669,
48195,
1103,
7121,
16219,
741,
197,
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 TestStalledFrontendCycles(t *testing.T) {
t.Skip()
_, err := StalledFrontendCycles(
func() error { return nil },
)
if err != nil {
t.Fatal(err)
}
} | explode_data.jsonl/33110 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 70
} | [
2830,
3393,
623,
4736,
23395,
408,
34,
15805,
1155,
353,
8840,
836,
8,
341,
3244,
57776,
741,
197,
6878,
1848,
1669,
794,
4736,
23395,
408,
34,
15805,
1006,
197,
29244,
368,
1465,
314,
470,
2092,
1153,
197,
692,
743,
1848,
961,
2092,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
func TestNoImageTargets(t *testing.T) {
f := newIBDFixture(t, k8s.EnvGKE)
defer f.TearDown()
targName := "some-k8s-manifest"
specs := []model.TargetSpec{
k8s.MustTarget(model.TargetName(targName), testyaml.LonelyPodYAML),
}
_, err := f.ibd.BuildAndDeploy(f.ctx, f.st, specs, store.BuildStateSet{})
if err != n... | explode_data.jsonl/38255 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 414
} | [
2830,
3393,
2753,
1906,
49030,
1155,
353,
8840,
836,
8,
341,
1166,
1669,
501,
3256,
5262,
12735,
1155,
11,
595,
23,
82,
81214,
38,
3390,
340,
16867,
282,
836,
682,
4454,
2822,
3244,
858,
675,
1669,
330,
14689,
12646,
23,
82,
20477,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestTerragruntVersionConstraints(t *testing.T) {
testCases := []struct {
name string
terragruntVersion string
terragruntConstraint string
shouldSucceed bool
}{
{
"version meets constraint equal",
"v0.23.18",
"terragrunt_version_constraint = \">= v0.23.18\"",
true,
... | explode_data.jsonl/10174 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 791
} | [
2830,
3393,
51402,
68305,
3850,
5637,
12925,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
1235,
341,
197,
11609,
338,
914,
198,
197,
197,
465,
4101,
81,
3850,
5637,
262,
914,
198,
197,
197,
465,
4101,
81,
3850,
17890,
914,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestPreparedCommand_Output(t *testing.T) {
stdout := shx.RecordStdout()
defer stdout.Release()
stderr := shx.RecordStderr()
defer stderr.Release()
gotOutput, err := shx.Output("go", "run", "echo.go", "hello world")
gotStdout := stdout.Output()
gotStderr := stderr.Output()
if err != nil {
t.Fatal(err)
}... | explode_data.jsonl/57102 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 184
} | [
2830,
3393,
4703,
7212,
4062,
65062,
1155,
353,
8840,
836,
8,
341,
6736,
411,
1669,
557,
87,
49959,
22748,
411,
741,
16867,
20075,
58693,
741,
6736,
615,
1669,
557,
87,
49959,
22748,
615,
741,
16867,
26436,
58693,
2822,
3174,
354,
5097,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 TestAttributes_InsertValue(t *testing.T) {
testCases := []testCase{
// Ensure `attribute1` is set for spans with no attributes.
{
name: "InsertEmptyAttributes",
inputAttributes: map[string]pdata.AttributeValue{},
expectedAttributes: map[string]pdata.AttributeValue{
"attribute1": pdata.... | explode_data.jsonl/11507 | {
"file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl",
"token_count": 508
} | [
2830,
3393,
10516,
76417,
1130,
1155,
353,
8840,
836,
8,
341,
18185,
37302,
1669,
3056,
66194,
515,
197,
197,
322,
29279,
1565,
9116,
16,
63,
374,
738,
369,
44295,
448,
902,
8201,
624,
197,
197,
515,
298,
11609,
25,
310,
330,
13780,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.