Buggy code:
public class LeaderImpl implements Leader { private Long id ; private int recordLength ; private char recordStatus ; private char typeOfRecord ; private char [ ] implDefined1 ; private char charCodingScheme ; private int indicatorCount ; private int subfieldCodeLength ; private int baseAddressOfData ; private char [ ] implDefined2 ; private char [ ] entryMap ; public LeaderImpl ( ) { } public LeaderImpl ( final String ldr ) { } @ Override public void setRecordLength ( final int recordLength ) { } @ Override public void setRecordStatus ( final char recordStatus ) { } @ Override public void setTypeOfRecord ( final char typeOfRecord ) { } @ Override public void setImplDefined1 ( final char [ ] implDefined1 ) { } @ Override public void setCharCodingScheme ( final char charCodingScheme ) { } @ Override public void setIndicatorCount ( final int indicatorCount ) { } @ Override public void setSubfieldCodeLength ( final int subfieldCodeLength ) { } @ Override public void setBaseAddressOfData ( final int baseAddressOfData ) { } @ Override public void setImplDefined2 ( final char [ ] implDefined2 ) { } @ Override public void setEntryMap ( final char [ ] entryMap ) { } @ Override public int getRecordLength ( ) { } @ Override public char getRecordStatus ( ) { } @ Override public char getTypeOfRecord ( ) { } @ Override public char [ ] getImplDefined1 ( ) { } @ Override public char getCharCodingScheme ( ) { } @ Override public int getIndicatorCount ( ) { } @ Override public int getSubfieldCodeLength ( ) { } @ Override public int getBaseAddressOfData ( ) { } @ Override public char [ ] getImplDefined2 ( ) { } @ Override public char [ ] getEntryMap ( ) { } @ Override public void unmarshal ( final String ldr ) { try { String s ; s = ldr . substring ( 0 , 5 ) ; if ( isInteger ( s ) ) { setRecordLength ( Integer . parseInt ( s ) ) ; } else { setRecordLength ( 0 ) ; } setRecordStatus ( ldr . charAt ( 5 ) ) ; setTypeOfRecord ( ldr . charAt ( 6 ) ) ; setImplDefined1 ( ldr . substring ( 7 , 9 ) . toCharArray ( ) ) ; setCharCodingScheme ( ldr . charAt ( 9 ) ) ; s = String . valueOf ( ldr . charAt ( 10 ) ) ; if ( isInteger ( s ) ) { setIndicatorCount ( Integer . parseInt ( s ) ) ; } else { setIndicatorCount ( 2 ) ; } <START_BUG> s = String . valueOf ( ldr . charAt ( 10 ) ) ; <END_BUG> if ( isInteger ( s ) ) { setSubfieldCodeLength ( Integer . parseInt ( s ) ) ; } else { setSubfieldCodeLength ( 2 ) ; } s = ldr . substring ( 12 , 17 ) ; if ( isInteger ( s ) ) { setBaseAddressOfData ( Integer . parseInt ( s ) ) ; } else { setBaseAddressOfData ( 0 ) ; } setImplDefined2 ( ldr . substring ( 17 , 20 ) . toCharArray ( ) ) ; setEntryMap ( ldr . substring ( 20 , 24 ) . toCharArray ( ) ) ; } catch ( final NumberFormatException e ) { throw new RuntimeException ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>parse<seq2seq4repair_space>leader" , e ) ; } } @ Override public String marshal ( ) { } @ Override public String toString ( ) { } private boolean isInteger ( final String value ) { } private static DecimalFormat format5 = new CustomDecimalFormat ( 5 ) ; @ Override public void setId ( final Long id ) { } @ Override public Long getId ( ) { } }

Fix:
s = String . valueOf ( ldr . charAt ( 11 ) ) ;