mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-12 07:56:16 +00:00
Reduced the number of calls to count unique data sources in intercase correlation to one, this will have merge conflicts with brians branch
This commit is contained in:
parent
835c1b4da8
commit
a6c3607ea1
@ -125,6 +125,7 @@ final public class CommonAttributeSearchResults {
|
|||||||
EamDb eamDb = EamDb.getInstance();
|
EamDb eamDb = EamDb.getInstance();
|
||||||
|
|
||||||
Map<Integer, List<CommonAttributeValue>> itemsToRemove = new HashMap<>();
|
Map<Integer, List<CommonAttributeValue>> itemsToRemove = new HashMap<>();
|
||||||
|
Double uniqueCaseDataSourceTuples = eamDb.getCountUniqueDataSources().doubleValue();
|
||||||
|
|
||||||
for(Entry<Integer, CommonAttributeValueList> listOfValues : Collections.unmodifiableMap(this.instanceCountToAttributeValues).entrySet()){
|
for(Entry<Integer, CommonAttributeValueList> listOfValues : Collections.unmodifiableMap(this.instanceCountToAttributeValues).entrySet()){
|
||||||
|
|
||||||
@ -134,7 +135,11 @@ final public class CommonAttributeSearchResults {
|
|||||||
for(CommonAttributeValue value : values.getDelayedMetadataList()){ // Need the real metadata
|
for(CommonAttributeValue value : values.getDelayedMetadataList()){ // Need the real metadata
|
||||||
|
|
||||||
try {
|
try {
|
||||||
int frequencyPercentage = eamDb.getFrequencyPercentage(new CorrelationAttributeInstance(fileAttributeType, value.getValue()));
|
CorrelationAttributeInstance corAttr = new CorrelationAttributeInstance(fileAttributeType, value.getValue());
|
||||||
|
Double uniqueTypeValueTuples = eamDb.getCountUniqueCaseDataSourceTuplesHavingTypeValue(
|
||||||
|
corAttr.getCorrelationType(), corAttr.getCorrelationValue()).doubleValue();
|
||||||
|
Double commonalityPercentage = uniqueTypeValueTuples / uniqueCaseDataSourceTuples * 100;
|
||||||
|
int frequencyPercentage = commonalityPercentage.intValue();
|
||||||
|
|
||||||
if(frequencyPercentage > maximumPercentageThreshold){
|
if(frequencyPercentage > maximumPercentageThreshold){
|
||||||
if(itemsToRemove.containsKey(key)){
|
if(itemsToRemove.containsKey(key)){
|
||||||
@ -184,4 +189,4 @@ final public class CommonAttributeSearchResults {
|
|||||||
}
|
}
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user