Removed instance creation in the loop and passed the attributes themselves directly

This commit is contained in:
U-BASIS\dsmyda
2018-09-13 16:16:29 -04:00
parent c426b2c7ef
commit 9fb24ff6ff
@@ -137,9 +137,8 @@ final public class CommonAttributeSearchResults {
for(CommonAttributeValue value : values.getDelayedMetadataList()){ // Need the real metadata
try {
CorrelationAttributeInstance corAttr = new CorrelationAttributeInstance(fileAttributeType, value.getValue());
Double uniqueTypeValueTuples = eamDb.getCountUniqueCaseDataSourceTuplesHavingTypeValue(
corAttr.getCorrelationType(), corAttr.getCorrelationValue()).doubleValue();
fileAttributeType, value.getValue()).doubleValue();
Double commonalityPercentage = uniqueTypeValueTuples / uniqueCaseDataSourceTuples * 100;
int frequencyPercentage = commonalityPercentage.intValue();