question: protected boolean urlIsValid ( String sitemapBaseUrl , String testUrl ) { boolean ret = false ; if ( sitemapBaseUrl != null && sitemapBaseUrl . length ( ) <= testUrl . length ( ) ) { String u = testUrl . substring ( 0 , sitemapBaseUrl . length ( ) ) ; ret = sitemapBaseUrl . equals ( u ) ; } return ret ; }
target:  See if testUrl is under sitemapBaseUrl. Only URLs under sitemapBaseUrl are valid.