Add ability to launch extract_semantic... functions from CLI.
Help message:
python -m aibolit.extract_method_baseline.extract_semantic -husage: extract_semantic.py [-h] -f FILE [-c CLASS_NAME] [-m METHOD_NAME]
Extracts semantic from specified methods
optional arguments:
-h, --help show this help message and exit
-f FILE, --file FILE File path to JAVA source code for extracting semantic
-c CLASS_NAME, --class CLASS_NAME
Class name of method to parse, if omitted all classes are considered
-m METHOD_NAME, --method METHOD_NAME
Method name to parse, if omitted all method are considered
You can filter methods by their names and class names they contained in.
Output example:
python -m aibolit.extract_method_baseline.extract_semantic -f test/integration/samples/AnnotationOffsetItem.java
getAnnotationsOffset method in AnnotationOffsetItem class:
Return statement on line 51 uses:
Variables:
- annotationsOffset
getItem method in AnnotationOffsetItem class:
Return statement on line 55 uses:
Variables:
- _item
toDataType method in AnnotationOffsetItem class:
Local variable declaration on line 60 uses:
Objects:
- StructConverterUtil
Methods:
- toDataType
Statement expression on line 61 uses:
Objects:
- dataType
Methods:
- setCategoryPath
Return statement on line 62 uses:
Variables:
- dataType
Fix #638, based on #636.
Add ability to launch
extract_semantic...
functions from CLI.Help message:
You can filter methods by their names and class names they contained in.
Output example: