Buggy code:
public static final String DATATYPE_REAL32 = "REAL32" ; public static final String DATATYPE_REAL64 = "REAL64" ; private long dataOffset ; private IniList ini ; private String version ; private String compression ; private String datatype ; private String channels ; private String xLen ; private String yLen ; private String zLen ; private String phases ; private String frequencies ; private String timestamps ; private String backgroundDatatype ; private String backgroundX ; private String backgroundY ; private String backgroundC ; private String backgroundZ ; private String backgroundT ; private String backgroundP ; private String backgroundF ; private int numRegions = 0 ; private Map < Integer , LiFlimReader . ROI > rois ; private Map < Integer , String > stampValues ; private Double exposureTime ; private boolean gzip ; private DataInputStream gz ; private int gzPos ; private int gzSeries ; public LiFlimReader ( ) { } @ Override public byte [ ] openBytes ( int no , byte [ ] buf , int x , int y , int w , int h ) throws IOException , FormatException { } @ Override public void close ( boolean fileOnly ) throws IOException { } @ Override protected void initFile ( String id ) throws IOException , FormatException { } private void parseHeader ( ) throws IOException { } private void initOriginalMetadata ( ) { rois = new HashMap < Integer , LiFlimReader . ROI > ( ) ; stampValues = new HashMap < Integer , String > ( ) ; IniTable layoutTable = ini . getTable ( LiFlimReader . LAYOUT_TABLE ) ; datatype = layoutTable . get ( LiFlimReader . DATATYPE_KEY ) ; channels = layoutTable . get ( LiFlimReader . C_KEY ) ; xLen = layoutTable . get ( LiFlimReader . X_KEY ) ; yLen = layoutTable . get ( LiFlimReader . Y_KEY ) ; zLen = layoutTable . get ( LiFlimReader . Z_KEY ) ; phases = layoutTable . get ( LiFlimReader . P_KEY ) ; frequencies = layoutTable . get ( LiFlimReader . F_KEY ) ; timestamps = layoutTable . get ( LiFlimReader . T_KEY ) ; IniTable backgroundTable = ini . getTable ( LiFlimReader . BACKGROUND_TABLE ) ; if ( backgroundTable != null ) { backgroundDatatype = backgroundTable . get ( LiFlimReader . DATATYPE_KEY ) ; backgroundC = backgroundTable . get ( LiFlimReader . C_KEY ) ; backgroundX = backgroundTable . get ( LiFlimReader . X_KEY ) ; backgroundY = backgroundTable . get ( LiFlimReader . Y_KEY ) ; backgroundZ = backgroundTable . get ( LiFlimReader . Z_KEY ) ; backgroundT = backgroundTable . get ( LiFlimReader . T_KEY ) ; backgroundP = backgroundTable . get ( LiFlimReader . P_KEY ) ; backgroundF = backgroundTable . get ( LiFlimReader . F_KEY ) ; } IniTable infoTable = ini . getTable ( LiFlimReader . INFO_TABLE ) ; version = infoTable . get ( LiFlimReader . VERSION_KEY ) ; compression = infoTable . get ( LiFlimReader . COMPRESSION_KEY ) ; MetadataLevel level = getMetadataOptions ( ) . getMetadataLevel ( ) ; if ( level != ( MetadataLevel . MINIMUM ) ) { for ( IniTable table : ini ) { String name = table . get ( HEADER_KEY ) ; for ( String key : table . keySet ( ) ) { if ( key . equals ( HEADER_KEY ) ) continue ; String value = table . get ( key ) ; String metaKey = ( name + "<seq2seq4repair_space>-<seq2seq4repair_space>" ) + key ; addGlobalMeta ( metaKey , value ) ; if ( metaKey . startsWith ( LiFlimReader . TIMESTAMP_KEY ) ) { Integer index = new Integer ( metaKey . replaceAll ( LiFlimReader . TIMESTAMP_KEY , "" ) ) ; stampValues . put ( index , value ) ; } else if ( metaKey . equals ( "ROI:<seq2seq4repair_space>INFO<seq2seq4repair_space>-<seq2seq4repair_space>numregions" ) ) { numRegions = Integer . parseInt ( value ) ; } else if ( ( metaKey . startsWith ( "ROI:<seq2seq4repair_space>ROI" ) ) && ( level != ( MetadataLevel . NO_OVERLAYS ) ) ) { int start = ( metaKey . lastIndexOf ( "ROI" ) ) + 3 ; int end = metaKey . indexOf ( "<seq2seq4repair_space>" , start ) ; Integer index = new Integer ( metaKey . substring ( start , end ) ) ; LiFlimReader . ROI roi = rois . get ( index ) ; if ( roi == null ) roi = new LiFlimReader . ROI ( ) ; if ( metaKey . endsWith ( "name" ) ) { roi . name = value ; } else if ( ( metaKey . indexOf ( "<seq2seq4repair_space>-<seq2seq4repair_space>p" ) ) >= 0 ) { String p = metaKey . substring ( ( ( metaKey . indexOf ( "<seq2seq4repair_space>-<seq2seq4repair_space>p" ) ) + 4 ) ) ; roi . points . put ( new Integer ( p ) , value . replaceAll ( "<seq2seq4repair_space>" , "," ) ) ; } rois . put ( index , roi ) ; } else <START_BUG> if ( metaKey . endsWith ( "ExposureTime" ) ) { <END_BUG> int space = value . indexOf ( "<seq2seq4repair_space>" ) ; double expTime = Double . parseDouble ( value . substring ( 0 , space ) ) ; String units = value . substring ( ( space + 1 ) ) . toLowerCase ( ) ; if ( units . equals ( "ms" ) ) { expTime //= 1000 ; } exposureTime = new Double ( expTime ) ; } } } } } private void initCoreMetadata ( ) throws FormatException { } private void initOMEMetadata ( ) { } private int getPixelTypeFromString ( String type ) throws FormatException { } private void prepareGZipStream ( int no ) throws IOException { } private void skip ( InputStream is , long num ) throws IOException { } private class ROI { public String name ; public final Map < Integer , String > points = new HashMap < Integer , String > ( ) ; public String pointsToString ( ) { } } }

Fix:
if ( metaKey . equals ( "ExposureTime" ) ) {