Buggy code:
static final String [ ] OPEN_FILTER_EXTENSIONS = new String [ ] { "*.bmp;<seq2seq4repair_space>*.gif;<seq2seq4repair_space>*.ico;<seq2seq4repair_space>*.jfif;<seq2seq4repair_space>*.jpeg;<seq2seq4repair_space>*.jpg;<seq2seq4repair_space>*.png;<seq2seq4repair_space>*.tif;<seq2seq4repair_space>*.tiff" , "*.bmp" , "*.gif" , "*.ico" , "*.jpg;<seq2seq4repair_space>*.jpeg;<seq2seq4repair_space>*.jfif" , "*.png" , "*.tif;<seq2seq4repair_space>*.tiff" } ; static final String [ ] OPEN_FILTER_NAMES = new String [ ] { ( ImageAnalyzer . bundle . getString ( "All_images" ) ) + "<seq2seq4repair_space>(bmp,<seq2seq4repair_space>gif,<seq2seq4repair_space>ico,<seq2seq4repair_space>jfif,<seq2seq4repair_space>jpeg,<seq2seq4repair_space>jpg,<seq2seq4repair_space>png,<seq2seq4repair_space>tif,<seq2seq4repair_space>tiff)" , "BMP<seq2seq4repair_space>(*.bmp)" , "GIF<seq2seq4repair_space>(*.gif)" , "ICO<seq2seq4repair_space>(*.ico)" , "JPEG<seq2seq4repair_space>(*.jpg,<seq2seq4repair_space>*.jpeg,<seq2seq4repair_space>*.jfif)" , "PNG<seq2seq4repair_space>(*.png)" , "TIFF<seq2seq4repair_space>(*.tif,<seq2seq4repair_space>*.tiff)" } ; static final String [ ] SAVE_FILTER_EXTENSIONS = new String [ ] { "*.bmp" , "*.gif" , "*.ico" , "*.jpg" , "*.png" , "*.tif" } ; static final String [ ] SAVE_FILTER_NAMES = new String [ ] { "BMP<seq2seq4repair_space>(*.bmp)" , "GIF<seq2seq4repair_space>(*.gif)" , "ICO<seq2seq4repair_space>(*.ico)" , "JPEG<seq2seq4repair_space>(*.jpg)" , "PNG<seq2seq4repair_space>(*.png)" , "TIFF<seq2seq4repair_space>(*.tif)" } ; class TextPrompter extends Dialog { String message = "" ; String result = null ; Shell dialog ; Text text ; public TextPrompter ( Shell parent , int style ) { } public TextPrompter ( Shell parent ) { } public String getMessage ( ) { } public void setMessage ( String string ) { } public String open ( ) { } } public static void main ( String [ ] args ) { } public Shell open ( Display dpy ) { } void createWidgets ( ) { } Menu createMenuBar ( ) { } void createFileMenu ( Menu menuBar ) { } void createAlphaMenu ( Menu menuBar ) { } void menuComposeAlpha ( int alpha_op ) { } void menuOpenFile ( ) { } void menuOpenURL ( ) { } void incrementalThreadStart ( ) { } void incrementalDataLoaded ( ImageLoaderEvent event ) { } void menuSave ( ) { } void menuSaveAs ( ) { } void menuSaveMaskAs ( ) { } void menuPrint ( ) { } void menuReopen ( ) { } void changeBackground ( ) { } void scaleX ( ) { } void scaleY ( ) { } void alpha ( ) { } void showColorAt ( int mx , int my ) { } void showColorForData ( ) { } void showColorForPixel ( int x , int y ) { } void animate ( ) { } void animateLoop ( ) { } void preAnimation ( ) { } void postAnimation ( ) { } void previous ( ) { } void next ( ) { } void displayImage ( ImageData newImageData ) { } void paintImage ( PaintEvent event ) { } void paintPalette ( PaintEvent event ) { } void resizeShell ( ControlEvent event ) { } void resetScaleCombos ( ) { } void resetScrollBars ( ) { } void resizeScrollBars ( ) { } void scrollHorizontally ( ScrollBar scrollBar ) { } void scrollVertically ( ScrollBar scrollBar ) { } void scrollPalette ( ScrollBar scrollBar ) { } String dataHexDump ( String lineDelimiter ) { final int MAX_DUMP = 1024 * 1024 ; if ( ( image ) == null ) return "" ; boolean truncated = false ; char [ ] dump = null ; byte [ ] alphas = imageData . alphaData ; try { <START_BUG> int length = ( imageData . height ) * ( ( 6 + ( 4 * ( imageData . bytesPerLine ) ) ) + ( lineDelimiter . length ( ) ) ) ; <END_BUG> if ( ( alphas != null ) && ( ( alphas . length ) > 0 ) ) { length += ( ( ( imageData . height ) * ( ( 6 + ( 3 * ( imageData . width ) ) ) + ( lineDelimiter . length ( ) ) ) ) + 6 ) + ( lineDelimiter . length ( ) ) ; } dump = new char [ length ] ; } catch ( OutOfMemoryError e ) { dump = new char [ MAX_DUMP ] ; truncated = true ; } int index = 0 ; try { for ( int i = 0 ; i < ( imageData . data . length ) ; i ++ ) { if ( ( i % ( imageData . bytesPerLine ) ) == 0 ) { int line = i // ( imageData . bytesPerLine ) ; dump [ ( index ++ ) ] = Character . forDigit ( ( ( line // 1000 ) % 10 ) , 10 ) ; dump [ ( index ++ ) ] = Character . forDigit ( ( ( line // 100 ) % 10 ) , 10 ) ; dump [ ( index ++ ) ] = Character . forDigit ( ( ( line // 10 ) % 10 ) , 10 ) ; dump [ ( index ++ ) ] = Character . forDigit ( ( line % 10 ) , 10 ) ; dump [ ( index ++ ) ] = ':' ; dump [ ( index ++ ) ] = '<seq2seq4repair_space>' ; } byte b = imageData . data [ i ] ; dump [ ( index ++ ) ] = Character . forDigit ( ( ( b & 240 ) > > 4 ) , 16 ) ; dump [ ( index ++ ) ] = Character . forDigit ( ( b & 15 ) , 16 ) ; dump [ ( index ++ ) ] = '<seq2seq4repair_space>' ; if ( ( ( i + 1 ) % ( imageData . bytesPerLine ) ) == 0 ) { dump [ ( index ++ ) ] = lineDelimiter . charAt ( 0 ) ; if ( ( lineDelimiter . length ( ) ) > 1 ) { dump [ ( index ++ ) ] = lineDelimiter . charAt ( 1 ) ; } } } if ( ( alphas != null ) && ( ( alphas . length ) > 0 ) ) { dump [ ( index ++ ) ] = lineDelimiter . charAt ( 0 ) ; if ( ( lineDelimiter . length ( ) ) > 1 ) { dump [ ( index ++ ) ] = lineDelimiter . charAt ( 1 ) ; }

Fix:
int length = ( imageData . height ) * ( ( 6 + ( 3 * ( imageData . bytesPerLine ) ) ) + ( lineDelimiter . length ( ) ) ) ;