boolean isSameFunction = isSameRemediationFunction(ruleDebt, rule);
rule.setCharacteristicId((!isSameCharacteristic ? characteristicDto.getId() : null));
rule.setRemediationFunction((!isSameFunction ? ruleDebt.function().name() : null));
rule.setRemediationFactor((!isSameFunction ? ruleDebt.factor() : null));
rule.setRemediationOffset((!isSameFunction ? ruleDebt.offset() : null));
<BUG>}
ruleDebts.remove(ruleDebt);</BUG>
rule.setUpdatedAt(updateDate);
ruleDao.update(rule, session);
<BUG>}
}</BUG>
for (RuleDebt ruleDebt : ruleDebts) {

boolean isSameFunction = isSameRemediationFunction(ruleDebt, rule);
rule.setCharacteristicId((!isSameCharacteristic ? characteristicDto.getId() : null));
rule.setRemediationFunction((!isSameFunction ? ruleDebt.function().name() : null));
rule.setRemediationFactor((!isSameFunction ? ruleDebt.factor() : null));
rule.setRemediationOffset((!isSameFunction ? ruleDebt.offset() : null));
rule.setUpdatedAt(updateDate);
ruleDao.update(rule, session);
}
}
ruleDebts.remove(ruleDebt);
}
for (RuleDebt ruleDebt : ruleDebts) {
