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 TestLinkedInProviderOverrides(t *testing.T) { p := NewLinkedInProvider( &ProviderData{ LoginURL: &url.URL{ Scheme: "https", Host: "example.com", Path: "/oauth/auth"}, RedeemURL: &url.URL{ Scheme: "https", Host: "example.com", Path: "/oauth/token"}, ProfileURL: &url.URL{ Scheme: "https", Host: "example.com", Path: "/oauth/profile"}, ValidateURL: &url.URL{ Scheme: "https", Host: "example.com", Path: "/oauth/tokeninfo"}, Scope: "profile"}) assert.NotEqual(t, nil, p) assert.Equal(t, "LinkedIn", p.Data().ProviderName) assert.Equal(t, "https://example.com/oauth/auth", p.Data().LoginURL.String()) assert.Equal(t, "https://example.com/oauth/token", p.Data().RedeemURL.String()) assert.Equal(t, "https://example.com/oauth/profile", p.Data().ProfileURL.String()) assert.Equal(t, "https://example.com/oauth/tokeninfo", p.Data().ValidateURL.String()) assert.Equal(t, "profile", p.Data().Scope) }
explode_data.jsonl/39461
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 439 }
[ 2830, 3393, 75203, 5179, 80010, 1155, 353, 8840, 836, 8, 341, 3223, 1669, 1532, 75203, 5179, 1006, 197, 197, 5, 5179, 1043, 515, 298, 197, 6231, 3144, 25, 609, 1085, 20893, 515, 571, 7568, 8058, 25, 330, 2428, 756, 571, 197, 9296, 25, 256, 330, 8687, 905, 756, 571, 69640, 25, 256, 3521, 34363, 17369, 7115, 298, 197, 6033, 68, 336, 3144, 25, 609, 1085, 20893, 515, 571, 7568, 8058, 25, 330, 2428, 756, 571, 197, 9296, 25, 256, 330, 8687, 905, 756, 571, 69640, 25, 256, 3521, 34363, 54386, 7115, 298, 197, 8526, 3144, 25, 609, 1085, 20893, 515, 571, 7568, 8058, 25, 330, 2428, 756, 571, 197, 9296, 25, 256, 330, 8687, 905, 756, 571, 69640, 25, 256, 3521, 34363, 23580, 7115, 298, 197, 17926, 3144, 25, 609, 1085, 20893, 515, 571, 7568, 8058, 25, 330, 2428, 756, 571, 197, 9296, 25, 256, 330, 8687, 905, 756, 571, 69640, 25, 256, 3521, 34363, 54386, 2733, 7115, 298, 7568, 2417, 25, 330, 5365, 23625, 6948, 15000, 2993, 1155, 11, 2092, 11, 281, 340, 6948, 12808, 1155, 11, 330, 75203, 497, 281, 3336, 1005, 5179, 675, 340, 6948, 12808, 1155, 11, 330, 2428, 1110, 8687, 905, 60703, 17369, 756, 197, 3223, 3336, 1005, 6231, 3144, 6431, 2398, 6948, 12808, 1155, 11, 330, 2428, 1110, 8687, 905, 60703, 54386, 756, 197, 3223, 3336, 1005, 6033, 68, 336, 3144, 6431, 2398, 6948, 12808, 1155, 11, 330, 2428, 1110, 8687, 905, 60703, 23580, 756, 197, 3223, 3336, 1005, 8526, 3144, 6431, 2398, 6948, 12808, 1155, 11, 330, 2428, 1110, 8687, 905, 60703, 54386, 2733, 756, 197, 3223, 3336, 1005, 17926, 3144, 6431, 2398, 6948, 12808, 1155, 11, 330, 5365, 497, 281, 3336, 1005, 10803, 340, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestDLL(t *testing.T) { tests := []struct { name string source string expected int }{ { name: "none", expected: 0, source: ` package main func main() { println("Hello!") } `, }, { name: "for", expected: 1, source: ` package main func main() { for i := 0; i < 5; i++ { defer println("defer") } } `, }, { name: "range", expected: 1, source: ` package main func main() { list := []int{1, 2, 3, 4, 5, 6, 7} for _, x := range list { defer println(x) } } `, }, { name: "nested", expected: 1, source: ` package main func main() { list := []int{1, 2, 3, 4, 5, 6, 7} for _, i := range list { for j := 0; j < i; j++ { defer println(j) } } } `, }, { name: "block", expected: 1, source: ` package main func main() { for i := 0; i < 5; i++ { { defer println("defer") } } } `, }, { name: "if", expected: 1, source: ` package main func main() { for i := 0; i < 5; i++ { if true { defer println("defer") } } } `, }, { name: "funclit", expected: 0, source: ` package main func main() { for i := 0; i < 5; i++ { func() { defer println("defer") }() } } `, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { reports, err := gather(tt.source, false) if err != nil { t.Fatalf("unexpected error: %v", err) } if len(reports) != tt.expected { t.Fatalf("expected %d reports, got %d", tt.expected, len(reports)) } }) } }
explode_data.jsonl/503
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 996 }
[ 2830, 3393, 64187, 1155, 353, 8840, 836, 8, 341, 78216, 1669, 3056, 1235, 341, 197, 11609, 257, 914, 198, 197, 47418, 256, 914, 198, 197, 42400, 526, 198, 197, 59403, 197, 197, 515, 298, 11609, 25, 257, 330, 6697, 756, 298, 42400, 25, 220, 15, 345, 298, 47418, 25, 22074, 571, 197, 1722, 1887, 271, 571, 29244, 1887, 368, 341, 464, 81168, 445, 9707, 22988, 571, 197, 532, 298, 197, 12892, 197, 197, 1583, 197, 197, 515, 298, 11609, 25, 257, 330, 1958, 756, 298, 42400, 25, 220, 16, 345, 298, 47418, 25, 22074, 571, 197, 1722, 1887, 271, 571, 29244, 1887, 368, 341, 464, 2023, 600, 1669, 220, 15, 26, 600, 366, 220, 20, 26, 600, 1027, 341, 1144, 16867, 13751, 445, 62095, 1138, 464, 197, 532, 571, 197, 532, 298, 197, 12892, 197, 197, 1583, 197, 197, 515, 298, 11609, 25, 257, 330, 9669, 756, 298, 42400, 25, 220, 16, 345, 298, 47418, 25, 22074, 571, 197, 1722, 1887, 271, 571, 29244, 1887, 368, 341, 464, 14440, 1669, 3056, 396, 90, 16, 11, 220, 17, 11, 220, 18, 11, 220, 19, 11, 220, 20, 11, 220, 21, 11, 220, 22, 532, 464, 2023, 8358, 856, 1669, 2088, 1140, 341, 1144, 16867, 13751, 2075, 340, 464, 197, 532, 571, 197, 532, 298, 197, 12892, 197, 197, 1583, 197, 197, 515, 298, 11609, 25, 257, 330, 59271, 756, 298, 42400, 25, 220, 16, 345, 298, 47418, 25, 22074, 571, 197, 1722, 1887, 271, 571, 29244, 1887, 368, 341, 464, 14440, 1669, 3056, 396, 90, 16, 11, 220, 17, 11, 220, 18, 11, 220, 19, 11, 220, 20, 11, 220, 21, 11, 220, 22, 532, 464, 2023, 8358, 600, 1669, 2088, 1140, 341, 1144, 2023, 502, 1669, 220, 15, 26, 502, 366, 600, 26, 502, 1027, 341, 1662, 16867, 13751, 3325, 340, 1144, 197, 532, 464, 197, 532, 571, 197, 532, 298, 197, 12892, 197, 197, 1583, 197, 197, 515, 298, 11609, 25, 257, 330, 4574, 756, 298, 42400, 25, 220, 16, 345, 298, 47418, 25, 22074, 571, 197, 1722, 1887, 271, 571, 29244, 1887, 368, 341, 464, 2023, 600, 1669, 220, 15, 26, 600, 366, 220, 20, 26, 600, 1027, 341, 1144, 197, 515, 1662, 16867, 13751, 445, 62095, 1138, 1144, 197, 532, 464, 197, 532, 571, 197, 532, 298, 197, 12892, 197, 197, 1583, 197, 197, 515, 298, 11609, 25, 257, 330, 333, 756, 298, 42400, 25, 220, 16, 345, 298, 47418, 25, 22074, 571, 197, 1722, 1887, 271, 571, 29244, 1887, 368, 341, 464, 2023, 600, 1669, 220, 15, 26, 600, 366, 220, 20, 26, 600, 1027, 341, 1144, 743, 830, 341, 1662, 16867, 13751, 445, 62095, 1138, 1144, 197, 532, 464, 197, 532, 571, 197, 532, 298, 197, 12892, 197, 197, 1583, 197, 197, 515, 298, 11609, 25, 257, 330, 11894, 564, 275, 756, 298, 42400, 25, 220, 15, 345, 298, 47418, 25, 22074, 571, 197, 1722, 1887, 271, 571, 29244, 1887, 368, 341, 464, 2023, 600, 1669, 220, 15, 26, 600, 366, 220, 20, 26, 600, 1027, 341, 1144, 29244, 368, 341, 1662, 16867, 13751, 445, 62095, 1138, 1144, 197, 69826, 464, 197, 532, 571, 197, 532, 298, 197, 12892, 197, 197, 1583, 197, 630, 2023, 8358, 17853, 1669, 2088, 7032, 341, 197, 3244, 16708, 47152, 2644, 11, 2915, 1155, 353, 8840, 836, 8, 341, 298, 17200, 3394, 11, 1848, 1669, 9567, 47152, 14698, 11, 895, 340, 298, 743, 1848, 961, 2092, 341, 571, 3244, 30762, 445, 53859, 1465, 25, 1018, 85, 497, 1848, 340, 298, 197, 532, 298, 743, 2422, 5801, 3394, 8, 961, 17853, 56835, 341, 571, 3244, 30762, 445, 7325, 1018, 67, 6682, 11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1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestGetConfig(t *testing.T) { mockDB, mock, err := sqlmock.New() if err != nil { t.Fatalf("an error '%s' was not expected when opening a stub database connection", err) } defer mockDB.Close() db := sqlx.NewDb(mockDB, "sqlmock") defer db.Close() config := map[string]interface{}{ "name0": "val0", "name1": "val1", } rows := sqlmock.NewRows([]string{"name", "value"}) for name, val := range config { rows = rows.AddRow(name, val) } mock.ExpectQuery("SELECT").WillReturnRows(rows) sqlConfig, err := getConfig(db) if err != nil { t.Errorf("getProfiles expected: nil error, actual: %v", err) } if !reflect.DeepEqual(config, sqlConfig) { t.Errorf("getConfig expected: %+v actual: %+v", config, sqlConfig) } if err := mock.ExpectationsWereMet(); err != nil { t.Errorf("there were unfulfilled expections: %s", err) } }
explode_data.jsonl/31539
{ "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, 2648, 1155, 353, 8840, 836, 8, 341, 77333, 3506, 11, 7860, 11, 1848, 1669, 5704, 16712, 7121, 741, 743, 1848, 961, 2092, 341, 197, 3244, 30762, 445, 276, 1465, 7677, 82, 6, 572, 537, 3601, 979, 8568, 264, 13633, 4625, 3633, 497, 1848, 340, 197, 532, 16867, 7860, 3506, 10421, 2822, 20939, 1669, 5704, 87, 7121, 7994, 30389, 3506, 11, 330, 3544, 16712, 1138, 16867, 2927, 10421, 2822, 25873, 1669, 2415, 14032, 31344, 67066, 197, 197, 31486, 15, 788, 330, 831, 15, 756, 197, 197, 31486, 16, 788, 330, 831, 16, 756, 197, 630, 68438, 1669, 5704, 16712, 7121, 9024, 10556, 917, 4913, 606, 497, 330, 957, 23625, 2023, 829, 11, 1044, 1669, 2088, 2193, 341, 197, 68438, 284, 6978, 1904, 3102, 3153, 11, 1044, 340, 197, 630, 77333, 81893, 2859, 445, 4858, 1827, 9945, 5598, 9024, 31911, 692, 30633, 2648, 11, 1848, 1669, 66763, 9791, 340, 743, 1848, 961, 2092, 341, 197, 3244, 13080, 445, 455, 62719, 3601, 25, 2092, 1465, 11, 5042, 25, 1018, 85, 497, 1848, 340, 197, 630, 743, 753, 34913, 94750, 8754, 11, 5704, 2648, 8, 341, 197, 3244, 13080, 445, 52536, 3601, 25, 68524, 85, 5042, 25, 68524, 85, 497, 2193, 11, 5704, 2648, 340, 197, 630, 743, 1848, 1669, 7860, 81893, 804, 88453, 34673, 2129, 1848, 961, 2092, 341, 197, 3244, 13080, 445, 18532, 1033, 650, 1262, 27511, 505, 48713, 25, 1018, 82, 497, 1848, 340, 197, 532, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestUserStoreGetByEmail(t *testing.T) { Setup() teamid := model.NewId() u1 := &model.User{} u1.Email = model.NewId() Must(store.User().Save(u1)) Must(store.Team().SaveMember(&model.TeamMember{TeamId: teamid, UserId: u1.Id})) if err := (<-store.User().GetByEmail(u1.Email)).Err; err != nil { t.Fatal(err) } if err := (<-store.User().GetByEmail("")).Err; err == nil { t.Fatal("Should have failed because of missing email") } }
explode_data.jsonl/5098
{ "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, 1474, 6093, 1949, 87197, 1155, 353, 8840, 836, 8, 341, 197, 21821, 2822, 197, 9196, 307, 1669, 1614, 7121, 764, 2822, 10676, 16, 1669, 609, 2528, 7344, 16094, 10676, 16, 24066, 284, 1614, 7121, 764, 741, 9209, 590, 31200, 7344, 1005, 8784, 8154, 16, 1171, 9209, 590, 31200, 65842, 1005, 8784, 9366, 2099, 2528, 65842, 9366, 90, 14597, 764, 25, 2083, 307, 11, 40883, 25, 575, 16, 6444, 93596, 743, 1848, 1669, 22438, 12, 4314, 7344, 1005, 1949, 87197, 8154, 16, 24066, 4579, 7747, 26, 1848, 961, 2092, 341, 197, 3244, 26133, 3964, 340, 197, 630, 743, 1848, 1669, 22438, 12, 4314, 7344, 1005, 1949, 87197, 445, 15197, 7747, 26, 1848, 621, 2092, 341, 197, 3244, 26133, 445, 14996, 614, 4641, 1576, 315, 7402, 2551, 1138, 197, 532, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestExtractErrorCounts(t *testing.T) { require.Equal( t, []statusErrorCount{ statusErrorCount{"tank", "UNAVAIL", 0, 0, 0}, statusErrorCount{"c1t0d0", "ONLINE", 0, 0, 0}, statusErrorCount{"c1t1d0", "UNAVAIL", 4, 1, 0}, }, extractErrorCounts(sampleStatusErrorOutput), ) }
explode_data.jsonl/18993
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 132 }
[ 2830, 3393, 28959, 1454, 63731, 1155, 353, 8840, 836, 8, 341, 17957, 12808, 1006, 197, 3244, 345, 197, 197, 1294, 2829, 1454, 2507, 515, 298, 23847, 1454, 2507, 4913, 85171, 497, 330, 1861, 8093, 5965, 497, 220, 15, 11, 220, 15, 11, 220, 15, 1583, 298, 23847, 1454, 2507, 4913, 66, 16, 83, 15, 67, 15, 497, 330, 711, 8265, 497, 220, 15, 11, 220, 15, 11, 220, 15, 1583, 298, 23847, 1454, 2507, 4913, 66, 16, 83, 16, 67, 15, 497, 330, 1861, 8093, 5965, 497, 220, 19, 11, 220, 16, 11, 220, 15, 1583, 197, 197, 1583, 197, 8122, 2144, 1454, 63731, 32968, 2522, 1454, 5097, 1326, 197, 340, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestValidateServerHooks_ValidInput(t *testing.T) { var tests = []struct { name string hooksInput map[string][]models.Hook }{ {"One hook, one script", map[string][]models.Hook{"ApplicationStop": { { Location: "script-location", Timeout: "10", Runas: "user-name", }, }}, }, {"One hook, multiple scripts", map[string][]models.Hook{"ApplicationStop": { { Location: "script-location", Timeout: "10", Runas: "user-name", }, { Location: "script-location", Timeout: "10", Runas: "user-name", }, }}, }, {"Multiple hooks, multiple scripts", map[string][]models.Hook{"ApplicationStop": { { Location: "script-location", Timeout: "10", Runas: "user-name", }, { Location: "script-location", Timeout: "10", Runas: "user-name", }, }, "BeforeInstall": { { Location: "script-location", Timeout: "10", Runas: "user-name", }, }}, }, } for _, test := range tests { output := validateServerHooks(test.hooksInput) if output != true { t.Errorf("The validateServerHooks function failed for: %v", test) } } }
explode_data.jsonl/71210
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 583 }
[ 2830, 3393, 17926, 5475, 67769, 97279, 2505, 1155, 353, 8840, 836, 8, 341, 2405, 7032, 284, 3056, 1235, 341, 197, 11609, 981, 914, 198, 197, 9598, 14685, 2505, 2415, 14032, 45725, 6507, 3839, 1941, 198, 197, 59403, 197, 197, 4913, 3966, 9704, 11, 825, 5316, 756, 298, 19567, 14032, 45725, 6507, 3839, 1941, 4913, 4988, 10674, 788, 341, 571, 197, 515, 464, 197, 4707, 25, 330, 2282, 60870, 756, 464, 197, 7636, 25, 220, 330, 16, 15, 756, 464, 85952, 300, 25, 262, 330, 872, 11494, 756, 571, 197, 1583, 298, 197, 22050, 197, 197, 1583, 197, 197, 4913, 3966, 9704, 11, 5248, 19502, 756, 298, 19567, 14032, 45725, 6507, 3839, 1941, 4913, 4988, 10674, 788, 341, 571, 197, 515, 464, 197, 4707, 25, 330, 2282, 60870, 756, 464, 197, 7636, 25, 220, 330, 16, 15, 756, 464, 85952, 300, 25, 262, 330, 872, 11494, 756, 571, 197, 1583, 571, 197, 515, 464, 197, 4707, 25, 330, 2282, 60870, 756, 464, 197, 7636, 25, 220, 330, 16, 15, 756, 464, 85952, 300, 25, 262, 330, 872, 11494, 756, 571, 197, 1583, 298, 197, 22050, 197, 197, 1583, 197, 197, 4913, 32089, 29677, 11, 5248, 19502, 756, 298, 19567, 14032, 45725, 6507, 3839, 1941, 4913, 4988, 10674, 788, 341, 571, 197, 515, 464, 197, 4707, 25, 330, 2282, 60870, 756, 464, 197, 7636, 25, 220, 330, 16, 15, 756, 464, 85952, 300, 25, 262, 330, 872, 11494, 756, 571, 197, 1583, 571, 197, 515, 464, 197, 4707, 25, 330, 2282, 60870, 756, 464, 197, 7636, 25, 220, 330, 16, 15, 756, 464, 85952, 300, 25, 262, 330, 872, 11494, 756, 571, 197, 1583, 298, 197, 1583, 571, 197, 1, 10227, 24690, 788, 341, 464, 197, 515, 1144, 197, 4707, 25, 330, 2282, 60870, 756, 1144, 197, 7636, 25, 220, 330, 16, 15, 756, 1144, 85952, 300, 25, 262, 330, 872, 11494, 756, 464, 197, 1583, 571, 197, 22050, 197, 197, 1583, 197, 630, 2023, 8358, 1273, 1669, 2088, 7032, 341, 197, 21170, 1669, 9593, 5475, 67769, 8623, 860, 14685, 2505, 340, 197, 743, 2550, 961, 830, 341, 298, 3244, 13080, 445, 785, 9593, 5475, 67769, 729, 4641, 369, 25, 1018, 85, 497, 1273, 340, 197, 197, 532, 197, 532, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestParseImageStreamImageName(t *testing.T) { tests := map[string]struct { input string expectedRepo string expectedId string expectError bool }{ "empty string": { input: "", expectError: true, }, "one part": { input: "a", expectError: true, }, "more than 2 parts": { input: "a@b@c", expectError: true, }, "empty name part": { input: "@id", expectError: true, }, "empty id part": { input: "name@", expectError: true, }, "valid input": { input: "repo@id", expectedRepo: "repo", expectedId: "id", expectError: false, }, } for name, test := range tests { repo, id, err := ParseImageStreamImageName(test.input) didError := err != nil if e, a := test.expectError, didError; e != a { t.Errorf("%s: expected error=%t, got=%t: %s", name, e, a, err) continue } if test.expectError { continue } if e, a := test.expectedRepo, repo; e != a { t.Errorf("%s: repo: expected %q, got %q", name, e, a) continue } if e, a := test.expectedId, id; e != a { t.Errorf("%s: id: expected %q, got %q", name, e, a) continue } } }
explode_data.jsonl/40823
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 567 }
[ 2830, 3393, 14463, 1906, 3027, 1906, 675, 1155, 353, 8840, 836, 8, 341, 78216, 1669, 2415, 14032, 60, 1235, 341, 197, 22427, 286, 914, 198, 197, 42400, 25243, 914, 198, 197, 42400, 764, 256, 914, 198, 197, 24952, 1454, 220, 1807, 198, 197, 59403, 197, 197, 1, 3194, 914, 788, 341, 298, 22427, 25, 981, 8324, 298, 24952, 1454, 25, 830, 345, 197, 197, 1583, 197, 197, 1, 603, 949, 788, 341, 298, 22427, 25, 981, 330, 64, 756, 298, 24952, 1454, 25, 830, 345, 197, 197, 1583, 197, 197, 1, 6384, 1091, 220, 17, 5479, 788, 341, 298, 22427, 25, 981, 330, 64, 31, 65, 89916, 756, 298, 24952, 1454, 25, 830, 345, 197, 197, 1583, 197, 197, 1, 3194, 829, 949, 788, 341, 298, 22427, 25, 981, 8428, 307, 756, 298, 24952, 1454, 25, 830, 345, 197, 197, 1583, 197, 197, 1, 3194, 877, 949, 788, 341, 298, 22427, 25, 981, 330, 606, 31, 756, 298, 24952, 1454, 25, 830, 345, 197, 197, 1583, 197, 197, 1, 1891, 1946, 788, 341, 298, 22427, 25, 286, 330, 23476, 31, 307, 756, 298, 42400, 25243, 25, 330, 23476, 756, 298, 42400, 764, 25, 256, 330, 307, 756, 298, 24952, 1454, 25, 220, 895, 345, 197, 197, 1583, 197, 630, 2023, 829, 11, 1273, 1669, 2088, 7032, 341, 197, 17200, 5368, 11, 877, 11, 1848, 1669, 14775, 1906, 3027, 1906, 675, 8623, 10046, 340, 197, 2698, 307, 1454, 1669, 1848, 961, 2092, 198, 197, 743, 384, 11, 264, 1669, 1273, 25952, 1454, 11, 1521, 1454, 26, 384, 961, 264, 341, 298, 3244, 13080, 4430, 82, 25, 3601, 1465, 7846, 83, 11, 2684, 7846, 83, 25, 1018, 82, 497, 829, 11, 384, 11, 264, 11, 1848, 340, 298, 11664, 198, 197, 197, 532, 197, 743, 1273, 25952, 1454, 341, 298, 11664, 198, 197, 197, 532, 197, 743, 384, 11, 264, 1669, 1273, 56835, 25243, 11, 15867, 26, 384, 961, 264, 341, 298, 3244, 13080, 4430, 82, 25, 15867, 25, 3601, 1018, 80, 11, 2684, 1018, 80, 497, 829, 11, 384, 11, 264, 340, 298, 11664, 198, 197, 197, 532, 197, 743, 384, 11, 264, 1669, 1273, 56835, 764, 11, 877, 26, 384, 961, 264, 341, 298, 3244, 13080, 4430, 82, 25, 877, 25, 3601, 1018, 80, 11, 2684, 1018, 80, 497, 829, 11, 384, 11, 264, 340, 298, 11664, 198, 197, 197, 532, 197, 532, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestDefragOutputExhaustion(t *testing.T) { if testing.Short() || !build.VLONG { t.SkipNow() } t.Parallel() wt, err := createWalletTester(t.Name(), modules.ProdDependencies) if err != nil { t.Fatal(err) } defer func() { if err := wt.closeWt(); err != nil { t.Fatal(err) } }() wt.wallet.mu.Lock() var dest types.UnlockHash for k := range wt.wallet.keys { dest = k break } wt.wallet.mu.Unlock() _, err = wt.miner.AddBlock() if err != nil { t.Fatal(err) } // concurrently make a bunch of transactions with lots of outputs to keep the // defragger running closechan := make(chan struct{}) donechan := make(chan struct{}) go func() { defer close(donechan) for { select { case <-closechan: return case <-time.After(time.Millisecond * 100): _, err := wt.miner.AddBlock() if err != nil { t.Error(err) return } txnValue := types.SiacoinPrecision.Mul64(3000) fee := types.SiacoinPrecision.Mul64(10) numOutputs := defragThreshold + 1 tbuilder, err := wt.wallet.StartTransaction() if err != nil { t.Error(err) return } tbuilder.FundSiacoins(txnValue.Mul64(uint64(numOutputs)).Add(fee)) for i := 0; i < numOutputs; i++ { tbuilder.AddSiacoinOutput(types.SiacoinOutput{ Value: txnValue, UnlockHash: dest, }) } tbuilder.AddMinerFee(fee) txns, err := tbuilder.Sign(true) if err != nil { t.Error("Error signing fragmenting transaction:", err) } err = wt.tpool.AcceptTransactionSet(txns) if err != nil { t.Error("Error accepting fragmenting transaction:", err) } _, err = wt.miner.AddBlock() if err != nil { t.Error(err) return } } } }() time.Sleep(time.Second * 1) // ensure we can still send transactions while receiving aggressively // fragmented outputs for i := 0; i < 30; i++ { sendAmount := types.SiacoinPrecision.Mul64(2000) _, err = wt.wallet.SendSiacoins(sendAmount, types.UnlockHash{}) if err != nil { t.Errorf("%v: %v", i, err) } time.Sleep(time.Millisecond * 50) } close(closechan) <-donechan }
explode_data.jsonl/64329
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 957 }
[ 2830, 3393, 2620, 4101, 5097, 840, 15074, 290, 1155, 353, 8840, 836, 8, 341, 743, 7497, 55958, 368, 1369, 753, 5834, 5058, 51306, 341, 197, 3244, 57776, 7039, 741, 197, 532, 3244, 41288, 7957, 741, 6692, 83, 11, 1848, 1669, 1855, 38259, 58699, 1155, 2967, 1507, 13454, 7763, 67, 48303, 340, 743, 1848, 961, 2092, 341, 197, 3244, 26133, 3964, 340, 197, 532, 16867, 2915, 368, 341, 197, 743, 1848, 1669, 40473, 4653, 54, 83, 2129, 1848, 961, 2092, 341, 298, 3244, 26133, 3964, 340, 197, 197, 532, 197, 66816, 6692, 83, 59211, 48830, 31403, 741, 2405, 3201, 4494, 39188, 6370, 198, 2023, 595, 1669, 2088, 40473, 59211, 9123, 341, 197, 49616, 284, 595, 198, 197, 3388, 198, 197, 532, 6692, 83, 59211, 48830, 39188, 2822, 197, 6878, 1848, 284, 40473, 4358, 261, 1904, 4713, 741, 743, 1848, 961, 2092, 341, 197, 3244, 26133, 3964, 340, 197, 630, 197, 322, 78026, 1281, 264, 15493, 315, 14131, 448, 10077, 315, 16275, 311, 2506, 279, 198, 197, 322, 707, 4101, 1389, 4303, 198, 27873, 5658, 1669, 1281, 35190, 2036, 37790, 40495, 5658, 1669, 1281, 35190, 2036, 37790, 30680, 2915, 368, 341, 197, 16867, 3265, 34232, 5658, 340, 197, 2023, 341, 298, 38010, 341, 298, 2722, 9119, 5552, 5658, 510, 571, 853, 198, 298, 2722, 9119, 1678, 36892, 9730, 71482, 353, 220, 16, 15, 15, 982, 571, 197, 6878, 1848, 1669, 40473, 4358, 261, 1904, 4713, 741, 571, 743, 1848, 961, 2092, 341, 464, 3244, 6141, 3964, 340, 464, 853, 198, 571, 197, 532, 571, 3244, 42967, 1130, 1669, 4494, 808, 17569, 1961, 55501, 1321, 360, 21, 19, 7, 18, 15, 15, 15, 340, 571, 1166, 2127, 1669, 4494, 808, 17569, 1961, 55501, 1321, 360, 21, 19, 7, 16, 15, 340, 571, 22431, 61438, 1669, 707, 4101, 37841, 488, 220, 16, 271, 571, 3244, 17850, 11, 1848, 1669, 40473, 59211, 12101, 8070, 741, 571, 743, 1848, 961, 2092, 341, 464, 3244, 6141, 3964, 340, 464, 853, 198, 571, 197, 630, 571, 3244, 17850, 991, 1241, 21999, 16428, 1330, 27301, 77, 1130, 1321, 360, 21, 19, 8488, 21, 19, 8068, 61438, 4579, 2212, 955, 2127, 4390, 571, 2023, 600, 1669, 220, 15, 26, 600, 366, 1629, 61438, 26, 600, 1027, 341, 464, 3244, 17850, 1904, 50, 17569, 1961, 5097, 52613, 808, 17569, 1961, 5097, 515, 1144, 47399, 25, 414, 49721, 1130, 345, 1144, 197, 49679, 6370, 25, 3201, 345, 464, 197, 3518, 571, 197, 630, 571, 3244, 17850, 1904, 6217, 261, 41941, 955, 2127, 692, 571, 46237, 4412, 11, 1848, 1669, 16363, 2511, 41152, 3715, 340, 571, 743, 1848, 961, 2092, 341, 464, 3244, 6141, 445, 1454, 15971, 12289, 287, 7745, 12147, 1848, 340, 571, 197, 532, 571, 9859, 284, 40473, 734, 10285, 52265, 8070, 1649, 27301, 4412, 340, 571, 743, 1848, 961, 2092, 341, 464, 3244, 6141, 445, 1454, 24667, 12289, 287, 7745, 12147, 1848, 340, 571, 197, 532, 571, 197, 6878, 1848, 284, 40473, 4358, 261, 1904, 4713, 741, 571, 743, 1848, 961, 2092, 341, 464, 3244, 6141, 3964, 340, 464, 853, 198, 571, 197, 532, 298, 197, 532, 197, 197, 532, 197, 66816, 21957, 31586, 9730, 32435, 353, 220, 16, 692, 197, 322, 5978, 582, 646, 2058, 3624, 14131, 1393, 12308, 48039, 198, 197, 322, 86095, 16275, 198, 2023, 600, 1669, 220, 15, 26, 600, 366, 220, 18, 15, 26, 600, 1027, 341, 197, 32817, 10093, 1669, 4494, 808, 17569, 1961, 55501, 1321, 360, 21, 19, 7, 17, 15, 15, 15, 340, 197, 197, 6878, 1848, 284, 40473, 59211, 20176, 21999, 16428, 1330, 47617, 10093, 11, 4494, 39188, 6370, 37790, 197, 743, 1848, 961, 2092, 341, 298, 3244, 13080, 4430, 85, 25, 1018, 85, 497, 600, 11, 1848, 340, 197, 197, 532, 197, 21957, 31586, 9730, 71482, 353, 220, 20, 15, 340, 197, 630, 27873, 68890, 5658, 340, 197, 45342, 10438, 5658, 198, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_connectionDetails(t *testing.T) { type args struct { kube client.Client connDetails []v1beta1.ConnectionDetail relName string relNamespace string } type want struct { out managed.ConnectionDetails err error } cases := map[string]struct { args want }{ "Fail_NotPartOfRelease": { args: args{ kube: &test.MockClient{ MockGet: func(ctx context.Context, key client.ObjectKey, obj runtime.Object) error { if o, ok := obj.(*unstructured.Unstructured); o.GetKind() == "Secret" && ok && key.Name == testSecretName && key.Namespace == testNamespace { *obj.(*unstructured.Unstructured) = unstructured.Unstructured{ Object: map[string]interface{}{ "data": map[string]interface{}{ "db-password": "MTIzNDU=", }, }, } } return nil }, }, connDetails: []v1beta1.ConnectionDetail{ { ObjectReference: corev1.ObjectReference{ Kind: "Secret", Namespace: testNamespace, Name: testSecretName, APIVersion: "v1", FieldPath: "data.db-password", }, ToConnectionSecretKey: "password", }, }, relName: testReleaseName, relNamespace: testNamespace, }, want: want{ out: managed.ConnectionDetails{}, err: errors.Errorf(errObjectNotPartOfRelease, corev1.ObjectReference{ Kind: "Secret", Namespace: testNamespace, Name: testSecretName, APIVersion: "v1", FieldPath: "data.db-password", }), }, }, "Success_PartOfRelease": { args: args{ kube: &test.MockClient{ MockGet: func(ctx context.Context, key client.ObjectKey, obj runtime.Object) error { if o, ok := obj.(*unstructured.Unstructured); o.GetKind() == "Secret" && ok && key.Name == testSecretName && key.Namespace == testNamespace { *obj.(*unstructured.Unstructured) = unstructured.Unstructured{ Object: map[string]interface{}{ "metadata": map[string]interface{}{ "annotations": map[string]interface{}{ helmReleaseNameAnnotation: testReleaseName, helmReleaseNamespaceAnnotation: testNamespace, }, }, "data": map[string]interface{}{ "db-password": "MTIzNDU=", }, }, } } return nil }, }, connDetails: []v1beta1.ConnectionDetail{ { ObjectReference: corev1.ObjectReference{ Kind: "Secret", Namespace: testNamespace, Name: testSecretName, APIVersion: "v1", FieldPath: "data.db-password", }, ToConnectionSecretKey: "password", }, }, relName: testReleaseName, relNamespace: testNamespace, }, want: want{ out: managed.ConnectionDetails{ "password": []byte("12345"), }, }, }, } for name, tc := range cases { t.Run(name, func(t *testing.T) { got, gotErr := connectionDetails(context.Background(), tc.args.kube, tc.args.connDetails, tc.args.relName, tc.args.relNamespace) if diff := cmp.Diff(tc.want.err, gotErr, test.EquateErrors()); diff != "" { t.Fatalf("connectionDetails(...): -want error, +got error: %s", diff) } if diff := cmp.Diff(tc.want.out, got); diff != "" { t.Errorf("connectionDetails(...): -want result, +got result: %s", diff) } }) } }
explode_data.jsonl/21511
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 1572 }
[ 2830, 3393, 15866, 7799, 1155, 353, 8840, 836, 8, 341, 13158, 2827, 2036, 341, 197, 16463, 3760, 260, 2943, 11716, 198, 197, 32917, 7799, 220, 3056, 85, 16, 19127, 16, 17463, 10649, 198, 197, 197, 3748, 675, 414, 914, 198, 197, 197, 3748, 22699, 914, 198, 197, 532, 13158, 1366, 2036, 341, 197, 13967, 8975, 17463, 7799, 198, 197, 9859, 1465, 198, 197, 532, 1444, 2264, 1669, 2415, 14032, 60, 1235, 341, 197, 31215, 198, 197, 50780, 198, 197, 59403, 197, 197, 1, 19524, 60816, 5800, 2124, 16077, 788, 341, 298, 31215, 25, 2827, 515, 571, 16463, 3760, 25, 609, 1944, 24664, 2959, 515, 464, 9209, 1176, 1949, 25, 2915, 7502, 2266, 9328, 11, 1376, 2943, 8348, 1592, 11, 2839, 15592, 8348, 8, 1465, 341, 1144, 743, 297, 11, 5394, 1669, 2839, 41399, 359, 51143, 10616, 51143, 1215, 297, 2234, 10629, 368, 621, 330, 19773, 1, 1009, 5394, 1009, 1376, 2967, 621, 1273, 19773, 675, 1009, 1376, 46011, 621, 1273, 22699, 341, 1662, 197, 9, 2295, 41399, 359, 51143, 10616, 51143, 8, 284, 650, 51143, 10616, 51143, 515, 2683, 23816, 25, 2415, 14032, 31344, 67066, 2187, 197, 97115, 788, 2415, 14032, 31344, 67066, 5401, 197, 1, 1999, 33069, 788, 330, 8505, 40, 89, 8065, 52, 428, 345, 2187, 197, 1583, 2683, 197, 1583, 1662, 197, 532, 1144, 197, 532, 1144, 853, 2092, 198, 464, 197, 1583, 571, 197, 1583, 571, 32917, 7799, 25, 3056, 85, 16, 19127, 16, 17463, 10649, 515, 464, 197, 515, 1144, 23816, 8856, 25, 6200, 85, 16, 8348, 8856, 515, 1662, 197, 10629, 25, 981, 330, 19773, 756, 1662, 90823, 25, 220, 1273, 22699, 345, 1662, 21297, 25, 981, 1273, 19773, 675, 345, 1662, 197, 7082, 5637, 25, 330, 85, 16, 756, 1662, 94478, 1820, 25, 220, 330, 691, 7076, 33069, 756, 1144, 197, 1583, 1144, 197, 1249, 4526, 19773, 1592, 25, 330, 3833, 756, 464, 197, 1583, 571, 197, 1583, 571, 197, 3748, 675, 25, 414, 1273, 16077, 675, 345, 571, 197, 3748, 22699, 25, 1273, 22699, 345, 298, 197, 1583, 298, 50780, 25, 1366, 515, 571, 13967, 25, 8975, 17463, 7799, 38837, 571, 9859, 25, 5975, 13080, 3964, 1190, 2623, 5800, 2124, 16077, 11, 6200, 85, 16, 8348, 8856, 515, 464, 197, 10629, 25, 981, 330, 19773, 756, 464, 90823, 25, 220, 1273, 22699, 345, 464, 21297, 25, 981, 1273, 19773, 675, 345, 464, 197, 7082, 5637, 25, 330, 85, 16, 756, 464, 94478, 1820, 25, 220, 330, 691, 7076, 33069, 756, 571, 197, 30793, 298, 197, 1583, 197, 197, 1583, 197, 197, 1, 7188, 97938, 2124, 16077, 788, 341, 298, 31215, 25, 2827, 515, 571, 16463, 3760, 25, 609, 1944, 24664, 2959, 515, 464, 9209, 1176, 1949, 25, 2915, 7502, 2266, 9328, 11, 1376, 2943, 8348, 1592, 11, 2839, 15592, 8348, 8, 1465, 341, 1144, 743, 297, 11, 5394, 1669, 2839, 41399, 359, 51143, 10616, 51143, 1215, 297, 2234, 10629, 368, 621, 330, 19773, 1, 1009, 5394, 1009, 1376, 2967, 621, 1273, 19773, 675, 1009, 1376, 46011, 621, 1273, 22699, 341, 1662, 197, 9, 2295, 41399, 359, 51143, 10616, 51143, 8, 284, 650, 51143, 10616, 51143, 515, 2683, 23816, 25, 2415, 14032, 31344, 67066, 2187, 197, 1, 17637, 788, 2415, 14032, 31344, 67066, 5401, 197, 1, 39626, 788, 2415, 14032, 31344, 67066, 7451, 9598, 23162, 16077, 675, 19711, 25, 414, 1273, 16077, 675, 345, 7451, 9598, 23162, 16077, 22699, 19711, 25, 1273, 22699, 345, 5401, 197, 1583, 2187, 197, 1583, 2187, 197, 97115, 788, 2415, 14032, 31344, 67066, 5401, 197, 1, 1999, 33069, 788, 330, 8505, 40, 89, 8065, 52, 428, 345, 2187, 197, 1583, 2683, 197, 1583, 1662, 197, 532, 1144, 197, 532, 1144, 853, 2092, 198, 464, 197, 1583, 571, 197, 1583, 571, 32917, 7799, 25, 3056, 85, 16, 19127, 16, 17463, 10649, 515, 464, 197, 515, 1144, 23816, 8856, 25, 6200, 85, 16, 8348, 8856, 515, 1662, 197, 10629, 25, 981, 330, 19773, 756, 1662, 90823, 25, 220, 1273, 22699, 345, 1662, 21297, 25, 981, 1273, 19773, 675, 345, 1662, 197, 7082, 5637, 25, 330, 85, 16, 756, 1662, 94478, 1820, 25, 220, 330, 691, 7076, 33069, 756, 1144, 197, 1583, 1144, 197, 1249, 4526, 19773, 1592, 25, 330, 3833, 756, 464, 197, 1583, 571, 197, 1583, 571, 197, 3748, 675, 25, 414, 1273, 16077, 675, 345, 571, 197, 3748, 22699, 25, 1273, 22699, 345, 298, 197, 1583, 298, 50780, 25, 1366, 515, 571, 13967, 25, 8975, 17463, 7799, 515, 464, 197, 1, 3833, 788, 3056, 3782, 445, 16, 17, 18, 19, 20, 4461, 571, 197, 1583, 298, 197, 1583, 197, 197, 1583, 197, 532, 2023, 829, 11, 17130, 1669, 2088, 5048, 341, 197, 3244, 16708, 3153, 11, 2915, 1155, 353, 8840, 836, 8, 341, 298, 3174, 354, 11, 2684, 7747, 1669, 3633, 7799, 5378, 19047, 1507, 17130, 16365, 5202, 3760, 11, 17130, 16365, 22810, 7799, 11, 17130, 16365, 34124, 675, 11, 17130, 16365, 34124, 22699, 340, 298, 743, 3638, 1669, 26089, 98063, 44415, 70212, 18441, 11, 2684, 7747, 11, 1273, 5142, 19137, 13877, 13426, 3638, 961, 1591, 341, 571, 3244, 30762, 445, 7742, 7799, 18850, 1648, 481, 52657, 1465, 11, 488, 22390, 1465, 25, 1018, 82, 497, 3638, 340, 298, 197, 532, 298, 743, 3638, 1669, 26089, 98063, 44415, 70212, 2532, 11, 2684, 1215, 3638, 961, 1591, 341, 571, 3244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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestGetPodDetails(t *testing.T) { // POD_NAME & POD_NAMESPACE not exist os.Setenv("POD_NAME", "") os.Setenv("POD_NAMESPACE", "") _, err1 := GetPodDetails(testclient.NewSimpleClientset()) if err1 == nil { t.Errorf("expected an error but returned nil") } // POD_NAME not exist os.Setenv("POD_NAME", "") os.Setenv("POD_NAMESPACE", apiv1.NamespaceDefault) _, err2 := GetPodDetails(testclient.NewSimpleClientset()) if err2 == nil { t.Errorf("expected an error but returned nil") } // POD_NAMESPACE not exist os.Setenv("POD_NAME", "testpod") os.Setenv("POD_NAMESPACE", "") _, err3 := GetPodDetails(testclient.NewSimpleClientset()) if err3 == nil { t.Errorf("expected an error but returned nil") } // POD not exist os.Setenv("POD_NAME", "testpod") os.Setenv("POD_NAMESPACE", apiv1.NamespaceDefault) _, err4 := GetPodDetails(testclient.NewSimpleClientset()) if err4 == nil { t.Errorf("expected an error but returned nil") } // success to get PodInfo fkClient := testclient.NewSimpleClientset( &apiv1.PodList{Items: []apiv1.Pod{{ ObjectMeta: metav1.ObjectMeta{ Name: "testpod", Namespace: apiv1.NamespaceDefault, Labels: map[string]string{ "first": "first_label", "second": "second_label", }, }, }}}, &apiv1.NodeList{Items: []apiv1.Node{{ ObjectMeta: metav1.ObjectMeta{ Name: "demo", }, Status: apiv1.NodeStatus{ Addresses: []apiv1.NodeAddress{ { Type: apiv1.NodeInternalIP, Address: "10.0.0.1", }, }, }, }}}) epi, err5 := GetPodDetails(fkClient) if err5 != nil { t.Errorf("expected a PodInfo but returned error") return } if epi == nil { t.Errorf("expected a PodInfo but returned nil") } }
explode_data.jsonl/5383
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 753 }
[ 2830, 3393, 1949, 23527, 7799, 1155, 353, 8840, 836, 8, 341, 197, 322, 90501, 4708, 609, 90501, 34552, 537, 3000, 198, 25078, 4202, 3160, 445, 2045, 35, 4708, 497, 14676, 25078, 4202, 3160, 445, 2045, 35, 34552, 497, 14676, 197, 6878, 1848, 16, 1669, 2126, 23527, 7799, 8623, 2972, 7121, 16374, 2959, 746, 2398, 743, 1848, 16, 621, 2092, 341, 197, 3244, 13080, 445, 7325, 458, 1465, 714, 5927, 2092, 1138, 197, 630, 197, 322, 90501, 4708, 537, 3000, 198, 25078, 4202, 3160, 445, 2045, 35, 4708, 497, 14676, 25078, 4202, 3160, 445, 2045, 35, 34552, 497, 1443, 344, 16, 46011, 3675, 340, 197, 6878, 1848, 17, 1669, 2126, 23527, 7799, 8623, 2972, 7121, 16374, 2959, 746, 2398, 743, 1848, 17, 621, 2092, 341, 197, 3244, 13080, 445, 7325, 458, 1465, 714, 5927, 2092, 1138, 197, 630, 197, 322, 90501, 34552, 537, 3000, 198, 25078, 4202, 3160, 445, 2045, 35, 4708, 497, 330, 1944, 39073, 1138, 25078, 4202, 3160, 445, 2045, 35, 34552, 497, 14676, 197, 6878, 1848, 18, 1669, 2126, 23527, 7799, 8623, 2972, 7121, 16374, 2959, 746, 2398, 743, 1848, 18, 621, 2092, 341, 197, 3244, 13080, 445, 7325, 458, 1465, 714, 5927, 2092, 1138, 197, 630, 197, 322, 90501, 537, 3000, 198, 25078, 4202, 3160, 445, 2045, 35, 4708, 497, 330, 1944, 39073, 1138, 25078, 4202, 3160, 445, 2045, 35, 34552, 497, 1443, 344, 16, 46011, 3675, 340, 197, 6878, 1848, 19, 1669, 2126, 23527, 7799, 8623, 2972, 7121, 16374, 2959, 746, 2398, 743, 1848, 19, 621, 2092, 341, 197, 3244, 13080, 445, 7325, 458, 1465, 714, 5927, 2092, 1138, 197, 630, 197, 322, 2393, 311, 633, 16821, 1731, 198, 1166, 74, 2959, 1669, 1273, 2972, 7121, 16374, 2959, 746, 1006, 197, 197, 5, 391, 344, 16, 88823, 852, 90, 4353, 25, 3056, 391, 344, 16, 88823, 90, 515, 298, 23816, 12175, 25, 77520, 16, 80222, 515, 571, 21297, 25, 414, 330, 1944, 39073, 756, 571, 90823, 25, 1443, 344, 16, 46011, 3675, 345, 571, 197, 23674, 25, 2415, 14032, 30953, 515, 464, 197, 1, 3896, 788, 220, 330, 3896, 6106, 756, 464, 197, 1, 5569, 788, 330, 5569, 6106, 756, 571, 197, 1583, 298, 197, 1583, 197, 197, 74869, 197, 197, 5, 391, 344, 16, 21714, 852, 90, 4353, 25, 3056, 391, 344, 16, 21714, 90, 515, 298, 23816, 12175, 25, 77520, 16, 80222, 515, 571, 21297, 25, 330, 25762, 756, 298, 197, 1583, 298, 58321, 25, 1443, 344, 16, 21714, 2522, 515, 571, 197, 52290, 25, 3056, 391, 344, 16, 21714, 4286, 515, 464, 197, 515, 1144, 27725, 25, 262, 1443, 344, 16, 21714, 11569, 3298, 345, 1144, 98090, 25, 330, 16, 15, 13, 15, 13, 15, 13, 16, 756, 464, 197, 1583, 571, 197, 1583, 298, 197, 1583, 197, 197, 3417, 8824, 96626, 72, 11, 1848, 20, 1669, 2126, 23527, 7799, 955, 74, 2959, 340, 743, 1848, 20, 961, 2092, 341, 197, 3244, 13080, 445, 7325, 264, 16821, 1731, 714, 5927, 1465, 1138, 197, 853, 198, 197, 630, 743, 384, 2493, 621, 2092, 341, 197, 3244, 13080, 445, 7325, 264, 16821, 1731, 714, 5927, 2092, 1138, 197, 532, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestCreateTables(t *testing.T) { err := DB.CreateTables(UserProfile{}, Post{}) assert.Nil(t, err) assert.True(t, DB.CheckIfTableExists("user_profiles")) assert.True(t, DB.CheckIfTableExists("renamed_posts")) }
explode_data.jsonl/59898
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 85 }
[ 2830, 3393, 4021, 21670, 1155, 353, 8840, 836, 8, 341, 9859, 1669, 5952, 7251, 21670, 13087, 8526, 22655, 3877, 37790, 6948, 59678, 1155, 11, 1848, 340, 6948, 32443, 1155, 11, 5952, 10600, 2679, 2556, 15575, 445, 872, 64021, 5455, 6948, 32443, 1155, 11, 5952, 10600, 2679, 2556, 15575, 445, 1440, 3606, 20222, 5455, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestSet_Join(t *testing.T) { gtest.C(t, func(t *gtest.T) { s1 := gset.New(true) s1.Add("a", "a1", "b", "c") str1 := s1.Join(",") t.Assert(strings.Contains(str1, "a1"), true) }) gtest.C(t, func(t *gtest.T) { s1 := gset.New(true) s1.Add("a", `"b"`, `\c`) str1 := s1.Join(",") t.Assert(strings.Contains(str1, `"b"`), true) t.Assert(strings.Contains(str1, `\c`), true) t.Assert(strings.Contains(str1, `a`), true) }) }
explode_data.jsonl/34390
{ "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, 1649, 10598, 1961, 1155, 353, 8840, 836, 8, 341, 3174, 1944, 727, 1155, 11, 2915, 1155, 353, 82038, 836, 8, 341, 197, 1903, 16, 1669, 342, 746, 7121, 3715, 340, 197, 1903, 16, 1904, 445, 64, 497, 330, 64, 16, 497, 330, 65, 497, 330, 66, 1138, 197, 11355, 16, 1669, 274, 16, 22363, 76675, 197, 3244, 11711, 51442, 11545, 4199, 16, 11, 330, 64, 16, 3975, 830, 340, 197, 3518, 3174, 1944, 727, 1155, 11, 2915, 1155, 353, 82038, 836, 8, 341, 197, 1903, 16, 1669, 342, 746, 7121, 3715, 340, 197, 1903, 16, 1904, 445, 64, 497, 53305, 65, 1, 7808, 91405, 66, 24183, 197, 11355, 16, 1669, 274, 16, 22363, 76675, 197, 3244, 11711, 51442, 11545, 4199, 16, 11, 53305, 65, 39917, 701, 830, 340, 197, 3244, 11711, 51442, 11545, 4199, 16, 11, 91405, 66, 63, 701, 830, 340, 197, 3244, 11711, 51442, 11545, 4199, 16, 11, 1565, 64, 63, 701, 830, 340, 197, 3518, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestValidateImageGCPolicy(t *testing.T) { testCases := []struct { name string imageGCPolicy ImageGCPolicy expectErr string }{ { name: "Test for LowThresholdPercent < HighThresholdPercent", imageGCPolicy: ImageGCPolicy{ HighThresholdPercent: 2, LowThresholdPercent: 1, }, }, { name: "Test for HighThresholdPercent < 0,", imageGCPolicy: ImageGCPolicy{ HighThresholdPercent: -1, }, expectErr: "invalid HighThresholdPercent -1, must be in range [0-100]", }, { name: "Test for HighThresholdPercent > 100", imageGCPolicy: ImageGCPolicy{ HighThresholdPercent: 101, }, expectErr: "invalid HighThresholdPercent 101, must be in range [0-100]", }, { name: "Test for LowThresholdPercent < 0", imageGCPolicy: ImageGCPolicy{ LowThresholdPercent: -1, }, expectErr: "invalid LowThresholdPercent -1, must be in range [0-100]", }, { name: "Test for LowThresholdPercent > 100", imageGCPolicy: ImageGCPolicy{ LowThresholdPercent: 101, }, expectErr: "invalid LowThresholdPercent 101, must be in range [0-100]", }, { name: "Test for LowThresholdPercent > HighThresholdPercent", imageGCPolicy: ImageGCPolicy{ HighThresholdPercent: 1, LowThresholdPercent: 2, }, expectErr: "LowThresholdPercent 2 can not be higher than HighThresholdPercent 1", }, } for _, tc := range testCases { if _, err := NewImageGCManager(nil, nil, nil, nil, tc.imageGCPolicy, ""); err != nil { if err.Error() != tc.expectErr { t.Errorf("[%s:]Expected err:%v, but got:%v", tc.name, tc.expectErr, err.Error()) } } } }
explode_data.jsonl/48117
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 692 }
[ 2830, 3393, 17926, 1906, 38, 7123, 8018, 1155, 353, 8840, 836, 8, 341, 18185, 37302, 1669, 3056, 1235, 341, 197, 11609, 688, 914, 198, 197, 31426, 38, 7123, 8018, 4654, 38, 7123, 8018, 198, 197, 24952, 7747, 257, 914, 198, 197, 59403, 197, 197, 515, 298, 11609, 25, 330, 2271, 369, 12041, 37841, 32010, 366, 5124, 37841, 32010, 756, 298, 31426, 38, 7123, 8018, 25, 4654, 38, 7123, 8018, 515, 571, 197, 11976, 37841, 32010, 25, 220, 17, 345, 571, 15070, 363, 37841, 32010, 25, 220, 220, 16, 345, 298, 197, 1583, 197, 197, 1583, 197, 197, 515, 298, 11609, 25, 330, 2271, 369, 5124, 37841, 32010, 366, 220, 15, 11, 756, 298, 31426, 38, 7123, 8018, 25, 4654, 38, 7123, 8018, 515, 571, 197, 11976, 37841, 32010, 25, 481, 16, 345, 298, 197, 1583, 298, 24952, 7747, 25, 330, 11808, 5124, 37841, 32010, 481, 16, 11, 1969, 387, 304, 2088, 508, 15, 12, 16, 15, 15, 45016, 197, 197, 1583, 197, 197, 515, 298, 11609, 25, 330, 2271, 369, 5124, 37841, 32010, 861, 220, 16, 15, 15, 756, 298, 31426, 38, 7123, 8018, 25, 4654, 38, 7123, 8018, 515, 571, 197, 11976, 37841, 32010, 25, 220, 16, 15, 16, 345, 298, 197, 1583, 298, 24952, 7747, 25, 330, 11808, 5124, 37841, 32010, 220, 16, 15, 16, 11, 1969, 387, 304, 2088, 508, 15, 12, 16, 15, 15, 45016, 197, 197, 1583, 197, 197, 515, 298, 11609, 25, 330, 2271, 369, 12041, 37841, 32010, 366, 220, 15, 756, 298, 31426, 38, 7123, 8018, 25, 4654, 38, 7123, 8018, 515, 571, 15070, 363, 37841, 32010, 25, 481, 16, 345, 298, 197, 1583, 298, 24952, 7747, 25, 330, 11808, 12041, 37841, 32010, 481, 16, 11, 1969, 387, 304, 2088, 508, 15, 12, 16, 15, 15, 45016, 197, 197, 1583, 197, 197, 515, 298, 11609, 25, 330, 2271, 369, 12041, 37841, 32010, 861, 220, 16, 15, 15, 756, 298, 31426, 38, 7123, 8018, 25, 4654, 38, 7123, 8018, 515, 571, 15070, 363, 37841, 32010, 25, 220, 16, 15, 16, 345, 298, 197, 1583, 298, 24952, 7747, 25, 330, 11808, 12041, 37841, 32010, 220, 16, 15, 16, 11, 1969, 387, 304, 2088, 508, 15, 12, 16, 15, 15, 45016, 197, 197, 1583, 197, 197, 515, 298, 11609, 25, 330, 2271, 369, 12041, 37841, 32010, 861, 5124, 37841, 32010, 756, 298, 31426, 38, 7123, 8018, 25, 4654, 38, 7123, 8018, 515, 571, 197, 11976, 37841, 32010, 25, 220, 16, 345, 571, 15070, 363, 37841, 32010, 25, 220, 220, 17, 345, 298, 197, 1583, 298, 24952, 7747, 25, 330, 24187, 37841, 32010, 220, 17, 646, 537, 387, 5080, 1091, 5124, 37841, 32010, 220, 16, 756, 197, 197, 1583, 197, 630, 2023, 8358, 17130, 1669, 2088, 1273, 37302, 341, 197, 743, 8358, 1848, 1669, 1532, 1906, 22863, 2043, 27907, 11, 2092, 11, 2092, 11, 2092, 11, 17130, 7352, 38, 7123, 8018, 11, 93754, 1848, 961, 2092, 341, 298, 743, 1848, 6141, 368, 961, 17130, 25952, 7747, 341, 571, 3244, 13080, 57252, 82, 28283, 18896, 1848, 7533, 85, 11, 714, 2684, 7533, 85, 497, 17130, 2644, 11, 17130, 25952, 7747, 11, 1848, 6141, 2398, 298, 197, 532, 197, 197, 532, 197, 532, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestMissingPatternDiagnostic(t *testing.T) { testenv.NeedsGo1Point(t, 16) const files = ` -- go.mod -- module example.com -- x.go -- package x import ( _ "embed" ) // Issue 47436 func F() {} //go:embed NONEXISTENT var foo string ` Run(t, files, func(t *testing.T, env *Env) { env.OpenFile("x.go") env.Await(env.DiagnosticAtRegexpWithMessage("x.go", `NONEXISTENT`, "no matching files found")) env.RegexpReplace("x.go", `NONEXISTENT`, "x.go") env.Await(EmptyDiagnostics("x.go")) }) }
explode_data.jsonl/1719
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 216 }
[ 2830, 3393, 25080, 15760, 79388, 1155, 353, 8840, 836, 8, 341, 18185, 3160, 2067, 68, 6767, 10850, 16, 2609, 1155, 11, 220, 16, 21, 340, 4777, 3542, 284, 22074, 313, 728, 10929, 39514, 4352, 3110, 905, 198, 313, 856, 18002, 39514, 1722, 856, 271, 474, 2399, 197, 62, 330, 12250, 698, 692, 322, 25226, 220, 19, 22, 19, 18, 21, 198, 2830, 434, 368, 10086, 322, 3346, 25, 12250, 20575, 92827, 1825, 198, 947, 15229, 914, 198, 3989, 85952, 1155, 11, 3542, 11, 2915, 1155, 353, 8840, 836, 11, 6105, 353, 14359, 8, 341, 197, 57538, 12953, 1703, 445, 87, 18002, 1138, 197, 57538, 875, 11489, 16978, 81025, 11953, 1655, 3477, 4580, 2354, 2052, 445, 87, 18002, 497, 1565, 29563, 92827, 1825, 7808, 330, 2152, 12579, 3542, 1730, 5455, 197, 57538, 8989, 4580, 23107, 445, 87, 18002, 497, 1565, 29563, 92827, 1825, 7808, 330, 87, 18002, 1138, 197, 57538, 875, 11489, 7, 3522, 35, 18938, 445, 87, 18002, 5455, 197, 3518, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestLinkWithCreationModeError(t *testing.T) { fakeIGs := instances.NewFakeInstanceGroups(sets.NewString(), defaultNamer) fakeNodePool := instances.NewNodePool(fakeIGs, defaultNamer) fakeGCE := gce.FakeGCECloud(gce.DefaultTestClusterValues()) linker := newTestIGLinker(fakeGCE, fakeNodePool) sp := utils.ServicePort{NodePort: 8080, Protocol: annotations.ProtocolHTTP} modes := []BalancingMode{Rate, Utilization} // block the update of Backends with the given balancingMode // and verify that a backend with the other balancingMode is // updated properly. for i, bm := range modes { (fakeGCE.Compute().(*cloud.MockGCE)).MockBackendServices.UpdateHook = func(ctx context.Context, key *meta.Key, be *compute.BackendService, m *cloud.MockBackendServices) error { for _, b := range be.Backends { if b.BalancingMode == string(bm) { return &googleapi.Error{Code: http.StatusBadRequest} } } return mock.UpdateBackendServiceHook(ctx, key, be, m) } // Mimic the instance group being created if _, err := linker.instancePool.EnsureInstanceGroupsAndPorts(defaultNamer.InstanceGroup(), []int64{sp.NodePort}); err != nil { t.Fatalf("Did not expect error when ensuring IG for ServicePort %+v: %v", sp, err) } // Mimic the syncer creating the backend. linker.backendPool.Create(sp, "fake-health-check-link") if err := linker.Link(sp, []GroupKey{{Zone: defaultZone}}); err != nil { t.Fatalf("%v", err) } be, err := fakeGCE.GetGlobalBackendService(sp.BackendName(defaultNamer)) if err != nil { t.Fatalf("%v", err) } if len(be.Backends) == 0 { t.Fatalf("Expected Backends to be created") } for _, b := range be.Backends { if b.BalancingMode != string(modes[(i+1)%len(modes)]) { t.Fatalf("Wrong balancing mode, expected %v got %v", modes[(i+1)%len(modes)], b.BalancingMode) } } linker.backendPool.Delete(sp.BackendName(defaultNamer)) } }
explode_data.jsonl/81934
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 717 }
[ 2830, 3393, 3939, 2354, 32701, 3636, 1454, 1155, 353, 8840, 836, 8, 341, 1166, 726, 1914, 82, 1669, 13121, 7121, 52317, 2523, 22173, 7, 4917, 7121, 703, 1507, 1638, 45, 15232, 340, 1166, 726, 1955, 10551, 1669, 13121, 7121, 1955, 10551, 74138, 1914, 82, 11, 1638, 45, 15232, 340, 1166, 726, 38, 2104, 1669, 342, 346, 991, 726, 38, 2104, 16055, 3268, 346, 13275, 2271, 28678, 6227, 2398, 54238, 261, 1669, 501, 2271, 1914, 3939, 261, 74138, 38, 2104, 11, 12418, 1955, 10551, 692, 41378, 1669, 12439, 13860, 7084, 90, 1955, 7084, 25, 220, 23, 15, 23, 15, 11, 24572, 25, 32207, 54096, 9230, 532, 2109, 2539, 1669, 3056, 37889, 8974, 3636, 90, 11564, 11, 10167, 2022, 630, 197, 322, 2504, 279, 2647, 315, 6841, 1412, 448, 279, 2661, 43363, 3636, 198, 197, 322, 323, 10146, 429, 264, 19163, 448, 279, 1008, 43363, 3636, 374, 198, 197, 322, 6049, 10277, 624, 2023, 600, 11, 34868, 1669, 2088, 19777, 341, 197, 197, 74138, 38, 2104, 89237, 1005, 4071, 12361, 24664, 38, 2104, 4579, 11571, 29699, 11025, 16689, 31679, 284, 2915, 7502, 2266, 9328, 11, 1376, 353, 5490, 9610, 11, 387, 353, 27706, 8864, 408, 1860, 11, 296, 353, 12361, 24664, 29699, 11025, 8, 1465, 341, 298, 2023, 8358, 293, 1669, 2088, 387, 8864, 1412, 341, 571, 743, 293, 1785, 278, 8974, 3636, 621, 914, 1883, 76, 8, 341, 464, 853, 609, 17485, 2068, 6141, 90, 2078, 25, 1758, 69497, 532, 571, 197, 532, 298, 197, 532, 298, 853, 7860, 16689, 29699, 1860, 31679, 7502, 11, 1376, 11, 387, 11, 296, 340, 197, 197, 630, 197, 197, 322, 91846, 292, 279, 2867, 1874, 1660, 3465, 198, 197, 743, 8358, 1848, 1669, 85745, 13066, 10551, 22834, 19098, 2523, 22173, 3036, 68273, 18978, 45, 15232, 12688, 2808, 1507, 3056, 396, 21, 19, 90, 2154, 21714, 7084, 14088, 1848, 961, 2092, 341, 298, 3244, 30762, 445, 6986, 537, 1720, 1465, 979, 22573, 46180, 369, 5362, 7084, 68524, 85, 25, 1018, 85, 497, 978, 11, 1848, 340, 197, 197, 630, 197, 197, 322, 91846, 292, 279, 12811, 261, 6825, 279, 19163, 624, 197, 54238, 261, 37187, 10551, 7251, 22580, 11, 330, 30570, 78405, 15934, 8965, 5130, 197, 743, 1848, 1669, 85745, 22534, 22580, 11, 3056, 2808, 1592, 2979, 15363, 25, 1638, 15363, 3417, 1215, 1848, 961, 2092, 341, 298, 3244, 30762, 4430, 85, 497, 1848, 340, 197, 197, 630, 197, 73142, 11, 1848, 1669, 12418, 38, 2104, 2234, 11646, 29699, 1860, 22580, 8864, 408, 675, 18978, 45, 15232, 1171, 197, 743, 1848, 961, 2092, 341, 298, 3244, 30762, 4430, 85, 497, 1848, 340, 197, 197, 630, 197, 743, 2422, 66606, 8864, 1412, 8, 621, 220, 15, 341, 298, 3244, 30762, 445, 18896, 6841, 1412, 311, 387, 3465, 1138, 197, 197, 630, 197, 2023, 8358, 293, 1669, 2088, 387, 8864, 1412, 341, 298, 743, 293, 1785, 278, 8974, 3636, 961, 914, 1255, 2539, 9697, 72, 10, 16, 23891, 2892, 1255, 2539, 46605, 341, 571, 3244, 30762, 445, 29185, 43363, 3856, 11, 3601, 1018, 85, 2684, 1018, 85, 497, 19777, 9697, 72, 10, 16, 23891, 2892, 1255, 2539, 25035, 293, 1785, 278, 8974, 3636, 340, 298, 197, 532, 197, 197, 532, 197, 54238, 261, 37187, 10551, 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 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestCopyBundleWithNonCollocatedReferencedImagesToRepo(t *testing.T) { env := BuildEnv(t) imgpkg := Imgpkg{t, Logger{}, env.ImgpkgPath} assetsPath := filepath.Join("assets", "simple-app") randFile, err := addRandomFile(assetsPath) if err != nil { t.Fatalf("failed to create unuique file: %v", err) } defer os.Remove(randFile) image := env.Image + "-image-outside-repo" out := imgpkg.Run([]string{"push", "--tty", "-i", image, "-f", assetsPath}) imageDigest := fmt.Sprintf("@%s", extractDigest(out, t)) // image intentionally does not exist in bundle repo imageDigestRef := image + imageDigest imgsYml := fmt.Sprintf(`--- apiVersion: imgpkg.carvel.dev/v1alpha1 kind: ImagesLock spec: images: - image: %s `, imageDigestRef) imgpkgDir, err := createBundleDir(assetsPath, bundleYAML, imgsYml) if err != nil { t.Fatalf("failed to create bundle dir: %v", err) } defer os.RemoveAll(imgpkgDir) out = imgpkg.Run([]string{"push", "--tty", "-b", env.Image, "-f", assetsPath}) bundleDigest := fmt.Sprintf("@%s", extractDigest(out, t)) bundleDigestRef := env.Image + bundleDigest imgpkg.Run([]string{"copy", "--bundle", bundleDigestRef, "--to-repo", env.RelocationRepo}) refs := []string{env.RelocationRepo + imageDigest, env.RelocationRepo + bundleDigest} if err := validateImagePresence(refs); err != nil { t.Fatalf("could not validate image presence: %v", err) } }
explode_data.jsonl/23215
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 524 }
[ 2830, 3393, 12106, 8409, 2354, 8121, 6127, 39463, 47447, 5767, 14228, 1249, 25243, 1155, 353, 8840, 836, 8, 341, 57538, 1669, 7854, 14359, 1155, 340, 39162, 30069, 1669, 2362, 21888, 7351, 90, 83, 11, 9514, 22655, 6105, 13, 13033, 30069, 1820, 630, 197, 5160, 1820, 1669, 26054, 22363, 445, 5160, 497, 330, 22944, 20023, 5130, 7000, 437, 1703, 11, 1848, 1669, 912, 13999, 1703, 7, 5160, 1820, 340, 743, 1848, 961, 2092, 341, 197, 3244, 30762, 445, 16091, 311, 1855, 650, 1963, 591, 1034, 25, 1018, 85, 497, 1848, 340, 197, 532, 16867, 2643, 13270, 37595, 1703, 692, 31426, 1669, 6105, 7528, 488, 6523, 1805, 9794, 2929, 5504, 5368, 698, 13967, 1669, 4964, 30069, 16708, 10556, 917, 4913, 9077, 497, 14482, 81711, 497, 6523, 72, 497, 2168, 11, 6523, 69, 497, 11770, 1820, 3518, 31426, 45217, 1669, 8879, 17305, 10662, 4, 82, 497, 8649, 45217, 9828, 11, 259, 1171, 197, 322, 2168, 36204, 1558, 537, 3000, 304, 12894, 15867, 198, 31426, 45217, 3945, 1669, 2168, 488, 2168, 45217, 271, 39162, 82, 56, 1014, 1669, 8879, 17305, 5809, 10952, 2068, 5637, 25, 4964, 30069, 26890, 889, 21523, 5457, 16, 7141, 16, 198, 15314, 25, 11779, 11989, 198, 9535, 510, 220, 5335, 510, 220, 481, 2168, 25, 1018, 82, 198, 7808, 2168, 45217, 3945, 692, 39162, 30069, 6184, 11, 1848, 1669, 1855, 8409, 6184, 7, 5160, 1820, 11, 12894, 56, 31102, 11, 56165, 56, 1014, 340, 743, 1848, 961, 2092, 341, 197, 3244, 30762, 445, 16091, 311, 1855, 12894, 5419, 25, 1018, 85, 497, 1848, 340, 197, 532, 16867, 2643, 84427, 11022, 30069, 6184, 692, 13967, 284, 4964, 30069, 16708, 10556, 917, 4913, 9077, 497, 14482, 81711, 497, 6523, 65, 497, 6105, 7528, 11, 6523, 69, 497, 11770, 1820, 3518, 2233, 4206, 45217, 1669, 8879, 17305, 10662, 4, 82, 497, 8649, 45217, 9828, 11, 259, 1171, 2233, 4206, 45217, 3945, 1669, 6105, 7528, 488, 12894, 45217, 271, 39162, 30069, 16708, 10556, 917, 4913, 8560, 497, 14482, 34518, 497, 12894, 45217, 3945, 11, 14482, 983, 5504, 5368, 497, 6105, 38939, 2276, 25243, 8824, 197, 16149, 1669, 3056, 917, 90, 3160, 38939, 2276, 25243, 488, 2168, 45217, 11, 6105, 38939, 2276, 25243, 488, 12894, 45217, 532, 743, 1848, 1669, 9593, 1906, 89169, 13321, 82, 1215, 1848, 961, 2092, 341, 197, 3244, 30762, 445, 28077, 537, 9593, 2168, 9362, 25, 1018, 85, 497, 1848, 340, 197, 532, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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ors.New("test decrypt failure") }, } opt := CookieOption{} cookieman := New(cipher, opt) w := httptest.NewRecorder() store := cookieman.NewCookieStore("n", nil) if err := store.Set(w, []byte("v")); err != nil { t.Error(err) } req := GetRequestWithCookie(w) if _, err := store.Get(req); err == nil { t.Error("got nil, but want error") } }
explode_data.jsonl/48010
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 206 }
[ 2830, 3393, 20616, 6093, 13614, 80764, 43618, 1155, 353, 8840, 836, 8, 341, 1444, 10558, 1669, 609, 30570, 79460, 515, 197, 1166, 726, 89660, 25, 2915, 1337, 45043, 3056, 3782, 8, 34923, 3782, 11, 1465, 8, 341, 298, 853, 2092, 11, 5975, 7121, 445, 1944, 38126, 7901, 1138, 197, 197, 1583, 197, 630, 64838, 1669, 24356, 5341, 16094, 197, 1015, 38191, 15977, 1669, 1532, 1337, 10558, 11, 3387, 340, 6692, 1669, 54320, 70334, 7121, 47023, 741, 57279, 1669, 4296, 72, 15977, 7121, 20616, 6093, 445, 77, 497, 2092, 340, 743, 1848, 1669, 3553, 4202, 3622, 11, 3056, 3782, 445, 85, 32596, 1848, 961, 2092, 341, 197, 3244, 6141, 3964, 340, 197, 630, 24395, 1669, 2126, 1900, 2354, 20616, 3622, 340, 743, 8358, 1848, 1669, 3553, 2234, 6881, 1215, 1848, 621, 2092, 341, 197, 3244, 6141, 445, 22390, 2092, 11, 714, 1366, 1465, 1138, 197, 532, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestValidateOnceAWeekWindowFormat(t *testing.T) { cases := []struct { Value string ErrCount int }{ { // once a day window format Value: "04:00-05:00", ErrCount: 1, }, { // invalid day of week Value: "san:04:00-san:05:00", ErrCount: 1, }, { // invalid hour Value: "sun:24:00-san:25:00", ErrCount: 1, }, { // invalid min Value: "sun:04:00-sun:04:60", ErrCount: 1, }, { // valid format Value: "sun:04:00-sun:05:00", ErrCount: 0, }, { // "Sun" can also be used Value: "Sun:04:00-Sun:05:00", ErrCount: 0, }, { // valid format Value: "", ErrCount: 0, }, } for _, tc := range cases { _, errors := validateOnceAWeekWindowFormat(tc.Value, "maintenance_window") if len(errors) != tc.ErrCount { t.Fatalf("Expected %d validation errors, But got %d errors for \"%s\"", tc.ErrCount, len(errors), tc.Value) } } }
explode_data.jsonl/78592
{ "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, 17926, 12522, 32, 17053, 4267, 4061, 1155, 353, 8840, 836, 8, 341, 1444, 2264, 1669, 3056, 1235, 341, 197, 47399, 262, 914, 198, 197, 197, 7747, 2507, 526, 198, 197, 59403, 197, 197, 515, 298, 197, 322, 3055, 264, 1899, 3241, 3561, 198, 298, 47399, 25, 262, 330, 15, 19, 25, 15, 15, 12, 15, 20, 25, 15, 15, 756, 298, 197, 7747, 2507, 25, 220, 16, 345, 197, 197, 1583, 197, 197, 515, 298, 197, 322, 8318, 1899, 315, 2003, 198, 298, 47399, 25, 262, 330, 33082, 25, 15, 19, 25, 15, 15, 45938, 25, 15, 20, 25, 15, 15, 756, 298, 197, 7747, 2507, 25, 220, 16, 345, 197, 197, 1583, 197, 197, 515, 298, 197, 322, 8318, 6460, 198, 298, 47399, 25, 262, 330, 39519, 25, 17, 19, 25, 15, 15, 45938, 25, 17, 20, 25, 15, 15, 756, 298, 197, 7747, 2507, 25, 220, 16, 345, 197, 197, 1583, 197, 197, 515, 298, 197, 322, 8318, 1308, 198, 298, 47399, 25, 262, 330, 39519, 25, 15, 19, 25, 15, 15, 1331, 359, 25, 15, 19, 25, 21, 15, 756, 298, 197, 7747, 2507, 25, 220, 16, 345, 197, 197, 1583, 197, 197, 515, 298, 197, 322, 2697, 3561, 198, 298, 47399, 25, 262, 330, 39519, 25, 15, 19, 25, 15, 15, 1331, 359, 25, 15, 20, 25, 15, 15, 756, 298, 197, 7747, 2507, 25, 220, 15, 345, 197, 197, 1583, 197, 197, 515, 298, 197, 322, 330, 30092, 1, 646, 1083, 387, 1483, 198, 298, 47399, 25, 262, 330, 30092, 25, 15, 19, 25, 15, 15, 6222, 359, 25, 15, 20, 25, 15, 15, 756, 298, 197, 7747, 2507, 25, 220, 15, 345, 197, 197, 1583, 197, 197, 515, 298, 197, 322, 2697, 3561, 198, 298, 47399, 25, 262, 8324, 298, 197, 7747, 2507, 25, 220, 15, 345, 197, 197, 1583, 197, 630, 2023, 8358, 17130, 1669, 2088, 5048, 341, 197, 197, 6878, 5975, 1669, 9593, 12522, 32, 17053, 4267, 4061, 44415, 6167, 11, 330, 98078, 12571, 5130, 197, 743, 2422, 38881, 8, 961, 17130, 27862, 2507, 341, 298, 3244, 30762, 445, 18896, 1018, 67, 10519, 5975, 11, 1988, 2684, 1018, 67, 5975, 369, 32328, 82, 55853, 17130, 27862, 2507, 11, 2422, 38881, 701, 17130, 6167, 340, 197, 197, 532, 197, 532, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,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1, 1 ]
3
func TestToleratingMissingFiles(t *testing.T) { loadingRules := ClientConfigLoadingRules{ Precedence: []string{"bogus1", "bogus2", "bogus3"}, } _, err := loadingRules.Load() if err != nil { t.Fatalf("Unexpected error: %v", err) } }
explode_data.jsonl/67847
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 95 }
[ 2830, 3393, 51, 22072, 1095, 25080, 10809, 1155, 353, 8840, 836, 8, 341, 197, 10628, 26008, 1669, 8423, 2648, 8578, 26008, 515, 197, 197, 4703, 1998, 763, 25, 3056, 917, 4913, 65, 538, 355, 16, 497, 330, 65, 538, 355, 17, 497, 330, 65, 538, 355, 18, 7115, 197, 630, 197, 6878, 1848, 1669, 8277, 26008, 13969, 741, 743, 1848, 961, 2092, 341, 197, 3244, 30762, 445, 29430, 1465, 25, 1018, 85, 497, 1848, 340, 197, 532, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestGetSenderWithSameIDsReturnsSameSender(t *testing.T) { resetAggregator() InitAggregator(nil, "") sender1, err := GetSender(checkID1) assert.Nil(t, err) assert.Len(t, aggregatorInstance.checkSamplers, 1) assert.Len(t, senderPool.senders, 1) sender2, err := GetSender(checkID1) assert.Nil(t, err) assert.Equal(t, sender1, sender2) assert.Len(t, aggregatorInstance.checkSamplers, 1) assert.Len(t, senderPool.senders, 1) }
explode_data.jsonl/78295
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 179 }
[ 2830, 3393, 1949, 20381, 2354, 19198, 30466, 16446, 19198, 20381, 1155, 353, 8840, 836, 8, 341, 70343, 9042, 58131, 741, 98762, 9042, 58131, 27907, 11, 85617, 1903, 1659, 16, 11, 1848, 1669, 2126, 20381, 24077, 915, 16, 340, 6948, 59678, 1155, 11, 1848, 340, 6948, 65819, 1155, 11, 96680, 2523, 9093, 23950, 88409, 11, 220, 16, 340, 6948, 65819, 1155, 11, 4646, 10551, 5219, 388, 11, 220, 16, 692, 1903, 1659, 17, 11, 1848, 1669, 2126, 20381, 24077, 915, 16, 340, 6948, 59678, 1155, 11, 1848, 340, 6948, 12808, 1155, 11, 4646, 16, 11, 4646, 17, 692, 6948, 65819, 1155, 11, 96680, 2523, 9093, 23950, 88409, 11, 220, 16, 340, 6948, 65819, 1155, 11, 4646, 10551, 5219, 388, 11, 220, 16, 340, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestTaxonomyDataParse(t *testing.T) { type testCase struct { lang string cnt int } cases := []testCase{ testCase{"cs-CZ", 5427}, testCase{"da-DK", 5427}, testCase{"de-CH", 5427}, testCase{"de-DE", 5427}, testCase{"en-US", 5427}, testCase{"es-ES", 5427}, testCase{"fr-FR", 5427}, testCase{"it-IT", 5427}, testCase{"ja-JP", 5442}, testCase{"pl-PL", 5427}, testCase{"pt-BR", 5427}, testCase{"sv-SE", 5427}, testCase{"zh-CN", 4586}, } for _, cas := range cases { t.Run(fmt.Sprintf("Load taxonomy data file in %s", cas.lang), func(t *testing.T) { td := taxonomyData{ Language: cas.lang, LoadFunc: data.Asset, } if td.Filename() != fmt.Sprintf("taxonomy-with-ids.%s.txt", cas.lang) { t.Fatalf("%s is not valid taxonomy data filename", td.Filename()) } if err := td.Parse(); err != nil { t.Fatal(err) } if len(td.data) != cas.cnt { t.Fatalf("%s contains %d records, not eq. to %d", td.Filename(), len(td.data), cas.cnt) } }) } }
explode_data.jsonl/35846
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 466 }
[ 2830, 3393, 31349, 16974, 1043, 14463, 1155, 353, 8840, 836, 8, 341, 13158, 54452, 2036, 341, 197, 197, 5205, 914, 198, 197, 60553, 220, 526, 198, 197, 532, 1444, 2264, 1669, 3056, 66194, 515, 197, 18185, 4207, 4913, 4837, 7658, 57, 497, 220, 20, 19, 17, 22, 1583, 197, 18185, 4207, 4913, 3235, 9420, 42, 497, 220, 20, 19, 17, 22, 1583, 197, 18185, 4207, 4913, 450, 12, 2149, 497, 220, 20, 19, 17, 22, 1583, 197, 18185, 4207, 4913, 450, 12, 1150, 497, 220, 20, 19, 17, 22, 1583, 197, 18185, 4207, 4913, 268, 32340, 497, 220, 20, 19, 17, 22, 1583, 197, 18185, 4207, 4913, 288, 12, 1570, 497, 220, 20, 19, 17, 22, 1583, 197, 18185, 4207, 4913, 1626, 7276, 49, 497, 220, 20, 19, 17, 22, 1583, 197, 18185, 4207, 4913, 275, 12, 952, 497, 220, 20, 19, 17, 22, 1583, 197, 18185, 4207, 4913, 5580, 12009, 47, 497, 220, 20, 19, 19, 17, 1583, 197, 18185, 4207, 4913, 500, 12, 2916, 497, 220, 20, 19, 17, 22, 1583, 197, 18185, 4207, 4913, 417, 7671, 49, 497, 220, 20, 19, 17, 22, 1583, 197, 18185, 4207, 4913, 3492, 12, 925, 497, 220, 20, 19, 17, 22, 1583, 197, 18185, 4207, 4913, 23815, 94942, 497, 220, 19, 20, 23, 21, 1583, 197, 532, 2023, 8358, 4760, 1669, 2088, 5048, 341, 197, 3244, 16708, 28197, 17305, 445, 5879, 71806, 821, 1034, 304, 1018, 82, 497, 4760, 8019, 701, 2915, 1155, 353, 8840, 836, 8, 341, 298, 76373, 1669, 71806, 1043, 515, 571, 197, 13806, 25, 4760, 8019, 345, 571, 197, 5879, 9626, 25, 821, 88161, 345, 298, 197, 532, 298, 743, 17941, 991, 4033, 368, 961, 8879, 17305, 445, 53004, 26189, 12, 3365, 22445, 82, 3909, 497, 4760, 8019, 8, 341, 571, 3244, 30762, 4430, 82, 374, 537, 2697, 71806, 821, 3899, 497, 17941, 991, 4033, 2398, 298, 197, 532, 298, 743, 1848, 1669, 17941, 8937, 2129, 1848, 961, 2092, 341, 571, 3244, 26133, 3964, 340, 298, 197, 532, 298, 743, 2422, 61241, 2196, 8, 961, 4760, 520, 406, 341, 571, 3244, 30762, 4430, 82, 5610, 1018, 67, 7424, 11, 537, 8939, 13, 311, 1018, 67, 497, 17941, 991, 4033, 1507, 2422, 61241, 2196, 701, 4760, 520, 406, 340, 298, 197, 532, 197, 197, 3518, 197, 532, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestCanSetIdempotencyToken(t *testing.T) { cases := []struct { CanSet bool Case interface{} }{ { true, struct { Field *string `idempotencyToken:"true"` }{}, }, { true, struct { Field string `idempotencyToken:"true"` }{}, }, { false, struct { Field *string `idempotencyToken:"true"` }{Field: new(string)}, }, { false, struct { Field string `idempotencyToken:"true"` }{Field: "value"}, }, { false, struct { Field *int `idempotencyToken:"true"` }{}, }, { false, struct { Field *string }{}, }, } for i, c := range cases { v := reflect.Indirect(reflect.ValueOf(c.Case)) ty := v.Type() canSet := protocol.CanSetIdempotencyToken(v.Field(0), ty.Field(0)) if e, a := c.CanSet, canSet; e != a { t.Errorf("%d, expect %v, got %v", i, e, a) } } }
explode_data.jsonl/78825
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 423 }
[ 2830, 3393, 6713, 1649, 764, 3262, 354, 2251, 3323, 1155, 353, 8840, 836, 8, 341, 1444, 2264, 1669, 3056, 1235, 341, 197, 6258, 276, 1649, 1807, 198, 197, 197, 4207, 256, 3749, 16094, 197, 59403, 197, 197, 515, 298, 42808, 345, 298, 6472, 341, 571, 94478, 353, 917, 1565, 307, 3262, 354, 2251, 3323, 2974, 1866, 8805, 298, 197, 15170, 1583, 197, 197, 1583, 197, 197, 515, 298, 42808, 345, 298, 6472, 341, 571, 94478, 914, 1565, 307, 3262, 354, 2251, 3323, 2974, 1866, 8805, 298, 197, 15170, 1583, 197, 197, 1583, 197, 197, 515, 298, 36012, 345, 298, 6472, 341, 571, 94478, 353, 917, 1565, 307, 3262, 354, 2251, 3323, 2974, 1866, 8805, 298, 197, 15170, 1877, 25, 501, 3609, 39781, 197, 197, 1583, 197, 197, 515, 298, 36012, 345, 298, 6472, 341, 571, 94478, 914, 1565, 307, 3262, 354, 2251, 3323, 2974, 1866, 8805, 298, 197, 15170, 1877, 25, 330, 957, 7115, 197, 197, 1583, 197, 197, 515, 298, 36012, 345, 298, 6472, 341, 571, 94478, 353, 396, 1565, 307, 3262, 354, 2251, 3323, 2974, 1866, 8805, 298, 197, 15170, 1583, 197, 197, 1583, 197, 197, 515, 298, 36012, 345, 298, 6472, 341, 571, 94478, 353, 917, 198, 298, 197, 15170, 1583, 197, 197, 1583, 197, 630, 2023, 600, 11, 272, 1669, 2088, 5048, 341, 197, 5195, 1669, 8708, 13, 1425, 1226, 13321, 767, 6167, 2124, 1337, 727, 519, 1171, 197, 197, 1881, 1669, 348, 10184, 741, 197, 92936, 1649, 1669, 11507, 53280, 1649, 764, 3262, 354, 2251, 3323, 3747, 17087, 7, 15, 701, 13580, 17087, 7, 15, 1171, 197, 743, 384, 11, 264, 1669, 272, 53280, 1649, 11, 646, 1649, 26, 384, 961, 264, 341, 298, 3244, 13080, 4430, 67, 11, 1720, 1018, 85, 11, 2684, 1018, 85, 497, 600, 11, 384, 11, 264, 340, 197, 197, 532, 197, 532, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestGetLabelsForVolume(t *testing.T) { ctrl := gomock.NewController(t) defer ctrl.Finish() testCloud0 := GetTestCloud(ctrl) diskName := "disk1" diskURI := fmt.Sprintf("/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Compute/disks/%s", testCloud0.SubscriptionID, testCloud0.ResourceGroup, diskName) diskSizeGB := int32(30) fakeGetDiskFailed := "fakeGetDiskFailed" fakeGetDiskFailedDiskURI := fmt.Sprintf("/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Compute/disks/%s", testCloud0.SubscriptionID, testCloud0.ResourceGroup, fakeGetDiskFailed) testCases := []struct { desc string diskName string pv *v1.PersistentVolume existedDisk compute.Disk expected map[string]string expectedErr bool expectedErrMsg error }{ { desc: "labels and no error shall be returned if everything is good", diskName: diskName, pv: &v1.PersistentVolume{ Spec: v1.PersistentVolumeSpec{ PersistentVolumeSource: v1.PersistentVolumeSource{ AzureDisk: &v1.AzureDiskVolumeSource{ DiskName: diskName, DataDiskURI: diskURI, }, }, }, }, existedDisk: compute.Disk{Name: to.StringPtr(diskName), DiskProperties: &compute.DiskProperties{DiskSizeGB: &diskSizeGB}, Zones: &[]string{"1"}}, expected: map[string]string{ v1.LabelTopologyRegion: testCloud0.Location, v1.LabelTopologyZone: testCloud0.makeZone(testCloud0.Location, 1), }, expectedErr: false, }, { desc: "an error shall be returned if everything is good with invalid zone", diskName: diskName, pv: &v1.PersistentVolume{ Spec: v1.PersistentVolumeSpec{ PersistentVolumeSource: v1.PersistentVolumeSource{ AzureDisk: &v1.AzureDiskVolumeSource{ DiskName: diskName, DataDiskURI: diskURI, }, }, }, }, existedDisk: compute.Disk{Name: to.StringPtr(diskName), DiskProperties: &compute.DiskProperties{DiskSizeGB: &diskSizeGB}, Zones: &[]string{"invalid"}}, expectedErr: true, expectedErrMsg: fmt.Errorf("failed to parse zone [invalid] for AzureDisk %v: %v", diskName, "strconv.Atoi: parsing \"invalid\": invalid syntax"), }, { desc: "nil shall be returned if everything is good with null Zones", diskName: diskName, pv: &v1.PersistentVolume{ Spec: v1.PersistentVolumeSpec{ PersistentVolumeSource: v1.PersistentVolumeSource{ AzureDisk: &v1.AzureDiskVolumeSource{ DiskName: diskName, DataDiskURI: diskURI, }, }, }, }, existedDisk: compute.Disk{Name: to.StringPtr(diskName), DiskProperties: &compute.DiskProperties{DiskSizeGB: &diskSizeGB}}, expected: map[string]string{ v1.LabelTopologyRegion: testCloud0.Location, }, expectedErr: false, expectedErrMsg: nil, }, { desc: "an error shall be returned if everything is good with get disk failed", diskName: fakeGetDiskFailed, pv: &v1.PersistentVolume{ Spec: v1.PersistentVolumeSpec{ PersistentVolumeSource: v1.PersistentVolumeSource{ AzureDisk: &v1.AzureDiskVolumeSource{ DiskName: fakeGetDiskFailed, DataDiskURI: fakeGetDiskFailedDiskURI, }, }, }, }, existedDisk: compute.Disk{Name: to.StringPtr(fakeGetDiskFailed), DiskProperties: &compute.DiskProperties{DiskSizeGB: &diskSizeGB}, Zones: &[]string{"1"}}, expectedErr: true, expectedErrMsg: fmt.Errorf("Retriable: false, RetryAfter: 0s, HTTPStatusCode: 0, RawError: %w", fmt.Errorf("Get Disk failed")), }, { desc: "an error shall be returned if everything is good with invalid DiskURI", diskName: diskName, pv: &v1.PersistentVolume{ Spec: v1.PersistentVolumeSpec{ PersistentVolumeSource: v1.PersistentVolumeSource{ AzureDisk: &v1.AzureDiskVolumeSource{ DiskName: diskName, DataDiskURI: "invalidDiskURI", }, }, }, }, existedDisk: compute.Disk{Name: to.StringPtr(diskName), DiskProperties: &compute.DiskProperties{DiskSizeGB: &diskSizeGB}, Zones: &[]string{"1"}}, expectedErr: true, expectedErrMsg: fmt.Errorf("invalid disk URI: invalidDiskURI"), }, { desc: "nil shall be returned if everything is good but pv.Spec.AzureDisk.DiskName is cloudvolume.ProvisionedVolumeName", diskName: diskName, pv: &v1.PersistentVolume{ Spec: v1.PersistentVolumeSpec{ PersistentVolumeSource: v1.PersistentVolumeSource{ AzureDisk: &v1.AzureDiskVolumeSource{ DiskName: cloudvolume.ProvisionedVolumeName, DataDiskURI: diskURI, }, }, }, }, existedDisk: compute.Disk{Name: to.StringPtr(diskName), DiskProperties: &compute.DiskProperties{DiskSizeGB: &diskSizeGB}}, expected: nil, expectedErr: false, }, { desc: "nil shall be returned if everything is good but pv.Spec.AzureDisk is nil", diskName: diskName, pv: &v1.PersistentVolume{ Spec: v1.PersistentVolumeSpec{ PersistentVolumeSource: v1.PersistentVolumeSource{}, }, }, existedDisk: compute.Disk{Name: to.StringPtr(diskName), DiskProperties: &compute.DiskProperties{DiskSizeGB: &diskSizeGB}}, expected: nil, expectedErr: false, }, } for i, test := range testCases { testCloud := GetTestCloud(ctrl) mockDisksClient := testCloud.DisksClient.(*mockdiskclient.MockInterface) if test.diskName == fakeGetDiskFailed { mockDisksClient.EXPECT().Get(gomock.Any(), testCloud.ResourceGroup, test.diskName).Return(test.existedDisk, &retry.Error{RawError: fmt.Errorf("Get Disk failed")}).AnyTimes() } else { mockDisksClient.EXPECT().Get(gomock.Any(), testCloud.ResourceGroup, test.diskName).Return(test.existedDisk, nil).AnyTimes() } mockDisksClient.EXPECT().CreateOrUpdate(gomock.Any(), testCloud.ResourceGroup, test.diskName, gomock.Any()).Return(nil).AnyTimes() result, err := testCloud.GetLabelsForVolume(context.TODO(), test.pv) assert.Equal(t, test.expected, result, "TestCase[%d]: %s, expected: %v, return: %v", i, test.desc, test.expected, result) assert.Equal(t, test.expectedErr, err != nil, "TestCase[%d]: %s, return error: %v", i, test.desc, err) assert.Equal(t, test.expectedErrMsg, err, "TestCase[%d]: %s, expected: %v, return: %v", i, test.desc, test.expectedErrMsg, err) } }
explode_data.jsonl/36149
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 2593 }
[ 2830, 3393, 1949, 23674, 2461, 18902, 1155, 353, 8840, 836, 8, 341, 84381, 1669, 342, 316, 1176, 7121, 2051, 1155, 340, 16867, 23743, 991, 18176, 2822, 18185, 16055, 15, 1669, 2126, 2271, 16055, 62100, 340, 2698, 3187, 675, 1669, 330, 30496, 16, 698, 2698, 3187, 10301, 1669, 8879, 17305, 4283, 72560, 12627, 82, 53100, 22173, 12627, 82, 82543, 10270, 3929, 89237, 41510, 2787, 12627, 82, 756, 197, 18185, 16055, 15, 12391, 12124, 915, 11, 1273, 16055, 15, 20766, 2808, 11, 13364, 675, 340, 2698, 3187, 1695, 5381, 1669, 526, 18, 17, 7, 18, 15, 340, 1166, 726, 1949, 47583, 9408, 1669, 330, 30570, 1949, 47583, 9408, 698, 1166, 726, 1949, 47583, 9408, 47583, 10301, 1669, 8879, 17305, 4283, 72560, 12627, 82, 53100, 22173, 12627, 82, 82543, 10270, 3929, 89237, 41510, 2787, 12627, 82, 756, 197, 18185, 16055, 15, 12391, 12124, 915, 11, 1273, 16055, 15, 20766, 2808, 11, 12418, 1949, 47583, 9408, 340, 18185, 37302, 1669, 3056, 1235, 341, 197, 41653, 1843, 914, 198, 197, 2698, 3187, 675, 981, 914, 198, 197, 3223, 85, 1797, 353, 85, 16, 61655, 18902, 198, 197, 8122, 13236, 47583, 262, 12564, 909, 3187, 198, 197, 42400, 981, 2415, 14032, 30953, 198, 197, 42400, 7747, 262, 1807, 198, 197, 42400, 75449, 1465, 198, 197, 59403, 197, 197, 515, 298, 41653, 25, 257, 330, 16873, 323, 902, 1465, 4880, 387, 5927, 421, 4297, 374, 1661, 756, 298, 2698, 3187, 675, 25, 13364, 675, 345, 298, 3223, 85, 25, 609, 85, 16, 61655, 18902, 515, 571, 7568, 992, 25, 348, 16, 61655, 18902, 8327, 515, 464, 10025, 13931, 18902, 3608, 25, 348, 16, 61655, 18902, 3608, 515, 1144, 22985, 50203, 47583, 25, 609, 85, 16, 57827, 47583, 18902, 3608, 515, 1662, 10957, 3187, 675, 25, 262, 13364, 675, 345, 1662, 40927, 47583, 10301, 25, 13364, 10301, 345, 1144, 197, 1583, 464, 197, 1583, 571, 197, 1583, 298, 197, 1583, 298, 8122, 13236, 47583, 25, 12564, 909, 3187, 63121, 25, 311, 6431, 5348, 1500, 3187, 675, 701, 38868, 7903, 25, 609, 27706, 909, 3187, 7903, 90, 47583, 1695, 5381, 25, 609, 30496, 1695, 5381, 2137, 94586, 25, 609, 1294, 917, 4913, 16, 48085, 298, 42400, 25, 2415, 14032, 30953, 515, 571, 5195, 16, 4679, 60954, 14091, 25, 1273, 16055, 15, 4515, 345, 571, 5195, 16, 4679, 60954, 15363, 25, 256, 1273, 16055, 15, 10117, 15363, 8623, 16055, 15, 4515, 11, 220, 16, 1326, 298, 197, 1583, 298, 42400, 7747, 25, 895, 345, 197, 197, 1583, 197, 197, 515, 298, 41653, 25, 257, 330, 276, 1465, 4880, 387, 5927, 421, 4297, 374, 1661, 448, 8318, 10143, 756, 298, 2698, 3187, 675, 25, 13364, 675, 345, 298, 3223, 85, 25, 609, 85, 16, 61655, 18902, 515, 571, 7568, 992, 25, 348, 16, 61655, 18902, 8327, 515, 464, 10025, 13931, 18902, 3608, 25, 348, 16, 61655, 18902, 3608, 515, 1144, 22985, 50203, 47583, 25, 609, 85, 16, 57827, 47583, 18902, 3608, 515, 1662, 10957, 3187, 675, 25, 262, 13364, 675, 345, 1662, 40927, 47583, 10301, 25, 13364, 10301, 345, 1144, 197, 1583, 464, 197, 1583, 571, 197, 1583, 298, 197, 1583, 298, 8122, 13236, 47583, 25, 262, 12564, 909, 3187, 63121, 25, 311, 6431, 5348, 1500, 3187, 675, 701, 38868, 7903, 25, 609, 27706, 909, 3187, 7903, 90, 47583, 1695, 5381, 25, 609, 30496, 1695, 5381, 2137, 94586, 25, 609, 1294, 917, 4913, 11808, 48085, 298, 42400, 7747, 25, 262, 830, 345, 298, 42400, 75449, 25, 8879, 13080, 445, 16091, 311, 4715, 10143, 508, 11808, 60, 369, 34119, 47583, 1018, 85, 25, 1018, 85, 497, 13364, 675, 11, 330, 51848, 67107, 25, 22314, 7245, 11808, 11693, 8318, 19482, 4461, 197, 197, 1583, 197, 197, 515, 298, 41653, 25, 257, 330, 8385, 4880, 387, 5927, 421, 4297, 374, 1661, 448, 845, 94586, 756, 298, 2698, 3187, 675, 25, 13364, 675, 345, 298, 3223, 85, 25, 609, 85, 16, 61655, 18902, 515, 571, 7568, 992, 25, 348, 16, 61655, 18902, 8327, 515, 464, 10025, 13931, 18902, 3608, 25, 348, 16, 61655, 18902, 3608, 515, 1144, 22985, 50203, 47583, 25, 609, 85, 16, 57827, 47583, 18902, 3608, 515, 1662, 10957, 3187, 675, 25, 262, 13364, 675, 345, 1662, 40927, 47583, 10301, 25, 13364, 10301, 345, 1144, 197, 1583, 464, 197, 1583, 571, 197, 1583, 298, 197, 1583, 298, 8122, 13236, 47583, 25, 12564, 909, 3187, 63121, 25, 311, 6431, 5348, 1500, 3187, 675, 701, 38868, 7903, 25, 609, 27706, 909, 3187, 7903, 90, 47583, 1695, 5381, 25, 609, 30496, 1695, 5381, 22050, 298, 42400, 25, 2415, 14032, 30953, 515, 571, 5195, 16, 4679, 60954, 14091, 25, 1273, 16055, 15, 4515, 345, 298, 197, 1583, 298, 42400, 7747, 25, 262, 895, 345, 298, 42400, 75449, 25, 2092, 345, 197, 197, 1583, 197, 197, 515, 298, 41653, 25, 257, 330, 276, 1465, 4880, 387, 5927, 421, 4297, 374, 1661, 448, 633, 13364, 4641, 756, 298, 2698, 3187, 675, 25, 12418, 1949, 47583, 9408, 345, 298, 3223, 85, 25, 609, 85, 16, 61655, 18902, 515, 571, 7568, 992, 25, 348, 16, 61655, 18902, 8327, 515, 464, 10025, 13931, 18902, 3608, 25, 348, 16, 61655, 18902, 3608, 515, 1144, 22985, 50203, 47583, 25, 609, 85, 16, 57827, 47583, 18902, 3608, 515, 1662, 10957, 3187, 675, 25, 262, 12418, 1949, 47583, 9408, 345, 1662, 40927, 47583, 10301, 25, 12418, 1949, 47583, 9408, 47583, 10301, 345, 1144, 197, 1583, 464, 197, 1583, 571, 197, 1583, 298, 197, 1583, 298, 8122, 13236, 47583, 25, 262, 12564, 909, 3187, 63121, 25, 311, 6431, 5348, 74138, 1949, 47583, 9408, 701, 38868, 7903, 25, 609, 27706, 909, 3187, 7903, 90, 47583, 1695, 5381, 25, 609, 30496, 1695, 5381, 2137, 94586, 25, 609, 1294, 917, 4913, 16, 48085, 298, 42400, 7747, 25, 262, 830, 345, 298, 42400, 75449, 25, 8879, 13080, 445, 12020, 461, 480, 25, 895, 11, 78870, 6025, 25, 220, 15, 82, 11, 10130, 15872, 25, 220, 15, 11, 23022, 1454, 25, 1018, 86, 497, 8879, 13080, 445, 1949, 38868, 4641, 30154, 197, 197, 1583, 197, 197, 515, 298, 41653, 25, 257, 330, 276, 1465, 4880, 387, 5927, 421, 4297, 374, 1661, 448, 8318, 38868, 10301, 756, 298, 2698, 3187, 675, 25, 13364, 675, 345, 298, 3223, 85, 25, 609, 85, 16, 61655, 18902, 515, 571, 7568, 992, 25, 348, 16, 61655, 18902, 8327, 515, 464, 10025, 13931, 18902, 3608, 25, 348, 16, 61655, 18902, 3608, 515, 1144, 22985, 50203, 47583, 25, 609, 85, 16, 57827, 47583, 18902, 3608, 515, 1662, 10957, 3187, 675, 25, 262, 13364, 675, 345, 1662, 40927, 47583, 10301, 25, 330, 11808, 47583, 10301, 756, 1144, 197, 1583, 464, 197, 1583, 571, 197, 1583, 298, 197, 1583, 298, 8122, 13236, 47583, 25, 262, 12564, 909, 3187, 63121, 25, 311, 6431, 5348, 1500, 3187, 675, 701, 38868, 7903, 25, 609, 27706, 909, 3187, 7903, 90, 47583, 1695, 5381, 25, 609, 30496, 1695, 5381, 2137, 94586, 25, 609, 1294, 917, 4913, 16, 48085, 298, 42400, 7747, 25, 262, 830, 345, 298, 42400, 75449, 25, 8879, 13080, 445, 11808, 13364, 16020, 25, 8318, 47583, 10301, 4461, 197, 197, 1583, 197, 197, 515, 298, 41653, 25, 257, 330, 8385, 4880, 387, 5927, 421, 4297, 374, 1661, 714, 33491, 36473, 57827, 47583, 909, 3187, 675, 374, 9437, 25060, 7763, 13013, 291, 18902, 675, 756, 298, 2698, 3187, 675, 25, 13364, 675, 345, 298, 3223, 85, 25, 609, 85, 16, 61655, 18902, 515, 571, 7568, 992, 25, 348, 16, 61655, 18902, 8327, 515, 464, 10025, 13931, 18902, 3608, 25, 348, 16, 61655, 18902, 3608, 515, 1144, 22985, 50203, 47583, 25, 609, 85, 16, 57827, 47583, 18902, 3608, 515, 1662, 10957, 3187, 675, 25, 262, 9437, 25060, 7763, 13013, 291, 18902, 675, 345, 1662, 40927, 47583, 10301, 25, 13364, 10301, 345, 1144, 197, 1583, 464, 197, 1583, 571, 197, 1583, 298, 197, 1583, 298, 8122, 13236, 47583, 25, 12564, 909, 3187, 63121, 25, 311, 6431, 5348, 1500, 3187, 675, 701, 38868, 7903, 25, 609, 27706, 909, 3187, 7903, 90, 47583, 1695, 5381, 25, 609, 30496, 1695, 5381, 22050, 298, 42400, 25, 262, 2092, 345, 298, 42400, 7747, 25, 895, 345, 197, 197, 1583, 197, 197, 515, 298, 41653, 25, 257, 330, 8385, 4880, 387, 5927, 421, 4297, 374, 1661, 714, 33491, 36473, 57827, 47583, 374, 2092, 756, 298, 2698, 3187, 675, 25, 13364, 675, 345, 298, 3223, 85, 25, 609, 85, 16, 61655, 18902, 515, 571, 7568, 992, 25, 348, 16, 61655, 18902, 8327, 515, 464, 10025, 13931, 18902, 3608, 25, 348, 16, 61655, 18902, 3608, 38837, 571, 197, 1583, 298, 197, 1583, 298, 8122, 13236, 47583, 25, 12564, 909, 3187, 63121, 25, 311, 6431, 5348, 1500, 3187, 675, 701, 38868, 7903, 25, 609, 27706, 909, 3187, 7903, 90, 47583, 1695, 5381, 25, 609, 30496, 1695, 5381, 22050, 298, 42400, 25, 262, 2092, 345, 298, 42400, 7747, 25, 895, 345, 197, 197, 1583, 197, 630, 2023, 600, 11, 1273, 1669, 2088, 1273, 37302, 341, 197, 18185, 16055, 1669, 2126, 2271, 16055, 62100, 340, 197, 77333, 4839, 2787, 2959, 1669, 1273, 16055, 10166, 2787, 2959, 41399, 16712, 30496, 2972, 24664, 5051, 340, 197, 743, 1273, 86211, 675, 621, 12418, 1949, 47583, 9408, 341, 298, 77333, 4839, 2787, 2959, 22402, 7285, 1005, 1949, 3268, 316, 1176, 13311, 1507, 1273, 16055, 20766, 2808, 11, 1273, 86211, 675, 568, 5598, 8623, 2223, 13236, 47583, 11, 609, 44848, 6141, 90, 20015, 1454, 25, 8879, 13080, 445, 1949, 38868, 4641, 899, 16630, 8610, 18889, 741, 197, 197, 92, 770, 341, 298, 77333, 4839, 2787, 2959, 22402, 7285, 1005, 1949, 3268, 316, 1176, 13311, 1507, 1273, 16055, 20766, 2808, 11, 1273, 86211, 675, 568, 5598, 8623, 2223, 13236, 47583, 11, 2092, 568, 8610, 18889, 741, 197, 197, 532, 197, 77333, 4839, 2787, 2959, 22402, 7285, 1005, 4021, 56059, 3268, 316, 1176, 13311, 1507, 1273, 16055, 20766, 2808, 11, 1273, 86211, 675, 11, 342, 316, 1176, 13311, 6011, 5598, 27907, 568, 8610, 18889, 2822, 197, 9559, 11, 1848, 1669, 1273, 16055, 2234, 23674, 2461, 18902, 5378, 90988, 1507, 1273, 556, 85, 340, 197, 6948, 12808, 1155, 11, 1273, 56835, 11, 1102, 11, 330, 16458, 25113, 67, 5669, 1018, 82, 11, 3601, 25, 1018, 85, 11, 470, 25, 1018, 85, 497, 600, 11, 1273, 30514, 11, 1273, 56835, 11, 1102, 340, 197, 6948, 12808, 1155, 11, 1273, 56835, 7747, 11, 1848, 961, 2092, 11, 330, 16458, 25113, 67, 5669, 1018, 82, 11, 470, 1465, 25, 1018, 85, 497, 600, 11, 1273, 30514, 11, 1848, 340, 197, 6948, 12808, 1155, 11, 1273, 56835, 75449, 11, 1848, 11, 330, 16458, 25113, 67, 5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 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestOuterLinkV2WithMetadataPointerEmbedderDecode(t *testing.T) { var o outerLinkV2WithMetadataPointerEmbedder err := MsgpackDecode(&o, []byte{0x1, 0x2}) requireErrorHasSuffix(t, errCodecDecodeSelf, err) }
explode_data.jsonl/72243
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 86 }
[ 2830, 3393, 51322, 3939, 53, 17, 2354, 14610, 9084, 25486, 1107, 32564, 1155, 353, 8840, 836, 8, 341, 2405, 297, 15955, 3939, 53, 17, 2354, 14610, 9084, 25486, 1107, 198, 9859, 1669, 24205, 4748, 32564, 2099, 78, 11, 3056, 3782, 90, 15, 87, 16, 11, 220, 15, 87, 17, 3518, 17957, 1454, 10281, 40177, 1155, 11, 1848, 36913, 32564, 12092, 11, 1848, 340, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestParsersCStyleLog(t *testing.T) { env := newInputTestingEnvironment(t) testlogName := "test.log" inp := env.mustCreateInput(map[string]interface{}{ "paths": []string{env.abspath(testlogName)}, "prospector.scanner.check_interval": "1ms", "parsers": []map[string]interface{}{ map[string]interface{}{ "multiline": map[string]interface{}{ "type": "pattern", "pattern": "\\\\$", "negate": false, "match": "before", "timeout": "100ms", // set to lower value to speed up test }, }, }, }) testlines := []byte(`The following are log messages This is a C style log\\ file which is on multiple\\ lines In addition it has normal lines The total should be 4 lines covered `) env.mustWriteLinesToFile(testlogName, testlines) ctx, cancelInput := context.WithCancel(context.Background()) env.startInput(ctx, inp) env.waitUntilEventCount(4) env.requireOffsetInRegistry(testlogName, len(testlines)) cancelInput() env.waitUntilInputStops() }
explode_data.jsonl/14917
{ "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, 47, 40488, 34, 2323, 2201, 1155, 353, 8840, 836, 8, 341, 57538, 1669, 501, 2505, 16451, 12723, 1155, 692, 18185, 839, 675, 1669, 330, 1944, 1665, 698, 17430, 79, 1669, 6105, 69419, 4021, 2505, 9147, 14032, 31344, 67066, 197, 197, 1, 21623, 788, 6526, 3056, 917, 90, 3160, 35552, 8623, 839, 675, 39781, 197, 197, 1, 776, 82, 18997, 7685, 4887, 9093, 20541, 788, 330, 16, 1011, 756, 197, 197, 1, 88564, 788, 3056, 2186, 14032, 31344, 67066, 298, 19567, 14032, 31344, 67066, 571, 197, 1, 92760, 788, 2415, 14032, 31344, 67066, 464, 197, 44470, 788, 262, 330, 14339, 756, 464, 197, 1, 14339, 788, 2917, 3422, 65039, 756, 464, 197, 1, 28775, 349, 788, 220, 895, 345, 464, 197, 1, 6347, 788, 256, 330, 14801, 756, 464, 197, 1, 14150, 788, 330, 16, 15, 15, 1011, 497, 442, 738, 311, 4722, 897, 311, 4628, 705, 1273, 198, 571, 197, 1583, 298, 197, 1583, 197, 197, 1583, 197, 8824, 18185, 7969, 1669, 3056, 3782, 5809, 785, 2701, 525, 1487, 6605, 198, 1986, 374, 264, 356, 1707, 1487, 3422, 198, 1192, 892, 374, 389, 5248, 3422, 198, 7969, 198, 641, 5256, 432, 702, 4622, 5128, 198, 785, 2790, 1265, 387, 220, 19, 5128, 9761, 198, 24183, 57538, 69419, 7985, 16794, 41550, 8623, 839, 675, 11, 1273, 7969, 692, 20985, 11, 9121, 2505, 1669, 2266, 26124, 9269, 5378, 19047, 2398, 57538, 4962, 2505, 7502, 11, 32344, 692, 57538, 16294, 24493, 1556, 2507, 7, 19, 340, 57538, 23712, 6446, 641, 15603, 8623, 839, 675, 11, 2422, 8623, 7969, 4390, 84441, 2505, 741, 57538, 16294, 24493, 2505, 623, 3721, 741, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestSetCurrentLogLevel(t *testing.T) { var log = Init(INFO_LEVEL, false, false) log.SetLogLevel(WARN_LEVEL) var levelNum, _ = log.GetCurrentLogLevel() if levelNum != WARN_LEVEL { t.Errorf("Got: %d expected: %d", levelNum, WARN_LEVEL) } }
explode_data.jsonl/3657
{ "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, 1649, 5405, 72676, 1155, 353, 8840, 836, 8, 341, 2405, 1487, 284, 15690, 62318, 17415, 11, 895, 11, 895, 692, 6725, 4202, 72676, 14031, 9051, 17415, 340, 2405, 2188, 4651, 11, 716, 284, 1487, 44242, 72676, 741, 743, 2188, 4651, 961, 68509, 17415, 341, 197, 3244, 13080, 445, 32462, 25, 1018, 67, 3601, 25, 1018, 67, 497, 2188, 4651, 11, 68509, 17415, 340, 197, 532, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestEmptyCallStack(t *testing.T) { t.Parallel() var buf bytes.Buffer p := NewProfile("test18836") p.Add("foo", 47674) p.WriteTo(&buf, 1) p.Remove("foo") got := buf.String() prefix := "test18836 profile: total 1\n" if !strings.HasPrefix(got, prefix) { t.Fatalf("got:\n\t%q\nwant prefix:\n\t%q\n", got, prefix) } lostevent := "lostProfileEvent" if !strings.Contains(got, lostevent) { t.Fatalf("got:\n\t%q\ndoes not contain:\n\t%q\n", got, lostevent) } }
explode_data.jsonl/13656
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 205 }
[ 2830, 3393, 3522, 7220, 4336, 1155, 353, 8840, 836, 8, 341, 3244, 41288, 7957, 741, 2405, 6607, 5820, 22622, 198, 3223, 1669, 1532, 8526, 445, 1944, 16, 23, 23, 18, 21, 1138, 3223, 1904, 445, 7975, 497, 220, 19, 22, 21, 22, 19, 340, 3223, 4073, 1249, 2099, 5909, 11, 220, 16, 340, 3223, 13270, 445, 7975, 1138, 3174, 354, 1669, 6607, 6431, 741, 3223, 5060, 1669, 330, 1944, 16, 23, 23, 18, 21, 5526, 25, 2790, 220, 16, 1699, 698, 743, 753, 18594, 94357, 3268, 354, 11, 9252, 8, 341, 197, 3244, 30762, 445, 22390, 7190, 77, 4955, 4, 80, 1699, 52657, 9252, 7190, 77, 4955, 4, 80, 1699, 497, 2684, 11, 9252, 340, 197, 532, 197, 54337, 3087, 1669, 330, 54337, 8526, 1556, 698, 743, 753, 18594, 11545, 3268, 354, 11, 5558, 3087, 8, 341, 197, 3244, 30762, 445, 22390, 7190, 77, 4955, 4, 80, 59, 303, 7072, 537, 6644, 7190, 77, 4955, 4, 80, 1699, 497, 2684, 11, 5558, 3087, 340, 197, 532, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestWorkspace_ReadPipelineManifest(t *testing.T) { copilotDir := "/copilot" testCases := map[string]struct { fs func() afero.Fs expectedError error }{ "reads existing pipeline manifest": { fs: func() afero.Fs { fs := afero.NewMemMapFs() fs.MkdirAll("/copilot", 0755) manifest, _ := fs.Create("/copilot/pipeline.yml") defer manifest.Close() manifest.Write([]byte("hello")) return fs }, expectedError: nil, }, "when no pipeline file exists": { fs: func() afero.Fs { fs := afero.NewMemMapFs() fs.Mkdir(copilotDir, 0755) return fs }, expectedError: ErrNoPipelineInWorkspace, }, } for name, tc := range testCases { t.Run(name, func(t *testing.T) { // GIVEN fs := tc.fs() ws := &Workspace{ copilotDir: copilotDir, fsUtils: &afero.Afero{Fs: fs}, } // WHEN _, err := ws.ReadPipelineManifest() // THEN if tc.expectedError != nil { require.Equal(t, tc.expectedError.Error(), err.Error()) } else { require.NoError(t, err) } }) } }
explode_data.jsonl/30121
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 501 }
[ 2830, 3393, 45981, 38381, 34656, 38495, 1155, 353, 8840, 836, 8, 341, 1444, 453, 23958, 6184, 1669, 3521, 37728, 23958, 698, 18185, 37302, 1669, 2415, 14032, 60, 1235, 341, 197, 53584, 310, 2915, 368, 264, 802, 78, 991, 82, 198, 197, 42400, 1454, 1465, 198, 197, 59403, 197, 197, 1, 30358, 6350, 15301, 14455, 788, 341, 298, 53584, 25, 2915, 368, 264, 802, 78, 991, 82, 341, 571, 53584, 1669, 264, 802, 78, 7121, 18816, 2227, 48300, 741, 571, 53584, 1321, 12438, 2403, 4283, 37728, 23958, 497, 220, 15, 22, 20, 20, 340, 571, 197, 42315, 11, 716, 1669, 8619, 7251, 4283, 37728, 23958, 4322, 8790, 33936, 1138, 571, 16867, 14455, 10421, 741, 571, 197, 42315, 4073, 10556, 3782, 445, 14990, 5455, 571, 853, 8619, 198, 298, 197, 1583, 298, 42400, 1454, 25, 2092, 345, 197, 197, 15766, 197, 197, 1, 9309, 902, 15301, 1034, 6724, 788, 341, 298, 53584, 25, 2915, 368, 264, 802, 78, 991, 82, 341, 571, 53584, 1669, 264, 802, 78, 7121, 18816, 2227, 48300, 741, 571, 53584, 1321, 12438, 1337, 453, 23958, 6184, 11, 220, 15, 22, 20, 20, 340, 571, 853, 8619, 198, 298, 197, 1583, 298, 42400, 1454, 25, 15495, 2753, 34656, 641, 45981, 345, 197, 197, 1583, 197, 630, 2023, 829, 11, 17130, 1669, 2088, 1273, 37302, 341, 197, 3244, 16708, 3153, 11, 2915, 1155, 353, 8840, 836, 8, 341, 298, 197, 322, 89836, 198, 298, 53584, 1669, 17130, 41355, 741, 298, 6692, 82, 1669, 609, 45981, 515, 571, 1444, 453, 23958, 6184, 25, 6162, 23958, 6184, 345, 571, 53584, 4209, 25, 262, 609, 64, 802, 78, 875, 802, 78, 90, 48300, 25, 8619, 1583, 298, 197, 630, 298, 197, 322, 33633, 198, 298, 197, 6878, 1848, 1669, 17624, 6503, 34656, 38495, 2822, 298, 197, 322, 24117, 198, 298, 743, 17130, 56835, 1454, 961, 2092, 341, 571, 17957, 12808, 1155, 11, 17130, 56835, 1454, 6141, 1507, 1848, 6141, 2398, 298, 197, 92, 770, 341, 571, 17957, 35699, 1155, 11, 1848, 340, 298, 197, 532, 197, 197, 3518, 197, 532, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestAlignment(t *testing.T) { type T1inner struct { a int } type T1 struct { T1inner f int } type T2inner struct { a, b int } type T2 struct { T2inner f int } x := T1{T1inner{2}, 17} check2ndField(x, uintptr(unsafe.Pointer(&x.f))-uintptr(unsafe.Pointer(&x)), t) x1 := T2{T2inner{2, 3}, 17} check2ndField(x1, uintptr(unsafe.Pointer(&x1.f))-uintptr(unsafe.Pointer(&x1)), t) }
explode_data.jsonl/29543
{ "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, 7033, 1155, 353, 8840, 836, 8, 341, 13158, 350, 16, 4382, 2036, 341, 197, 11323, 526, 198, 197, 532, 13158, 350, 16, 2036, 341, 197, 10261, 16, 4382, 198, 197, 1166, 526, 198, 197, 532, 13158, 350, 17, 4382, 2036, 341, 197, 11323, 11, 293, 526, 198, 197, 532, 13158, 350, 17, 2036, 341, 197, 10261, 17, 4382, 198, 197, 1166, 526, 198, 197, 630, 10225, 1669, 350, 16, 76025, 16, 4382, 90, 17, 2137, 220, 16, 22, 532, 25157, 17, 303, 1877, 2075, 11, 38190, 7, 38157, 41275, 2099, 87, 833, 64540, 51380, 7, 38157, 41275, 2099, 87, 5731, 259, 692, 10225, 16, 1669, 350, 17, 76025, 17, 4382, 90, 17, 11, 220, 18, 2137, 220, 16, 22, 532, 25157, 17, 303, 1877, 2075, 16, 11, 38190, 7, 38157, 41275, 2099, 87, 16, 833, 64540, 51380, 7, 38157, 41275, 2099, 87, 16, 5731, 259, 340, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestVersion(t *testing.T) { version1 := "20.02.15" version2 := "20.03.25" fmt.Println(CompareVersion(version1, version2)) version1 = "1.0.13" version2 = "1.0.1a" fmt.Println(CompareVersion(version1, version2)) version1 = "1.0.131" version2 = "1.0.1a" fmt.Println(CompareVersion(version1, version2)) version1 = "1.1.131" version2 = "1.10.1a" fmt.Println(CompareVersion(version1, version2)) version1 = "1.0.4" version2 = "1.1.1" fmt.Println(CompareVersion(version1, version2)) }
explode_data.jsonl/1125
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 221 }
[ 2830, 3393, 5637, 1155, 353, 8840, 836, 8, 341, 74954, 16, 1669, 330, 17, 15, 13, 15, 17, 13, 16, 20, 698, 74954, 17, 1669, 330, 17, 15, 13, 15, 18, 13, 17, 20, 698, 11009, 12419, 7, 27374, 5637, 37770, 16, 11, 2319, 17, 4390, 74954, 16, 284, 330, 16, 13, 15, 13, 16, 18, 698, 74954, 17, 284, 330, 16, 13, 15, 13, 16, 64, 698, 11009, 12419, 7, 27374, 5637, 37770, 16, 11, 2319, 17, 4390, 74954, 16, 284, 330, 16, 13, 15, 13, 16, 18, 16, 698, 74954, 17, 284, 330, 16, 13, 15, 13, 16, 64, 698, 11009, 12419, 7, 27374, 5637, 37770, 16, 11, 2319, 17, 4390, 74954, 16, 284, 330, 16, 13, 16, 13, 16, 18, 16, 698, 74954, 17, 284, 330, 16, 13, 16, 15, 13, 16, 64, 698, 11009, 12419, 7, 27374, 5637, 37770, 16, 11, 2319, 17, 4390, 74954, 16, 284, 330, 16, 13, 15, 13, 19, 698, 74954, 17, 284, 330, 16, 13, 16, 13, 16, 698, 11009, 12419, 7, 27374, 5637, 37770, 16, 11, 2319, 17, 1171, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestNatSort(t *testing.T) { // Validate that the order of SRV records returned by a DNS // lookup for a k8s StatefulSet are ordered as expected when // a natsort is done. input := []string{ "memcached-10.memcached.cortex.svc.cluster.local.", "memcached-1.memcached.cortex.svc.cluster.local.", "memcached-6.memcached.cortex.svc.cluster.local.", "memcached-3.memcached.cortex.svc.cluster.local.", "memcached-25.memcached.cortex.svc.cluster.local.", } expected := []string{ "memcached-1.memcached.cortex.svc.cluster.local.", "memcached-3.memcached.cortex.svc.cluster.local.", "memcached-6.memcached.cortex.svc.cluster.local.", "memcached-10.memcached.cortex.svc.cluster.local.", "memcached-25.memcached.cortex.svc.cluster.local.", } natsort.Sort(input) require.Equal(t, expected, input) }
explode_data.jsonl/2661
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 350 }
[ 2830, 3393, 65214, 10231, 1155, 353, 8840, 836, 8, 341, 197, 322, 23282, 429, 279, 1973, 315, 20880, 53, 7424, 5927, 553, 264, 27598, 198, 197, 322, 18615, 369, 264, 595, 23, 82, 3234, 1262, 1649, 525, 11457, 438, 3601, 979, 198, 197, 322, 264, 308, 1862, 371, 374, 2814, 624, 22427, 1669, 3056, 917, 515, 197, 197, 1, 10536, 32918, 12, 16, 15, 41493, 32918, 520, 44592, 514, 7362, 40501, 11033, 10346, 197, 197, 1, 10536, 32918, 12, 16, 41493, 32918, 520, 44592, 514, 7362, 40501, 11033, 10346, 197, 197, 1, 10536, 32918, 12, 21, 41493, 32918, 520, 44592, 514, 7362, 40501, 11033, 10346, 197, 197, 1, 10536, 32918, 12, 18, 41493, 32918, 520, 44592, 514, 7362, 40501, 11033, 10346, 197, 197, 1, 10536, 32918, 12, 17, 20, 41493, 32918, 520, 44592, 514, 7362, 40501, 11033, 10346, 197, 630, 42400, 1669, 3056, 917, 515, 197, 197, 1, 10536, 32918, 12, 16, 41493, 32918, 520, 44592, 514, 7362, 40501, 11033, 10346, 197, 197, 1, 10536, 32918, 12, 18, 41493, 32918, 520, 44592, 514, 7362, 40501, 11033, 10346, 197, 197, 1, 10536, 32918, 12, 21, 41493, 32918, 520, 44592, 514, 7362, 40501, 11033, 10346, 197, 197, 1, 10536, 32918, 12, 16, 15, 41493, 32918, 520, 44592, 514, 7362, 40501, 11033, 10346, 197, 197, 1, 10536, 32918, 12, 17, 20, 41493, 32918, 520, 44592, 514, 7362, 40501, 11033, 10346, 197, 630, 9038, 1862, 371, 35976, 5384, 340, 17957, 12808, 1155, 11, 3601, 11, 1946, 340, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestMetricsMiddleware(t *testing.T) { cfg := newFakeKeycloakConfig() cfg.EnableMetrics = true cfg.LocalhostMetrics = true requests := []fakeRequest{ { URI: cfg.WithOAuthURI(metricsURL), Headers: map[string]string{ "X-Forwarded-For": "10.0.0.1", }, ExpectedCode: http.StatusForbidden, }, // Some request must run before this one to generate request status numbers { URI: cfg.WithOAuthURI(metricsURL), ExpectedCode: http.StatusOK, ExpectedContentContains: "proxy_request_status_total", }, } newFakeProxy(cfg).RunTests(t, requests) }
explode_data.jsonl/14746
{ "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, 27328, 24684, 1155, 353, 8840, 836, 8, 341, 50286, 1669, 501, 52317, 1592, 88751, 2648, 741, 50286, 32287, 27328, 284, 830, 198, 50286, 20856, 3790, 27328, 284, 830, 198, 23555, 82, 1669, 3056, 30570, 1900, 515, 197, 197, 515, 298, 197, 10301, 25, 13286, 26124, 57850, 10301, 89788, 3144, 1326, 298, 197, 10574, 25, 2415, 14032, 30953, 515, 571, 197, 1, 55, 12, 25925, 291, 12, 2461, 788, 330, 16, 15, 13, 15, 13, 15, 13, 16, 756, 298, 197, 1583, 298, 197, 18896, 2078, 25, 1758, 10538, 69115, 345, 197, 197, 1583, 197, 197, 322, 4329, 1681, 1969, 1598, 1573, 419, 825, 311, 6923, 1681, 2639, 5109, 198, 197, 197, 515, 298, 197, 10301, 25, 3824, 13286, 26124, 57850, 10301, 89788, 3144, 1326, 298, 197, 18896, 2078, 25, 310, 1758, 52989, 345, 298, 197, 18896, 2762, 23805, 25, 330, 22803, 7893, 4773, 10784, 756, 197, 197, 1583, 197, 532, 8638, 52317, 16219, 28272, 568, 6727, 18200, 1155, 11, 7388, 340, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestProviderRateLimiterHandler_Handle_SourceMicroService(t *testing.T) { t.Log("testing providerratelimiter handler with source microservice and qps enabled as true") initEnv() c := handler.Chain{} c.AddHandler(&handler.ProviderRateLimiterHandler{}) config.GlobalDefinition = &model.GlobalCfg{} config.GlobalDefinition.Cse.FlowControl.Provider.QPS.Enabled = true i := &invocation.Invocation{ SourceMicroService: "service1", SchemaID: "schema1", OperationID: "SayHello", Args: &helloworld.HelloRequest{Name: "peter"}, } c.Next(i, func(r *invocation.Response) error { assert.NoError(t, r.Err) log.Println(r.Result) return r.Err }) }
explode_data.jsonl/62821
{ "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, 5179, 11564, 43, 17700, 3050, 42714, 48122, 34609, 1860, 1155, 353, 8840, 836, 8, 341, 3244, 5247, 445, 8840, 2059, 59609, 301, 17700, 7013, 448, 2530, 8003, 7936, 323, 2804, 1690, 8970, 438, 830, 5130, 28248, 14359, 741, 1444, 1669, 7013, 98269, 16094, 1444, 1904, 3050, 2099, 17905, 36208, 11564, 43, 17700, 3050, 6257, 692, 25873, 27381, 10398, 284, 609, 2528, 27381, 42467, 16094, 25873, 27381, 10398, 727, 325, 60732, 3273, 36208, 10003, 5012, 13690, 284, 830, 198, 8230, 1669, 609, 14057, 2276, 68401, 2276, 515, 197, 197, 3608, 34609, 1860, 25, 330, 7936, 16, 756, 197, 77838, 915, 25, 1843, 330, 17349, 16, 756, 197, 197, 8432, 915, 25, 286, 330, 45764, 9707, 756, 197, 197, 4117, 25, 2290, 609, 71, 95292, 3839, 4791, 1900, 63121, 25, 330, 79, 1404, 7115, 197, 532, 1444, 18501, 1956, 11, 2915, 2601, 353, 14057, 2276, 12574, 8, 1465, 341, 197, 6948, 35699, 1155, 11, 435, 27862, 340, 197, 6725, 12419, 2601, 18456, 340, 197, 853, 435, 27862, 198, 197, 3518, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestWatchNewFile(t *testing.T) { t.Parallel() dir, ks := tmpKeyStore(t, false) defer os.RemoveAll(dir) // Ensure the watcher is started before adding any files. ks.Accounts() time.Sleep(1000 * time.Millisecond) // Move in the files. wantAccounts := make([]accounts.Account, len(cachetestAccounts)) for i := range cachetestAccounts { wantAccounts[i] = accounts.Account{ Address: cachetestAccounts[i].Address, URL: accounts.URL{Scheme: KeyStoreScheme, Path: filepath.Join(dir, filepath.Base(cachetestAccounts[i].URL.Path))}, } if err := cp.CopyFile(wantAccounts[i].URL.Path, cachetestAccounts[i].URL.Path); err != nil { t.Fatal(err) } } // ks should see the accounts. var list []accounts.Account for d := 200 * time.Millisecond; d < 5*time.Second; d *= 2 { list = ks.Accounts() if reflect.DeepEqual(list, wantAccounts) { // ks should have also received change notifications select { case <-ks.changes: default: t.Fatalf("wasn't notified of new accounts") } return } time.Sleep(d) } t.Errorf("got %s, want %s", spew.Sdump(list), spew.Sdump(wantAccounts)) }
explode_data.jsonl/36027
{ "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, 14247, 3564, 1703, 1155, 353, 8840, 836, 8, 341, 3244, 41288, 7957, 2822, 48532, 11, 41282, 1669, 4174, 1592, 6093, 1155, 11, 895, 340, 16867, 2643, 84427, 14161, 692, 197, 322, 29279, 279, 55727, 374, 3855, 1573, 7842, 894, 3542, 624, 197, 2787, 30877, 82, 741, 21957, 31586, 7, 16, 15, 15, 15, 353, 882, 71482, 692, 197, 322, 14561, 304, 279, 3542, 624, 50780, 41369, 1669, 1281, 10556, 26206, 30877, 11, 2422, 1337, 610, 57824, 41369, 1171, 2023, 600, 1669, 2088, 60287, 57824, 41369, 341, 197, 50780, 41369, 989, 60, 284, 9618, 30877, 515, 298, 98090, 25, 60287, 57824, 41369, 989, 936, 4286, 345, 298, 79055, 25, 257, 9618, 20893, 90, 28906, 25, 5309, 6093, 28906, 11, 7933, 25, 26054, 22363, 14161, 11, 26054, 13018, 1337, 610, 57824, 41369, 989, 936, 3144, 17474, 593, 1583, 197, 197, 532, 197, 743, 1848, 1669, 12490, 31770, 1703, 3622, 517, 41369, 989, 936, 3144, 17474, 11, 60287, 57824, 41369, 989, 936, 3144, 17474, 1215, 1848, 961, 2092, 341, 298, 3244, 26133, 3964, 340, 197, 197, 532, 197, 630, 197, 322, 41282, 1265, 1490, 279, 9618, 624, 2405, 1140, 3056, 26206, 30877, 198, 2023, 294, 1669, 220, 17, 15, 15, 353, 882, 71482, 26, 294, 366, 220, 20, 77053, 32435, 26, 294, 11404, 220, 17, 341, 197, 14440, 284, 41282, 30877, 82, 741, 197, 743, 8708, 94750, 7307, 11, 1366, 41369, 8, 341, 298, 197, 322, 41282, 1265, 614, 1083, 3949, 2297, 21969, 198, 298, 38010, 341, 298, 2722, 9119, 2787, 5329, 5520, 510, 298, 11940, 510, 571, 3244, 30762, 445, 16123, 77, 944, 29216, 315, 501, 9618, 1138, 298, 197, 532, 298, 853, 198, 197, 197, 532, 197, 21957, 31586, 1500, 340, 197, 532, 3244, 13080, 445, 22390, 1018, 82, 11, 1366, 1018, 82, 497, 978, 365, 808, 27660, 7307, 701, 978, 365, 808, 27660, 3622, 517, 41369, 1171, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestNewPairs(t *testing.T) { for _, tc := range []struct { Name string Local Candidates Remote Candidates Result Pairs }{ { Name: "Blank", }, { Name: "No pairs", Local: Candidates{ { Addr: Addr{ IP: net.ParseIP("1.1.1.1"), }, }, }, Remote: Candidates{ { Addr: Addr{ IP: net.ParseIP("2001:11:12:13:14:15:16:17"), }, }, }, }, { Name: "Simple", Local: Candidates{ { Addr: Addr{ IP: net.ParseIP("1.1.1.1"), }, }, }, Remote: Candidates{ { Addr: Addr{ IP: net.ParseIP("1.1.1.2"), }, }, }, Result: Pairs{ { Local: Candidate{ Addr: Addr{ IP: net.ParseIP("1.1.1.1"), }, }, Remote: Candidate{ Addr: Addr{ IP: net.ParseIP("1.1.1.2"), }, }, }, }, }, } { t.Run(tc.Name, func(t *testing.T) { got := NewPairs(tc.Local, tc.Remote) if len(got) != len(tc.Result) { t.Fatalf("bad length: %d (got) != %d (expected)", len(got), len(tc.Result)) } for i := range tc.Result { expectedAddr := tc.Result[i].Remote.Addr gotAddr := got[i].Remote.Addr if !gotAddr.Equal(expectedAddr) { t.Errorf("[%d]: remote addr mismatch: %s (got) != %s (expected)", i, gotAddr, expectedAddr) } expectedAddr = tc.Result[i].Local.Addr gotAddr = got[i].Local.Addr if !gotAddr.Equal(expectedAddr) { t.Errorf("[%d]: local addr mismatch: %s (got) != %s (expected)", i, gotAddr, expectedAddr) } } }) } }
explode_data.jsonl/9182
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 862 }
[ 2830, 3393, 3564, 54228, 1155, 353, 8840, 836, 8, 341, 2023, 8358, 17130, 1669, 2088, 3056, 1235, 341, 197, 21297, 256, 914, 198, 197, 82404, 220, 64438, 198, 197, 197, 24703, 64438, 198, 197, 56503, 393, 4720, 198, 197, 59403, 197, 197, 515, 298, 21297, 25, 330, 22770, 756, 197, 197, 1583, 197, 197, 515, 298, 21297, 25, 330, 2753, 13530, 756, 298, 82404, 25, 64438, 515, 571, 197, 515, 464, 197, 13986, 25, 72585, 515, 1144, 197, 3298, 25, 4179, 8937, 3298, 445, 16, 13, 16, 13, 16, 13, 16, 4461, 464, 197, 1583, 571, 197, 1583, 298, 197, 1583, 298, 197, 24703, 25, 64438, 515, 571, 197, 515, 464, 197, 13986, 25, 72585, 515, 1144, 197, 3298, 25, 4179, 8937, 3298, 445, 17, 15, 15, 16, 25, 16, 16, 25, 16, 17, 25, 16, 18, 25, 16, 19, 25, 16, 20, 25, 16, 21, 25, 16, 22, 4461, 464, 197, 1583, 571, 197, 1583, 298, 197, 1583, 197, 197, 1583, 197, 197, 515, 298, 21297, 25, 330, 16374, 756, 298, 82404, 25, 64438, 515, 571, 197, 515, 464, 197, 13986, 25, 72585, 515, 1144, 197, 3298, 25, 4179, 8937, 3298, 445, 16, 13, 16, 13, 16, 13, 16, 4461, 464, 197, 1583, 571, 197, 1583, 298, 197, 1583, 298, 197, 24703, 25, 64438, 515, 571, 197, 515, 464, 197, 13986, 25, 72585, 515, 1144, 197, 3298, 25, 4179, 8937, 3298, 445, 16, 13, 16, 13, 16, 13, 17, 4461, 464, 197, 1583, 571, 197, 1583, 298, 197, 1583, 298, 56503, 25, 393, 4720, 515, 571, 197, 515, 464, 82404, 25, 49583, 515, 1144, 197, 13986, 25, 72585, 515, 1662, 197, 3298, 25, 4179, 8937, 3298, 445, 16, 13, 16, 13, 16, 13, 16, 4461, 1144, 197, 1583, 464, 197, 1583, 464, 197, 24703, 25, 49583, 515, 1144, 197, 13986, 25, 72585, 515, 1662, 197, 3298, 25, 4179, 8937, 3298, 445, 16, 13, 16, 13, 16, 13, 17, 4461, 1144, 197, 1583, 464, 197, 1583, 571, 197, 1583, 298, 197, 1583, 197, 197, 1583, 197, 92, 341, 197, 3244, 16708, 44415, 2967, 11, 2915, 1155, 353, 8840, 836, 8, 341, 298, 3174, 354, 1669, 1532, 54228, 44415, 20856, 11, 17130, 51434, 340, 298, 743, 2422, 3268, 354, 8, 961, 2422, 44415, 18456, 8, 341, 571, 3244, 30762, 445, 13855, 3084, 25, 1018, 67, 320, 22390, 8, 961, 1018, 67, 320, 7325, 11583, 2422, 3268, 354, 701, 2422, 44415, 18456, 1171, 298, 197, 532, 298, 2023, 600, 1669, 2088, 17130, 18456, 341, 571, 42400, 13986, 1669, 17130, 18456, 989, 936, 24703, 93626, 198, 571, 3174, 354, 13986, 1669, 2684, 989, 936, 24703, 93626, 198, 571, 743, 753, 22390, 13986, 12808, 15253, 13986, 8, 341, 464, 3244, 13080, 57252, 67, 5669, 8699, 10789, 35301, 25, 1018, 82, 320, 22390, 8, 961, 1018, 82, 320, 7325, 11583, 600, 11, 2684, 13986, 11, 3601, 13986, 340, 571, 197, 532, 571, 42400, 13986, 284, 17130, 18456, 989, 936, 7319, 93626, 198, 571, 3174, 354, 13986, 284, 2684, 989, 936, 7319, 93626, 198, 571, 743, 753, 22390, 13986, 12808, 15253, 13986, 8, 341, 464, 3244, 13080, 57252, 67, 5669, 2205, 10789, 35301, 25, 1018, 82, 320, 22390, 8, 961, 1018, 82, 320, 7325, 11583, 600, 11, 2684, 13986, 11, 3601, 13986, 340, 571, 197, 532, 298, 197, 532, 197, 197, 3518, 197, 532, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
5
func TestReconcilePrivateDNS(t *testing.T) { testcases := []struct { name string expectedError string expect func(s *mock_privatedns.MockScopeMockRecorder, m *mock_privatedns.MockclientMockRecorder) }{ { name: "no private dns", expectedError: "", expect: func(s *mock_privatedns.MockScopeMockRecorder, m *mock_privatedns.MockclientMockRecorder) { s.PrivateDNSSpec().Return(nil) }, }, { name: "create ipv4 private dns successfully", expectedError: "", expect: func(s *mock_privatedns.MockScopeMockRecorder, m *mock_privatedns.MockclientMockRecorder) { s.V(gomock.AssignableToTypeOf(2)).AnyTimes().Return(klogr.New()) s.PrivateDNSSpec().Return(&azure.PrivateDNSSpec{ ZoneName: "my-dns-zone", VNetName: "my-vnet", VNetResourceGroup: "vnet-rg", LinkName: "my-link", Records: []infrav1.AddressRecord{ { Hostname: "hostname-1", IP: "10.0.0.8", }, }, }) s.ResourceGroup().AnyTimes().Return("my-rg") s.SubscriptionID().Return("123") m.CreateOrUpdateZone(gomockinternal.AContext(), "my-rg", "my-dns-zone", privatedns.PrivateZone{Location: to.StringPtr(azure.Global)}) m.CreateOrUpdateLink(gomockinternal.AContext(), "my-rg", "my-dns-zone", "my-link", privatedns.VirtualNetworkLink{ VirtualNetworkLinkProperties: &privatedns.VirtualNetworkLinkProperties{ VirtualNetwork: &privatedns.SubResource{ ID: to.StringPtr("/subscriptions/123/resourceGroups/vnet-rg/providers/Microsoft.Network/virtualNetworks/my-vnet"), }, RegistrationEnabled: to.BoolPtr(false), }, Location: to.StringPtr(azure.Global), }) m.CreateOrUpdateRecordSet(gomockinternal.AContext(), "my-rg", "my-dns-zone", privatedns.A, "hostname-1", privatedns.RecordSet{ RecordSetProperties: &privatedns.RecordSetProperties{ TTL: to.Int64Ptr(300), ARecords: &[]privatedns.ARecord{ { Ipv4Address: to.StringPtr("10.0.0.8"), }, }, }, }) }, }, { name: "create ipv6 private dns successfully", expectedError: "", expect: func(s *mock_privatedns.MockScopeMockRecorder, m *mock_privatedns.MockclientMockRecorder) { s.V(gomock.AssignableToTypeOf(2)).AnyTimes().Return(klogr.New()) s.PrivateDNSSpec().Return(&azure.PrivateDNSSpec{ ZoneName: "my-dns-zone", VNetName: "my-vnet", VNetResourceGroup: "vnet-rg", LinkName: "my-link", Records: []infrav1.AddressRecord{ { Hostname: "hostname-2", IP: "2603:1030:805:2::b", }, }, }) s.ResourceGroup().AnyTimes().Return("my-rg") s.SubscriptionID().Return("123") m.CreateOrUpdateZone(gomockinternal.AContext(), "my-rg", "my-dns-zone", privatedns.PrivateZone{Location: to.StringPtr(azure.Global)}) m.CreateOrUpdateLink(gomockinternal.AContext(), "my-rg", "my-dns-zone", "my-link", privatedns.VirtualNetworkLink{ VirtualNetworkLinkProperties: &privatedns.VirtualNetworkLinkProperties{ VirtualNetwork: &privatedns.SubResource{ ID: to.StringPtr("/subscriptions/123/resourceGroups/vnet-rg/providers/Microsoft.Network/virtualNetworks/my-vnet"), }, RegistrationEnabled: to.BoolPtr(false), }, Location: to.StringPtr(azure.Global), }) m.CreateOrUpdateRecordSet(gomockinternal.AContext(), "my-rg", "my-dns-zone", privatedns.AAAA, "hostname-2", privatedns.RecordSet{ RecordSetProperties: &privatedns.RecordSetProperties{ TTL: to.Int64Ptr(300), AaaaRecords: &[]privatedns.AaaaRecord{ { Ipv6Address: to.StringPtr("2603:1030:805:2::b"), }, }, }, }) }, }, { name: "link creation fails", expectedError: "failed to create virtual network link my-link: #: Internal Server Error: StatusCode=500", expect: func(s *mock_privatedns.MockScopeMockRecorder, m *mock_privatedns.MockclientMockRecorder) { s.V(gomock.AssignableToTypeOf(2)).AnyTimes().Return(klogr.New()) s.PrivateDNSSpec().Return(&azure.PrivateDNSSpec{ ZoneName: "my-dns-zone", VNetName: "my-vnet", VNetResourceGroup: "vnet-rg", LinkName: "my-link", Records: []infrav1.AddressRecord{ { Hostname: "hostname-1", IP: "10.0.0.8", }, }, }) s.ResourceGroup().AnyTimes().Return("my-rg") s.SubscriptionID().Return("123") m.CreateOrUpdateZone(gomockinternal.AContext(), "my-rg", "my-dns-zone", privatedns.PrivateZone{Location: to.StringPtr(azure.Global)}) m.CreateOrUpdateLink(gomockinternal.AContext(), "my-rg", "my-dns-zone", "my-link", privatedns.VirtualNetworkLink{ VirtualNetworkLinkProperties: &privatedns.VirtualNetworkLinkProperties{ VirtualNetwork: &privatedns.SubResource{ ID: to.StringPtr("/subscriptions/123/resourceGroups/vnet-rg/providers/Microsoft.Network/virtualNetworks/my-vnet"), }, RegistrationEnabled: to.BoolPtr(false), }, Location: to.StringPtr(azure.Global), }).Return(autorest.NewErrorWithResponse("", "", &http.Response{StatusCode: 500}, "Internal Server Error")) }, }, } for _, tc := range testcases { tc := tc t.Run(tc.name, func(t *testing.T) { g := NewWithT(t) t.Parallel() mockCtrl := gomock.NewController(t) defer mockCtrl.Finish() scopeMock := mock_privatedns.NewMockScope(mockCtrl) clientMock := mock_privatedns.NewMockclient(mockCtrl) tc.expect(scopeMock.EXPECT(), clientMock.EXPECT()) s := &Service{ Scope: scopeMock, client: clientMock, } err := s.Reconcile(context.TODO()) if tc.expectedError != "" { g.Expect(err).To(HaveOccurred()) g.Expect(err).To(MatchError(tc.expectedError)) } else { g.Expect(err).NotTo(HaveOccurred()) } }) } }
explode_data.jsonl/70329
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 2724 }
[ 2830, 3393, 693, 40446, 457, 16787, 61088, 1155, 353, 8840, 836, 8, 341, 18185, 23910, 1669, 3056, 1235, 341, 197, 11609, 688, 914, 198, 197, 42400, 1454, 914, 198, 197, 24952, 286, 2915, 1141, 353, 16712, 24726, 657, 4412, 24664, 10803, 11571, 47023, 11, 296, 353, 16712, 24726, 657, 4412, 24664, 2972, 11571, 47023, 340, 197, 59403, 197, 197, 515, 298, 11609, 25, 688, 330, 2152, 869, 44077, 756, 298, 42400, 1454, 25, 8324, 298, 24952, 25, 2915, 1141, 353, 16712, 24726, 657, 4412, 24664, 10803, 11571, 47023, 11, 296, 353, 16712, 24726, 657, 4412, 24664, 2972, 11571, 47023, 8, 341, 571, 1903, 87738, 31264, 1220, 992, 1005, 5598, 27907, 340, 298, 197, 1583, 197, 197, 1583, 197, 197, 515, 298, 11609, 25, 688, 330, 3182, 45475, 19, 869, 44077, 7790, 756, 298, 42400, 1454, 25, 8324, 298, 24952, 25, 2915, 1141, 353, 16712, 24726, 657, 4412, 24664, 10803, 11571, 47023, 11, 296, 353, 16712, 24726, 657, 4412, 24664, 2972, 11571, 47023, 8, 341, 571, 1903, 5058, 3268, 316, 1176, 86971, 480, 1249, 929, 2124, 7, 17, 4579, 8610, 18889, 1005, 5598, 5969, 839, 81, 7121, 2398, 571, 1903, 87738, 31264, 1220, 992, 1005, 5598, 2099, 39495, 87738, 31264, 1220, 992, 515, 464, 197, 15363, 675, 25, 688, 330, 2408, 1737, 4412, 77763, 756, 464, 17446, 6954, 675, 25, 688, 330, 2408, 8273, 4711, 756, 464, 17446, 6954, 4783, 2808, 25, 330, 85, 4711, 12, 1984, 756, 464, 197, 3939, 675, 25, 688, 330, 2408, 8965, 756, 464, 197, 25876, 25, 3056, 258, 1626, 402, 16, 26979, 6471, 515, 1144, 197, 515, 1662, 197, 88839, 25, 330, 27806, 12, 16, 756, 1662, 197, 3298, 25, 981, 330, 16, 15, 13, 15, 13, 15, 13, 23, 756, 1144, 197, 1583, 464, 197, 1583, 571, 197, 3518, 571, 1903, 20766, 2808, 1005, 8610, 18889, 1005, 5598, 445, 2408, 12, 1984, 1138, 571, 1903, 12391, 12124, 915, 1005, 5598, 445, 16, 17, 18, 1138, 571, 2109, 7251, 56059, 15363, 3268, 316, 1176, 10481, 875, 1972, 1507, 330, 2408, 12, 1984, 497, 330, 2408, 1737, 4412, 77763, 497, 6095, 657, 4412, 87738, 15363, 90, 4707, 25, 311, 6431, 5348, 7, 39495, 27381, 59209, 571, 2109, 7251, 56059, 3939, 3268, 316, 1176, 10481, 875, 1972, 1507, 330, 2408, 12, 1984, 497, 330, 2408, 1737, 4412, 77763, 497, 330, 2408, 8965, 497, 6095, 657, 4412, 95979, 12320, 3939, 515, 464, 17446, 2901, 12320, 3939, 7903, 25, 609, 11887, 657, 4412, 95979, 12320, 3939, 7903, 515, 1144, 17446, 2901, 12320, 25, 609, 11887, 657, 4412, 12391, 4783, 515, 1662, 29580, 25, 311, 6431, 5348, 4283, 72560, 14, 16, 17, 18, 53100, 22173, 5457, 4711, 12, 1984, 82543, 10270, 3929, 30149, 5457, 2901, 12320, 82, 34198, 8273, 4711, 4461, 1144, 197, 1583, 1144, 197, 23365, 5462, 25, 311, 52497, 5348, 3576, 1326, 464, 197, 1583, 464, 197, 4707, 25, 311, 6431, 5348, 7, 39495, 27381, 1326, 571, 197, 3518, 571, 2109, 7251, 56059, 6471, 1649, 3268, 316, 1176, 10481, 875, 1972, 1507, 330, 2408, 12, 1984, 497, 330, 2408, 1737, 4412, 77763, 497, 6095, 657, 4412, 875, 11, 330, 27806, 12, 16, 497, 6095, 657, 4412, 49959, 1649, 515, 464, 197, 6471, 1649, 7903, 25, 609, 11887, 657, 4412, 49959, 1649, 7903, 515, 1144, 10261, 13470, 25, 311, 7371, 21, 19, 5348, 7, 18, 15, 15, 1326, 1144, 22985, 25876, 25, 609, 1294, 11887, 657, 4412, 875, 6471, 515, 1662, 197, 515, 2683, 197, 80656, 19, 4286, 25, 311, 6431, 5348, 445, 16, 15, 13, 15, 13, 15, 13, 23, 4461, 1662, 197, 1583, 1144, 197, 1583, 464, 197, 1583, 571, 197, 3518, 298, 197, 1583, 197, 197, 1583, 197, 197, 515, 298, 11609, 25, 688, 330, 3182, 45475, 21, 869, 44077, 7790, 756, 298, 42400, 1454, 25, 8324, 298, 24952, 25, 2915, 1141, 353, 16712, 24726, 657, 4412, 24664, 10803, 11571, 47023, 11, 296, 353, 16712, 24726, 657, 4412, 24664, 2972, 11571, 47023, 8, 341, 571, 1903, 5058, 3268, 316, 1176, 86971, 480, 1249, 929, 2124, 7, 17, 4579, 8610, 18889, 1005, 5598, 5969, 839, 81, 7121, 2398, 571, 1903, 87738, 31264, 1220, 992, 1005, 5598, 2099, 39495, 87738, 31264, 1220, 992, 515, 464, 197, 15363, 675, 25, 688, 330, 2408, 1737, 4412, 77763, 756, 464, 17446, 6954, 675, 25, 688, 330, 2408, 8273, 4711, 756, 464, 17446, 6954, 4783, 2808, 25, 330, 85, 4711, 12, 1984, 756, 464, 197, 3939, 675, 25, 688, 330, 2408, 8965, 756, 464, 197, 25876, 25, 3056, 258, 1626, 402, 16, 26979, 6471, 515, 1144, 197, 515, 1662, 197, 88839, 25, 330, 27806, 12, 17, 756, 1662, 197, 3298, 25, 981, 330, 17, 21, 15, 18, 25, 16, 15, 18, 15, 25, 23, 15, 20, 25, 17, 486, 65, 756, 1144, 197, 1583, 464, 197, 1583, 571, 197, 3518, 571, 1903, 20766, 2808, 1005, 8610, 18889, 1005, 5598, 445, 2408, 12, 1984, 1138, 571, 1903, 12391, 12124, 915, 1005, 5598, 445, 16, 17, 18, 1138, 571, 2109, 7251, 56059, 15363, 3268, 316, 1176, 10481, 875, 1972, 1507, 330, 2408, 12, 1984, 497, 330, 2408, 1737, 4412, 77763, 497, 6095, 657, 4412, 87738, 15363, 90, 4707, 25, 311, 6431, 5348, 7, 39495, 27381, 59209, 571, 2109, 7251, 56059, 3939, 3268, 316, 1176, 10481, 875, 1972, 1507, 330, 2408, 12, 1984, 497, 330, 2408, 1737, 4412, 77763, 497, 330, 2408, 8965, 497, 6095, 657, 4412, 95979, 12320, 3939, 515, 464, 17446, 2901, 12320, 3939, 7903, 25, 609, 11887, 657, 4412, 95979, 12320, 3939, 7903, 515, 1144, 17446, 2901, 12320, 25, 609, 11887, 657, 4412, 12391, 4783, 515, 1662, 29580, 25, 311, 6431, 5348, 4283, 72560, 14, 16, 17, 18, 53100, 22173, 5457, 4711, 12, 1984, 82543, 10270, 3929, 30149, 5457, 2901, 12320, 82, 34198, 8273, 4711, 4461, 1144, 197, 1583, 1144, 197, 23365, 5462, 25, 311, 52497, 5348, 3576, 1326, 464, 197, 1583, 464, 197, 4707, 25, 311, 6431, 5348, 7, 39495, 27381, 1326, 571, 197, 3518, 571, 2109, 7251, 56059, 6471, 1649, 3268, 316, 1176, 10481, 875, 1972, 1507, 330, 2408, 12, 1984, 497, 330, 2408, 1737, 4412, 77763, 497, 6095, 657, 4412, 875, 50107, 11, 330, 27806, 12, 17, 497, 6095, 657, 4412, 49959, 1649, 515, 464, 197, 6471, 1649, 7903, 25, 609, 11887, 657, 4412, 49959, 1649, 7903, 515, 1144, 10261, 13470, 25, 311, 7371, 21, 19, 5348, 7, 18, 15, 15, 1326, 1144, 22985, 32646, 25876, 25, 609, 1294, 11887, 657, 4412, 875, 32646, 6471, 515, 1662, 197, 515, 2683, 197, 80656, 21, 4286, 25, 311, 6431, 5348, 445, 17, 21, 15, 18, 25, 16, 15, 18, 15, 25, 23, 15, 20, 25, 17, 486, 65, 4461, 1662, 197, 1583, 1144, 197, 1583, 464, 197, 1583, 571, 197, 3518, 298, 197, 1583, 197, 197, 1583, 197, 197, 515, 298, 11609, 25, 688, 330, 2080, 9688, 14525, 756, 298, 42400, 1454, 25, 330, 16091, 311, 1855, 4108, 3922, 2656, 847, 8965, 25, 46198, 15412, 8422, 4600, 25, 53403, 28, 20, 15, 15, 756, 298, 24952, 25, 2915, 1141, 353, 16712, 24726, 657, 4412, 24664, 10803, 11571, 47023, 11, 296, 353, 16712, 24726, 657, 4412, 24664, 2972, 11571, 47023, 8, 341, 571, 1903, 5058, 3268, 316, 1176, 86971, 480, 1249, 929, 2124, 7, 17, 4579, 8610, 18889, 1005, 5598, 5969, 839, 81, 7121, 2398, 571, 1903, 87738, 31264, 1220, 992, 1005, 5598, 2099, 39495, 87738, 31264, 1220, 992, 515, 464, 197, 15363, 675, 25, 688, 330, 2408, 1737, 4412, 77763, 756, 464, 17446, 6954, 675, 25, 688, 330, 2408, 8273, 4711, 756, 464, 17446, 6954, 4783, 2808, 25, 330, 85, 4711, 12, 1984, 756, 464, 197, 3939, 675, 25, 688, 330, 2408, 8965, 756, 464, 197, 25876, 25, 3056, 258, 1626, 402, 16, 26979, 6471, 515, 1144, 197, 515, 1662, 197, 88839, 25, 330, 27806, 12, 16, 756, 1662, 197, 3298, 25, 981, 330, 16, 15, 13, 15, 13, 15, 13, 23, 756, 1144, 197, 1583, 464, 197, 1583, 571, 197, 3518, 571, 1903, 20766, 2808, 1005, 8610, 18889, 1005, 5598, 445, 2408, 12, 1984, 1138, 571, 1903, 12391, 12124, 915, 1005, 5598, 445, 16, 17, 18, 1138, 571, 2109, 7251, 56059, 15363, 3268, 316, 1176, 10481, 875, 1972, 1507, 330, 2408, 12, 1984, 497, 330, 2408, 1737, 4412, 77763, 497, 6095, 657, 4412, 87738, 15363, 90, 4707, 25, 311, 6431, 5348, 7, 39495, 27381, 59209, 571, 2109, 7251, 56059, 3939, 3268, 316, 1176, 10481, 875, 1972, 1507, 330, 2408, 12, 1984, 497, 330, 2408, 1737, 4412, 77763, 497, 330, 2408, 8965, 497, 6095, 657, 4412, 95979, 12320, 3939, 515, 464, 17446, 2901, 12320, 3939, 7903, 25, 609, 11887, 657, 4412, 95979, 12320, 3939, 7903, 515, 1144, 17446, 2901, 12320, 25, 609, 11887, 657, 4412, 12391, 4783, 515, 1662, 29580, 25, 311, 6431, 5348, 4283, 72560, 14, 16, 17, 18, 53100, 22173, 5457, 4711, 12, 1984, 82543, 10270, 3929, 30149, 5457, 2901, 12320, 82, 34198, 8273, 4711, 4461, 1144, 197, 1583, 1144, 197, 23365, 5462, 25, 311, 52497, 5348, 3576, 1326, 464, 197, 1583, 464, 197, 4707, 25, 311, 6431, 5348, 7, 39495, 27381, 1326, 571, 197, 16630, 5598, 7, 2717, 41419, 7121, 1454, 2354, 2582, 19814, 7342, 609, 1254, 12574, 90, 15872, 25, 220, 20, 15, 15, 2137, 330, 11569, 8422, 4600, 5455, 298, 197, 1583, 197, 197, 1583, 197, 630, 2023, 8358, 17130, 1669, 2088, 1273, 23910, 341, 197, 78255, 1669, 17130, 198, 197, 3244, 16708, 44415, 2644, 11, 2915, 1155, 353, 8840, 836, 8, 341, 298, 3174, 1669, 1532, 2354, 51, 1155, 692, 298, 3244, 41288, 7957, 741, 298, 77333, 15001, 1669, 342, 316, 1176, 7121, 2051, 1155, 340, 298, 16867, 7860, 15001, 991, 18176, 741, 298, 66836, 11571, 1669, 7860, 24726, 657, 4412, 7121, 11571, 10803, 30389, 15001, 340, 298, 25291, 11571, 1669, 7860, 24726, 657, 4412, 7121, 11571, 2972, 30389, 15001, 692, 298, 78255, 25952, 32013, 11571, 22402, 7285, 1507, 2943, 11571, 22402, 7285, 12367, 298, 1903, 1669, 609, 1860, 515, 571, 7568, 2417, 25, 220, 6891, 11571, 345, 571, 25291, 25, 2943, 11571, 345, 298, 197, 630, 298, 9859, 1669, 274, 2817, 40446, 457, 5378, 90988, 2398, 298, 743, 17130, 56835, 1454, 961, 1591, 341, 571, 3174, 81893, 3964, 568, 1249, 83844, 2398, 571, 3174, 81893, 3964, 568, 1249, 3189, 754, 1454, 44415, 56835, 1454, 1171, 298, 197, 92, 770, 341, 571, 3174, 81893, 3964, 568, 2623, 1249, 83844, 2398, 298, 197, 532, 197, 197, 3518, 197, 532, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1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 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestAvailableDevices(t *testing.T) { executor := &exectest.MockExecutor{} // set up a mock function to return "rook owned" partitions on the device and it does not have a filesystem executor.MockExecuteCommandWithOutput = func(debug bool, name string, command string, args ...string) (string, error) { logger.Infof("OUTPUT for %s. %s %+v", name, command, args) if command == "lsblk" { if strings.Index(name, "sdb") != -1 { // /dev/sdb has a partition return `NAME="sdb" SIZE="65" TYPE="disk" PKNAME="" NAME="sdb1" SIZE="30" TYPE="part" PKNAME="sdb"`, nil } return "", nil } else if command == "blkid" { if strings.Index(name, "sdb1") != -1 { // partition sdb1 has a label MY-PART return "MY-PART", nil } } else if command == "df" { if strings.Index(name, "sdc") != -1 { // /dev/sdc has a file system return "/dev/sdc ext4", nil } return "", nil } return "", fmt.Errorf("unknown command %s %+v", command, args) } context := &clusterd.Context{Executor: executor} context.Devices = []*clusterd.LocalDisk{ {Name: "sda"}, {Name: "sdb"}, {Name: "sdc"}, {Name: "sdd"}, {Name: "nvme01"}, {Name: "rda"}, {Name: "rdb"}, } // select all devices, including nvme01 for metadata mapping, err := getAvailableDevices(context, "all", "nvme01", true) assert.Nil(t, err) assert.Equal(t, 5, len(mapping.Entries)) assert.Equal(t, -1, mapping.Entries["sda"].Data) assert.Equal(t, -1, mapping.Entries["sdd"].Data) assert.Equal(t, -1, mapping.Entries["rda"].Data) assert.Equal(t, -1, mapping.Entries["rdb"].Data) assert.Equal(t, -1, mapping.Entries["nvme01"].Data) assert.NotNil(t, mapping.Entries["nvme01"].Metadata) assert.Equal(t, 0, len(mapping.Entries["nvme01"].Metadata)) // select no devices both using and not using a filter mapping, err = getAvailableDevices(context, "", "", false) assert.Nil(t, err) assert.Equal(t, 0, len(mapping.Entries)) mapping, err = getAvailableDevices(context, "", "", true) assert.Nil(t, err) assert.Equal(t, 0, len(mapping.Entries)) // select the sd* devices mapping, err = getAvailableDevices(context, "^sd.$", "", true) assert.Nil(t, err) assert.Equal(t, 2, len(mapping.Entries)) assert.Equal(t, -1, mapping.Entries["sda"].Data) assert.Equal(t, -1, mapping.Entries["sdd"].Data) // select an exact device mapping, err = getAvailableDevices(context, "sdd", "", false) assert.Nil(t, err) assert.Equal(t, 1, len(mapping.Entries)) assert.Equal(t, -1, mapping.Entries["sdd"].Data) // select all devices except those that have a prefix of "s" mapping, err = getAvailableDevices(context, "^[^s]", "", true) assert.Nil(t, err) assert.Equal(t, 3, len(mapping.Entries)) assert.Equal(t, -1, mapping.Entries["rda"].Data) assert.Equal(t, -1, mapping.Entries["rdb"].Data) assert.Equal(t, -1, mapping.Entries["nvme01"].Data) }
explode_data.jsonl/53727
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 1179 }
[ 2830, 3393, 16485, 40835, 1155, 353, 8840, 836, 8, 341, 67328, 4831, 1669, 609, 327, 439, 477, 24664, 25255, 16094, 197, 322, 738, 705, 264, 7860, 729, 311, 470, 330, 299, 562, 12938, 1, 46688, 389, 279, 3671, 323, 432, 1558, 537, 614, 264, 38389, 198, 67328, 4831, 24664, 17174, 4062, 2354, 5097, 284, 2915, 42154, 1807, 11, 829, 914, 11, 3210, 914, 11, 2827, 2503, 917, 8, 320, 917, 11, 1465, 8, 341, 197, 17060, 70419, 445, 30301, 369, 1018, 82, 13, 1018, 82, 68524, 85, 497, 829, 11, 3210, 11, 2827, 692, 197, 743, 3210, 621, 330, 4730, 34989, 1, 341, 298, 743, 9069, 18338, 3153, 11, 330, 82, 1999, 899, 961, 481, 16, 341, 571, 197, 322, 608, 3583, 2687, 1999, 702, 264, 16658, 198, 571, 853, 1565, 7535, 428, 82, 1999, 1, 25341, 428, 21, 20, 1, 12454, 428, 30496, 1, 24826, 7535, 33418, 7535, 428, 82, 1999, 16, 1, 25341, 428, 18, 15, 1, 12454, 428, 4480, 1, 24826, 7535, 428, 82, 1999, 1, 7808, 2092, 198, 298, 197, 532, 298, 853, 7342, 2092, 198, 197, 197, 92, 770, 421, 3210, 621, 330, 34989, 307, 1, 341, 298, 743, 9069, 18338, 3153, 11, 330, 82, 1999, 16, 899, 961, 481, 16, 341, 571, 197, 322, 16658, 274, 1999, 16, 702, 264, 2383, 18224, 9299, 2992, 198, 571, 853, 330, 19159, 9299, 2992, 497, 2092, 198, 298, 197, 532, 197, 197, 92, 770, 421, 3210, 621, 330, 2940, 1, 341, 298, 743, 9069, 18338, 3153, 11, 330, 82, 7628, 899, 961, 481, 16, 341, 571, 197, 322, 608, 3583, 2687, 7628, 702, 264, 1034, 1849, 198, 571, 853, 3521, 3583, 2687, 7628, 1303, 19, 497, 2092, 198, 298, 197, 532, 298, 853, 7342, 2092, 198, 197, 197, 630, 197, 853, 7342, 8879, 13080, 445, 16088, 3210, 1018, 82, 68524, 85, 497, 3210, 11, 2827, 340, 197, 630, 28413, 1669, 609, 18855, 67, 9328, 90, 25255, 25, 31558, 532, 28413, 77611, 1216, 284, 29838, 18855, 67, 20856, 47583, 515, 197, 197, 63121, 25, 330, 82, 3235, 7115, 197, 197, 63121, 25, 330, 82, 1999, 7115, 197, 197, 63121, 25, 330, 82, 7628, 7115, 197, 197, 63121, 25, 330, 82, 631, 7115, 197, 197, 63121, 25, 330, 36941, 2660, 15, 16, 7115, 197, 197, 63121, 25, 330, 81, 3235, 7115, 197, 197, 63121, 25, 330, 81, 1999, 7115, 197, 630, 197, 322, 3293, 678, 7611, 11, 2670, 31440, 2660, 15, 16, 369, 11160, 198, 2109, 3629, 11, 1848, 1669, 633, 16485, 40835, 5378, 11, 330, 541, 497, 330, 36941, 2660, 15, 16, 497, 830, 340, 6948, 59678, 1155, 11, 1848, 340, 6948, 12808, 1155, 11, 220, 20, 11, 2422, 81057, 22834, 4543, 1171, 6948, 12808, 1155, 11, 481, 16, 11, 12731, 22834, 4543, 1183, 82, 3235, 5521, 1043, 340, 6948, 12808, 1155, 11, 481, 16, 11, 12731, 22834, 4543, 1183, 82, 631, 5521, 1043, 340, 6948, 12808, 1155, 11, 481, 16, 11, 12731, 22834, 4543, 1183, 81, 3235, 5521, 1043, 340, 6948, 12808, 1155, 11, 481, 16, 11, 12731, 22834, 4543, 1183, 81, 1999, 5521, 1043, 340, 6948, 12808, 1155, 11, 481, 16, 11, 12731, 22834, 4543, 1183, 36941, 2660, 15, 16, 5521, 1043, 340, 6948, 93882, 1155, 11, 12731, 22834, 4543, 1183, 36941, 2660, 15, 16, 5521, 14610, 340, 6948, 12808, 1155, 11, 220, 15, 11, 2422, 81057, 22834, 4543, 1183, 36941, 2660, 15, 16, 5521, 14610, 4390, 197, 322, 3293, 902, 7611, 2176, 1667, 323, 537, 1667, 264, 4051, 198, 2109, 3629, 11, 1848, 284, 633, 16485, 40835, 5378, 11, 7342, 7342, 895, 340, 6948, 59678, 1155, 11, 1848, 340, 6948, 12808, 1155, 11, 220, 15, 11, 2422, 81057, 22834, 4543, 4390, 2109, 3629, 11, 1848, 284, 633, 16485, 40835, 5378, 11, 7342, 7342, 830, 340, 6948, 59678, 1155, 11, 1848, 340, 6948, 12808, 1155, 11, 220, 15, 11, 2422, 81057, 22834, 4543, 4390, 197, 322, 3293, 279, 20585, 9, 7611, 198, 2109, 3629, 11, 1848, 284, 633, 16485, 40835, 5378, 11, 39915, 13446, 2418, 497, 7342, 830, 340, 6948, 59678, 1155, 11, 1848, 340, 6948, 12808, 1155, 11, 220, 17, 11, 2422, 81057, 22834, 4543, 1171, 6948, 12808, 1155, 11, 481, 16, 11, 12731, 22834, 4543, 1183, 82, 3235, 5521, 1043, 340, 6948, 12808, 1155, 11, 481, 16, 11, 12731, 22834, 4543, 1183, 82, 631, 5521, 1043, 692, 197, 322, 3293, 458, 4734, 3671, 198, 2109, 3629, 11, 1848, 284, 633, 16485, 40835, 5378, 11, 330, 82, 631, 497, 7342, 895, 340, 6948, 59678, 1155, 11, 1848, 340, 6948, 12808, 1155, 11, 220, 16, 11, 2422, 81057, 22834, 4543, 1171, 6948, 12808, 1155, 11, 481, 16, 11, 12731, 22834, 4543, 1183, 82, 631, 5521, 1043, 692, 197, 322, 3293, 678, 7611, 3650, 1846, 429, 614, 264, 9252, 315, 330, 82, 698, 2109, 3629, 11, 1848, 284, 633, 16485, 40835, 5378, 11, 330, 27736, 61, 82, 19076, 7342, 830, 340, 6948, 59678, 1155, 11, 1848, 340, 6948, 12808, 1155, 11, 220, 18, 11, 2422, 81057, 22834, 4543, 1171, 6948, 12808, 1155, 11, 481, 16, 11, 12731, 22834, 4543, 1183, 81, 3235, 5521, 1043, 340, 6948, 12808, 1155, 11, 481, 16, 11, 12731, 22834, 4543, 1183, 81, 1999, 5521, 1043, 340, 6948, 12808, 1155, 11, 481, 16, 11, 12731, 22834, 4543, 1183, 36941, 2660, 15, 16, 5521, 1043, 340, 92 ]
[ 1, 1,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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestDnsStatisticsRecord(t *testing.T) { config := dnsutils.GetFakeConfig() stats := NewStatsPerStream(config, "test") dm := dnsutils.DnsMessage{} dm.Init() dm.DNS.Type = dnsutils.DnsQuery dm.NetworkInfo.Family = "INET" dm.NetworkInfo.Protocol = "UDP" dm.DNS.Qname = "dnscollector.test." stats.Record(dm) nb := stats.GetTotalDomains() if nb != 1 { t.Errorf("invalid number of domains, expected 1, got %d", nb) } }
explode_data.jsonl/75653
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 177 }
[ 2830, 3393, 35, 4412, 38599, 6471, 1155, 353, 8840, 836, 8, 341, 25873, 1669, 44077, 6031, 2234, 52317, 2648, 741, 79659, 1669, 1532, 16635, 3889, 3027, 8754, 11, 330, 1944, 5130, 2698, 76, 1669, 44077, 6031, 909, 4412, 2052, 16094, 2698, 76, 26849, 741, 2698, 76, 909, 2448, 10184, 284, 44077, 6031, 909, 4412, 2859, 198, 2698, 76, 30149, 1731, 991, 5174, 284, 330, 93530, 698, 2698, 76, 30149, 1731, 54096, 284, 330, 41648, 698, 2698, 76, 909, 2448, 10003, 606, 284, 330, 45226, 91469, 5958, 2217, 79659, 49959, 85677, 692, 9038, 65, 1669, 10472, 2234, 7595, 74713, 741, 743, 16649, 961, 220, 16, 341, 197, 3244, 13080, 445, 11808, 1372, 315, 30476, 11, 3601, 220, 16, 11, 2684, 1018, 67, 497, 16649, 340, 197, 532, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestRuleError(t *testing.T) { tests := []struct { in ticketdb.DBError want string }{ {ticketdb.DBError{Description: "duplicate block"}, "duplicate block", }, {ticketdb.DBError{Description: "human-readable error"}, "human-readable error", }, } t.Logf("Running %d tests", len(tests)) for i, test := range tests { result := test.in.Error() if result != test.want { t.Errorf("Error #%d\n got: %s want: %s", i, result, test.want) continue } } }
explode_data.jsonl/80670
{ "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, 11337, 1454, 1155, 353, 8840, 836, 8, 341, 78216, 1669, 3056, 1235, 341, 197, 17430, 256, 11727, 1999, 22537, 1454, 198, 197, 50780, 914, 198, 197, 59403, 197, 197, 90, 26534, 1999, 22537, 1454, 90, 5009, 25, 330, 63826, 2504, 7115, 298, 197, 44917, 14070, 2504, 756, 197, 197, 1583, 197, 197, 90, 26534, 1999, 22537, 1454, 90, 5009, 25, 330, 25312, 83218, 1465, 7115, 298, 197, 1, 25312, 83218, 1465, 756, 197, 197, 1583, 197, 630, 3244, 98954, 445, 18990, 1018, 67, 7032, 497, 2422, 8623, 82, 1171, 2023, 600, 11, 1273, 1669, 2088, 7032, 341, 197, 9559, 1669, 1273, 1858, 6141, 741, 197, 743, 1102, 961, 1273, 70212, 341, 298, 3244, 13080, 445, 1454, 50594, 67, 1699, 2684, 25, 1018, 82, 1366, 25, 1018, 82, 497, 600, 11, 1102, 345, 571, 18185, 70212, 340, 298, 11664, 198, 197, 197, 532, 197, 532, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestReconcileWorkspaceMissing(t *testing.T) { taskWithWorkspace := tb.Task("test-task-with-workspace", tb.TaskSpec( tb.TaskWorkspace("ws1", "a test task workspace", "", true), ), tb.TaskNamespace("foo")) taskRun := tb.TaskRun("test-taskrun-missing-workspace", tb.TaskRunNamespace("foo"), tb.TaskRunSpec( tb.TaskRunTaskRef(taskWithWorkspace.Name, tb.TaskRefAPIVersion("a1")), )) d := test.Data{ Tasks: []*v1alpha1.Task{taskWithWorkspace}, TaskRuns: []*v1alpha1.TaskRun{taskRun}, ClusterTasks: nil, PipelineResources: nil, } names.TestingSeed() testAssets, cancel := getTaskRunController(t, d) defer cancel() clients := testAssets.Clients if err := testAssets.Controller.Reconciler.Reconcile(context.Background(), getRunName(taskRun)); err != nil { t.Errorf("expected no error reconciling valid TaskRun but got %v", err) } tr, err := clients.Pipeline.TektonV1alpha1().TaskRuns(taskRun.Namespace).Get(taskRun.Name, metav1.GetOptions{}) if err != nil { t.Fatalf("Expected TaskRun %s to exist but instead got error when getting it: %v", taskRun.Name, err) } failedCorrectly := false for _, c := range tr.Status.Conditions { if c.Type == apis.ConditionSucceeded && c.Status == corev1.ConditionFalse && c.Reason == podconvert.ReasonFailedValidation { failedCorrectly = true } } if !failedCorrectly { t.Errorf("Expected TaskRun to fail validation but it did not. Final conditions were:\n%#v", tr.Status.Conditions) } }
explode_data.jsonl/895
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 575 }
[ 2830, 3393, 693, 40446, 457, 45981, 25080, 1155, 353, 8840, 836, 8, 341, 49115, 2354, 45981, 1669, 16363, 28258, 445, 1944, 52579, 26189, 28621, 8746, 756, 197, 62842, 28258, 8327, 1006, 298, 62842, 28258, 45981, 445, 8915, 16, 497, 330, 64, 1273, 3383, 27514, 497, 7342, 830, 1326, 197, 197, 701, 16363, 28258, 22699, 445, 7975, 5455, 49115, 6727, 1669, 16363, 28258, 6727, 445, 1944, 52579, 6108, 1448, 13577, 28621, 8746, 497, 16363, 28258, 6727, 22699, 445, 7975, 3975, 16363, 28258, 6727, 8327, 1006, 197, 62842, 28258, 6727, 6262, 3945, 17483, 2354, 45981, 2967, 11, 16363, 28258, 3945, 7082, 5637, 445, 64, 16, 30154, 197, 1171, 2698, 1669, 1273, 3336, 515, 197, 10261, 4604, 25, 1797, 29838, 85, 16, 7141, 16, 28258, 90, 8202, 2354, 45981, 1583, 197, 81153, 73920, 25, 688, 29838, 85, 16, 7141, 16, 28258, 6727, 90, 8202, 6727, 1583, 197, 197, 28678, 25449, 25, 414, 2092, 345, 197, 10025, 8790, 11277, 25, 2092, 345, 197, 532, 93940, 8787, 287, 41471, 741, 18185, 26879, 11, 9121, 1669, 633, 6262, 6727, 2051, 1155, 11, 294, 340, 16867, 9121, 741, 197, 31869, 1669, 1273, 26879, 727, 7041, 271, 743, 1848, 1669, 1273, 26879, 29112, 2817, 40446, 5769, 2817, 40446, 457, 5378, 19047, 1507, 633, 6727, 675, 17483, 6727, 5905, 1848, 961, 2092, 341, 197, 3244, 13080, 445, 7325, 902, 1465, 31445, 7979, 2697, 5430, 6727, 714, 2684, 1018, 85, 497, 1848, 340, 197, 630, 25583, 11, 1848, 1669, 8239, 1069, 8790, 836, 1225, 777, 53, 16, 7141, 16, 1005, 6262, 73920, 17483, 6727, 46011, 568, 1949, 17483, 6727, 2967, 11, 77520, 16, 2234, 3798, 37790, 743, 1848, 961, 2092, 341, 197, 3244, 30762, 445, 18896, 5430, 6727, 1018, 82, 311, 3000, 714, 4518, 2684, 1465, 979, 3709, 432, 25, 1018, 85, 497, 3383, 6727, 2967, 11, 1848, 340, 197, 630, 1166, 5687, 33092, 398, 1669, 895, 198, 2023, 8358, 272, 1669, 2088, 489, 10538, 53420, 5930, 341, 197, 743, 272, 10184, 621, 97723, 75134, 50, 43805, 1009, 272, 10538, 621, 6200, 85, 16, 75134, 4049, 1009, 272, 2817, 1497, 621, 7509, 14166, 2817, 1497, 9408, 13799, 341, 298, 1166, 5687, 33092, 398, 284, 830, 198, 197, 197, 532, 197, 532, 743, 753, 16091, 33092, 398, 341, 197, 3244, 13080, 445, 18896, 5430, 6727, 311, 3690, 10519, 714, 432, 1521, 537, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestEncoderWriterStruct1(t *testing.T) { var buf bytes.Buffer e := velocypack.NewEncoder(&buf) for i := 0; i < 1000; i++ { input := Struct1{ Field1: i, } must(e.Encode(input)) } r := bytes.NewReader(buf.Bytes()) d := velocypack.NewDecoder(r) for i := 0; i < 1000; i++ { var v Struct1 must(d.Decode(&v)) expected := Struct1{ Field1: i, } ASSERT_EQ(v, expected, t) } }
explode_data.jsonl/52698
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 189 }
[ 2830, 3393, 19921, 6492, 9422, 16, 1155, 353, 8840, 836, 8, 341, 2405, 6607, 5820, 22622, 198, 7727, 1669, 40509, 1082, 473, 7121, 19921, 2099, 5909, 340, 2023, 600, 1669, 220, 15, 26, 600, 366, 220, 16, 15, 15, 15, 26, 600, 1027, 341, 197, 22427, 1669, 16139, 16, 515, 298, 94478, 16, 25, 600, 345, 197, 197, 532, 197, 2109, 590, 2026, 50217, 5384, 1171, 197, 532, 7000, 1669, 5820, 68587, 10731, 36868, 2398, 2698, 1669, 40509, 1082, 473, 7121, 20732, 2601, 692, 2023, 600, 1669, 220, 15, 26, 600, 366, 220, 16, 15, 15, 15, 26, 600, 1027, 341, 197, 2405, 348, 16139, 16, 198, 197, 2109, 590, 1500, 56372, 2099, 85, 1171, 197, 42400, 1669, 16139, 16, 515, 298, 94478, 16, 25, 600, 345, 197, 197, 532, 197, 32923, 9168, 3747, 11, 3601, 11, 259, 340, 197, 532, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestPythonInterop(t *testing.T) { var r Record if err := rlp.DecodeBytes(pyRecord, &r); err != nil { t.Fatalf("can't decode: %v", err) } var ( wantAddr, _ = hex.DecodeString("caaa1485d83b18b32ed9ad666026151bf0cae8a0a88c857ae2d4c5be2daa6726") wantSeq = uint64(1) wantIP = IP4{127, 0, 0, 1} wantDiscport = DiscPort(60606) ) if r.Seq() != wantSeq { t.Errorf("wrong seq: got %d, want %d", r.Seq(), wantSeq) } if addr := r.NodeAddr(); !bytes.Equal(addr, wantAddr) { t.Errorf("wrong addr: got %x, want %x", addr, wantAddr) } want := map[Entry]interface{}{new(IP4): &wantIP, new(DiscPort): &wantDiscport} for k, v := range want { desc := fmt.Sprintf("loading key %q", k.ENRKey()) if assert.NoError(t, r.Load(k), desc) { assert.Equal(t, k, v, desc) } } }
explode_data.jsonl/39495
{ "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, 30280, 94000, 1155, 353, 8840, 836, 8, 341, 2405, 435, 13583, 198, 743, 1848, 1669, 435, 13545, 56372, 7078, 46827, 6471, 11, 609, 81, 1215, 1848, 961, 2092, 341, 197, 3244, 30762, 445, 4814, 944, 16895, 25, 1018, 85, 497, 1848, 340, 197, 630, 2405, 2399, 197, 50780, 13986, 11, 716, 220, 284, 12371, 56372, 703, 445, 924, 5305, 16, 19, 23, 20, 67, 23, 18, 65, 16, 23, 65, 18, 17, 291, 24, 329, 21, 21, 21, 15, 17, 21, 16, 20, 16, 13233, 15, 97987, 23, 64, 15, 64, 23, 23, 66, 23, 20, 22, 5918, 17, 67, 19, 66, 20, 1371, 17, 3235, 64, 21, 22, 17, 21, 1138, 197, 50780, 20183, 414, 284, 2622, 21, 19, 7, 16, 340, 197, 50780, 3298, 981, 284, 6790, 19, 90, 16, 17, 22, 11, 220, 15, 11, 220, 15, 11, 220, 16, 532, 197, 50780, 23477, 403, 284, 11735, 7084, 7, 21, 15, 21, 15, 21, 340, 197, 340, 743, 435, 5732, 80, 368, 961, 1366, 20183, 341, 197, 3244, 13080, 445, 34870, 12981, 25, 2684, 1018, 67, 11, 1366, 1018, 67, 497, 435, 5732, 80, 1507, 1366, 20183, 340, 197, 532, 743, 10789, 1669, 435, 21714, 13986, 2129, 753, 9651, 12808, 24497, 11, 1366, 13986, 8, 341, 197, 3244, 13080, 445, 34870, 10789, 25, 2684, 1018, 87, 11, 1366, 1018, 87, 497, 10789, 11, 1366, 13986, 340, 197, 532, 50780, 1669, 2415, 58, 5874, 31344, 6257, 90, 931, 55483, 19, 1648, 609, 52657, 3298, 11, 501, 5432, 3427, 7084, 1648, 609, 52657, 23477, 403, 532, 2023, 595, 11, 348, 1669, 2088, 1366, 341, 197, 41653, 1669, 8879, 17305, 445, 10628, 1376, 1018, 80, 497, 595, 52746, 49, 1592, 2398, 197, 743, 2060, 35699, 1155, 11, 435, 13969, 5969, 701, 6560, 8, 341, 298, 6948, 12808, 1155, 11, 595, 11, 348, 11, 6560, 340, 197, 197, 532, 197, 532, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,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NumericMatcherDataDTO{ DataType: "DATETIME", Value: int64(960293532000), // 06/06/2000 }, KeySelector: &dtos.KeySelectorDTO{ Attribute: &attrName, }, } matcher, err := BuildMatcher(dto, nil, logger) if err != nil { t.Error("There should be no errors when building the matcher") t.Error(err) } matcherType := reflect.TypeOf(matcher).String() if matcherType != "*matchers.GreaterThanOrEqualToMatcher" { t.Errorf("Incorrect matcher constructed. Should be *matchers.GreaterThanOrEqualToMatcher and was %s", matcherType) } attributes := make(map[string]interface{}) attributes["value"] = int64(960293532) if !matcher.Match("asd", attributes, nil) { t.Error("Equal should match") } attributes["value"] = int64(1275782400) if !matcher.Match("asd", attributes, nil) { t.Error("Greater should match") } attributes["value"] = int64(293532000) if matcher.Match("asd", attributes, nil) { t.Error("Lower should NOT match") } }
explode_data.jsonl/60371
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 479 }
[ 2830, 3393, 41366, 89387, 37554, 94191, 1155, 353, 8840, 836, 8, 341, 17060, 1669, 8392, 7121, 7395, 2099, 25263, 12750, 3798, 37790, 60943, 675, 1669, 330, 957, 698, 98864, 1669, 609, 8047, 436, 76452, 14923, 515, 197, 197, 37554, 929, 25, 330, 57063, 19157, 85868, 19834, 18182, 8650, 756, 197, 197, 94545, 36296, 25, 609, 8047, 436, 10616, 658, 36296, 37554, 1043, 14923, 515, 298, 197, 22653, 25, 330, 47892, 44618, 756, 298, 47399, 25, 262, 526, 21, 19, 7, 24, 21, 15, 17, 24, 18, 20, 18, 17, 15, 15, 15, 701, 442, 220, 15, 21, 14, 15, 21, 14, 17, 15, 15, 15, 198, 197, 197, 1583, 197, 55242, 5877, 25, 609, 8047, 436, 9610, 5877, 14923, 515, 298, 197, 3907, 25, 609, 2991, 675, 345, 197, 197, 1583, 197, 630, 2109, 28058, 11, 1848, 1669, 7854, 37554, 55237, 11, 2092, 11, 5925, 340, 743, 1848, 961, 2092, 341, 197, 3244, 6141, 445, 3862, 1265, 387, 902, 5975, 979, 4752, 279, 36052, 1138, 197, 3244, 6141, 3964, 340, 197, 630, 2109, 28058, 929, 1669, 8708, 73921, 25401, 261, 568, 703, 741, 743, 36052, 929, 961, 15630, 6347, 388, 1224, 28362, 89387, 37554, 1, 341, 197, 3244, 13080, 445, 40468, 36052, 20346, 13, 12260, 387, 353, 6347, 388, 1224, 28362, 89387, 37554, 323, 572, 1018, 82, 497, 36052, 929, 340, 197, 630, 197, 12340, 1669, 1281, 9147, 14032, 31344, 37790, 197, 12340, 1183, 957, 1341, 284, 526, 21, 19, 7, 24, 21, 15, 17, 24, 18, 20, 18, 17, 340, 743, 753, 70826, 36062, 445, 79102, 497, 8201, 11, 2092, 8, 341, 197, 3244, 6141, 445, 2993, 1265, 2432, 1138, 197, 630, 197, 12340, 1183, 957, 1341, 284, 526, 21, 19, 7, 16, 17, 22, 20, 22, 23, 17, 19, 15, 15, 340, 743, 753, 70826, 36062, 445, 79102, 497, 8201, 11, 2092, 8, 341, 197, 3244, 6141, 445, 41366, 1265, 2432, 1138, 197, 630, 197, 12340, 1183, 957, 1341, 284, 526, 21, 19, 7, 17, 24, 18, 20, 18, 17, 15, 15, 15, 340, 743, 36052, 36062, 445, 79102, 497, 8201, 11, 2092, 8, 341, 197, 3244, 6141, 445, 9053, 1265, 4183, 2432, 1138, 197, 532, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestNilServiceResolvers(t *testing.T) { ctx := logger.WithLogger(broker.NewBackground()) resolvers := ServiceResolvers{nil} _, err := resolvers.Resolve(ctx) if err != nil { t.Fatal(err) } }
explode_data.jsonl/2209
{ "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, 19064, 1860, 1061, 39435, 1155, 353, 8840, 836, 8, 341, 20985, 1669, 5925, 26124, 7395, 1883, 45985, 7121, 8706, 2398, 10202, 39435, 1669, 5362, 1061, 39435, 90, 8385, 532, 197, 6878, 1848, 1669, 592, 39435, 57875, 7502, 340, 743, 1848, 961, 2092, 341, 197, 3244, 26133, 3964, 340, 197, 532, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestIgnorePackages_whenTypical(t *testing.T) { assert := testifyassert.New(t) arbitraryPackages := []string{"abc", "xyz/abc"} actual := IgnorePackages(arbitraryPackages) assert.Equal(arbitraryPackages, actual) }
explode_data.jsonl/73324
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 79 }
[ 2830, 3393, 12497, 69513, 47636, 12834, 938, 1155, 353, 8840, 836, 8, 341, 6948, 1669, 48162, 2207, 7121, 1155, 692, 69340, 87851, 69513, 1669, 3056, 917, 4913, 13683, 497, 330, 28854, 14, 13683, 63159, 88814, 1669, 38971, 69513, 37544, 87851, 69513, 692, 6948, 12808, 37544, 87851, 69513, 11, 5042, 340, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestFeeStats(t *testing.T) { hmock := httptest.NewClient() client := &Client{ HorizonURL: "https://localhost/", HTTP: hmock, } // happy path hmock.On( "GET", "https://localhost/fee_stats", ).ReturnString(200, feesResponse) fees, err := client.FeeStats() if assert.NoError(t, err) { assert.Equal(t, fees.LastLedger, 22606298) assert.Equal(t, fees.LastLedgerBaseFee, 100) assert.Equal(t, fees.LedgerCapacityUsage, 0.97) assert.Equal(t, fees.MinAcceptedFee, 130) assert.Equal(t, fees.ModeAcceptedFee, 250) assert.Equal(t, fees.P10AcceptedFee, 150) assert.Equal(t, fees.P20AcceptedFee, 200) assert.Equal(t, fees.P30AcceptedFee, 300) assert.Equal(t, fees.P40AcceptedFee, 400) assert.Equal(t, fees.P50AcceptedFee, 500) assert.Equal(t, fees.P60AcceptedFee, 1000) assert.Equal(t, fees.P70AcceptedFee, 2000) assert.Equal(t, fees.P80AcceptedFee, 3000) assert.Equal(t, fees.P90AcceptedFee, 4000) assert.Equal(t, fees.P95AcceptedFee, 5000) assert.Equal(t, fees.P99AcceptedFee, 8000) } // connection error hmock.On( "GET", "https://localhost/metrics", ).ReturnError("http.Client error") _, err = client.Metrics() if assert.Error(t, err) { assert.Contains(t, err.Error(), "http.Client error") _, ok := err.(*Error) assert.Equal(t, ok, false) } }
explode_data.jsonl/34857
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 581 }
[ 2830, 3393, 41941, 16635, 1155, 353, 8840, 836, 8, 341, 9598, 16712, 1669, 54320, 70334, 7121, 2959, 741, 25291, 1669, 609, 2959, 515, 197, 13292, 269, 16973, 3144, 25, 330, 2428, 1110, 8301, 35075, 197, 197, 9230, 25, 981, 305, 16712, 345, 197, 630, 197, 322, 6247, 1815, 198, 9598, 16712, 8071, 1006, 197, 197, 1, 3806, 756, 197, 197, 57557, 1110, 8301, 14, 30017, 15381, 756, 197, 568, 5598, 703, 7, 17, 15, 15, 11, 12436, 2582, 692, 1166, 5516, 11, 1848, 1669, 2943, 991, 2127, 16635, 2822, 743, 2060, 35699, 1155, 11, 1848, 8, 341, 197, 6948, 12808, 1155, 11, 12436, 24682, 60850, 1389, 11, 220, 17, 17, 21, 15, 21, 17, 24, 23, 340, 197, 6948, 12808, 1155, 11, 12436, 24682, 60850, 1389, 3978, 41941, 11, 220, 16, 15, 15, 340, 197, 6948, 12808, 1155, 11, 12436, 1214, 291, 1389, 29392, 14783, 11, 220, 15, 13, 24, 22, 340, 197, 6948, 12808, 1155, 11, 12436, 17070, 65906, 41941, 11, 220, 16, 18, 15, 340, 197, 6948, 12808, 1155, 11, 12436, 42852, 65906, 41941, 11, 220, 17, 20, 15, 340, 197, 6948, 12808, 1155, 11, 12436, 1069, 16, 15, 65906, 41941, 11, 220, 16, 20, 15, 340, 197, 6948, 12808, 1155, 11, 12436, 1069, 17, 15, 65906, 41941, 11, 220, 17, 15, 15, 340, 197, 6948, 12808, 1155, 11, 12436, 1069, 18, 15, 65906, 41941, 11, 220, 18, 15, 15, 340, 197, 6948, 12808, 1155, 11, 12436, 1069, 19, 15, 65906, 41941, 11, 220, 19, 15, 15, 340, 197, 6948, 12808, 1155, 11, 12436, 1069, 20, 15, 65906, 41941, 11, 220, 20, 15, 15, 340, 197, 6948, 12808, 1155, 11, 12436, 1069, 21, 15, 65906, 41941, 11, 220, 16, 15, 15, 15, 340, 197, 6948, 12808, 1155, 11, 12436, 1069, 22, 15, 65906, 41941, 11, 220, 17, 15, 15, 15, 340, 197, 6948, 12808, 1155, 11, 12436, 1069, 23, 15, 65906, 41941, 11, 220, 18, 15, 15, 15, 340, 197, 6948, 12808, 1155, 11, 12436, 1069, 24, 15, 65906, 41941, 11, 220, 19, 15, 15, 15, 340, 197, 6948, 12808, 1155, 11, 12436, 1069, 24, 20, 65906, 41941, 11, 220, 20, 15, 15, 15, 340, 197, 6948, 12808, 1155, 11, 12436, 1069, 24, 24, 65906, 41941, 11, 220, 23, 15, 15, 15, 340, 197, 630, 197, 322, 3633, 1465, 198, 9598, 16712, 8071, 1006, 197, 197, 1, 3806, 756, 197, 197, 57557, 1110, 8301, 3183, 13468, 756, 197, 568, 5598, 1454, 445, 1254, 11716, 1465, 5130, 197, 6878, 1848, 284, 2943, 1321, 13468, 741, 743, 2060, 6141, 1155, 11, 1848, 8, 341, 197, 6948, 11545, 1155, 11, 1848, 6141, 1507, 330, 1254, 11716, 1465,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 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_Mock_AssertCalled_WithArguments(t *testing.T) { var mockedService = new(TestExampleImplementation) mockedService.On("Test_Mock_AssertCalled_WithArguments", 1, 2, 3).Return(5, 6, 7) mockedService.Called(1, 2, 3) tt := new(testing.T) assert.True(t, mockedService.AssertCalled(tt, "Test_Mock_AssertCalled_WithArguments", 1, 2, 3)) assert.False(t, mockedService.AssertCalled(tt, "Test_Mock_AssertCalled_WithArguments", 2, 3, 4)) }
explode_data.jsonl/8609
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 193 }
[ 2830, 3393, 1245, 1176, 62222, 529, 20960, 62, 2354, 19139, 1155, 353, 8840, 836, 8, 8022, 2405, 46149, 1860, 284, 501, 31159, 13314, 36850, 7229, 2109, 67385, 1860, 8071, 445, 2271, 1245, 1176, 62222, 529, 20960, 62, 2354, 19139, 497, 220, 16, 11, 220, 17, 11, 220, 18, 568, 5598, 7, 20, 11, 220, 21, 11, 220, 22, 7229, 2109, 67385, 1860, 727, 4736, 7, 16, 11, 220, 17, 11, 220, 18, 7229, 3244, 83, 1669, 501, 8623, 287, 836, 1218, 6948, 32443, 1155, 11, 46149, 1860, 11711, 20960, 47152, 11, 330, 2271, 1245, 1176, 62222, 529, 20960, 62, 2354, 19139, 497, 220, 16, 11, 220, 17, 11, 220, 18, 5784, 6948, 50757, 1155, 11, 46149, 1860, 11711, 20960, 47152, 11, 330, 2271, 1245, 1176, 62222, 529, 20960, 62, 2354, 19139, 497, 220, 17, 11, 220, 18, 11, 220, 19, 30991, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestGetRelation(t *testing.T) { t.Parallel() resolver := newMockResolver() expectedParams := &LocalGetClassParams{ Kind: kind.ACTION_KIND, ClassName: "SomeAction", Properties: []SelectProperty{ { Name: "HasAction", IsPrimitive: false, Refs: []SelectClass{ { ClassName: "SomeAction", RefProperties: []SelectProperty{ { Name: "intField", IsPrimitive: true, }, { Name: "HasAction", IsPrimitive: false, Refs: []SelectClass{ { ClassName: "SomeAction", RefProperties: []SelectProperty{ { Name: "intField", IsPrimitive: true, }, }, }, }, }, }, }, }, }, }, } resolver.On("LocalGetClass", expectedParams). Return(test_helper.EmptyListThunk(), nil).Once() query := "{ Get { Actions { SomeAction { HasAction { ... on SomeAction { intField, HasAction { ... on SomeAction { intField } } } } } } } }" resolver.AssertResolve(t, query) }
explode_data.jsonl/10590
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 566 }
[ 2830, 3393, 1949, 33790, 1155, 353, 8840, 836, 8, 341, 3244, 41288, 7957, 2822, 10202, 7921, 1669, 501, 11571, 18190, 2822, 42400, 4870, 1669, 609, 7319, 1949, 1957, 4870, 515, 197, 197, 10629, 25, 414, 3093, 28934, 72959, 345, 197, 197, 14541, 25, 330, 8373, 2512, 756, 197, 197, 7903, 25, 3056, 3379, 3052, 515, 298, 197, 515, 571, 21297, 25, 286, 330, 10281, 2512, 756, 571, 197, 3872, 33313, 25, 895, 345, 571, 197, 82807, 25, 3056, 3379, 1957, 515, 464, 197, 515, 1144, 197, 14541, 25, 330, 8373, 2512, 756, 1144, 197, 3945, 7903, 25, 3056, 3379, 3052, 515, 1662, 197, 515, 2683, 21297, 25, 286, 330, 396, 1877, 756, 2683, 197, 3872, 33313, 25, 830, 345, 1662, 197, 1583, 1662, 197, 515, 2683, 21297, 25, 286, 330, 10281, 2512, 756, 2683, 197, 3872, 33313, 25, 895, 345, 2683, 197, 82807, 25, 3056, 3379, 1957, 515, 2187, 197, 515, 5401, 197, 14541, 25, 330, 8373, 2512, 756, 5401, 197, 3945, 7903, 25, 3056, 3379, 3052, 515, 7451, 197, 515, 10179, 21297, 25, 286, 330, 396, 1877, 756, 10179, 197, 3872, 33313, 25, 830, 345, 7451, 197, 1583, 5401, 197, 1583, 2187, 197, 1583, 2683, 197, 1583, 1662, 197, 1583, 1144, 197, 1583, 464, 197, 1583, 571, 197, 1583, 298, 197, 1583, 197, 197, 1583, 197, 630, 10202, 7921, 8071, 445, 7319, 1949, 1957, 497, 3601, 4870, 4292, 197, 64906, 8623, 10418, 11180, 852, 38223, 1507, 2092, 568, 12522, 2822, 27274, 1669, 13868, 2126, 314, 26722, 314, 4329, 2512, 314, 11443, 2512, 314, 2503, 389, 4329,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"testingATtest.com", "testing@Test.com", "testingATtest.com", "testingATtest.com"} got := FindIndexOfEmail(x) want := 1 if got != want { t.Errorf("Got: %d, Wanted: %d", got, want) } }
explode_data.jsonl/45939
{ "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, 9885, 27376, 4781, 87161, 1262, 1155, 353, 8840, 836, 8, 341, 10225, 1669, 3056, 917, 4913, 8840, 828, 1944, 905, 756, 197, 197, 42097, 18229, 905, 756, 197, 197, 42097, 828, 1944, 905, 756, 197, 197, 42097, 828, 1944, 905, 63159, 3174, 354, 1669, 7379, 27376, 4781, 2075, 692, 50780, 1669, 220, 16, 271, 743, 2684, 961, 1366, 341, 197, 3244, 13080, 445, 32462, 25, 1018, 67, 11, 66610, 25, 1018, 67, 497, 2684, 11, 1366, 340, 197, 532, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestReturns200IfThereAreNoChecks(t *testing.T) { recorder := httptest.NewRecorder() req, err := http.NewRequest("GET", "https://fakeurl.com/debug/health", nil) if err != nil { t.Errorf("Failed to create request.") } StatusHandler(recorder, req) if recorder.Code != 200 { t.Errorf("Did not get a 200.") } }
explode_data.jsonl/56023
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 120 }
[ 2830, 3393, 16446, 17, 15, 15, 2679, 3862, 11526, 2753, 49820, 1155, 353, 8840, 836, 8, 341, 67904, 1358, 1669, 54320, 70334, 7121, 47023, 2822, 24395, 11, 1848, 1669, 1758, 75274, 445, 3806, 497, 330, 2428, 1110, 30570, 1085, 905, 67479, 14, 12120, 497, 2092, 340, 743, 1848, 961, 2092, 341, 197, 3244, 13080, 445, 9408, 311, 1855, 1681, 13053, 197, 630, 58321, 3050, 20635, 1358, 11, 4232, 692, 743, 48835, 20274, 961, 220, 17, 15, 15, 341, 197, 3244, 13080, 445, 6986, 537, 633, 264, 220, 17, 15, 15, 13053, 197, 532, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestJvInvalidWithMessage_string(t *testing.T) { errMsg := "Error message 1" jv := jq.JvInvalidWithMessage(jq.JvFromString(errMsg)) if jv.IsValid() == true { t.Errorf("IsValid() returned true for JvInvalidWithMessage()") } msg := jv.Copy().GetInvalidMessage() if msg.Kind() != jq.JvKindString { t.Errorf("JvInvalidWithMessage().GetInvalidMessage().Kind() returned a kind other than JvKindString") } msg.Free() str, ok := jv.GetInvalidMessageAsString() if !ok { t.Errorf("JvInvalidWithMessage().JvGetInvalidMessageAsString() is not ok") } if str != errMsg { t.Errorf("JvInvalidWithMessage().JvGetInvalidMessageAsString() did not return original error message") } }
explode_data.jsonl/38761
{ "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, 41, 85, 7928, 2354, 2052, 3904, 1155, 353, 8840, 836, 8, 341, 9859, 6611, 1669, 330, 1454, 1943, 220, 16, 698, 12428, 85, 1669, 44648, 3503, 85, 7928, 2354, 2052, 96887, 3503, 85, 44491, 3964, 6611, 1171, 743, 502, 85, 28992, 368, 621, 830, 341, 197, 3244, 13080, 445, 55470, 368, 5927, 830, 369, 619, 85, 7928, 2354, 2052, 90208, 197, 630, 21169, 1669, 502, 85, 31770, 1005, 1949, 7928, 2052, 741, 743, 3750, 54199, 368, 961, 44648, 3503, 85, 10629, 703, 341, 197, 3244, 13080, 445, 41, 85, 7928, 2354, 2052, 1005, 1949, 7928, 2052, 1005, 10629, 368, 5927, 264, 3093, 1008, 1091, 619, 85, 10629, 703, 1138, 197, 532, 21169, 52229, 2822, 11355, 11, 5394, 1669, 502, 85, 2234, 7928, 2052, 26582, 741, 743, 753, 562, 341, 197, 3244, 13080, 445, 41, 85, 7928, 2354, 2052, 1005, 41, 85, 1949, 7928, 2052, 26582, 368, 374, 537, 5394, 1138, 197, 532, 743, 607, 961, 60078, 341, 197, 3244, 13080, 445, 41, 85, 7928, 2354, 2052, 1005, 41, 85, 1949, 7928, 2052, 26582, 368, 1521, 537, 470, 4024, 1465, 1943, 1138, 197, 532, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestDeleteByQueryDocument(t *testing.T) { c := &internal.MockedConnection{ MockSend: func(query []byte, options types.QueryOptions) *types.KuzzleResponse { parsedQuery := &types.KuzzleRequest{} json.Unmarshal(query, parsedQuery) assert.Equal(t, "document", parsedQuery.Controller) assert.Equal(t, "deleteByQuery", parsedQuery.Action) assert.Equal(t, "index", parsedQuery.Index) assert.Equal(t, "collection", parsedQuery.Collection) return &types.KuzzleResponse{Result: []byte(` { "hits": ["id1", "id2"] }`), } }, } k, _ := kuzzle.NewKuzzle(c, nil) d := document.NewDocument(k) _, err := d.DeleteByQuery("index", "collection", json.RawMessage(`{"foo": "bar"}`), nil) assert.Nil(t, err) }
explode_data.jsonl/75168
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 295 }
[ 2830, 3393, 6435, 1359, 2859, 7524, 1155, 353, 8840, 836, 8, 1476, 1444, 1669, 609, 10481, 24664, 291, 4526, 515, 197, 9209, 1176, 11505, 25, 2915, 10741, 3056, 3782, 11, 2606, 4494, 15685, 3798, 8, 353, 9242, 11352, 14945, 2582, 341, 298, 3223, 18112, 2859, 1669, 609, 9242, 11352, 14945, 1900, 16094, 298, 30847, 38097, 10741, 11, 15676, 2859, 692, 298, 6948, 12808, 1155, 11, 330, 6062, 497, 15676, 2859, 29112, 340, 298, 6948, 12808, 1155, 11, 330, 4542, 1359, 2859, 497, 15676, 2859, 11360, 340, 298, 6948, 12808, 1155, 11, 330, 1252, 497, 15676, 2859, 18338, 340, 298, 6948, 12808, 1155, 11, 330, 13421, 497, 15676, 2859, 28629, 692, 298, 853, 609, 9242, 11352, 14945, 2582, 90, 2077, 25, 3056, 3782, 61528, 298, 197, 515, 571, 197, 1, 50205, 788, 4383, 307, 16, 497, 330, 307, 17, 7026, 298, 197, 5541, 1326, 298, 197, 532, 197, 197, 1583, 197, 532, 16463, 11, 716, 1669, 595, 14945, 7121, 42, 14945, 1337, 11, 2092, 340, 2698, 1669, 2197, 7121, 7524, 5969, 692, 197, 6878, 1848, 1669, 294, 18872, 1359, 2859, 445, 1252, 497, 330, 13421, 497, 2951, 50575, 2052, 5809, 4913, 7975, 788, 330, 2257, 1, 5541, 701, 2092, 340, 6948, 59678, 1155, 11, 1848, 340, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestCancelOrder(t *testing.T) { _, err := b.CancelExistingOrder([]int64{1337}) if err == nil { t.Error("Test failed - CancelgOrder() error", err) } }
explode_data.jsonl/48999
{ "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, 9269, 4431, 1155, 353, 8840, 836, 8, 341, 197, 6878, 1848, 1669, 293, 36491, 53067, 4431, 10556, 396, 21, 19, 90, 16, 18, 18, 22, 8824, 743, 1848, 621, 2092, 341, 197, 3244, 6141, 445, 2271, 4641, 481, 23542, 70, 4431, 368, 1465, 497, 1848, 340, 197, 532, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestShimDefaults(t *testing.T) { assert := assert.New(t) tmpdir, err := ioutil.TempDir(testDir, "") assert.NoError(err) defer os.RemoveAll(tmpdir) testShimPath := filepath.Join(tmpdir, "shim") testShimLinkPath := filepath.Join(tmpdir, "shim-link") err = createEmptyFile(testShimPath) assert.NoError(err) err = syscall.Symlink(testShimPath, testShimLinkPath) assert.NoError(err) savedShimPath := defaultShimPath defer func() { defaultShimPath = savedShimPath }() defaultShimPath = testShimPath s := shim{} p, err := s.path() assert.NoError(err) assert.Equal(p, defaultShimPath, "default shim path wrong") // test path resolution defaultShimPath = testShimLinkPath s = shim{} p, err = s.path() assert.NoError(err) assert.Equal(p, testShimPath) assert.False(s.debug()) s.Debug = true assert.True(s.debug()) }
explode_data.jsonl/5131
{ "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, 2016, 318, 16273, 1155, 353, 8840, 836, 8, 341, 6948, 1669, 2060, 7121, 1155, 692, 20082, 3741, 11, 1848, 1669, 43144, 65009, 6184, 8623, 6184, 11, 14676, 6948, 35699, 3964, 340, 16867, 2643, 84427, 10368, 3741, 692, 18185, 2016, 318, 1820, 1669, 26054, 22363, 10368, 3741, 11, 330, 927, 318, 1138, 18185, 2016, 318, 3939, 1820, 1669, 26054, 22363, 10368, 3741, 11, 330, 927, 318, 8965, 5130, 9859, 284, 1855, 3522, 1703, 8623, 2016, 318, 1820, 340, 6948, 35699, 3964, 692, 9859, 284, 49345, 808, 88, 44243, 8623, 2016, 318, 1820, 11, 1273, 2016, 318, 3939, 1820, 340, 6948, 35699, 3964, 692, 1903, 4141, 2016, 318, 1820, 1669, 1638, 2016, 318, 1820, 271, 16867, 2915, 368, 341, 197, 11940, 2016, 318, 1820, 284, 6781, 2016, 318, 1820, 198, 197, 66816, 11940, 2016, 318, 1820, 284, 1273, 2016, 318, 1820, 198, 1903, 1669, 62132, 16094, 3223, 11, 1848, 1669, 274, 3875, 741, 6948, 35699, 3964, 340, 6948, 12808, 1295, 11, 1638, 2016, 318, 1820, 11, 330, 2258, 62132, 1815, 4969, 5130, 197, 322, 1273, 1815, 10935, 198, 11940, 2016, 318, 1820, 284, 1273, 2016, 318, 3939, 1820, 198, 1903, 284, 62132, 16094, 3223, 11, 1848, 284, 274, 3875, 741, 6948, 35699, 3964, 340, 6948, 12808, 1295, 11, 1273, 2016, 318, 1820, 692, 6948, 50757, 1141, 7883, 2398, 1903, 20345, 284, 830, 198, 6948, 32443, 1141, 7883, 2398, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestTypeMatchesReflectType(t *testing.T) { t.Run("Slice", func(t *testing.T) { testHeaderMatchesReflect(t, unsafeheader.Slice{}, reflect.SliceHeader{}) }) t.Run("String", func(t *testing.T) { testHeaderMatchesReflect(t, unsafeheader.String{}, reflect.StringHeader{}) }) }
explode_data.jsonl/68576
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 109 }
[ 2830, 3393, 929, 42470, 72789, 929, 1155, 353, 8840, 836, 8, 341, 3244, 16708, 445, 33236, 497, 2915, 1155, 353, 8840, 836, 8, 341, 197, 18185, 4047, 42470, 72789, 1155, 11, 19860, 2708, 95495, 22655, 8708, 95495, 4047, 37790, 197, 8824, 3244, 16708, 445, 703, 497, 2915, 1155, 353, 8840, 836, 8, 341, 197, 18185, 4047, 42470, 72789, 1155, 11, 19860, 2708, 6431, 22655, 8708, 6431, 4047, 37790, 197, 3518, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestStatusHandlerGetFailures(t *testing.T) { expected := cabby.Error{ Title: "Internal Server Error", Description: "Status failure", HTTPStatus: http.StatusInternalServerError} ms := mockStatusService() ms.StatusFn = func(ctx context.Context, statusID string) (cabby.Status, error) { return cabby.Status{}, errors.New(expected.Description) } h := StatusHandler{StatusService: &ms} status, body := handlerTest(h.Get, "GET", testStatusURL, nil) if status != expected.HTTPStatus { t.Error("Got:", status, "Expected:", expected.HTTPStatus) } var result cabby.Error err := json.Unmarshal([]byte(body), &result) if err != nil { t.Fatal(err) } passed := tester.CompareError(result, expected) if !passed { t.Error("Comparison failed") } }
explode_data.jsonl/39129
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 262 }
[ 2830, 3393, 2522, 3050, 1949, 19524, 1413, 1155, 353, 8840, 836, 8, 341, 42400, 1669, 21516, 1694, 6141, 515, 197, 92233, 25, 330, 11569, 8422, 4600, 497, 7662, 25, 330, 2522, 7901, 497, 10130, 2522, 25, 1758, 66760, 630, 47691, 1669, 7860, 2522, 1860, 741, 47691, 10538, 24911, 284, 2915, 7502, 2266, 9328, 11, 2639, 915, 914, 8, 320, 54793, 1694, 10538, 11, 1465, 8, 341, 197, 853, 21516, 1694, 10538, 22655, 5975, 7121, 15253, 28773, 340, 197, 630, 9598, 1669, 8104, 3050, 90, 2522, 1860, 25, 609, 1011, 532, 23847, 11, 2487, 1669, 7013, 2271, 3203, 2234, 11, 330, 3806, 497, 1273, 2522, 3144, 11, 2092, 692, 743, 2639, 961, 3601, 27358, 2522, 341, 197, 3244, 6141, 445, 32462, 12147, 2639, 11, 330, 18896, 12147, 3601, 27358, 2522, 340, 197, 630, 2405, 1102, 21516, 1694, 6141, 198, 9859, 1669, 2951, 38097, 10556, 3782, 15225, 701, 609, 1382, 340, 743, 1848, 961, 2092, 341, 197, 3244, 26133, 3964, 340, 197, 630, 41431, 291, 1669, 37111, 32377, 1454, 4456, 11, 3601, 340, 743, 753, 35422, 341, 197, 3244, 6141, 445, 33487, 4641, 1138, 197, 532, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestDft02(tst *testing.T) { //verbose() chk.PrintTitle("Dft02. FFT sinusoid") // set sinusoid equation T := 1.0 / 5.0 // period [s] A0 := 0.0 // mean value C1 := 1.0 // amplitude θ := -math.Pi / 2.0 // phase shift [rad] ss := NewSinusoidEssential(T, A0, C1, θ) // discrete data N := 16 dt := 1.0 / float64(N-1) tt := make([]float64, N) // time xx := make([]float64, N) // x[n] data := make([]complex128, N) // x[n] to use as input of FFT for i := 0; i < N; i++ { tt[i] = float64(i) * dt xx[i] = ss.Ybasis(tt[i]) data[i] = complex(xx[i], 0) } // execute FFT Dft1d(data, false) // extract results Xr := make([]float64, N) // real(X[n]) Xi := make([]float64, N) // imag(X[n]) Rf := make([]float64, N) // |X[n]|/n maxRf := 0.0 for k := 0; k < N; k++ { Xr[k] = real(data[k]) Xi[k] = imag(data[k]) Rf[k] = math.Sqrt(Xr[k]*Xr[k]+Xi[k]*Xi[k]) / float64(N) if Rf[k] > maxRf { maxRf = Rf[k] } } io.Pforan("maxRf = %v\n", maxRf) chk.Float64(tst, "maxRf", 1e-12, maxRf, 0.383616856748) // plot if chk.Verbose { ts := utl.LinSpace(0, 1, 201) xs := make([]float64, len(ts)) for i := 0; i < len(ts); i++ { xs[i] = ss.Ybasis(ts[i]) } fn := utl.LinSpace(0, float64(N), N) plt.Reset(true, &plt.A{Prop: 1.2}) plt.Subplot(3, 1, 1) plt.Plot(ts, xs, &plt.A{C: "b", L: "continuous signal", NoClip: true}) plt.Plot(tt, xx, &plt.A{C: "r", M: ".", L: "discrete signal", NoClip: true}) plt.Cross(0, 0, nil) plt.HideAllBorders() plt.Gll("t", "x(t)", &plt.A{LegOut: true, LegNcol: 3}) plt.Subplot(3, 1, 2) plt.Plot(tt, Xr, &plt.A{C: "r", M: ".", L: "real(X)", NoClip: true}) plt.HideAllBorders() plt.Gll("t", "f(t)", &plt.A{LegOut: true, LegNcol: 3}) plt.Subplot(3, 1, 3) plt.Plot(fn, Rf, &plt.A{C: "m", M: ".", NoClip: true}) plt.HideAllBorders() plt.Gll("freq", "|X(f)|/n", &plt.A{LegOut: true, LegNcol: 3}) plt.Save("/tmp/gosl/fun", "dft02") } }
explode_data.jsonl/43538
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 1075 }
[ 2830, 3393, 35, 723, 15, 17, 1155, 267, 353, 8840, 836, 8, 1476, 197, 322, 14883, 741, 23049, 74, 7918, 3851, 445, 35, 723, 15, 17, 13, 60036, 75814, 588, 5130, 197, 322, 738, 75814, 588, 23606, 198, 10261, 1669, 220, 16, 13, 15, 608, 220, 20, 13, 15, 414, 442, 4168, 508, 82, 921, 22985, 15, 1669, 220, 15, 13, 15, 1843, 442, 3076, 897, 198, 6258, 16, 1669, 220, 16, 13, 15, 1843, 442, 44109, 198, 197, 88538, 1669, 481, 10374, 1069, 72, 608, 220, 17, 13, 15, 442, 10262, 6407, 508, 13281, 921, 34472, 1669, 1532, 48268, 355, 588, 37438, 2283, 4140, 11, 362, 15, 11, 356, 16, 11, 7851, 116, 692, 197, 322, 43179, 821, 198, 18317, 1669, 220, 16, 21, 198, 97980, 1669, 220, 16, 13, 15, 608, 2224, 21, 19, 8204, 12, 16, 340, 3244, 83, 1669, 1281, 10556, 3649, 21, 19, 11, 451, 8, 414, 442, 882, 198, 197, 4146, 1669, 1281, 10556, 3649, 21, 19, 11, 451, 8, 414, 442, 856, 7669, 921, 8924, 1669, 1281, 10556, 23247, 16, 17, 23, 11, 451, 8, 442, 856, 7669, 60, 311, 990, 438, 1946, 315, 60036, 198, 2023, 600, 1669, 220, 15, 26, 600, 366, 451, 26, 600, 1027, 341, 197, 3244, 83, 989, 60, 284, 2224, 21, 19, 1956, 8, 353, 7594, 198, 197, 197, 4146, 989, 60, 284, 10870, 7507, 88826, 47152, 989, 2546, 197, 8924, 989, 60, 284, 6351, 63963, 989, 1125, 220, 15, 340, 197, 630, 197, 322, 9026, 60036, 198, 10957, 723, 16, 67, 2592, 11, 895, 692, 197, 322, 8649, 3059, 198, 22123, 81, 1669, 1281, 10556, 3649, 21, 19, 11, 451, 8, 442, 1931, 7644, 7669, 2546, 22123, 72, 1669, 1281, 10556, 3649, 21, 19, 11, 451, 8, 442, 6532, 7644, 7669, 2546, 11143, 69, 1669, 1281, 10556, 3649, 21, 19, 11, 451, 8, 442, 760, 55, 7669, 29685, 14, 77, 198, 22543, 49, 69, 1669, 220, 15, 13, 15, 198, 2023, 595, 1669, 220, 15, 26, 595, 366, 451, 26, 595, 1027, 341, 197, 22123, 81, 6732, 60, 284, 1931, 2592, 6732, 2546, 197, 22123, 72, 6732, 60, 284, 6532, 2592, 6732, 2546, 197, 11143, 69, 6732, 60, 284, 6888, 70815, 7644, 81, 6732, 8465, 55, 81, 6732, 7574, 70630, 6732, 8465, 70630, 6732, 2467, 608, 2224, 21, 19, 8204, 340, 197, 743, 431, 69, 6732, 60, 861, 1932, 49, 69, 341, 298, 22543, 49, 69, 284, 431, 69, 6732, 921, 197, 197, 532, 197, 532, 53112, 1069, 1958, 276, 445, 2810, 49, 69, 284, 1018, 85, 1699, 497, 1932, 49, 69, 340, 23049, 74, 29794, 21, 19, 1155, 267, 11, 330, 2810, 49, 69, 497, 220, 16, 68, 12, 16, 17, 11, 1932, 49, 69, 11, 220, 15, 13, 18, 23, 18, 21, 16, 21, 23, 20, 21, 22, 19, 23, 692, 197, 322, 7089, 198, 743, 39242, 42505, 8297, 341, 197, 57441, 1669, 8621, 75, 1214, 258, 9914, 7, 15, 11, 220, 16, 11, 220, 17, 15, 16, 340, 197, 10225, 82, 1669, 1281, 10556, 3649, 21, 19, 11, 2422, 35864, 1171, 197, 2023, 600, 1669, 220, 15, 26, 600, 366, 2422, 35864, 1215, 600, 1027, 341, 298, 10225, 82, 989, 60, 284, 10870, 7507, 88826, 35864, 989, 2546, 197, 197, 532, 197, 40095, 1669, 8621, 75, 1214, 258, 9914, 7, 15, 11, 2224, 21, 19, 8204, 701, 451, 692, 197, 49949, 36660, 3715, 11, 609, 9476, 875, 90, 2008, 25, 220, 16, 13, 17, 8824, 197, 49949, 12391, 4469, 7, 18, 11, 220, 16, 11, 220, 16, 340, 197, 49949, 1069, 9184, 35864, 11, 11943, 11, 609, 9476, 875, 90, 34, 25, 330, 65, 497, 444, 25, 330, 78589, 8286, 497, 2308, 20935, 25, 830, 3518, 197, 49949, 1069, 9184, 47152, 11, 20908, 11, 609, 9476, 875, 90, 34, 25, 330, 81, 497, 386, 25, 68514, 444, 25, 330, 4243, 9353, 8286, 497, 2308, 20935, 25, 830, 3518, 197, 49949, 64663, 7, 15, 11, 220, 15, 11, 2092, 340, 197, 49949, 44429, 2403, 85037, 741, 197, 49949, 1224, 654, 445, 83, 497, 330, 87, 1155, 11583, 609, 9476, 875, 90, 18910, 2662, 25, 830, 11, 7610, 45, 2074, 25, 220, 18, 8824, 197, 49949, 12391, 4469, 7, 18, 11, 220, 16, 11, 220, 17, 340, 197, 49949, 1069, 9184, 47152, 11, 1599, 81, 11, 609, 9476, 875, 90, 34, 25, 330, 81, 497, 386, 25, 68514, 444, 25, 330, 7951, 7644, 11583, 2308, 20935, 25, 830, 3518, 197, 49949, 44429, 2403, 85037, 741, 197, 49949, 1224, 654, 445, 83, 497, 330, 69, 1155, 11583, 609, 9476, 875, 90, 18910, 2662, 25, 830, 11, 7610, 45, 2074, 25, 220, 18, 8824, 197, 49949, 12391, 4469, 7, 18, 11, 220, 16, 11, 220, 18, 340, 197, 49949, 1069, 9184, 24008, 11, 431, 69, 11, 609, 9476, 875, 90, 34, 25, 330, 76, 497, 386, 25, 68514, 2308, 20935, 25, 830, 3518, 197, 49949, 44429, 2403, 85037, 741, 197, 49949, 1224, 654, 445, 33540, 497, 25203, 55, 955, 17935, 14, 77, 497, 609, 9476, 875, 90, 18910, 2662, 25, 830, 11, 7610, 45, 2074, 25, 220, 18, 3518, 197, 49949, 13599, 4283, 5173, 4846, 47458, 6663, 359, 497, 330, 67, 723, 15, 17, 1138, 197, 532, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestEngine_ConcurrentShardSnapshots(t *testing.T) { tmpDir, err := ioutil.TempDir("", "shard_test") require.NoError(t, err, "error creating temporary directory") defer os.RemoveAll(tmpDir) tmpShard := filepath.Join(tmpDir, "shard") tmpWal := filepath.Join(tmpDir, "wal") sfile := NewSeriesFile(t, tmpDir) defer sfile.Close() opts := tsdb.NewEngineOptions() opts.Config.WALDir = filepath.Join(tmpDir, "wal") opts.SeriesIDSets = seriesIDSets([]*tsdb.SeriesIDSet{}) sh := tsdb.NewShard(1, tmpShard, tmpWal, sfile, opts) require.NoError(t, sh.Open(context.Background()), "error opening shard") defer sh.Close() points := make([]models.Point, 0, 10000) for i := 0; i < cap(points); i++ { points = append(points, models.MustNewPoint( "cpu", models.NewTags(map[string]string{"host": "server"}), map[string]interface{}{"value": 1.0}, time.Unix(int64(i), 0), )) } err = sh.WritePoints(context.Background(), points) require.NoError(t, err) engineInterface, err := sh.Engine() require.NoError(t, err, "error retrieving shard engine") // Get the struct underlying the interface. Not a recommended practice. realEngineStruct, ok := (engineInterface).(*Engine) if !ok { t.Log("Engine type does not permit simulating Cache race conditions") return } // fake a race condition in snapshotting the cache. realEngineStruct.Cache.snapshotting = true defer func() { realEngineStruct.Cache.snapshotting = false }() snapshotFunc := func(skipCacheOk bool) { if f, err := sh.CreateSnapshot(skipCacheOk); err == nil { require.NoError(t, os.RemoveAll(f), "error cleaning up TestEngine_ConcurrentShardSnapshots") } else if err == ErrSnapshotInProgress { if skipCacheOk { t.Fatalf("failing to ignore this error,: %s", err.Error()) } } else { t.Fatalf("error creating shard snapshot: %s", err.Error()) } } // Permit skipping cache in the snapshot snapshotFunc(true) // do not permit skipping the cache in the snapshot snapshotFunc(false) realEngineStruct.Cache.snapshotting = false }
explode_data.jsonl/76226
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 733 }
[ 2830, 3393, 4571, 15100, 3231, 2016, 567, 61871, 27634, 1155, 353, 8840, 836, 8, 341, 20082, 6184, 11, 1848, 1669, 43144, 65009, 6184, 19814, 330, 927, 567, 4452, 1138, 17957, 35699, 1155, 11, 1848, 11, 330, 841, 6825, 13340, 6220, 1138, 16867, 2643, 84427, 10368, 6184, 692, 20082, 2016, 567, 1669, 26054, 22363, 10368, 6184, 11, 330, 927, 567, 1138, 20082, 88298, 1669, 26054, 22363, 10368, 6184, 11, 330, 26397, 5130, 1903, 1192, 1669, 1532, 25544, 1703, 1155, 11, 4174, 6184, 340, 16867, 274, 1192, 10421, 2822, 64734, 1669, 10591, 1999, 7121, 4571, 3798, 741, 64734, 10753, 1175, 969, 6184, 284, 26054, 22363, 10368, 6184, 11, 330, 26397, 1138, 64734, 37128, 25614, 1415, 284, 4013, 25614, 1415, 85288, 2576, 1999, 37128, 915, 1649, 6257, 692, 36196, 1669, 10591, 1999, 7121, 2016, 567, 7, 16, 11, 4174, 2016, 567, 11, 4174, 88298, 11, 274, 1192, 11, 12185, 340, 17957, 35699, 1155, 11, 557, 12953, 5378, 19047, 11858, 330, 841, 8568, 52069, 1138, 16867, 557, 10421, 2822, 67499, 1669, 1281, 10556, 6507, 3775, 11, 220, 15, 11, 220, 16, 15, 15, 15, 15, 340, 2023, 600, 1669, 220, 15, 26, 600, 366, 2062, 32450, 1215, 600, 1027, 341, 197, 67499, 284, 8737, 32450, 11, 4119, 50463, 3564, 2609, 1006, 298, 197, 1, 16475, 756, 298, 19727, 82, 7121, 15930, 9147, 14032, 30953, 4913, 3790, 788, 330, 4030, 67432, 298, 19567, 14032, 31344, 6257, 4913, 957, 788, 220, 16, 13, 15, 1583, 298, 21957, 10616, 941, 1548, 21, 19, 1956, 701, 220, 15, 1326, 197, 197, 1171, 197, 532, 9859, 284, 557, 4073, 11411, 5378, 19047, 1507, 3501, 340, 17957, 35699, 1155, 11, 1848, 692, 80118, 5051, 11, 1848, 1669, 557, 54424, 741, 17957, 35699, 1155, 11, 1848, 11, 330, 841, 48224, 52069, 4712, 5130, 197, 322, 2126, 279, 2036, 16533, 279, 3749, 13, 2806, 264, 11102, 6588, 624, 91874, 4571, 9422, 11, 5394, 1669, 320, 8512, 5051, 568, 4071, 4571, 340, 743, 753, 562, 341, 197, 3244, 5247, 445, 4571, 943, 1558, 537, 11549, 1643, 15486, 19479, 6957, 4682, 1138, 197, 853, 198, 197, 532, 197, 322, 12418, 264, 6957, 2971, 304, 16295, 1280, 279, 6500, 624, 91874, 4571, 9422, 46130, 52677, 1280, 284, 830, 198, 16867, 2915, 368, 341, 197, 91874, 4571, 9422, 46130, 52677, 1280, 284, 895, 198, 197, 66816, 1903, 9601, 9626, 1669, 2915, 82074, 8233, 11578, 1807, 8, 341, 197, 743, 282, 11, 1848, 1669, 557, 7251, 15009, 82074, 8233, 11578, 1215, 1848, 621, 2092, 341, 298, 17957, 35699, 1155, 11, 2643, 84427, 955, 701, 330, 841, 15826, 705, 3393, 4571, 15100, 3231, 2016, 567, 61871, 27634, 1138, 197, 197, 92, 770, 421, 1848, 621, 15495, 15009, 88711, 341, 298, 743, 10706, 8233, 11578, 341, 571, 3244, 30762, 445, 69, 14277, 311, 10034, 419, 1465, 8190, 1018, 82, 497, 1848, 6141, 2398, 298, 197, 532, 197, 197, 92, 770, 341, 298, 3244, 30762, 445, 841, 6825, 52069, 16295, 25, 1018, 82, 497, 1848, 6141, 2398, 197, 197, 532, 197, 630, 197, 322, 80639, 42659, 6500, 304, 279, 16295, 198, 1903, 9601, 9626, 3715, 340, 197, 322, 653, 537, 11549, 42659, 279, 6500, 304, 279, 16295, 198, 1903, 9601, 9626, 3576, 340, 91874, 4571, 9422, 46130, 52677, 1280, 284, 895, 198, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1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 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestQuotes(t *testing.T) { please := Ω.NewWithT(t) ctx := context.TODO() var avReq *http.Request waitCallCount := 0 quotes, err := (&alphavantage.Client{ Client: doerFunc(func(request *http.Request) (*http.Response, error) { avReq = request return &http.Response{ Body: io.NopCloser(bytes.NewReader(monthlyIBM)), StatusCode: http.StatusOK, }, nil }), APIKey: "demo", Limiter: waitFunc(func(ctx context.Context) error { waitCallCount++ return nil }), }).Quotes(ctx, "IBM", alphavantage.TimeSeriesMonthly) please.Expect(err).NotTo(Ω.HaveOccurred()) please.Expect(quotes).To(Ω.HaveLen(260)) please.Expect(avReq.Host).To(Ω.Equal("www.alphavantage.co")) please.Expect(avReq.URL.Scheme).To(Ω.Equal("https")) please.Expect(avReq.URL.Path).To(Ω.Equal("/query")) please.Expect(avReq.URL.Query().Get("function")).To(Ω.Equal("TIME_SERIES_MONTHLY")) please.Expect(avReq.URL.Query().Get("symbol")).To(Ω.Equal("IBM")) please.Expect(avReq.URL.Query().Get("apikey")).To(Ω.Equal("demo")) please.Expect(avReq.URL.Query().Get("datatype")).To(Ω.Equal("csv")) please.Expect(waitCallCount).To(Ω.Equal(1)) }
explode_data.jsonl/71154
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 511 }
[ 2830, 3393, 43780, 1155, 353, 8840, 836, 8, 341, 197, 30021, 1669, 7851, 102, 7121, 2354, 51, 1155, 692, 20985, 1669, 2266, 90988, 2822, 2405, 1822, 27234, 353, 1254, 9659, 271, 48750, 7220, 2507, 1669, 220, 15, 271, 197, 53282, 11, 1848, 1669, 15899, 30223, 402, 24806, 11716, 515, 197, 71724, 25, 653, 261, 9626, 18552, 4875, 353, 1254, 9659, 8, 4609, 1254, 12574, 11, 1465, 8, 341, 298, 197, 402, 27234, 284, 1681, 198, 298, 853, 609, 1254, 12574, 515, 571, 197, 5444, 25, 981, 6399, 2067, 453, 51236, 799, 23158, 68587, 44723, 398, 67738, 6965, 571, 197, 15872, 25, 1758, 52989, 345, 298, 197, 2137, 2092, 198, 197, 197, 30793, 197, 197, 7082, 1592, 25, 330, 25762, 756, 197, 15070, 17700, 25, 3783, 9626, 18552, 7502, 2266, 9328, 8, 1465, 341, 298, 48750, 7220, 2507, 22940, 298, 853, 2092, 198, 197, 197, 30793, 197, 16630, 43780, 7502, 11, 330, 67738, 497, 64595, 402, 24806, 16299, 25544, 72007, 692, 197, 30021, 81893, 3964, 568, 2623, 1249, 7, 144572, 3839, 523, 61685, 2398, 197, 30021, 81893, 7, 53282, 568, 1249, 7, 144572, 3839, 523, 11271, 7, 17, 21, 15, 1171, 197, 30021, 81893, 57565, 27234, 29840, 568, 1249, 7, 144572, 12808, 445, 2136, 12168, 759, 402, 24806, 6830, 5455, 197, 30021, 81893, 57565, 27234, 20893, 92719, 568, 1249, 7, 144572, 12808, 445, 2428, 5455, 197, 30021, 81893, 57565, 27234, 20893, 17474, 568, 1249, 7, 144572, 12808, 4283, 1631, 5455, 197, 30021, 81893, 57565, 27234, 20893, 15685, 1005, 1949, 445, 1688, 15197, 1249, 7, 144572, 12808, 445, 18129, 14844, 5369, 48023, 8932, 5455, 197, 30021, 81893, 57565, 27234, 20893, 15685, 1005, 1949, 445, 18785, 15197, 1249, 7, 144572, 12808, 445, 67738, 5455, 197, 30021, 81893, 57565, 27234, 20893, 15685, 1005, 1949, 445, 72174, 15197, 1249, 7, 144572, 12808, 445, 25762, 5455, 197, 30021, 81893, 57565, 27234, 20893, 15685, 1005, 1949, 445, 62409, 15197, 1249, 7, 144572, 12808, 445, 18104, 5455, 197, 30021, 81893, 64092, 7220, 2507, 568, 1249, 7, 144572, 12808, 7, 16, 1171, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestDNSProvider_Present(t *testing.T) { hostedZone := "example.com" domain := "prefix." + hostedZone testCases := []struct { desc string username string apiKey string handlers map[string]http.HandlerFunc expectedError string }{ { desc: "success", username: "bar", apiKey: "foo", handlers: map[string]http.HandlerFunc{ "/" + hostedZone + "/txt": mockHandlerCreateRecord, }, }, { desc: "invalid auth", username: "nope", apiKey: "foo", handlers: map[string]http.HandlerFunc{ "/" + hostedZone + "/txt": mockHandlerCreateRecord, }, expectedError: "zoneee: status code=401: Unauthorized\n", }, { desc: "error", username: "bar", apiKey: "foo", expectedError: "zoneee: status code=404: 404 page not found\n", }, } for _, test := range testCases { test := test t.Run(test.desc, func(t *testing.T) { t.Parallel() mux := http.NewServeMux() for uri, handler := range test.handlers { mux.HandleFunc(uri, handler) } server := httptest.NewServer(mux) config := NewDefaultConfig() config.Endpoint = mustParse(server.URL) config.Username = test.username config.APIKey = test.apiKey p, err := NewDNSProviderConfig(config) require.NoError(t, err) err = p.Present(domain, "token", "key") if test.expectedError == "" { require.NoError(t, err) } else { require.EqualError(t, err, test.expectedError) } }) } }
explode_data.jsonl/9107
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 664 }
[ 2830, 3393, 61088, 5179, 1088, 2695, 1155, 353, 8840, 836, 8, 341, 63104, 291, 15363, 1669, 330, 8687, 905, 698, 2698, 3121, 1669, 330, 11849, 1189, 488, 21009, 15363, 271, 18185, 37302, 1669, 3056, 1235, 341, 197, 41653, 688, 914, 198, 197, 72358, 414, 914, 198, 197, 54299, 1592, 286, 914, 198, 197, 9598, 437, 9254, 414, 2415, 14032, 60, 1254, 89164, 198, 197, 42400, 1454, 914, 198, 197, 59403, 197, 197, 515, 298, 41653, 25, 257, 330, 5630, 756, 298, 72358, 25, 330, 2257, 756, 298, 54299, 1592, 25, 256, 330, 7975, 756, 298, 9598, 437, 9254, 25, 2415, 14032, 60, 1254, 89164, 515, 571, 197, 3115, 1, 488, 21009, 15363, 488, 3521, 8586, 788, 7860, 3050, 4021, 6471, 345, 298, 197, 1583, 197, 197, 1583, 197, 197, 515, 298, 41653, 25, 257, 330, 11808, 4166, 756, 298, 72358, 25, 330, 2152, 375, 756, 298, 54299, 1592, 25, 256, 330, 7975, 756, 298, 9598, 437, 9254, 25, 2415, 14032, 60, 1254, 89164, 515, 571, 197, 3115, 1, 488, 21009, 15363, 488, 3521, 8586, 788, 7860, 3050, 4021, 6471, 345, 298, 197, 1583, 298, 42400, 1454, 25, 330, 8684, 2127, 25, 2639, 2038, 28, 19, 15, 16, 25, 63102, 1699, 756, 197, 197, 1583, 197, 197, 515, 298, 41653, 25, 688, 330, 841, 756, 298, 72358, 25, 414, 330, 2257, 756, 298, 54299, 1592, 25, 286, 330, 7975, 756, 298, 42400, 1454, 25, 330, 8684, 2127, 25, 2639, 2038, 28, 19, 15, 19, 25, 220, 19, 15, 19, 2150, 537, 1730, 1699, 756, 197, 197, 1583, 197, 630, 2023, 8358, 1273, 1669, 2088, 1273, 37302, 341, 197, 18185, 1669, 1273, 198, 197, 3244, 16708, 8623, 30514, 11, 2915, 1155, 353, 8840, 836, 8, 341, 298, 3244, 41288, 7957, 2822, 298, 2109, 2200, 1669, 1758, 7121, 60421, 44, 2200, 741, 298, 2023, 13071, 11, 7013, 1669, 2088, 1273, 55001, 341, 571, 2109, 2200, 63623, 25797, 11, 7013, 340, 298, 197, 630, 298, 41057, 1669, 54320, 70334, 7121, 5475, 1255, 2200, 692, 298, 25873, 1669, 1532, 3675, 2648, 741, 298, 25873, 90409, 284, 1969, 14463, 21421, 20893, 340, 298, 25873, 42777, 284, 1273, 12383, 198, 298, 25873, 24922, 1592, 284, 1273, 6183, 1592, 271, 298, 3223, 11, 1848, 1669, 1532, 61088, 5179, 2648, 8754, 340, 298, 17957, 35699, 1155, 11, 1848, 692, 298, 9859, 284, 281, 1069, 2695, 41169, 11, 330, 5839, 497, 330, 792, 1138, 298, 743, 1273, 56835, 1454, 621, 1591, 341, 571, 17957, 35699, 1155, 11, 1848, 340, 298, 197, 92, 770, 341, 571, 17957, 12808, 1454, 1155, 11, 1848, 11, 1273, 56835, 1454, 340, 298, 197, 532, 197, 197, 3518, 197, 532, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestIntegerExpressionGT(t *testing.T) { assertClauseSerialize(t, table1ColInt.GT(table2ColInt), "(table1.col_int > table2.col_int)") assertClauseSerialize(t, table1ColInt.GT(Int(11)), "(table1.col_int > $1)", int64(11)) }
explode_data.jsonl/41451
{ "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, 3486, 9595, 25388, 1155, 353, 8840, 836, 8, 341, 6948, 28482, 15680, 1155, 11, 1965, 16, 6127, 1072, 1224, 51, 15761, 17, 6127, 1072, 701, 11993, 2005, 16, 13414, 4042, 861, 1965, 17, 13414, 4042, 19107, 6948, 28482, 15680, 1155, 11, 1965, 16, 6127, 1072, 1224, 51, 24123, 7, 16, 16, 5731, 11993, 2005, 16, 13414, 4042, 861, 400, 16, 11583, 526, 21, 19, 7, 16, 16, 1171, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_GetEntryView(t *testing.T) { mp.Put("key", "value") mp.Get("key") mp.Put("key", "newValue") entryView, err := mp.GetEntryView("key") AssertEqualf(t, err, entryView.Key(), "key", "Map GetEntryView returned a wrong view.") AssertEqualf(t, err, entryView.Value(), "newValue", "Map GetEntryView returned a wrong view.") AssertEqualf(t, err, entryView.Hits(), int64(2), "Map GetEntryView returned a wrong view.") AssertEqualf(t, err, entryView.EvictionCriteriaNumber(), int64(0), "Map GetEntryView returned a wrong view.") AssertEqualf(t, err, entryView.Version(), int64(1), "Map GetEntryView returned a wrong view.") mp.Clear() }
explode_data.jsonl/57025
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 227 }
[ 2830, 3393, 2227, 16219, 13614, 5874, 851, 1155, 353, 8840, 836, 8, 341, 53230, 39825, 445, 792, 497, 330, 957, 1138, 53230, 2234, 445, 792, 1138, 53230, 39825, 445, 792, 497, 330, 52830, 5130, 48344, 851, 11, 1848, 1669, 10490, 2234, 5874, 851, 445, 792, 1138, 18017, 2993, 69, 1155, 11, 1848, 11, 4343, 851, 9610, 1507, 330, 792, 497, 330, 2227, 2126, 5874, 851, 5927, 264, 4969, 1651, 13053, 18017, 2993, 69, 1155, 11, 1848, 11, 4343, 851, 6167, 1507, 330, 52830, 497, 330, 2227, 2126, 5874, 851, 5927, 264, 4969, 1651, 13053, 18017, 2993, 69, 1155, 11, 1848, 11, 4343, 851, 3839, 1199, 1507, 526, 21, 19, 7, 17, 701, 330, 2227, 2126, 5874, 851, 5927, 264, 4969, 1651, 13053, 18017, 2993, 69, 1155, 11, 1848, 11, 4343, 851, 5142, 85, 2479, 12823, 2833, 1507, 526, 21, 19, 7, 15, 701, 330, 2227, 2126, 5874, 851, 5927, 264, 4969, 1651, 13053, 18017, 2993, 69, 1155, 11, 1848, 11, 4343, 851, 35842, 1507, 526, 21, 19, 7, 16, 701, 330, 2227, 2126, 5874, 851, 5927, 264, 4969, 1651, 31225, 53230, 13524, 741, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestAccAWSDBInstanceSnapshot(t *testing.T) { var snap rds.DBInstance rInt := acctest.RandInt() resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, // testAccCheckAWSDBInstanceSnapshot verifies a database snapshot is // created, and subequently deletes it CheckDestroy: testAccCheckAWSDBInstanceSnapshot(rInt), Steps: []resource.TestStep{ { Config: testAccSnapshotInstanceConfigWithSnapshot(rInt), Check: resource.ComposeTestCheckFunc( testAccCheckAWSDBInstanceExists("aws_db_instance.snapshot", &snap), ), }, }, }) }
explode_data.jsonl/33924
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 232 }
[ 2830, 3393, 14603, 36136, 3506, 2523, 15009, 1155, 353, 8840, 836, 8, 341, 2405, 10658, 435, 5356, 22537, 2523, 198, 7000, 1072, 1669, 1613, 67880, 2013, 437, 1072, 2822, 50346, 8787, 1155, 11, 5101, 31363, 515, 197, 197, 4703, 3973, 25, 220, 2915, 368, 314, 1273, 14603, 4703, 3973, 1155, 8, 1153, 197, 197, 37351, 25, 1273, 14603, 37351, 345, 197, 197, 322, 1273, 14603, 3973, 36136, 3506, 2523, 15009, 87856, 264, 4625, 16295, 374, 198, 197, 197, 322, 3465, 11, 323, 1186, 25310, 4402, 54170, 432, 198, 197, 69472, 14245, 25, 1273, 14603, 3973, 36136, 3506, 2523, 15009, 2601, 1072, 1326, 197, 197, 33951, 25, 3056, 9233, 8787, 8304, 515, 298, 197, 515, 571, 66156, 25, 1273, 14603, 15009, 2523, 2648, 2354, 15009, 2601, 1072, 1326, 571, 69472, 25, 5101, 85860, 2271, 3973, 9626, 1006, 464, 18185, 14603, 3973, 36136, 3506, 2523, 15575, 445, 8635, 8685, 11904, 52677, 497, 609, 48854, 1326, 571, 197, 1326, 298, 197, 1583, 197, 197, 1583, 197, 3518, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestImplicitAdminsKeyedForSubteam(t *testing.T) { fus, tcs, cleanup := setupNTests(t, 3) defer cleanup() t.Logf("U0 creates a root team") parentName, _ := createTeam2(*tcs[0]) t.Logf("U0 creates a subteam") subteamID, err := CreateSubteam(context.TODO(), tcs[0].G, "sub", parentName) require.NoError(t, err) t.Logf("U1 and U2 can't load the subteam") _, err = tcs[1].G.GetTeamLoader().ImplicitAdmins(context.TODO(), *subteamID) require.Error(t, err, "U1 should not be able to load subteam without implicit admin status") _, err = tcs[2].G.GetTeamLoader().ImplicitAdmins(context.TODO(), *subteamID) require.Error(t, err, "U2 isn't in the subteam at all yet, shouldn't be able to load") t.Logf("U0 adds U1 as an admin in the root team") _, err = AddMember(context.TODO(), tcs[0].G, parentName.String(), fus[1].Username, keybase1.TeamRole_ADMIN) require.NoError(t, err) t.Logf("now U1 can load the subteam, but not U2") _, err = tcs[1].G.GetTeamLoader().ImplicitAdmins(context.TODO(), *subteamID) require.NoError(t, err, "U1 should able to load subteam with implicit admin status") _, err = tcs[2].G.GetTeamLoader().ImplicitAdmins(context.TODO(), *subteamID) require.Error(t, err, "U2 still isn't in the subteam at yet, shouldn't be able to load") t.Logf("U1 can add U2 to the subteam") _, err = AddMember(context.TODO(), tcs[1].G, parentName.String(), fus[2].Username, keybase1.TeamRole_ADMIN) require.NoError(t, err) t.Logf("now U2 can load the subteam") _, err = tcs[1].G.GetTeamLoader().ImplicitAdmins(context.TODO(), *subteamID) require.NoError(t, err, "now U2 is a member of the subteam and should be able to read it") }
explode_data.jsonl/13532
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 643 }
[ 2830, 3393, 59558, 7210, 82, 1592, 291, 2461, 3136, 9196, 1155, 353, 8840, 836, 8, 341, 1166, 355, 11, 259, 4837, 11, 21290, 1669, 6505, 45, 18200, 1155, 11, 220, 18, 340, 16867, 21290, 2822, 3244, 98954, 445, 52, 15, 11450, 264, 3704, 2083, 1138, 24804, 675, 11, 716, 1669, 1855, 14597, 17, 4071, 83, 4837, 58, 15, 9604, 3244, 98954, 445, 52, 15, 11450, 264, 1186, 9196, 1138, 28624, 9196, 915, 11, 1848, 1669, 4230, 3136, 9196, 5378, 90988, 1507, 259, 4837, 58, 15, 936, 38, 11, 330, 1966, 497, 2681, 675, 340, 17957, 35699, 1155, 11, 1848, 692, 3244, 98954, 445, 52, 16, 323, 547, 17, 646, 944, 2795, 279, 1186, 9196, 1138, 197, 6878, 1848, 284, 259, 4837, 58, 16, 936, 38, 2234, 14597, 9181, 1005, 59558, 7210, 82, 5378, 90988, 1507, 353, 1966, 9196, 915, 340, 17957, 6141, 1155, 11, 1848, 11, 330, 52, 16, 1265, 537, 387, 2952, 311, 2795, 1186, 9196, 2041, 17995, 3986, 2639, 1138, 197, 6878, 1848, 284, 259, 4837, 58, 17, 936, 38, 2234, 14597, 9181, 1005, 59558, 7210, 82, 5378, 90988, 1507, 353, 1966, 9196, 915, 340, 17957, 6141, 1155, 11, 1848, 11, 330, 52, 17, 4436, 944, 304, 279, 1186, 9196, 518, 678, 3602, 11, 13133, 944, 387, 2952, 311, 2795, 5130, 3244, 98954, 445, 52, 15, 11367, 547, 16, 438, 458, 3986, 304, 279, 3704, 2083, 1138, 197, 6878, 1848, 284, 2691, 9366, 5378, 90988, 1507, 259, 4837, 58, 15, 936, 38, 11, 2681, 675, 6431, 1507, 68478, 58, 16, 936, 11115, 11, 1376, 3152, 16, 65842, 9030, 30460, 340, 17957, 35699, 1155, 11, 1848, 692, 3244, 98954, 445, 3328, 547, 16, 646, 2795, 279, 1186, 9196, 11, 714, 537, 547, 17, 1138, 197, 6878, 1848, 284, 259, 4837, 58, 16, 936, 38, 2234, 14597, 9181, 1005, 59558, 7210, 82, 5378, 90988, 1507, 353, 1966, 9196, 915, 340, 17957, 35699, 1155, 11, 1848, 11, 330, 52, 16, 1265, 2952, 311, 2795, 1186, 9196, 448, 17995, 3986, 2639, 1138, 197, 6878, 1848, 284, 259, 4837, 58, 17, 936, 38, 2234, 14597, 9181, 1005, 59558, 7210, 82, 5378, 90988, 1507, 353, 1966, 9196, 915, 340, 17957, 6141, 1155, 11, 1848, 11, 330, 52, 17, 2058, 4436, 944, 304, 279, 1186, 9196, 518, 3602, 11, 13133, 944, 387, 2952, 311, 2795, 5130, 3244, 98954, 445, 52, 16, 646, 912, 547, 17, 311, 279, 1186, 9196, 1138, 197, 6878, 1848, 284, 2691, 9366, 5378, 90988, 1507, 259, 4837, 58, 16, 936, 38, 11, 2681, 675, 6431, 1507, 68478, 58, 17, 936, 11115, 11, 1376, 3152, 16, 65842, 9030, 30460, 340, 17957, 35699, 1155, 11, 1848, 692, 3244, 98954, 445, 3328, 547, 17, 646, 2795, 279, 1186, 9196, 1138, 197, 6878, 1848, 284, 259, 4837, 58, 16, 936, 38, 2234, 14597, 9181, 1005, 59558, 7210, 82, 5378, 90988, 1507, 353, 1966, 9196, 915, 340, 17957, 35699, 1155, 11, 1848, 11, 330, 3328, 547, 17, 374, 264, 4462, 315, 279, 1186, 9196, 323, 1265, 387, 2952, 311, 1349, 432, 1138, 92 ]
[ 1, 1, 1, 1, 1, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestCommitFind(t *testing.T) { defer gock.Off() mockServerVersion() gock.New("https://try.gitea.io"). Get("/api/v1/repos/gitea/gitea/git/commits/c43399cad8766ee521b873a32c1652407c5a4630"). Reply(200). Type("application/json"). File("testdata/commit.json") client, _ := New("https://try.gitea.io") got, _, err := client.Git.FindCommit( context.Background(), "gitea/gitea", "c43399cad8766ee521b873a32c1652407c5a4630", ) if err != nil { t.Error(err) } want := new(scm.Commit) raw, _ := ioutil.ReadFile("testdata/commit.json.golden") err = json.Unmarshal(raw, &want) if err != nil { t.Error(err) } if diff := cmp.Diff(got, want); diff != "" { t.Errorf("Unexpected Results") t.Log(diff) } }
explode_data.jsonl/50606
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 345 }
[ 2830, 3393, 33441, 9885, 1155, 353, 8840, 836, 8, 341, 16867, 728, 377, 13, 4596, 2822, 77333, 5475, 5637, 2822, 3174, 1176, 7121, 445, 2428, 1110, 1539, 1302, 632, 64, 4245, 38609, 197, 37654, 4283, 2068, 5457, 16, 49505, 4846, 632, 64, 4846, 632, 64, 60590, 14, 3621, 1199, 2899, 19, 18, 18, 24, 24, 34455, 23, 22, 21, 21, 2127, 20, 17, 16, 65, 23, 22, 18, 64, 18, 17, 66, 16, 21, 20, 17, 19, 15, 22, 66, 20, 64, 19, 21, 18, 15, 38609, 197, 197, 20841, 7, 17, 15, 15, 4292, 197, 27725, 445, 5132, 8931, 38609, 197, 24848, 445, 92425, 14, 17413, 4323, 5130, 25291, 11, 716, 1669, 1532, 445, 2428, 1110, 1539, 1302, 632, 64, 4245, 1138, 3174, 354, 11, 8358, 1848, 1669, 2943, 1224, 275, 9998, 33441, 1006, 197, 28413, 19047, 3148, 197, 197, 59719, 632, 64, 4846, 632, 64, 756, 197, 197, 96946, 19, 18, 18, 24, 24, 34455, 23, 22, 21, 21, 2127, 20, 17, 16, 65, 23, 22, 18, 64, 18, 17, 66, 16, 21, 20, 17, 19, 15, 22, 66, 20, 64, 19, 21, 18, 15, 756, 197, 340, 743, 1848, 961, 2092, 341, 197, 3244, 6141, 3964, 340, 197, 630, 50780, 1669, 501, 1141, 6226, 53036, 340, 76559, 11, 716, 1669, 43144, 78976, 445, 92425, 14, 17413, 4323, 92960, 268, 1138, 9859, 284, 2951, 38097, 22460, 11, 609, 52657, 340, 743, 1848, 961, 2092, 341, 197, 3244, 6141, 3964, 340, 197, 630, 743, 3638, 1669, 26089, 98063, 3268, 354, 11, 1366, 1215, 3638, 961, 1591, 341, 197, 3244, 13080, 445, 29430, 18099, 1138, 197, 3244, 5247, 37124, 340, 197, 532, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestWebRootRedirect(t *testing.T) { oldConfig := config.Get() defer config.Set(oldConfig) conf := new(config.Config) conf.Server.WebRoot = "/test" config.Set(conf) router := NewRouter() ts := httptest.NewServer(router) defer ts.Close() client := &http.Client{ CheckRedirect: func(req *http.Request, via []*http.Request) error { return http.ErrUseLastResponse }, } resp, err := client.Get(ts.URL + "/") if err != nil { t.Fatal(err) } // body, _ := ioutil.ReadAll(resp.Body) assert.Equal(t, 302, resp.StatusCode, "Response should redirect to the webroot") assert.Equal(t, "/test/", resp.Header.Get("Location"), "Response should redirect to the webroot") }
explode_data.jsonl/14285
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 258 }
[ 2830, 3393, 5981, 8439, 17725, 1155, 353, 8840, 836, 8, 341, 61828, 2648, 1669, 2193, 2234, 741, 16867, 2193, 4202, 21972, 2648, 692, 67850, 1669, 501, 8754, 10753, 340, 67850, 22997, 6473, 8439, 284, 3521, 1944, 698, 25873, 4202, 29879, 692, 67009, 1669, 1532, 9523, 741, 57441, 1669, 54320, 70334, 7121, 5475, 61210, 340, 16867, 10591, 10421, 2822, 25291, 1669, 609, 1254, 11716, 515, 197, 69472, 17725, 25, 2915, 6881, 353, 1254, 9659, 11, 4566, 29838, 1254, 9659, 8, 1465, 341, 298, 853, 1758, 27862, 10253, 5842, 2582, 198, 197, 197, 1583, 197, 630, 34653, 11, 1848, 1669, 2943, 2234, 35864, 20893, 488, 3521, 1138, 743, 1848, 961, 2092, 341, 197, 3244, 26133, 3964, 340, 197, 532, 197, 322, 2487, 11, 716, 1669, 43144, 41851, 20267, 20934, 340, 6948, 12808, 1155, 11, 220, 18, 15, 17, 11, 9039, 37828, 11, 330, 2582, 1265, 6423, 311, 279, 3482, 2888, 1138, 6948, 12808, 1155, 11, 3521, 1944, 28105, 9039, 15753, 2234, 445, 4707, 3975, 330, 2582, 1265, 6423, 311, 279, 3482, 2888, 1138, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestStoreDeleteCollection(t *testing.T) { podA := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "foo"}} podB := &api.Pod{ObjectMeta: api.ObjectMeta{Name: "bar"}} testContext := api.WithNamespace(api.NewContext(), "test") server, registry := NewTestGenericStoreRegistry(t) defer server.Terminate(t) if _, err := registry.Create(testContext, podA); err != nil { t.Errorf("Unexpected error: %v", err) } if _, err := registry.Create(testContext, podB); err != nil { t.Errorf("Unexpected error: %v", err) } // Delete all pods. deleted, err := registry.DeleteCollection(testContext, nil, &api.ListOptions{}) if err != nil { t.Fatalf("Unexpected error: %v", err) } deletedPods := deleted.(*api.PodList) if len(deletedPods.Items) != 2 { t.Errorf("Unexpected number of pods deleted: %d, expected: 2", len(deletedPods.Items)) } if _, err := registry.Get(testContext, podA.Name); !errors.IsNotFound(err) { t.Errorf("Unexpected error: %v", err) } if _, err := registry.Get(testContext, podB.Name); !errors.IsNotFound(err) { t.Errorf("Unexpected error: %v", err) } }
explode_data.jsonl/237
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 410 }
[ 2830, 3393, 6093, 6435, 6482, 1155, 353, 8840, 836, 8, 341, 3223, 347, 32, 1669, 609, 2068, 88823, 90, 1190, 12175, 25, 6330, 80222, 63121, 25, 330, 7975, 95642, 3223, 347, 33, 1669, 609, 2068, 88823, 90, 1190, 12175, 25, 6330, 80222, 63121, 25, 330, 2257, 9207, 630, 18185, 1972, 1669, 6330, 26124, 22699, 24827, 7121, 1972, 1507, 330, 1944, 1138, 41057, 11, 19424, 1669, 1532, 2271, 19964, 6093, 15603, 1155, 340, 16867, 3538, 836, 261, 34016, 1155, 692, 743, 8358, 1848, 1669, 19424, 7251, 8623, 1972, 11, 7509, 32, 1215, 1848, 961, 2092, 341, 197, 3244, 13080, 445, 29430, 1465, 25, 1018, 85, 497, 1848, 340, 197, 532, 743, 8358, 1848, 1669, 19424, 7251, 8623, 1972, 11, 7509, 33, 1215, 1848, 961, 2092, 341, 197, 3244, 13080, 445, 29430, 1465, 25, 1018, 85, 497, 1848, 340, 197, 630, 197, 322, 10428, 678, 54587, 624, 197, 26521, 11, 1848, 1669, 19424, 18872, 6482, 8623, 1972, 11, 2092, 11, 609, 2068, 5814, 3798, 37790, 743, 1848, 961, 2092, 341, 197, 3244, 30762, 445, 29430, 1465, 25, 1018, 85, 497, 1848, 340, 197, 532, 197, 26521, 23527, 82, 1669, 11062, 41399, 2068, 88823, 852, 340, 743, 2422, 12797, 6873, 23527, 82, 12054, 8, 961, 220, 17, 341, 197, 3244, 13080, 445, 29430, 1372, 315, 54587, 11062, 25, 1018, 67, 11, 3601, 25, 220, 17, 497, 2422, 12797, 6873, 23527, 82, 12054, 1171, 197, 630, 743, 8358, 1848, 1669, 19424, 2234, 8623, 1972, 11, 7509, 32, 2967, 1215, 753, 7650, 4506, 10372, 3964, 8, 341, 197, 3244, 13080, 445, 29430, 1465, 25, 1018, 85, 497, 1848, 340, 197, 532, 743, 8358, 1848, 1669, 19424, 2234, 8623, 1972, 11, 7509, 33, 2967, 1215, 753, 7650, 4506, 10372, 3964, 8, 341, 197, 3244, 13080, 445, 29430, 1465, 25, 1018, 85, 497, 1848, 340, 197, 532, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestInitFrameworkWithScorePlugins(t *testing.T) { tests := []struct { name string plugins *config.Plugins // If initErr is true, we expect framework initialization to fail. initErr bool }{ { name: "enabled Score plugin doesn't exist in registry", plugins: buildScoreConfigDefaultWeights("notExist"), initErr: true, }, { name: "enabled Score plugin doesn't extend the ScorePlugin interface", plugins: buildScoreConfigDefaultWeights(pluginNotImplementingScore), initErr: true, }, { name: "Score plugins are nil", plugins: &config.Plugins{}, }, { name: "enabled Score plugin list is empty", plugins: buildScoreConfigDefaultWeights(), }, { name: "enabled plugin only implements ScorePlugin interface", plugins: buildScoreConfigDefaultWeights(scorePlugin1), }, { name: "enabled plugin implements ScoreWithNormalizePlugin interface", plugins: buildScoreConfigDefaultWeights(scoreWithNormalizePlugin1), }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { _, err := newFrameworkWithQueueSortAndBind(registry, tt.plugins, emptyArgs) if tt.initErr && err == nil { t.Fatal("Framework initialization should fail") } if !tt.initErr && err != nil { t.Fatalf("Failed to create framework for testing: %v", err) } }) } }
explode_data.jsonl/35737
{ "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, 3803, 14837, 2354, 10570, 45378, 1155, 353, 8840, 836, 8, 341, 78216, 1669, 3056, 1235, 341, 197, 11609, 262, 914, 198, 197, 197, 18716, 353, 1676, 21368, 6840, 198, 197, 197, 322, 1416, 2930, 7747, 374, 830, 11, 582, 1720, 12626, 17465, 311, 3690, 624, 197, 28248, 7747, 1807, 198, 197, 59403, 197, 197, 515, 298, 11609, 25, 262, 330, 15868, 18115, 9006, 3171, 944, 3000, 304, 19424, 756, 298, 197, 18716, 25, 1936, 10570, 2648, 3675, 55630, 445, 1921, 25613, 4461, 298, 28248, 7747, 25, 830, 345, 197, 197, 1583, 197, 197, 515, 298, 11609, 25, 262, 330, 15868, 18115, 9006, 3171, 944, 13036, 279, 18115, 11546, 3749, 756, 298, 197, 18716, 25, 1936, 10570, 2648, 3675, 55630, 46801, 2623, 62980, 287, 10570, 1326, 298, 28248, 7747, 25, 830, 345, 197, 197, 1583, 197, 197, 515, 298, 11609, 25, 262, 330, 10570, 17215, 525, 2092, 756, 298, 197, 18716, 25, 609, 1676, 21368, 6840, 38837, 197, 197, 1583, 197, 197, 515, 298, 11609, 25, 262, 330, 15868, 18115, 9006, 1140, 374, 4287, 756, 298, 197, 18716, 25, 1936, 10570, 2648, 3675, 55630, 3148, 197, 197, 1583, 197, 197, 515, 298, 11609, 25, 262, 330, 15868, 9006, 1172, 5169, 18115, 11546, 3749, 756, 298, 197, 18716, 25, 1936, 10570, 2648, 3675, 55630, 34480, 11546, 16, 1326, 197, 197, 1583, 197, 197, 515, 298, 11609, 25, 262, 330, 15868, 9006, 5169, 18115, 2354, 87824, 11546, 3749, 756, 298, 197, 18716, 25, 1936, 10570, 2648, 3675, 55630, 34480, 2354, 87824, 11546, 16, 1326, 197, 197, 1583, 197, 630, 2023, 8358, 17853, 1669, 2088, 7032, 341, 197, 3244, 16708, 47152, 2644, 11, 2915, 1155, 353, 8840, 836, 8, 341, 298, 197, 6878, 1848, 1669, 501, 14837, 2354, 7554, 10231, 3036, 9950, 18390, 4944, 11, 17853, 29391, 11, 4287, 4117, 340, 298, 743, 17853, 8271, 7747, 1009, 1848, 621, 2092, 341, 571, 3244, 26133, 445, 14837, 17465, 1265, 3690, 1138, 298, 197, 532, 298, 743, 753, 5566, 8271, 7747, 1009, 1848, 961, 2092, 341, 571, 3244, 30762, 445, 9408, 311, 1855, 12626, 369, 7497, 25, 1018, 85, 497, 1848, 340, 298, 197, 532, 197, 197, 3518, 197, 532, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestATSConfigs(t *testing.T) { WithObjs(t, []TCObj{CDNs, Types, Tenants, Parameters, Profiles, Statuses, Divisions, Regions, PhysLocations, CacheGroups, Servers, DeliveryServices}, func() { defer DeleteTestDeliveryServiceServersCreated(t) CreateTestDeliveryServiceServers(t) GetTestATSConfigs(t) }) }
explode_data.jsonl/20782
{ "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, 49107, 84905, 1155, 353, 8840, 836, 8, 341, 197, 2354, 4121, 2519, 1155, 11, 3056, 7749, 5261, 90, 6484, 47360, 11, 20768, 11, 17695, 1783, 11, 13522, 11, 71727, 11, 8104, 288, 11, 8765, 6805, 11, 77347, 11, 12809, 43037, 11, 19479, 22173, 11, 71797, 11, 26211, 11025, 2137, 2915, 368, 341, 197, 16867, 10428, 2271, 38121, 1860, 78139, 11694, 1155, 340, 197, 75569, 2271, 38121, 1860, 78139, 1155, 340, 197, 37654, 2271, 49107, 84905, 1155, 340, 197, 3518, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestStartEndExecutor(t *testing.T) { tests := []struct { name string mockDb NotificationLoader expectedResult []contract.Notification expectedError bool expectedErrType error }{ { name: "Successful database call", mockDb: createMockNotificiationLoaderStartEndStringArg("GetNotificationsByStartEnd", nil, SuccessfulDatabaseResult, Start, End, Limit), expectedResult: SuccessfulDatabaseResult, expectedError: false, expectedErrType: nil, }, { name: "Unsuccessful database call", mockDb: createMockNotificiationLoaderStartEndStringArg("GetNotificationsByStartEnd", Error, []contract.Notification{}, Start, End, Limit), expectedResult: []contract.Notification{}, expectedError: true, expectedErrType: Error, }, { name: "Notification not found", mockDb: createMockNotificiationLoaderStartEndStringArg("GetNotificationsByStartEnd", nil, []contract.Notification{}, Start, End, Limit), expectedResult: []contract.Notification{}, expectedError: true, expectedErrType: ErrorNotFound, }, { name: "Unknown Error", mockDb: createMockNotificiationLoaderStartEndStringArg("GetNotificationsByStartEnd", Error, SuccessfulDatabaseResult, Start, End, Limit), expectedResult: SuccessfulDatabaseResult, expectedError: true, expectedErrType: Error, }, } for _, test := range tests { t.Run(test.name, func(t *testing.T) { op := NewStartEndExecutor(test.mockDb, Start, End, Limit) actual, err := op.Execute() if test.expectedError && err == nil { t.Error("Expected an error") return } if !test.expectedError && err != nil { t.Errorf("Unexpectedly encountered error: %s", err.Error()) return } if !reflect.DeepEqual(test.expectedErrType, err) { t.Errorf("Expected error result does not match the observed.\nExpected: %v\nObserved: %v\n", test.expectedErrType, err) return } if !reflect.DeepEqual(test.expectedResult, actual) { t.Errorf("Expected result does not match the observed.\nExpected: %v\nObserved: %v\n", test.expectedResult, actual) return } }) } }
explode_data.jsonl/31059
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 872 }
[ 2830, 3393, 3479, 3727, 25255, 1155, 353, 8840, 836, 8, 341, 78216, 1669, 3056, 1235, 341, 197, 11609, 310, 914, 198, 197, 77333, 7994, 688, 16571, 9181, 198, 197, 42400, 2077, 220, 3056, 20257, 49329, 198, 197, 42400, 1454, 256, 1807, 198, 197, 42400, 7747, 929, 1465, 198, 197, 59403, 197, 197, 515, 298, 11609, 25, 310, 330, 36374, 4625, 1618, 756, 298, 77333, 7994, 25, 688, 1855, 11571, 2623, 1086, 7101, 9181, 3479, 3727, 703, 2735, 445, 1949, 34736, 1359, 3479, 3727, 497, 2092, 11, 45526, 5988, 2077, 11, 5145, 11, 3972, 11, 28008, 1326, 298, 42400, 2077, 25, 220, 45526, 5988, 2077, 345, 298, 42400, 1454, 25, 256, 895, 345, 298, 42400, 7747, 929, 25, 2092, 345, 197, 197, 1583, 197, 197, 515, 298, 11609, 25, 310, 330, 1806, 30950, 4625, 1618, 756, 298, 77333, 7994, 25, 688, 1855, 11571, 2623, 1086, 7101, 9181, 3479, 3727, 703, 2735, 445, 1949, 34736, 1359, 3479, 3727, 497, 4600, 11, 3056, 20257, 49329, 22655, 5145, 11, 3972, 11, 28008, 1326, 298, 42400, 2077, 25, 220, 3056, 20257, 49329, 38837, 298, 42400, 1454, 25, 256, 830, 345, 298, 42400, 7747, 929, 25, 4600, 345, 197, 197, 1583, 197, 197, 515, 298, 11609, 25, 310, 330, 11196, 537, 1730, 756, 298, 77333, 7994, 25, 688, 1855, 11571, 2623, 1086, 7101, 9181, 3479, 3727, 703, 2735, 445, 1949, 34736, 1359, 3479, 3727, 497, 2092, 11, 3056, 20257, 49329, 22655, 5145, 11, 3972, 11, 28008, 1326, 298, 42400, 2077, 25, 220, 3056, 20257, 49329, 38837, 298, 42400, 1454, 25, 256, 830, 345, 298, 42400, 7747, 929, 25, 4600, 10372, 345, 197, 197, 1583, 197, 197, 515, 298, 11609, 25, 310, 330, 13790, 4600, 756, 298, 77333, 7994, 25, 688, 1855, 11571, 2623, 1086, 7101, 9181, 3479, 3727, 703, 2735, 445, 1949, 34736, 1359, 3479, 3727, 497, 4600, 11, 45526, 5988, 2077, 11, 5145, 11, 3972, 11, 28008, 1326, 298, 42400, 2077, 25, 220, 45526, 5988, 2077, 345, 298, 42400, 1454, 25, 256, 830, 345, 298, 42400, 7747, 929, 25, 4600, 345, 197, 197, 1583, 197, 630, 2023, 8358, 1273, 1669, 2088, 7032, 341, 197, 3244, 16708, 8623, 2644, 11, 2915, 1155, 353, 8840, 836, 8, 341, 298, 39703, 1669, 1532, 3479, 3727, 25255, 8623, 15068, 7994, 11, 5145, 11, 3972, 11, 28008, 340, 298, 88814, 11, 1848, 1669, 1179, 13827, 741, 298, 743, 1273, 56835, 1454, 1009, 1848, 621, 2092, 341, 571, 3244, 6141, 445, 18896, 458, 1465, 1138, 571, 853, 198, 298, 197, 630, 298, 743, 753, 1944, 56835, 1454, 1009, 1848, 961, 2092, 341, 571, 3244, 13080, 445, 29430, 398, 23057, 1465, 25, 1018, 82, 497, 1848, 6141, 2398, 571, 853, 198, 298, 197, 630, 298, 743, 753, 34913, 94750, 8623, 56835, 7747, 929, 11, 1848, 8, 341, 571, 3244, 13080, 445, 18896, 1465, 1102, 1558, 537, 2432, 279, 13166, 7110, 77, 18896, 25, 1018, 85, 1699, 66111, 2771, 25, 1018, 85, 1699, 497, 1273, 56835, 7747, 929, 11, 1848, 340, 571, 853, 198, 298, 197, 630, 298, 743, 753, 34913, 94750, 8623, 56835, 2077, 11, 5042, 8, 341, 571, 3244, 13080, 445, 18896, 1102, 1558, 537, 2432, 279, 13166, 7110, 77, 18896, 25, 1018, 85, 1699, 66111, 2771, 25, 1018, 85, 1699, 497, 1273, 56835, 2077, 11, 5042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 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestColorRenderDescription(t *testing.T) { renderer := New(true) expected := "\x1b[37mDescription\x1b[0m\n" actual := renderer.RenderDescription("Description") assert.Equal(t, expected, actual) }
explode_data.jsonl/12221
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 71 }
[ 2830, 3393, 1636, 6750, 5009, 1155, 353, 8840, 836, 8, 341, 83509, 1669, 1532, 3715, 340, 42400, 1669, 2917, 87, 16, 65, 58, 18, 22, 76, 5009, 3462, 16, 65, 58, 15, 76, 1699, 698, 88814, 1669, 19715, 27386, 5009, 445, 5009, 1138, 6948, 12808, 1155, 11, 3601, 11, 5042, 340, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestLargeContractBlock(t *testing.T) { if testing.Short() { t.SkipNow() } t.Parallel() ht, err := newHostTester("TestLargeContractBlock") if err != nil { t.Fatal(err) } defer func() { if err := ht.Close(); err != nil { t.Fatal(err) } }() // Create 2 storage obligations for the test and add them to the host. so1, err := ht.newTesterStorageObligation() if err != nil { t.Fatal(err) } ht.host.managedLockStorageObligation(so1.id()) err = ht.host.managedAddStorageObligation(so1) if err != nil { t.Fatal(err) } ht.host.managedUnlockStorageObligation(so1.id()) so2, err := ht.newTesterStorageObligation() if err != nil { t.Fatal(err) } ht.host.managedLockStorageObligation(so2.id()) err = ht.host.managedAddStorageObligation(so2) if err != nil { t.Fatal(err) } ht.host.managedUnlockStorageObligation(so2.id()) // Add a file contract revision, increasing the filesize of the obligation // beyong the largeContractSize. validPayouts, missedPayouts := so1.payouts() validPayouts[0].Value = validPayouts[0].Value.Sub(types.ZeroCurrency) validPayouts[1].Value = validPayouts[1].Value.Add(types.ZeroCurrency) missedPayouts[0].Value = missedPayouts[0].Value.Sub(types.ZeroCurrency) missedPayouts[1].Value = missedPayouts[1].Value.Add(types.ZeroCurrency) revisionSet := []types.Transaction{{ FileContractRevisions: []types.FileContractRevision{{ ParentID: so1.id(), UnlockConditions: types.UnlockConditions{}, NewRevisionNumber: 1, NewFileSize: uint64(largeContractSize), NewFileMerkleRoot: crypto.Hash{}, NewWindowStart: so1.expiration(), NewWindowEnd: so1.proofDeadline(), NewValidProofOutputs: validPayouts, NewMissedProofOutputs: missedPayouts, NewUnlockHash: types.UnlockConditions{}.UnlockHash(), }}, }} so1.RevisionTransactionSet = revisionSet ht.host.managedLockStorageObligation(so1.id()) err = ht.host.managedModifyStorageObligation(so1, nil, nil) if err != nil { t.Fatal(err) } ht.host.managedUnlockStorageObligation(so1.id()) err = ht.host.tg.Flush() if err != nil { t.Fatal(err) } // Lock so1 for the remaining test. This shouldn't block operations on so2. ht.host.managedLockStorageObligation(so1.id()) defer ht.host.managedUnlockStorageObligation(so1.id()) done := make(chan struct{}) go func() { // Modify so1. This should at least take // largeContractUpdateDelay seconds. defer close(done) start := time.Now() err := ht.host.managedModifyStorageObligation(so1, nil, nil) delay := time.Since(start) if err != nil { t.Error(err) } if delay < largeContractUpdateDelay { t.Errorf("delay should be at least %v but was %v", largeContractUpdateDelay, delay) } }() // Lock so2 and modify it repeatedly. This simulates uploads to a different // contract. No modification sho numMods := 0 LOOP: for { select { case <-done: break LOOP default: } numMods++ ht.host.managedLockStorageObligation(so2.id()) start := time.Now() err := ht.host.managedModifyStorageObligation(so2, nil, nil) delay := time.Since(start) ht.host.managedUnlockStorageObligation(so2.id()) if err != nil { t.Fatal(err) } if delay >= largeContractUpdateDelay { t.Fatal("delay was longer than largeContractDelay which means so2 got blocked by so1", delay, largeContractUpdateDelay) } } if numMods == 0 { t.Fatal("expected at least one modification to happen to so2") } t.Logf("updated so2 %v times", numMods) }
explode_data.jsonl/47342
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 1382 }
[ 2830, 3393, 34253, 14067, 4713, 1155, 353, 8840, 836, 8, 341, 743, 7497, 55958, 368, 341, 197, 3244, 57776, 7039, 741, 197, 532, 3244, 41288, 7957, 741, 197, 426, 11, 1848, 1669, 501, 9296, 58699, 445, 2271, 34253, 14067, 4713, 1138, 743, 1848, 961, 2092, 341, 197, 3244, 26133, 3964, 340, 197, 532, 16867, 2915, 368, 341, 197, 743, 1848, 1669, 34323, 10421, 2129, 1848, 961, 2092, 341, 298, 3244, 26133, 3964, 340, 197, 197, 532, 197, 66816, 197, 322, 4230, 220, 17, 5819, 29155, 369, 279, 1273, 323, 912, 1105, 311, 279, 3468, 624, 197, 704, 16, 11, 1848, 1669, 34323, 4618, 58699, 5793, 46, 2024, 17930, 741, 743, 1848, 961, 2092, 341, 197, 3244, 26133, 3964, 340, 197, 532, 197, 426, 17840, 99052, 11989, 5793, 46, 2024, 17930, 95036, 16, 1764, 2398, 9859, 284, 34323, 17840, 99052, 2212, 5793, 46, 2024, 17930, 95036, 16, 340, 743, 1848, 961, 2092, 341, 197, 3244, 26133, 3964, 340, 197, 532, 197, 426, 17840, 99052, 49679, 5793, 46, 2024, 17930, 95036, 16, 1764, 2398, 197, 704, 17, 11, 1848, 1669, 34323, 4618, 58699, 5793, 46, 2024, 17930, 741, 743, 1848, 961, 2092, 341, 197, 3244, 26133, 3964, 340, 197, 532, 197, 426, 17840, 99052, 11989, 5793, 46, 2024, 17930, 95036, 17, 1764, 2398, 9859, 284, 34323, 17840, 99052, 2212, 5793, 46, 2024, 17930, 95036, 17, 340, 743, 1848, 961, 2092, 341, 197, 3244, 26133, 3964, 340, 197, 532, 197, 426, 17840, 99052, 49679, 5793, 46, 2024, 17930, 95036, 17, 1764, 12367, 197, 322, 2691, 264, 1034, 5116, 23578, 11, 7703, 279, 70436, 315, 279, 28572, 198, 197, 322, 7732, 644, 279, 3460, 14067, 1695, 624, 56322, 47, 1407, 82, 11, 13628, 47, 1407, 82, 1669, 773, 16, 556, 1407, 82, 741, 56322, 47, 1407, 82, 58, 15, 936, 1130, 284, 2697, 47, 1407, 82, 58, 15, 936, 1130, 12391, 52613, 35489, 26321, 340, 56322, 47, 1407, 82, 58, 16, 936, 1130, 284, 2697, 47, 1407, 82, 58, 16, 936, 1130, 1904, 52613, 35489, 26321, 340, 197, 1831, 291, 47, 1407, 82, 58, 15, 936, 1130, 284, 13628, 47, 1407, 82, 58, 15, 936, 1130, 12391, 52613, 35489, 26321, 340, 197, 1831, 291, 47, 1407, 82, 58, 16, 936, 1130, 284, 13628, 47, 1407, 82, 58, 16, 936, 1130, 1904, 52613, 35489, 26321, 340, 197, 28342, 1649, 1669, 3056, 9242, 29284, 90, 515, 197, 24848, 14067, 693, 40015, 25, 3056, 9242, 8576, 14067, 33602, 90, 515, 298, 197, 8387, 915, 25, 688, 773, 16, 1764, 3148, 298, 197, 49679, 35435, 25, 220, 4494, 39188, 35435, 38837, 298, 197, 3564, 33602, 2833, 25, 220, 16, 3554, 298, 197, 3564, 67649, 25, 1843, 2622, 21, 19, 2333, 2744, 14067, 1695, 1326, 298, 197, 3564, 1703, 44, 16754, 273, 8439, 25, 257, 19028, 15103, 38837, 298, 197, 3564, 4267, 3479, 25, 286, 773, 16, 2223, 28479, 3148, 298, 197, 3564, 4267, 3727, 25, 688, 773, 16, 2709, 1055, 83593, 3148, 298, 197, 3564, 4088, 31076, 61438, 25, 220, 2697, 47, 1407, 82, 345, 298, 197, 3564, 35312, 291, 31076, 61438, 25, 13628, 47, 1407, 82, 345, 298, 197, 3564, 49679, 6370, 25, 260, 4494, 39188, 35435, 46391, 49679, 6370, 3148, 197, 197, 22050, 197, 11248, 197, 704, 16, 2817, 13013, 8070, 1649, 284, 23578, 1649, 198, 197, 426, 17840, 99052, 11989, 5793, 46, 2024, 17930, 95036, 16, 1764, 2398, 9859, 284, 34323, 17840, 99052, 44427, 5793, 46, 2024, 17930, 95036, 16, 11, 2092, 11, 2092, 340, 743, 1848, 961, 2092, 341, 197, 3244, 26133, 3964, 340, 197, 532, 197, 426, 17840, 99052, 49679, 5793, 46, 2024, 17930, 95036, 16, 1764, 2398, 9859, 284, 34323, 17840, 734, 70, 61559, 741, 743, 1848, 961, 2092, 341, 197, 3244, 26133, 3964, 340, 197, 630, 197, 322, 15701, 773, 16, 369, 279, 9664, 1273, 13, 1096, 13133, 944, 2504, 7525, 389, 773, 17, 624, 197, 426, 17840, 99052, 11989, 5793, 46, 2024, 17930, 95036, 16, 1764, 2398, 16867, 34323, 17840, 99052, 49679, 5793, 46, 2024, 17930, 95036, 16, 1764, 12367, 40495, 1669, 1281, 35190, 2036, 37790, 30680, 2915, 368, 341, 197, 197, 322, 49370, 773, 16, 13, 1096, 1265, 518, 3245, 1896, 198, 197, 197, 322, 3460, 14067, 4289, 20039, 6486, 624, 197, 16867, 3265, 34232, 340, 197, 21375, 1669, 882, 13244, 741, 197, 9859, 1669, 34323, 17840, 99052, 44427, 5793, 46, 2024, 17930, 95036, 16, 11, 2092, 11, 2092, 340, 197, 55174, 1669, 882, 93404, 10639, 340, 197, 743, 1848, 961, 2092, 341, 298, 3244, 6141, 3964, 340, 197, 197, 532, 197, 743, 7626, 366, 3460, 14067, 4289, 20039, 341, 298, 3244, 13080, 445, 22263, 1265, 387, 518, 3245, 1018, 85, 714, 572, 1018, 85, 497, 3460, 14067, 4289, 20039, 11, 7626, 340, 197, 197, 532, 197, 69826, 197, 322, 15701, 773, 17, 323, 5602, 432, 18822, 13, 1096, 1643, 23156, 66563, 311, 264, 2155, 198, 197, 322, 5116, 13, 2308, 17030, 71519, 198, 22431, 81500, 1669, 220, 15, 198, 89571, 510, 2023, 341, 197, 38010, 341, 197, 2722, 9119, 10438, 510, 298, 3388, 69530, 198, 197, 11940, 510, 197, 197, 532, 197, 22431, 81500, 22940, 197, 197, 426, 17840, 99052, 11989, 5793, 46, 2024, 17930, 95036, 17, 1764, 2398, 197, 21375, 1669, 882, 13244, 741, 197, 9859, 1669, 34323, 17840, 99052, 44427, 5793, 46, 2024, 17930, 95036, 17, 11, 2092, 11, 2092, 340, 197, 55174, 1669, 882, 93404, 10639, 340, 197, 197, 426, 17840, 99052, 49679, 5793, 46, 2024, 17930, 95036, 17, 1764, 2398, 197, 743, 1848, 961, 2092, 341, 298, 3244, 26133, 3964, 340, 197, 197, 532, 197, 743, 7626, 2604, 3460, 14067, 4289, 20039, 341, 298, 3244, 26133, 445, 22263, 572, 5021, 1091, 3460, 14067, 20039, 892, 3363, 773, 17, 2684, 19299, 553, 773, 16, 497, 7626, 11, 3460, 14067, 4289, 20039, 340, 197, 197, 532, 197, 532, 743, 1629, 81500, 621, 220, 15, 341, 197,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, 1, 1 ]
2
func TestFilterFailsToInit(t *testing.T) { // Arrange config := getConfigWithFilters(t, []string{"filter.1"}) nFilter := filterstest.MockFilter{} nFilter.On("Init", mock.Anything). Return(errors.New("failed to init")).Once() loader := loaderstest.MockLoader{} loader.On("LoadFilter", "filter.1").Return(&nFilter, nil) defer loader.AssertExpectations(t) // Act server, err := New(config, zap.NewNop(), &loader) // Assert assert.Nil(t, server) assert.Equal(t, err.Error(), "failed to init") }
explode_data.jsonl/59973
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 191 }
[ 2830, 3393, 5632, 37, 6209, 1249, 3803, 1155, 353, 8840, 836, 8, 341, 197, 322, 40580, 198, 25873, 1669, 66763, 2354, 28351, 1155, 11, 3056, 917, 4913, 5315, 13, 16, 1, 8824, 9038, 5632, 1669, 4051, 267, 477, 24664, 5632, 16094, 9038, 5632, 8071, 445, 3803, 497, 7860, 13311, 1596, 4292, 197, 64906, 38881, 7121, 445, 16091, 311, 2930, 15197, 12522, 2822, 197, 8355, 1669, 16047, 267, 477, 24664, 9181, 16094, 197, 8355, 8071, 445, 5879, 5632, 497, 330, 5315, 13, 16, 1827, 5598, 2099, 77, 5632, 11, 2092, 340, 16867, 16047, 11711, 17536, 804, 1155, 692, 197, 322, 3218, 198, 41057, 11, 1848, 1669, 1532, 8754, 11, 32978, 7121, 45, 453, 1507, 609, 8355, 692, 197, 322, 5319, 198, 6948, 59678, 1155, 11, 3538, 340, 6948, 12808, 1155, 11, 1848, 6141, 1507, 330, 16091, 311, 2930, 1138, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestSetenv(t *testing.T) { job := mkJob(t, "dummy") job.Setenv("foo", "bar") if val := job.Getenv("foo"); val != "bar" { t.Fatalf("Getenv returns incorrect value: %s", val) } job.Setenv("bar", "") if val := job.Getenv("bar"); val != "" { t.Fatalf("Getenv returns incorrect value: %s", val) } if val := job.Getenv("nonexistent"); val != "" { t.Fatalf("Getenv returns incorrect value: %s", val) } }
explode_data.jsonl/15386
{ "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, 1649, 3160, 1155, 353, 8840, 836, 8, 341, 68577, 1669, 23789, 12245, 1155, 11, 330, 31390, 1138, 68577, 4202, 3160, 445, 7975, 497, 330, 2257, 1138, 743, 1044, 1669, 2618, 64883, 445, 7975, 5038, 1044, 961, 330, 2257, 1, 341, 197, 3244, 30762, 445, 1949, 3160, 4675, 15114, 897, 25, 1018, 82, 497, 1044, 340, 197, 630, 68577, 4202, 3160, 445, 2257, 497, 14676, 743, 1044, 1669, 2618, 64883, 445, 2257, 5038, 1044, 961, 1591, 341, 197, 3244, 30762, 445, 1949, 3160, 4675, 15114, 897, 25, 1018, 82, 497, 1044, 340, 197, 532, 743, 1044, 1669, 2618, 64883, 445, 6280, 64085, 5038, 1044, 961, 1591, 341, 197, 3244, 30762, 445, 1949, 3160, 4675, 15114, 897, 25, 1018, 82, 497, 1044, 340, 197, 532, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestCreatePipelineVersion_StorePipelineVersionMetadataError(t *testing.T) { store := NewFakeClientManagerOrFatal(util.NewFakeTimeForEpoch()) defer store.Close() manager := NewResourceManager(store) // Create a pipeline. _, err := manager.CreatePipeline( "pipeline", "", []byte("apiVersion: argoproj.io/v1alpha1\nkind: Workflow")) assert.Nil(t, err) // Close db. store.DB().Close() // Create a version under the above pipeline, resulting in error because of // closed db. pipelineStore, ok := store.pipelineStore.(*storage.PipelineStore) assert.True(t, ok) pipelineStore.SetUUIDGenerator(util.NewFakeUUIDGeneratorOrFatal( FakeUUIDOne, nil)) _, err = manager.CreatePipelineVersion( &api.PipelineVersion{ Name: "pipeline_version", ResourceReferences: []*api.ResourceReference{ &api.ResourceReference{ Key: &api.ResourceKey{ Id: DefaultFakeUUID, Type: api.ResourceType_PIPELINE, }, Relationship: api.Relationship_OWNER, }, }, }, []byte("apiVersion: argoproj.io/v1alpha1\nkind: Workflow"), true) assert.Equal(t, codes.Internal, err.(*util.UserError).ExternalStatusCode()) assert.Contains(t, err.Error(), "database is closed") }
explode_data.jsonl/77074
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 464 }
[ 2830, 3393, 4021, 34656, 5637, 92684, 34656, 5637, 14610, 1454, 1155, 353, 8840, 836, 8, 341, 57279, 1669, 1532, 52317, 2959, 2043, 2195, 62396, 67811, 7121, 52317, 1462, 2461, 44338, 2398, 16867, 3553, 10421, 741, 92272, 1669, 1532, 32498, 31200, 692, 197, 322, 4230, 264, 15301, 624, 197, 6878, 1848, 1669, 6645, 7251, 34656, 1006, 197, 197, 1, 51258, 756, 197, 197, 39680, 197, 197, 1294, 3782, 445, 2068, 5637, 25, 1392, 45926, 73, 4245, 5457, 16, 7141, 16, 1699, 15314, 25, 60173, 5455, 6948, 59678, 1155, 11, 1848, 692, 197, 322, 13032, 2927, 624, 57279, 22537, 1005, 7925, 2822, 197, 322, 4230, 264, 2319, 1212, 279, 3403, 15301, 11, 12942, 304, 1465, 1576, 315, 198, 197, 322, 7877, 2927, 624, 3223, 8790, 6093, 11, 5394, 1669, 3553, 57733, 6093, 41399, 16172, 1069, 8790, 6093, 340, 6948, 32443, 1155, 11, 5394, 340, 3223, 8790, 6093, 4202, 24754, 12561, 67811, 7121, 52317, 24754, 12561, 2195, 62396, 1006, 197, 12727, 726, 24754, 3966, 11, 2092, 1171, 197, 6878, 1848, 284, 6645, 7251, 34656, 5637, 1006, 197, 197, 5, 2068, 1069, 8790, 5637, 515, 298, 21297, 25, 330, 51258, 9438, 756, 298, 79487, 31712, 25, 29838, 2068, 20766, 8856, 515, 571, 197, 5, 2068, 20766, 8856, 515, 464, 55242, 25, 609, 2068, 20766, 1592, 515, 1144, 67211, 25, 256, 7899, 52317, 24754, 345, 1144, 27725, 25, 6330, 20766, 929, 96516, 345, 464, 197, 1583, 464, 197, 50822, 25, 6330, 38939, 15471, 74323, 345, 571, 197, 1583, 298, 197, 1583, 197, 197, 1583, 197, 197, 1294, 3782, 445, 2068, 5637, 25, 1392, 45926, 73, 4245, 5457, 16, 7141, 16, 1699, 15314, 25, 60173, 3975, 830, 340, 6948, 12808, 1155, 11, 13912, 32579, 11, 1848, 41399, 1314, 7344, 1454, 568, 25913, 15872, 2398, 6948, 11545, 1155, 11, 1848, 6141, 1507, 330, 12216, 374, 7877, 1138, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestGetEvent_ReadSecrets(t *testing.T) { valSt := []string{"s1", "s2"} val, _ := json.Marshal(valSt) os.Setenv("Http_Secrets", string(val)) owner := "alexellis" os.Setenv("Http_Owner", owner) installationID := "123456" os.Setenv("Http_Installation_id", installationID) eventInfo, err := getEventFromEnv() if err != nil { t.Errorf(err.Error()) t.Fail() } expected := []string{owner + "-s1", owner + "-s2"} for _, val := range eventInfo.Secrets { found := false for _, expectedVal := range expected { if expectedVal == val { found = true } } if !found { t.Errorf("Wanted secret: %s, didn't find it in list", val) } } }
explode_data.jsonl/11972
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 271 }
[ 2830, 3393, 1949, 1556, 38381, 19773, 82, 1155, 353, 8840, 836, 8, 1476, 19302, 623, 1669, 3056, 917, 4913, 82, 16, 497, 330, 82, 17, 16707, 19302, 11, 716, 1669, 2951, 37271, 9098, 623, 340, 25078, 4202, 3160, 445, 2905, 1098, 50856, 82, 497, 914, 9098, 4390, 197, 8118, 1669, 330, 55875, 613, 285, 698, 25078, 4202, 3160, 445, 2905, 2232, 4721, 497, 6372, 692, 197, 80816, 915, 1669, 330, 16, 17, 18, 19, 20, 21, 698, 25078, 4202, 3160, 445, 2905, 62, 55453, 842, 497, 13713, 915, 692, 28302, 1731, 11, 1848, 1669, 633, 1556, 3830, 14359, 741, 743, 1848, 961, 2092, 341, 197, 3244, 13080, 3964, 6141, 2398, 197, 3244, 57243, 741, 197, 630, 42400, 1669, 3056, 917, 90, 8118, 488, 6523, 82, 16, 497, 6372, 488, 6523, 82, 17, 16707, 2023, 8358, 1044, 1669, 2088, 1538, 1731, 74779, 82, 341, 197, 58102, 1669, 895, 198, 197, 2023, 8358, 3601, 2208, 1669, 2088, 3601, 341, 298, 743, 3601, 2208, 621, 1044, 341, 571, 58102, 284, 830, 198, 298, 197, 532, 197, 197, 532, 197, 743, 753, 15105, 341, 298, 3244, 13080, 445, 54, 7566, 6234, 25, 1018, 82, 11, 3207, 944, 1477, 432, 304, 1140, 497, 1044, 340, 197, 197, 532, 197, 532, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestStartCmdCreateKMSFailure(t *testing.T) { t.Run("KMS fails (DB)", func(t *testing.T) { startCmd := GetStartCmd() args := []string{ "--" + hostURLFlagName, "localhost:8080", "--" + hostMetricsURLFlagName, "localhost:8081", "--" + casTypeFlagName, "ipfs", "--" + ipfsURLFlagName, "localhost:8081", "--" + vctURLFlagName, "localhost:8081", "--" + didNamespaceFlagName, "namespace", "--" + databaseTypeFlagName, databaseTypeMemOption, "--" + kmsSecretsDatabaseTypeFlagName, databaseTypeCouchDBOption, "--" + anchorCredentialSignatureSuiteFlagName, "suite", "--" + anchorCredentialDomainFlagName, "domain.com", "--" + anchorCredentialIssuerFlagName, "issuer.com", "--" + anchorCredentialURLFlagName, "peer.com", "--" + kmsSecretsDatabaseURLFlagName, "badURL", } startCmd.SetArgs(args) err := startCmd.Execute() require.NotNil(t, err) require.Contains(t, err.Error(), "failed to ping couchDB") }) t.Run("KMS fails (create kid)", func(t *testing.T) { startCmd := GetStartCmd() args := []string{ "--" + hostURLFlagName, "localhost:8080", "--" + hostMetricsURLFlagName, "localhost:8081", "--" + casTypeFlagName, "local", "--" + vctURLFlagName, "localhost:8081", "--" + didNamespaceFlagName, "namespace", "--" + databaseTypeFlagName, databaseTypeMemOption, "--" + anchorCredentialSignatureSuiteFlagName, "suite", "--" + anchorCredentialDomainFlagName, "domain.com", "--" + anchorCredentialIssuerFlagName, "issuer.com", "--" + anchorCredentialURLFlagName, "peer.com", "--" + kmsStoreEndpointFlagName, "https://vct.example.com", } startCmd.SetArgs(args) err := startCmd.Execute() require.NotNil(t, err) require.Contains(t, err.Error(), "create kid: init config value for") }) t.Run("KMS fails (create remote store)", func(t *testing.T) { startCmd := GetStartCmd() args := []string{ "--" + hostURLFlagName, "localhost:8080", "--" + hostMetricsURLFlagName, "localhost:8081", "--" + casTypeFlagName, "local", "--" + vctURLFlagName, "localhost:8081", "--" + didNamespaceFlagName, "namespace", "--" + databaseTypeFlagName, databaseTypeMemOption, "--" + anchorCredentialSignatureSuiteFlagName, "suite", "--" + anchorCredentialDomainFlagName, "domain.com", "--" + anchorCredentialIssuerFlagName, "issuer.com", "--" + anchorCredentialURLFlagName, "peer.com", "--" + kmsEndpointFlagName, "https://vct.example.com", } startCmd.SetArgs(args) err := startCmd.Execute() require.NotNil(t, err) require.Contains(t, err.Error(), "init config value for \"web-key-store\"") }) }
explode_data.jsonl/31126
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 1053 }
[ 2830, 3393, 3479, 15613, 4021, 42, 4826, 17507, 1155, 353, 8840, 836, 8, 341, 3244, 16708, 445, 42, 4826, 14525, 320, 3506, 11583, 2915, 1155, 353, 8840, 836, 8, 341, 197, 21375, 15613, 1669, 2126, 3479, 15613, 2822, 197, 31215, 1669, 3056, 917, 515, 298, 197, 74757, 1, 488, 3468, 3144, 12135, 675, 11, 330, 8301, 25, 23, 15, 23, 15, 756, 298, 197, 74757, 1, 488, 3468, 27328, 3144, 12135, 675, 11, 330, 8301, 25, 23, 15, 23, 16, 756, 298, 197, 74757, 1, 488, 4760, 929, 12135, 675, 11, 330, 573, 3848, 756, 298, 197, 74757, 1, 488, 5997, 3848, 3144, 12135, 675, 11, 330, 8301, 25, 23, 15, 23, 16, 756, 298, 197, 74757, 1, 488, 348, 302, 3144, 12135, 675, 11, 330, 8301, 25, 23, 15, 23, 16, 756, 298, 197, 74757, 1, 488, 1521, 22699, 12135, 675, 11, 330, 2231, 756, 298, 197, 74757, 1, 488, 4625, 929, 12135, 675, 11, 4625, 929, 18816, 5341, 345, 298, 197, 74757, 1, 488, 96677, 19773, 82, 5988, 929, 12135, 675, 11, 4625, 929, 34, 3026, 3506, 5341, 345, 298, 197, 74757, 1, 488, 17105, 48265, 25088, 28000, 12135, 675, 11, 330, 49992, 756, 298, 197, 74757, 1, 488, 17105, 48265, 13636, 12135, 675, 11, 330, 12204, 905, 756, 298, 197, 74757, 1, 488, 17105, 48265, 98902, 12135, 675, 11, 330, 66817, 905, 756, 298, 197, 74757, 1, 488, 17105, 48265, 3144, 12135, 675, 11, 330, 16537, 905, 756, 298, 197, 74757, 1, 488, 96677, 19773, 82, 5988, 3144, 12135, 675, 11, 330, 13855, 3144, 756, 197, 197, 532, 197, 21375, 15613, 4202, 4117, 7356, 692, 197, 9859, 1669, 1191, 15613, 13827, 741, 197, 17957, 93882, 1155, 11, 1848, 340, 197, 17957, 11545, 1155, 11, 1848, 6141, 1507, 330, 16091, 311, 29998, 26148, 3506, 1138, 197, 8824, 3244, 16708, 445, 42, 4826, 14525, 320, 3182, 10369, 11583, 2915, 1155, 353, 8840, 836, 8, 341, 197, 21375, 15613, 1669, 2126, 3479, 15613, 2822, 197, 31215, 1669, 3056, 917, 515, 298, 197, 74757, 1, 488, 3468, 3144, 12135, 675, 11, 330, 8301, 25, 23, 15, 23, 15, 756, 298, 197, 74757, 1, 488, 3468, 27328, 3144, 12135, 675, 11, 330, 8301, 25, 23, 15, 23, 16, 756, 298, 197, 74757, 1, 488, 4760, 929, 12135, 675, 11, 330, 2438, 756, 298, 197, 74757, 1, 488, 348, 302, 3144, 12135, 675, 11, 330, 8301, 25, 23, 15, 23, 16, 756, 298, 197, 74757, 1, 488, 1521, 22699, 12135, 675, 11, 330, 2231, 756, 298, 197, 74757, 1, 488, 4625, 929, 12135, 675, 11, 4625, 929, 18816, 5341, 345, 298, 197, 74757, 1, 488, 17105, 48265, 25088, 28000, 12135, 675, 11, 330, 49992, 756, 298, 197, 74757, 1, 488, 17105, 48265, 13636, 12135, 675, 11, 330, 12204, 905, 756, 298, 197, 74757, 1, 488, 17105, 48265, 98902, 12135, 675, 11, 330, 66817, 905, 756, 298, 197, 74757, 1, 488, 17105, 48265, 3144, 12135, 675, 11, 330, 16537, 905, 756, 298, 197, 74757, 1, 488, 96677, 6093, 27380, 12135, 675, 11, 330, 2428, 1110, 85, 302, 7724, 905, 756, 197, 197, 532, 197, 21375, 15613, 4202, 4117, 7356, 692, 197, 9859, 1669, 1191, 15613, 13827, 741, 197, 17957, 93882, 1155, 11, 1848, 340, 197, 17957, 11545, 1155, 11, 1848, 6141, 1507, 330, 3182, 10369, 25, 2930, 2193, 897, 369, 1138, 197, 8824, 3244, 16708, 445, 42, 4826, 14525, 320, 3182, 8699, 3553, 11583, 2915, 1155, 353, 8840, 836, 8, 341, 197, 21375, 15613, 1669, 2126, 3479, 15613, 2822, 197, 31215, 1669, 3056, 917, 515, 298, 197, 74757, 1, 488, 3468, 3144, 12135, 675, 11, 330, 8301, 25, 23, 15, 23, 15, 756, 298, 197, 74757, 1, 488, 3468, 27328, 3144, 12135, 675, 11, 330, 8301, 25, 23, 15, 23, 16, 756, 298, 197, 74757, 1, 488, 4760, 929, 12135, 675, 11, 330, 2438, 756, 298, 197, 74757, 1, 488, 348, 302, 3144, 12135, 675, 11, 330, 8301, 25, 23, 15, 23, 16, 756, 298, 197, 74757, 1, 488, 1521, 22699, 12135, 675, 11, 330, 2231, 756, 298, 197, 74757, 1, 488, 4625, 929, 12135, 675, 11, 4625, 929, 18816, 5341, 345, 298, 197, 74757, 1, 488, 17105, 48265, 25088, 28000, 12135, 675, 11, 330, 49992, 756, 298, 197, 74757, 1, 488, 17105, 48265, 13636, 12135, 675, 11, 330, 12204, 905, 756, 298, 197, 74757, 1, 488, 17105, 48265, 98902, 12135, 675, 11, 330, 66817, 905, 756, 298, 197, 74757, 1, 488, 17105, 48265, 3144, 12135, 675, 11, 330, 16537, 905, 756, 298, 197, 74757, 1, 488, 96677, 27380, 12135, 675, 11, 330, 2428, 1110, 85, 302, 7724, 905, 756, 197, 197, 532, 197, 21375, 15613, 4202, 4117, 7356, 692, 197, 9859, 1669, 1191, 15613, 13827, 741, 197, 17957, 93882, 1155, 11, 1848, 340, 197, 17957, 11545, 1155, 11, 1848, 6141, 1507, 330, 2327, 2193, 897, 369, 7245, 2911, 16173, 33252, 2105, 1138, 197, 3518, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,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1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestGetStraddle(t *testing.T) { iter := GetStraddle(tests.TestStraddleSymbol) success := iter.Next() assert.True(t, success) assert.Nil(t, iter.Err()) assert.Equal(t, iter.Meta().UnderlyingSymbol, tests.TestStraddleSymbol) }
explode_data.jsonl/70632
{ "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, 1949, 2580, 20137, 1155, 353, 8840, 836, 8, 1476, 79924, 1669, 2126, 2580, 20137, 8623, 82, 8787, 2580, 20137, 15090, 340, 30553, 1669, 5367, 18501, 741, 6948, 32443, 1155, 11, 2393, 340, 6948, 59678, 1155, 11, 5367, 27862, 2398, 6948, 12808, 1155, 11, 5367, 58806, 1005, 16250, 6711, 15090, 11, 7032, 8787, 2580, 20137, 15090, 340, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_NewOrder(t *testing.T) { key := makePrivateKey(t) account, err := testClient.NewAccount(key, false, true) if err != nil { t.Fatalf("unexpected error making account: %v", err) } identifiers := []Identifier{{"dns", randString() + ".com"}} order, err := testClient.NewOrder(account, identifiers) if err != nil { t.Fatalf("unexpected error making order: %v", err) } if !reflect.DeepEqual(order.Identifiers, identifiers) { t.Fatalf("order identifiers mismatch, identifiers: %+v, order identifiers: %+v", identifiers, order.Identifiers) } badIdentifiers := []Identifier{{"bad", randString() + ".com"}} _, err = testClient.NewOrder(account, badIdentifiers) if err == nil { t.Fatal("expected error, got none") } if _, ok := err.(Problem); !ok { t.Fatalf("expected Problem, got: %v - %v", reflect.TypeOf(err), err) } }
explode_data.jsonl/68105
{ "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, 2959, 39582, 4431, 1155, 353, 8840, 836, 8, 341, 23634, 1669, 1281, 75981, 1155, 340, 86866, 11, 1848, 1669, 1273, 2959, 7121, 7365, 4857, 11, 895, 11, 830, 340, 743, 1848, 961, 2092, 341, 197, 3244, 30762, 445, 53859, 1465, 3259, 2692, 25, 1018, 85, 497, 1848, 340, 197, 630, 197, 1713, 11836, 1669, 3056, 8714, 2979, 1, 45226, 497, 10382, 703, 368, 488, 5933, 874, 95642, 42245, 11, 1848, 1669, 1273, 2959, 7121, 4431, 23758, 11, 47216, 340, 743, 1848, 961, 2092, 341, 197, 3244, 30762, 445, 53859, 1465, 3259, 1973, 25, 1018, 85, 497, 1848, 340, 197, 532, 743, 753, 34913, 94750, 19385, 6444, 306, 11836, 11, 47216, 8, 341, 197, 3244, 30762, 445, 1358, 47216, 35301, 11, 47216, 25, 68524, 85, 11, 1973, 47216, 25, 68524, 85, 497, 47216, 11, 1973, 6444, 306, 11836, 340, 197, 630, 2233, 329, 28301, 11836, 1669, 3056, 8714, 2979, 1, 13855, 497, 10382, 703, 368, 488, 5933, 874, 95642, 197, 6878, 1848, 284, 1273, 2959, 7121, 4431, 23758, 11, 3873, 28301, 11836, 340, 743, 1848, 621, 2092, 341, 197, 3244, 26133, 445, 7325, 1465, 11, 2684, 6857, 1138, 197, 532, 743, 8358, 5394, 1669, 1848, 12832, 31198, 1215, 753, 562, 341, 197, 3244, 30762, 445, 7325, 22079, 11, 2684, 25, 1018, 85, 481, 1018, 85, 497, 8708, 73921, 3964, 701, 1848, 340, 197, 532, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestFormatValid(t *testing.T) { cases := []struct { in string expected bool }{ {"xml", true}, {"lis", true}, {"html", false}, } for _, c := range cases { got := FormatValid(c.in) if got != c.expected { t.Errorf("FormatValid(%q) == %t, expected %t\n", c.in, got, c.expected) } } }
explode_data.jsonl/67944
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 141 }
[ 2830, 3393, 4061, 4088, 1155, 353, 8840, 836, 8, 341, 1444, 2264, 1669, 3056, 1235, 341, 197, 17430, 981, 914, 198, 197, 42400, 1807, 198, 197, 59403, 197, 197, 4913, 6455, 497, 830, 1583, 197, 197, 4913, 47203, 497, 830, 1583, 197, 197, 4913, 1551, 497, 895, 1583, 197, 532, 2023, 8358, 272, 1669, 2088, 5048, 341, 197, 3174, 354, 1669, 15042, 4088, 1337, 1858, 340, 197, 743, 2684, 961, 272, 56835, 341, 298, 3244, 13080, 445, 4061, 4088, 15238, 80, 8, 621, 1018, 83, 11, 3601, 1018, 83, 1699, 497, 272, 1858, 11, 2684, 11, 272, 56835, 340, 197, 197, 532, 197, 532, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestMedianFetcher_MajorityFetches(t *testing.T) { hf := newFixedPricedFetcher(decimal.NewFromInt(100)) // healthy fetcher) ef := newErroringPricedFetcher() // erroring fetcher tests := []struct { name string fetchers []Fetcher }{ {"2/3", []Fetcher{hf, hf, ef}}, {"3/3", []Fetcher{hf, hf, hf}}, {"3/4", []Fetcher{hf, hf, hf, ef}}, {"3/5", []Fetcher{hf, hf, hf, ef, ef}}, } for _, test := range tests { t.Run(test.name, func(t *testing.T) { medianFetcher, err := newMedianFetcher(test.fetchers...) require.NoError(t, err) medianPrice, err := medianFetcher.Fetch(context.Background(), emptyMeta) assert.NoError(t, err) assert.True(t, decimal.NewFromInt(100).Equal(medianPrice)) }) } }
explode_data.jsonl/26503
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 359 }
[ 2830, 3393, 79514, 97492, 1245, 3035, 487, 20714, 288, 1155, 353, 8840, 836, 8, 341, 9598, 69, 1669, 501, 13520, 47, 2216, 291, 97492, 71100, 7121, 3830, 1072, 7, 16, 15, 15, 593, 442, 9314, 7807, 261, 340, 197, 823, 1669, 501, 1454, 287, 47, 2216, 291, 97492, 368, 3824, 442, 1465, 287, 7807, 261, 271, 78216, 1669, 3056, 1235, 341, 197, 11609, 257, 914, 198, 197, 1166, 2995, 388, 3056, 97492, 198, 197, 59403, 197, 197, 4913, 17, 14, 18, 497, 3056, 97492, 90, 44754, 11, 43242, 11, 30369, 22050, 197, 197, 4913, 18, 14, 18, 497, 3056, 97492, 90, 44754, 11, 43242, 11, 43242, 22050, 197, 197, 4913, 18, 14, 19, 497, 3056, 97492, 90, 44754, 11, 43242, 11, 43242, 11, 30369, 22050, 197, 197, 4913, 18, 14, 20, 497, 3056, 97492, 90, 44754, 11, 43242, 11, 43242, 11, 30369, 11, 30369, 22050, 197, 630, 2023, 8358, 1273, 1669, 2088, 7032, 341, 197, 3244, 16708, 8623, 2644, 11, 2915, 1155, 353, 8840, 836, 8, 341, 298, 197, 55651, 97492, 11, 1848, 1669, 501, 79514, 97492, 8623, 16121, 388, 31218, 298, 17957, 35699, 1155, 11, 1848, 692, 298, 197, 55651, 6972, 11, 1848, 1669, 22553, 97492, 78506, 5378, 19047, 1507, 4287, 12175, 340, 298, 6948, 35699, 1155, 11, 1848, 340, 298, 6948, 32443, 1155, 11, 12122, 7121, 3830, 1072, 7, 16, 15, 15, 568, 2993, 1255, 28567, 6972, 1171, 197, 197, 3518, 197, 532, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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_generateEphemeralOKPKey_Failure(t *testing.T) { c := Crypto{ okpKW: &mockKeyWrapperSupport{ generateKeyErr: errors.New("generate failure"), }, } _, _, err := c.generateOrGetEphemeralOKPKey(nil) require.EqualError(t, err, "generate failure") c.okpKW = &mockKeyWrapperSupport{ generateKeyVal: &ecdsa.PrivateKey{}, } _, _, err = c.generateOrGetEphemeralOKPKey(nil) require.EqualError(t, err, "invalid ephemeral key type, not OKP, want []byte for OKP") }
explode_data.jsonl/81262
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 202 }
[ 2830, 3393, 48851, 36, 59941, 3253, 3925, 47, 1592, 1400, 9373, 1155, 353, 8840, 836, 8, 341, 1444, 1669, 32886, 515, 197, 59268, 79, 78610, 25, 609, 16712, 1592, 11542, 7916, 515, 298, 3174, 13220, 1592, 7747, 25, 5975, 7121, 445, 19366, 7901, 4461, 197, 197, 1583, 197, 630, 197, 6878, 8358, 1848, 1669, 272, 22019, 2195, 1949, 36, 59941, 3253, 3925, 47, 1592, 27907, 340, 17957, 12808, 1454, 1155, 11, 1848, 11, 330, 19366, 7901, 5130, 1444, 18165, 79, 78610, 284, 609, 16712, 1592, 11542, 7916, 515, 197, 3174, 13220, 1592, 2208, 25, 609, 757, 96780, 87738, 1592, 38837, 197, 630, 197, 6878, 8358, 1848, 284, 272, 22019, 2195, 1949, 36, 59941, 3253, 3925, 47, 1592, 27907, 340, 17957, 12808, 1454, 1155, 11, 1848, 11, 330, 11808, 82134, 3253, 1376, 943, 11, 537, 10402, 47, 11, 1366, 3056, 3782, 369, 10402, 47, 1138, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
1
func TestParse(t *testing.T) { defer ClearTask() tk := NewTask("taska", "0/30 * * * * *", func() error { fmt.Println("hello world"); return nil }) err := tk.Run() if err != nil { t.Fatal(err) } AddTask("taska", tk) StartTask() time.Sleep(6 * time.Second) StopTask() }
explode_data.jsonl/33787
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 118 }
[ 2830, 3393, 14463, 1155, 353, 8840, 836, 8, 341, 16867, 12023, 6262, 2822, 3244, 74, 1669, 1532, 6262, 445, 8202, 64, 497, 330, 15, 14, 18, 15, 353, 353, 353, 353, 353, 497, 2915, 368, 1465, 314, 8879, 12419, 445, 14990, 1879, 5038, 470, 2092, 2751, 9859, 1669, 17162, 16708, 741, 743, 1848, 961, 2092, 341, 197, 3244, 26133, 3964, 340, 197, 532, 37972, 6262, 445, 8202, 64, 497, 17162, 340, 65999, 6262, 741, 21957, 31586, 7, 21, 353, 882, 32435, 340, 197, 10674, 6262, 741, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestZKGroupWatchConsumerList(t *testing.T) { zk := newZKGroupStorage([]string{"127.0.0.1:2181"}, 6*time.Second) consumer1 := fmt.Sprintf("%s-%d", testConsumerID, rand.Int()) consumer2 := fmt.Sprintf("%s-%d", testConsumerID, rand.Int()) consumer3 := fmt.Sprintf("%s-%d", testConsumerID, rand.Int()) consumerList := []string{consumer1, consumer2, consumer3} for _, consumer := range consumerList { zk.registerConsumer(testGroup, consumer, nil) } watcher, err := zk.watchConsumerList(testGroup) if err != nil { t.Error(err) } select { case <-watcher.EvCh: t.Error("channel receive message before consumer list change") default: } zk.deleteConsumer(testGroup, consumer1) select { case <-watcher.EvCh: default: t.Error("channel can't receive message after consumer list change") } for _, consumer := range consumerList { zk.deleteConsumer(testGroup, consumer) } }
explode_data.jsonl/5652
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 320 }
[ 2830, 3393, 57, 42, 2808, 14247, 29968, 852, 1155, 353, 8840, 836, 8, 341, 20832, 74, 1669, 501, 57, 42, 2808, 5793, 10556, 917, 4913, 16, 17, 22, 13, 15, 13, 15, 13, 16, 25, 17, 16, 23, 16, 14345, 220, 21, 77053, 32435, 692, 37203, 11761, 16, 1669, 8879, 17305, 4430, 82, 11069, 67, 497, 1273, 29968, 915, 11, 10382, 7371, 2398, 37203, 11761, 17, 1669, 8879, 17305, 4430, 82, 11069, 67, 497, 1273, 29968, 915, 11, 10382, 7371, 2398, 37203, 11761, 18, 1669, 8879, 17305, 4430, 82, 11069, 67, 497, 1273, 29968, 915, 11, 10382, 7371, 2398, 37203, 11761, 852, 1669, 3056, 917, 90, 46764, 16, 11, 11502, 17, 11, 11502, 18, 532, 2023, 8358, 11502, 1669, 2088, 11502, 852, 341, 197, 20832, 74, 9929, 29968, 8623, 2808, 11, 11502, 11, 2092, 340, 197, 630, 6692, 28058, 11, 1848, 1669, 94528, 46457, 29968, 852, 8623, 2808, 340, 743, 1848, 961, 2092, 341, 197, 3244, 6141, 3964, 340, 197, 630, 38010, 341, 2722, 9119, 14321, 261, 5142, 85, 1143, 510, 197, 3244, 6141, 445, 10119, 5258, 1943, 1573, 11502, 1140, 2297, 1138, 11940, 510, 197, 630, 20832, 74, 7440, 29968, 8623, 2808, 11, 11502, 16, 692, 38010, 341, 2722, 9119, 14321, 261, 5142, 85, 1143, 510, 11940, 510, 197, 3244, 6141, 445, 10119, 646, 944, 5258, 1943, 1283, 11502, 1140, 2297, 1138, 197, 630, 2023, 8358, 11502, 1669, 2088, 11502, 852, 341, 197, 20832, 74, 7440, 29968, 8623, 2808, 11, 11502, 340, 197, 532, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestLog_ConvertLevel(t *testing.T) { type fields struct { logrus *logrus.Logger level structs.Level } type args struct { level structs.Level } tests := []struct { name string fields fields args args want interface{} wantErr bool }{ { "standard", fields{ logrus: logrus.New(), level: structs.LevelTrace, }, args{level: structs.LevelTrace}, logrus.TraceLevel, false, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { l := &Log{ logrus: tt.fields.logrus, level: tt.fields.level, } got, err := l.ConvertLevel(tt.args.level) if (err != nil) != tt.wantErr { t.Errorf("ConvertLevel() error = %v, wantErr %v", err, tt.wantErr) return } if !reflect.DeepEqual(got, tt.want) { t.Errorf("ConvertLevel() got = %v, want %v", got, tt.want) } }) } }
explode_data.jsonl/34826
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 422 }
[ 2830, 3393, 2201, 15100, 1621, 4449, 1155, 353, 8840, 836, 8, 341, 13158, 5043, 2036, 341, 197, 90822, 353, 839, 20341, 12750, 198, 197, 53743, 220, 62845, 25259, 198, 197, 532, 13158, 2827, 2036, 341, 197, 53743, 62845, 25259, 198, 197, 532, 78216, 1669, 3056, 1235, 341, 197, 11609, 262, 914, 198, 197, 55276, 220, 5043, 198, 197, 31215, 262, 2827, 198, 197, 50780, 262, 3749, 16094, 197, 50780, 7747, 1807, 198, 197, 59403, 197, 197, 515, 298, 197, 1, 20270, 756, 298, 55276, 515, 571, 90822, 25, 1487, 20341, 7121, 3148, 571, 53743, 25, 220, 62845, 25259, 6550, 345, 298, 197, 1583, 298, 31215, 90, 3294, 25, 62845, 25259, 6550, 1583, 298, 90822, 46920, 4449, 345, 298, 36012, 345, 197, 197, 1583, 197, 532, 2023, 8358, 17853, 1669, 2088, 7032, 341, 197, 3244, 16708, 47152, 2644, 11, 2915, 1155, 353, 8840, 836, 8, 341, 298, 8810, 1669, 609, 2201, 515, 571, 90822, 25, 17853, 12920, 1665, 20341, 345, 571, 53743, 25, 220, 17853, 12920, 20099, 345, 298, 197, 532, 298, 3174, 354, 11, 1848, 1669, 326, 36179, 4449, 47152, 16365, 20099, 340, 298, 743, 320, 615, 961, 2092, 8, 961, 17853, 70212, 7747, 341, 571, 3244, 13080, 445, 12012, 4449, 368, 1465, 284, 1018, 85, 11, 1366, 7747, 1018, 85, 497, 1848, 11, 17853, 70212, 7747, 340, 571, 853, 198, 298, 197, 532, 298, 743, 753, 34913, 94750, 3268, 354, 11, 17853, 70212, 8, 341, 571, 3244, 13080, 445, 12012, 4449, 368, 2684, 284, 1018, 85, 11, 1366, 1018, 85, 497, 2684, 11, 17853, 70212, 340, 298, 197, 532, 197, 197, 3518, 197, 532, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestValidatePullPolicy(t *testing.T) { type T struct { Container core.Container ExpectedPolicy core.PullPolicy } testCases := map[string]T{ "NotPresent1": { core.Container{Name: "abc", Image: "image:latest", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}, core.PullIfNotPresent, }, "NotPresent2": { core.Container{Name: "abc1", Image: "image", ImagePullPolicy: "IfNotPresent", TerminationMessagePolicy: "File"}, core.PullIfNotPresent, }, "Always1": { core.Container{Name: "123", Image: "image:latest", ImagePullPolicy: "Always"}, core.PullAlways, }, "Always2": { core.Container{Name: "1234", Image: "image", ImagePullPolicy: "Always"}, core.PullAlways, }, "Never1": { core.Container{Name: "abc-123", Image: "image:latest", ImagePullPolicy: "Never"}, core.PullNever, }, "Never2": { core.Container{Name: "abc-1234", Image: "image", ImagePullPolicy: "Never"}, core.PullNever, }, } for k, v := range testCases { ctr := &v.Container errs := validatePullPolicy(ctr.ImagePullPolicy, field.NewPath("field")) if len(errs) != 0 { t.Errorf("case[%s] expected success, got %#v", k, errs) } if ctr.ImagePullPolicy != v.ExpectedPolicy { t.Errorf("case[%s] expected policy %v, got %v", k, v.ExpectedPolicy, ctr.ImagePullPolicy) } } }
explode_data.jsonl/1021
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 526 }
[ 2830, 3393, 17926, 36068, 13825, 1155, 353, 8840, 836, 8, 341, 13158, 350, 2036, 341, 197, 197, 4502, 414, 6200, 33672, 198, 197, 197, 18896, 13825, 6200, 97357, 13825, 198, 197, 532, 18185, 37302, 1669, 2415, 14032, 60, 51, 515, 197, 197, 81155, 21195, 16, 788, 341, 298, 71882, 33672, 63121, 25, 330, 13683, 497, 4654, 25, 330, 1805, 25, 19350, 497, 4654, 36068, 13825, 25, 330, 2679, 2623, 21195, 497, 10127, 32096, 2052, 13825, 25, 330, 1703, 7115, 298, 71882, 97357, 2679, 2623, 21195, 345, 197, 197, 1583, 197, 197, 81155, 21195, 17, 788, 341, 298, 71882, 33672, 63121, 25, 330, 13683, 16, 497, 4654, 25, 330, 1805, 497, 4654, 36068, 13825, 25, 330, 2679, 2623, 21195, 497, 10127, 32096, 2052, 13825, 25, 330, 1703, 7115, 298, 71882, 97357, 2679, 2623, 21195, 345, 197, 197, 1583, 197, 197, 1, 37095, 16, 788, 341, 298, 71882, 33672, 63121, 25, 330, 16, 17, 18, 497, 4654, 25, 330, 1805, 25, 19350, 497, 4654, 36068, 13825, 25, 330, 37095, 7115, 298, 71882, 97357, 37095, 345, 197, 197, 1583, 197, 197, 1, 37095, 17, 788, 341, 298, 71882, 33672, 63121, 25, 330, 16, 17, 18, 19, 497, 4654, 25, 330, 1805, 497, 4654, 36068, 13825, 25, 330, 37095, 7115, 298, 71882, 97357, 37095, 345, 197, 197, 1583, 197, 197, 1, 26155, 16, 788, 341, 298, 71882, 33672, 63121, 25, 330, 13683, 12, 16, 17, 18, 497, 4654, 25, 330, 1805, 25, 19350, 497, 4654, 36068, 13825, 25, 330, 26155, 7115, 298, 71882, 97357, 26155, 345, 197, 197, 1583, 197, 197, 1, 26155, 17, 788, 341, 298, 71882, 33672, 63121, 25, 330, 13683, 12, 16, 17, 18, 19, 497, 4654, 25, 330, 1805, 497, 4654, 36068, 13825, 25, 330, 26155, 7115, 298, 71882, 97357, 26155, 345, 197, 197, 1583, 197, 532, 2023, 595, 11, 348, 1669, 2088, 1273, 37302, 341, 197, 197, 10597, 1669, 609, 85, 33672, 198, 197, 9859, 82, 1669, 9593, 36068, 13825, 7, 10597, 7528, 36068, 13825, 11, 2070, 7121, 1820, 445, 2566, 5455, 197, 743, 2422, 3964, 82, 8, 961, 220, 15, 341, 298, 3244, 13080, 445, 5638, 25113, 82, 60, 3601, 2393, 11, 2684, 52406, 85, 497, 595, 11, 70817, 340, 197, 197, 532, 197, 743, 50638, 7528, 36068, 13825, 961, 348, 5121, 4046, 13825, 341, 298, 3244, 13080, 445, 5638, 25113, 82, 60, 3601, 4842, 1018, 85, 11, 2684, 1018, 85, 497, 595, 11, 348, 5121, 4046, 13825, 11, 50638, 7528, 36068, 13825, 340, 197, 197, 532, 197, 532, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestAdvanceNonExistentWorkspace(t *testing.T) { runTest(t, func(test *testHelper) { client := test.newClient() _, _, err := client.AdvanceWorkspace(test.ctx, "test", "test", "test", quantumfs.WorkspaceNonce{}, quantumfs.EmptyWorkspaceKey, quantumfs.ZeroKey) wsdbErr, ok := err.(quantumfs.WorkspaceDbErr) test.Assert(ok, "Error isn't WorkspaceDbErr: %s", err.Error()) test.Assert(wsdbErr.Code == quantumfs.WSDB_WORKSPACE_NOT_FOUND, "Non-existent workspace was found: %s", err.Error()) }) }
explode_data.jsonl/9162
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 207 }
[ 2830, 3393, 95027, 8121, 840, 18128, 45981, 1155, 353, 8840, 836, 8, 341, 56742, 2271, 1155, 11, 2915, 8623, 353, 1944, 5511, 8, 341, 197, 25291, 1669, 1273, 4618, 2959, 2822, 197, 197, 6878, 8358, 1848, 1669, 2943, 17865, 85, 681, 45981, 8623, 30608, 11, 330, 1944, 497, 330, 1944, 756, 298, 197, 1, 1944, 497, 30128, 3848, 28748, 8746, 90528, 38837, 298, 197, 30448, 372, 3848, 11180, 45981, 1592, 11, 30128, 3848, 35489, 1592, 340, 197, 6692, 82, 1999, 7747, 11, 5394, 1669, 1848, 12832, 30448, 372, 3848, 28748, 8746, 7994, 7747, 340, 197, 18185, 11711, 60207, 11, 330, 1454, 4436, 944, 70934, 7994, 7747, 25, 1018, 82, 497, 1848, 6141, 12367, 197, 18185, 11711, 57786, 1999, 7747, 20274, 621, 30128, 3848, 1175, 50, 3506, 34044, 44641, 9169, 24687, 345, 298, 197, 1, 8121, 59828, 27514, 572, 1730, 25, 1018, 82, 497, 1848, 6141, 2398, 197, 3518, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestPopVariance(t *testing.T) { for i, test := range []struct { x []float64 weights []float64 ans float64 }{ { x: []float64{8, -3, 7, 8, -4}, weights: nil, ans: 30.16, }, { x: []float64{8, -3, 7, 8, -4}, weights: []float64{1, 1, 1, 1, 1}, ans: 30.16, }, { x: []float64{8, 3, 7, 8, 4}, weights: []float64{2, 1, 2, 1, 1}, ans: 3.6734693877551026, }, { x: []float64{1, 4, 9}, weights: []float64{1, 1.5, 1}, ans: 9.387755102040817, }, { x: []float64{1, 2, 3}, weights: []float64{1, 1.5, 1}, ans: 0.5714285714285714, }, { x: []float64{2}, weights: nil, ans: 0, }, { x: []float64{2}, weights: []float64{2}, ans: 0, }, } { variance := PopVariance(test.x, test.weights) if math.Abs(variance-test.ans) > 1e-14 { t.Errorf("PopVariance mismatch case %d. Expected %v, Found %v", i, test.ans, variance) } } if !panics(func() { PopVariance(make([]float64, 3), make([]float64, 2)) }) { t.Errorf("PopVariance did not panic with x, weights length mismatch") } }
explode_data.jsonl/1788
{ "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, 11598, 53, 36905, 1155, 353, 8840, 836, 8, 341, 2023, 600, 11, 1273, 1669, 2088, 3056, 1235, 341, 197, 10225, 981, 3056, 3649, 21, 19, 198, 197, 197, 13327, 3056, 3649, 21, 19, 198, 197, 43579, 257, 2224, 21, 19, 198, 197, 59403, 197, 197, 515, 298, 10225, 25, 981, 3056, 3649, 21, 19, 90, 23, 11, 481, 18, 11, 220, 22, 11, 220, 23, 11, 481, 19, 1583, 298, 197, 13327, 25, 2092, 345, 298, 43579, 25, 257, 220, 18, 15, 13, 16, 21, 345, 197, 197, 1583, 197, 197, 515, 298, 10225, 25, 981, 3056, 3649, 21, 19, 90, 23, 11, 481, 18, 11, 220, 22, 11, 220, 23, 11, 481, 19, 1583, 298, 197, 13327, 25, 3056, 3649, 21, 19, 90, 16, 11, 220, 16, 11, 220, 16, 11, 220, 16, 11, 220, 16, 1583, 298, 43579, 25, 257, 220, 18, 15, 13, 16, 21, 345, 197, 197, 1583, 197, 197, 515, 298, 10225, 25, 981, 3056, 3649, 21, 19, 90, 23, 11, 220, 18, 11, 220, 22, 11, 220, 23, 11, 220, 19, 1583, 298, 197, 13327, 25, 3056, 3649, 21, 19, 90, 17, 11, 220, 16, 11, 220, 17, 11, 220, 16, 11, 220, 16, 1583, 298, 43579, 25, 257, 220, 18, 13, 21, 22, 18, 19, 21, 24, 18, 23, 22, 22, 20, 20, 16, 15, 17, 21, 345, 197, 197, 1583, 197, 197, 515, 298, 10225, 25, 981, 3056, 3649, 21, 19, 90, 16, 11, 220, 19, 11, 220, 24, 1583, 298, 197, 13327, 25, 3056, 3649, 21, 19, 90, 16, 11, 220, 16, 13, 20, 11, 220, 16, 1583, 298, 43579, 25, 257, 220, 24, 13, 18, 23, 22, 22, 20, 20, 16, 15, 17, 15, 19, 15, 23, 16, 22, 345, 197, 197, 1583, 197, 197, 515, 298, 10225, 25, 981, 3056, 3649, 21, 19, 90, 16, 11, 220, 17, 11, 220, 18, 1583, 298, 197, 13327, 25, 3056, 3649, 21, 19, 90, 16, 11, 220, 16, 13, 20, 11, 220, 16, 1583, 298, 43579, 25, 257, 220, 15, 13, 20, 22, 16, 19, 17, 23, 20, 22, 16, 19, 17, 23, 20, 22, 16, 19, 345, 197, 197, 1583, 197, 197, 515, 298, 10225, 25, 981, 3056, 3649, 21, 19, 90, 17, 1583, 298, 197, 13327, 25, 2092, 345, 298, 43579, 25, 257, 220, 15, 345, 197, 197, 1583, 197, 197, 515, 298, 10225, 25, 981, 3056, 3649, 21, 19, 90, 17, 1583, 298, 197, 13327, 25, 3056, 3649, 21, 19, 90, 17, 1583, 298, 43579, 25, 257, 220, 15, 345, 197, 197, 1583, 197, 92, 341, 197, 2405, 5284, 1669, 10254, 53, 36905, 8623, 1993, 11, 1273, 57618, 340, 197, 743, 6888, 33255, 7537, 5284, 16839, 13, 596, 8, 861, 220, 16, 68, 12, 16, 19, 341, 298, 3244, 13080, 445, 11598, 53, 36905, 35301, 1142, 1018, 67, 13, 31021, 1018, 85, 11, 12315, 1018, 85, 497, 600, 11, 1273, 13, 596, 11, 32273, 340, 197, 197, 532, 197, 532, 743, 753, 848, 1211, 18552, 368, 314, 10254, 53, 36905, 36944, 10556, 3649, 21, 19, 11, 220, 18, 701, 1281, 10556, 3649, 21, 19, 11, 220, 17, 593, 6413, 341, 197, 3244, 13080, 445, 11598, 53, 36905, 1521, 537, 21975, 448, 856, 11, 14324, 3084, 35301, 1138, 197, 532, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1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C) { err := d.SetCheckerTsRds(context.Background(), oid, tp) ctx.Convey("Then err should be nil.", func(ctx convey.C) { ctx.So(err, convey.ShouldBeNil) }) }) }) }
explode_data.jsonl/21803
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 175 }
[ 2830, 3393, 12197, 1649, 35188, 52793, 49, 5356, 1155, 353, 8840, 836, 8, 341, 37203, 5617, 4801, 5617, 445, 1649, 35188, 52793, 49, 5356, 497, 259, 11, 2915, 7502, 20001, 727, 8, 341, 197, 2405, 2399, 298, 197, 588, 284, 526, 21, 19, 7, 15, 340, 298, 73423, 220, 284, 526, 7, 15, 340, 197, 197, 340, 197, 20985, 4801, 5617, 445, 4498, 4297, 5780, 6785, 497, 2915, 7502, 20001, 727, 8, 341, 298, 9859, 1669, 294, 4202, 35188, 52793, 49, 5356, 5378, 19047, 1507, 48766, 11, 18101, 340, 298, 20985, 4801, 5617, 445, 12209, 1848, 1265, 387, 2092, 10465, 2915, 7502, 20001, 727, 8, 341, 571, 20985, 46387, 3964, 11, 20001, 86981, 19064, 340, 298, 197, 3518, 197, 197, 3518, 197, 3518, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestOutputLoadTemplate(t *testing.T) { client := GetTestingElasticsearch() err := client.Connect(5 * time.Second) if err != nil { t.Fatal(err) } // delete template if it exists client.request("DELETE", "/_template/libbeat", "", nil, nil) // Make sure template is not yet there assert.False(t, client.CheckTemplate("libbeat")) tPath, err := filepath.Abs("../../../packetbeat/packetbeat.template.json") if err != nil { t.Fatal(err) } config := map[string]interface{}{ "hosts": GetEsHost(), "template": map[string]interface{}{ "name": "libbeat", "path": tPath, "versions.2x.enabled": false, }, } cfg, err := common.NewConfigFrom(config) if err != nil { t.Fatal(err) } output, err := New("libbeat", cfg, 0) if err != nil { t.Fatal(err) } event := outputs.Data{Event: common.MapStr{ "@timestamp": common.Time(time.Now()), "host": "test-host", "type": "libbeat", "message": "Test message from libbeat", }} err = output.PublishEvent(nil, outputs.Options{Guaranteed: true}, event) if err != nil { t.Fatal(err) } // Guaranteed publish, so the template should be there assert.True(t, client.CheckTemplate("libbeat")) }
explode_data.jsonl/40102
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 498 }
[ 2830, 3393, 5097, 5879, 7275, 1155, 353, 8840, 836, 8, 1476, 25291, 1669, 2126, 16451, 36, 51179, 1836, 741, 9859, 1669, 2943, 43851, 7, 20, 353, 882, 32435, 340, 743, 1848, 961, 2092, 341, 197, 3244, 26133, 3964, 340, 197, 630, 197, 322, 3698, 3811, 421, 432, 6724, 198, 25291, 8223, 445, 14424, 497, 3521, 62, 4214, 8194, 22227, 497, 7342, 2092, 11, 2092, 692, 197, 322, 7405, 2704, 3811, 374, 537, 3602, 1052, 198, 6948, 50757, 1155, 11, 2943, 10600, 7275, 445, 2740, 22227, 28075, 3244, 1820, 11, 1848, 1669, 26054, 33255, 445, 26744, 24829, 22227, 4322, 5709, 22227, 20982, 4323, 1138, 743, 1848, 961, 2092, 341, 197, 3244, 26133, 3964, 340, 197, 532, 25873, 1669, 2415, 14032, 31344, 67066, 197, 197, 1, 44692, 788, 2126, 17360, 9296, 3148, 197, 197, 1, 4214, 788, 2415, 14032, 31344, 67066, 298, 197, 31486, 788, 394, 330, 2740, 22227, 756, 298, 197, 70688, 788, 394, 259, 1820, 345, 298, 197, 1, 28290, 13, 17, 87, 22141, 788, 895, 345, 197, 197, 1583, 197, 630, 50286, 11, 1848, 1669, 4185, 7121, 2648, 3830, 8754, 340, 743, 1848, 961, 2092, 341, 197, 3244, 26133, 3964, 340, 197, 630, 21170, 11, 1848, 1669, 1532, 445, 2740, 22227, 497, 13286, 11, 220, 15, 340, 743, 1848, 961, 2092, 341, 197, 3244, 26133, 3964, 340, 197, 532, 28302, 1669, 16275, 3336, 90, 1556, 25, 4185, 10104, 2580, 515, 197, 197, 96270, 13035, 788, 4185, 16299, 9730, 13244, 14702, 197, 197, 1, 3790, 788, 981, 330, 1944, 38589, 756, 197, 197, 44470, 788, 981, 330, 2740, 22227, 756, 197, 197, 1, 1994, 788, 262, 330, 2271, 1943, 504, 3051, 22227, 756, 197, 47449, 9859, 284, 2550, 83935, 1556, 27907, 11, 16275, 22179, 90, 16780, 277, 58250, 25, 830, 2137, 1538, 340, 743, 1848, 961, 2092, 341, 197, 3244, 26133, 3964, 340, 197, 630, 197, 322, 80437, 3415, 11, 773, 279, 3811, 1265, 387, 1052, 271, 6948, 32443, 1155, 11, 2943, 10600, 7275, 445, 2740, 22227, 28075, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestDefaultMissingKeys(t *testing.T) { defer featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, genericfeatures.ServerSideApply, true)() _, client, closeFn := setup(t) defer closeFn() // Applier creates a deployment with containerPort but no protocol apply := []byte(`{ "apiVersion": "apps/v1", "kind": "Deployment", "metadata": { "name": "deployment-shared-map-item-removal", "labels": {"app": "nginx"} }, "spec": { "selector": { "matchLabels": { "app": "nginx" } }, "template": { "metadata": { "labels": { "app": "nginx" } }, "spec": { "containers": [{ "name": "nginx", "image": "nginx:latest", "ports": [{ "name": "foo", "containerPort": 80 }] }] } } } }`) _, err := client.CoreV1().RESTClient().Patch(types.ApplyPatchType). AbsPath("/apis/apps/v1"). Namespace("default"). Resource("deployments"). Name("deployment-shared-map-item-removal"). Param("fieldManager", "test_applier"). Body(apply). Do(context.TODO()). Get() if err != nil { t.Fatalf("Failed to create object using Apply patch: %v", err) } // Applier updates the name, and uses the protocol, we should get a conflict. apply = []byte(`{ "apiVersion": "apps/v1", "kind": "Deployment", "metadata": { "name": "deployment-shared-map-item-removal", "labels": {"app": "nginx"} }, "spec": { "selector": { "matchLabels": { "app": "nginx" } }, "template": { "metadata": { "labels": { "app": "nginx" } }, "spec": { "containers": [{ "name": "nginx", "image": "nginx:latest", "ports": [{ "name": "bar", "containerPort": 80, "protocol": "TCP" }] }] } } } }`) patched, err := client.CoreV1().RESTClient().Patch(types.ApplyPatchType). AbsPath("/apis/apps/v1"). Namespace("default"). Resource("deployments"). Name("deployment-shared-map-item-removal"). Param("fieldManager", "test_applier_conflict"). Body(apply). Do(context.TODO()). Get() if err == nil { t.Fatalf("Expecting to get conflicts when a different applier updates existing list item, got no error: %s", patched) } status, ok := err.(*apierrors.StatusError) if !ok { t.Fatalf("Expecting to get conflicts as API error") } if len(status.Status().Details.Causes) != 1 { t.Fatalf("Expecting to get one conflict when a different applier updates existing list item, got: %v", status.Status().Details.Causes) } }
explode_data.jsonl/53489
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 1150 }
[ 2830, 3393, 3675, 25080, 8850, 1155, 353, 8840, 836, 8, 341, 16867, 4565, 70, 266, 57824, 287, 4202, 13859, 42318, 16014, 2271, 1155, 11, 4094, 12753, 13275, 13859, 42318, 11, 13954, 20304, 22997, 16384, 28497, 11, 830, 8, 2822, 197, 6878, 2943, 11, 3265, 24911, 1669, 6505, 1155, 340, 16867, 3265, 24911, 2822, 197, 322, 5232, 7875, 11450, 264, 23172, 448, 5476, 7084, 714, 902, 11507, 198, 197, 10280, 1669, 3056, 3782, 5809, 515, 197, 197, 1, 2068, 5637, 788, 330, 27635, 5457, 16, 756, 197, 197, 1, 15314, 788, 330, 75286, 756, 197, 197, 1, 17637, 788, 341, 298, 197, 31486, 788, 330, 82213, 94908, 25858, 6404, 12, 1826, 13516, 756, 298, 197, 1, 16873, 788, 5212, 676, 788, 330, 73561, 16707, 197, 197, 1583, 197, 197, 1, 9535, 788, 341, 298, 197, 1, 8925, 788, 341, 571, 197, 1, 6347, 23674, 788, 341, 464, 197, 1, 676, 788, 330, 73561, 698, 571, 197, 532, 298, 197, 1583, 298, 197, 1, 4214, 788, 341, 571, 197, 1, 17637, 788, 341, 464, 197, 1, 16873, 788, 341, 1144, 197, 1, 676, 788, 330, 73561, 698, 464, 197, 532, 571, 197, 1583, 571, 197, 1, 9535, 788, 341, 464, 197, 1, 39399, 788, 18396, 1144, 197, 31486, 788, 220, 330, 73561, 756, 1144, 197, 1, 1805, 788, 330, 73561, 25, 19350, 756, 1144, 197, 1, 3394, 788, 18396, 1662, 197, 31486, 788, 330, 7975, 756, 1662, 197, 1, 3586, 7084, 788, 220, 23, 15, 198, 1144, 197, 57320, 464, 197, 57320, 571, 197, 532, 298, 197, 532, 197, 197, 532, 197, 5541, 692, 197, 6878, 1848, 1669, 2943, 12777, 53, 16, 1005, 38307, 2959, 1005, 43622, 52613, 36051, 43622, 929, 4292, 197, 22985, 1279, 1820, 4283, 13725, 50887, 5457, 16, 38609, 197, 90823, 445, 2258, 38609, 197, 79487, 445, 35794, 1368, 38609, 197, 21297, 445, 82213, 94908, 25858, 6404, 12, 1826, 13516, 38609, 197, 197, 2001, 445, 2566, 2043, 497, 330, 1944, 21093, 7875, 38609, 197, 197, 5444, 7, 10280, 4292, 197, 197, 5404, 5378, 90988, 368, 4292, 197, 37654, 741, 743, 1848, 961, 2092, 341, 197, 3244, 30762, 445, 9408, 311, 1855, 1633, 1667, 20552, 10900, 25, 1018, 85, 497, 1848, 340, 197, 630, 197, 322, 5232, 7875, 8837, 279, 829, 11, 323, 5711, 279, 11507, 11, 582, 1265, 633, 264, 12055, 624, 197, 10280, 284, 3056, 3782, 5809, 515, 197, 197, 1, 2068, 5637, 788, 330, 27635, 5457, 16, 756, 197, 197, 1, 15314, 788, 330, 75286, 756, 197, 197, 1, 17637, 788, 341, 298, 197, 31486, 788, 330, 82213, 94908, 25858, 6404, 12, 1826, 13516, 756, 298, 197, 1, 16873, 788, 5212, 676, 788, 330, 73561, 16707, 197, 197, 1583, 197, 197, 1, 9535, 788, 341, 298, 197, 1, 8925, 788, 341, 571, 197, 1, 6347, 23674, 788, 341, 464, 197, 1, 676, 788, 330, 73561, 698, 571, 197, 532, 298, 197, 1583, 298, 197, 1, 4214, 788, 341, 571, 197, 1, 17637, 788, 341, 464, 197, 1, 16873, 788, 341, 1144, 197, 1, 676, 788, 330, 73561, 698, 464, 197, 532, 571, 197, 1583, 571, 197, 1, 9535, 788, 341, 464, 197, 1, 39399, 788, 18396, 1144, 197, 31486, 788, 220, 330, 73561, 756, 1144, 197, 1, 1805, 788, 330, 73561, 25, 19350, 756, 1144, 197, 1, 3394, 788, 18396, 1662, 197, 31486, 788, 330, 2257, 756, 1662, 197, 1, 3586, 7084, 788, 220, 23, 15, 345, 1662, 197, 1, 17014, 788, 330, 49896, 698, 1144, 197, 57320, 464, 197, 57320, 571, 197, 532, 298, 197, 532, 197, 197, 532, 197, 27085, 3223, 34244, 11, 1848, 1669, 2943, 12777, 53, 16, 1005, 38307, 2959, 1005, 43622, 52613, 36051, 43622, 929, 4292, 197, 22985, 1279, 1820, 4283, 13725, 50887, 5457, 16, 38609, 197, 90823, 445, 2258, 38609, 197, 79487, 445, 35794, 1368, 38609, 197, 21297, 445, 82213, 94908, 25858, 6404, 12, 1826, 13516, 38609, 197, 197, 2001, 445, 2566, 2043, 497, 330, 1944, 21093, 7875, 16059, 21242, 38609, 197, 197, 5444, 7, 10280, 4292, 197, 197, 5404, 5378, 90988, 368, 4292, 197, 37654, 741, 743, 1848, 621, 2092, 341, 197, 3244, 30762, 445, 17536, 287, 311, 633, 25800, 979, 264, 2155, 1443, 7875, 8837, 6350, 1140, 1509, 11, 2684, 902, 1465, 25, 1018, 82, 497, 71732, 340, 197, 532, 23847, 11, 5394, 1669, 1848, 41399, 2068, 7650, 10538, 1454, 340, 743, 753, 562, 341, 197, 3244, 30762, 445, 17536, 287, 311, 633, 25800, 438, 5333, 1465, 1138, 197, 532, 743, 2422, 13838, 10538, 1005, 7799, 727, 35143, 8, 961, 220, 16, 341, 197, 3244, 30762, 445, 17536, 287, 311, 633, 825, 12055, 979, 264, 2155, 1443, 7875, 8837, 6350, 1140, 1509, 11, 2684, 25, 1018, 85, 497, 2639, 10538, 1005, 7799, 727, 35143, 340, 197, 532, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestSetGetGlobalPCMode(t *testing.T) { tp := fmt.Sprintf("%s:%d", "t.go", 42) SetTracePoint(tp) defer ResetTracePoint(tp) enabled := GetTracePoint(tp) if !enabled { t.Errorf("Expected tracepoint %s to be enabled", tp) } }
explode_data.jsonl/48442
{ "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, 1649, 1949, 11646, 4872, 3636, 1155, 353, 8840, 836, 8, 341, 73423, 1669, 8879, 17305, 4430, 82, 7533, 67, 497, 330, 83, 18002, 497, 220, 19, 17, 340, 22212, 6550, 2609, 38852, 340, 16867, 16932, 6550, 2609, 38852, 340, 197, 15868, 1669, 2126, 6550, 2609, 38852, 340, 743, 753, 15868, 341, 197, 3244, 13080, 445, 18896, 11655, 2768, 1018, 82, 311, 387, 8970, 497, 18101, 340, 197, 532, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestShardSet(t *testing.T) { elements := []struct { s *shard ws *workers bg *boolgen notExpired int64 expired int64 }{ { s: &shard{elements: make(map[string]element), q: &queue{}}, ws: &workers{wn: 1, number: 256}, bg: newBoolgen(), }, { s: &shard{elements: make(map[string]element), q: &queue{}}, ws: &workers{wn: 4, number: 1024}, bg: newBoolgen(), }, { s: &shard{elements: make(map[string]element), q: &queue{}}, ws: &workers{wn: 32, number: 2048}, bg: newBoolgen(), }, { s: &shard{elements: make(map[string]element), q: &queue{}}, ws: &workers{wn: 128, number: 8192}, bg: newBoolgen(), }, } for _, e := range elements { e.ws.cb = func(w *worker, i int) error { if e.bg.Bool() { e.s.set(fmt.Sprintf("%d-%d", w.id, i), i, 0) atomic.AddInt64(&e.notExpired, 1) } else { e.s.set(fmt.Sprintf("%d-%d", w.id, i), i, 30*time.Second) atomic.AddInt64(&e.expired, 1) } return nil } e.ws.initialize() e.ws.run() actualNotExpired, actualExpired := e.s.size()-e.s.q.size(), e.s.q.size() t.Logf("not-expired/actual-not-expired (%d/%d) expired/actual-expired (%d/%d)", e.notExpired, actualNotExpired, e.expired, actualExpired) assert.Equal(t, actualNotExpired, int(e.notExpired)) assert.Equal(t, actualExpired, int(e.expired)) } }
explode_data.jsonl/5395
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 687 }
[ 2830, 3393, 2016, 567, 1649, 1155, 353, 8840, 836, 8, 341, 197, 21423, 1669, 3056, 1235, 341, 197, 1903, 688, 353, 927, 567, 198, 197, 6692, 82, 260, 353, 54958, 198, 197, 76131, 260, 353, 2641, 4370, 198, 197, 97266, 54349, 526, 21, 19, 198, 197, 48558, 2690, 262, 526, 21, 19, 198, 197, 59403, 197, 197, 515, 298, 1903, 25, 220, 609, 927, 567, 90, 21423, 25, 1281, 9147, 14032, 60, 6101, 701, 2804, 25, 609, 4584, 6257, 1583, 298, 6692, 82, 25, 609, 54958, 90, 1522, 25, 220, 16, 11, 1372, 25, 220, 17, 20, 21, 1583, 298, 76131, 25, 501, 11233, 4370, 3148, 197, 197, 1583, 197, 197, 515, 298, 1903, 25, 220, 609, 927, 567, 90, 21423, 25, 1281, 9147, 14032, 60, 6101, 701, 2804, 25, 609, 4584, 6257, 1583, 298, 6692, 82, 25, 609, 54958, 90, 1522, 25, 220, 19, 11, 1372, 25, 220, 16, 15, 17, 19, 1583, 298, 76131, 25, 501, 11233, 4370, 3148, 197, 197, 1583, 197, 197, 515, 298, 1903, 25, 220, 609, 927, 567, 90, 21423, 25, 1281, 9147, 14032, 60, 6101, 701, 2804, 25, 609, 4584, 6257, 1583, 298, 6692, 82, 25, 609, 54958, 90, 1522, 25, 220, 18, 17, 11, 1372, 25, 220, 17, 15, 19, 23, 1583, 298, 76131, 25, 501, 11233, 4370, 3148, 197, 197, 1583, 197, 197, 515, 298, 1903, 25, 220, 609, 927, 567, 90, 21423, 25, 1281, 9147, 14032, 60, 6101, 701, 2804, 25, 609, 4584, 6257, 1583, 298, 6692, 82, 25, 609, 54958, 90, 1522, 25, 220, 16, 17, 23, 11, 1372, 25, 220, 23, 16, 24, 17, 1583, 298, 76131, 25, 501, 11233, 4370, 3148, 197, 197, 1583, 197, 630, 2023, 8358, 384, 1669, 2088, 5424, 341, 197, 7727, 22195, 34757, 284, 2915, 3622, 353, 21462, 11, 600, 526, 8, 1465, 341, 298, 743, 384, 37281, 52497, 368, 341, 571, 7727, 514, 980, 28197, 17305, 4430, 67, 11069, 67, 497, 289, 1764, 11, 600, 701, 600, 11, 220, 15, 340, 571, 78739, 1904, 1072, 21, 19, 2099, 68, 11971, 54349, 11, 220, 16, 340, 298, 197, 92, 770, 341, 571, 7727, 514, 980, 28197, 17305, 4430, 67, 11069, 67, 497, 289, 1764, 11, 600, 701, 600, 11, 220, 18, 15, 77053, 32435, 340, 571, 78739, 1904, 1072, 21, 19, 2099, 68, 2223, 11724, 11, 220, 16, 340, 298, 197, 532, 298, 853, 2092, 198, 197, 197, 630, 197, 7727, 22195, 25970, 741, 197, 7727, 22195, 7634, 2822, 197, 88814, 2623, 54349, 11, 5042, 54349, 1669, 384, 514, 2486, 15694, 68, 514, 11354, 2486, 1507, 384, 514, 11354, 2486, 741, 197, 3244, 98954, 445, 1921, 18376, 2690, 14, 11944, 29169, 18376, 2690, 13456, 67, 12627, 67, 8, 26391, 14, 11944, 18376, 2690, 13456, 67, 12627, 67, 15752, 298, 7727, 11971, 54349, 11, 5042, 2623, 54349, 11, 384, 2223, 11724, 11, 5042, 54349, 692, 197, 6948, 12808, 1155, 11, 5042, 2623, 54349, 11, 526, 2026, 11971, 54349, 1171, 197, 6948, 12808, 1155, 11, 5042, 54349, 11, 526, 2026, 2223, 11724, 1171, 197, 532, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1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 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestRTR_SuccessfulDeregistration(t *testing.T) { hss := getTestHSSDiameterServer(t) swxProxy := getTestSwxProxy(t, hss, false, false, true) sar := &fegprotos.RegistrationRequest{ UserName: "sub1", } _, err := swxProxy.Register(context.Background(), sar) assert.NoError(t, err) sub := &lteprotos.SubscriberID{Id: "sub1"} _, err = hss.DeregisterSubscriber(context.Background(), sub) assert.NoError(t, err) subData, err := hss.GetSubscriberData(context.Background(), sub) assert.NoError(t, err) assert.False(t, subData.GetState().GetTgppAaaServerRegistered()) }
explode_data.jsonl/73022
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 226 }
[ 2830, 3393, 49, 2378, 87161, 1262, 35, 52633, 4048, 1155, 353, 8840, 836, 8, 341, 9598, 778, 1669, 633, 2271, 39, 1220, 35, 36044, 5475, 1155, 340, 1903, 20984, 16219, 1669, 633, 2271, 13218, 87, 16219, 1155, 11, 305, 778, 11, 895, 11, 895, 11, 830, 340, 1903, 277, 1669, 609, 69, 791, 4391, 436, 8989, 4048, 1900, 515, 197, 197, 18856, 25, 330, 1966, 16, 756, 197, 532, 197, 6878, 1848, 1669, 2021, 87, 16219, 19983, 5378, 19047, 1507, 28047, 340, 6948, 35699, 1155, 11, 1848, 692, 28624, 1669, 609, 48791, 4391, 436, 12391, 20351, 915, 90, 764, 25, 330, 1966, 16, 16707, 197, 6878, 1848, 284, 305, 778, 909, 52633, 1571, 40236, 5378, 19047, 1507, 1186, 340, 6948, 35699, 1155, 11, 1848, 692, 28624, 1043, 11, 1848, 1669, 305, 778, 2234, 40236, 1043, 5378, 19047, 1507, 1186, 340, 6948, 35699, 1155, 11, 1848, 340, 6948, 50757, 1155, 11, 1186, 1043, 2234, 1397, 1005, 1949, 51, 70, 602, 32, 5305, 5475, 41430, 2398, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestGiniTrivUnsat(t *testing.T) { g := NewGini() g.Add(z.Lit(3)) g.Add(0) g.Add(z.Lit(3).Not()) g.Add(0) if g.Solve() != -1 { t.Errorf("basic add unsat failed.") } }
explode_data.jsonl/74364
{ "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, 38, 6591, 1282, 344, 1806, 36468, 1155, 353, 8840, 836, 8, 341, 3174, 1669, 1532, 38, 6591, 741, 3174, 1904, 13174, 1214, 275, 7, 18, 1171, 3174, 1904, 7, 15, 340, 3174, 1904, 13174, 1214, 275, 7, 18, 568, 2623, 2398, 3174, 1904, 7, 15, 340, 743, 342, 808, 3948, 368, 961, 481, 16, 341, 197, 3244, 13080, 445, 22342, 912, 6975, 266, 4641, 13053, 197, 532, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestLRUCache(t *testing.T) { for x, tc := range cases { cache := Constructor(tc.capacity) output := make([]int, len(tc.input)) for j, op := range tc.ops { input := tc.input[j] switch op { case "get": output[j] = cache.Get(input[0]) case "put": cache.Put(input[0], input[1]) } } if !reflect.DeepEqual(tc.output, output) { t.Errorf("x: %d\nExpect: %v\nActual: %v\n", x, tc.output, output) } } }
explode_data.jsonl/45956
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 208 }
[ 2830, 3393, 20117, 5459, 1777, 1155, 353, 8840, 836, 8, 341, 2023, 856, 11, 17130, 1669, 2088, 5048, 341, 197, 52680, 1669, 16786, 44415, 59168, 340, 197, 21170, 1669, 1281, 10556, 396, 11, 2422, 44415, 10046, 4390, 197, 2023, 502, 11, 1179, 1669, 2088, 17130, 46778, 341, 298, 22427, 1669, 17130, 10046, 3809, 921, 298, 8961, 1179, 341, 298, 2722, 330, 455, 4660, 571, 21170, 3809, 60, 284, 6500, 2234, 5384, 58, 15, 2546, 298, 2722, 330, 628, 4660, 571, 52680, 39825, 5384, 58, 15, 1125, 1946, 58, 16, 2546, 298, 197, 630, 197, 197, 630, 197, 743, 753, 34913, 94750, 44415, 13413, 11, 2550, 8, 341, 298, 3244, 13080, 445, 87, 25, 1018, 67, 1699, 17536, 25, 1018, 85, 1699, 28123, 25, 1018, 85, 1699, 497, 856, 11, 17130, 13413, 11, 2550, 340, 197, 197, 532, 197, 532, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestStorage_Read(t *testing.T) { s := NewStorage("/tmp/chunk/1.chunk", "/tmp/index") err := s.Open() defer s.Close() if err != nil { t.Fatal(err) } i := s.index.slots[1] t.Log(i.fId) err, name, bts := s.Read(i.fId) if err != nil { t.Fatal(err) } t.Log(name) t.Log(len(bts)) t.Log(string(bts)) }
explode_data.jsonl/77475
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 166 }
[ 2830, 3393, 5793, 38381, 1155, 353, 8840, 836, 8, 341, 1903, 1669, 1532, 5793, 4283, 5173, 21284, 3122, 14, 16, 47806, 497, 3521, 5173, 9022, 1138, 9859, 1669, 274, 12953, 741, 16867, 274, 10421, 741, 743, 1848, 961, 2092, 341, 197, 3244, 26133, 3964, 340, 197, 532, 8230, 1669, 274, 5154, 25101, 2412, 58, 16, 2533, 3244, 5247, 1956, 833, 764, 340, 9859, 11, 829, 11, 293, 2576, 1669, 274, 6503, 1956, 833, 764, 340, 743, 1848, 961, 2092, 341, 197, 3244, 26133, 3964, 340, 197, 532, 3244, 5247, 3153, 340, 3244, 5247, 6901, 1883, 2576, 1171, 3244, 5247, 3609, 1883, 2576, 1171, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestOptionForeach(t *testing.T) { sum := 123 s := gs.Some[int](100) f := func(v int) { sum += v } s.Foreach(f) assert.Equal(t, 123+100, sum) sum = 123 n := gs.None[int]() n.Foreach(f) assert.Equal(t, 123, sum) }
explode_data.jsonl/32434
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 115 }
[ 2830, 3393, 5341, 37, 8539, 1155, 353, 8840, 836, 8, 341, 31479, 1669, 220, 16, 17, 18, 198, 1903, 1669, 28081, 86833, 18640, 9533, 16, 15, 15, 340, 1166, 1669, 2915, 3747, 526, 8, 341, 197, 31479, 1421, 348, 198, 197, 532, 1903, 991, 8539, 955, 340, 6948, 12808, 1155, 11, 220, 16, 17, 18, 10, 16, 15, 15, 11, 2629, 692, 31479, 284, 220, 16, 17, 18, 198, 9038, 1669, 28081, 18475, 18640, 36622, 9038, 991, 8539, 955, 340, 6948, 12808, 1155, 11, 220, 16, 17, 18, 11, 2629, 340, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestReadContents(t *testing.T) { t.Run("error reading file", func(t *testing.T) { partition := Partition{ Start: 2048, End: 3048, Name: "EFI System", GUID: "5CA3360B-5DE6-4FCF-B4CE-419CEE433B51", Attributes: 0, Type: EFISystemPartition, } var b bytes.Buffer writer := bufio.NewWriter(&b) expected := "Error reading from file" f := &testhelper.FileImpl{ Reader: func(b []byte, offset int64) (int, error) { return 0, fmt.Errorf(expected) }, } read, err := partition.ReadContents(f, writer) if read != 0 { t.Errorf("Returned %d bytes read instead of 0", read) } if err == nil { t.Errorf("Returned nil error instead of actual errors") } if !strings.HasPrefix(err.Error(), expected) { t.Errorf("Error type %s instead of expected %s", err.Error(), expected) } }) t.Run("successful read", func(t *testing.T) { partition := Partition{ Start: 2048, End: 3048, Name: "EFI System", GUID: "5CA3360B-5DE6-4FCF-B4CE-419CEE433B51", Attributes: 0, Type: EFISystemPartition, } var b bytes.Buffer writer := bufio.NewWriter(&b) size := 100 b2 := make([]byte, size, size) rand.Read(b2) f := &testhelper.FileImpl{ Reader: func(b []byte, offset int64) (int, error) { copy(b, b2) return size, io.EOF }, } read, err := partition.ReadContents(f, writer) if read != int64(size) { t.Errorf("Returned %d bytes read instead of %d", read, size) } if err != nil { t.Errorf("Returned error instead of expected nil") } writer.Flush() if bytes.Compare(b.Bytes(), b2) != 0 { t.Errorf("Mismatched bytes data") t.Log(b.Bytes()) t.Log(b2) } }) }
explode_data.jsonl/39147
{ "file_path": "/home/dung/Study/Code/Cross_test_gen/training_dataset/dedup_data/clean_data_go/data/explode_data.jsonl", "token_count": 795 }
[ 2830, 3393, 4418, 14803, 1155, 353, 8840, 836, 8, 341, 3244, 16708, 445, 841, 5290, 1034, 497, 2915, 1155, 353, 8840, 836, 8, 341, 197, 72872, 680, 1669, 54626, 515, 298, 65999, 25, 414, 220, 17, 15, 19, 23, 345, 298, 38407, 25, 286, 220, 18, 15, 19, 23, 345, 298, 21297, 25, 981, 330, 56709, 739, 756, 298, 9600, 6463, 25, 981, 330, 20, 5049, 18, 18, 21, 15, 33, 12, 20, 1150, 21, 12, 19, 6754, 37, 7671, 19, 2104, 12, 19, 16, 24, 42577, 19, 18, 18, 33, 20, 16, 756, 298, 197, 10516, 25, 220, 15, 345, 298, 27725, 25, 981, 43990, 1637, 612, 49978, 345, 197, 197, 532, 197, 2405, 293, 5820, 22622, 198, 197, 38959, 1669, 96917, 7121, 6492, 2099, 65, 340, 197, 42400, 1669, 330, 1454, 5290, 504, 1034, 698, 197, 1166, 1669, 609, 1944, 18764, 8576, 9673, 515, 298, 197, 5062, 25, 2915, 1883, 3056, 3782, 11, 4347, 526, 21, 19, 8, 320, 396, 11, 1465, 8, 341, 571, 853, 220, 15, 11, 8879, 13080, 15253, 340, 298, 197, 1583, 197, 197, 532, 197, 37043, 11, 1848, 1669, 16658, 6503, 14803, 955, 11, 6916, 340, 197, 743, 1349, 961, 220, 15, 341, 298, 3244, 13080, 445, 84804, 1018, 67, 5820, 1349, 4518, 315, 220, 15, 497, 1349, 340, 197, 197, 532, 197, 743, 1848, 621, 2092, 341, 298, 3244, 13080, 445, 84804, 2092, 1465, 4518, 315, 5042, 5975, 1138, 197, 197, 532, 197, 743, 753, 18594, 94357, 3964, 6141, 1507, 3601, 8, 341, 298, 3244, 13080, 445, 1454, 943, 1018, 82, 4518, 315, 3601, 1018, 82, 497, 1848, 6141, 1507, 3601, 340, 197, 197, 532, 197, 3518, 3244, 16708, 445, 30950, 1349, 497, 2915, 1155, 353, 8840, 836, 8, 341, 197, 72872, 680, 1669, 54626, 515, 298, 65999, 25, 414, 220, 17, 15, 19, 23, 345, 298, 38407, 25, 286, 220, 18, 15, 19, 23, 345, 298, 21297, 25, 981, 330, 56709, 739, 756, 298, 9600, 6463, 25, 981, 330, 20, 5049, 18, 18, 21, 15, 33, 12, 20, 1150, 21, 12, 19, 6754, 37, 7671, 19, 2104, 12, 19, 16, 24, 42577, 19, 18, 18, 33, 20, 16, 756, 298, 197, 10516, 25, 220, 15, 345, 298, 27725, 25, 981, 43990, 1637, 612, 49978, 345, 197, 197, 532, 197, 2405, 293, 5820, 22622, 198, 197, 38959, 1669, 96917, 7121, 6492, 2099, 65, 340, 197, 13832, 1669, 220, 16, 15, 15, 198, 197, 2233, 17, 1669, 1281, 10556, 3782, 11, 1379, 11, 1379, 340, 197, 7000, 437, 6503, 1883, 17, 340, 197, 1166, 1669, 609, 1944, 18764, 8576, 9673, 515, 298, 197, 5062, 25, 2915, 1883, 3056, 3782, 11, 4347, 526, 21, 19, 8, 320, 396, 11, 1465, 8, 341, 571, 49124, 1883, 11, 293, 17, 340, 571, 853, 1379, 11, 6399, 86492, 198, 298, 197, 1583, 197, 197, 532, 197, 37043, 11, 1848, 1669, 16658, 6503, 14803, 955, 11, 6916, 340, 197, 743, 1349, 961, 526, 21, 19, 6856, 8, 341, 298, 3244, 13080, 445, 84804, 1018, 67, 5820, 1349, 4518, 315, 1018, 67, 497, 1349, 11, 1379, 340, 197, 197, 532, 197, 743, 1848, 961, 2092, 341, 298, 3244, 13080, 445, 84804, 1465, 4518, 315, 3601, 2092, 1138, 197, 197, 532, 197, 38959, 61559, 741, 197, 743, 5820, 32377, 1883, 36868, 1507, 293, 17, 8, 961, 220, 15, 341, 298, 3244, 13080, 445, 82572, 291, 5820, 821, 1138, 298, 3244, 5247, 1883, 36868, 2398, 298, 3244, 5247, 1883, 17, 340, 197, 197, 532, 197, 3518, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,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1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 TestRekey_status(t *testing.T) { core, keys, _ := vault.TestCoreUnsealed(t) ln, addr := http.TestServer(t, core) defer ln.Close() ui := new(cli.MockUi) c := &RekeyCommand{ Key: hex.EncodeToString(keys[0]), Meta: meta.Meta{ Ui: ui, }, } args := []string{"-address", addr, "-init"} if code := c.Run(args); code != 0 { t.Fatalf("bad: %d\n\n%s", code, ui.ErrorWriter.String()) } args = []string{"-address", addr, "-status"} if code := c.Run(args); code != 0 { t.Fatalf("bad: %d\n\n%s", code, ui.ErrorWriter.String()) } if !strings.Contains(ui.OutputWriter.String(), "Started: true") { t.Fatalf("bad: %s", ui.OutputWriter.String()) } }
explode_data.jsonl/39445
{ "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, 693, 792, 4773, 1155, 353, 8840, 836, 8, 341, 71882, 11, 6894, 11, 716, 1669, 34584, 8787, 5386, 1806, 75940, 1155, 340, 197, 2261, 11, 10789, 1669, 1758, 8787, 5475, 1155, 11, 6200, 340, 16867, 29390, 10421, 2822, 37278, 1669, 501, 70249, 24664, 23710, 340, 1444, 1669, 609, 693, 792, 4062, 515, 197, 55242, 25, 12371, 50217, 5870, 36131, 58, 15, 17036, 197, 9209, 1915, 25, 8823, 58806, 515, 298, 15980, 72, 25, 7505, 345, 197, 197, 1583, 197, 630, 31215, 1669, 3056, 917, 4913, 12, 4995, 497, 10789, 11, 6523, 2327, 16707, 743, 2038, 1669, 272, 16708, 7356, 1215, 2038, 961, 220, 15, 341, 197, 3244, 30762, 445, 13855, 25, 1018, 67, 1699, 1699, 12952, 497, 2038, 11, 7505, 6141, 6492, 6431, 2398, 197, 630, 31215, 284, 3056, 917, 4913, 12, 4995, 497, 10789, 11, 6523, 2829, 16707, 743, 2038, 1669, 272, 16708, 7356, 1215, 2038, 961, 220, 15, 341, 197, 3244, 30762, 445, 13855, 25, 1018, 67, 1699, 1699, 12952, 497, 2038, 11, 7505, 6141, 6492, 6431, 2398, 197, 630, 743, 753, 18594, 11545, 26230, 34246, 6492, 6431, 1507, 330, 32527, 25, 830, 899, 341, 197, 3244, 30762, 445, 13855, 25, 1018, 82, 497, 7505, 34246, 6492, 6431, 2398, 197, 532, 92 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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