lin
2025-07-31 065ea569db06206874bbfa18eb25ff6121aec09b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
/*
 * Copyright (C) 2011 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
 
class Main implements InvokeInterface {
 
    int virI_I(int a) {
        return a + 123;
    }
 
    int virI_II(int a, int b) {
        return a + b + 321;
    }
 
    int virI_III(int a, int b, int c) {
        return a + b + c + 432;
    }
 
    int virI_IIII(int a, int b, int c, int d) {
        return a + b + c + d + 919;
    }
 
    int virI_IIIII(int a, int b, int c, int d, int e) {
        return a + b + c + d + e + 1010;
    }
 
    int virI_IIIIII(int a, int b, int c, int d, int e, int f) {
        return a + b + c + d + e + f + 2020;
    }
 
    static int statI_I(int a) {
         return a + 123;
    }
 
    static int statI_II(int a, int b) {
        return a + b + 321;
    }
 
    static int statI_III(int a, int b, int c) {
        return a + b + c + 432;
    }
 
    static int statI_IIII(int a, int b, int c, int d) {
        return a + b + c + d + 919;
    }
 
    static int statI_IIIII(int a, int b, int c, int d, int e) {
        return a + b + c + d + e + 1010;
    }
 
    static int statI_IIIIII(int a, int b, int c, int d, int e, int f) {
        return a + b + c + d + e + f + 2020;
    }
 
    public int interfaceMethod(int i) {
        return i + 23;
    }
 
    static int invoke(int a) {
        Main foo = new Main();
 
        return foo.virI_I(a) +
               foo.virI_II(a, 1) +
               foo.virI_III(a, 1, 2) +
               foo.virI_IIII(a, 1, 2, 3) +
               foo.virI_IIIII(a, 1, 2, 3, 4) +
               foo.virI_IIIIII(a, 1, 2, 3, 4, 5) +
               statI_I(a) +
               statI_II(a, 1) +
               statI_III(a, 1, 2) +
               statI_IIII(a, 1, 2, 3) +
               statI_IIIII(a, 1, 2, 3, 4) +
               statI_IIIIII(a, 1, 2, 3, 4, 5) +
               foo.interfaceMethod(a);
    }
 
    public static void main(String[] args) {
        boolean failure = false;
        int res = invoke(912);
        if (res == 21599) {
            System.out.println("invoke PASSED");
        } else {
            System.out.println("invoke FAILED: " + res);
            failure = true;
        }
        System.exit(failure ? 1 : 0);
    }
}
 
interface InvokeInterface {
    int interfaceMethod(int i);
}