Buggy code:
public class SettingsFactory { private static final Logger log = LoggerFactory . getLogger ( SettingsFactory . class ) ; private static final boolean _TRACE = SettingsFactory . log . isTraceEnabled ( ) ; private static final boolean _DEBUG = SettingsFactory . log . isDebugEnabled ( ) ; private static final boolean _INFO = SettingsFactory . log . isInfoEnabled ( ) ; public static final int CONFIG_API_VERSION = 5 ; public static void addNamespaceEntries ( final Repository serverConfigurationRdf , final QueryAllConfiguration nextSettings ) { } public static void addNormalisationRules ( final Repository serverConfigurationRdf , final QueryAllConfiguration nextSettings ) { } public static void addProfiles ( final Repository serverConfigurationRdf , final QueryAllConfiguration nextSettings ) { } public static void addProviders ( final Repository serverConfigurationRdf , final QueryAllConfiguration nextSettings ) { } public static void addQueryTypes ( final Repository serverConfigurationRdf , final QueryAllConfiguration nextSettings ) { } public static void addRuleTests ( final Repository serverConfigurationRdf , final QueryAllConfiguration nextSettings ) { } public static boolean configRefreshCheck ( final QueryAllConfiguration nextSettings , final boolean tryToForceRefresh ) { } public static void extractProperties ( final QueryAllConfiguration nextSettings , final Repository webAppConfigurationRdf , final Collection < URI > webappConfigUris ) { RepositoryConnection conn = null ; try { conn = webAppConfigurationRdf . getConnection ( ) ; final Collection < String > propertyBaseUriQueries = new ArrayList < String > ( ) ; <START_BUG> propertyBaseUriQueries . add ( "SELECT<seq2seq4repair_space>?key<seq2seq4repair_space>?uri<seq2seq4repair_space>?value<seq2seq4repair_space>WHERE<seq2seq4repair_space>{<seq2seq4repair_space>?uri<seq2seq4repair_space>?predicate<seq2seq4repair_space>?value<seq2seq4repair_space>.<seq2seq4repair_space>FILTER(strstarts(str(?uri),<seq2seq4repair_space>\"http:////purl.org//queryall//webapp_config:\")<seq2seq4repair_space>.<seq2seq4repair_space>BIND(substr(str(?uri),<seq2seq4repair_space>39)<seq2seq4repair_space>AS<seq2seq4repair_space>?key)<seq2seq4repair_space>.<seq2seq4repair_space>}<seq2seq4repair_space>" ) ; <END_BUG> for ( final String nextQuery : propertyBaseUriQueries ) { try { final TupleQuery tupleQuery = conn . prepareTupleQuery ( SPARQL , nextQuery ) ; final TupleQueryResult tupleQueryResult = tupleQuery . evaluate ( ) ; while ( tupleQueryResult . hasNext ( ) ) { final BindingSet bindingSet = tupleQueryResult . next ( ) ; final Binding key = bindingSet . getBinding ( "key" ) ; final Binding value = bindingSet . getBinding ( "value" ) ; nextSettings . setProperty ( key . getValue ( ) . stringValue ( ) , value . getValue ( ) ) ; } } catch ( final MalformedQueryException e ) { SettingsFactory . log . error ( ( "Found<seq2seq4repair_space>MalformedQueryException<seq2seq4repair_space>nextQuery=" + nextQuery ) , e ) ; } catch ( final QueryEvaluationException e ) { SettingsFactory . log . error ( ( "Found<seq2seq4repair_space>QueryEvaluationException<seq2seq4repair_space>nextQuery=" + nextQuery ) , e ) ; } } } catch ( final RepositoryException e ) { SettingsFactory . log . error ( "Found<seq2seq4repair_space>exception<seq2seq4repair_space>while<seq2seq4repair_space>extracting<seq2seq4repair_space>properties" , e ) ; } finally { if ( conn != null ) { try { conn . close ( ) ; } catch ( final RepositoryException e ) { SettingsFactory . log . error ( "Found<seq2seq4repair_space>exception<seq2seq4repair_space>while<seq2seq4repair_space>closing<seq2seq4repair_space>connection" , e ) ; } } } } public static QueryAllConfiguration generateSettings ( ) { } public static QueryAllConfiguration generateSettings ( final String baseConfigLocation , final String baseConfigMimeType , final String baseConfigUri ) { } public static Collection < String > getBackupConfigLocations ( final Repository webAppConfigurationRdf , final Collection < URI > webappConfigUris ) throws OpenRDFException { } private static Repository getBaseConfigurationRdf ( final String baseConfigLocation , final String baseConfigMimeType , final String baseConfigUri ) throws InterruptedException { } public static Collection < String > getConfigLocations ( final Repository webAppConfigurationRdf , final Collection < URI > webappConfigUris ) throws OpenRDFException { } public static String getDefaultBaseConfigLocationProperty ( ) { } public static String getDefaultBaseConfigMimeFormatProperty ( ) { } public static String getDefaultBaseConfigUriProperty ( ) { } private static Repository getServerConfigurationRdf ( final Collection < String > queryConfigLocations , final Collection < String > backupQueryConfigLocations ) throws InterruptedException { } public static Collection < Value > getWebappConfigLocations ( final Repository baseConfigurationRdf , final URI baseConfigUri ) throws OpenRDFException { } private static Repository getWebAppConfigurationRdf ( final Repository baseConfigurationRepository , final String baseConfigLocation , final String baseConfigMimeType , final String baseConfigUri , final Collection < Value > webappConfigFiles , final Collection < URI > activeWebappConfigs ) throws InterruptedException { } public static Collection < URI > getWebappConfigUris ( final Repository baseConfigurationRdf , final URI baseConfigUri ) throws OpenRDFException { } private SettingsFactory ( ) { } public Collection < Statement > getStatementProperties ( final String key , final Collection < URI > webappConfigUris , final Repository webappConfig ) { } private Collection < Statement > getStatementProperties ( final URI subjectUri , final URI propertyUri , final Repository nextRepository ) { } private Collection < Value > getValueProperties ( final String key , final Repository webappConfig , final Collection < URI > webappConfigUriList ) { } private Collection < Value > getValueProperties ( final URI subjectUri , final URI propertyUri , final Repository webappConfig ) throws InterruptedException { } }

Fix:
propertyBaseUriQueries . add ( "SELECT<seq2seq4repair_space>?key<seq2seq4repair_space>?uri<seq2seq4repair_space>?value<seq2seq4repair_space>WHERE<seq2seq4repair_space>{<seq2seq4repair_space>?uri<seq2seq4repair_space>?predicate<seq2seq4repair_space>?value<seq2seq4repair_space>.<seq2seq4repair_space>FILTER(strstarts(str(?uri),<seq2seq4repair_space>\"http:////purl.org//queryall//webapp_config:\"))<seq2seq4repair_space>.<seq2seq4repair_space>BIND(substr(str(?uri),<seq2seq4repair_space>39)<seq2seq4repair_space>AS<seq2seq4repair_space>?key)<seq2seq4repair_space>.<seq2seq4repair_space>}<seq2seq4repair_space>" ) ;