Program: 159241
Project: 159241
Buggy source:
public void addEffect(ContinuousEffect effect,Ability source){
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<>();
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:
ContinuousRuleModifiyingEffect newContinuousRuleModifiyingEffect=(ContinuousRuleModifiyingEffect)effect;
continuousRuleModifyingEffects.addEffect(newContinuousRuleModifiyingEffect,source);
break;
default :
layeredEffects.addEffect(effect,source);
break;
}
}

Fixed version (ground truth):
public void addEffect(ContinuousEffect effect,Ability source){
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:
ContinuousRuleModifiyingEffect newContinuousRuleModifiyingEffect=(ContinuousRuleModifiyingEffect)effect;
continuousRuleModifyingEffects.addEffect(newContinuousRuleModifiyingEffect,source);
break;
default :
layeredEffects.addEffect(effect,source);
break;
}
}