FAILURE MAP
← Case archive

FA-90061 / Bytecode virtual machines / Open access

Method descriptors: empty object type name accepted · case 01

A parameter written as "L;" parses as a class with an empty name.

Verified by executionVariant 1 · 9 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The object-type branch only checks that a terminating semicolon exists.

VERIFIED REPAIR

Reject an L type whose semicolon immediately follows the L.

Unsuccessful approach: Comparing the semicolon position with i can never match because desc[i] is the L itself.

Case contract

Parse a method descriptor "(args)ret". Field types: B C D F I J S Z, L<binary name>; with a non-empty name, and up to 255 leading "[" dimensions. V is allowed only as a non-array return type. Local-slot count: one extra slot for "this" unless static; J and D take two slots unless they are array element types. Return {args (readable names, "[]" per dimension), slots, ret} or ["ClassFormatError", position].

Why this case matters

Frame sizes and argument placement in bytecode VMs are derived from descriptors.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(desc, is_static):
    names = {'B': 'byte', 'C': 'char', 'D': 'double', 'F': 'float', 'I': 'int', 'J': 'long', 'S': 'short', 'Z': 'boolean'}
    def field(i, allow_void):
        dims = 0
        while i < len(desc) and desc[i] == '[':
            dims += 1
            i += 1
        if dims > 255 or i >= len(desc):
            return None, i, 0
        c = desc[i]
        if c == 'L':
            j = desc.find(';', i)
            if j < 0:
                return None, i, 0
            base = desc[i + 1:j].replace('/', '.')
            i = j + 1
        elif c in names:
            base = names[c]
            i += 1
        elif c == 'V' and allow_void and dims == 0:
            base = 'void'
            i += 1
        else:
            return None, i, 0
        width = 2 if dims == 0 and c in 'JD' else 1
        return base + '[]' * dims, i, width
    if not desc.startswith('('):
        return ['ClassFormatError', 0]
    i = 1
    args = []
    slots = 0 if is_static else 1
    while i < len(desc) and desc[i] != ')':
        t, i, w = field(i, False)
        if t is None:
            return ['ClassFormatError', i]
        args.append(t)
        slots += w
    if i >= len(desc):
        return ['ClassFormatError', i]
    ret, j, _ = field(i + 1, True)
    if ret is None or j != len(desc):
        return ['ClassFormatError', j]
    return {'args': args, 'slots': slots, 'ret': ret}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('regression: mixed wide and array arguments',
   ('(IJ[JD[[Ljava/lang/String;I)V', True),
   {'args': ['int', 'long', 'long[]', 'double', 'java.lang.String[][]', 'int'], 'ret': 'void', 'slots': 8}),
  ('instance method reserves this slot',
   ('(JDI)J', False),
   {'args': ['long', 'double', 'int'], 'ret': 'long', 'slots': 6}),
  ('void array return rejected', ('(I)[V', True), ['ClassFormatError', 4]),
  ('void argument rejected', ('(IV)V', True), ['ClassFormatError', 2]),
  ('empty class name rejected', ('(IL;)V', False), ['ClassFormatError', 2]),
  ('trailing characters rejected', ('(ILpkg/A;)Lpkg/B;x', False), ['ClassFormatError', 17]),
  ('255 array dimensions accepted',
   ('([[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[II)V',
    True),
   {'args': ['int[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]',
             'int'],
    'ret': 'void',
    'slots': 2}),
  ('256 array dimensions rejected',
   ('([[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[II)V',
    True),
   ['ClassFormatError', 257]),
  ('control: missing parenthesis', ('I)V', True), ['ClassFormatError', 0])],
 [('regression: mixed wide and array arguments',
   ('(IJ[JD[[Ljava/lang/String;II)V', True),
   {'args': ['int', 'long', 'long[]', 'double', 'java.lang.String[][]', 'int', 'int'],
    'ret': 'void',
    'slots': 9}),
  ('instance method reserves this slot',
   ('(JDII)J', False),
   {'args': ['long', 'double', 'int', 'int'], 'ret': 'long', 'slots': 7}),
  ('void array return rejected', ('(II)[V', True), ['ClassFormatError', 5]),
  ('void argument rejected', ('(IIV)V', True), ['ClassFormatError', 3]),
  ('empty class name rejected', ('(IIL;)V', False), ['ClassFormatError', 3]),
  ('trailing characters rejected', ('(IILpkg/A;)Lpkg/B;x', False), ['ClassFormatError', 18]),
  ('255 array dimensions accepted',
   ('([[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[III)V',
    True),
   {'args': ['int[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]',
             'int',
             'int'],
    'ret': 'void',
    'slots': 3}),
  ('256 array dimensions rejected',
   ('([[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[III)V',
    True),
   ['ClassFormatError', 257]),
  ('control: missing parenthesis', ('I)V', True), ['ClassFormatError', 0])],
 [('regression: mixed wide and array arguments',
   ('(IJ[JD[[Ljava/lang/String;III)V', True),
   {'args': ['int', 'long', 'long[]', 'double', 'java.lang.String[][]', 'int', 'int', 'int'],
    'ret': 'void',
    'slots': 10}),
  ('instance method reserves this slot',
   ('(JDIII)J', False),
   {'args': ['long', 'double', 'int', 'int', 'int'], 'ret': 'long', 'slots': 8}),
  ('void array return rejected', ('(III)[V', True), ['ClassFormatError', 6]),
  ('void argument rejected', ('(IIIV)V', True), ['ClassFormatError', 4]),
  ('empty class name rejected', ('(IIIL;)V', False), ['ClassFormatError', 4]),
  ('trailing characters rejected', ('(IIILpkg/A;)Lpkg/B;x', False), ['ClassFormatError', 19]),
  ('255 array dimensions accepted',
   ('([[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[IIII)V',
    True),
   {'args': ['int[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]',
             'int',
             'int',
             'int'],
    'ret': 'void',
    'slots': 4}),
  ('256 array dimensions rejected',
   ('([[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[IIII)V',
    True),
   ['ClassFormatError', 257]),
  ('control: missing parenthesis', ('I)V', True), ['ClassFormatError', 0])],
 [('regression: mixed wide and array arguments',
   ('(IJ[JD[[Ljava/lang/String;IIII)V', True),
   {'args': ['int', 'long', 'long[]', 'double', 'java.lang.String[][]', 'int', 'int', 'int', 'int'],
    'ret': 'void',
    'slots': 11}),
  ('instance method reserves this slot',
   ('(JDIIII)J', False),
   {'args': ['long', 'double', 'int', 'int', 'int', 'int'], 'ret': 'long', 'slots': 9}),
  ('void array return rejected', ('(IIII)[V', True), ['ClassFormatError', 7]),
  ('void argument rejected', ('(IIIIV)V', True), ['ClassFormatError', 5]),
  ('empty class name rejected', ('(IIIIL;)V', False), ['ClassFormatError', 5]),
  ('trailing characters rejected', ('(IIIILpkg/A;)Lpkg/B;x', False), ['ClassFormatError', 20]),
  ('255 array dimensions accepted',
   ('([[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[IIIII)V',
    True),
   {'args': ['int[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]',
             'int',
             'int',
             'int',
             'int'],
    'ret': 'void',
    'slots': 5}),
  ('256 array dimensions rejected',
   ('([[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[IIIII)V',
    True),
   ['ClassFormatError', 257]),
  ('control: missing parenthesis', ('I)V', True), ['ClassFormatError', 0])],
 [('regression: mixed wide and array arguments',
   ('(IJ[JD[[Ljava/lang/String;IIIII)V', True),
   {'args': ['int', 'long', 'long[]', 'double', 'java.lang.String[][]', 'int', 'int', 'int', 'int', 'int'],
    'ret': 'void',
    'slots': 12}),
  ('instance method reserves this slot',
   ('(JDIIIII)J', False),
   {'args': ['long', 'double', 'int', 'int', 'int', 'int', 'int'], 'ret': 'long', 'slots': 10}),
  ('void array return rejected', ('(IIIII)[V', True), ['ClassFormatError', 8]),
  ('void argument rejected', ('(IIIIIV)V', True), ['ClassFormatError', 6]),
  ('empty class name rejected', ('(IIIIIL;)V', False), ['ClassFormatError', 6]),
  ('trailing characters rejected', ('(IIIIILpkg/A;)Lpkg/B;x', False), ['ClassFormatError', 21]),
  ('255 array dimensions accepted',
   ('([[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[IIIIII)V',
    True),
   {'args': ['int[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]',
             'int',
             'int',
             'int',
             'int',
             'int'],
    'ret': 'void',
    'slots': 6}),
  ('256 array dimensions rejected',
   ('([[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[IIIIII)V',
    True),
   ['ClassFormatError', 257]),
  ('control: missing parenthesis', ('I)V', True), ['ClassFormatError', 0])]]
for label, args, expected in cases[N - 1]:
    check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
regression: mixed wide and array arguments{'args': ['int', 'long', 'long[]', 'double', 'java.lang.String[][]', 'int'], 'ret': 'void', 'slots': 8}{'args': ['int', 'long', 'long[]', 'double', 'java.lang.String[][]', 'int'], 'ret': 'void', 'slots': 8}Passed
instance method reserves this slot{'args': ['long', 'double', 'int'], 'ret': 'long', 'slots': 6}{'args': ['long', 'double', 'int'], 'ret': 'long', 'slots': 6}Passed
void array return rejected['ClassFormatError', 4]['ClassFormatError', 4]Passed
void argument rejected['ClassFormatError', 2]['ClassFormatError', 2]Passed
empty class name rejected{'args': ['int', ''], 'ret': 'void', 'slots': 3}['ClassFormatError', 2]Failed
trailing characters rejected['ClassFormatError', 17]['ClassFormatError', 17]Passed
255 array dimensions accepted{'args': ['int[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]', 'int'], 'ret': 'void', 'slots': 2}{'args': ['int[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]', 'int'], 'ret': 'void', 'slots': 2}Passed
256 array dimensions rejected['ClassFormatError', 257]['ClassFormatError', 257]Passed
control: missing parenthesis['ClassFormatError', 0]['ClassFormatError', 0]Passed

SHA-256 / 9df707bc9f51bb5522cd0d78bf774a54690afc588bd7a9d06683cdf7ee76c17f

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(desc, is_static):
    names = {'B': 'byte', 'C': 'char', 'D': 'double', 'F': 'float', 'I': 'int', 'J': 'long', 'S': 'short', 'Z': 'boolean'}
    def field(i, allow_void):
        dims = 0
        while i < len(desc) and desc[i] == '[':
            dims += 1
            i += 1
        if dims > 255 or i >= len(desc):
            return None, i, 0
        c = desc[i]
        if c == 'L':
            j = desc.find(';', i)
            if j < 0 or j == i:
                return None, i, 0
            base = desc[i + 1:j].replace('/', '.')
            i = j + 1
        elif c in names:
            base = names[c]
            i += 1
        elif c == 'V' and allow_void and dims == 0:
            base = 'void'
            i += 1
        else:
            return None, i, 0
        width = 2 if dims == 0 and c in 'JD' else 1
        return base + '[]' * dims, i, width
    if not desc.startswith('('):
        return ['ClassFormatError', 0]
    i = 1
    args = []
    slots = 0 if is_static else 1
    while i < len(desc) and desc[i] != ')':
        t, i, w = field(i, False)
        if t is None:
            return ['ClassFormatError', i]
        args.append(t)
        slots += w
    if i >= len(desc):
        return ['ClassFormatError', i]
    ret, j, _ = field(i + 1, True)
    if ret is None or j != len(desc):
        return ['ClassFormatError', j]
    return {'args': args, 'slots': slots, 'ret': ret}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('regression: mixed wide and array arguments',
   ('(IJ[JD[[Ljava/lang/String;I)V', True),
   {'args': ['int', 'long', 'long[]', 'double', 'java.lang.String[][]', 'int'], 'ret': 'void', 'slots': 8}),
  ('instance method reserves this slot',
   ('(JDI)J', False),
   {'args': ['long', 'double', 'int'], 'ret': 'long', 'slots': 6}),
  ('void array return rejected', ('(I)[V', True), ['ClassFormatError', 4]),
  ('void argument rejected', ('(IV)V', True), ['ClassFormatError', 2]),
  ('empty class name rejected', ('(IL;)V', False), ['ClassFormatError', 2]),
  ('trailing characters rejected', ('(ILpkg/A;)Lpkg/B;x', False), ['ClassFormatError', 17]),
  ('255 array dimensions accepted',
   ('([[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[II)V',
    True),
   {'args': ['int[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]',
             'int'],
    'ret': 'void',
    'slots': 2}),
  ('256 array dimensions rejected',
   ('([[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[II)V',
    True),
   ['ClassFormatError', 257]),
  ('control: missing parenthesis', ('I)V', True), ['ClassFormatError', 0])],
 [('regression: mixed wide and array arguments',
   ('(IJ[JD[[Ljava/lang/String;II)V', True),
   {'args': ['int', 'long', 'long[]', 'double', 'java.lang.String[][]', 'int', 'int'],
    'ret': 'void',
    'slots': 9}),
  ('instance method reserves this slot',
   ('(JDII)J', False),
   {'args': ['long', 'double', 'int', 'int'], 'ret': 'long', 'slots': 7}),
  ('void array return rejected', ('(II)[V', True), ['ClassFormatError', 5]),
  ('void argument rejected', ('(IIV)V', True), ['ClassFormatError', 3]),
  ('empty class name rejected', ('(IIL;)V', False), ['ClassFormatError', 3]),
  ('trailing characters rejected', ('(IILpkg/A;)Lpkg/B;x', False), ['ClassFormatError', 18]),
  ('255 array dimensions accepted',
   ('([[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[III)V',
    True),
   {'args': ['int[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]',
             'int',
             'int'],
    'ret': 'void',
    'slots': 3}),
  ('256 array dimensions rejected',
   ('([[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[III)V',
    True),
   ['ClassFormatError', 257]),
  ('control: missing parenthesis', ('I)V', True), ['ClassFormatError', 0])],
 [('regression: mixed wide and array arguments',
   ('(IJ[JD[[Ljava/lang/String;III)V', True),
   {'args': ['int', 'long', 'long[]', 'double', 'java.lang.String[][]', 'int', 'int', 'int'],
    'ret': 'void',
    'slots': 10}),
  ('instance method reserves this slot',
   ('(JDIII)J', False),
   {'args': ['long', 'double', 'int', 'int', 'int'], 'ret': 'long', 'slots': 8}),
  ('void array return rejected', ('(III)[V', True), ['ClassFormatError', 6]),
  ('void argument rejected', ('(IIIV)V', True), ['ClassFormatError', 4]),
  ('empty class name rejected', ('(IIIL;)V', False), ['ClassFormatError', 4]),
  ('trailing characters rejected', ('(IIILpkg/A;)Lpkg/B;x', False), ['ClassFormatError', 19]),
  ('255 array dimensions accepted',
   ('([[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[IIII)V',
    True),
   {'args': ['int[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]',
             'int',
             'int',
             'int'],
    'ret': 'void',
    'slots': 4}),
  ('256 array dimensions rejected',
   ('([[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[IIII)V',
    True),
   ['ClassFormatError', 257]),
  ('control: missing parenthesis', ('I)V', True), ['ClassFormatError', 0])],
 [('regression: mixed wide and array arguments',
   ('(IJ[JD[[Ljava/lang/String;IIII)V', True),
   {'args': ['int', 'long', 'long[]', 'double', 'java.lang.String[][]', 'int', 'int', 'int', 'int'],
    'ret': 'void',
    'slots': 11}),
  ('instance method reserves this slot',
   ('(JDIIII)J', False),
   {'args': ['long', 'double', 'int', 'int', 'int', 'int'], 'ret': 'long', 'slots': 9}),
  ('void array return rejected', ('(IIII)[V', True), ['ClassFormatError', 7]),
  ('void argument rejected', ('(IIIIV)V', True), ['ClassFormatError', 5]),
  ('empty class name rejected', ('(IIIIL;)V', False), ['ClassFormatError', 5]),
  ('trailing characters rejected', ('(IIIILpkg/A;)Lpkg/B;x', False), ['ClassFormatError', 20]),
  ('255 array dimensions accepted',
   ('([[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[IIIII)V',
    True),
   {'args': ['int[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]',
             'int',
             'int',
             'int',
             'int'],
    'ret': 'void',
    'slots': 5}),
  ('256 array dimensions rejected',
   ('([[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[IIIII)V',
    True),
   ['ClassFormatError', 257]),
  ('control: missing parenthesis', ('I)V', True), ['ClassFormatError', 0])],
 [('regression: mixed wide and array arguments',
   ('(IJ[JD[[Ljava/lang/String;IIIII)V', True),
   {'args': ['int', 'long', 'long[]', 'double', 'java.lang.String[][]', 'int', 'int', 'int', 'int', 'int'],
    'ret': 'void',
    'slots': 12}),
  ('instance method reserves this slot',
   ('(JDIIIII)J', False),
   {'args': ['long', 'double', 'int', 'int', 'int', 'int', 'int'], 'ret': 'long', 'slots': 10}),
  ('void array return rejected', ('(IIIII)[V', True), ['ClassFormatError', 8]),
  ('void argument rejected', ('(IIIIIV)V', True), ['ClassFormatError', 6]),
  ('empty class name rejected', ('(IIIIIL;)V', False), ['ClassFormatError', 6]),
  ('trailing characters rejected', ('(IIIIILpkg/A;)Lpkg/B;x', False), ['ClassFormatError', 21]),
  ('255 array dimensions accepted',
   ('([[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[IIIIII)V',
    True),
   {'args': ['int[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]',
             'int',
             'int',
             'int',
             'int',
             'int'],
    'ret': 'void',
    'slots': 6}),
  ('256 array dimensions rejected',
   ('([[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[IIIIII)V',
    True),
   ['ClassFormatError', 257]),
  ('control: missing parenthesis', ('I)V', True), ['ClassFormatError', 0])]]
for label, args, expected in cases[N - 1]:
    check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
regression: mixed wide and array arguments{'args': ['int', 'long', 'long[]', 'double', 'java.lang.String[][]', 'int'], 'ret': 'void', 'slots': 8}{'args': ['int', 'long', 'long[]', 'double', 'java.lang.String[][]', 'int'], 'ret': 'void', 'slots': 8}Passed
instance method reserves this slot{'args': ['long', 'double', 'int'], 'ret': 'long', 'slots': 6}{'args': ['long', 'double', 'int'], 'ret': 'long', 'slots': 6}Passed
void array return rejected['ClassFormatError', 4]['ClassFormatError', 4]Passed
void argument rejected['ClassFormatError', 2]['ClassFormatError', 2]Passed
empty class name rejected{'args': ['int', ''], 'ret': 'void', 'slots': 3}['ClassFormatError', 2]Failed
trailing characters rejected['ClassFormatError', 17]['ClassFormatError', 17]Passed
255 array dimensions accepted{'args': ['int[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]', 'int'], 'ret': 'void', 'slots': 2}{'args': ['int[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]', 'int'], 'ret': 'void', 'slots': 2}Passed
256 array dimensions rejected['ClassFormatError', 257]['ClassFormatError', 257]Passed
control: missing parenthesis['ClassFormatError', 0]['ClassFormatError', 0]Passed

SHA-256 / f9a6de5242bde4933bf0edf1dbecc77502e873ec8bc07de98f4f8c8552e6f1a1

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(desc, is_static):
    names = {'B': 'byte', 'C': 'char', 'D': 'double', 'F': 'float', 'I': 'int', 'J': 'long', 'S': 'short', 'Z': 'boolean'}
    def field(i, allow_void):
        dims = 0
        while i < len(desc) and desc[i] == '[':
            dims += 1
            i += 1
        if dims > 255 or i >= len(desc):
            return None, i, 0
        c = desc[i]
        if c == 'L':
            j = desc.find(';', i)
            if j < 0 or j == i + 1:
                return None, i, 0
            base = desc[i + 1:j].replace('/', '.')
            i = j + 1
        elif c in names:
            base = names[c]
            i += 1
        elif c == 'V' and allow_void and dims == 0:
            base = 'void'
            i += 1
        else:
            return None, i, 0
        width = 2 if dims == 0 and c in 'JD' else 1
        return base + '[]' * dims, i, width
    if not desc.startswith('('):
        return ['ClassFormatError', 0]
    i = 1
    args = []
    slots = 0 if is_static else 1
    while i < len(desc) and desc[i] != ')':
        t, i, w = field(i, False)
        if t is None:
            return ['ClassFormatError', i]
        args.append(t)
        slots += w
    if i >= len(desc):
        return ['ClassFormatError', i]
    ret, j, _ = field(i + 1, True)
    if ret is None or j != len(desc):
        return ['ClassFormatError', j]
    return {'args': args, 'slots': slots, 'ret': ret}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('regression: mixed wide and array arguments',
   ('(IJ[JD[[Ljava/lang/String;I)V', True),
   {'args': ['int', 'long', 'long[]', 'double', 'java.lang.String[][]', 'int'], 'ret': 'void', 'slots': 8}),
  ('instance method reserves this slot',
   ('(JDI)J', False),
   {'args': ['long', 'double', 'int'], 'ret': 'long', 'slots': 6}),
  ('void array return rejected', ('(I)[V', True), ['ClassFormatError', 4]),
  ('void argument rejected', ('(IV)V', True), ['ClassFormatError', 2]),
  ('empty class name rejected', ('(IL;)V', False), ['ClassFormatError', 2]),
  ('trailing characters rejected', ('(ILpkg/A;)Lpkg/B;x', False), ['ClassFormatError', 17]),
  ('255 array dimensions accepted',
   ('([[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[II)V',
    True),
   {'args': ['int[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]',
             'int'],
    'ret': 'void',
    'slots': 2}),
  ('256 array dimensions rejected',
   ('([[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[II)V',
    True),
   ['ClassFormatError', 257]),
  ('control: missing parenthesis', ('I)V', True), ['ClassFormatError', 0])],
 [('regression: mixed wide and array arguments',
   ('(IJ[JD[[Ljava/lang/String;II)V', True),
   {'args': ['int', 'long', 'long[]', 'double', 'java.lang.String[][]', 'int', 'int'],
    'ret': 'void',
    'slots': 9}),
  ('instance method reserves this slot',
   ('(JDII)J', False),
   {'args': ['long', 'double', 'int', 'int'], 'ret': 'long', 'slots': 7}),
  ('void array return rejected', ('(II)[V', True), ['ClassFormatError', 5]),
  ('void argument rejected', ('(IIV)V', True), ['ClassFormatError', 3]),
  ('empty class name rejected', ('(IIL;)V', False), ['ClassFormatError', 3]),
  ('trailing characters rejected', ('(IILpkg/A;)Lpkg/B;x', False), ['ClassFormatError', 18]),
  ('255 array dimensions accepted',
   ('([[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[III)V',
    True),
   {'args': ['int[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]',
             'int',
             'int'],
    'ret': 'void',
    'slots': 3}),
  ('256 array dimensions rejected',
   ('([[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[III)V',
    True),
   ['ClassFormatError', 257]),
  ('control: missing parenthesis', ('I)V', True), ['ClassFormatError', 0])],
 [('regression: mixed wide and array arguments',
   ('(IJ[JD[[Ljava/lang/String;III)V', True),
   {'args': ['int', 'long', 'long[]', 'double', 'java.lang.String[][]', 'int', 'int', 'int'],
    'ret': 'void',
    'slots': 10}),
  ('instance method reserves this slot',
   ('(JDIII)J', False),
   {'args': ['long', 'double', 'int', 'int', 'int'], 'ret': 'long', 'slots': 8}),
  ('void array return rejected', ('(III)[V', True), ['ClassFormatError', 6]),
  ('void argument rejected', ('(IIIV)V', True), ['ClassFormatError', 4]),
  ('empty class name rejected', ('(IIIL;)V', False), ['ClassFormatError', 4]),
  ('trailing characters rejected', ('(IIILpkg/A;)Lpkg/B;x', False), ['ClassFormatError', 19]),
  ('255 array dimensions accepted',
   ('([[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[IIII)V',
    True),
   {'args': ['int[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]',
             'int',
             'int',
             'int'],
    'ret': 'void',
    'slots': 4}),
  ('256 array dimensions rejected',
   ('([[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[IIII)V',
    True),
   ['ClassFormatError', 257]),
  ('control: missing parenthesis', ('I)V', True), ['ClassFormatError', 0])],
 [('regression: mixed wide and array arguments',
   ('(IJ[JD[[Ljava/lang/String;IIII)V', True),
   {'args': ['int', 'long', 'long[]', 'double', 'java.lang.String[][]', 'int', 'int', 'int', 'int'],
    'ret': 'void',
    'slots': 11}),
  ('instance method reserves this slot',
   ('(JDIIII)J', False),
   {'args': ['long', 'double', 'int', 'int', 'int', 'int'], 'ret': 'long', 'slots': 9}),
  ('void array return rejected', ('(IIII)[V', True), ['ClassFormatError', 7]),
  ('void argument rejected', ('(IIIIV)V', True), ['ClassFormatError', 5]),
  ('empty class name rejected', ('(IIIIL;)V', False), ['ClassFormatError', 5]),
  ('trailing characters rejected', ('(IIIILpkg/A;)Lpkg/B;x', False), ['ClassFormatError', 20]),
  ('255 array dimensions accepted',
   ('([[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[IIIII)V',
    True),
   {'args': ['int[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]',
             'int',
             'int',
             'int',
             'int'],
    'ret': 'void',
    'slots': 5}),
  ('256 array dimensions rejected',
   ('([[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[IIIII)V',
    True),
   ['ClassFormatError', 257]),
  ('control: missing parenthesis', ('I)V', True), ['ClassFormatError', 0])],
 [('regression: mixed wide and array arguments',
   ('(IJ[JD[[Ljava/lang/String;IIIII)V', True),
   {'args': ['int', 'long', 'long[]', 'double', 'java.lang.String[][]', 'int', 'int', 'int', 'int', 'int'],
    'ret': 'void',
    'slots': 12}),
  ('instance method reserves this slot',
   ('(JDIIIII)J', False),
   {'args': ['long', 'double', 'int', 'int', 'int', 'int', 'int'], 'ret': 'long', 'slots': 10}),
  ('void array return rejected', ('(IIIII)[V', True), ['ClassFormatError', 8]),
  ('void argument rejected', ('(IIIIIV)V', True), ['ClassFormatError', 6]),
  ('empty class name rejected', ('(IIIIIL;)V', False), ['ClassFormatError', 6]),
  ('trailing characters rejected', ('(IIIIILpkg/A;)Lpkg/B;x', False), ['ClassFormatError', 21]),
  ('255 array dimensions accepted',
   ('([[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[IIIIII)V',
    True),
   {'args': ['int[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]',
             'int',
             'int',
             'int',
             'int',
             'int'],
    'ret': 'void',
    'slots': 6}),
  ('256 array dimensions rejected',
   ('([[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[IIIIII)V',
    True),
   ['ClassFormatError', 257]),
  ('control: missing parenthesis', ('I)V', True), ['ClassFormatError', 0])]]
for label, args, expected in cases[N - 1]:
    check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
regression: mixed wide and array arguments{'args': ['int', 'long', 'long[]', 'double', 'java.lang.String[][]', 'int'], 'ret': 'void', 'slots': 8}{'args': ['int', 'long', 'long[]', 'double', 'java.lang.String[][]', 'int'], 'ret': 'void', 'slots': 8}Passed
instance method reserves this slot{'args': ['long', 'double', 'int'], 'ret': 'long', 'slots': 6}{'args': ['long', 'double', 'int'], 'ret': 'long', 'slots': 6}Passed
void array return rejected['ClassFormatError', 4]['ClassFormatError', 4]Passed
void argument rejected['ClassFormatError', 2]['ClassFormatError', 2]Passed
empty class name rejected['ClassFormatError', 2]['ClassFormatError', 2]Passed
trailing characters rejected['ClassFormatError', 17]['ClassFormatError', 17]Passed
255 array dimensions accepted{'args': ['int[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]', 'int'], 'ret': 'void', 'slots': 2}{'args': ['int[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]', 'int'], 'ret': 'void', 'slots': 2}Passed
256 array dimensions rejected['ClassFormatError', 257]['ClassFormatError', 257]Passed
control: missing parenthesis['ClassFormatError', 0]['ClassFormatError', 0]Passed

SHA-256 / 16a7b4b351b3d9f2abbd716c4133ca4ef622b119416663d26e8e968a9e2ec0ce

Verification & scope

A deterministic, bounded teaching model of one bytecode virtual machine mechanism with a stipulated instruction encoding; it is not a production VM and claims no conformance to any real specification. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.

Observations recorded using Python 3.12.14 at 2026-09-29T14:51:23.220037+00:00.

Case digest / 3be776f5607c75d6cfdb3b5fc2f2d1c2fbf566630560f89819ae8920ba99aa29