nus-yam/ex-repair huggingface dataset:
Program: 27633
Project: 27633
Buggy source:
private static void logChunkLoadOverride(ChunkProviderServer provider,int x,int z){
  logInfo("String_Node_Str",provider.chunkLoadOverride,provider.worldObj.provider.getDimensionId());
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private static void logChunkLoadOverride(ChunkProviderServer provider,int x,int z){
  logInfo("String_Node_Str",provider.chunkLoadOverride,provider.worldObj.provider.getDimensionId());
}
Program: 27634
Project: 27634
Buggy source:
public static void logEntitySize(Entity entity,List list){
  SpongeConfig config=getActiveConfig(entity.worldObj);
  if (!config.logEntityCollisionChecks.getProperty().getBoolean()) {
    return;
  }
  int largeCountLogSize=config.largeCollisionLogSize.getProperty().getInt();
  if (list == null) {
    return;
  }
  int largeCollisionLogSize=config.largeCollisionLogSize.getProperty().getInt();
  if (largeCollisionLogSize > 0 && (MinecraftServer.getServer().getTickCounter() % 10) == 0 && list.size() >= largeCollisionLogSize) {
    SpongeHooks.CollisionWarning warning=new SpongeHooks.CollisionWarning(entity.worldObj,entity);
    if (recentWarnings.contains(warning)) {
      long lastWarned=recentWarnings.get(warning);
      if ((MinecraftServer.getCurrentTimeMillis() - lastWarned) < 30000) {
        return;
      }
    }
    recentWarnings.put(warning,System.currentTimeMillis());
    logWarning("String_Node_Str",largeCollisionLogSize,entity);
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public static void logEntitySize(Entity entity,List list){
  SpongeConfig config=getActiveConfig(entity.worldObj);
  if (!config.logEntityCollisionChecks.getProperty().getBoolean()) {
    return;
  }
  int largeCountLogSize=config.largeCollisionLogSize.getProperty().getInt();
  if (list == null) {
    return;
  }
  int largeCollisionLogSize=config.largeCollisionLogSize.getProperty().getInt();
  if (largeCollisionLogSize > 0 && (MinecraftServer.getServer().getTickCounter() % 10) == 0 && list.size() >= largeCollisionLogSize) {
    SpongeHooks.CollisionWarning warning=new SpongeHooks.CollisionWarning(entity.worldObj,entity);
    if (recentWarnings.contains(warning)) {
      long lastWarned=recentWarnings.get(warning);
      if ((MinecraftServer.getCurrentTimeMillis() - lastWarned) < 30000) {
        return;
      }
    }
    recentWarnings.put(warning,System.currentTimeMillis());
    logWarning("String_Node_Str",largeCollisionLogSize,entity);
  }
}
Program: 27636
Project: 27636
Buggy source:
@Subscribe @SuppressWarnings("String_Node_Str") public void handleModStateEvent(FMLStateEvent event){
  Class<? extends FMLEvent> eventClass=event.getClass();
  Class<? extends Event> spongeEvent=(Class<? extends Event>)EventRegistry.getAPIClass(eventClass);
  if (this.stateEventHandlers.containsKey(spongeEvent)) {
    Method method=null;
    try {
      for (      Method m : this.stateEventHandlers.get(spongeEvent)) {
        method=m;
        m.invoke(getMod(),event);
      }
    }
 catch (    Throwable t) {
      SpongeMod.instance.getLogger().error("String_Node_Str" + this.pluginClassName + "String_Node_Str"+ method.getName(),t);
    }
  }
}

Fixed version (ground truth):
@Subscribe @SuppressWarnings("String_Node_Str") public void handleModStateEvent(FMLStateEvent event){
  Class<? extends FMLEvent> eventClass=event.getClass();
  Class<? extends Event> spongeEvent=(Class<? extends Event>)EventRegistry.getAPIClass(eventClass);
  if (this.stateEventHandlers.containsKey(spongeEvent)) {
    Method method=null;
    try {
      for (      Method m : this.stateEventHandlers.get(spongeEvent)) {
        method=m;
        m.invoke(getMod(),event);
      }
    }
 catch (    Throwable t) {
      SpongeMod.instance.getLogger().error("String_Node_Str" + this.pluginClassName + "String_Node_Str"+ method.getName()+ "String_Node_Str",t);
    }
  }
}
Program: 27637
Project: 27637
Buggy source:
/** 
 * This method conflicts with a method in the target class and has precisely the same signature, this is to demonstrate how we deal with a method which would ordinarily fall foul of reobfuscation and thus break our (non-obfuscated) interface in a production environment
 */
public abstract boolean isUsingItem();

Fixed version (ground truth):
/** 
 * This method conflicts with a method in the target class and has precisely the same signature, this is to demonstrate how we deal with a method which would ordinarily fall foul of reobfuscation and thus break our (non-obfuscated) interface in a production environment
 * @return return value
 */
public abstract boolean isUsingItem();
Program: 27638
Project: 27638
Buggy source:
/** 
 * Additional method with no conflicts
 */
public abstract int norDoesThisOne();

Fixed version (ground truth):
/** 
 * Additional method with no conflicts
 * @return return value
 */
public abstract int norDoesThisOne();
Program: 27639
Project: 27639
Buggy source:
/** 
 * Additional method which doesn't conflict
 */
public abstract int thisMethodDoesNotConflict();

Fixed version (ground truth):
/** 
 * Additional method which doesn't conflict
 * @return return value
 */
public abstract int thisMethodDoesNotConflict();
Program: 27640
Project: 27640
Buggy source:
/** 
 * In   {@link EntityLivingBase}, this same method exists but returns a float. Whilst java bytecode would actually allow both methods to exist, the java compiler doesn't support this. This conflict is deliberately here to demostrate the use of the   {@link Implements} annotation in{@link MixinEntityPlayerExample}
 */
public abstract double getHealth();

Fixed version (ground truth):
/** 
 * In   {@link EntityLivingBase}, this same method exists but returns a float. Whilst java bytecode would actually allow both methods to exist, the java compiler doesn't support this. This conflict is deliberately here to demostrate the use of the   {@link Implements} annotation in{@link MixinWorldProviderExample}
 * @return return value
 */
public abstract double getHealth();
Program: 27641
Project: 27641
Buggy source:
/** 
 * Contrived example to deliberately create a name clash with World
 * @param x
 * @param y
 * @param z
 * @return
 */
public abstract Object getBlock(int x,int y,int z);

Fixed version (ground truth):
/** 
 * Contrived example to deliberately create a name clash with World
 * @param x The x coordinate
 * @param y The y coordinate
 * @param z The z coordinate
 * @return The block
 */
public abstract Object getBlock(int x,int y,int z);
Program: 27642
Project: 27642
Buggy source:
/** 
 * Stupid example
 */
public abstract int getAmbientTickCountdown();

Fixed version (ground truth):
/** 
 * Stupid example
 * @return return value
 */
public abstract int getAmbientTickCountdown();
Program: 27643
Project: 27643
Buggy source:
/** 
 * Even more tenuous example
 * @param x
 * @param y
 * @param z
 * @param block
 * @return
 */
public abstract int exampleMethodToComputeLightValue(int x,int y,int z,EnumSkyBlock block);

Fixed version (ground truth):
/** 
 * Even more tenuous example
 * @param x The x coordinate
 * @param y The y coordinate
 * @param z The z coordinate
 * @param block The SkyBlock value
 * @return The calculated light
 */
public abstract int exampleMethodToComputeLightValue(int x,int y,int z,EnumSkyBlock block);
Program: 27644
Project: 27644
Buggy source:
/** 
 * ctor, not used
 */
public MixinEntityPlayerExample(World worldIn){
  super(worldIn);
}

Fixed version (ground truth):
/** 
 * ctor, not used
 * @param worldIn The world to spawn the player in
 */
public MixinEntityPlayerExample(World worldIn){
  super(worldIn);
}
Program: 27645
Project: 27645
Buggy source:
/** 
 * Conflicting method, now magically safe to implement because the prefix makes it compile
 */
public double entityPlayer$getHealth(){
  return this.getHealth();
}

Fixed version (ground truth):
/** 
 * Conflicting method, now magically safe to implement because the prefix makes it compile
 * @return The player's health
 */
public double entityPlayer$getHealth(){
  return this.getHealth();
}
Program: 27646
Project: 27646
Buggy source:
/** 
 * <p>This comes first in the file for a reason, but you should read the javadoc for   {@link #isUsingItem} first, then come back and read this...Go on! Do it!</p> <p>Okay, so you understand why we have the method below, it injects our custom code in the target class's method by overwriting the method body with the new code. However in order to preserve that functionality across the obfuscation boundary we need to tag it with {@link Overwrite}.</p> <p>The magic happens here. Because this method is <b>not</b> tagged with   {@link Overwrite}, it will <b>not</b> be obfuscated at build time, this means it still implements the interface. At dev time, the method below (because it appears <b>after</b> this one) will be injected and will <em>overwrite <b>this</b> method</em>. This is exactly what we want to happen, because otherwise this method (at dev time) would actually end up just calling itself recursively!</p> <p>However, post-obfuscation, this method magically becomes an accessor for the (now renamed) isUsingItem() in the target class, and thus allows <em>both</em> the custom code to be injected into the original method (by the declaration below) <em>and</em> the interface to be implemented all at once.<p> <p>See the example below for where custom code is <b>not</b> required in the accessor</p>.
 */
public boolean entityPlayer$isUsingItem(){
  return this.isUsingItem();
}

Fixed version (ground truth):
/** 
 * <p>This comes first in the file for a reason, but you should read the javadoc for   {@link #isUsingItem} first, then come back and read this...Go on! Do it!</p> <p>Okay, so you understand why we have the method below, it injects our custom code in the target class's method by overwriting the method body with the new code. However in order to preserve that functionality across the obfuscation boundary we need to tag it with {@link Overwrite}.</p> <p>The magic happens here. Because this method is <b>not</b> tagged with   {@link Overwrite}, it will <b>not</b> be obfuscated at build time, this means it still implements the interface. At dev time, the method below (because it appears <b>after</b> this one) will be injected and will <em>overwrite <b>this</b> method</em>. This is exactly what we want to happen, because otherwise this method (at dev time) would actually end up just calling itself recursively!</p> <p>However, post-obfuscation, this method magically becomes an accessor for the (now renamed) isUsingItem() in the target class, and thus allows <em>both</em> the custom code to be injected into the original method (by the declaration below) <em>and</em> the interface to be implemented all at once.</p> <p>See the example below for where custom code is <b>not</b> required in the accessor</p>.
 * @return Whether the player is using the item
 */
public boolean entityPlayer$isUsingItem(){
  return this.isUsingItem();
}
Program: 27647
Project: 27647
Buggy source:
/** 
 * <p>It should be pretty obvious that because this method exists in target class   {@link EntityPlayer} <em>and</em> in the interface{@link IEntityPlayerConflict} that we don't <em>actually</em> need an implementation here at dev time, because the underlying method in thetarget class already implicitly 'implements' the method in the interface. We only need to  {@link Overwrite} it if we need to include somecustom functionality as shown here. However of course the problems start when we traverse the obfuscation boundary, since the method ends up actually named "func_71039_bw" and thus no longer implements the interface!</p> <p>We need the  {@link Overwrite} annotation in order to have this method renamed, but we don't want to break the interface. So how do we dothat? See  {@link #entityPlayer$isUsingItem} above for how.</p>
 */
@Overwrite public boolean isUsingItem(){
  this.doSomethingCustom();
  return this.itemInUse != null;
}

Fixed version (ground truth):
/** 
 * <p>It should be pretty obvious that because this method exists in target class   {@link EntityPlayer} <em>and</em> in the interface{@link IEntityPlayerConflict} that we don't <em>actually</em> need an implementation here at dev time, because the underlying method in thetarget class already implicitly 'implements' the method in the interface. We only need to  {@link Overwrite} it if we need to include somecustom functionality as shown here. However of course the problems start when we traverse the obfuscation boundary, since the method ends up actually named "func_71039_bw" and thus no longer implements the interface!</p> <p>We need the  {@link Overwrite} annotation in order to have this method renamed, but we don't want to break the interface. So how do we dothat? See  {@link #entityPlayer$isUsingItem} above for how.</p>
 * @return Whether the player is using the item
 */
@Overwrite public boolean isUsingItem(){
  this.doSomethingCustom();
  return this.itemInUse != null;
}
Program: 27648
Project: 27648
Buggy source:
/** 
 * This non-conflicting method is also prefixed, this is recommended for soft implementations because there is no   {@link Override} annotation andthus if the method in the underlying interface changes, there is no compile-time error which indicates this. By using the prefix even on non-conflicting methods, the transformer can verify that the method exists in the target interface at application time.
 */
public int entityPlayer$thisMethodDoesNotConflict(){
  return 0;
}

Fixed version (ground truth):
/** 
 * This non-conflicting method is also prefixed, this is recommended for soft implementations because there is no   {@link Override} annotation andthus if the method in the underlying interface changes, there is no compile-time error which indicates this. By using the prefix even on non-conflicting methods, the transformer can verify that the method exists in the target interface at application time.
 * @return The number 0
 */
public int entityPlayer$thisMethodDoesNotConflict(){
  return 0;
}
Program: 27649
Project: 27649
Buggy source:
/** 
 * This method doesn't conflict, but is not tagged with the prefix. Whilst this is totally legal, it's a bad idea because there is then no way to detect errors when the underlying interface changes, see the notes on   {@link #entityPlayer$thisMethodDoesNotConflict}
 */
public int norDoesThisOne(){
  return 0;
}

Fixed version (ground truth):
/** 
 * This method doesn't conflict, but is not tagged with the prefix. Whilst this is totally legal, it's a bad idea because there is then no way to detect errors when the underlying interface changes, see the notes on   {@link #entityPlayer$thisMethodDoesNotConflict}
 * @return The number 0
 */
public int norDoesThisOne(){
  return 0;
}
Program: 27650
Project: 27650
Buggy source:
/** 
 * <p>  {@link Redirect} annotations allow a method call to be proxied or even completely suppressed by redirecting the original method call to theannotated method.</p> <p>In this example, the  {@link MobSpawnerBaseLogic#resetTimer} method is hooked and redirected to this handler. The signature of the hookmethod must match the redirected method precisely with the addition of a new first argument which must match the type of the invocation's target, in this case  {@link MobSpawnerBaseLogic}. This first variable accepts the reference that the method was going to be invoked upon prior to being redirected.</p> <p>The benefit with   {@link Redirect} versus ordinary method call injections, is that the call to the method can be conditionally suppressed ifrequired, and also allows a more sophisticated version of  {@link ModifyArg} to be enacted since all parameters are available to the hook methodand can be altered as required.</p> <p>For <em>static</em> methods the handler must also be <em>static</em>, and the first argument can be omitted.</p> 
 */
@Redirect(method="String_Node_Str",at=@At(value="String_Node_Str",target="String_Node_Str")) private void onResetTimer(MobSpawnerBaseLogic this$0){
  System.err.println("String_Node_Str" + this + "String_Node_Str");
  boolean someCondition=true;
  if (someCondition) {
    this.resetTimer();
  }
}

Fixed version (ground truth):
/** 
 * <p>  {@link Redirect} annotations allow a method call to be proxied or even completely suppressed by redirecting the original method call to theannotated method.</p> <p>In this example, the  {@link MobSpawnerBaseLogic#resetTimer} method is hooked and redirected to this handler. The signature of the hookmethod must match the redirected method precisely with the addition of a new first argument which must match the type of the invocation's target, in this case  {@link MobSpawnerBaseLogic}. This first variable accepts the reference that the method was going to be invoked upon prior to being redirected.</p> <p>The benefit with   {@link Redirect} versus ordinary method call injections, is that the call to the method can be conditionally suppressed ifrequired, and also allows a more sophisticated version of  {@link ModifyArg} to be enacted since all parameters are available to the hook methodand can be altered as required.</p> <p>For <em>static</em> methods the handler must also be <em>static</em>, and the first argument can be omitted.</p>
 * @param this$0 this$0
 */
@Redirect(method="String_Node_Str",at=@At(value="String_Node_Str",target="String_Node_Str")) private void onResetTimer(MobSpawnerBaseLogic this$0){
  System.err.println("String_Node_Str" + this + "String_Node_Str");
  boolean someCondition=true;
  if (someCondition) {
    this.resetTimer();
  }
}
Program: 27652
Project: 27652
Buggy source:
/** 
 * This method implements getBlock from the   {@link IWorld} interface. However since the method signature overlaps with the "getBlock" methodabove, it is necessary to use the  {@link Shadow#prefix} functionality in the {@link Shadow} annotation to prevent a name clash at compiletime.
 * @see org.spongepowered.exampleinterfaces.IWorld#getBlock(int,int,int)
 */
@Override public Object getBlock(int x,int y,int z){
  return this.shadow$getBlockState(new BlockPos(x,y,z)).getBlock();
}

Fixed version (ground truth):
/** 
 * This method implements getBlock from the   {@link IWorld} interface. However since the method signature overlaps with the "getBlock" methodabove, it is necessary to use the  {@link Shadow#prefix} functionality in the {@link Shadow} annotation to prevent a name clash at compiletime.
 * @see org.spongepowered.exampleinterfaces.IWorld#getBlock(int,int,int)
 * @param x The x coordinate
 * @param y The y coordinate
 * @param z The z coordinate
 * @return The block
 */
@Override public Object getBlock(int x,int y,int z){
  return this.shadow$getBlockState(new BlockPos(x,y,z)).getBlock();
}
Program: 27653
Project: 27653
Buggy source:
/** 
 * <b>Overwrites</b> the <em>NotifyBlockChange</em> method in the target class
 * @param pos
 * @param block
 */
@Overwrite public void func_175722_b(BlockPos pos,Block block){
  this.notifyNeighborsOfStateChange(pos,block);
}

Fixed version (ground truth):
/** 
 * <b>Overwrites</b> the <em>NotifyBlockChange</em> method in the target class
 * @param pos The block location
 * @param block The block
 */
@Overwrite public void func_175722_b(BlockPos pos,Block block){
  this.notifyNeighborsOfStateChange(pos,block);
}
Program: 27654
Project: 27654
Buggy source:
/** 
 * This shadow method demonstrates use of the "prefix" option in the   {@link Shadow} annotation. Since it is not possible to have two methods in aa class which differ only on return type, this can create problems when a shadow method overlaps with a method in an interface being implemented by a mixin. Luckily, the JVM itself actually supports such overlaps, and thus we can work around the problem by renaming the overlapping methods at runtime. Using the "prefix" option allows this behaviour to be leveraged. For more details see  {@link Shadow#prefix}.
 * @param pos
 * @return
 */
@Shadow(prefix="String_Node_Str") abstract IBlockState shadow$getBlockState(BlockPos pos);

Fixed version (ground truth):
/** 
 * This shadow method demonstrates use of the "prefix" option in the   {@link Shadow} annotation. Since it is not possible to have two methods in aa class which differ only on return type, this can create problems when a shadow method overlaps with a method in an interface being implemented by a mixin. Luckily, the JVM itself actually supports such overlaps, and thus we can work around the problem by renaming the overlapping methods at runtime. Using the "prefix" option allows this behaviour to be leveraged. For more details see  {@link Shadow#prefix}.
 * @param pos The position
 * @return The blockstate
 */
@Shadow(prefix="String_Node_Str") abstract IBlockState shadow$getBlockState(BlockPos pos);
Program: 27656
Project: 27656
Buggy source:
/** 
 * <p>This method demonstrates injecting into a method with a return value. Notice that we take the original method, change the return type to <b>void</b> and add a   {@link CallbackInfoReturnable} with the original return type ({@link Vec3}) as the type parameter.</p> <p>This method also demonstrates a more precise syntax for identifying the target method. This is useful if there are several methods in the target class with the same name. We simply append the bytecode descriptor of the target method to the method name. For more details on this syntax see the javadoc in   {@link org.spongepowered.asm.mixin.injection.struct.MemberInfo}.</p> <p>The   {@link At} specified HEAD will inject the callback at the top of the method (before all other code).</p>
 */
@Inject(method="String_Node_Str",at=@At("String_Node_Str")) @SideOnly(Side.CLIENT) public void onGetFogColor(float celestialAngle,float partialTicks,CallbackInfoReturnable<Vec3> cir){
}

Fixed version (ground truth):
/** 
 * <p>This method demonstrates injecting into a method with a return value. Notice that we take the original method, change the return type to <b>void</b> and add a   {@link CallbackInfoReturnable} with the original return type ({@link Vec3}) as the type parameter.</p> <p>This method also demonstrates a more precise syntax for identifying the target method. This is useful if there are several methods in the target class with the same name. We simply append the bytecode descriptor of the target method to the method name. For more details on this syntax see the javadoc in   {@link org.spongepowered.asm.mixin.injection.struct.MemberInfo}.</p> <p>The   {@link At} specified HEAD will inject the callback at the top of the method (before all other code).</p>
 * @param celestialAngle The celestial angle
 * @param partialTicks The partial ticks
 * @param cir The callback
 */
@Inject(method="String_Node_Str",at=@At("String_Node_Str")) @SideOnly(Side.CLIENT) public void onGetFogColor(float celestialAngle,float partialTicks,CallbackInfoReturnable<Vec3> cir){
}
Program: 27659
Project: 27659
Buggy source:
@SuppressWarnings("String_Node_Str") @Overwrite private void doModEntityRegistration(Class<? extends Entity> entityClass,String entityName,int id,Object mod,int trackingRange,int updateFrequency,boolean sendsVelocityUpdates){
  ModContainer mc=FMLCommonHandler.instance().findContainerFor(mod);
  EntityRegistration er=EntityRegistry.instance().new EntityRegistration(mc,entityClass,entityName,id,trackingRange,updateFrequency,sendsVelocityUpdates);
  try {
    this.entityClassRegistrations.put(entityClass,er);
    this.entityNames.put(entityName,mc);
    if (!EntityList.classToStringMapping.containsKey(entityClass)) {
      String entityModName=String.format("String_Node_Str",mc.getModId(),entityName);
      EntityList.classToStringMapping.put(entityClass,entityModName);
      EntityList.stringToClassMapping.put(entityModName,entityClass);
      FMLLog.finer("String_Node_Str",mc.getModId(),entityName,entityModName);
    }
 else {
      FMLLog.fine("String_Node_Str",mc.getModId(),entityClass.getName());
    }
  }
 catch (  IllegalArgumentException e) {
    FMLLog.log(Level.WARN,e,"String_Node_Str",mc.getModId(),entityName,entityClass.getName());
    return;
  }
  this.entityRegistrations.put(mc,er);
  registerCustomEntity(entityClass,entityName,id,mod,trackingRange,updateFrequency,sendsVelocityUpdates);
}

Fixed version (ground truth):
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) private void doModEntityRegistration(Class<? extends Entity> entityClass,String entityName,int id,Object mod,int trackingRange,int updateFrequency,boolean sendsVelocityUpdates){
  ModContainer mc=FMLCommonHandler.instance().findContainerFor(mod);
  EntityRegistration er=EntityRegistry.instance().new EntityRegistration(mc,entityClass,entityName,id,trackingRange,updateFrequency,sendsVelocityUpdates);
  try {
    this.entityClassRegistrations.put(entityClass,er);
    this.entityNames.put(entityName,mc);
    if (!EntityList.classToStringMapping.containsKey(entityClass)) {
      String entityModName=String.format("String_Node_Str",mc.getModId(),entityName);
      EntityList.classToStringMapping.put(entityClass,entityModName);
      EntityList.stringToClassMapping.put(entityModName,entityClass);
      FMLLog.finer("String_Node_Str",mc.getModId(),entityName,entityModName);
    }
 else {
      FMLLog.fine("String_Node_Str",mc.getModId(),entityClass.getName());
    }
  }
 catch (  IllegalArgumentException e) {
    FMLLog.log(Level.WARN,e,"String_Node_Str",mc.getModId(),entityName,entityClass.getName());
    return;
  }
  this.entityRegistrations.put(mc,er);
  registerCustomEntity(entityClass,entityName,id,mod,trackingRange,updateFrequency,sendsVelocityUpdates);
}
Program: 27660
Project: 27660
Buggy source:
@Overwrite public static boolean registerProviderType(int id,Class<? extends WorldProvider> provider,boolean keepLoaded){
  if (providers.containsKey(id)) {
    return false;
  }
  String worldType="String_Node_Str";
switch (id) {
case -1:
    worldType="String_Node_Str";
  break;
case 0:
worldType="String_Node_Str";
break;
case 1:
worldType="String_Node_Str";
break;
default :
worldType=provider.getSimpleName().toLowerCase();
worldType=worldType.replace("String_Node_Str","String_Node_Str");
worldType=worldType.replace("String_Node_Str","String_Node_Str");
}
((SpongeGameRegistry)SpongeMod.instance.getGame().getRegistry()).registerEnvironment(new SpongeDimensionType(worldType,keepLoaded,provider));
providers.put(id,provider);
spawnSettings.put(id,keepLoaded);
return true;
}

Fixed version (ground truth):
public static boolean registerProviderType(int id,Class<? extends WorldProvider> provider,boolean keepLoaded){
  if (providers.containsKey(id)) {
    return false;
  }
  String worldType="String_Node_Str";
switch (id) {
case -1:
    worldType="String_Node_Str";
  break;
case 0:
worldType="String_Node_Str";
break;
case 1:
worldType="String_Node_Str";
break;
default :
worldType=provider.getSimpleName().toLowerCase();
worldType=worldType.replace("String_Node_Str","String_Node_Str");
worldType=worldType.replace("String_Node_Str","String_Node_Str");
}
((SpongeGameRegistry)SpongeMod.instance.getGame().getRegistry()).registerEnvironment(new SpongeDimensionType(worldType,keepLoaded,provider));
providers.put(id,provider);
spawnSettings.put(id,keepLoaded);
return true;
}
Program: 27661
Project: 27661
Buggy source:
@Shadow public abstract boolean isAllowedOnBooks();

Fixed version (ground truth):
@Shadow(remap=false) public abstract boolean isAllowedOnBooks();
Program: 27662
Project: 27662
Buggy source:
@Inject(method="String_Node_Str",at={@At(value="String_Node_Str",target="String_Node_Str"),@At(value="String_Node_Str",target="String_Node_Str")}) private void onUpdateWeatherBody(CallbackInfo ci){
  this.weatherStartTime=this.worldInfo.getWorldTotalTime();
}

Fixed version (ground truth):
@Inject(method="String_Node_Str",remap=false,at={@At(value="String_Node_Str",target="String_Node_Str"),@At(value="String_Node_Str",target="String_Node_Str")}) private void onUpdateWeatherBody(CallbackInfo ci){
  this.weatherStartTime=this.worldInfo.getWorldTotalTime();
}
Program: 27663
Project: 27663
Buggy source:
@Override public int getMinimumEnchantabilityForLevel(int level){
  return shadow$getMinEnchantability(level);
}

Fixed version (ground truth):
@Override public int getMinimumEnchantabilityForLevel(int level){
  return getMinEnchantability(level);
}
Program: 27664
Project: 27664
Buggy source:
@Override public String getId(){
  return ids.get(this).toString();
}

Fixed version (ground truth):
@Override public String getId(){
  for (  Entry<ResourceLocation,net.minecraft.enchantment.Enchantment> entry : field_180307_E.entrySet()) {
    if (entry.getValue().equals(this)) {
      return entry.getKey().toString();
    }
  }
  return null;
}
Program: 27665
Project: 27665
Buggy source:
@Override public boolean isCompatibleWith(Enchantment ench){
  return shadow$canApplyTogether((net.minecraft.enchantment.Enchantment)ench);
}

Fixed version (ground truth):
@Override public boolean isCompatibleWith(Enchantment ench){
  return canApplyTogether((net.minecraft.enchantment.Enchantment)ench);
}
Program: 27666
Project: 27666
Buggy source:
@Override public int getMaximumLevel(){
  return shadow$getMaxLevel();
}

Fixed version (ground truth):
@Override public int getMaximumLevel(){
  return getMaxLevel();
}
Program: 27667
Project: 27667
Buggy source:
@Override public boolean canBeAppliedByTable(ItemStack stack){
  return shadow$canApplyAtEnchantingTable((net.minecraft.item.ItemStack)stack);
}

Fixed version (ground truth):
@Override public boolean canBeAppliedByTable(ItemStack stack){
  return canApplyAtEnchantingTable((net.minecraft.item.ItemStack)stack);
}
Program: 27668
Project: 27668
Buggy source:
@Override public int getMaximumEnchantabilityForLevel(int level){
  return shadow$getMaxEnchantability(level);
}

Fixed version (ground truth):
@Override public int getMaximumEnchantabilityForLevel(int level){
  return getMaxEnchantability(level);
}
Program: 27669
Project: 27669
Buggy source:
@Override public int getMinimumLevel(){
  return shadow$getMinLevel();
}

Fixed version (ground truth):
@Override public int getMinimumLevel(){
  return getMinLevel();
}
Program: 27670
Project: 27670
Buggy source:
@Override public boolean canBeAppliedToStack(ItemStack stack){
  return (stack.getItem() == ItemTypes.BOOK) ? shadow$isAllowedOnBooks() : shadow$canApply((net.minecraft.item.ItemStack)stack);
}

Fixed version (ground truth):
@Override public boolean canBeAppliedToStack(ItemStack stack){
  return (stack.getItem() == ItemTypes.BOOK) ? isAllowedOnBooks() : canApply((net.minecraft.item.ItemStack)stack);
}
Program: 27671
Project: 27671
Buggy source:
@Shadow public abstract String getServerHostname();

Fixed version (ground truth):
@Shadow @SideOnly(Side.SERVER) public abstract String getServerHostname();
Program: 27672
Project: 27672
Buggy source:
@Shadow public abstract int getPort();

Fixed version (ground truth):
@Shadow @SideOnly(Side.SERVER) public abstract int getPort();
Program: 27673
Project: 27673
Buggy source:
public boolean pig$isSaddled(){
  return this.getSaddled();
}

Fixed version (ground truth):
public boolean pig$isSaddled(){
  return (this.dataWatcher.getWatchableObjectByte(16) & 1) != 0;
}
Program: 27674
Project: 27674
Buggy source:
public void pig$setSaddled(boolean saddled){
  this.setSaddled(saddled);
}

Fixed version (ground truth):
public void pig$setSaddled(boolean saddled){
  if (saddled) {
    this.dataWatcher.updateObject(16,Byte.valueOf((byte)1));
  }
 else {
    this.dataWatcher.updateObject(16,Byte.valueOf((byte)0));
  }
}
Program: 27675
Project: 27675
Buggy source:
public void sheep$setSheared(boolean sheared){
  this.setSheared(sheared);
}

Fixed version (ground truth):
public void sheep$setSheared(boolean sheared){
  byte b0=this.dataWatcher.getWatchableObjectByte(16);
  if (sheared) {
    this.dataWatcher.updateObject(16,Byte.valueOf((byte)(b0 | 16)));
  }
 else {
    this.dataWatcher.updateObject(16,Byte.valueOf((byte)(b0 & -17)));
  }
}
Program: 27676
Project: 27676
Buggy source:
public void enderman$setScreaming(boolean screaming){
  this.setScreaming(screaming);
}

Fixed version (ground truth):
public void enderman$setScreaming(boolean screaming){
  this.dataWatcher.updateObject(18,Byte.valueOf((byte)(screaming ? 1 : 0)));
}
Program: 27677
Project: 27677
Buggy source:
public boolean enderman$isScreaming(){
  return this.isScreaming();
}

Fixed version (ground truth):
public boolean enderman$isScreaming(){
  return this.dataWatcher.getWatchableObjectByte(18) > 0;
}
Program: 27678
Project: 27678
Buggy source:
public boolean guardian$isElder(){
  return this.isElder();
}

Fixed version (ground truth):
public boolean guardian$isElder(){
  return (this.dataWatcher.getWatchableObjectInt(16) & 4) != 0;
}
Program: 27679
Project: 27679
Buggy source:
public void witch$setAggressive(boolean aggressive){
  this.setAggressive(aggressive);
}

Fixed version (ground truth):
public void witch$setAggressive(boolean aggressive){
  this.getDataWatcher().updateObject(21,Byte.valueOf((byte)(aggressive ? 1 : 0)));
}
Program: 27680
Project: 27680
Buggy source:
@Override public PotionEffectType getType(){
  return (PotionEffectType)Potion.potionTypes[getPotionId()];
}

Fixed version (ground truth):
@Override public PotionEffectType getType(){
  return (PotionEffectType)Potion.potionTypes[getPotionID()];
}
Program: 27681
Project: 27681
Buggy source:
@Override protected void configure(){
  PluginScope pluginScope=new PluginScope();
  Config pluginConfig=new ConfigFileAnnotation(true);
  ConfigDir sharedDir=new ConfigDirAnnotation(true);
  ConfigDir pluginDir=new ConfigDirAnnotation(false);
  bindScope(PluginScoped.class,pluginScope);
  bind(PluginScope.class).toInstance(pluginScope);
  bind(Game.class).to(SpongeGame.class).in(Scopes.SINGLETON);
  bind(PluginManager.class).to(SpongePluginManager.class).in(Scopes.SINGLETON);
  bind(EventManager.class).to(SpongeEventManager.class).in(Scopes.SINGLETON);
  bind(GameRegistry.class).to(SpongeGameRegistry.class).in(Scopes.SINGLETON);
  bind(File.class).annotatedWith(sharedDir).toProvider(GeneralConfigDirProvider.class).in(Scopes.SINGLETON);
  bind(PluginContainer.class).toProvider(PluginContainerProvider.class).in(PluginScoped.class);
  bind(Logger.class).toProvider(PluginLogProvider.class).in(PluginScoped.class);
  bind(File.class).annotatedWith(pluginConfig).toProvider(PluginConfigFileProvider.class).in(PluginScoped.class);
  bind(File.class).annotatedWith(pluginDir).toProvider(PluginConfigDirProvider.class).in(PluginScoped.class);
  bind(ConfigFile.class).annotatedWith(pluginConfig).toProvider(PluginHoconConfigProvider.class).in(PluginScoped.class);
}

Fixed version (ground truth):
@Override protected void configure(){
  PluginScope pluginScope=new PluginScope();
  DefaultConfig pluginConfig=new ConfigFileAnnotation(true);
  ConfigDir sharedDir=new ConfigDirAnnotation(true);
  ConfigDir pluginDir=new ConfigDirAnnotation(false);
  bindScope(PluginScoped.class,pluginScope);
  bind(PluginScope.class).toInstance(pluginScope);
  bind(Game.class).to(SpongeGame.class).in(Scopes.SINGLETON);
  bind(PluginManager.class).to(SpongePluginManager.class).in(Scopes.SINGLETON);
  bind(EventManager.class).to(SpongeEventManager.class).in(Scopes.SINGLETON);
  bind(GameRegistry.class).to(SpongeGameRegistry.class).in(Scopes.SINGLETON);
  bind(File.class).annotatedWith(sharedDir).toProvider(GeneralConfigDirProvider.class).in(Scopes.SINGLETON);
  bind(PluginContainer.class).toProvider(PluginContainerProvider.class).in(PluginScoped.class);
  bind(Logger.class).toProvider(PluginLogProvider.class).in(PluginScoped.class);
  bind(File.class).annotatedWith(pluginConfig).toProvider(PluginConfigFileProvider.class).in(PluginScoped.class);
  bind(File.class).annotatedWith(pluginDir).toProvider(PluginConfigDirProvider.class).in(PluginScoped.class);
  bind(ConfigFile.class).annotatedWith(pluginConfig).toProvider(PluginHoconConfigProvider.class).in(PluginScoped.class);
}
Program: 27682
Project: 27682
Buggy source:
@Override public boolean equals(Object o){
  if (this == o) {
    return true;
  }
  if (o == null || !(o instanceof Config)) {
    return false;
  }
  Config that=(Config)o;
  return sharedRoot() == that.sharedRoot();
}

Fixed version (ground truth):
@Override public boolean equals(Object o){
  if (this == o) {
    return true;
  }
  if (o == null || !(o instanceof ConfigDir)) {
    return false;
  }
  ConfigDir that=(ConfigDir)o;
  return sharedRoot() == that.sharedRoot();
}
Program: 27683
Project: 27683
Buggy source:
/** 
 * Apply the mixin described by mixin to the supplied classNode
 * @param targetClass
 * @param mixinInfo
 */
protected void applyMixin(ClassNode targetClass,MixinData mixin){
  try {
    this.verifyClasses(targetClass,mixin);
    this.applyMixinInterfaces(targetClass,mixin);
    this.applyMixinAttributes(targetClass,mixin);
    this.applyMixinFields(targetClass,mixin);
    this.applyMixinMethods(targetClass,mixin);
  }
 catch (  Exception ex) {
    throw new InvalidMixinException("String_Node_Str",ex);
  }
}

Fixed version (ground truth):
/** 
 * Apply the mixin described by mixin to the supplied classNode
 * @param targetClass
 * @param mixin
 */
protected void applyMixin(ClassNode targetClass,MixinData mixin){
  try {
    this.verifyClasses(targetClass,mixin);
    this.applyMixinInterfaces(targetClass,mixin);
    this.applyMixinAttributes(targetClass,mixin);
    this.applyMixinFields(targetClass,mixin);
    this.applyMixinMethods(targetClass,mixin);
  }
 catch (  Exception ex) {
    throw new InvalidMixinException("String_Node_Str",ex);
  }
}
Program: 27684
Project: 27684
Buggy source:
@Override public String getId(){
  return Block.blockRegistry.getNameForObject(this);
}

Fixed version (ground truth):
@Override public String getId(){
  return (String)Block.blockRegistry.getNameForObject(this);
}
Program: 27685
Project: 27685
Buggy source:
@Override public Collection<World> getWorlds(){
  List<World> worlds=new ArrayList<World>();
  for (  WorldServer worldServer : DimensionManager.getWorlds()) {
    worlds.add((World)worldServer);
  }
  return worlds;
}

Fixed version (ground truth):
@Override public Collection<World> getWorlds(){
  throw new UnsupportedOperationException();
}
Program: 27686
Project: 27686
Buggy source:
public BlockWrapper(World world,int x,int y,int z){
  if (!(world instanceof net.minecraft.world.World)) {
    System.err.println("String_Node_Str");
    handle=(net.minecraft.world.World)world;
    throw new RuntimeException("String_Node_Str");
  }
  handle=(net.minecraft.world.World)world;
  extent=world;
  this.x=x;
  this.y=y;
  this.z=z;
  this.blockType=(BlockType)handle.getBlock(x,y,z);
}

Fixed version (ground truth):
public BlockWrapper(World world,int x,int y,int z){
  if (!(world instanceof net.minecraft.world.World)) {
    System.err.println("String_Node_Str");
    handle=(net.minecraft.world.World)world;
    throw new RuntimeException("String_Node_Str");
  }
  handle=(net.minecraft.world.World)world;
  extent=world;
  pos=new BlockPos(x,y,z);
  this.blockType=(BlockType)handle.getBlockState(new BlockPos(x,y,z)).getBlock();
}
Program: 27687
Project: 27687
Buggy source:
@Override public Location getLocation(){
  return new Location(extent,Vectors.create3d(x,y,z));
}

Fixed version (ground truth):
@Override public Location getLocation(){
  return new Location(extent,Vectors.create3d(pos.getX(),pos.getY(),pos.getZ()));
}
Program: 27688
Project: 27688
Buggy source:
@Override public void replaceData(byte data){
  handle.setBlockMetadataWithNotify(x,y,z,data,0);
}

Fixed version (ground truth):
@Override public void replaceData(byte data){
  handle.setBlockState(pos,((net.minecraft.block.Block)blockType).getStateFromMeta(data),0);
}
Program: 27689
Project: 27689
Buggy source:
@Override public byte getLuminance(){
  return (byte)handle.getBlockLightValue(x,y,z);
}

Fixed version (ground truth):
@Override public byte getLuminance(){
  return (byte)handle.getLight(pos);
}
Program: 27690
Project: 27690
Buggy source:
@Override public boolean isPowered(){
  return handle.getBlockPowerInput(x,y,z) > 0;
}

Fixed version (ground truth):
@Override public boolean isPowered(){
  return handle.getStrongPower(pos) > 0;
}
Program: 27691
Project: 27691
Buggy source:
@Override public byte getDataValue(){
  return (byte)handle.getBlockMetadata(x,y,z);
}

Fixed version (ground truth):
@Override public byte getDataValue(){
  IBlockState state=handle.getBlockState(pos);
  return (byte)state.getBlock().getMetaFromState(state);
}
Program: 27692
Project: 27692
Buggy source:
@Override public byte getLuminanceFromSky(){
  return (byte)handle.getSkyBlockTypeBrightness(EnumSkyBlock.Sky,x,y,z);
}

Fixed version (ground truth):
@Override public byte getLuminanceFromSky(){
  return (byte)handle.getLightFor(EnumSkyBlock.SKY,pos);
}
Program: 27693
Project: 27693
Buggy source:
private static int getNotchDirection(Direction dir){
switch (dir) {
case DOWN:
    return 0;
case UP:
  return 1;
case NORTH:
return 2;
case SOUTH:
return 3;
case WEST:
return 4;
case EAST:
return 5;
default :
return 7;
}
}

Fixed version (ground truth):
private static EnumFacing getNotchDirection(Direction dir){
switch (dir) {
case DOWN:
    return EnumFacing.DOWN;
case UP:
  return EnumFacing.UP;
case NORTH:
return EnumFacing.NORTH;
case SOUTH:
return EnumFacing.SOUTH;
case WEST:
return EnumFacing.WEST;
case EAST:
return EnumFacing.EAST;
default :
return EnumFacing.DOWN;
}
}
Program: 27694
Project: 27694
Buggy source:
@Override public int getX(){
  return x;
}

Fixed version (ground truth):
@Override public int getX(){
  return pos.getX();
}
Program: 27695
Project: 27695
Buggy source:
@Override public Vector3i getPosition(){
  return Vectors.create3i(x,y,z);
}

Fixed version (ground truth):
@Override public Vector3i getPosition(){
  return Vectors.create3i(pos.getX(),pos.getY(),pos.getZ());
}
Program: 27696
Project: 27696
Buggy source:
@Override public int getY(){
  return y;
}

Fixed version (ground truth):
@Override public int getY(){
  return pos.getY();
}
Program: 27697
Project: 27697
Buggy source:
@Override public boolean isFacePowered(Direction direction){
  return handle.getIndirectPowerLevelTo(x,y,z,getNotchDirection(direction)) > 0;
}

Fixed version (ground truth):
@Override public boolean isFacePowered(Direction direction){
  return handle.getStrongPower(pos,getNotchDirection(direction)) > 0;
}
Program: 27698
Project: 27698
Buggy source:
@Override public int getZ(){
  return z;
}

Fixed version (ground truth):
@Override public int getZ(){
  return pos.getZ();
}
Program: 27699
Project: 27699
Buggy source:
@Override public BlockType getType(){
  return (BlockType)handle.getBlock(x,y,z);
}

Fixed version (ground truth):
@Override public BlockType getType(){
  return blockType;
}
Program: 27700
Project: 27700
Buggy source:
@Override public byte getLuminanceFromGround(){
  return (byte)handle.getSkyBlockTypeBrightness(EnumSkyBlock.Block,x,y,z);
}

Fixed version (ground truth):
@Override public byte getLuminanceFromGround(){
  return (byte)handle.getLightFor(EnumSkyBlock.BLOCK,pos);
}
Program: 27701
Project: 27701
Buggy source:
@Override public boolean isFaceIndirectlyPowered(Direction direction){
  return handle.getIndirectPowerLevelTo(x,y,z,getNotchDirection(direction)) > 0;
}

Fixed version (ground truth):
@Override public boolean isFaceIndirectlyPowered(Direction direction){
  return handle.getRedstonePower(pos,getNotchDirection(direction)) > 0;
}
Program: 27702
Project: 27702
Buggy source:
@Override public boolean isIndirectlyPowered(){
  return handle.isBlockIndirectlyGettingPowered(x,y,z);
}

Fixed version (ground truth):
@Override public boolean isIndirectlyPowered(){
  return handle.isBlockPowered(pos);
}
Program: 27703
Project: 27703
Buggy source:
@Override public void replaceWith(BlockSnapshot snapshot){
  replaceData(snapshot.getDataValue());
  replaceWith(snapshot.getType());
}

Fixed version (ground truth):
@Override public void replaceWith(BlockSnapshot snapshot){
  replaceWith(snapshot.getType());
  replaceData(snapshot.getDataValue());
}
Program: 27704
Project: 27704
Buggy source:
/** 
 * This method implements getBlock from the   {@link IWorld} interface. However since the method signature overlaps with the "getBlock" methodabove, it is necessary to use the  {@link Shadow#prefix} functionality in the {@link Shadow} annotation to prevent a name clash at compiletime.
 * @see org.spongepowered.mixin.interfaces.IWorld#getBlock(int,int,int)
 */
@Override public Object getBlock(int x,int y,int z){
  return this.shadow$getBlock(x,y,z);
}

Fixed version (ground truth):
/** 
 * This method implements getBlock from the   {@link IWorld} interface. However since the method signature overlaps with the "getBlock" methodabove, it is necessary to use the  {@link Shadow#prefix} functionality in the {@link Shadow} annotation to prevent a name clash at compiletime.
 * @see org.spongepowered.mixin.interfaces.IWorld#getBlock(int,int,int)
 */
@Override public Object getBlock(int x,int y,int z){
  return this.shadow$getBlockState(new BlockPos(x,y,z)).getBlock();
}
Program: 27705
Project: 27705
Buggy source:
@Override public int exampleMethodToComputeLightValue(int x,int y,int z,EnumSkyBlock block){
  return this.computeLightValue(x,y,z,block);
}

Fixed version (ground truth):
@Override public int exampleMethodToComputeLightValue(int x,int y,int z,EnumSkyBlock block){
  return this.func_175638_a(new BlockPos(x,y,z),block);
}
Program: 27706
Project: 27706
Buggy source:
/** 
 * Apply the mixin described by mixin to the supplied classNode
 * @param targetClass
 * @param mixin
 */
protected void applyMixin(ClassNode targetClass,MixinInfo mixin){
  ClassNode mixinClass=mixin.getClassNode(ClassReader.EXPAND_FRAMES);
  try {
    this.verifyClasses(targetClass,mixinClass);
    this.applyMixinInterfaces(targetClass,mixinClass);
    this.applyMixinAttributes(targetClass,mixinClass);
    this.applyMixinFields(targetClass,mixinClass);
    this.applyMixinMethods(targetClass,mixinClass);
  }
 catch (  Exception ex) {
    throw new InvalidMixinException("String_Node_Str",ex);
  }
}

Fixed version (ground truth):
/** 
 * Apply the mixin described by mixin to the supplied classNode
 * @param targetClass
 * @param mixinInfo
 */
protected void applyMixin(ClassNode targetClass,MixinData mixin){
  try {
    this.verifyClasses(targetClass,mixin);
    this.applyMixinInterfaces(targetClass,mixin);
    this.applyMixinAttributes(targetClass,mixin);
    this.applyMixinFields(targetClass,mixin);
    this.applyMixinMethods(targetClass,mixin);
  }
 catch (  Exception ex) {
    throw new InvalidMixinException("String_Node_Str",ex);
  }
}
Program: 27707
Project: 27707
Buggy source:
/** 
 * Mixin misc attributes from mixin class onto the target class
 * @param targetClass
 * @param mixinClass
 */
private void applyMixinAttributes(ClassNode targetClass,ClassNode mixinClass){
  if (this.config.shouldSetSourceFile()) {
    targetClass.sourceFile=mixinClass.sourceFile;
  }
}

Fixed version (ground truth):
/** 
 * Mixin misc attributes from mixin class onto the target class
 * @param targetClass
 * @param mixin
 */
private void applyMixinAttributes(ClassNode targetClass,MixinData mixin){
  if (this.config.shouldSetSourceFile()) {
    targetClass.sourceFile=mixin.getClassNode().sourceFile;
  }
}
Program: 27709
Project: 27709
Buggy source:
/** 
 * Apply mixins for specified target class to the class described by the supplied byte array
 * @param transformedName 
 * @param basicClass
 * @return
 */
private byte[] applyMixins(String transformedName,byte[] basicClass){
  ClassNode targetClass=this.readClass(basicClass,true);
  List<MixinInfo> mixins=this.config.getMixinsFor(transformedName);
  Collections.sort(mixins);
  for (  MixinInfo mixin : mixins) {
    this.logger.info("String_Node_Str",mixin.getClassName(),transformedName);
    this.applyMixin(targetClass,mixin);
  }
  this.postTransform(transformedName,targetClass,mixins);
  return this.writeClass(targetClass);
}

Fixed version (ground truth):
/** 
 * Apply mixins for specified target class to the class described by the supplied byte array
 * @param transformedName 
 * @param basicClass
 * @return
 */
private byte[] applyMixins(String transformedName,byte[] basicClass){
  ClassNode targetClass=this.readClass(basicClass,true);
  List<MixinInfo> mixins=this.config.getMixinsFor(transformedName);
  Collections.sort(mixins);
  for (  MixinInfo mixin : mixins) {
    this.logger.info("String_Node_Str",mixin.getClassName(),transformedName);
    this.applyMixin(targetClass,mixin.getData());
  }
  this.postTransform(transformedName,targetClass,mixins);
  return this.writeClass(targetClass);
}