-
Notifications
You must be signed in to change notification settings - Fork 15
API
André Silva edited this page Jun 29, 2021
·
8 revisions
The two main classes of the flacoco API are Flacoco and FlacocoAPI.
This class serves as the main entry point of flacoco. Currently, it supports two output formats:
The default mode returns a mapping between a string representation of a source code line (e.g. fr/spoonlabs/FLtest1/Calculator@-@14, where fr.spoonlabs.FLtest1.Calculator is the fully-qualified class name and 14 is the line number), and a suspiciousness score.
Flacoco flacoco = new Flacoco();
Map<String, Double> resultDefault = flacoco.runDefault();The Spoon mode returns a mapping between a CtStatement. More information on how source code lines are mapped to CtStatements can be found under SpoonConverter.
Flacoco flacoco = new Flacoco();
Map<CtStatement, Double> resultSpoon = flacoco.runSpoon();