@@ -57,7 +57,8 @@ def process_feature_annotations(features_file, repo_dir, flattened_keywords, tax
5757 tag = f"API_{ feature_name } _{ method_name } "
5858 line_annotations [line_index ].add (tag )
5959 library_features .add (tag )
60- add_to_fm (fm , taxonomy , feature_name , tag )
60+ if add_to_fm (fm , taxonomy , feature_name , tag ) is None :
61+ print (f"Feature '{ feature_name } ' not found in taxonomy, skipped for now." )
6162
6263 # Apply annotations to lines
6364 for line_index , tags in line_annotations .items ():
@@ -300,8 +301,7 @@ def print_top_keywords(keyword_counter, total_matches):
300301
301302def main ():
302303 repo_url = input ("Enter the repository URL: " )
303- keyword_file = "SecFeatFinder/git@github.com:apache/tomcat.gitSecList.json"
304- features_file = "../Resources/features.json"
304+ keyword_file = "SecFeatFinder/SecList.json"
305305 taxonomy_file = "../Resources/taxonomy.feature_model"
306306
307307 taxonomy = read_feature_model (taxonomy_file )
@@ -325,7 +325,7 @@ def main():
325325 fm = Feature (taxonomy .name , None )
326326
327327 # Process library annotations first
328- library_features = process_feature_annotations (features_file , project_dir , flattened_keywords , taxonomy , fm )
328+ library_features = process_feature_annotations (project_dir + "/result/features.json" , project_dir , flattened_keywords , taxonomy , fm )
329329
330330 # Initialize the exclusion counter ONCE here
331331 hans_exclusion_counter = [0 ]
0 commit comments