question: private List < String > addRules ( int filterId , List < String > rules , boolean useCosmetics ) { InputStream inputStream = null ; InputStreamReader inputStreamReader = null ; BufferedReader reader = null ; try { String fileName = getOrCreateFilterFile ( filterId ) ; inputStream = context . openFileInput ( fileName ) ; inputStreamReader = new InputStreamReader ( inputStream ) ; reader = new BufferedReader ( inputStreamReader ) ; String line = reader . readLine ( ) ; while ( line != null ) { if ( useCosmetics || ! FilterRule . isCosmeticRule ( line ) ) { rules . add ( line ) ; } line = reader . readLine ( ) ; } return rules ; } catch ( Exception ex ) { log . error ( "Cannot select rules for filter {}" , filterId , ex ) ; throw new RuntimeException ( "Cannot select rules for filter " + filterId , ex ) ; } finally { IOUtils . closeQuietly ( inputStream ) ; IOUtils . closeQuietly ( inputStreamReader ) ; IOUtils . closeQuietly ( reader ) ; } }
target:  Adds rules from the specified filter to the list