Program: 27651
Project: 27651
Buggy source:
/** 
 * <p>If you pay a brief visit to   {@link MobSpawnerBaseLogic#updateSpawner} you'll notice the following calls in the method body:</p> <blockquote><pre> this.getSpawnerWorld().spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0, d1, d2, 0.0D, 0.0D, 0.0D, new int[0]); this.getSpawnerWorld().spawnParticle(EnumParticleTypes.FLAME, d0, d1, d2, 0.0D, 0.0D, 0.0D, new int[0]);</pre> </blockquote> <p>The purpose of the  {@link ModifyArg} annotation is to modify <b>exactly one<b> argument from a method invokation. Specifically by havingthe annotated callback method <em>receive</em> and then <em>return</em> the value in question. This allows the method call to be "proxied" in a limited way, modifying a single argument.</p> <p>Two variations of this hook are available:</p> <ul> <li>The single-argument hook simply accepts <b>only</b> the argument in question. If there is only a single argument of that type then no further information is required and the hook will receive and then return the modified value. In our example this would be leveraged by a method with the signature <code>private EnumParticleTypes onSpawnParticle(EnumParticleTypes pt)</code> because there is only a single argument with the <em>EnumParticleTypes</em> type in the method signature. For methods with multiple args of the same type, the <em>index </em> property must be specified to identify the target argument.</li> <li>The multi-argument hook accepts <b>all</b> the original arguments to the method (as in this example) but can only modify the argument specified by the <em>return type</em> of the hook method. If multiple args of the same type exist, then the <em>index</em> property must likewise be specified.</li> </ul> <p>This hook does not interrupt the normal execution of the method, it only allows a single parameter to be modified.</p> 
 */
@ModifyArg(method="String_Node_Str",at=@At(value="String_Node_Str",target="String_Node_Str")) private EnumParticleTypes onSpawnParticle(EnumParticleTypes pt,double x,double y,double z,double a,double b,double c,int... params){
  if (pt == EnumParticleTypes.SMOKE_NORMAL) {
    return EnumParticleTypes.SPELL;
  }
 else   if (pt == EnumParticleTypes.FLAME) {
    return EnumParticleTypes.HEART;
  }
  return pt;
}

Fixed version (ground truth):
/** 
 * <p>If you pay a brief visit to   {@link MobSpawnerBaseLogic#updateSpawner} you'll notice the following calls in the method body:</p> <blockquote><pre> this.getSpawnerWorld().spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0, d1, d2, 0.0D, 0.0D, 0.0D, new int[0]); this.getSpawnerWorld().spawnParticle(EnumParticleTypes.FLAME, d0, d1, d2, 0.0D, 0.0D, 0.0D, new int[0]);</pre> </blockquote> <p>The purpose of the  {@link ModifyArg} annotation is to modify <b>exactly one<b> argument from a method invokation. Specifically by havingthe annotated callback method <em>receive</em> and then <em>return</em> the value in question. This allows the method call to be "proxied" in a limited way, modifying a single argument.</p> <p>Two variations of this hook are available:</p> <ul> <li>The single-argument hook simply accepts <b>only</b> the argument in question. If there is only a single argument of that type then no further information is required and the hook will receive and then return the modified value. In our example this would be leveraged by a method with the signature <code>private EnumParticleTypes onSpawnParticle(EnumParticleTypes pt)</code> because there is only a single argument with the <em>EnumParticleTypes</em> type in the method signature. For methods with multiple args of the same type, the <em>index </em> property must be specified to identify the target argument.</li> <li>The multi-argument hook accepts <b>all</b> the original arguments to the method (as in this example) but can only modify the argument specified by the <em>return type</em> of the hook method. If multiple args of the same type exist, then the <em>index</em> property must likewise be specified.</li> </ul> <p>This hook does not interrupt the normal execution of the method, it only allows a single parameter to be modified.</p>
 * @param x The x coordinate
 * @param y The y coordinate
 * @param z The z coordinate
 * @param a a
 * @param b b
 * @param c c
 * @param params params
 */
@ModifyArg(method="String_Node_Str",at=@At(value="String_Node_Str",target="String_Node_Str")) private EnumParticleTypes onSpawnParticle(EnumParticleTypes pt,double x,double y,double z,double a,double b,double c,int... params){
  if (pt == EnumParticleTypes.SMOKE_NORMAL) {
    return EnumParticleTypes.SPELL;
  }
 else   if (pt == EnumParticleTypes.FLAME) {
    return EnumParticleTypes.HEART;
  }
  return pt;
}