//assign fault scores to each converter
Map convToFaultScore = new HashMap();
for (int ii = 0; ii < involvedCs.length; ii++) {
Converter involvedC = (Converter) involvedCs[ii];
Float oldFaultScore = (Float) convToFaultScore.get(involvedC);
Float newFaultScore;
if (oldFaultScore == null) {
//first occurrence of this converter
newFaultScore = DEFAULT_FAULT_SCORE;
if (isConvThatFailed(involvedC, failFP)) {
newFaultScore = new Float(newFaultScore.floatValue() *
FAILED_CONV_PENALTY);
}
} else {
//converter has occurred before
newFaultScore = new Float(oldFaultScore.floatValue() +
DEFAULT_FAULT_SCORE.floatValue() * REPEAT_PENALTY);
}
convToFaultScore.put(involvedC, newFaultScore);
}
//reduce fault scores of trusted converters
float faultScoresTotal = 0.0f;
Set convs = convToFaultScore.keySet();
Iterator convIter = convs.iterator();
while (convIter.hasNext()) {
Converter convInvolved = (Converter) convIter.next();
Float convFaultScore =
(Float) convToFaultScore.get(convInvolved);
if (trustedCList.contains(convInvolved)) {
convFaultScore = new Float(convFaultScore.floatValue() *
TRUSTED_CONV_PENALTY_REDUCTION);
}
convToFaultScore.put(convInvolved, convFaultScore);
faultScoresTotal += convFaultScore.floatValue();
}
List resultCAFList = new ArrayList();
//return chance each converter is at fault, based on fault scores.
for (int ii = 0; ii < involvedCs.length; ii++) {
Converter involvedC = involvedCs[ii];
Float faultScore = (Float) convToFaultScore.get(involvedC);
float normalizedFaultScore;
if (faultScoresTotal != 0.0f) {