<s> import string <EOL> import re <EOL> class Maltype : <EOL> files = [ ] <EOL> rule = "<STR_LIT>" <EOL> maltype_num = <NUM_LIT:0> <EOL> def __init__ ( self , f , num ) : <EOL> self . files = [ ] <EOL> self . files . append ( f ) ; <EOL> self . maltype_num = num ; <EOL> def remove_file ( self , f ) : <EOL> self . files . remove ( f ) ; <EOL> def add_file ( self , f ) : <EOL> self . files . append ( f ) ; <EOL> def get_maltype_num ( self ) : <EOL> return self . maltype_num <EOL> def get_files ( self ) : <EOL> return self . files <EOL> def set_rule ( self , rule ) : <EOL> self . rule = rule <EOL> def get_rule ( self ) : <EOL> return self . rule <EOL> def count_rule_string ( self , rule ) : <EOL> return len ( re . findall ( "<STR_LIT>" , str ( rule ) ) ) </s>
