Class AnalysisResult
java.lang.Object
org.variantsync.diffdetective.analysis.AnalysisResult
- All Implemented Interfaces:
Metadata<AnalysisResult>
The result of a
Analysis.
This result stores various metadata and statistics that we use for the validation of our ESEC/FSE paper.
An AnalysisResult also allows to store any custom metadata or information.- Author:
- Paul Bittner
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordAnalysisResult.ResultKey<T extends Metadata<T>>Type proxy and runtime key for the type of aMetadatasubclass. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Stringprivate static final Stringstatic final org.variantsync.functjonal.category.InplaceMonoid<AnalysisResult> static final org.variantsync.functjonal.category.InplaceSemigroup<AnalysisResult> Inplace semigroup for AnalysisResult.static final StringPlaceholder name for data that is not associated to a repository or where the repository is unknown.The repo from which the results where collected. -
Constructor Summary
ConstructorsConstructorDescriptionAnalysisResult(String repoName) Creates an empty analysis result for the given repo. -
Method Summary
Modifier and TypeMethodDescription<T extends Metadata<T>>
voidappend(AnalysisResult.ResultKey<T> resultKey, T value) Adds a new value orMetadata.append(T)s it to the old value which is indexed byresultKey.<T extends Metadata<T>>
Tget(AnalysisResult.ResultKey<T> resultKey) Returns the value previously added using<T>append(org.variantsync.diffdetective.analysis.AnalysisResult.ResultKey<T>,T).voidreportDiffErrors(List<DiffError> errors) Report errors (that for example occurred when parsing VariationDiffs).org.variantsync.functjonal.category.InplaceSemigroup<AnalysisResult> Metadata should be composable.voidvoidsetFromSnapshot(LinkedHashMap<String, String> snap) snapshot()Create a key-value store of the metadata that can be used for serialization.private voidunsafeAppend(String key, Metadata<?> value)
-
Field Details
-
NO_REPO
Placeholder name for data that is not associated to a repository or where the repository is unknown.- See Also:
-
ERROR_BEGIN
- See Also:
-
ERROR_END
- See Also:
-
repoName
The repo from which the results where collected. -
taskName
-
diffErrors
-
results
-
ISEMIGROUP
Inplace semigroup for AnalysisResult. Merges the second results values into the first result. -
IMONOID
-
-
Constructor Details
-
AnalysisResult
public AnalysisResult() -
AnalysisResult
Creates an empty analysis result for the given repo.- Parameters:
repoName- The repo for which to collect results.
-
-
Method Details
-
get
Returns the value previously added using<T>append(org.variantsync.diffdetective.analysis.AnalysisResult.ResultKey<T>,T).- Type Parameters:
T- the type of the value which was previously stored- Parameters:
resultKey- the key which is used to identify the data and its type
-
unsafeAppend
-
append
Adds a new value orMetadata.append(T)s it to the old value which is indexed byresultKey.- Type Parameters:
T- the type of the value which is appended- Parameters:
resultKey- the key which is used to identify the data and its type- See Also:
-
semigroup
Description copied from interface:MetadataMetadata should be composable. Composition should be inplace to optimize performance.- Specified by:
semigroupin interfaceMetadata<AnalysisResult>
-
reportDiffErrors
Report errors (that for example occurred when parsing VariationDiffs).- Parameters:
errors- A list of errors to report.
-
snapshot
Description copied from interface:MetadataCreate a key-value store of the metadata that can be used for serialization.- Specified by:
snapshotin interfaceMetadata<AnalysisResult>- Returns:
- A LinkedHashMap that stores all relevant properties to export. The return type has to be a LinkedHashMap to obtain insertion-order iteration.
-
setFromSnapshot
- Specified by:
setFromSnapshotin interfaceMetadata<AnalysisResult>
-
setFrom
- Throws:
IOException
-