Buggy code:
public class Parser { private OnReportListener onReportListener ; public Parser ( ExceptionReporter . OnReportListener onReportListener ) { } public ArrayList < Image > parseImages ( String data ) { } public ImagePage parseImagePage ( String data , String url ) { Document document = Jsoup . parse ( data , NetworkDataProvider . WALLHAVEN_BASE_URL ) ; String title = document . head ( ) . select ( "title" ) . text ( ) ; String [ ] strings = title . split ( "Wallpaper" ) ; title = strings [ 0 ] . trim ( ) ; String idUri = Uri . parse ( url ) . getLastPathSegment ( ) ; String categoryMatch = "div.sidebar-section<seq2seq4repair_space>dl<seq2seq4repair_space>dd" ; String category = "Unknown" ; try { Element categoryElement = document . select ( categoryMatch ) . get ( 2 ) ; category = categoryElement . text ( ) ; } catch ( IndexOutOfBoundsException e ) { reportCrash ( categoryMatch , e ) ; } Element sfwElement = document . select ( "fieldset.framed<seq2seq4repair_space>input" ) . first ( ) ; String rating = "Unknown" ; if ( sfwElement != null ) { if ( sfwElement . toString ( ) . contains ( "checked" ) ) { rating = "SFW" ; } else { rating = "Sketchy" ; } } String uploaderMatch = "div.sidebar-section<seq2seq4repair_space>dl<seq2seq4repair_space>dd" ; String uploader = "Unknown" ; try { Element uploaderElement = document . select ( uploaderMatch ) . get ( 5 ) ; uploader = uploaderElement . text ( ) ; if ( uploader != null ) { uploader = uploader . trim ( ) ; } } catch ( IndexOutOfBoundsException e ) { reportCrash ( uploaderMatch , e ) ; } String uploadDateMatch = "div.sidebar-section<seq2seq4repair_space>dl<seq2seq4repair_space>dd" ; String uploadDate = "Unknown" ; try { Element uploadDateElement = document . select ( uploadDateMatch ) . get ( 6 ) ; if ( ( uploadDateElement . text ( ) ) != null ) { uploadDate = uploadDateElement . text ( ) ; } } catch ( IndexOutOfBoundsException e ) { reportCrash ( uploadDateMatch , e ) ; } String sourceMatch = "div.sidebar-section<seq2seq4repair_space>dl<seq2seq4repair_space>dd" ; Author author = Author . create ( "Unknown" , EMPTY ) ; try { Element sourceElement = document . select ( sourceMatch ) . get ( 7 ) ; String linkText = sourceElement . text ( ) ; String linkHref = sourceElement . select ( "a" ) . attr ( "href" ) ; if ( ! ( TextUtils . isEmpty ( linkText ) ) ) { Uri uri = Uri . EMPTY ; if ( ! ( TextUtils . isEmpty ( linkHref ) ) ) { uri = Uri . parse ( linkHref ) ; } author = Author . create ( linkText , uri ) ; } } catch ( IndexOutOfBoundsException e ) { reportCrash ( sourceMatch , e ) ; } <START_BUG> Element imageUrlElement = document . select ( "div#showcase<seq2seq4repair_space>img#wallpaper" ) . first ( ) ; <END_BUG> String resolution = "0<seq2seq4repair_space>x<seq2seq4repair_space>0" ; Uri imagePath = Uri . EMPTY ; if ( imageUrlElement != null ) { String width = imageUrlElement . attr ( "data-wallpaper-width" ) ; String height = imageUrlElement . attr ( "data-wallpaper-height" ) ; resolution = ( width + "<seq2seq4repair_space>x<seq2seq4repair_space>" ) + height ; String imageUrl = imageUrlElement . attr ( "src" ) ; imagePath = Uri . parse ( imageUrl ) ; if ( ( ( ( imagePath . getScheme ( ) ) == null ) || ( ! ( imagePath . getScheme ( ) . equalsIgnoreCase ( "http" ) ) ) ) || ( ! ( imagePath . getScheme ( ) . equalsIgnoreCase ( "https" ) ) ) ) { imagePath = imagePath . buildUpon ( ) . scheme ( "http" ) . build ( ) ; } } return ImagePage . create ( title , idUri , imagePath , resolution , category , rating , uploader , uploadDate , author ) ; } private void reportCrash ( String match , Exception e ) { } }

Fix:
Element imageUrlElement = document . select ( "section#showcase<seq2seq4repair_space>img#wallpaper" ) . first ( ) ;