1 
 2     static $type$[] [[TEST]]($type$[] a, $type$[] b, int origin, int part, boolean[] mask, int idx) {
 3         $type$[] res = new $type$[SPECIES.length()];
 4         for (int i = 0, j = 0; i < SPECIES.length(); i++){
 5             if(i+origin < SPECIES.length())
 6                 res[i] = b[idx+i+origin];
 7             else {
 8                 res[i] = b[idx+j];
 9                 j++;
10             }
11         }
12         for (int i = 0; i < SPECIES.length(); i++){
13             res[i] = mask[i] ? a[idx+i] : res[i];
14         }
15         $type$[] res1 = new $type$[SPECIES.length()];
16         if (part == 0) {
17             for (int i = 0, j = 0; i < SPECIES.length(); i++){
18                 if (i < origin)
19                     res1[i] = b[idx+i];
20                 else {
21                    res1[i] = res[j];
22                    j++;
23                 }
24             }
25         } else if (part == 1) {
26             for (int i = 0, j = 0; i < SPECIES.length(); i++){
27                 if (i < origin)
28                     res1[i] = res[SPECIES.length()-origin+i];
29                 else {
30                     res1[i] = b[idx+origin+j];
31                     j++;
32                 }
33             }
34         }
35         return res1;
36     }
37 
38     @Test(dataProvider = "$type$BinaryOpMaskProvider")
39     static void [[TEST]]$vectorteststype$Masked(IntFunction<$type$[]> fa, IntFunction<$type$[]> fb,
40     IntFunction<boolean[]> fm) {
41 [[KERNEL]]
42         assertArraysEquals(r, a, b, origin, part, mask, $vectorteststype$::[[TEST]]);
43     }