Program: 158658
Project: 158658
Buggy source:
public void addEffect(ContinuousEffect effect,Ability source){
  if (effect == null) {
    logger.error("String_Node_Str" + source.toString());
    return;
  }
 else   if (source == null) {
    logger.warn("String_Node_Str" + effect.toString());
  }
switch (effect.getEffectType()) {
case REPLACEMENT:
case REDIRECTION:
    ReplacementEffect newReplacementEffect=(ReplacementEffect)effect;
  replacementEffects.addEffect(newReplacementEffect,source);
break;
case PREVENTION:
PreventionEffect newPreventionEffect=(PreventionEffect)effect;
preventionEffects.addEffect(newPreventionEffect,source);
break;
case RESTRICTION:
RestrictionEffect newRestrictionEffect=(RestrictionEffect)effect;
restrictionEffects.addEffect(newRestrictionEffect,source);
break;
case RESTRICTION_UNTAP_NOT_MORE_THAN:
RestrictionUntapNotMoreThanEffect newRestrictionUntapNotMoreThanEffect=(RestrictionUntapNotMoreThanEffect)effect;
restrictionUntapNotMoreThanEffects.addEffect(newRestrictionUntapNotMoreThanEffect,source);
break;
case REQUIREMENT:
RequirementEffect newRequirementEffect=(RequirementEffect)effect;
requirementEffects.addEffect(newRequirementEffect,source);
break;
case ASTHOUGH:
AsThoughEffect newAsThoughEffect=(AsThoughEffect)effect;
if (!asThoughEffectsMap.containsKey(newAsThoughEffect.getAsThoughEffectType())) {
ContinuousEffectsList<AsThoughEffect> list=new ContinuousEffectsList<>();
allEffectsLists.add(list);
asThoughEffectsMap.put(newAsThoughEffect.getAsThoughEffectType(),list);
}
asThoughEffectsMap.get(newAsThoughEffect.getAsThoughEffectType()).addEffect(newAsThoughEffect,source);
break;
case COSTMODIFICATION:
CostModificationEffect newCostModificationEffect=(CostModificationEffect)effect;
costModificationEffects.addEffect(newCostModificationEffect,source);
break;
case SPLICE:
SpliceCardEffect newSpliceCardEffect=(SpliceCardEffect)effect;
spliceCardEffects.addEffect(newSpliceCardEffect,source);
break;
case CONTINUOUS_RULE_MODIFICATION:
ContinuousRuleModifyingEffect newContinuousRuleModifiyingEffect=(ContinuousRuleModifyingEffect)effect;
continuousRuleModifyingEffects.addEffect(newContinuousRuleModifiyingEffect,source);
break;
default :
layeredEffects.addEffect(effect,source);
break;
}
}

Fixed version (ground truth):
public void addEffect(ContinuousEffect effect,Ability source){
  if (effect == null) {
    LOGGER.error("String_Node_Str" + source.toString());
    return;
  }
 else   if (source == null) {
    LOGGER.warn("String_Node_Str" + effect.toString());
  }
switch (effect.getEffectType()) {
case REPLACEMENT:
case REDIRECTION:
    ReplacementEffect newReplacementEffect=(ReplacementEffect)effect;
  replacementEffects.addEffect(newReplacementEffect,source);
break;
case PREVENTION:
PreventionEffect newPreventionEffect=(PreventionEffect)effect;
preventionEffects.addEffect(newPreventionEffect,source);
break;
case RESTRICTION:
RestrictionEffect newRestrictionEffect=(RestrictionEffect)effect;
restrictionEffects.addEffect(newRestrictionEffect,source);
break;
case RESTRICTION_UNTAP_NOT_MORE_THAN:
RestrictionUntapNotMoreThanEffect newRestrictionUntapNotMoreThanEffect=(RestrictionUntapNotMoreThanEffect)effect;
restrictionUntapNotMoreThanEffects.addEffect(newRestrictionUntapNotMoreThanEffect,source);
break;
case REQUIREMENT:
RequirementEffect newRequirementEffect=(RequirementEffect)effect;
requirementEffects.addEffect(newRequirementEffect,source);
break;
case ASTHOUGH:
AsThoughEffect newAsThoughEffect=(AsThoughEffect)effect;
if (!asThoughEffectsMap.containsKey(newAsThoughEffect.getAsThoughEffectType())) {
ContinuousEffectsList<AsThoughEffect> list=new ContinuousEffectsList<>();
allEffectsLists.add(list);
asThoughEffectsMap.put(newAsThoughEffect.getAsThoughEffectType(),list);
}
asThoughEffectsMap.get(newAsThoughEffect.getAsThoughEffectType()).addEffect(newAsThoughEffect,source);
break;
case COSTMODIFICATION:
CostModificationEffect newCostModificationEffect=(CostModificationEffect)effect;
costModificationEffects.addEffect(newCostModificationEffect,source);
break;
case SPLICE:
SpliceCardEffect newSpliceCardEffect=(SpliceCardEffect)effect;
spliceCardEffects.addEffect(newSpliceCardEffect,source);
break;
case CONTINUOUS_RULE_MODIFICATION:
ContinuousRuleModifyingEffect newContinuousRuleModifiyingEffect=(ContinuousRuleModifyingEffect)effect;
continuousRuleModifyingEffects.addEffect(newContinuousRuleModifiyingEffect,source);
break;
default :
layeredEffects.addEffect(effect,source);
break;
}
}