Buggy code:
public class HarvestUtil { static double similarityTreshold = 0.8 ; static boolean ignoreFormattingTags = false ; static boolean useContentSimilarity = false ; static int maxNodeInGeneralizedNodes = 9 ; private static Pattern absoluteURIPattern = Pattern . compile ( "^.*:.*$" ) ; private static Pattern PartialURIPattern = Pattern . compile ( "////.*$" ) ; public static String getContent ( Element element , String url ) throws MalformedURLException { String content = "" ; if ( element . nodeName ( ) . equals ( "img" ) ) { String absUrl = HarvestUtil . getabsUrl ( url , element . attr ( "src" ) ) ; for ( Attribute attribute : element . attributes ( ) ) { if ( "src" . equals ( attribute . getKey ( ) ) ) { if ( ! ( element . ownText ( ) . isEmpty ( ) ) ) { content = ( ( ( ( ( ( element . ownText ( ) ) + "|" ) + "<img<seq2seq4repair_space>src='" ) + absUrl ) + "\'<seq2seq4repair_space>alt=\"+" ) + ( element . ownText ( ) ) ) + "\"<seq2seq4repair_space>>" ; } else { content = ( ( ( "<img<seq2seq4repair_space>src='" + absUrl ) + "\'<seq2seq4repair_space>alt=\"+" ) + ( element . ownText ( ) ) ) + "\"<seq2seq4repair_space>>" ; } } if ( "abs:src" . equals ( attribute . getKey ( ) ) ) { if ( ! ( element . ownText ( ) . isEmpty ( ) ) ) { content = ( ( ( ( ( ( element . ownText ( ) ) + "|" ) + "<img<seq2seq4repair_space>src='" ) + absUrl ) + "\'<seq2seq4repair_space>alt=\"+" ) + ( element . ownText ( ) ) ) + "\"<seq2seq4repair_space>>" ; } else { content = ( ( ( "<img<seq2seq4repair_space>src='" + absUrl ) + "\'<seq2seq4repair_space>alt=\"+" ) + ( element . ownText ( ) ) ) + "\"<seq2seq4repair_space>>" ; } } if ( "data-lazyload" . equals ( attribute . getKey ( ) ) ) { absUrl = HarvestUtil . getabsUrl ( url , element . attr ( "data-lazyload" ) ) ; if ( ! ( element . ownText ( ) . isEmpty ( ) ) ) { content = ( ( ( ( ( ( element . ownText ( ) ) + "|" ) + "<img<seq2seq4repair_space>src=\"" ) + absUrl ) + "\"<seq2seq4repair_space>alt=\"+" ) + ( element . ownText ( ) ) ) + "\"<seq2seq4repair_space>>" ; } else { content = ( ( ( "<img<seq2seq4repair_space>src='" + absUrl ) + "\'<seq2seq4repair_space>alt=\"+" ) + ( element . ownText ( ) ) ) + "\"<seq2seq4repair_space>>" ; } } } } else if ( ( element . nodeName ( ) . equals ( "a" ) ) && ( ! ( element . attr ( "href" ) . isEmpty ( ) ) ) ) { String absUrl = HarvestUtil . getabsUrl ( url , element . attr ( "href" ) ) ; if ( ! ( element . ownText ( ) . isEmpty ( ) ) ) { <START_BUG> content = ( ( ( ( ( ( element . ownText ( ) ) + "|" ) + "<a<seq2seq4repair_space>href='" ) + absUrl ) + "'>" ) + ( element . ownText ( ) ) ) + "<//a>" ; <END_BUG> } else { content = ( "<a<seq2seq4repair_space>href='" + absUrl ) + "'>Link<//a>" ; } } else if ( element . nodeName ( ) . equals ( "script" ) ) { } else if ( element . nodeName ( ) . equals ( "Imports" ) ) { } else { content = element . ownText ( ) ; } return content ; } public static HtmlPage getPage ( String url ) { } public static List < String [ ] [ ] > getDataTables ( String url ) { } public static String getTagType ( String data ) { } public static String getabsUrl ( String baseURL , String relativeUrl ) throws MalformedURLException { } }

Fix:
content = ( ( ( "<a<seq2seq4repair_space>href='" + absUrl ) + "'>" ) + ( element . ownText ( ) ) ) + "<//a>" ;