Buggy code:
@ Component @ Transactional ( readOnly = true ) public class DataHarvestService { @ Autowired private PageurlinfoService pageurlinfoService ; @ Autowired private PagedatainfoService pagedatainfoService ; double similarityTreshold = 0.8 ; boolean ignoreFormattingTags = false ; boolean useContentSimilarity = false ; int maxNodeInGeneralizedNodes = 9 ; @ Autowired private JdbcTemplate jdbcTemplate ; Pagedatainfo listPagedatainfo = null ; Message logmsg = new Message ( ) ; public List getPiechartData ( ) { } public List getPiechartDate ( String url ) { } public boolean selectedsave ( Pageurlinfo pageurlinfo ) { Document doc ; try { logmsg . setMessage ( null ) ; <START_BUG> doc = Jsoup . connect ( pageurlinfo . getUrl ( ) ) . ignoreContentType ( true ) . parser ( Parser . xmlParser ( ) ) . get ( ) ; <END_BUG> String selectedelement = ( ( ( ( ( pageurlinfo . getElement ( ) ) + "[" ) + ( pageurlinfo . getAttribute ( ) ) ) + "=" ) + ( pageurlinfo . getValue ( ) ) ) + "]" ; Elements elements = doc . select ( selectedelement ) ; for ( Element element2 : elements ) { String tableGroupKey = OperationNoUtil . getUUID ( ) ; element2 . getAllElements ( ) ; for ( Element element : element2 . getAllElements ( ) ) { String rowGroupKey = OperationNoUtil . getUUID ( ) ; if ( element . nodeName ( ) . equals ( "img" ) ) { for ( Attribute attribute : element . attributes ( ) ) { if ( "src" . equals ( attribute . getKey ( ) ) ) { Pagedatainfo pagedatainfo = new Pagedatainfo ( ) ; if ( ! ( element . ownText ( ) . isEmpty ( ) ) ) { pagedatainfo . setContent ( ( ( ( element . ownText ( ) ) + "|" ) + ( element . absUrl ( "src" ) ) ) ) ; } else { pagedatainfo . setContent ( element . absUrl ( "src" ) ) ; } pagedatainfo . setType ( element . nodeName ( ) ) ; pagedatainfo . setExtractedDate ( DateTimeUtil . nowTimeStr ( ) ) ; pagedatainfo . setRowGroupKey ( rowGroupKey ) ; pagedatainfo . setTableGroupKey ( tableGroupKey ) ; pagedatainfo . setPageurlinfo ( pageurlinfo ) ; pageDataInfoSave ( pagedatainfo ) ; listPagedatainfo = pagedatainfo ; listPagedatainfo . setContent ( pagedatainfo . getContent ( ) ) ; listPagedatainfo . setPageurlinfo ( pageurlinfo ) ; listPagedatainfo . setExtractedDate ( DateTimeUtil . nowTimeStr ( ) ) ; logmsg . setSuccess ( true ) ; } if ( "abs:src" . equals ( attribute . getKey ( ) ) ) { Pagedatainfo pagedatainfo = new Pagedatainfo ( ) ; if ( ! ( element . ownText ( ) . isEmpty ( ) ) ) { pagedatainfo . setContent ( ( ( ( element . ownText ( ) ) + "|" ) + ( element . attr ( "abs:src" ) ) ) ) ; } else { pagedatainfo . setContent ( element . attr ( "abs:src" ) ) ; } pagedatainfo . setType ( element . nodeName ( ) ) ; pagedatainfo . setExtractedDate ( DateTimeUtil . nowTimeStr ( ) ) ; pagedatainfo . setRowGroupKey ( rowGroupKey ) ; pagedatainfo . setTableGroupKey ( tableGroupKey ) ; pagedatainfo . setPageurlinfo ( pageurlinfo ) ; pageDataInfoSave ( pagedatainfo ) ; listPagedatainfo = pagedatainfo ; listPagedatainfo . setContent ( pagedatainfo . getContent ( ) ) ; listPagedatainfo . setPageurlinfo ( pageurlinfo ) ; listPagedatainfo . setExtractedDate ( DateTimeUtil . nowTimeStr ( ) ) ; logmsg . setSuccess ( true ) ; } if ( "data-lazyload" . equals ( attribute . getKey ( ) ) ) { Pagedatainfo pagedatainfo = new Pagedatainfo ( ) ; if ( ! ( element . ownText ( ) . isEmpty ( ) ) ) { pagedatainfo . setContent ( ( ( ( element . ownText ( ) ) + "|" ) + ( element . attr ( "data-lazyload" ) ) ) ) ; } else { pagedatainfo . setContent ( element . attr ( "data-lazyload" ) ) ; } pagedatainfo . setPageurlinfo ( pageurlinfo ) ; pagedatainfo . setExtractedDate ( DateTimeUtil . nowTimeStr ( ) ) ; pagedatainfo . setType ( element . nodeName ( ) ) ; pagedatainfo . setRowGroupKey ( rowGroupKey ) ; pagedatainfo . setTableGroupKey ( tableGroupKey ) ; pageDataInfoSave ( pagedatainfo ) ; listPagedatainfo = pagedatainfo ; listPagedatainfo . setContent ( pagedatainfo . getContent ( ) ) ; listPagedatainfo . setPageurlinfo ( pageurlinfo ) ; listPagedatainfo . setExtractedDate ( DateTimeUtil . nowTimeStr ( ) ) ; logmsg . setSuccess ( true ) ; } } } else if ( element . nodeName ( ) . equals ( "a" ) ) { Pagedatainfo pagedatainfo = new Pagedatainfo ( ) ; if ( ! ( element . ownText ( ) . isEmpty ( ) ) ) { pagedatainfo . setContent ( ( ( ( element . ownText ( ) ) + "|" ) + ( element . attr ( "abs:href" ) ) ) ) ; } else { pagedatainfo . setContent ( element . attr ( "abs:href" ) ) ; } pagedatainfo . setType ( element . nodeName ( ) ) ; pagedatainfo . setExtractedDate ( DateTimeUtil . nowTimeStr ( ) ) ; pagedatainfo . setRowGroupKey ( rowGroupKey ) ; pagedatainfo . setPageurlinfo ( pageurlinfo ) ; pagedatainfo . setTableGroupKey ( tableGroupKey ) ; pageDataInfoSave ( pagedatainfo ) ; listPagedatainfo = pagedatainfo ; listPagedatainfo . setContent ( pagedatainfo . getContent ( ) ) ; listPagedatainfo . setPageurlinfo ( pageurlinfo ) ; listPagedatainfo . setExtractedDate ( DateTimeUtil . nowTimeStr ( ) ) ; logmsg . setSuccess ( true ) ; } else if ( element . nodeName ( ) . equals ( "script" ) ) { } else if ( element . nodeName ( ) . equals ( "Imports" ) ) { } else { Pagedatainfo pagedatainfo = new Pagedatainfo ( ) ;

Fix:
doc = Jsoup . connect ( pageurlinfo . getUrl ( ) ) . userAgent ( "Mozilla//4.0" ) . ignoreContentType ( true ) . parser ( Parser . xmlParser ( ) ) . get ( ) ;