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
#[test] fn test_params_of_vary_types() -> Result<()> { let db = checked_memory_handle(); let sql = "BEGIN; CREATE TABLE foo(bar TEXT, qux INTEGER); INSERT INTO foo VALUES ('baz', 1), ('baz', 2), ('baz', 3); END;"; db.execute_batch(sql)?; let changed = db.execute("UPDATE foo SET qux = ? WHERE bar = ?", params![1i32, &"baz"])?; assert_eq!(changed, 3); Ok(()) }
rust_cleaned_test_functions.jsonl/113042
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 250 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 6745, 3575, 2273, 658, 9763, 368, 1464, 5714, 71698, 341, 286, 1077, 2927, 284, 10067, 19195, 10630, 543, 286, 1077, 5704, 284, 330, 37588, 280, 4293, 30776, 14363, 15229, 54630, 15762, 11, 922, 87, 30381, 317, 4293, 39518, 12496, 15229, 14710, 4319, 42573, 516, 220, 16, 701, 4319, 42573, 516, 220, 17, 701, 4319, 42573, 516, 220, 18, 317, 4293, 11176, 39678, 286, 2927, 7769, 14534, 13148, 89720, 286, 1077, 5497, 284, 2927, 7769, 445, 9239, 15229, 9019, 922, 87, 284, 937, 5288, 3619, 284, 42313, 3628, 20703, 16, 72, 18, 17, 11, 609, 1, 42573, 1341, 40007, 286, 2060, 10714, 10297, 17353, 11, 220, 18, 317, 286, 7622, 50432, 262, 335 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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
#[test] fn test_static_bytes() { assert_eq!(Body::from(b"test".as_ref()).size(), BodySize::Sized(4)); assert_eq!(Body::from(b"test".as_ref()).get_ref(), b"test"); assert_eq!( Body::from_slice(b"test".as_ref()).size(), BodySize::Sized(4) ); assert_eq!(Body::from_slice(b"test".as_ref()).get_ref(), b"test"); assert_eq!((&b"test"[..]).size(), BodySize::Sized(4)); assert_eq!( block_on(poll_fn(|cx| (&b"test"[..]).poll_next(cx))) .unwrap() .ok(), Some(Bytes::from("test")) ); }
rust_cleaned_test_functions.jsonl/82686
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 350 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 25360, 12524, 368, 341, 286, 2060, 10714, 10297, 5444, 486, 1499, 1883, 1, 1944, 3263, 300, 7793, 6011, 2141, 1507, 13958, 1695, 486, 50, 1506, 7, 19, 1106, 286, 2060, 10714, 10297, 5444, 486, 1499, 1883, 1, 1944, 3263, 300, 7793, 6011, 455, 7793, 1507, 293, 1, 1944, 797, 286, 2060, 10714, 33673, 310, 13958, 486, 1499, 26488, 1883, 1, 1944, 3263, 300, 7793, 6011, 2141, 3148, 310, 13958, 1695, 486, 50, 1506, 7, 19, 340, 286, 1439, 286, 2060, 10714, 10297, 5444, 486, 1499, 26488, 1883, 1, 1944, 3263, 300, 7793, 6011, 455, 7793, 1507, 293, 1, 1944, 3071, 286, 2060, 10714, 0, 42902, 65, 1, 1944, 36864, 496, 10697, 2141, 1507, 13958, 1695, 486, 50, 1506, 7, 19, 1106, 286, 2060, 10714, 33673, 310, 2504, 4470, 1295, 965, 15246, 22428, 25844, 91, 15899, 65, 1, 1944, 36864, 496, 10697, 30141, 11257, 45752, 5929, 394, 659, 15454, 741, 394, 659, 562, 3148, 310, 4329, 76423, 486, 1499, 445, 1944, 5455, 286, 1439, 262, 335 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
1
#[test] fn test_custom_struct() { assert_eq!( mem::size_of::<MyCustomStruct>(), mem::size_of::<i32>() + mem::size_of::<u32>() + mem::size_of::<f32>() ); let my_cust_struct = MyCustomStruct::new(1, 2, 3_f32); assert_eq!(my_cust_struct.a, 1); assert_eq!(my_cust_struct.b, 2); assert_eq!(my_cust_struct.c, 3_f32); assert_eq!(my_cust_struct.sum(), 6_f32); let m2 = my_cust_struct.clone(); assert_eq!(format!("{:?}", m2), "MyCustomStruct { a: 1, b: 2, c: 3.0 }"); let mut m3 = my_cust_struct; m3.a = 100; assert_eq!(m2.a, 1); assert_eq!(my_cust_struct.a, 1); assert_eq!(m3.a, 100); }
rust_cleaned_test_functions.jsonl/132324
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 414 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 15875, 15126, 368, 341, 286, 2060, 10714, 33673, 310, 1833, 486, 2141, 3575, 27638, 5050, 10268, 9422, 65766, 310, 1833, 486, 2141, 3575, 27638, 72, 18, 17, 13555, 488, 1833, 486, 2141, 3575, 27638, 84, 18, 17, 13555, 488, 1833, 486, 2141, 3575, 27638, 69, 18, 17, 18949, 286, 3475, 286, 1077, 847, 87652, 15126, 284, 3017, 10268, 9422, 486, 931, 7, 16, 11, 220, 17, 11, 220, 18, 761, 18, 17, 317, 286, 2060, 10714, 10297, 2408, 87652, 15126, 5849, 11, 220, 16, 317, 286, 2060, 10714, 10297, 2408, 87652, 15126, 948, 11, 220, 17, 317, 286, 2060, 10714, 10297, 2408, 87652, 15126, 520, 11, 220, 18, 761, 18, 17, 626, 286, 2060, 10714, 10297, 2408, 87652, 15126, 13183, 1507, 220, 21, 761, 18, 17, 317, 286, 1077, 296, 17, 284, 847, 87652, 15126, 15997, 543, 286, 2060, 10714, 10297, 2243, 88928, 25, 52652, 296, 17, 701, 330, 5050, 10268, 9422, 314, 264, 25, 220, 16, 11, 293, 25, 220, 17, 11, 272, 25, 220, 18, 13, 15, 335, 797, 286, 1077, 5206, 296, 18, 284, 847, 87652, 15126, 280, 286, 296, 18, 5849, 284, 220, 16, 15, 15, 401, 286, 2060, 10714, 10297, 76, 17, 5849, 11, 220, 16, 317, 286, 2060, 10714, 10297, 2408, 87652, 15126, 5849, 11, 220, 16, 317, 286, 2060, 10714, 10297, 76, 18, 5849, 11, 220, 16, 15, 15, 317, 262, 335 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
1
#[test] fn test_mul() { for elm in MUL_TRIPLES.iter() { let (a_vec, b_vec, c_vec) = *elm; let a = BigInt::from_slice(Plus, a_vec); let b = BigInt::from_slice(Plus, b_vec); let c = BigInt::from_slice(Plus, c_vec); let (na, nb, nc) = (-&a, -&b, -&c); assert_op!(a * b == c); assert_op!(b * a == c); assert_op!(na * nb == c); assert_op!(na * b == nc); assert_op!(nb * a == nc); assert_assign_op!(a *= b == c); assert_assign_op!(b *= a == c); assert_assign_op!(na *= nb == c); assert_assign_op!(na *= b == nc); assert_assign_op!(nb *= a == nc); } for elm in DIV_REM_QUADRUPLES.iter() { let (a_vec, b_vec, c_vec, d_vec) = *elm; let a = BigInt::from_slice(Plus, a_vec); let b = BigInt::from_slice(Plus, b_vec); let c = BigInt::from_slice(Plus, c_vec); let d = BigInt::from_slice(Plus, d_vec); assert!(a == &b * &c + &d); assert!(a == &c * &b + &d); } }
rust_cleaned_test_functions.jsonl/56630
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 588 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 24944, 368, 341, 262, 369, 42205, 304, 386, 1094, 6410, 3298, 14017, 19471, 368, 341, 286, 1077, 320, 64, 13251, 11, 293, 13251, 11, 272, 13251, 8, 284, 353, 23162, 280, 286, 1077, 264, 284, 62608, 486, 1499, 26488, 7, 21807, 11, 264, 13251, 317, 286, 1077, 293, 284, 62608, 486, 1499, 26488, 7, 21807, 11, 293, 13251, 317, 286, 1077, 272, 284, 62608, 486, 1499, 26488, 7, 21807, 11, 272, 13251, 317, 286, 1077, 320, 3376, 11, 16649, 11, 25126, 8, 284, 10293, 5, 64, 11, 481, 5, 65, 11, 481, 5, 66, 626, 286, 2060, 10287, 10297, 64, 353, 293, 621, 272, 317, 286, 2060, 10287, 10297, 65, 353, 264, 621, 272, 317, 286, 2060, 10287, 10297, 3376, 353, 16649, 621, 272, 626, 286, 2060, 10287, 10297, 3376, 353, 293, 621, 25126, 317, 286, 2060, 10287, 10297, 18080, 353, 264, 621, 25126, 626, 286, 2060, 20688, 10287, 10297, 64, 11404, 293, 621, 272, 317, 286, 2060, 20688, 10287, 10297, 65, 11404, 264, 621, 272, 317, 286, 2060, 20688, 10287, 10297, 3376, 11404, 16649, 621, 272, 626, 286, 2060, 20688, 10287, 10297, 3376, 11404, 293, 621, 25126, 317, 286, 2060, 20688, 10287, 10297, 18080, 11404, 264, 621, 25126, 317, 262, 555, 262, 369, 42205, 304, 46260, 2192, 44, 16332, 96473, 3124, 14017, 19471, 368, 341, 286, 1077, 320, 64, 13251, 11, 293, 13251, 11, 272, 13251, 11, 294, 13251, 8, 284, 353, 23162, 280, 286, 1077, 264, 284, 62608, 486, 1499, 26488, 7, 21807, 11, 264, 13251, 317, 286, 1077, 293, 284, 62608, 486, 1499, 26488, 7, 21807, 11, 293, 13251, 317, 286, 1077, 272, 284, 62608, 486, 1499, 26488, 7, 21807, 11, 272, 13251, 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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 ]
3
#[test] fn test_get_batch_range() { assert_eq!(get_batch_range(None, 100), (0, 99)); assert_eq!(get_batch_range(Some(99), 50), (100, 149)); assert_eq!(get_batch_range(Some(149), 100), (150, 199)); assert_eq!(get_batch_range(Some(199), 100), (200, 299)); }
rust_cleaned_test_functions.jsonl/94282
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 144 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 3062, 14534, 9698, 368, 341, 286, 2060, 10714, 10297, 455, 14534, 9698, 26717, 11, 220, 16, 15, 15, 701, 320, 15, 11, 220, 24, 24, 1106, 286, 2060, 10714, 10297, 455, 14534, 9698, 65405, 7, 24, 24, 701, 220, 20, 15, 701, 320, 16, 15, 15, 11, 220, 16, 19, 24, 1106, 286, 2060, 10714, 10297, 455, 14534, 9698, 65405, 7, 16, 19, 24, 701, 220, 16, 15, 15, 701, 320, 16, 20, 15, 11, 220, 16, 24, 24, 1106, 286, 2060, 10714, 10297, 455, 14534, 9698, 65405, 7, 16, 24, 24, 701, 220, 16, 15, 15, 701, 320, 17, 15, 15, 11, 220, 17, 24, 24, 1106, 262, 335 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
1
#[test] fn test_insert() { let mut m = HashMap::new(); assert!(m.insert(1, 2)); assert!(m.insert(2, 4)); assert_eq!(*m.get(&1), 2); assert_eq!(*m.get(&2), 4); }
rust_cleaned_test_functions.jsonl/45616
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 119 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 17678, 368, 341, 286, 1077, 5206, 296, 284, 10528, 486, 931, 543, 286, 2060, 10297, 76, 7030, 7, 16, 11, 220, 17, 1106, 286, 2060, 10297, 76, 7030, 7, 17, 11, 220, 19, 1106, 286, 2060, 10714, 0, 4071, 76, 670, 2099, 16, 701, 220, 17, 317, 286, 2060, 10714, 0, 4071, 76, 670, 2099, 17, 701, 220, 19, 317, 262, 335 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
1
#[test] fn test_signed_sqrt_rational() { assert_eq!(f64::from(SignedSqrt::default()), 0.0); assert_eq!(f64::from(SignedSqrt::new(10.into(), (1, 4).into())), 5.0); }
rust_cleaned_test_functions.jsonl/80985
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 89 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 55617, 92199, 1710, 1663, 368, 341, 262, 2060, 10714, 10297, 69, 21, 19, 486, 1499, 3759, 1542, 50, 8140, 486, 2258, 11858, 220, 15, 13, 15, 317, 262, 2060, 10714, 10297, 69, 21, 19, 486, 1499, 3759, 1542, 50, 8140, 486, 931, 7, 16, 15, 39860, 1507, 320, 16, 11, 220, 19, 568, 18122, 96501, 220, 20, 13, 15, 317, 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
#[test] fn test_issue378_escaped_arguments1() { test_same(concat!( "function g(callback) {\n", " var f = callback;\n", " h(arguments,this);\n", " f.apply(this, arguments);\n", "}\n", "function h(a,b) {\n", " a[0] = b;", "}" )); }
rust_cleaned_test_functions.jsonl/27721
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 179 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 53340, 18, 22, 23, 62, 65826, 43433, 16, 368, 341, 262, 1273, 33574, 96360, 33673, 286, 330, 1688, 342, 23934, 8, 28152, 77, 756, 286, 330, 220, 762, 282, 284, 4822, 17882, 77, 756, 286, 330, 220, 305, 30467, 22416, 44388, 77, 756, 286, 330, 220, 282, 13045, 1394, 11, 5977, 44388, 77, 756, 286, 90105, 77, 756, 286, 330, 1688, 305, 2877, 8402, 8, 28152, 77, 756, 286, 330, 220, 264, 58, 15, 60, 284, 293, 64497, 286, 330, 11195, 262, 16518, 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
#[test] fn test_host_slaac_and_manual_address_conflict() { // SLAAC should not overwrite any manually added addresses that may // address has a different prefix. let config = Ipv6::DUMMY_CONFIG; let mut ctx = DummyEventDispatcherBuilder::default().build::<DummyEventDispatcher>(); let device = ctx.state_mut().add_ethernet_device(config.local_mac, Ipv6::MINIMUM_LINK_MTU.into()); crate::device::initialize_device(&mut ctx, device); let src_mac = config.remote_mac; let src_ip = src_mac.to_ipv6_link_local().addr().get(); let prefix = Ipv6Addr::new([1, 2, 3, 4, 5, 6, 7, 8, 0, 0, 0, 0, 0, 0, 0, 0]); let prefix_length = 64; let mut manual_addr_sub = [1, 2, 3, 4, 5, 6, 7, 8, 0, 0, 0, 0, 0, 0, 0, 0]; manual_addr_sub[8..].copy_from_slice(&config.local_mac.to_eui64()[..]); let manual_addr_sub = UnicastAddr::new(Ipv6Addr::new(manual_addr_sub)).unwrap(); let manual_addr_sub = AddrSubnet::from_witness(manual_addr_sub, prefix_length + 10).unwrap(); // Manually give the device the expected address but with a different // prefix. add_ip_addr_subnet(&mut ctx, device, manual_addr_sub.into_witness()).unwrap(); assert_eq!( NdpContext::<EthernetLinkDevice>::get_ipv6_addr_entries(&ctx, device.id().into()) .count(), 1 ); let entry = NdpContext::<EthernetLinkDevice>::get_ipv6_addr_entries(&ctx, device.id().into()) .last() .unwrap(); assert_eq!(*entry.addr_sub(), manual_addr_sub); assert_eq!(entry.state(), AddressState::Assigned); assert_eq!(entry.config_type(), AddrConfigType::Manual); assert_eq!(ctx.dispatcher().timer_events().count(), 0); // Should not get a new IP. let mut icmpv6_packet_buf = slaac_packet_buf( src_ip, config.local_ip.get(), prefix, prefix_length, false, true, 10000, 9000, ); let icmpv6_packet = icmpv6_packet_buf .parse_with::<_, Icmpv6Packet<_>>(IcmpParseArgs::new(src_ip, config.local_ip)) .unwrap(); ctx.receive_ndp_packet( device, src_ip.try_into().unwrap(), config.local_ip, icmpv6_packet.unwrap_ndp(), ); assert_eq!( NdpContext::<EthernetLinkDevice>::get_ipv6_addr_entries(&ctx, device.id().into()) .count(), 1 ); let entry = NdpContext::<EthernetLinkDevice>::get_ipv6_addr_entries(&ctx, device.id().into()) .last() .unwrap(); // Address state and configuration type should not have changed. assert_eq!(*entry.addr_sub(), manual_addr_sub); assert_eq!(entry.state(), AddressState::Assigned); assert_eq!(entry.config_type(), AddrConfigType::Manual); // No new timers were added. assert_eq!(ctx.dispatcher().timer_events().count(), 0); }
rust_cleaned_test_functions.jsonl/82829
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 1602 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 12848, 643, 4260, 580, 8378, 75428, 6744, 16059, 21242, 368, 341, 286, 442, 16797, 96710, 1265, 537, 32216, 894, 20083, 3694, 14230, 429, 1231, 8945, 286, 442, 2621, 702, 264, 2155, 9252, 382, 286, 1077, 2193, 284, 358, 30168, 21, 486, 35, 58673, 12568, 280, 286, 1077, 5206, 5635, 284, 50567, 1556, 21839, 3297, 486, 2258, 1005, 5834, 27638, 43344, 1556, 21839, 3913, 286, 1077, 3671, 4035, 310, 5635, 3467, 29523, 1005, 718, 57757, 13845, 9204, 8754, 11033, 22802, 11, 358, 30168, 21, 486, 16413, 40025, 26147, 49047, 52, 39860, 1423, 286, 17717, 486, 6111, 486, 21641, 9204, 2099, 6984, 5635, 11, 3671, 626, 286, 1077, 2286, 22802, 284, 2193, 34093, 22802, 280, 286, 1077, 2286, 10385, 284, 2286, 22802, 2389, 49378, 21, 7233, 13564, 1005, 6214, 1005, 455, 543, 286, 1077, 9252, 284, 358, 30168, 21, 13986, 486, 931, 2561, 16, 11, 220, 17, 11, 220, 18, 11, 220, 19, 11, 220, 20, 11, 220, 21, 11, 220, 22, 11, 220, 23, 11, 220, 15, 11, 220, 15, 11, 220, 15, 11, 220, 15, 11, 220, 15, 11, 220, 15, 11, 220, 15, 11, 220, 15, 2558, 286, 1077, 9252, 5118, 284, 220, 21, 19, 280, 286, 1077, 5206, 11376, 7387, 5228, 284, 508, 16, 11, 220, 17, 11, 220, 18, 11, 220, 19, 11, 220, 20, 11, 220, 21, 11, 220, 22, 11, 220, 23, 11, 220, 15, 11, 220, 15, 11, 220, 15, 11, 220, 15, 11, 220, 15, 11, 220, 15, 11, 220, 15, 11, 220, 15, 935, 286, 11376, 7387, 5228, 58, 23, 496, 936, 8560, 5673, 26488, 2099, 1676, 11033, 22802, 2389, 2204, 1963, 21, 19, 10116, 496, 2558, 286, 1077, 11376, 7387, 5228, 284, 1230, 35446, 13986, 486, 931, 8972, 30168, 21, 13986, 486, 931, 60671, 928, 7387, 5228, 4579, 15454, 543, 286, 1077, 11376, 7387, 5228, 4035, 310, 72585, 3136, 4711, 486, 1499, 1670, 8091, 60671, 928, 7387, 5228, 11, 9252, 5118, 488, 220, 16, 15, 568, 15454, 543, 286, 442, 2363, 1832, 2968, 279, 3671, 279, 3601, 2621, 714, 448, 264, 2155, 198, 286, 442, 9252, 624, 286, 912, 10385, 7387, 95681, 2099, 6984, 5635, 11, 3671, 11, 11376, 7387, 5228, 39860, 1670, 8091, 6011, 15454, 543, 286, 2060, 10714, 33673, 310, 451, 9796, 1972, 27638, 98006, 3939, 6985, 6831, 455, 49378, 21, 7387, 26092, 2099, 3773, 11, 3671, 1764, 1005, 18122, 2398, 394, 659, 1830, 3148, 310, 220, 16, 198, 286, 1439, 286, 1077, 4343, 4035, 310, 451, 9796, 1972, 27638, 98006, 3939, 6985, 6831, 455, 49378, 21, 7387, 26092, 2099, 3773, 11, 3671, 1764, 1005, 18122, 2398, 394, 659, 4259, 741, 394, 659, 15454, 543, 286, 2060, 10714, 0, 4071, 4085, 42826, 5228, 1507, 11376, 7387, 5228, 317, 286, 2060, 10714, 10297, 4085, 3467, 1507, 9177, 1397, 486, 94025, 317, 286, 2060, 10714, 10297, 4085, 5423, 1819, 1507, 72585, 2648, 929, 486, 52092, 317, 286, 2060, 10714, 10297, 3773, 93508, 1005, 19278, 19691, 1005, 1830, 1507, 220, 15, 626, 16885, 286, 442, 12260, 537, 633, 264, 501, 6790, 382, 286, 1077, 5206, 91826, 85, 21, 21078, 10363, 284, 31893, 580, 21078, 10363, 1006, 310, 2286, 10385, 345, 310, 2193, 11033, 10385, 670, 3148, 310, 9252, 345, 310, 9252, 5118, 345, 310, 895, 345, 310, 830, 345, 310, 220, 16, 15, 15, 15, 15, 345, 310, 220, 24, 15, 15, 15, 345, 286, 1439, 286, 1077, 91826, 85, 21, 21078, 284, 91826, 85, 21, 21078, 10363, 198, 310, 659, 6400, 6615, 27638, 6878, 358, 7293, 85, 21, 16679, 32399, 25526, 40, 7293, 14463, 4117, 486, 931, 14705, 10385, 11, 2193, 11033, 10385, 1171, 310, 659, 15454, 543, 286, 5635, 56051, 43544, 79, 21078, 1006, 310, 3671, 345, 310, 2286, 10385, 48779, 45514, 1005, 15454, 3148, 310, 2193, 11033, 10385, 345, 310, 91826, 85, 21, 21078, 55395, 43544, 79, 3148, 286, 1439, 286, 2060, 10714, 33673, 310, 451, 9796, 1972, 27638, 98006, 3939, 6985, 6831, 455, 49378, 21, 7387, 26092, 2099, 3773, 11, 3671, 1764, 1005, 18122, 2398, 394, 659, 1830, 3148, 310, 220, 16, 198, 286, 1439, 286, 1077, 4343, 4035, 310, 451, 9796, 1972, 27638, 98006, 3939, 6985, 6831, 455, 49378, 21, 7387, 26092, 2099, 3773, 11, 3671, 1764, 1005, 18122, 2398, 394, 659, 4259, 741, 394, 659, 15454, 543, 286, 442, 9177, 1584, 323, 6546, 943, 1265, 537, 614, 5497, 624, 286, 2060, 10714, 0, 4071, 4085, 42826, 5228, 1507, 11376, 7387, 5228, 317, 286, 2060, 10714, 10297, 4085, 3467, 1507, 9177, 1397, 486, 94025, 317, 286, 2060, 10714, 10297, 4085, 5423, 1819, 1507, 72585, 2648, 929, 486, 52092, 626, 286, 442, 2308, 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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
#[test] fn test_read_reports_downsampled() -> Result<(), Error> { // The voltages and device config are all completely made up for mathematical convenience. // the downsampling intervals. fn get_voltages(micros: u64) -> (f32, f32) { let seconds = micros as f32 / 1e6; let v_shunt = seconds; let v_bus = seconds.powi(2); (v_shunt, v_bus) } let device_config = fake_device::DeviceConfiguration { shunt_resistance: 2.0, v_shunt_scale: 1e-4, v_bus_scale: 1e-4, }; let test_duration = Duration::from_secs(1); let raw_data_interval = Duration::from_millis(1); let reporting_interval = Duration::from_millis(100); // Interval-average formulas follow from the definition // Input times are in seconds. let v_shunt_integral = |t1: f32, t2: f32| (t2.powi(2) - t1.powi(2)) / (2.0 * (t2 - t1)); let v_bus_integral = |t1: f32, t2: f32| (t2.powi(3) - t1.powi(3)) / (3.0 * (t2 - t1)); let power_integral = |t1: f32, t2: f32| { (t2.powi(4) - t1.powi(4)) / (4.0 * device_config.shunt_resistance * (t2 - t1)) }; let report_queue = make_report_queue(get_voltages, &device_config, test_duration, raw_data_interval); let coordinator = fake_device::CoordinatorBuilder::new(device_config.clone()) .with_report_queue(report_queue.clone()) .build(); let interface = fake_device::FakeZedmonInterface::new(coordinator); let zedmon = ZedmonClient::new(interface).expect("Error building ZedmonClient"); let output = run_zedmon_reporting(&zedmon, test_duration, Some(reporting_interval))?; let mut reader = csv::ReaderBuilder::new().has_headers(false).from_reader(output.as_slice()); // Both v_shunt and v_bus have a max value of 1. Since // the maximum error in a raw power measurement should be roughly let power_tolerance = (device_config.v_shunt_scale + device_config.v_bus_scale) / device_config.shunt_resistance; let mut num_records = 0; let mut prev_timestamp = 0; for result in reader.deserialize::<ZedmonRecord>() { let record = result?; num_records = num_records + 1; let t = record.timestamp_micros as f32 / 1e6; let t_prev = prev_timestamp as f32 / 1e6; assert_near!( record.shunt_voltage, v_shunt_integral(t_prev, t), device_config.v_shunt_scale ); assert_near!(record.bus_voltage, v_bus_integral(t_prev, t), device_config.v_bus_scale); assert_near!(record.power, power_integral(t_prev, t), power_tolerance); prev_timestamp = record.timestamp_micros; } assert_eq!(num_records, test_duration.as_millis() / reporting_interval.as_millis()); Ok(()) }
rust_cleaned_test_functions.jsonl/90582
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 1457 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 6443, 64423, 13998, 13611, 67, 368, 1464, 5714, 68843, 4600, 29, 341, 286, 442, 576, 16393, 1134, 323, 3671, 2193, 525, 678, 6587, 1865, 705, 369, 35972, 19132, 624, 1789, 286, 442, 279, 39191, 29709, 26992, 624, 286, 5168, 633, 2273, 6181, 1134, 1255, 2754, 82, 25, 575, 21, 19, 8, 1464, 320, 69, 18, 17, 11, 282, 18, 17, 8, 341, 310, 1077, 6486, 284, 8003, 82, 438, 282, 18, 17, 608, 220, 16, 68, 21, 280, 310, 1077, 348, 3712, 3850, 284, 6486, 280, 310, 1077, 348, 25418, 284, 6486, 25290, 72, 7, 17, 317, 310, 320, 85, 3712, 3850, 11, 348, 25418, 340, 286, 555, 286, 1077, 3671, 5332, 284, 12418, 9204, 486, 6985, 7688, 341, 310, 557, 3850, 4918, 3924, 25, 220, 17, 13, 15, 345, 310, 348, 3712, 3850, 16727, 25, 220, 16, 68, 12, 19, 345, 310, 348, 25418, 16727, 25, 220, 16, 68, 12, 19, 345, 286, 3634, 286, 1077, 1273, 25454, 284, 21045, 486, 1499, 68718, 7, 16, 317, 286, 1077, 7112, 1769, 20541, 284, 21045, 486, 1499, 717, 56212, 7, 16, 317, 286, 1077, 12827, 20541, 284, 21045, 486, 1499, 717, 56212, 7, 16, 15, 15, 626, 286, 442, 40584, 77426, 54079, 1795, 504, 279, 7271, 8945, 286, 442, 5571, 3039, 525, 304, 6486, 624, 286, 1077, 348, 3712, 3850, 64076, 284, 760, 83, 16, 25, 282, 18, 17, 11, 259, 17, 25, 282, 18, 17, 91, 320, 83, 17, 25290, 72, 7, 17, 8, 481, 259, 16, 25290, 72, 7, 17, 593, 608, 320, 17, 13, 15, 353, 320, 83, 17, 481, 259, 16, 1106, 286, 1077, 348, 25418, 64076, 284, 760, 83, 16, 25, 282, 18, 17, 11, 259, 17, 25, 282, 18, 17, 91, 320, 83, 17, 25290, 72, 7, 18, 8, 481, 259, 16, 25290, 72, 7, 18, 593, 608, 320, 18, 13, 15, 353, 320, 83, 17, 481, 259, 16, 1106, 286, 1077, 2355, 64076, 284, 760, 83, 16, 25, 282, 18, 17, 11, 259, 17, 25, 282, 18, 17, 91, 341, 310, 320, 83, 17, 25290, 72, 7, 19, 8, 481, 259, 16, 25290, 72, 7, 19, 593, 608, 320, 19, 13, 15, 353, 3671, 5332, 2395, 3850, 4918, 3924, 353, 320, 83, 17, 481, 259, 16, 1171, 286, 3634, 286, 1077, 1895, 10841, 4035, 310, 1281, 14813, 10841, 5433, 2273, 6181, 1134, 11, 609, 6111, 5332, 11, 1273, 25454, 11, 7112, 1769, 20541, 626, 286, 1077, 30284, 284, 12418, 9204, 486, 64304, 3297, 486, 931, 17848, 5332, 15997, 2398, 310, 659, 4197, 14813, 10841, 45175, 10841, 15997, 2398, 310, 659, 5834, 543, 286, 1077, 3749, 284, 12418, 9204, 486, 52317, 57, 291, 1645, 5051, 486, 931, 19494, 17442, 317, 286, 1077, 1147, 291, 1645, 284, 1863, 291, 1645, 2959, 486, 931, 75487, 568, 17119, 445, 1454, 4752, 1863, 291, 1645, 2959, 3071, 286, 1077, 2550, 284, 1598, 6415, 291, 1645, 52376, 2099, 15905, 1645, 11, 1273, 25454, 11, 4329, 45175, 287, 20541, 593, 37445, 286, 1077, 5206, 6604, 4035, 310, 13147, 486, 5062, 3297, 486, 931, 1005, 4648, 26719, 3576, 568, 1499, 22306, 11057, 5357, 26488, 5231, 286, 442, 11733, 348, 3712, 3850, 323, 348, 25418, 614, 264, 1932, 897, 315, 220, 16, 13, 8704, 8945, 286, 442, 279, 7192, 1465, 304, 264, 7112, 2355, 18662, 1265, 387, 17267, 8945, 286, 1077, 2355, 92069, 284, 320, 6111, 5332, 3133, 3712, 3850, 16727, 488, 3671, 5332, 3133, 25418, 16727, 340, 310, 608, 3671, 5332, 2395, 3850, 4918, 3924, 401, 286, 1077, 5206, 1629, 31279, 284, 220, 15, 280, 286, 1077, 5206, 7872, 23073, 284, 220, 15, 280, 286, 369, 1102, 304, 6604, 50755, 27638, 57, 291, 1645, 6471, 13555, 341, 310, 1077, 3255, 284, 1102, 69493, 310, 1629, 31279, 284, 1629, 31279, 488, 220, 16, 401, 310, 1077, 259, 284, 3255, 22511, 73003, 82, 438, 282, 18, 17, 608, 220, 16, 68, 21, 280, 310, 1077, 259, 25566, 284, 7872, 23073, 438, 282, 18, 17, 608, 220, 16, 68, 21, 401, 310, 2060, 76340, 33673, 394, 3255, 2395, 3850, 62756, 345, 394, 348, 3712, 3850, 64076, 1155, 25566, 11, 259, 1326, 394, 3671, 5332, 3133, 3712, 3850, 16727, 198, 310, 1439, 310, 2060, 76340, 10297, 8548, 48067, 62756, 11, 348, 25418, 64076, 1155, 25566, 11, 259, 701, 3671, 5332, 3133, 25418, 16727, 317, 310, 2060, 76340, 10297, 8548, 39545, 11, 2355, 64076, 1155, 25566, 11, 259, 701, 2355, 92069, 626, 310, 7872, 23073, 284, 3255, 22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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
#[test] fn test_mq_set_nonblocking() { use nix::mqueue::{mq_getattr, mq_set_nonblock, mq_remove_nonblock}; const MSG_SIZE: mq_attr_member_t = 32; let initial_attr = MqAttr::new(0, 10, MSG_SIZE, 0); let mq_name = &CString::new(b"/attr_test_get_attr".as_ref()).unwrap(); let oflag = MQ_OFlag::O_CREAT | MQ_OFlag::O_WRONLY; let mode = Mode::S_IWUSR | Mode::S_IRUSR | Mode::S_IRGRP | Mode::S_IROTH; let r = mq_open(mq_name, oflag, mode, Some(&initial_attr)); if let Err(Errno::ENOSYS) = r { println!("message queues not supported or module not loaded?"); return; }; let mqd = r.unwrap(); mq_set_nonblock(mqd).unwrap(); let new_attr = mq_getattr(mqd); let o_nonblock_bits = MQ_OFlag::O_NONBLOCK.bits() as mq_attr_member_t; assert_eq!(new_attr.unwrap().flags() & o_nonblock_bits, o_nonblock_bits); mq_remove_nonblock(mqd).unwrap(); let new_attr = mq_getattr(mqd); assert_eq!(new_attr.unwrap().flags() & o_nonblock_bits, 0); mq_close(mqd).unwrap(); }
rust_cleaned_test_functions.jsonl/28039
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 498 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 717, 80, 2602, 21637, 70356, 368, 341, 262, 990, 308, 941, 486, 76, 4584, 22964, 27674, 3062, 2991, 11, 72298, 2602, 21637, 4574, 11, 72298, 18193, 21637, 4574, 2440, 262, 733, 23317, 4098, 25, 72298, 10422, 19388, 528, 284, 220, 18, 17, 280, 262, 1077, 2856, 10422, 284, 220, 386, 80, 13371, 486, 931, 7, 15, 11, 220, 16, 15, 11, 23317, 4098, 11, 220, 15, 317, 262, 1077, 72298, 1269, 284, 609, 63677, 486, 931, 1883, 3115, 2991, 4452, 3062, 10422, 3263, 300, 7793, 6011, 15454, 543, 262, 1077, 315, 13363, 284, 42983, 2232, 12135, 486, 46, 70802, 760, 42983, 2232, 12135, 486, 46, 88649, 280, 262, 1077, 3856, 284, 14562, 486, 50, 86421, 49558, 760, 14562, 486, 50, 17138, 49558, 760, 14562, 486, 50, 17138, 95993, 760, 14562, 486, 50, 7959, 1285, 3617, 280, 262, 1077, 435, 284, 72298, 11311, 1255, 80, 1269, 11, 315, 13363, 11, 3856, 11, 4329, 2099, 9426, 10422, 1106, 262, 421, 1077, 15495, 7, 7747, 2152, 486, 953, 3126, 9394, 8, 284, 435, 341, 286, 13751, 17223, 1994, 48094, 537, 7248, 476, 4688, 537, 6661, 46091, 286, 470, 280, 262, 2605, 262, 1077, 72298, 67, 284, 435, 55395, 543, 262, 72298, 2602, 21637, 4574, 1255, 76727, 568, 15454, 543, 262, 1077, 501, 10422, 284, 72298, 3062, 2991, 1255, 76727, 317, 262, 1077, 297, 21637, 4574, 20034, 284, 42983, 2232, 12135, 486, 46, 22128, 39964, 38440, 368, 438, 72298, 10422, 19388, 528, 280, 262, 2060, 10714, 10297, 931, 10422, 55395, 1005, 11161, 368, 609, 297, 21637, 4574, 20034, 11, 297, 21637, 4574, 20034, 317, 262, 72298, 18193, 21637, 4574, 1255, 76727, 568, 15454, 543, 262, 1077, 501, 10422, 284, 72298, 3062, 2991, 1255, 76727, 317, 262, 2060, 10714, 10297, 931, 10422, 55395,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1 ]
2
#[test] fn test_truncate_with_ellipsis_on_naughty_strings() { let naughty_strings = vec![ "ÅÍÎÏ˝ÓÔÒÚÆ☃", "Œ„´‰ˇÁ¨ˆØ∏”’", "`⁄€‹›fifl‡°·‚—±", "田中さんにあげて下さい", "和製漢語", "👨‍👩‍👦 👨‍👩‍👧‍👦 👨‍👨‍👦 👩‍👩‍👧 👨‍👦 👨‍👧‍👦 👩‍👦 👩‍👧‍👦", ]; for string in naughty_strings { let grapheme_count = UnicodeSegmentation::graphemes(string, true).count(); for i in 0..(grapheme_count + 3) { let _ = truncate_with_ellipsis_to_length(string, i, None); } } }
rust_cleaned_test_functions.jsonl/81840
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 459 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 3547, 26900, 6615, 62, 71922, 4470, 58631, 35516, 33500, 368, 341, 1789, 286, 1077, 52943, 33500, 284, 7486, 90515, 310, 330, 144044, 52220, 71807, 144865, 145052, 39062, 131371, 171, 96, 123, 144086, 70494, 144839, 146024, 756, 310, 330, 144581, 55063, 28111, 84625, 145551, 43701, 75005, 144879, 144050, 145992, 854, 527, 756, 310, 35973, 144680, 15056, 144040, 68109, 144300, 144882, 144343, 11616, 13935, 72138, 2293, 37021, 756, 310, 330, 99810, 15946, 135741, 132506, 37044, 131743, 756, 310, 330, 33108, 103334, 110007, 102819, 756, 310, 330, 145367, 378, 235, 145233, 378, 235, 145988, 61804, 101, 378, 235, 145233, 378, 235, 145665, 378, 235, 145988, 61804, 101, 378, 235, 145367, 378, 235, 145988, 61804, 102, 378, 235, 145233, 378, 235, 145665, 61804, 101, 378, 235, 145988, 61804, 101, 378, 235, 145665, 378, 235, 145988, 61804, 102, 378, 235, 145988, 61804, 102, 378, 235, 145665, 378, 235, 145988, 756, 286, 15424, 286, 369, 914, 304, 52943, 33500, 341, 310, 1077, 4771, 3894, 3180, 284, 35897, 21086, 367, 486, 4439, 15660, 3609, 11, 830, 568, 1830, 1428, 310, 369, 600, 304, 220, 15, 496, 7, 4439, 3894, 3180, 488, 220, 18, 8, 341, 394, 1077, 716, 284, 56772, 6615, 62, 71922, 2346, 5118, 3609, 11, 600, 11, 2240, 317, 310, 456, 286, 456, 262, 335 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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
#[test] fn test_literal() { assert_eq!( "-3.14e-4".parse::<LiteralValue>().unwrap(), LiteralValue::Float(-0.000_314) ); assert_eq!(parse!(literal_value, "0"), LiteralValue::Integer(0)); assert_eq!(parse!(literal_value, "124"), LiteralValue::Integer(124)); assert_eq!( parse!(literal_value, r#""""#), LiteralValue::String(String::new()) ); assert_eq!( parse!(literal_value, r#"''"#), LiteralValue::String(String::new()) ); assert_eq!( parse!(literal_value, r#""hello""#), LiteralValue::String(String::from("hello")) ); assert_eq!( parse!(literal_value, r#"'hello'"#), LiteralValue::String(String::from("hello")) ); }
rust_cleaned_test_functions.jsonl/130540
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 452 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 34100, 368, 341, 286, 2060, 10714, 33673, 310, 6523, 18, 13, 16, 19, 68, 12, 19, 3263, 6400, 27638, 17350, 1130, 10483, 15454, 3148, 310, 49674, 1130, 486, 5442, 4080, 15, 13, 15, 15, 15, 62, 18, 16, 19, 340, 286, 1439, 286, 2060, 10714, 10297, 6400, 10297, 35785, 3142, 11, 330, 15, 3975, 49674, 1130, 486, 3486, 7, 15, 1106, 286, 2060, 10714, 10297, 6400, 10297, 35785, 3142, 11, 330, 16, 17, 19, 3975, 49674, 1130, 486, 3486, 7, 16, 17, 19, 1106, 286, 2060, 10714, 33673, 310, 4715, 10297, 35785, 3142, 11, 435, 2, 3014, 3014, 2, 1326, 310, 49674, 1130, 486, 703, 2242, 486, 931, 2398, 286, 1439, 286, 2060, 10714, 33673, 310, 4715, 10297, 35785, 3142, 11, 435, 55543, 4605, 57676, 1326, 310, 49674, 1130, 486, 703, 2242, 486, 931, 2398, 286, 1439, 286, 2060, 10714, 33673, 310, 4715, 10297, 35785, 3142, 11, 435, 2, 3014, 14990, 3014, 2, 1326, 310, 49674, 1130, 486, 703, 2242, 486, 1499, 445, 14990, 5455, 286, 1439, 286, 2060, 10714, 33673, 310, 4715, 10297, 35785, 3142, 11, 435, 2, 20584, 14990, 14913, 2, 1326, 310, 49674, 1130, 486, 703, 2242, 486, 1499, 445, 14990, 5455, 286, 1439, 262, 335 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
1
#[test] fn test_range_filter() -> Result<()> { let schema = DataSchemaRefExt::create(vec![ DataField::new("a", i64::to_data_type()), DataField::new("b", i32::to_data_type()), DataField::new("c", Vu8::to_data_type()), ]); let mut stats: BlockStatistics = HashMap::new(); stats.insert(0u32, ColumnStatistics { min: DataValue::Int64(1), max: DataValue::Int64(20), null_count: 1, in_memory_size: 0, }); stats.insert(1u32, ColumnStatistics { min: DataValue::Int64(3), max: DataValue::Int64(10), null_count: 0, in_memory_size: 0, }); stats.insert(2u32, ColumnStatistics { min: DataValue::String("abc".as_bytes().to_vec()), max: DataValue::String("bcd".as_bytes().to_vec()), null_count: 0, in_memory_size: 0, }); struct Test { name: &'static str, expr: Expression, expect: bool, error: &'static str, } let tests: Vec<Test> = vec![ Test { name: "a < 1 and b > 3", expr: col("a").lt(lit(1)).and(col("b").gt(lit(3i32))), expect: false, error: "", }, Test { name: "1 > -a or 3 >= b", expr: lit(1).gt(neg(col("a"))).or(lit(3i32).gt_eq(col("b"))), expect: true, error: "", }, Test { name: "a = 1 and b != 3", expr: col("a").eq(lit(1)).and(col("b").not_eq(lit(3))), expect: true, error: "", }, Test { name: "a is null", expr: Expression::create_scalar_function("isNull", vec![col("a")]), expect: true, error: "", }, Test { name: "a is not null", expr: Expression::create_scalar_function("isNotNull", vec![col("a")]), expect: true, error: "", }, Test { name: "null", expr: Expression::create_literal(DataValue::Null), expect: false, error: "", }, Test { name: "b >= 0 and c like '%sys%'", expr: col("b") .gt_eq(lit(0)) .and(Expression::create_binary_expression("like", vec![ col("c"), lit("%sys%".as_bytes()), ])), expect: true, error: "", }, Test { name: "c like 'ab_'", expr: Expression::create_binary_expression("like", vec![ col("c"), lit("ab_".as_bytes()), ]), expect: true, error: "", }, Test { name: "c like 'bcdf'", expr: Expression::create_binary_expression("like", vec![ col("c"), lit("bcdf".as_bytes()), ]), expect: false, error: "", }, Test { name: "c not like 'ac%'", expr: Expression::create_binary_expression("not like", vec![ col("c"), lit("ac%".as_bytes()), ]), expect: true, error: "", }, Test { name: "a + b > 30", expr: add(col("a"), col("b")).gt(lit(30i32)), expect: false, error: "", }, Test { name: "a + b < 10", expr: add(col("a"), col("b")).lt(lit(10i32)), expect: true, error: "", }, Test { name: "a - b <= -10", expr: sub(col("a"), col("b")).lt_eq(lit(-10i32)), expect: true, error: "Code: 1067, displayText = Function '-' is not monotonic in the variables range.", }, Test { name: "a < b", expr: col("a").lt(col("b")), expect: true, error: "", }, Test { name: "a + 9 < b", expr: add(col("a"), lit(9)).lt(col("b")), expect: false, error: "", }, ]; for test in tests { let prune = RangeFilter::try_create(&test.expr, schema.clone())?; match prune.eval(&stats) { Ok(actual) => assert_eq!(test.expect, actual, "{:#?}", test.name), Err(e) => assert_eq!(test.error, e.to_string(), "{}", test.name), } } Ok(()) }
rust_cleaned_test_functions.jsonl/115767
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 2567 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 9698, 8727, 368, 1464, 5714, 71698, 341, 262, 1077, 10802, 284, 2885, 8632, 3945, 6756, 486, 3182, 25592, 90515, 286, 2885, 1877, 486, 931, 445, 64, 497, 600, 21, 19, 486, 983, 1769, 1819, 14702, 286, 2885, 1877, 486, 931, 445, 65, 497, 600, 18, 17, 486, 983, 1769, 1819, 14702, 286, 2885, 1877, 486, 931, 445, 66, 497, 56602, 23, 486, 983, 1769, 1819, 14702, 262, 22712, 262, 1077, 5206, 10472, 25, 8362, 38599, 284, 10528, 486, 931, 543, 262, 10472, 7030, 7, 15, 84, 18, 17, 11, 9332, 38599, 341, 286, 1308, 25, 2885, 1130, 486, 1072, 21, 19, 7, 16, 1326, 286, 1932, 25, 2885, 1130, 486, 1072, 21, 19, 7, 17, 15, 1326, 286, 845, 3180, 25, 220, 16, 345, 286, 304, 19195, 2368, 25, 220, 15, 345, 262, 1625, 262, 10472, 7030, 7, 16, 84, 18, 17, 11, 9332, 38599, 341, 286, 1308, 25, 2885, 1130, 486, 1072, 21, 19, 7, 18, 1326, 286, 1932, 25, 2885, 1130, 486, 1072, 21, 19, 7, 16, 15, 1326, 286, 845, 3180, 25, 220, 15, 345, 286, 304, 19195, 2368, 25, 220, 15, 345, 262, 1625, 262, 10472, 7030, 7, 17, 84, 18, 17, 11, 9332, 38599, 341, 286, 1308, 25, 2885, 1130, 486, 703, 445, 13683, 3263, 300, 12524, 1005, 983, 13251, 14702, 286, 1932, 25, 2885, 1130, 486, 703, 445, 91490, 3263, 300, 12524, 1005, 983, 13251, 14702, 286, 845, 3180, 25, 220, 15, 345, 286, 304, 19195, 2368, 25, 220, 15, 345, 262, 3011, 262, 2036, 3393, 341, 286, 829, 25, 30136, 1978, 607, 345, 286, 15169, 25, 16378, 345, 286, 1720, 25, 1807, 345, 286, 1465, 25, 30136, 1978, 607, 345, 262, 555, 262, 1077, 7032, 25, 11312, 71273, 29, 284, 7486, 90515, 286, 3393, 341, 310, 829, 25, 330, 64, 366, 220, 16, 323, 293, 861, 220, 18, 756, 310, 15169, 25, 1375, 445, 64, 1827, 4832, 2333, 275, 7, 16, 4579, 437, 19611, 445, 65, 1827, 5178, 2333, 275, 7, 18, 72, 18, 17, 41749, 310, 1720, 25, 895, 345, 310, 1465, 25, 8324, 286, 1153, 286, 3393, 341, 310, 829, 25, 330, 16, 861, 481, 64, 476, 220, 18, 2604, 293, 756, 310, 15169, 25, 13020, 7, 16, 568, 5178, 1445, 791, 19611, 445, 64, 2761, 568, 269, 2333, 275, 7, 18, 72, 18, 17, 568, 5178, 10714, 19611, 445, 65, 2761, 1326, 310, 1720, 25, 830, 345, 310, 1465, 25, 8324, 286, 1153, 286, 3393, 341, 310, 829, 25, 330, 64, 284, 220, 16, 323, 293, 961, 220, 18, 756, 310, 15169, 25, 1375, 445, 64, 1827, 11006, 2333, 275, 7, 16, 4579, 437, 19611, 445, 65, 1827, 1921, 10714, 2333, 275, 7, 18, 41749, 310, 1720, 25, 830, 345, 310, 1465, 25, 8324, 286, 1153, 286, 3393, 341, 310, 829, 25, 330, 64, 374, 845, 756, 310, 15169, 25, 16378, 486, 3182, 41652, 9174, 445, 66811, 497, 7486, 20703, 2074, 445, 64, 899, 17036, 310, 1720, 25, 830, 345, 310, 1465, 25, 8324, 286, 1153, 286, 3393, 341, 310, 829, 25, 330, 64, 374, 537, 845, 756, 310, 15169, 25, 16378, 486, 3182, 41652, 9174, 445, 285, 11005, 497, 7486, 20703, 2074, 445, 64, 899, 17036, 310, 1720, 25, 830, 345, 310, 1465, 25, 8324, 286, 1153, 286, 3393, 341, 310, 829, 25, 330, 2921, 756, 310, 15169, 25, 16378, 486, 3182, 34100, 18959, 1130, 486, 3280, 1326, 310, 1720, 25, 895, 345, 310, 1465, 25, 8324, 286, 1153, 286, 3393, 341, 310, 829, 25, 330, 65, 2604, 220, 15, 323, 272, 1075, 7677, 7791, 27238, 756, 310, 15169, 25, 1375, 445, 65, 1138, 394, 659, 5178, 10714, 2333, 275, 7, 15, 1171, 394, 659, 437, 55188, 486, 3182, 31761, 28068, 445, 4803, 497, 7486, 90515, 503, 1375, 445, 66, 4461, 503, 13020, 4430, 7791, 4, 3263, 300, 12524, 14702, 394, 2279, 6965, 310, 1720, 25, 830, 345, 310, 1465, 25, 8324, 286, 1153, 286, 3393, 341, 310, 829, 25, 330, 66, 1075, 364, 370, 19333, 756, 310, 15169, 25, 16378, 486, 3182, 31761, 28068, 445, 4803, 497, 7486, 90515, 394, 1375, 445, 66, 4461, 394, 13020, 445, 370, 62, 3263, 300, 12524, 14702, 310, 38408, 310, 1720, 25, 830, 345, 310, 1465, 25, 8324, 286, 1153, 286, 3393, 341, 310, 829, 25, 330, 66, 1075, 364, 8904, 2940, 38330, 310, 15169, 25, 16378, 486, 3182, 31761, 28068, 445, 4803, 497, 7486, 90515, 394, 1375, 445, 66, 4461, 394, 13020, 445, 8904, 2940, 3263, 300, 12524, 14702, 310, 38408, 310, 1720, 25, 895, 345, 310, 1465, 25, 8324, 286, 1153, 286, 3393, 341, 310, 829, 25, 330, 66, 537, 1075, 364, 580, 27238, 756, 310, 15169, 25, 16378, 486, 3182, 31761, 28068, 445, 1921, 1075, 497, 7486, 90515, 394, 1375, 445, 66, 4461, 394, 13020, 445, 580, 4, 3263, 300, 12524, 14702, 310, 38408, 310, 1720, 25, 830, 345, 310, 1465, 25, 8324, 286, 1153, 286, 3393, 341, 310, 829, 25, 330, 64, 488, 293, 861, 220, 18, 15, 756, 310, 15169, 25, 912, 19611, 445, 64, 3975, 1375, 445, 65, 15197, 5178, 2333, 275, 7, 18, 15, 72, 18, 17, 6965, 310, 1720, 25, 895, 345, 310, 1465, 25, 8324, 286, 1153, 286, 3393, 341, 310, 829, 25, 330, 64, 488, 293, 366, 220, 16, 15, 756, 310, 15169, 25, 912, 19611, 445, 64, 3975, 1375, 445, 65, 15197, 4832, 2333, 275, 7, 16, 15, 72, 18, 17, 6965, 310, 1720, 25, 830, 345, 310, 1465, 25, 8324, 286, 1153, 286, 3393, 341, 310, 829, 25, 330, 64, 481, 293, 2651, 481, 16, 15, 756, 310, 15169, 25, 1186, 19611, 445, 64, 3975, 1375, 445, 65, 15197, 4832, 10714, 2333, 275, 4080, 16, 15, 72, 18, 17, 6965, 310, 1720, 25, 830, 345, 310, 1465, 510, 394, 330, 2078, 25, 220, 16, 15, 21, 22, 11, 3037, 1178, 284, 5712, 20672, 374, 537, 77216, 14011, 304, 279, 7332, 2088, 10346, 286, 1153, 286, 3393, 341, 310, 829, 25, 330, 64, 366, 293, 756, 310, 15169, 25, 1375, 445, 64, 1827, 4832, 19611, 445, 65, 30154, 310, 1720, 25, 830, 345, 310, 1465, 25, 8324, 286, 1153, 286, 3393, 341, 310, 829, 25, 330, 64, 488, 220, 24, 366, 293, 756, 310, 15169, 25, 912, 19611, 445, 64, 3975, 13020, 7, 24, 4579, 4832, 19611, 445, 65, 30154, 310, 1720, 25, 895, 345, 310, 1465, 25, 8324, 286, 1153, 262, 15424, 262, 369, 1273, 304, 7032, 341, 286, 1077, 79526, 284, 16437, 5632, 486, 1539, 8657, 2099, 1944, 57029, 11, 10802, 15997, 2140, 69493, 286, 2432, 79526, 31710, 2099, 16260, 8, 341, 310, 7622, 29721, 8, 589, 2060, 10714, 10297, 1944, 25952, 11, 5042, 11, 13868, 14111, 52652, 1273, 2644, 1326, 310, 15495, 2026, 8, 589, 2060, 10714, 10297, 1944, 4417, 11, 384, 2389, 3904, 1507, 35503, 497, 1273, 2644, 1326, 286, 456, 262, 555, 262, 7622, 50432, 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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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 ]
4
#[test] fn test_game_console() { let input: Vec<String> = "nop +0 acc +1 jmp +4 acc +3 jmp -3 acc -99 acc +1 jmp -4 acc +6" .split('\n') .map(|x| x.trim().to_string()) .collect(); let (result, infinite) = detect_loop(&input); assert_eq!(result, 5); assert!(infinite); assert_eq!(try_repair(&input), 8); }
rust_cleaned_test_functions.jsonl/88218
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 270 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 18547, 51724, 368, 341, 286, 1077, 1946, 25, 11312, 3464, 29, 284, 330, 62813, 488, 15, 198, 286, 1029, 488, 16, 198, 286, 90369, 488, 19, 198, 286, 1029, 488, 18, 198, 286, 90369, 481, 18, 198, 286, 1029, 481, 24, 24, 198, 286, 1029, 488, 16, 198, 286, 90369, 481, 19, 198, 286, 1029, 488, 21, 698, 310, 659, 6960, 11024, 77, 1305, 310, 659, 2186, 22428, 87, 91, 856, 16419, 1005, 983, 3904, 2398, 310, 659, 17384, 1428, 286, 1077, 320, 1382, 11, 23809, 8, 284, 11140, 17198, 2099, 1355, 317, 286, 2060, 10714, 10297, 1382, 11, 220, 20, 317, 286, 2060, 10297, 258, 25722, 626, 286, 2060, 10714, 10297, 1539, 1288, 12670, 2099, 1355, 701, 220, 23, 317, 262, 335 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
1
#[test] fn test_drop_count() { let counter = Cell::new(0); { let arena = TypedArena::default(); for _ in 0..100 { arena.alloc(DropCounter { counter: &counter }); } assert_eq!(counter.get(), 0); } assert_eq!(counter.get(), 100); }
rust_cleaned_test_functions.jsonl/12325
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 133 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 29584, 3180, 368, 341, 262, 1077, 5546, 284, 13972, 486, 931, 7, 15, 317, 262, 341, 414, 1077, 24902, 284, 50554, 93937, 486, 2258, 543, 414, 369, 716, 304, 220, 15, 496, 16, 15, 15, 341, 286, 24902, 78224, 5432, 887, 14099, 314, 5546, 25, 609, 8292, 1625, 414, 456, 414, 2060, 10714, 10297, 8292, 670, 1507, 220, 15, 317, 262, 456, 262, 2060, 10714, 10297, 8292, 670, 1507, 220, 16, 15, 15, 317, 220, 335 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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
#[test] fn test_query_string() { let base = test_base(); let id = test_id(); let schema = test_schema(); let logger = test_logger(); let fork = SubgraphFork::new(base, id, schema, logger).unwrap(); let query = Query { query: fork.query_string("Gravatar", &test_fields()).unwrap(), variables: Variables { id: "0x00".to_string(), }, }; assert_eq!( query, Query { query: r#"query Query ($id: String) { gravatar(id: $id, subgraphError: allow) { id owner displayName imageUrl } }"# .to_string(), variables: Variables { id: "0x00".to_string() }, } ); }
rust_cleaned_test_functions.jsonl/8654
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 450 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 5738, 3904, 368, 341, 286, 1077, 2331, 284, 1273, 7651, 543, 286, 1077, 877, 284, 1273, 842, 543, 286, 1077, 10802, 284, 1273, 25371, 543, 286, 1077, 5925, 284, 1273, 27413, 1428, 286, 1077, 22435, 284, 3719, 4439, 37, 669, 486, 931, 12663, 11, 877, 11, 10802, 11, 5925, 568, 15454, 1428, 286, 1077, 3239, 284, 11361, 341, 310, 3239, 25, 22435, 4786, 3904, 445, 6464, 11962, 497, 609, 1944, 12132, 6011, 15454, 3148, 310, 7332, 25, 21419, 341, 394, 877, 25, 330, 15, 87, 15, 15, 3263, 983, 3904, 3148, 310, 1153, 286, 2605, 286, 2060, 10714, 33673, 310, 3239, 345, 310, 11361, 341, 394, 3239, 25, 435, 55543, 1631, 11361, 1711, 307, 25, 923, 8, 341, 262, 1081, 11962, 3724, 25, 400, 307, 11, 1186, 4439, 1454, 25, 2138, 8, 341, 286, 877, 6372, 34770, 39649, 198, 262, 456, 9863, 4956, 394, 659, 983, 3904, 3148, 394, 7332, 25, 21419, 341, 503, 877, 25, 330, 15, 87, 15, 15, 3263, 983, 3904, 741, 394, 1153, 310, 456, 286, 1439, 262, 335 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
1
#[test] fn test_analyze_call_multiple_object_arguments() { let b = ast::BaseNode::default(); let pkg = ast::Package { base: b.clone(), path: "path".to_string(), package: "main".to_string(), files: vec![ast::File { base: b.clone(), name: "foo.flux".to_string(), package: None, imports: Vec::new(), body: vec![ast::Statement::Expr(ast::ExprStmt { base: b.clone(), expression: ast::Expression::Call(Box::new(ast::CallExpr { base: b.clone(), callee: ast::Expression::Identifier(ast::Identifier { base: b.clone(), name: "f".to_string(), }), arguments: vec![ ast::Expression::Object(Box::new(ast::ObjectExpr { base: b.clone(), with: None, properties: vec![ast::Property { base: b.clone(), key: ast::PropertyKey::Identifier(ast::Identifier { base: b.clone(), name: "a".to_string(), }), value: Some(ast::Expression::Integer(ast::IntegerLit { base: b.clone(), value: 0, })), }], })), ast::Expression::Object(Box::new(ast::ObjectExpr { base: b.clone(), with: None, properties: vec![ast::Property { base: b.clone(), key: ast::PropertyKey::Identifier(ast::Identifier { base: b.clone(), name: "b".to_string(), }), value: Some(ast::Expression::Integer(ast::IntegerLit { base: b.clone(), value: 1, })), }], })), ], })), })], }], }; let got = test_analyze(pkg).err().unwrap().to_string(); assert_eq!( "arguments are more than one object expression".to_string(), got ); }
rust_cleaned_test_functions.jsonl/61565
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 1973 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 12008, 55856, 13429, 45233, 5314, 43433, 368, 341, 286, 1077, 293, 284, 11763, 486, 3978, 1955, 486, 2258, 543, 286, 1077, 24793, 284, 11763, 486, 13100, 341, 310, 2331, 25, 293, 15997, 3148, 310, 1815, 25, 330, 2343, 3263, 983, 3904, 3148, 310, 6328, 25, 330, 3817, 3263, 983, 3904, 3148, 310, 3542, 25, 7486, 20703, 559, 486, 1703, 341, 394, 2331, 25, 293, 15997, 3148, 394, 829, 25, 330, 7975, 8103, 2200, 3263, 983, 3904, 3148, 394, 6328, 25, 2240, 345, 394, 15202, 25, 11312, 486, 931, 3148, 394, 2487, 25, 7486, 20703, 559, 486, 8636, 486, 16041, 52574, 486, 16041, 31063, 341, 503, 2331, 25, 293, 15997, 3148, 503, 7493, 25, 11763, 486, 9595, 486, 7220, 67758, 486, 931, 52574, 486, 7220, 16041, 341, 664, 2331, 25, 293, 15997, 3148, 664, 94800, 25, 11763, 486, 9595, 486, 8714, 52574, 486, 8714, 341, 999, 2331, 25, 293, 15997, 3148, 999, 829, 25, 330, 69, 3263, 983, 3904, 3148, 664, 11973, 664, 5977, 25, 7486, 90515, 999, 11763, 486, 9595, 486, 1190, 67758, 486, 931, 52574, 486, 1190, 16041, 341, 1383, 2331, 25, 293, 15997, 3148, 1383, 448, 25, 2240, 345, 1383, 5888, 25, 7486, 20703, 559, 486, 3052, 341, 1920, 2331, 25, 293, 15997, 3148, 1920, 1376, 25, 11763, 486, 3052, 1592, 486, 8714, 52574, 486, 8714, 341, 2559, 2331, 25, 293, 15997, 3148, 2559, 829, 25, 330, 64, 3263, 983, 3904, 3148, 1920, 11973, 1920, 897, 25, 4329, 52574, 486, 9595, 486, 3486, 52574, 486, 3486, 68954, 341, 2559, 2331, 25, 293, 15997, 3148, 2559, 897, 25, 220, 15, 345, 1920, 78384, 1383, 29043, 999, 78384, 999, 11763, 486, 9595, 486, 1190, 67758, 486, 931, 52574, 486, 1190, 16041, 341, 1383, 2331, 25, 293, 15997, 3148, 1383, 448, 25, 2240, 345, 1383, 5888, 25, 7486, 20703, 559, 486, 3052, 341, 1920, 2331, 25, 293, 15997, 3148, 1920, 1376, 25, 11763, 486, 3052, 1592, 486, 8714, 52574, 486, 8714, 341, 2559, 2331, 25, 293, 15997, 3148, 2559, 829, 25, 330, 65, 3263, 983, 3904, 3148, 1920, 11973, 1920, 897, 25, 4329, 52574, 486, 9595, 486, 3486, 52574, 486, 3486, 68954, 341, 2559, 2331, 25, 293, 15997, 3148, 2559, 897, 25, 220, 16, 345, 1920, 78384, 1383, 29043, 999, 78384, 664, 3211, 503, 78384, 394, 6413, 1259, 310, 29043, 286, 2605, 286, 1077, 2684, 284, 1273, 12008, 55856, 68780, 568, 615, 1005, 15454, 1005, 983, 3904, 543, 286, 2060, 10714, 33673, 310, 330, 16370, 525, 803, 1091, 825, 1633, 7493, 3263, 983, 3904, 3148, 310, 2684, 198, 286, 1439, 262, 335 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
1
#[test] fn test_extract_with_cm() { let cms = create_test_cm_map(vec![("meta/foo.cm".to_string(), vec![])]); let pkg = create_test_package_with_cms(String::from("fuchsia-pkg://fuchsia.com/foo"), cms); let served = vec![pkg]; let services = HashMap::new(); let package_getter: Box<dyn PackageGetter> = Box::new(MockPackageGetter::new()); let response = PackageDataCollector::extract(&package_getter, served, services).unwrap(); assert_eq!(1, response.components.len()); assert_eq!(response.components["fuchsia-pkg://fuchsia.com/foo#meta/foo.cm"].version, 2); assert_eq!(1, response.manifests.len()); assert_eq!(0, response.routes.len()); assert_eq!(1, response.packages.len()); assert_eq!(None, response.zbi); }
rust_cleaned_test_functions.jsonl/19462
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 359 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 39123, 6615, 43619, 368, 341, 286, 1077, 26270, 284, 1855, 4452, 43619, 5376, 25592, 20703, 445, 5490, 60555, 53046, 3263, 983, 3904, 1507, 7486, 0, 15793, 2558, 286, 1077, 24793, 284, 1855, 4452, 26328, 6615, 666, 1011, 2242, 486, 1499, 445, 69, 73391, 2268, 7351, 1110, 69, 73391, 905, 60555, 3975, 26270, 317, 286, 1077, 10223, 284, 7486, 20703, 30069, 4821, 286, 1077, 3516, 284, 10528, 486, 931, 1428, 286, 1077, 6328, 3062, 465, 25, 8261, 92846, 16906, 31485, 29, 284, 8261, 486, 931, 66436, 13100, 31485, 486, 931, 1423, 286, 1077, 2033, 284, 16906, 1043, 53694, 486, 23493, 2099, 1722, 3062, 465, 11, 10223, 11, 3516, 568, 15454, 1428, 286, 2060, 10714, 10297, 16, 11, 2033, 20040, 19406, 1423, 286, 2060, 10714, 10297, 2322, 20040, 1183, 69, 73391, 2268, 7351, 1110, 69, 73391, 905, 60555, 2, 5490, 60555, 53046, 5521, 4366, 11, 220, 17, 317, 286, 2060, 10714, 10297, 16, 11, 2033, 21021, 6962, 82, 19406, 1423, 286, 2060, 10714, 10297, 15, 11, 2033, 39306, 19406, 1423, 286, 2060, 10714, 10297, 16, 11, 2033, 20807, 1134, 19406, 1423, 286, 2060, 10714, 10297, 4064, 11, 2033, 3938, 8221, 317, 262, 335 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
1
#[test] fn test_from_iterator() { let s = "ศไทย中华Việt Nam".to_string(); let t = "ศไทย中华"; let u = "Việt Nam"; let a: String = s.chars().collect(); assert_eq!(s, a); let mut b = t.to_string(); b.extend(u.chars()); assert_eq!(s, b); let c: String = vec![t, u].into_iter().collect(); assert_eq!(s, c); let mut d = t.to_string(); d.extend(vec![u]); assert_eq!(s, d); }
rust_cleaned_test_functions.jsonl/3181
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 232 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 5673, 13491, 368, 341, 262, 1077, 274, 284, 330, 123863, 125451, 100849, 35544, 124382, 29974, 3263, 983, 3904, 543, 262, 1077, 259, 284, 330, 123863, 125451, 100849, 876, 262, 1077, 575, 284, 330, 35544, 124382, 29974, 3302, 262, 1077, 264, 25, 923, 284, 274, 85062, 1005, 17384, 543, 262, 2060, 10714, 10297, 82, 11, 264, 626, 262, 1077, 5206, 293, 284, 259, 2389, 3904, 543, 262, 293, 15831, 8154, 85062, 1423, 262, 2060, 10714, 10297, 82, 11, 293, 626, 262, 1077, 272, 25, 923, 284, 7486, 20703, 83, 11, 575, 936, 18122, 11723, 1005, 17384, 543, 262, 2060, 10714, 10297, 82, 11, 272, 626, 262, 1077, 5206, 294, 284, 259, 2389, 3904, 543, 262, 294, 15831, 25592, 20703, 84, 2558, 262, 2060, 10714, 10297, 82, 11, 294, 317, 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
#[test] fn test_fixed_retry_strategy_error() { let mut collection = vec![1, 2, 3, 4, 5].into_iter(); let result = retry(fixed_retry_strategy(0, 3), || match collection.next() { Some(n) if n == 5 => Ok(n), Some(_) => Err("not 5"), None => Err("not 5"), }); assert_eq!(result, Err("not 5")); }
rust_cleaned_test_functions.jsonl/46313
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 187 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 37839, 62745, 49308, 4096, 368, 341, 286, 1077, 5206, 4426, 284, 7486, 20703, 16, 11, 220, 17, 11, 220, 18, 11, 220, 19, 11, 220, 20, 936, 18122, 11723, 543, 286, 1077, 1102, 284, 22683, 955, 3286, 62745, 49308, 7, 15, 11, 220, 18, 701, 1369, 2432, 4426, 4529, 368, 341, 310, 4329, 1445, 8, 421, 308, 621, 220, 20, 589, 7622, 1445, 1326, 310, 4329, 48139, 589, 15495, 445, 1921, 220, 20, 4461, 310, 2240, 589, 15495, 445, 1921, 220, 20, 4461, 286, 1625, 286, 2060, 10714, 10297, 1382, 11, 15495, 445, 1921, 220, 20, 4010, 262, 335 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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
#[test] fn test_document() { let b = Document::new() .add_paragraph(Paragraph::new().add_run(Run::new().add_text("Hello"))) .build(); assert_eq!( str::from_utf8(&b).unwrap(), r#"<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <w:document xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml" mc:Ignorable="w14 wp14"> <w:body><w:p w14:paraId="12345678"><w:pPr><w:rPr /></w:pPr><w:r><w:rPr /><w:t xml:space="preserve">Hello</w:t></w:r></w:p><w:sectPr><w:pgSz w:w="11906" w:h="16838" /><w:pgMar w:top="1985" w:right="1701" w:bottom="1701" w:left="1701" w:header="851" w:footer="992" w:gutter="0" /><w:cols w:space="425" /><w:docGrid w:type="lines" w:linePitch="360" /></w:sectPr></w:body> </w:document>"# ); }
rust_cleaned_test_functions.jsonl/86307
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 677 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 26231, 368, 341, 286, 1077, 293, 284, 11789, 486, 931, 741, 310, 659, 718, 96713, 7, 42165, 486, 931, 1005, 718, 14007, 2785, 359, 486, 931, 1005, 718, 4326, 445, 9707, 29836, 310, 659, 5834, 543, 286, 2060, 10714, 33673, 310, 607, 486, 1499, 39453, 23, 2099, 65, 568, 15454, 3148, 310, 435, 55543, 1316, 6455, 2319, 428, 16, 13, 15, 1, 11170, 428, 8561, 12, 23, 1, 43388, 428, 9693, 85990, 15889, 25, 6062, 24967, 93557, 428, 399, 14495, 31126, 1448, 3929, 11476, 25, 26516, 25, 26516, 1, 24967, 67359, 428, 1254, 1110, 56543, 5826, 6455, 63482, 2659, 14, 26516, 7524, 14, 17, 15, 15, 21, 14, 85824, 1, 24967, 52649, 428, 399, 14495, 31126, 1448, 3929, 11476, 52649, 1014, 1, 24967, 52882, 428, 1254, 1110, 56543, 5826, 6455, 63482, 2659, 14, 1158, 20660, 1014, 14, 17, 15, 15, 21, 15351, 1, 24967, 52882, 16, 15, 428, 399, 14495, 31126, 1448, 3929, 11476, 25, 26516, 25, 1158, 1, 24967, 25, 8421, 428, 1254, 1110, 56543, 5826, 6455, 63482, 2659, 3446, 1696, 1014, 14, 17, 15, 15, 21, 14, 1158, 20660, 37437, 1, 24967, 52882, 1690, 428, 1254, 1110, 56543, 27619, 905, 14, 26516, 14, 1158, 14, 17, 15, 16, 15, 14, 1158, 20660, 12301, 1, 24967, 52882, 3517, 428, 1254, 1110, 56543, 27619, 905, 14, 26516, 14, 1158, 14, 17, 15, 16, 15, 14, 1158, 20660, 2808, 1, 24967, 25, 12887, 428, 1254, 1110, 56543, 5826, 6455, 63482, 2659, 73598, 454, 11476, 53053, 14, 17, 15, 15, 21, 1, 24967, 25, 8421, 16, 19, 428, 1254, 1110, 56543, 27619, 905, 14, 26516, 14, 1158, 14, 17, 15, 16, 15, 14, 1158, 20660, 37437, 1, 24967, 52882, 16, 19, 428, 1254, 1110, 56543, 27619, 905, 14, 26516, 14, 1158, 14, 17, 15, 16, 15, 14, 1158, 1014, 1, 24967, 52882, 16, 20, 428, 1254, 1110, 56543, 27619, 905, 14, 26516, 14, 1158, 14, 17, 15, 16, 17, 14, 1158, 1014, 1, 19223, 25, 43337, 24715, 428, 86, 16, 19, 12609, 16, 19, 881, 220, 366, 86, 25, 2599, 1784, 86, 44389, 289, 16, 19, 25, 14794, 764, 428, 16, 17, 18, 19, 20, 21, 22, 23, 3088, 86, 44389, 3533, 1784, 86, 67359, 3533, 17341, 86, 44389, 3533, 1784, 86, 67359, 1784, 86, 67359, 3533, 23976, 86, 60777, 8396, 25, 8746, 428, 92882, 755, 9707, 522, 86, 60777, 1472, 86, 67359, 1472, 86, 44389, 1784, 86, 25, 9687, 3533, 1784, 86, 25, 3517, 89837, 289, 52882, 428, 16, 16, 24, 15, 21, 1, 289, 69651, 428, 16, 21, 23, 18, 23, 1, 23976, 86, 25, 3517, 12061, 289, 25, 3481, 428, 16, 24, 23, 20, 1, 289, 42352, 428, 16, 22, 15, 16, 1, 289, 25, 14860, 428, 16, 22, 15, 16, 1, 289, 34810, 428, 16, 22, 15, 16, 1, 289, 25, 2708, 428, 23, 20, 16, 1, 289, 25, 6956, 428, 24, 24, 17, 1, 289, 70418, 6207, 428, 15, 1, 23976, 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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
#[test] fn test_lookup_google() { use super::testing::lookup_test; let io_loop = Runtime::new().expect("failed to create tokio runtime"); let handle = io_loop.handle().clone(); lookup_test::<Runtime, TokioRuntime>(ResolverConfig::google(), io_loop, handle) }
rust_cleaned_test_functions.jsonl/121528
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 121 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 27464, 47155, 368, 341, 286, 990, 2256, 486, 8840, 486, 21020, 4452, 280, 286, 1077, 6399, 17198, 284, 10954, 486, 931, 1005, 17119, 445, 16091, 311, 1855, 9628, 815, 15592, 797, 286, 1077, 3705, 284, 6399, 17198, 10132, 1005, 19982, 543, 286, 18615, 4452, 27638, 15123, 11, 21447, 815, 15123, 2235, 18190, 2648, 486, 17485, 1507, 6399, 17198, 11, 3705, 340, 262, 335 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
1
#[test] fn test_withdraw_stake() { let recipient_address = solana_sdk::pubkey::new_rand(); let authority_address = solana_sdk::pubkey::new_rand(); let custodian_address = solana_sdk::pubkey::new_rand(); let stake_address = solana_sdk::pubkey::new_rand(); let minimum_delegation = crate::get_minimum_delegation(&FeatureSet::all_enabled()); let stake_lamports = minimum_delegation; let stake_account = AccountSharedData::new_data_with_space( stake_lamports, &StakeState::Uninitialized, StakeState::size_of(), &id(), ) .unwrap(); let vote_address = solana_sdk::pubkey::new_rand(); let mut vote_account = vote_state::create_account(&vote_address, &solana_sdk::pubkey::new_rand(), 0, 100); vote_account .set_state(&VoteStateVersions::new_current(VoteState::default())) .unwrap(); let mut transaction_accounts = vec![ (stake_address, stake_account), (vote_address, vote_account), (recipient_address, AccountSharedData::default()), ( authority_address, AccountSharedData::new(42, 0, &system_program::id()), ), (custodian_address, AccountSharedData::default()), ( sysvar::clock::id(), account::create_account_shared_data_for_test(&Clock::default()), ), ( sysvar::rent::id(), account::create_account_shared_data_for_test(&Rent::free()), ), ( sysvar::stake_history::id(), account::create_account_shared_data_for_test(&StakeHistory::default()), ), ( stake_config::id(), config::create_account(0, &stake_config::Config::default()), ), ]; let mut instruction_accounts = vec![ AccountMeta { pubkey: stake_address, is_signer: false, is_writable: false, }, AccountMeta { pubkey: recipient_address, is_signer: false, is_writable: false, }, AccountMeta { pubkey: sysvar::clock::id(), is_signer: false, is_writable: false, }, AccountMeta { pubkey: sysvar::stake_history::id(), is_signer: false, is_writable: false, }, AccountMeta { pubkey: stake_address, is_signer: true, is_writable: false, }, ]; instruction_accounts[4].is_signer = false; process_instruction( &serialize(&StakeInstruction::Withdraw(stake_lamports)).unwrap(), transaction_accounts.clone(), instruction_accounts.clone(), Err(InstructionError::MissingRequiredSignature), ); instruction_accounts[4].is_signer = true; let accounts = process_instruction( &serialize(&StakeInstruction::Withdraw(stake_lamports)).unwrap(), transaction_accounts.clone(), instruction_accounts.clone(), Ok(()), ); assert_eq!(accounts[0].lamports(), 0); assert_eq!(from(&accounts[0]).unwrap(), StakeState::Uninitialized); // initialize stake let lockup = Lockup { unix_timestamp: 0, epoch: 0, custodian: custodian_address, }; let accounts = process_instruction( &serialize(&StakeInstruction::Initialize( Authorized::auto(&stake_address), lockup, )) .unwrap(), transaction_accounts.clone(), vec![ AccountMeta { pubkey: stake_address, is_signer: true, is_writable: false, }, AccountMeta { pubkey: sysvar::rent::id(), is_signer: false, is_writable: false, }, ], Ok(()), ); transaction_accounts[0] = (stake_address, accounts[0].clone()); process_instruction( &serialize(&StakeInstruction::Withdraw(stake_lamports + 1)).unwrap(), transaction_accounts.clone(), instruction_accounts.clone(), Err(InstructionError::InsufficientFunds), ); let accounts = process_instruction( &serialize(&StakeInstruction::DelegateStake).unwrap(), transaction_accounts.clone(), vec![ AccountMeta { pubkey: stake_address, is_signer: true, is_writable: false, }, AccountMeta { pubkey: vote_address, is_signer: false, is_writable: false, }, AccountMeta { pubkey: sysvar::clock::id(), is_signer: false, is_writable: false, }, AccountMeta { pubkey: sysvar::stake_history::id(), is_signer: false, is_writable: false, }, AccountMeta { pubkey: stake_config::id(), is_signer: false, is_writable: false, }, ], Ok(()), ); transaction_accounts[0] = (stake_address, accounts[0].clone()); // simulate rewards transaction_accounts[0].1.checked_add_lamports(10).unwrap(); // withdrawal before deactivate works for rewards amount process_instruction( &serialize(&StakeInstruction::Withdraw(10)).unwrap(), transaction_accounts.clone(), instruction_accounts.clone(), Ok(()), ); // withdrawal of rewards fails if not in excess of stake process_instruction( &serialize(&StakeInstruction::Withdraw(11)).unwrap(), transaction_accounts.clone(), instruction_accounts.clone(), Err(InstructionError::InsufficientFunds), ); // deactivate the stake before withdrawal let accounts = process_instruction( &serialize(&StakeInstruction::Deactivate).unwrap(), transaction_accounts.clone(), vec![ AccountMeta { pubkey: stake_address, is_signer: true, is_writable: false, }, AccountMeta { pubkey: sysvar::clock::id(), is_signer: false, is_writable: false, }, ], Ok(()), ); transaction_accounts[0] = (stake_address, accounts[0].clone()); // simulate time passing let clock = Clock { epoch: 100, ..Clock::default() }; transaction_accounts[5] = ( sysvar::clock::id(), account::create_account_shared_data_for_test(&clock), ); // Try to withdraw more than what's available process_instruction( &serialize(&StakeInstruction::Withdraw(stake_lamports + 11)).unwrap(), transaction_accounts.clone(), instruction_accounts.clone(), Err(InstructionError::InsufficientFunds), ); // Try to withdraw all lamports let accounts = process_instruction( &serialize(&StakeInstruction::Withdraw(stake_lamports + 10)).unwrap(), transaction_accounts.clone(), instruction_accounts.clone(), Ok(()), ); assert_eq!(accounts[0].lamports(), 0); assert_eq!(from(&accounts[0]).unwrap(), StakeState::Uninitialized); // overflow let rent = Rent::default(); let rent_exempt_reserve = rent.minimum_balance(StakeState::size_of()); let stake_account = AccountSharedData::new_data_with_space( 1_000_000_000, &StakeState::Initialized(Meta { rent_exempt_reserve, authorized: Authorized { staker: authority_address, withdrawer: authority_address, }, lockup: Lockup::default(), }), StakeState::size_of(), &id(), ) .unwrap(); transaction_accounts[0] = (stake_address, stake_account.clone()); transaction_accounts[2] = (recipient_address, stake_account); instruction_accounts[4].pubkey = authority_address; process_instruction( &serialize(&StakeInstruction::Withdraw(u64::MAX - 10)).unwrap(), transaction_accounts.clone(), instruction_accounts.clone(), Err(InstructionError::InsufficientFunds), ); let stake_account = AccountSharedData::new_data_with_space( stake_lamports, &StakeState::RewardsPool, StakeState::size_of(), &id(), ) .unwrap(); transaction_accounts[0] = (stake_address, stake_account); process_instruction( &serialize(&StakeInstruction::Withdraw(stake_lamports)).unwrap(), transaction_accounts, instruction_accounts, Err(InstructionError::InvalidAccountData), ); }
rust_cleaned_test_functions.jsonl/31642
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 5206 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 6615, 7633, 1261, 726, 368, 341, 286, 1077, 21713, 6744, 284, 2048, 3362, 61783, 486, 9585, 792, 486, 931, 33864, 543, 286, 1077, 11198, 6744, 284, 2048, 3362, 61783, 486, 9585, 792, 486, 931, 33864, 543, 286, 1077, 16564, 63849, 6744, 284, 2048, 3362, 61783, 486, 9585, 792, 486, 931, 33864, 543, 286, 1077, 18279, 6744, 284, 2048, 3362, 61783, 486, 9585, 792, 486, 931, 33864, 543, 286, 1077, 8028, 2259, 87566, 284, 17717, 486, 455, 84855, 2259, 87566, 2099, 13859, 1649, 486, 541, 18220, 1423, 286, 1077, 18279, 907, 309, 3394, 284, 8028, 2259, 87566, 280, 286, 1077, 18279, 13500, 284, 8615, 16997, 1043, 486, 931, 1769, 6615, 14663, 1006, 310, 18279, 907, 309, 3394, 345, 310, 609, 623, 726, 1397, 486, 1806, 36161, 345, 310, 98246, 1397, 486, 2141, 3575, 3148, 310, 609, 307, 3148, 286, 1727, 286, 659, 15454, 543, 286, 1077, 6910, 6744, 284, 2048, 3362, 61783, 486, 9585, 792, 486, 931, 33864, 543, 286, 1077, 5206, 6910, 13500, 4035, 310, 6910, 4387, 486, 3182, 13500, 2099, 29358, 6744, 11, 609, 38198, 3362, 61783, 486, 9585, 792, 486, 931, 33864, 1507, 220, 15, 11, 220, 16, 15, 15, 317, 286, 6910, 13500, 198, 310, 659, 746, 4387, 2099, 41412, 1397, 69015, 486, 931, 11080, 12410, 1272, 1397, 486, 2258, 12145, 310, 659, 15454, 543, 286, 1077, 5206, 7745, 55665, 284, 7486, 90515, 310, 320, 267, 726, 6744, 11, 18279, 13500, 1326, 310, 320, 29358, 6744, 11, 6910, 13500, 1326, 310, 320, 42610, 6744, 11, 8615, 16997, 1043, 486, 2258, 14702, 310, 2399, 394, 11198, 6744, 345, 394, 8615, 16997, 1043, 486, 931, 7, 19, 17, 11, 220, 15, 11, 609, 8948, 25096, 486, 307, 14702, 310, 2837, 310, 320, 44414, 63849, 6744, 11, 8615, 16997, 1043, 486, 2258, 14702, 310, 2399, 394, 5708, 947, 486, 20666, 486, 307, 3148, 394, 2692, 486, 3182, 13500, 20405, 1769, 5478, 4452, 2099, 26104, 486, 2258, 14702, 310, 2837, 310, 2399, 394, 5708, 947, 486, 7976, 486, 307, 3148, 394, 2692, 486, 3182, 13500, 20405, 1769, 5478, 4452, 2099, 67740, 486, 10593, 14702, 310, 2837, 310, 2399, 394, 5708, 947, 486, 267, 726, 19802, 486, 307, 3148, 394, 2692, 486, 3182, 13500, 20405, 1769, 5478, 4452, 2099, 623, 726, 13424, 486, 2258, 14702, 310, 2837, 310, 2399, 394, 18279, 5332, 486, 307, 3148, 394, 2193, 486, 3182, 13500, 7, 15, 11, 609, 267, 726, 5332, 486, 2648, 486, 2258, 14702, 310, 2837, 286, 9747, 286, 1077, 5206, 7600, 55665, 284, 7486, 90515, 310, 8615, 12175, 341, 394, 95116, 25, 18279, 6744, 345, 394, 374, 11172, 261, 25, 895, 345, 394, 374, 1670, 22533, 25, 895, 345, 310, 1153, 310, 8615, 12175, 341, 394, 95116, 25, 21713, 6744, 345, 394, 374, 11172, 261, 25, 895, 345, 394, 374, 1670, 22533, 25, 895, 345, 310, 1153, 310, 8615, 12175, 341, 394, 95116, 25, 5708, 947, 486, 20666, 486, 307, 3148, 394, 374, 11172, 261, 25, 895, 345, 394, 374, 1670, 22533, 25, 895, 345, 310, 1153, 310, 8615, 12175, 341, 394, 95116, 25, 5708, 947, 486, 267, 726, 19802, 486, 307, 3148, 394, 374, 11172, 261, 25, 895, 345, 394, 374, 1670, 22533, 25, 895, 345, 310, 1153, 310, 8615, 12175, 341, 394, 95116, 25, 18279, 6744, 345, 394, 374, 11172, 261, 25, 830, 345, 394, 374, 1670, 22533, 25, 895, 345, 310, 1153, 286, 15424, 1789, 286, 7600, 55665, 58, 19, 936, 285, 11172, 261, 284, 895, 280, 286, 1882, 54923, 1006, 310, 609, 24166, 2099, 623, 726, 16664, 486, 92261, 5895, 726, 907, 309, 3394, 4579, 15454, 3148, 310, 7745, 55665, 15997, 3148, 310, 7600, 55665, 15997, 3148, 310, 15495, 7, 16664, 1454, 486, 25080, 8164, 25088, 1326, 286, 1439, 286, 7600, 55665, 58, 19, 936, 285, 11172, 261, 284, 830, 401, 1789, 286, 1077, 9618, 284, 1882, 54923, 1006, 310, 609, 24166, 2099, 623, 726, 16664, 486, 92261, 5895, 726, 907, 309, 3394, 4579, 15454, 3148, 310, 7745, 55665, 15997, 3148, 310, 7600, 55665, 15997, 3148, 310, 7622, 5065, 1326, 286, 1439, 286, 2060, 10714, 10297, 26206, 58, 15, 936, 23771, 3394, 1507, 220, 15, 317, 286, 2060, 10714, 10297, 1499, 2099, 26206, 58, 15, 10697, 15454, 1507, 98246, 1397, 486, 1806, 36161, 626, 286, 442, 9468, 18279, 198, 286, 1077, 5296, 454, 284, 15701, 454, 341, 310, 51866, 23073, 25, 220, 15, 345, 310, 16342, 25, 220, 15, 345, 310, 16564, 63849, 25, 16564, 63849, 6744, 345, 286, 2605, 286, 1077, 9618, 284, 1882, 54923, 1006, 310, 609, 24166, 2099, 623, 726, 16664, 486, 9928, 1006, 394, 90569, 486, 3902, 2099, 267, 726, 6744, 1326, 394, 5296, 454, 345, 310, 19245, 310, 659, 15454, 3148, 310, 7745, 55665, 15997, 3148, 310, 7486, 90515, 394, 8615, 12175, 341, 503, 95116, 25, 18279, 6744, 345, 503, 374, 11172, 261, 25, 830, 345, 503, 374, 1670, 22533, 25, 895, 345, 394, 1153, 394, 8615, 12175, 341, 503, 95116, 25, 5708, 947, 486, 7976, 486, 307, 3148, 503, 374, 11172, 261, 25, 895, 345, 503, 374, 1670, 22533, 25, 895, 345, 394, 1153, 310, 3211, 310, 7622, 5065, 1326, 286, 1439, 286, 7745, 55665, 58, 15, 60, 284, 320, 267, 726, 6744, 11, 9618, 58, 15, 936, 19982, 5231, 1789, 286, 1882, 54923, 1006, 310, 609, 24166, 2099, 623, 726, 16664, 486, 92261, 5895, 726, 907, 309, 3394, 488, 220, 16, 4579, 15454, 3148, 310, 7745, 55665, 15997, 3148, 310, 7600, 55665, 15997, 3148, 310, 15495, 7, 16664, 1454, 486, 15474, 26683, 37, 42950, 1326, 286, 3475, 1789, 286, 1077, 9618, 284, 1882, 54923, 1006, 310, 609, 24166, 2099, 623, 726, 16664, 486, 9381, 623, 726, 568, 15454, 3148, 310, 7745, 55665, 15997, 3148, 310, 7486, 90515, 394, 8615, 12175, 341, 503, 95116, 25, 18279, 6744, 345, 503, 374, 11172, 261, 25, 830, 345, 503, 374, 1670, 22533, 25, 895, 345, 394, 1153, 394, 8615, 12175, 341, 503, 95116, 25, 6910, 6744, 345, 503, 374, 11172, 261, 25, 895, 345, 503, 374, 1670, 22533, 25, 895, 345, 394, 1153, 394, 8615, 12175, 341, 503, 95116, 25, 5708, 947, 486, 20666, 486, 307, 3148, 503, 374, 11172, 261, 25, 895, 345, 503, 374, 1670, 22533, 25, 895, 345, 394, 1153, 394, 8615, 12175, 341, 503, 95116, 25, 5708, 947, 486, 267, 726, 19802, 486, 307, 3148, 503, 374, 11172, 261, 25, 895, 345, 503, 374, 1670, 22533, 25, 895, 345, 394, 1153, 394, 8615, 12175, 341, 503, 95116, 25, 18279, 5332, 486, 307, 3148, 503, 374, 11172, 261, 25, 895, 345, 503, 374, 1670, 22533, 25, 895, 345, 394, 1153, 310, 3211, 310, 7622, 5065, 1326, 286, 1439, 286, 7745, 55665, 58, 15, 60, 284, 320, 267, 726, 6744, 11, 9618, 58, 15, 936, 19982, 5231, 286, 442, 37453, 21160, 198, 286, 7745, 55665, 58, 15, 936, 16, 29101, 2891, 907, 309, 3394, 7, 16, 15, 568, 15454, 1428, 286, 442, 29736, 1573, 66245, 4278, 369, 21160, 3311, 198, 286, 1882, 54923, 1006, 310, 609, 24166, 2099, 623, 726, 16664, 486, 92261, 7, 16, 15, 4579, 15454, 3148, 310, 7745, 55665, 15997, 3148, 310, 7600, 55665, 15997, 3148, 310, 7622, 5065, 1326, 286, 3475, 286, 442, 29736, 315, 21160, 14525, 421, 537, 304, 13623, 315, 18279, 198, 286, 1882, 54923, 1006, 310, 609, 24166, 2099, 623, 726, 16664, 486, 92261, 7, 16, 16, 4579, 15454, 3148, 310, 7745, 55665, 15997, 3148, 310, 7600, 55665, 15997, 3148, 310, 15495, 7, 16664, 1454, 486, 15474, 26683, 37, 42950, 1326, 286, 3475, 286, 442, 66245, 279, 18279, 1573, 29736, 198, 286, 1077, 9618, 284, 1882, 54923, 1006, 310, 609, 24166, 2099, 623, 726, 16664, 486, 1912, 16856, 568, 15454, 3148, 310, 7745, 55665, 15997, 3148, 310, 7486, 90515, 394, 8615, 12175, 341, 503, 95116, 25, 18279, 6744, 345, 503, 374, 11172, 261, 25, 830, 345, 503, 374, 1670, 22533, 25, 895, 345, 394, 1153, 394, 8615, 12175, 341, 503, 95116, 25, 5708, 947, 486, 20666, 486, 307, 3148, 503, 374, 11172, 261, 25, 895, 345, 503, 374, 1670, 22533, 25, 895, 345, 394, 1153, 310, 3211, 310, 7622, 5065, 1326, 286, 1439, 286, 7745, 55665, 58, 15, 60, 284, 320, 267, 726, 6744, 11, 9618, 58, 15, 936, 19982, 5231, 286, 442, 37453, 882, 12299, 198, 286, 1077, 8866, 284, 26142, 341, 310, 16342, 25, 220, 16, 15, 15, 345, 310, 5241, 26104, 486, 2258, 741, 286, 2605, 286, 7745, 55665, 58, 20, 60, 284, 2399, 310, 5708, 947, 486, 20666, 486, 307, 3148, 310, 2692, 486, 3182, 13500, 20405, 1769, 5478, 4452, 2099, 20666, 1326, 286, 3475, 286, 442, 9735, 311, 14798, 803, 1091, 1128, 594, 2500, 198, 286, 1882, 54923, 1006, 310, 609, 24166, 2099, 623, 726, 16664, 486, 92261, 5895, 726, 907, 309, 3394, 488, 220, 16, 16, 4579, 15454, 3148, 310, 7745, 55665, 15997, 3148, 310, 7600, 55665, 15997, 3148, 310, 15495, 7, 16664, 1454, 486, 15474, 26683, 37, 42950, 1326, 286, 3475, 286, 442, 9735, 311, 14798, 678, 31603, 3394, 198, 286, 1077, 9618, 284, 1882, 54923, 1006, 310, 609, 24166, 2099, 623, 726, 16664, 486, 92261, 5895, 726, 907, 309, 3394, 488, 220, 16, 15, 4579, 15454, 3148, 310, 7745, 55665, 15997, 3148, 310, 7600, 55665, 15997, 3148, 310, 7622, 5065, 1326, 286, 1439, 286, 2060, 10714, 10297, 26206, 58, 15, 936, 23771, 3394, 1507, 220, 15, 317, 286, 2060, 10714, 10297, 1499, 2099, 26206, 58, 15, 10697, 15454, 1507, 98246, 1397, 486, 1806, 36161, 626, 286, 442, 16484, 198, 286, 1077, 8016, 284, 29737, 486, 2258, 543, 286, 1077, 8016, 95736, 89591, 284, 8016, 57790, 29396, 7, 623, 726, 1397, 486, 2141, 3575, 1423, 286, 1077, 18279, 13500, 284, 8615, 16997, 1043, 486, 931, 1769, 6615, 14663, 1006, 310, 220, 16, 62, 15, 15, 15, 62, 15, 15, 15, 62, 15, 15, 15, 345, 310, 609, 623, 726, 1397, 486, 22495, 3189, 1915, 341, 394, 8016, 95736, 89591, 345, 394, 18630, 25, 90569, 341, 503, 357, 4407, 25, 11198, 6744, 345, 503, 14798, 261, 25, 11198, 6744, 345, 394, 1153, 394, 5296, 454, 25, 15701, 454, 486, 2258, 3148, 310, 11973, 310, 98246, 1397, 486, 2141, 3575, 3148, 310, 609, 307, 3148, 286, 1727, 286, 659, 15454, 543, 286, 7745, 55665, 58, 15, 60, 284, 320, 267, 726, 6744, 11, 18279, 13500, 15997, 1423, 286, 7745, 55665, 58, 17, 60, 284, 320, 42610, 6744, 11, 18279, 13500, 317, 286, 7600, 55665, 58, 19, 936, 9585, 792, 284, 11198, 6744, 280, 286, 1882, 54923, 1006, 310, 609, 24166, 2099, 623, 726, 16664, 486, 92261, 8154, 21, 19, 486, 10586, 481, 220, 16, 15, 4579, 15454, 3148, 310, 7745, 55665, 15997, 3148, 310, 7600, 55665, 15997, 3148, 310, 15495, 7, 16664, 1454, 486, 15474, 26683, 37, 42950, 1326, 286, 3475, 1789, 286, 1077, 18279, 13500, 284, 8615, 16997, 1043, 486, 931, 1769, 6615, 14663, 1006, 310, 18279, 907, 309, 3394, 345, 310, 609, 623, 726, 1397, 486, 58465, 2347, 10551, 345, 310, 98246, 1397, 486, 2141, 3575, 3148, 310, 609, 307, 3148, 286, 1727, 286, 659, 15454, 543, 286, 7745, 55665, 58, 15, 60, 284, 320, 267, 726, 6744, 11, 18279, 13500, 317, 286, 1882, 54923, 1006, 310, 609, 24166, 2099, 623, 726, 16664, 486, 92261, 5895, 726, 907, 309, 3394, 4579, 15454, 3148, 310, 7745, 55665, 345, 310, 7600, 55665, 345, 310, 15495, 7, 16664, 1454, 486, 7928, 7365, 1043, 1326, 286, 1439, 262, 335 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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
#[test] fn test_day19_part2_simple2() { // only first 8 should match assert_eq!( 8, part2(&parse( "\ 0: 3 4 4 4 1: \"a\" 2: \"b\" 3: 1 | 1 1 4: 2 | 2 2 abbb abbbb abbbbb abbbbbb aabbb aabbbb aabbbbb aabbbbbb bbb aaabbb aabb abbbbbbb aabbbbbbb " )) ); }
rust_cleaned_test_functions.jsonl/84993
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 215 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 16763, 16, 24, 10495, 17, 30015, 17, 368, 341, 286, 442, 1172, 1156, 220, 23, 1265, 2432, 198, 286, 2060, 10714, 33673, 310, 220, 23, 345, 310, 949, 17, 2099, 6400, 1006, 394, 93317, 15, 25, 220, 18, 220, 19, 220, 19, 220, 19, 198, 16, 25, 7245, 64, 59, 698, 17, 25, 7245, 65, 59, 698, 18, 25, 220, 16, 760, 220, 16, 220, 16, 198, 19, 25, 220, 17, 760, 220, 17, 220, 17, 271, 370, 6066, 198, 370, 53151, 198, 370, 87609, 198, 370, 6066, 53151, 198, 88607, 6066, 198, 88607, 53151, 198, 88607, 87609, 198, 88607, 6066, 53151, 198, 53151, 198, 5305, 370, 6066, 198, 64, 12523, 198, 370, 87609, 6066, 198, 88607, 87609, 6066, 198, 698, 310, 19245, 286, 1439, 262, 335 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
1
#[test] fn test_conn_send_sync() { fn is_send<T: Send>(_: &T) {} fn is_sync<T: Sync>(_: &T) {} let c = SyncConnection::new_session().unwrap(); is_send(&c); is_sync(&c); let c = Connection::new_session().unwrap(); is_send(&c); }
rust_cleaned_test_functions.jsonl/20029
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 124 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 17241, 13565, 23008, 368, 341, 262, 5168, 374, 13565, 3125, 25, 11000, 2235, 23211, 609, 51, 8, 5613, 262, 5168, 374, 23008, 3125, 25, 28937, 2235, 23211, 609, 51, 8, 10086, 262, 1077, 272, 284, 28937, 4526, 486, 931, 12316, 1005, 15454, 543, 262, 374, 13565, 2099, 66, 317, 262, 374, 23008, 2099, 66, 626, 262, 1077, 272, 284, 11032, 486, 931, 12316, 1005, 15454, 543, 262, 374, 13565, 2099, 66, 317, 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
#[test] fn test_external() { common::setup(); struct Foo { a: &'static str, } impl Foo { fn new(a: Option<&'static str>) -> Self { Self { a: a.unwrap_or("a"), } } #[allow(dead_code)] fn b(&self) -> impl Iterator<Item = &'static str> + Clone { vec!["b"].into_iter() } fn c() -> &'static str { "c" } fn d<X>(&self, x: X) -> X { x } fn e(&self) -> Vec<u32> { vec![1, 2, 3] } #[allow(dead_code)] fn f(&self) -> impl Iterator<Item = Vec<u32>> + Clone { vec![vec![1, 2, 3], vec![4, 5, 6], vec![7]].into_iter() } fn g(&self) -> std::collections::HashMap<&'static str, &'static str> { hashmap!("hello" => "world") } fn h(&self) -> bool { true } } fn capital_foo() -> Foo { Foo::new(Some("A")) } let mut test = OsoTest::new(); let foo_class = oso::ClassBuilder::with_constructor(capital_foo) .name("Foo") .add_attribute_getter("a", |receiver: &Foo| receiver.a) .add_class_method("c", Foo::c) .add_method::<_, _, u32>("d", Foo::d) .add_method("e", Foo::e) .add_method("g", Foo::g) .add_method("h", Foo::h) .build(); test.oso.register_class(foo_class).unwrap(); test.qvar_one("new Foo().a = x", "x", "A".to_string()); test.query_err("new Foo().a() = x"); test.qvar_one("Foo.c() = x", "x", "c".to_string()); test.qvar_one("new Foo().d(1) = x", "x", 1); test.query_err("new Foo().d(\"1\") = x"); test.qvar_one("new Foo() = f and f.a = x", "x", "A".to_string()); test.qvar_one("new Foo().e() = x", "x", vec![1, 2, 3]); // test.qvar_one( test.qvar_one("new Foo().g().hello = x", "x", "world".to_string()); test.qvar_one("new Foo().h() = x", "x", true); }
rust_cleaned_test_functions.jsonl/30387
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 1113 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 47432, 368, 341, 262, 4185, 486, 15188, 1428, 262, 2036, 33428, 341, 286, 264, 25, 30136, 1978, 607, 345, 262, 555, 262, 11605, 33428, 341, 286, 5168, 501, 2877, 25, 6959, 52244, 6, 1978, 607, 9231, 1464, 10115, 341, 310, 10115, 341, 394, 264, 25, 264, 55395, 8734, 445, 64, 4461, 310, 456, 286, 555, 286, 11506, 7183, 83207, 4136, 5563, 286, 5168, 293, 2099, 721, 8, 1464, 11605, 23023, 31857, 284, 30136, 1978, 607, 29, 488, 27913, 341, 310, 7486, 0, 1183, 65, 5521, 18122, 11723, 741, 286, 555, 286, 5168, 272, 368, 1464, 30136, 1978, 607, 341, 310, 330, 66, 698, 286, 555, 286, 5168, 294, 66758, 44784, 721, 11, 856, 25, 1599, 8, 1464, 1599, 341, 310, 856, 198, 286, 555, 286, 5168, 384, 2099, 721, 8, 1464, 11312, 34837, 18, 17, 29, 341, 310, 7486, 20703, 16, 11, 220, 17, 11, 220, 18, 921, 286, 555, 286, 11506, 7183, 83207, 4136, 5563, 286, 5168, 282, 2099, 721, 8, 1464, 11605, 23023, 31857, 284, 11312, 34837, 18, 17, 2452, 488, 27913, 341, 310, 7486, 20703, 4083, 20703, 16, 11, 220, 17, 11, 220, 18, 1125, 7486, 20703, 19, 11, 220, 20, 11, 220, 21, 1125, 7486, 20703, 22, 22099, 18122, 11723, 741, 286, 555, 286, 5168, 342, 2099, 721, 8, 1464, 1460, 486, 51137, 486, 18497, 52244, 6, 1978, 607, 11, 30136, 1978, 607, 29, 341, 310, 92148, 17223, 14990, 1, 589, 330, 14615, 1138, 286, 555, 286, 5168, 305, 2099, 721, 8, 1464, 1807, 341, 310, 830, 198, 286, 456, 262, 555, 262, 5168, 6722, 761, 2624, 368, 1464, 33428, 341, 286, 33428, 486, 931, 65405, 445, 32, 5455, 262, 555, 262, 1077, 5206, 1273, 284, 506, 704, 2271, 486, 931, 1428, 262, 1077, 15229, 4790, 284, 297, 704, 486, 1957, 3297, 486, 4197, 66210, 51386, 2174, 761, 2624, 340, 286, 659, 606, 445, 40923, 1138, 286, 659, 718, 16791, 3062, 465, 445, 64, 497, 760, 37553, 25, 609, 40923, 91, 13964, 5849, 340, 1789, 286, 659, 718, 4790, 9032, 445, 66, 497, 33428, 486, 66, 340, 286, 659, 718, 9032, 27638, 6878, 8358, 575, 18, 17, 13211, 67, 497, 33428, 486, 67, 340, 286, 659, 718, 9032, 445, 68, 497, 33428, 486, 68, 340, 1789, 286, 659, 718, 9032, 445, 70, 497, 33428, 486, 70, 340, 286, 659, 718, 9032, 445, 71, 497, 33428, 486, 71, 340, 286, 659, 5834, 543, 262, 1273, 9291, 78, 9929, 4790, 71880, 4790, 568, 15454, 1428, 262, 1273, 11354, 947, 11667, 445, 931, 33428, 1005, 64, 284, 856, 497, 330, 87, 497, 330, 32, 3263, 983, 3904, 1423, 262, 1273, 4786, 9266, 445, 931, 33428, 1005, 64, 368, 284, 856, 3071, 1066, 14808, 262, 1273, 11354, 947, 11667, 445, 40923, 520, 368, 284, 856, 497, 330, 87, 497, 330, 66, 3263, 983, 3904, 1423, 262, 1273, 11354, 947, 11667, 445, 931, 33428, 1005, 67, 7, 16, 8, 284, 856, 497, 330, 87, 497, 220, 16, 317, 262, 1273, 4786, 9266, 445, 931, 33428, 1005, 67, 36014, 16, 62705, 284, 856, 797, 262, 1273, 11354, 947, 11667, 445, 931, 33428, 368, 284, 282, 323, 282, 5849, 284, 856, 497, 330, 87, 497, 330, 32, 3263, 983, 3904, 1423, 262, 1273, 11354, 947, 11667, 445, 931, 33428, 1005, 68, 368, 284, 856, 497, 330, 87, 497, 7486, 20703, 16, 11, 220, 17, 11, 220, 18, 2558, 262, 442, 1273, 11354, 947, 11667, 1006, 80719, 262, 1273, 11354, 947, 11667, 445, 931, 33428, 1005, 70, 1005, 14990, 284, 856, 497, 330, 87, 497, 330, 14615, 3263, 983, 3904, 1423, 262, 1273, 11354, 947, 11667, 445, 931, 33428, 1005, 71, 368, 284, 856, 497, 330, 87, 497, 830, 317, 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, 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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
#[test] fn test_ipv4_reassembly_not_needed() { let mut ctx = DummyCtx::<Ipv4>::default(); let mut cache = IpPacketFragmentCache::<Ipv4>::default(); // Test that we don't attempt reassembly if the packet is not // fragmented. let builder = get_ipv4_builder(); let body = [1, 2, 3, 4, 5]; let mut buffer = Buf::new(body.to_vec(), ..).encapsulate(builder).serialize_vec_outer().unwrap(); let packet = buffer.parse::<Ipv4Packet<_>>().unwrap(); assert_matches::assert_matches!( cache.process_fragment::<_, &[u8]>(&mut ctx, packet), FragmentProcessingState::NotNeeded(unfragmented) if unfragmented.body() == body ); }
rust_cleaned_test_functions.jsonl/52570
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 343 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 49378, 19, 1288, 14993, 7913, 57426, 368, 341, 286, 1077, 5206, 5635, 284, 50567, 23684, 27638, 80656, 19, 6831, 2258, 543, 286, 1077, 5206, 6500, 284, 35033, 16679, 9488, 8233, 27638, 80656, 19, 6831, 2258, 1428, 286, 442, 3393, 429, 582, 1513, 944, 4774, 312, 14993, 421, 279, 10151, 374, 537, 198, 286, 442, 86095, 382, 286, 1077, 7363, 284, 633, 49378, 19, 28532, 543, 286, 1077, 2487, 284, 508, 16, 11, 220, 17, 11, 220, 18, 11, 220, 19, 11, 220, 20, 935, 286, 1077, 5206, 4147, 4035, 310, 69013, 486, 931, 15225, 2389, 13251, 1507, 5241, 568, 954, 2625, 6334, 30750, 568, 24166, 13251, 67258, 1005, 15454, 543, 286, 1077, 10151, 284, 4147, 4632, 27638, 80656, 19, 16679, 32399, 2452, 1005, 15454, 543, 286, 2060, 38344, 486, 2207, 38344, 33673, 310, 6500, 16988, 43012, 27638, 6878, 44590, 84, 23, 25669, 2099, 6984, 5635, 11, 10151, 1326, 310, 19034, 28892, 1397, 486, 2623, 56706, 18364, 42202, 291, 8, 421, 650, 42202, 291, 5079, 368, 621, 2487, 198, 286, 1439, 262, 335 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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
#[test] fn test_circular_data() -> TestResult { let p = polar(); qeval(&p, "x = [x] and x in x"); qeval(&p, "y = {y:y} and [\"y\", y] in y"); qruntime!("x = [x, y] and y = [y, x] and x = y", StackOverflow { .. }); Ok(()) }
rust_cleaned_test_functions.jsonl/68140
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 122 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 666, 21472, 1769, 368, 1464, 3393, 2077, 341, 262, 1077, 281, 284, 24660, 543, 262, 2804, 14170, 2099, 79, 11, 330, 87, 284, 508, 87, 60, 323, 856, 304, 856, 797, 262, 2804, 14170, 2099, 79, 11, 330, 88, 284, 314, 88, 69203, 92, 323, 508, 2105, 88, 16215, 379, 60, 304, 379, 797, 262, 2804, 22255, 17223, 87, 284, 508, 87, 11, 379, 60, 323, 379, 284, 508, 88, 11, 856, 60, 323, 856, 284, 379, 497, 14284, 42124, 314, 5241, 1625, 262, 7622, 50432, 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
#[test] fn test_add_time() { let now = Instant::now(); let mut rate_limiter = UpdateCheckRateLimiter::new(); for i in 0..100 { rate_limiter.add_time(now + Duration::from_secs(i)); } assert_eq!(rate_limiter.recent_update_check_times.len(), MAX_CHECKS_IN_LONG_PERIOD); // This asserts that the recent update check times is in correct order. UpdateCheckRateLimiter::with_recent_update_check_times( rate_limiter.recent_update_check_times, ); }
rust_cleaned_test_functions.jsonl/33323
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 240 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 2891, 3009, 368, 341, 286, 1077, 1431, 284, 18058, 486, 3328, 543, 286, 1077, 5206, 4379, 907, 17700, 284, 5549, 3973, 11564, 43, 17700, 486, 931, 543, 286, 369, 600, 304, 220, 15, 496, 16, 15, 15, 341, 310, 4379, 907, 17700, 1364, 3009, 32263, 488, 21045, 486, 1499, 68718, 1956, 1106, 286, 456, 286, 2060, 10714, 10297, 7698, 907, 17700, 1327, 1168, 8882, 7200, 22353, 19406, 1507, 8334, 11780, 50, 2158, 19903, 43166, 317, 286, 442, 1096, 56776, 429, 279, 3213, 2647, 1779, 3039, 374, 304, 4396, 1973, 624, 286, 5549, 3973, 11564, 43, 17700, 486, 4197, 62361, 8882, 7200, 22353, 1006, 310, 4379, 907, 17700, 1327, 1168, 8882, 7200, 22353, 345, 286, 1439, 262, 335 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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
#[test] fn test_serialize_with_fixed_len_option_returns_correct_bytes() { let opt = ConfigOption { code: OptionCode::End, value: vec![], }; let mut bytes = Vec::new(); opt.serialize_to(&mut bytes); assert_eq!(bytes.len(), 1); assert_eq!(bytes[0], 255); }
rust_cleaned_test_functions.jsonl/93675
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 170 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 88686, 6615, 37839, 6043, 9672, 58900, 31550, 12524, 368, 341, 286, 1077, 3387, 284, 5532, 5341, 341, 310, 2038, 25, 6959, 2078, 486, 3727, 345, 310, 897, 25, 7486, 20703, 1259, 286, 2605, 286, 1077, 5206, 5820, 284, 11312, 486, 931, 543, 286, 3387, 33969, 2346, 2099, 6984, 5820, 317, 286, 2060, 10714, 10297, 9651, 19406, 1507, 220, 16, 317, 286, 2060, 10714, 10297, 9651, 58, 15, 1125, 220, 17, 20, 20, 317, 262, 335 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
1
#[test] fn test_2() { let instrs = parse(&vec![ "mask = 000000000000000000000000000000X1001X", "mem[42] = 100", "mask = 00000000000000000000000000000000X0XX", "mem[26] = 1", ]); assert_eq!(208, part_2(&instrs)); }
rust_cleaned_test_functions.jsonl/48507
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 157 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 62, 17, 368, 341, 286, 1077, 9491, 82, 284, 4715, 2099, 4083, 90515, 310, 330, 11258, 284, 220, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 55, 16, 15, 15, 16, 55, 756, 310, 330, 10536, 58, 19, 17, 60, 284, 220, 16, 15, 15, 756, 310, 330, 11258, 284, 220, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 55, 15, 6148, 756, 310, 330, 10536, 58, 17, 21, 60, 284, 220, 16, 756, 286, 22712, 286, 2060, 10714, 10297, 17, 15, 23, 11, 949, 62, 17, 2099, 60511, 82, 1106, 262, 335 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
1
#[test] fn test_cycle_phase_settings() { let set: BTreeSet<MemContent> = [0, 1, 2, 3, 4].iter().cloned().collect(); let permutations = permute(&set); assert_eq!(5 * 4 * 3 * 2 * 1, permutations.len()); }
rust_cleaned_test_functions.jsonl/66873
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 108 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 39079, 37593, 10853, 368, 341, 286, 1077, 738, 25, 425, 6533, 1649, 27, 18816, 2762, 29, 284, 508, 15, 11, 220, 16, 11, 220, 17, 11, 220, 18, 11, 220, 19, 936, 2015, 1005, 564, 19684, 1005, 17384, 543, 286, 1077, 71949, 284, 13854, 1070, 2099, 746, 317, 286, 2060, 10714, 10297, 20, 353, 220, 19, 353, 220, 18, 353, 220, 17, 353, 220, 16, 11, 71949, 19406, 1423, 262, 335 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
1
#[test] fn test_highest_qc() { let mut inserter = TreeInserter::default(); let block_store = inserter.block_store(); // build a tree of the following form // genesis <- a1 <- a2 <- a3 let genesis = block_store.root(); let a1 = inserter.insert_block_with_qc(certificate_for_genesis(), &genesis, 1); assert_eq!(block_store.highest_certified_block(), genesis); let a2 = inserter.insert_block(&a1, 2, None); assert_eq!(block_store.highest_certified_block(), a1); let _a3 = inserter.insert_block(&a2, 3, None); assert_eq!(block_store.highest_certified_block(), a2); }
rust_cleaned_test_functions.jsonl/50989
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 246 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 1523, 7504, 8976, 66, 368, 341, 262, 1077, 5206, 47325, 465, 284, 8942, 641, 90727, 486, 2258, 543, 262, 1077, 2504, 14809, 284, 47325, 465, 15697, 14809, 1428, 262, 442, 1936, 264, 4916, 315, 279, 2701, 1352, 198, 262, 442, 59366, 9119, 264, 16, 9119, 264, 17, 9119, 264, 18, 198, 262, 1077, 59366, 284, 2504, 14809, 12576, 543, 262, 1077, 264, 16, 284, 47325, 465, 7030, 7113, 6615, 8976, 66, 1337, 20962, 5478, 16322, 13774, 1507, 609, 77894, 11, 220, 16, 317, 262, 2060, 10714, 10297, 4574, 14809, 860, 7504, 37097, 1870, 7113, 1507, 59366, 317, 262, 1077, 264, 17, 284, 47325, 465, 7030, 7113, 2099, 64, 16, 11, 220, 17, 11, 2240, 317, 262, 2060, 10714, 10297, 4574, 14809, 860, 7504, 37097, 1870, 7113, 1507, 264, 16, 317, 262, 1077, 716, 64, 18, 284, 47325, 465, 7030, 7113, 2099, 64, 17, 11, 220, 18, 11, 2240, 317, 262, 2060, 10714, 10297, 4574, 14809, 860, 7504, 37097, 1870, 7113, 1507, 264, 17, 317, 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
#[test] fn test_account_commitment_not_fulfilled() { let GenesisConfigInfo { genesis_config, mint_keypair: alice, .. } = create_genesis_config(10_000); let bank = Bank::new(&genesis_config); let blockhash = bank.last_blockhash(); let bank_forks = Arc::new(RwLock::new(BankForks::new(bank))); let bob = Keypair::new(); let mut rpc = RpcSolPubSubImpl::default_with_bank_forks(bank_forks.clone()); let exit = Arc::new(AtomicBool::new(false)); let subscriptions = RpcSubscriptions::new( &exit, bank_forks.clone(), Arc::new(RwLock::new(BlockCommitmentCache::new_for_tests())), OptimisticallyConfirmedBank::locked_from_bank_forks_root(&bank_forks), ); rpc.subscriptions = Arc::new(subscriptions); let session = create_session(); let (subscriber, _id_receiver, receiver) = Subscriber::new_test("accountNotification"); rpc.account_subscribe( session, subscriber, bob.pubkey().to_string(), Some(RpcAccountInfoConfig { commitment: Some(CommitmentConfig::finalized()), encoding: None, data_slice: None, }), ); let tx = system_transaction::transfer(&alice, &bob.pubkey(), 100, blockhash); bank_forks .write() .unwrap() .get(1) .unwrap() .process_transaction(&tx) .unwrap(); rpc.subscriptions .notify_subscribers(CommitmentSlots::default()); // allow 200ms for notification thread to wake std::thread::sleep(Duration::from_millis(200)); let _panic = robust_poll_or_panic(receiver); }
rust_cleaned_test_functions.jsonl/4703
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 894 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 13500, 36346, 478, 7913, 761, 84993, 368, 341, 286, 1077, 40788, 2648, 1731, 341, 310, 59366, 5332, 345, 310, 28337, 3097, 12670, 25, 70433, 345, 310, 54538, 286, 335, 284, 1855, 16322, 13774, 5332, 7, 16, 15, 62, 15, 15, 15, 317, 286, 1077, 6073, 284, 8547, 486, 931, 2099, 77894, 5332, 317, 286, 1077, 2504, 8296, 284, 6073, 9110, 7113, 8296, 543, 286, 1077, 6073, 761, 73302, 284, 19689, 486, 931, 2785, 86, 11989, 486, 931, 5349, 1180, 37, 73302, 486, 931, 1883, 1180, 4945, 286, 1077, 35192, 284, 6569, 1082, 1310, 486, 931, 1428, 286, 1077, 5206, 35596, 284, 79961, 48812, 29162, 3136, 9673, 486, 2258, 6615, 35733, 761, 73302, 1883, 1180, 761, 73302, 15997, 1423, 286, 1077, 4869, 284, 19689, 486, 931, 7, 65857, 11233, 486, 931, 3576, 1106, 286, 1077, 40355, 284, 79961, 3136, 29966, 486, 931, 1006, 310, 609, 13652, 345, 310, 6073, 761, 73302, 15997, 3148, 310, 19689, 486, 931, 2785, 86, 11989, 486, 931, 55243, 33441, 478, 8233, 486, 931, 5478, 32509, 73727, 310, 30097, 37110, 47948, 25828, 486, 24633, 5673, 35733, 761, 73302, 12993, 2099, 17033, 761, 73302, 1326, 286, 1439, 286, 35596, 85147, 284, 19689, 486, 931, 10624, 29966, 317, 286, 1077, 3797, 284, 1855, 12316, 543, 286, 1077, 320, 59205, 11, 716, 307, 65691, 11, 13964, 8, 284, 69653, 486, 931, 4452, 445, 4608, 11196, 797, 286, 35596, 18786, 88935, 1006, 310, 3797, 345, 310, 32115, 345, 310, 35192, 47773, 792, 1005, 983, 3904, 3148, 310, 4329, 2785, 3992, 7365, 1731, 2648, 341, 394, 15155, 25, 4329, 7, 33441, 478, 2648, 486, 11822, 1506, 14702, 394, 11170, 25, 2240, 345, 394, 821, 26488, 25, 2240, 345, 310, 11973, 286, 3475, 286, 1077, 9854, 284, 1849, 28884, 486, 24188, 2099, 63195, 11, 609, 47086, 47773, 792, 1507, 220, 16, 15, 15, 11, 2504, 8296, 317, 286, 6073, 761, 73302, 198, 310, 659, 4934, 741, 310, 659, 15454, 741, 310, 659, 455, 7, 16, 340, 310, 659, 15454, 741, 310, 659, 4630, 28884, 2099, 3998, 340, 310, 659, 15454, 543, 286, 35596, 85147, 198, 310, 659, 21948, 5228, 46361, 7, 33441, 478, 51647, 486, 2258, 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
#[test] fn test_many_with_features() { let p = project() .file( "Cargo.toml", r#" [package] name = "foo" version = "0.0.1" authors = [] [dependencies] a = { path = "a" } [features] foo = [] [workspace] "#, ) .file("src/lib.rs", "") .file("a/Cargo.toml", &basic_manifest("a", "0.0.1")) .file("a/src/lib.rs", "") .build(); p.cargo("test -v -p a -p foo --features foo").run(); }
rust_cleaned_test_functions.jsonl/95369
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 356 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 22101, 6615, 14965, 368, 341, 262, 1077, 281, 284, 2390, 741, 286, 659, 1192, 1006, 310, 330, 98228, 73494, 75, 756, 310, 435, 2, 698, 310, 508, 1722, 921, 310, 829, 284, 330, 7975, 698, 310, 2319, 284, 330, 15, 13, 15, 13, 16, 698, 310, 12014, 284, 14599, 310, 508, 54274, 921, 310, 264, 284, 314, 1815, 284, 330, 64, 1, 555, 310, 508, 20304, 921, 310, 15229, 284, 14599, 310, 508, 42909, 921, 286, 5869, 345, 286, 1727, 286, 659, 1192, 445, 3548, 8194, 25638, 497, 14676, 286, 659, 1192, 445, 64, 11295, 12088, 73494, 75, 497, 609, 22342, 74269, 445, 64, 497, 330, 15, 13, 15, 13, 16, 5455, 286, 659, 1192, 445, 64, 13437, 8194, 25638, 497, 14676, 286, 659, 5834, 1428, 262, 281, 520, 12088, 445, 1944, 481, 85, 481, 79, 264, 481, 79, 15229, 1177, 20304, 15229, 1827, 6108, 543, 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
#[test] fn test_p2sh_address_58() { let addr = Address { network: Digibyte, payload: Payload::ScriptHash(hex_scripthash!("162c5ea71c0b23f5b9022ef047c4a86470a5b070")), }; assert_eq!( addr.script_pubkey(), hex_script!("a914162c5ea71c0b23f5b9022ef047c4a86470a5b07087") ); assert_eq!(&addr.to_string(), "33iFwdLuRpW1uK1RTRqsoi8rR4NpDzk66k"); assert_eq!(addr.address_type(), Some(AddressType::P2sh)); roundtrips(&addr); }
rust_cleaned_test_functions.jsonl/63228
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 303 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 620, 17, 927, 6744, 62, 20, 23, 368, 341, 286, 1077, 10789, 284, 9177, 341, 310, 3922, 25, 37969, 579, 78361, 345, 310, 7729, 25, 52916, 486, 5910, 6370, 44660, 643, 740, 8490, 988, 17223, 16, 21, 17, 66, 20, 12508, 22, 16, 66, 15, 65, 17, 18, 69, 20, 65, 24, 15, 17, 17, 823, 15, 19, 22, 66, 19, 64, 23, 21, 19, 22, 15, 64, 20, 65, 15, 22, 15, 30154, 286, 3634, 286, 2060, 10714, 33673, 310, 10789, 46713, 34014, 792, 3148, 310, 12371, 14660, 17223, 64, 24, 16, 19, 16, 21, 17, 66, 20, 12508, 22, 16, 66, 15, 65, 17, 18, 69, 20, 65, 24, 15, 17, 17, 823, 15, 19, 22, 66, 19, 64, 23, 21, 19, 22, 15, 64, 20, 65, 15, 22, 15, 23, 22, 1138, 286, 1439, 286, 2060, 10714, 0, 2099, 6214, 2389, 3904, 1507, 330, 18, 18, 72, 37, 6377, 49202, 61730, 54, 16, 84, 42, 16, 49, 2378, 80, 704, 72, 23, 81, 49, 19, 45, 79, 35, 40696, 21, 21, 74, 797, 286, 2060, 10714, 10297, 6214, 13792, 1819, 1507, 4329, 68492, 929, 486, 47, 17, 927, 1106, 286, 4778, 376, 3077, 2099, 6214, 317, 262, 335 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
1
#[test] fn test_bind() -> Result<(), Box<dyn Error + Send + Sync>> { let foo = "f?o?o"; assert_eq!("'lol'foo?", &"?foo?".bind(&"lol")); assert_eq!("'lol'foo10", &"?foo?".bind(&"lol").bind(&10)); assert_eq!("'lol'foo?", &"?foo?".bind(&String::from("lol"))); assert_eq!("'lol'foo?", &String::from("?foo?").bind(&"lol")); assert_eq!("f'lol'o?o", &foo.bind(&"lol")); assert_eq!("fo'f?o?o'o", &"fo?o".bind(&foo)); assert_eq!("fo10o", &"fo?o".bind(&10_usize)); assert_eq!("fo10o", &"fo?o".bind(&10)); assert_eq!("fo10o", &"fo?o".bind(&10_isize)); assert_eq!("foTRUEo", &"fo?o".bind(&true)); assert_eq!("foFALSEo", &"fo?o".bind(&false)); assert_eq!( "10f'lol'o10o$3", &"$1f$2o$1o$3".bind_num(1, &10_u8).bind_num(2, &"lol") ); assert_eq!("f'lol'oo:def:", &"f:abc:oo:def:".bind_name(&"abc", &"lol")); Ok(()) }
rust_cleaned_test_functions.jsonl/4400
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 534 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 27461, 368, 1464, 5714, 68843, 8261, 92846, 4600, 488, 11000, 488, 28937, 2452, 341, 286, 1077, 15229, 284, 330, 69, 30, 78, 30, 78, 3302, 286, 2060, 10714, 17223, 6, 59319, 6, 7975, 31011, 609, 43869, 7975, 30, 3263, 7666, 2099, 1, 59319, 4010, 286, 2060, 10714, 17223, 6, 59319, 6, 7975, 16, 15, 497, 609, 43869, 7975, 30, 3263, 7666, 2099, 1, 59319, 1827, 7666, 2099, 16, 15, 1106, 286, 2060, 10714, 17223, 6, 59319, 6, 7975, 31011, 609, 43869, 7975, 30, 3263, 7666, 2099, 703, 486, 1499, 445, 59319, 17621, 286, 2060, 10714, 17223, 6, 59319, 6, 7975, 31011, 609, 703, 486, 1499, 66689, 7975, 30, 1827, 7666, 2099, 1, 59319, 4010, 286, 2060, 10714, 17223, 69, 6, 59319, 93472, 30, 78, 497, 609, 7975, 6090, 2099, 1, 59319, 4010, 286, 2060, 10714, 17223, 824, 6, 69, 30, 78, 30, 78, 93472, 497, 609, 1, 824, 30, 78, 3263, 7666, 2099, 7975, 1106, 286, 2060, 10714, 17223, 824, 16, 15, 78, 497, 609, 1, 824, 30, 78, 3263, 7666, 2099, 16, 15, 11306, 551, 1106, 286, 2060, 10714, 17223, 824, 16, 15, 78, 497, 609, 1, 824, 30, 78, 3263, 7666, 2099, 16, 15, 1106, 286, 2060, 10714, 17223, 824, 16, 15, 78, 497, 609, 1, 824, 30, 78, 3263, 7666, 2099, 16, 15, 6892, 551, 1106, 286, 2060, 10714, 17223, 824, 20611, 78, 497, 609, 1, 824, 30, 78, 3263, 7666, 2099, 1866, 1106, 286, 2060, 10714, 17223, 824, 30351, 78, 497, 609, 1, 824, 30, 78, 3263, 7666, 2099, 3849, 1106, 286, 2060, 10714, 33673, 310, 330, 16, 15, 69, 6, 59319, 93472, 16, 15, 78, 3, 18, 756, 310, 609, 33732, 16, 69, 3, 17, 78, 3, 16, 78, 3, 18, 3263, 7666, 4273, 7, 16, 11, 609, 16, 15, 7300, 23, 568, 7666, 4273, 7, 17, 11, 609, 1, 59319, 1138, 286, 1439, 286, 2060, 10714, 17223, 69, 6, 59319, 6, 2624, 22582, 12147, 609, 1, 69, 25, 13683, 25, 2624, 22582, 95740, 7666, 1269, 2099, 1, 13683, 497, 609, 1, 59319, 14929, 286, 7622, 50432, 262, 335 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1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_create_vocab() { // Given let values: HashMap<String, i64> = HashMap::new(); let special_values: HashMap<String, i64> = HashMap::new(); let indices: HashMap<i64, String> = HashMap::new(); let special_indices: HashMap<i64, String> = HashMap::new(); let unknown_value = OpenAiGptVocab::unknown_value(); // When let openai_gpt_vocab = OpenAiGptVocab { values, indices, unknown_value, special_indices, special_values, }; // Then assert_eq!(openai_gpt_vocab.unknown_value, "<unk>"); assert_eq!(openai_gpt_vocab.unknown_value, OpenAiGptVocab::unknown_value()); assert_eq!(openai_gpt_vocab.values, *openai_gpt_vocab.values()); assert_eq!(openai_gpt_vocab.special_values, *openai_gpt_vocab.special_values()); }
rust_cleaned_test_functions.jsonl/25058
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 446 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 8657, 52823, 368, 341, 322, 286, 16246, 198, 286, 1077, 2750, 25, 10528, 3464, 11, 600, 21, 19, 29, 284, 10528, 486, 931, 543, 286, 1077, 3281, 9146, 25, 10528, 3464, 11, 600, 21, 19, 29, 284, 10528, 486, 931, 543, 286, 1077, 14937, 25, 10528, 21897, 21, 19, 11, 923, 29, 284, 10528, 486, 931, 543, 286, 1077, 3281, 18333, 25, 10528, 21897, 21, 19, 11, 923, 29, 284, 10528, 486, 931, 543, 286, 1077, 9788, 3142, 284, 5264, 69667, 38, 417, 53, 20497, 486, 16088, 3142, 1428, 322, 286, 3197, 198, 286, 1077, 1787, 2143, 1889, 417, 52823, 284, 5264, 69667, 38, 417, 53, 20497, 341, 310, 2750, 345, 310, 14937, 345, 310, 9788, 3142, 345, 310, 3281, 18333, 345, 310, 3281, 9146, 345, 286, 3634, 322, 286, 5005, 198, 286, 2060, 10714, 10297, 2508, 2143, 1889, 417, 52823, 93851, 3142, 11, 4055, 3122, 15084, 286, 2060, 10714, 10297, 2508, 2143, 1889, 417, 52823, 93851, 3142, 11, 5264, 69667, 38, 417, 53, 20497, 486, 16088, 3142, 1423, 286, 2060, 10714, 10297, 2508, 2143, 1889, 417, 52823, 10656, 11, 353, 2508, 2143, 1889, 417, 52823, 10656, 1423, 286, 2060, 10714, 10297, 2508, 2143, 1889, 417, 52823, 63208, 9146, 11, 353, 2508, 2143, 1889, 417, 52823, 63208, 9146, 1423, 262, 335 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
1
#[test] fn test_next() { let map = vec![(5, 4), (5, 5), (5, 6), (4, 5), (6, 5)]; let mut u = Universe::new(30, 11); u.fill(Cell::Dead); for (x, y) in map.iter() { u.toggle(*x as u32, *y as u32); } println!("{}", &u); let mut exp1:Option<String> = None; let mut exp2:Option<String> = None; for i in 0..12 { u.next(); println!("{}.", i); println!("{}", &u); if i == 5 { exp1 = Some(u.to_string()); } else if i == 6 { exp2 = Some(u.to_string()); } else if i >= 7 { if i % 2 == 0 { assert_eq!(exp2, Some(u.to_string())); } else { assert_eq!(exp1, Some(u.to_string())); } } } }
rust_cleaned_test_functions.jsonl/37988
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 527 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 11257, 368, 341, 286, 1077, 2415, 284, 7486, 0, 9697, 20, 11, 220, 19, 701, 320, 20, 11, 220, 20, 701, 320, 20, 11, 220, 21, 701, 320, 19, 11, 220, 20, 701, 320, 21, 11, 220, 20, 12587, 286, 1077, 5206, 575, 284, 28749, 486, 931, 7, 18, 15, 11, 220, 16, 16, 317, 286, 575, 12467, 82530, 486, 28320, 317, 286, 369, 320, 87, 11, 379, 8, 304, 2415, 19471, 368, 314, 575, 23658, 4071, 87, 438, 575, 18, 17, 11, 353, 88, 438, 575, 18, 17, 1215, 456, 286, 13751, 79878, 609, 84, 626, 286, 1077, 5206, 1343, 16, 25, 5341, 3464, 29, 284, 2240, 280, 286, 1077, 5206, 1343, 17, 25, 5341, 3464, 29, 284, 2240, 280, 286, 369, 600, 304, 220, 15, 496, 16, 17, 341, 310, 575, 4529, 543, 310, 13751, 17223, 6257, 10465, 600, 317, 310, 13751, 79878, 609, 84, 626, 310, 421, 600, 621, 220, 20, 341, 394, 1343, 16, 284, 4329, 8154, 2389, 3904, 1423, 310, 335, 770, 421, 600, 621, 220, 21, 341, 394, 1343, 17, 284, 4329, 8154, 2389, 3904, 1423, 310, 335, 770, 421, 600, 2604, 220, 22, 341, 394, 421, 600, 1018, 220, 17, 621, 220, 15, 341, 503, 2060, 10714, 10297, 4580, 17, 11, 4329, 8154, 2389, 3904, 7392, 394, 335, 770, 341, 503, 2060, 10714, 10297, 4580, 16, 11, 4329, 8154, 2389, 3904, 7392, 394, 456, 310, 456, 286, 456, 262, 335 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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
#[test] fn test_rand_u128() { let env = TestEnv::default(); let value = env.rand_u128(); println!("u128: {}", value); assert!(value > 0); }
rust_cleaned_test_functions.jsonl/593
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 93 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 33864, 7300, 16, 17, 23, 368, 341, 286, 1077, 6105, 284, 3393, 14359, 486, 2258, 543, 286, 1077, 897, 284, 6105, 15506, 7300, 16, 17, 23, 543, 286, 13751, 17223, 84, 16, 17, 23, 25, 24689, 897, 317, 286, 2060, 10297, 957, 861, 220, 15, 317, 262, 335 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
1
#[test] fn test_hermitian() { let basis = hermitian_basis_from_spin(1.); for b in &basis { let conj = b.t().mapv(|x| x.conj()); let approx = b.abs_diff_eq(&conj, 1e-8); assert!(approx, "The matrices are not Hermitian"); } }
rust_cleaned_test_functions.jsonl/79986
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 162 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 1523, 261, 1763, 1103, 368, 341, 286, 1077, 8037, 284, 1059, 1763, 1103, 62696, 5673, 47965, 7, 16, 13, 626, 286, 369, 293, 304, 609, 88826, 341, 310, 1077, 16491, 284, 293, 734, 1005, 2186, 85, 22428, 87, 91, 856, 2862, 73, 1423, 310, 1077, 9848, 284, 293, 14572, 15850, 10714, 2099, 92440, 11, 220, 16, 68, 12, 23, 317, 310, 2060, 10297, 48053, 11, 330, 785, 35195, 525, 537, 6252, 1763, 1103, 797, 286, 456, 262, 335 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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
#[test] fn test_scalar_negate() { { let mut a = Scalar::zero(); a.negate(); assert!(a.is_zero()); } let mut rng = XorShiftRng::from_seed([ 0x59, 0x62, 0xbe, 0x5d, 0x76, 0x3d, 0x31, 0x8d, 0x17, 0xdb, 0x37, 0x32, 0x54, 0x06, 0xbc, 0xe5, ]); for _ in 0..1000 { let mut a = Scalar::random(&mut rng); let mut b = a; b.negate(); a.add_assign(&b); assert!(a.is_zero()); } }
rust_cleaned_test_functions.jsonl/56402
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 367 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 41652, 28209, 349, 368, 341, 286, 341, 310, 1077, 5206, 264, 284, 35176, 486, 14154, 543, 310, 264, 79219, 349, 1428, 310, 2060, 10297, 64, 2079, 19359, 1423, 286, 555, 286, 1077, 5206, 28422, 284, 1599, 269, 24841, 49, 968, 486, 1499, 33809, 8956, 310, 220, 15, 87, 20, 24, 11, 220, 15, 87, 21, 17, 11, 220, 15, 42459, 11, 220, 15, 87, 20, 67, 11, 220, 15, 87, 22, 21, 11, 220, 15, 87, 18, 67, 11, 220, 15, 87, 18, 16, 11, 220, 15, 87, 23, 67, 11, 220, 15, 87, 16, 22, 11, 220, 15, 54555, 11, 220, 15, 87, 18, 22, 11, 220, 15, 87, 18, 17, 11, 220, 15, 87, 20, 19, 11, 220, 15, 87, 15, 21, 345, 310, 220, 15, 43416, 11, 220, 15, 8371, 20, 345, 286, 22712, 286, 369, 716, 304, 220, 15, 496, 16, 15, 15, 15, 341, 3374, 310, 1077, 5206, 264, 284, 35176, 486, 11463, 2099, 6984, 28422, 317, 310, 1077, 5206, 293, 284, 264, 280, 310, 293, 79219, 349, 543, 310, 264, 1364, 20688, 2099, 65, 626, 310, 2060, 10297, 64, 2079, 19359, 1423, 286, 456, 262, 335 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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
#[test] fn test_parsing_with_a_newly_excluded_range() { let mut source_code = String::from("<div><span><%= something %></span></div>"); let mut parser = Parser::new(); parser.set_language(get_language("html")).unwrap(); let mut first_tree = parser.parse(&source_code, None).unwrap(); // Insert code at the beginning of the document. let prefix = "a very very long line of plain text. "; first_tree.edit(&InputEdit { start_byte: 0, old_end_byte: 0, new_end_byte: prefix.len(), start_position: Point::new(0, 0), old_end_position: Point::new(0, 0), new_end_position: Point::new(0, prefix.len()), }); source_code.insert_str(0, prefix); let directive_start = source_code.find("<%=").unwrap(); let directive_end = source_code.find("</span>").unwrap(); let source_code_end = source_code.len(); parser.set_included_ranges(&[ Range { start_byte: 0, end_byte: directive_start, start_point: Point::new(0, 0), end_point: Point::new(0, directive_start), }, Range { start_byte: directive_end, end_byte: source_code_end, start_point: Point::new(0, directive_end), end_point: Point::new(0, source_code_end), }, ]); let tree = parser.parse(&source_code, Some(&first_tree)).unwrap(); assert_eq!( tree.root_node().to_sexp(), concat!( "(fragment (text) (element", " (start_tag (tag_name))", " (element (start_tag (tag_name)) (end_tag (tag_name)))", " (end_tag (tag_name))))" ) ); assert_eq!( tree.changed_ranges(&first_tree), vec![ // The first range that has changed syntax is the range of the newly-inserted text. Range { start_byte: 0, end_byte: prefix.len(), start_point: Point::new(0, 0), end_point: Point::new(0, prefix.len()), }, // its contents have changed syntax because a range of text that // was previously included is now excluded. Range { start_byte: directive_start, end_byte: directive_end, start_point: Point::new(0, directive_start), end_point: Point::new(0, directive_end), }, ] ); }
rust_cleaned_test_functions.jsonl/7395
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 1207 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 620, 28598, 6615, 4306, 5921, 398, 2702, 10181, 9698, 368, 341, 262, 1077, 5206, 2530, 4136, 284, 923, 486, 1499, 9639, 611, 1784, 1480, 1784, 35205, 2494, 1018, 1472, 1480, 1472, 611, 67940, 1066, 262, 1077, 5206, 6729, 284, 21102, 486, 931, 543, 262, 6729, 980, 29021, 5433, 29021, 445, 1551, 15197, 15454, 543, 262, 1077, 5206, 1156, 11663, 284, 6729, 4632, 2099, 2427, 4136, 11, 2240, 568, 15454, 1428, 262, 442, 17101, 2038, 518, 279, 7167, 315, 279, 2197, 624, 262, 1077, 9252, 284, 330, 64, 1602, 1602, 1293, 1555, 315, 14396, 1467, 13, 7620, 262, 1156, 11663, 12717, 2099, 2505, 4036, 341, 286, 1191, 19737, 25, 220, 15, 345, 286, 2310, 6213, 19737, 25, 220, 15, 345, 286, 501, 6213, 19737, 25, 9252, 19406, 3148, 286, 1191, 9661, 25, 5126, 486, 931, 7, 15, 11, 220, 15, 1326, 286, 2310, 6213, 9661, 25, 5126, 486, 931, 7, 15, 11, 220, 15, 1326, 286, 501, 6213, 9661, 25, 5126, 486, 931, 7, 15, 11, 9252, 19406, 14702, 262, 1625, 262, 2530, 4136, 7030, 2895, 7, 15, 11, 9252, 626, 9401, 262, 1077, 33859, 4906, 284, 2530, 4136, 2658, 9639, 4, 75244, 15454, 543, 262, 1077, 33859, 6213, 284, 2530, 4136, 2658, 31601, 1480, 61032, 15454, 543, 262, 1077, 2530, 4136, 6213, 284, 2530, 4136, 19406, 543, 262, 6729, 980, 1243, 10181, 58748, 2099, 9640, 286, 16437, 341, 310, 1191, 19737, 25, 220, 15, 345, 310, 835, 19737, 25, 33859, 4906, 345, 310, 1191, 6085, 25, 5126, 486, 931, 7, 15, 11, 220, 15, 1326, 310, 835, 6085, 25, 5126, 486, 931, 7, 15, 11, 33859, 4906, 1326, 286, 1153, 286, 16437, 341, 310, 1191, 19737, 25, 33859, 6213, 345, 310, 835, 19737, 25, 2530, 4136, 6213, 345, 310, 1191, 6085, 25, 5126, 486, 931, 7, 15, 11, 33859, 6213, 1326, 310, 835, 6085, 25, 5126, 486, 931, 7, 15, 11, 2530, 4136, 6213, 1326, 286, 1153, 262, 13201, 262, 1077, 4916, 284, 6729, 4632, 2099, 2427, 4136, 11, 4329, 2099, 3896, 11663, 4579, 15454, 1428, 262, 2060, 10714, 33673, 286, 4916, 12576, 5084, 1005, 983, 3453, 35725, 3148, 286, 33720, 33673, 310, 11993, 42202, 320, 1318, 8, 320, 6101, 756, 310, 330, 320, 2468, 9372, 320, 4578, 1269, 593, 756, 310, 330, 320, 6101, 320, 2468, 9372, 320, 4578, 1269, 593, 320, 408, 9372, 320, 4578, 1269, 7705, 756, 310, 330, 320, 408, 9372, 320, 4578, 1269, 25759, 698, 286, 1727, 262, 3475, 262, 2060, 10714, 33673, 286, 4916, 68216, 58748, 2099, 3896, 11663, 1326, 286, 7486, 90515, 310, 442, 576, 1156, 2088, 429, 702, 5497, 19482, 374, 279, 2088, 315, 279, 13631, 74550, 291, 1467, 624, 310, 16437, 341, 394, 1191, 19737, 25, 220, 15, 345, 394, 835, 19737, 25, 9252, 19406, 3148, 394, 1191, 6085, 25, 5126, 486, 931, 7, 15, 11, 220, 15, 1326, 394, 835, 6085, 25, 5126, 486, 931, 7, 15, 11, 9252, 19406, 14702, 310, 1153, 3374, 310, 442, 1181, 8794, 614, 5497, 19482, 1576, 264, 2088, 315, 1467, 429, 198, 310, 442, 572, 8597, 5230, 374, 1431, 27444, 624, 310, 16437, 341, 394, 1191, 19737, 25, 33859, 4906, 345, 394, 835, 19737, 25, 33859, 6213, 345, 394, 1191, 6085, 25, 5126, 486, 931, 7, 15, 11, 33859, 4906, 1326, 394, 835, 6085, 25, 5126, 486, 931, 7, 15, 11, 33859, 6213, 1326, 310, 1153, 286, 5133, 262, 1439, 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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aned_test_functions.jsonl/32516
{ "file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl", "token_count": 78 }
[ 262, 11506, 1944, 921, 262, 5168, 1273, 18449, 368, 1464, 5714, 71698, 341, 262, 384, 33655, 0, 543, 262, 2060, 10714, 10297, 4701, 7, 22, 11, 220, 23, 701, 220, 20, 22, 21, 19, 23, 15, 16, 317, 262, 2060, 10714, 10297, 4701, 7, 22, 11, 220, 16, 16, 701, 220, 16, 22, 23, 15, 22, 22, 17, 19, 317, 262, 7622, 50432, 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