nus-yam/ex-repair huggingface dataset:
Program: 27570
Project: 27570
Buggy source:
@Redirect(method="String_Node_Str",at=@At(value="String_Node_Str",target="String_Node_Str",remap=false)) public void onBreakBlock(Block block,IBlockState state,World worldIn,BlockPos pos){
  if (CauseTracker.ENABLED && !worldIn.isRemote) {
    IMixinWorldServer spongeWorld=(IMixinWorldServer)worldIn;
    final CauseTracker causeTracker=spongeWorld.getCauseTracker();
    final boolean isBlockAlready=causeTracker.getStack().current() != TrackingPhases.BLOCK;
    final IPhaseState currentState=causeTracker.getStack().peek().state;
    final boolean isWorldGen=currentState.getPhase().isWorldGeneration(currentState);
    final IBlockState actualState=state.getActualState(worldIn,pos);
    if (isBlockAlready && !isWorldGen) {
      causeTracker.switchToPhase(BlockPhase.State.BLOCK_DECAY,PhaseContext.start().add(NamedCause.source(spongeWorld.createSpongeBlockSnapshot(state,actualState,pos,3))).addCaptures().complete());
    }
    block.beginLeavesDecay(state,worldIn,pos);
    if (isBlockAlready && !isWorldGen) {
      causeTracker.completePhase();
    }
  }
 else {
    block.beginLeavesDecay(state,worldIn,pos);
  }
}

Fixed version (ground truth):
@Redirect(method="String_Node_Str",at=@At(value="String_Node_Str",target="String_Node_Str",remap=false)) public void onBreakBlock(Block block,IBlockState state,World worldIn,BlockPos pos){
  if (CauseTracker.ENABLED && !worldIn.isRemote) {
    IMixinWorldServer spongeWorld=(IMixinWorldServer)worldIn;
    final CauseTracker causeTracker=spongeWorld.getCauseTracker();
    final IPhaseState currentState=causeTracker.getCurrentState();
    final boolean isBlockAlready=currentState.getPhase() != TrackingPhases.BLOCK;
    final boolean isWorldGen=currentState.getPhase().isWorldGeneration(currentState);
    final IBlockState actualState=state.getActualState(worldIn,pos);
    if (isBlockAlready && !isWorldGen) {
      causeTracker.switchToPhase(BlockPhase.State.BLOCK_DECAY,PhaseContext.start().add(NamedCause.source(spongeWorld.createSpongeBlockSnapshot(state,actualState,pos,3))).addCaptures().complete());
    }
    block.beginLeavesDecay(state,worldIn,pos);
    if (isBlockAlready && !isWorldGen) {
      causeTracker.completePhase();
    }
  }
 else {
    block.beginLeavesDecay(state,worldIn,pos);
  }
}
Program: 27571
Project: 27571
Buggy source:
/** 
 * @author bloodmc
 * @reason Since we capture blocks as they are set in the world, gettingthe current blockstate will not work during Forge's BlockBreak event as the state will be post. In order to workaround this issue, we set the captured extended state before creating the event.
 */
@Overwrite public static boolean canHarvestBlock(Block block,EntityPlayer player,IBlockAccess world,BlockPos pos){
  final IBlockState state;
  final IBlockState staticState=StaticMixinForgeHelper.breakEventExtendedState;
  if (staticState != null) {
    state=staticState;
  }
 else {
    state=world.getBlockState(pos).getActualState(world,pos);
  }
  if (world instanceof IMixinWorldServer && player instanceof EntityPlayerMP) {
    final CauseTracker causeTracker=((IMixinWorldServer)world).getCauseTracker();
    final PhaseData peek=causeTracker.getStack().peek();
    final IPhaseState phaseState=peek.state;
    phaseState.getPhase().capturePlayerUsingStackToBreakBlock(null,(EntityPlayerMP)player,phaseState,peek.context,causeTracker);
  }
  if (state.getMaterial().isToolNotRequired()) {
    return true;
  }
  ItemStack stack=player.inventory.getCurrentItem();
  String tool=block.getHarvestTool(state);
  if (stack == null || tool == null) {
    return player.canHarvestBlock(state);
  }
  int toolLevel=stack.getItem().getHarvestLevel(stack,tool);
  if (toolLevel < 0) {
    return player.canHarvestBlock(state);
  }
  return toolLevel >= block.getHarvestLevel(state);
}

Fixed version (ground truth):
/** 
 * @author bloodmc
 * @reason Since we capture blocks as they are set in the world, gettingthe current blockstate will not work during Forge's BlockBreak event as the state will be post. In order to workaround this issue, we set the captured extended state before creating the event.
 */
@Overwrite public static boolean canHarvestBlock(Block block,EntityPlayer player,IBlockAccess world,BlockPos pos){
  final IBlockState state;
  final IBlockState staticState=StaticMixinForgeHelper.breakEventExtendedState;
  if (staticState != null) {
    state=staticState;
  }
 else {
    state=world.getBlockState(pos).getActualState(world,pos);
  }
  if (world instanceof IMixinWorldServer && player instanceof EntityPlayerMP) {
    final CauseTracker causeTracker=((IMixinWorldServer)world).getCauseTracker();
    final PhaseData peek=causeTracker.getCurrentPhaseData();
    final IPhaseState phaseState=peek.state;
    phaseState.getPhase().capturePlayerUsingStackToBreakBlock(null,(EntityPlayerMP)player,phaseState,peek.context,causeTracker);
  }
  if (state.getMaterial().isToolNotRequired()) {
    return true;
  }
  ItemStack stack=player.inventory.getCurrentItem();
  String tool=block.getHarvestTool(state);
  if (stack == null || tool == null) {
    return player.canHarvestBlock(state);
  }
  int toolLevel=stack.getItem().getHarvestLevel(stack,tool);
  if (toolLevel < 0) {
    return player.canHarvestBlock(state);
  }
  return toolLevel >= block.getHarvestLevel(state);
}
Program: 27573
Project: 27573
Buggy source:
@Subscribe public void onServerStopped(FMLServerStoppedEvent event) throws IOException {
  try {
    CommandManager service=this.game.getCommandManager();
    service.getCommands().stream().filter(mapping -> mapping.getCallable() instanceof MinecraftCommandWrapper).forEach(service::removeMapping);
    ((SqlServiceImpl)this.game.getServiceManager().provideUnchecked(SqlService.class)).close();
  }
 catch (  Throwable t) {
    this.controller.errorOccurred(this,t);
  }
}

Fixed version (ground truth):
@Subscribe public void onServerStopped(FMLServerStoppedEvent event) throws IOException {
  try {
    CommandManager service=this.game.getCommandManager();
    service.getCommands().stream().filter(mapping -> mapping.getCallable() instanceof MinecraftCommandWrapper).forEach(service::removeMapping);
    ((SqlServiceImpl)this.game.getServiceManager().provideUnchecked(SqlService.class)).close();
  }
 catch (  Throwable t) {
    this.controller.errorOccurred(this,t);
  }
  WorldManager.unregisterAllWorldSettings();
}
Program: 27574
Project: 27574
Buggy source:
@Subscribe public void onServerAboutToStart(FMLServerAboutToStartEvent event){
  try {
    ((IMixinServerCommandManager)SpongeImpl.getServer().getCommandManager()).registerEarlyCommands(this.game);
  }
 catch (  Throwable t) {
    this.controller.errorOccurred(this,t);
  }
}

Fixed version (ground truth):
@Subscribe public void onServerAboutToStart(FMLServerAboutToStartEvent event){
  try {
    ((IMixinServerCommandManager)SpongeImpl.getServer().getCommandManager()).registerEarlyCommands(this.game);
  }
 catch (  Throwable t) {
    this.controller.errorOccurred(this,t);
  }
  WorldManager.registerVanillaTypesAndDimensions();
}
Program: 27575
Project: 27575
Buggy source:
private boolean isEventAllowed(Event event){
  if (event instanceof BlockEvent.PlaceEvent) {
    return false;
  }
 else   if (event instanceof BlockEvent.BreakEvent) {
    return false;
  }
 else   if (event instanceof PlayerInteractEvent.EntityInteract) {
    return false;
  }
 else   if (event instanceof LivingDropsEvent) {
    return false;
  }
 else   if (event instanceof WorldEvent.Save) {
    return false;
  }
 else   if (event instanceof AttackEntityEvent) {
    return false;
  }
  return true;
}

Fixed version (ground truth):
private boolean isEventAllowed(Event event){
  if (event instanceof BlockEvent.PlaceEvent) {
    return false;
  }
 else   if (event instanceof BlockEvent.BreakEvent) {
    return false;
  }
 else   if (event instanceof PlayerInteractEvent.EntityInteract) {
    return false;
  }
 else   if (event instanceof LivingDropsEvent) {
    return false;
  }
 else   if (event instanceof WorldEvent.Save) {
    return false;
  }
 else   if (event instanceof WorldEvent.Unload) {
    return false;
  }
 else   if (event instanceof AttackEntityEvent) {
    return false;
  }
  return true;
}
Program: 27577
Project: 27577
Buggy source:
@Overwrite public static void setWorld(int id,WorldServer world,MinecraftServer server){
  if (world == null) {
    WorldManager.unloadWorld(WorldManager.getWorldByDimensionId(id).orElseThrow(() -> new RuntimeException("String_Node_Str" + "String_Node_Str" + id + "String_Node_Str")),false,true,true,false);
  }
}

Fixed version (ground truth):
@Overwrite public static void setWorld(int id,WorldServer world,MinecraftServer server){
  if (world != null) {
    WorldManager.forceAddWorld(id,world);
    FMLLog.info("String_Node_Str",id,world.getWorldInfo().getWorldName(),world.getMinecraftServer());
  }
 else {
    WorldManager.unloadWorld(WorldManager.getWorldByDimensionId(id).orElseThrow(() -> new RuntimeException("String_Node_Str" + "String_Node_Str" + id + "String_Node_Str")),false,true,true,false);
  }
  WorldManager.reorderWorldsVanillaFirst();
}
Program: 27579
Project: 27579
Buggy source:
@Override protected boolean throwEvent(ICommandSender sender,String[] args) throws InvocationCommandException {
  CommandEvent event=new CommandEvent(this.command,sender,args);
  if (MinecraftForge.EVENT_BUS.post(event)) {
    if (event.exception != null) {
      throw new InvocationCommandException(Text.of("String_Node_Str"),event.exception);
    }
    return false;
  }
  return super.throwEvent(sender,args);
}

Fixed version (ground truth):
@Override protected boolean throwEvent(ICommandSender sender,String[] args) throws InvocationCommandException {
  CommandEvent event=new CommandEvent(this.command,sender,args);
  if (MinecraftForge.EVENT_BUS.post(event)) {
    if (event.getException() != null) {
      throw new InvocationCommandException(Text.of("String_Node_Str"),event.getException());
    }
    return false;
  }
  return super.throwEvent(sender,args);
}
Program: 27580
Project: 27580
Buggy source:
@Override public Optional<LightEmissionProperty> getFor(Location<World> location){
  net.minecraft.world.World world=(net.minecraft.world.World)location.getExtent();
  Block block=(Block)location.getBlockType();
  final BlockState blockState=location.getBlock();
  return Optional.of(new LightEmissionProperty(block.getLightValue(BlockUtil.toBlockState(blockState),world,VecHelper.toBlockPos(location))));
}

Fixed version (ground truth):
@Override public Optional<LightEmissionProperty> getFor(Location<World> location){
  net.minecraft.world.World world=(net.minecraft.world.World)location.getExtent();
  Block block=(Block)location.getBlockType();
  final BlockState blockState=location.getBlock();
  return Optional.of(new LightEmissionProperty(block.getLightValue(BlockUtil.toNative(blockState),world,VecHelper.toBlockPos(location))));
}
Program: 27581
Project: 27581
Buggy source:
@SideOnly(Side.SERVER) @SubscribeEvent public void onChunkWatchEvent(ChunkWatchEvent event){
  IMixinEntity spongeEntity=(IMixinEntity)event.getPlayer();
  if (spongeEntity.isTeleporting()) {
    event.getPlayer().mountEntity(spongeEntity.getTeleportVehicle());
    spongeEntity.setTeleportVehicle(null);
    spongeEntity.setIsTeleporting(false);
  }
}

Fixed version (ground truth):
@SideOnly(Side.SERVER) @SubscribeEvent public void onChunkWatchEvent(ChunkWatchEvent event){
  IMixinEntity spongeEntity=(IMixinEntity)event.getPlayer();
  if (spongeEntity.isTeleporting()) {
    spongeEntity.getTeleportVehicle().getPassengers().add(event.getPlayer());
    spongeEntity.setTeleportVehicle(null);
    spongeEntity.setIsTeleporting(false);
  }
}
Program: 27583
Project: 27583
Buggy source:
public boolean post(Event spongeEvent,boolean allowClientThread){
  if (!allowClientThread & SpongeMod.instance.isClientThread()) {
    return false;
  }
  if (spongeEvent.getClass().getInterfaces().length > 0) {
    Class<? extends net.minecraftforge.fml.common.eventhandler.Event> clazz=this.eventMappings.get(spongeEvent.getClass().getInterfaces()[0]);
    if (clazz == null) {
      clazz=eventBulkMappings.get(spongeEvent.getClass().getInterfaces()[0]);
      if (clazz != null) {
        return postBulk(spongeEvent,clazz);
      }
    }
 else {
      StaticMixinHelper.processingInternalForgeEvent=true;
      net.minecraftforge.fml.common.eventhandler.Event forgeEvent=SpongeForgeEventFactory.findAndCreateForgeEvent(spongeEvent,clazz);
      StaticMixinHelper.processingInternalForgeEvent=false;
      if (forgeEvent != null) {
        Class<?> enclosingClass=forgeEvent.getClass().getEnclosingClass();
        EventBus bus=this.busMappings.get(enclosingClass == null ? forgeEvent.getClass() : enclosingClass);
        if (bus == null) {
          bus=MinecraftForge.EVENT_BUS;
        }
        SpongeForgeEventFactory.lastForgeEvent=forgeEvent;
        return post(spongeEvent,forgeEvent,forgeEvent.getListenerList().getListeners(((IMixinEventBus)bus).getBusID()));
      }
    }
  }
  return post(spongeEvent,getHandlerCache(spongeEvent).getListeners(),false,true);
}

Fixed version (ground truth):
public boolean post(Event spongeEvent,boolean allowClientThread){
  if (!allowClientThread & SpongeMod.instance.isClientThread()) {
    return false;
  }
  if (spongeEvent.getClass().getInterfaces().length > 0) {
    Class<? extends net.minecraftforge.fml.common.eventhandler.Event> clazz=this.eventMappings.get(spongeEvent.getClass().getInterfaces()[0]);
    if (clazz == null) {
      clazz=eventBulkMappings.get(spongeEvent.getClass().getInterfaces()[0]);
      if (clazz != null) {
        return postBulk(spongeEvent,clazz);
      }
    }
 else {
      StaticMixinHelper.processingInternalForgeEvent=true;
      net.minecraftforge.fml.common.eventhandler.Event forgeEvent=SpongeForgeEventFactory.findAndCreateForgeEvent(spongeEvent,clazz);
      StaticMixinHelper.processingInternalForgeEvent=false;
      if (forgeEvent != null) {
        Class<?> enclosingClass=forgeEvent.getClass().getEnclosingClass();
        EventBus bus=this.busMappings.get(enclosingClass == null ? forgeEvent.getClass() : enclosingClass);
        if (bus == null) {
          bus=MinecraftForge.EVENT_BUS;
        }
        return post(spongeEvent,forgeEvent,forgeEvent.getListenerList().getListeners(((IMixinEventBus)bus).getBusID()));
      }
    }
  }
  return post(spongeEvent,getHandlerCache(spongeEvent).getListeners(),false,true);
}
Program: 27584
Project: 27584
Buggy source:
@Inject(method="String_Node_Str",at=@At("String_Node_Str")) public void onConstructed(EntityPlayer player,Action action,BlockPos pos,EnumFacing face,net.minecraft.world.World world,CallbackInfo ci){
  if (player instanceof EntityPlayerMP && !StaticMixinHelper.processingInternalForgeEvent) {
    if (pos != null) {
      this.blockSnapshot=((World)world).createSnapshot(pos.getX(),pos.getY(),pos.getZ());
    }
 else {
      this.blockSnapshot=BlockTypes.AIR.getDefaultState().snapshotFor(new Location<>((World)world,Vector3i.ZERO));
    }
  }
}

Fixed version (ground truth):
@Inject(method="String_Node_Str",at=@At("String_Node_Str")) public void onConstructed(EntityPlayer player,Action action,BlockPos pos,EnumFacing face,net.minecraft.world.World world,CallbackInfo ci){
  if (player instanceof EntityPlayerMP && !StaticMixinHelper.processingInternalForgeEvent) {
    if (pos != null) {
      this.blockSnapshot=((World)world).createSnapshot(pos.getX(),pos.getY(),pos.getZ());
    }
 else {
      this.blockSnapshot=BlockTypes.AIR.getDefaultState().snapshotFor(new Location<>((World)world,Vector3i.ZERO));
    }
    StaticMixinForgeHelper.lastPlayerInteractCancelled=false;
  }
}
Program: 27585
Project: 27585
Buggy source:
@Override public Event createSpongeEvent(){
  if (this.action == Action.LEFT_CLICK_BLOCK) {
    return SpongeEventFactory.createInteractBlockEventPrimary(getCause(),getInteractionPoint(),getTargetBlock(),getTargetSide());
  }
 else {
    return SpongeEventFactory.createInteractBlockEventSecondary(getCause(),getInteractionPoint(),getTargetBlock(),getTargetSide());
  }
}

Fixed version (ground truth):
@Override public Event createSpongeEvent(){
  if (action == Action.LEFT_CLICK_BLOCK) {
    return SpongeEventFactory.createInteractBlockEventSecondary(getCause(),getInteractionPoint(),getTargetBlock(),getTargetSide());
  }
 else   if (action == Action.RIGHT_CLICK_AIR) {
    return SpongeEventFactory.createInteractBlockEventPrimary(getCause(),getInteractionPoint(),getTargetBlock().withState(BlockTypes.AIR.getDefaultState()),getTargetSide());
  }
 else {
    return SpongeEventFactory.createInteractBlockEventSecondary(getCause(),getInteractionPoint(),getTargetBlock(),getTargetSide());
  }
}
Program: 27586
Project: 27586
Buggy source:
@Overwrite public static PlayerInteractEvent onPlayerInteract(EntityPlayer player,Action action,net.minecraft.world.World world,BlockPos pos,EnumFacing face){
  if (world.isRemote) {
    PlayerInteractEvent event=new PlayerInteractEvent(player,action,pos,face,world);
    MinecraftForge.EVENT_BUS.post(event);
    return event;
  }
  InteractBlockEvent event=null;
  if (action == Action.LEFT_CLICK_BLOCK) {
    event=SpongeEventFactory.createInteractBlockEventPrimary(Cause.of(NamedCause.source(player)),Optional.empty(),((World)world).createSnapshot(VecHelper.toVector(pos)),face == null ? Direction.NONE : DirectionFacingProvider.getInstance().getKey(face).get());
  }
 else   if (action == Action.RIGHT_CLICK_AIR) {
    event=SpongeEventFactory.createInteractBlockEventSecondary(Cause.of(NamedCause.source(player)),Optional.empty(),((World)world).createSnapshot(VecHelper.toVector(pos)).withState(BlockTypes.AIR.getDefaultState()),face == null ? Direction.NONE : DirectionFacingProvider.getInstance().getKey(face).get());
  }
 else {
    event=SpongeEventFactory.createInteractBlockEventSecondary(Cause.of(NamedCause.source(player)),Optional.empty(),((World)world).createSnapshot(VecHelper.toVector(pos)),face == null ? Direction.NONE : DirectionFacingProvider.getInstance().getKey(face).get());
  }
  SpongeImpl.postEvent(event);
  return (PlayerInteractEvent)SpongeForgeEventFactory.lastForgeEvent;
}

Fixed version (ground truth):
@Overwrite public static PlayerInteractEvent onPlayerInteract(EntityPlayer player,Action action,net.minecraft.world.World world,BlockPos pos,EnumFacing face){
  if (world.isRemote) {
    PlayerInteractEvent event=new PlayerInteractEvent(player,action,pos,face,world);
    MinecraftForge.EVENT_BUS.post(event);
    return event;
  }
  PlayerInteractEvent forgeEvent=new PlayerInteractEvent(player,action,pos,face,world);
  Event spongeEvent=((IMixinEvent)forgeEvent).createSpongeEvent();
  if (((SpongeModEventManager)SpongeImpl.getGame().getEventManager()).post(spongeEvent,forgeEvent,forgeEvent.getListenerList().getListeners(((IMixinEventBus)MinecraftForge.EVENT_BUS).getBusID()))) {
    forgeEvent.setCanceled(true);
  }
  if (forgeEvent.isCanceled()) {
    StaticMixinForgeHelper.lastPlayerInteractCancelled=true;
  }
  return forgeEvent;
}
Program: 27587
Project: 27587
Buggy source:
@Redirect(method="String_Node_Str",at=@At(value="String_Node_Str",target="String_Node_Str")) public boolean onActivateBlockOrUseItem(ItemInWorldManager itemManager,EntityPlayer player,net.minecraft.world.World worldIn,ItemStack stack,BlockPos pos,EnumFacing side,float hitX,float hitY,float hitZ){
  boolean result=itemManager.activateBlockOrUseItem(player,worldIn,stack,pos,side,hitX,hitY,hitZ);
  if (stack != null && !result) {
    if (SpongeForgeEventFactory.lastForgeEvent instanceof PlayerInteractEvent && SpongeForgeEventFactory.lastForgeEvent.isCanceled()) {
      return false;
    }
    itemManager.tryUseItem(player,worldIn,stack);
  }
  return result;
}

Fixed version (ground truth):
@Redirect(method="String_Node_Str",at=@At(value="String_Node_Str",target="String_Node_Str")) public boolean onActivateBlockOrUseItem(ItemInWorldManager itemManager,EntityPlayer player,net.minecraft.world.World worldIn,ItemStack stack,BlockPos pos,EnumFacing side,float hitX,float hitY,float hitZ){
  boolean result=itemManager.activateBlockOrUseItem(player,worldIn,stack,pos,side,hitX,hitY,hitZ);
  if (stack != null && !result) {
    if (StaticMixinForgeHelper.lastPlayerInteractCancelled) {
      return false;
    }
    itemManager.tryUseItem(player,worldIn,stack);
  }
  return result;
}
Program: 27590
Project: 27590
Buggy source:
@Inject public SpongeModGame(Platform platform,PluginManager pluginManager,EventManager eventManager,SpongeGameRegistry gameRegistry,ServiceManager serviceManager,TeleportHelper teleportHelper){
  super(platform,pluginManager,eventManager,gameRegistry,serviceManager,teleportHelper);
}

Fixed version (ground truth):
@Inject public SpongeModGame(Platform platform,PluginManager pluginManager,EventManager eventManager,SpongeGameRegistry gameRegistry,ServiceManager serviceManager,TeleportHelper teleportHelper,Logger logger){
  super(platform,pluginManager,eventManager,gameRegistry,serviceManager,teleportHelper,logger);
}
Program: 27591
Project: 27591
Buggy source:
public SpongeCoremod(){
  Launch.classLoader.addClassLoaderExclusion("String_Node_Str");
  Launch.classLoader.addClassLoaderExclusion("String_Node_Str");
  MixinBootstrap.init();
  MixinEnvironment.getEnvironment(Phase.PREINIT).addConfiguration("String_Node_Str").registerTokenProviderClass("String_Node_Str");
  SpongeLaunch.initialize(null,null,null);
  Sponge.getGlobalConfig();
  MixinEnvironment.getDefaultEnvironment().addConfiguration("String_Node_Str").addConfiguration("String_Node_Str").addConfiguration("String_Node_Str").addConfiguration("String_Node_Str").addConfiguration("String_Node_Str").registerTokenProviderClass("String_Node_Str");
  Launch.classLoader.addClassLoaderExclusion("String_Node_Str");
  Launch.classLoader.addClassLoaderExclusion("String_Node_Str");
  Launch.classLoader.addClassLoaderExclusion("String_Node_Str");
  Launch.classLoader.addClassLoaderExclusion("String_Node_Str");
  Launch.classLoader.addTransformerExclusion("String_Node_Str");
  Launch.classLoader.addClassLoaderExclusion("String_Node_Str");
  Launch.classLoader.addClassLoaderExclusion("String_Node_Str");
  Launch.classLoader.addClassLoaderExclusion("String_Node_Str");
  Launch.classLoader.addTransformerExclusion("String_Node_Str");
  Launch.classLoader.addTransformerExclusion("String_Node_Str");
}

Fixed version (ground truth):
public SpongeCoremod(){
  Launch.classLoader.addClassLoaderExclusion("String_Node_Str");
  Launch.classLoader.addClassLoaderExclusion("String_Node_Str");
  MixinBootstrap.init();
  MixinEnvironment.getEnvironment(Phase.PREINIT).addConfiguration("String_Node_Str").registerTokenProviderClass("String_Node_Str");
  SpongeLaunch.initialize(null,null,null);
  Sponge.getGlobalConfig();
  MixinEnvironment.getDefaultEnvironment().addConfiguration("String_Node_Str").addConfiguration("String_Node_Str").addConfiguration("String_Node_Str").addConfiguration("String_Node_Str").addConfiguration("String_Node_Str").registerTokenProviderClass("String_Node_Str");
  Launch.classLoader.addClassLoaderExclusion("String_Node_Str");
  Launch.classLoader.addClassLoaderExclusion("String_Node_Str");
  Launch.classLoader.addClassLoaderExclusion("String_Node_Str");
  Launch.classLoader.addClassLoaderExclusion("String_Node_Str");
  Launch.classLoader.addTransformerExclusion("String_Node_Str");
  Launch.classLoader.addTransformerExclusion("String_Node_Str");
  Launch.classLoader.addTransformerExclusion("String_Node_Str");
}
Program: 27592
Project: 27592
Buggy source:
public SpongeCoremod(){
  Launch.classLoader.addClassLoaderExclusion("String_Node_Str");
  Launch.classLoader.addClassLoaderExclusion("String_Node_Str");
  MixinBootstrap.init();
  MixinEnvironment.getEnvironment(Phase.PREINIT).addConfiguration("String_Node_Str").registerTokenProviderClass("String_Node_Str");
  SpongeLaunch.initialize(null,null,null);
  Sponge.getGlobalConfig();
  MixinEnvironment.getDefaultEnvironment().addConfiguration("String_Node_Str").addConfiguration("String_Node_Str").addConfiguration("String_Node_Str").addConfiguration("String_Node_Str").addConfiguration("String_Node_Str").registerTokenProviderClass("String_Node_Str");
  Launch.classLoader.addClassLoaderExclusion("String_Node_Str");
  Launch.classLoader.addClassLoaderExclusion("String_Node_Str");
  Launch.classLoader.addClassLoaderExclusion("String_Node_Str");
  Launch.classLoader.addTransformerExclusion("String_Node_Str");
  Launch.classLoader.addClassLoaderExclusion("String_Node_Str");
  Launch.classLoader.addClassLoaderExclusion("String_Node_Str");
  Launch.classLoader.addClassLoaderExclusion("String_Node_Str");
  Launch.classLoader.addTransformerExclusion("String_Node_Str");
  Launch.classLoader.addTransformerExclusion("String_Node_Str");
}

Fixed version (ground truth):
public SpongeCoremod(){
  Launch.classLoader.addClassLoaderExclusion("String_Node_Str");
  Launch.classLoader.addClassLoaderExclusion("String_Node_Str");
  MixinBootstrap.init();
  MixinEnvironment.getEnvironment(Phase.PREINIT).addConfiguration("String_Node_Str").registerTokenProviderClass("String_Node_Str");
  SpongeLaunch.initialize(null,null,null);
  Sponge.getGlobalConfig();
  MixinEnvironment.getDefaultEnvironment().addConfiguration("String_Node_Str").addConfiguration("String_Node_Str").addConfiguration("String_Node_Str").addConfiguration("String_Node_Str").addConfiguration("String_Node_Str").registerTokenProviderClass("String_Node_Str");
  Launch.classLoader.addClassLoaderExclusion("String_Node_Str");
  Launch.classLoader.addClassLoaderExclusion("String_Node_Str");
  Launch.classLoader.addClassLoaderExclusion("String_Node_Str");
  Launch.classLoader.addClassLoaderExclusion("String_Node_Str");
  Launch.classLoader.addTransformerExclusion("String_Node_Str");
  Launch.classLoader.addClassLoaderExclusion("String_Node_Str");
  Launch.classLoader.addClassLoaderExclusion("String_Node_Str");
  Launch.classLoader.addClassLoaderExclusion("String_Node_Str");
  Launch.classLoader.addTransformerExclusion("String_Node_Str");
  Launch.classLoader.addTransformerExclusion("String_Node_Str");
}
Program: 27593
Project: 27593
Buggy source:
@Redirect(method="String_Node_Str",at=@At(value="String_Node_Str",target="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str")) public PlayerInteractEvent onFirePlayerInteractEvent(EntityPlayer player,PlayerInteractEvent.Action action,World world,BlockPos pos,EnumFacing face){
  PlayerInteractEvent event=new PlayerInteractEvent(playerEntity,PlayerInteractEvent.Action.RIGHT_CLICK_AIR,new BlockPos(0,0,0),null,world);
  double reach=this.playerEntity.theItemInWorldManager.getGameType() == WorldSettings.GameType.CREATIVE ? 5 : 4.5;
  Optional<BlockRayHit> attempt=BlockRay.from((Player)this.playerEntity).filter(BlockRay.maxDistanceFilter(((Player)this.playerEntity).getLocation().getPosition(),reach)).end();
  boolean missed;
  if (attempt.isPresent()) {
    BlockRayHit hit=attempt.get();
    missed=hit.getExtent().getBlockType(hit.getBlockPosition()).equals(BlockTypes.AIR);
  }
 else {
    missed=true;
  }
  if (missed) {
    MinecraftForge.EVENT_BUS.post(event);
  }
 else {
    event.useItem=Event.Result.DEFAULT;
  }
  return event;
}

Fixed version (ground truth):
@Redirect(method="String_Node_Str",at=@At(value="String_Node_Str",target="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"),remap=false) public PlayerInteractEvent onFirePlayerInteractEvent(EntityPlayer player,PlayerInteractEvent.Action action,World world,BlockPos pos,EnumFacing face){
  PlayerInteractEvent event=new PlayerInteractEvent(playerEntity,PlayerInteractEvent.Action.RIGHT_CLICK_AIR,new BlockPos(0,0,0),null,world);
  double reach=this.playerEntity.theItemInWorldManager.getGameType() == WorldSettings.GameType.CREATIVE ? 5 : 4.5;
  Optional<BlockRayHit> attempt=BlockRay.from((Player)this.playerEntity).filter(BlockRay.maxDistanceFilter(((Player)this.playerEntity).getLocation().getPosition(),reach)).end();
  boolean missed;
  if (attempt.isPresent()) {
    BlockRayHit hit=attempt.get();
    missed=hit.getExtent().getBlockType(hit.getBlockPosition()).equals(BlockTypes.AIR);
  }
 else {
    missed=true;
  }
  if (missed) {
    MinecraftForge.EVENT_BUS.post(event);
  }
 else {
    event.useItem=Event.Result.DEFAULT;
  }
  return event;
}
Program: 27594
Project: 27594
Buggy source:
private static NeighborNotifyEvent fromSpongeEvent(BlockUpdateEvent blockUpdateEvent){
  Location location=blockUpdateEvent.getBlock();
  SpongeGameRegistry registry=Sponge.getSpongeRegistry();
  EnumSet<EnumFacing> facings=EnumSet.noneOf(EnumFacing.class);
  for (  Direction direction : Direction.values()) {
    if ((direction.isCardinal() || direction == Direction.UP || direction == Direction.DOWN) && blockUpdateEvent.getAffectedBlocks().contains(location.getRelative(direction))) {
      facings.add(registry.directionMap.get(direction));
    }
  }
  NeighborNotifyEvent event=new NeighborNotifyEvent((World)(Object)blockUpdateEvent.getBlock().getExtent(),new BlockPos(location.getBlockX(),location.getBlockY(),location.getBlockZ()),(IBlockState)(Object)blockUpdateEvent.getBlock().getExtent().getBlock(blockUpdateEvent.getBlock().getBlockPosition()),facings);
  ((IMixinEvent)event).setSpongeEvent(blockUpdateEvent);
  return event;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private static NeighborNotifyEvent fromSpongeEvent(BlockUpdateEvent blockUpdateEvent){
  Location location=blockUpdateEvent.getBlock();
  EnumSet<EnumFacing> facings=EnumSet.noneOf(EnumFacing.class);
  for (  Direction direction : Direction.values()) {
    if ((direction.isCardinal() || direction == Direction.UP || direction == Direction.DOWN) && blockUpdateEvent.getAffectedBlocks().contains(location.getRelative(direction))) {
      facings.add(SpongeGameRegistry.directionMap.get(direction));
    }
  }
  NeighborNotifyEvent event=new NeighborNotifyEvent((World)(Object)blockUpdateEvent.getBlock().getExtent(),new BlockPos(location.getBlockX(),location.getBlockY(),location.getBlockZ()),(IBlockState)(Object)blockUpdateEvent.getBlock().getExtent().getBlock(blockUpdateEvent.getBlock().getBlockPosition()),facings);
  ((IMixinEvent)event).setSpongeEvent(blockUpdateEvent);
  return event;
}
Program: 27595
Project: 27595
Buggy source:
private static ServerChatEvent fromSpongeEvent(PlayerChatEvent spongeEvent){
  IChatComponent component=SpongeTexts.toComponent(spongeEvent.getMessage(),spongeEvent.getEntity().getLocale());
  if (!(component instanceof ChatComponentTranslation)) {
    component=new ChatComponentTranslation("String_Node_Str",component);
  }
  ServerChatEvent event=new ServerChatEvent((EntityPlayerMP)spongeEvent.getEntity(),Texts.toPlain(spongeEvent.getMessage()),(ChatComponentTranslation)component);
  ((IMixinEvent)event).setSpongeEvent(spongeEvent);
  return event;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private static ServerChatEvent fromSpongeEvent(PlayerChatEvent spongeEvent){
  IChatComponent component=SpongeTexts.toComponent(spongeEvent.getMessage(),spongeEvent.getEntity().getLocale());
  if (!(component instanceof ChatComponentTranslation)) {
    component=new ChatComponentTranslation("String_Node_Str",component);
  }
  ServerChatEvent event=new ServerChatEvent((EntityPlayerMP)spongeEvent.getEntity(),Texts.toPlain(spongeEvent.getMessage()),(ChatComponentTranslation)component);
  ((IMixinEvent)event).setSpongeEvent(spongeEvent);
  return event;
}
Program: 27596
Project: 27596
Buggy source:
private static PlayerInteractEvent fromSpongeEvent(PlayerInteractBlockEvent spongeEvent){
  Action action=actionFromSponge(spongeEvent.getInteractionType(),spongeEvent.getBlock().getBlockType());
  BlockPos pos=VecHelper.toBlockPos(spongeEvent.getBlock().getPosition());
  EnumFacing face=Sponge.getSpongeRegistry().directionMap.get(spongeEvent.getSide());
  PlayerInteractEvent event=new PlayerInteractEvent((EntityPlayer)spongeEvent.getEntity(),action,pos,face,(World)spongeEvent.getEntity().getWorld());
  ((IMixinEvent)event).setSpongeEvent(spongeEvent);
  return event;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private static PlayerInteractEvent fromSpongeEvent(PlayerInteractBlockEvent spongeEvent){
  Action action=actionFromSponge(spongeEvent.getInteractionType(),spongeEvent.getBlock().getBlockType());
  BlockPos pos=VecHelper.toBlockPos(spongeEvent.getBlock().getPosition());
  EnumFacing face=SpongeGameRegistry.directionMap.get(spongeEvent.getSide());
  PlayerInteractEvent event=new PlayerInteractEvent((EntityPlayer)spongeEvent.getEntity(),action,pos,face,(World)spongeEvent.getEntity().getWorld());
  ((IMixinEvent)event).setSpongeEvent(spongeEvent);
  return event;
}
Program: 27597
Project: 27597
Buggy source:
@Override public Direction getSide(){
  if (this.face != null) {
    return ((SpongeGameRegistry)Sponge.getGame().getRegistry()).directionMap.inverse().get(this.face);
  }
  return Direction.NONE;
}

Fixed version (ground truth):
@Override public Direction getSide(){
  if (this.face != null) {
    return SpongeGameRegistry.directionMap.inverse().get(this.face);
  }
  return Direction.NONE;
}
Program: 27598
Project: 27598
Buggy source:
private static BlockEvent.PlaceEvent fromSpongeEvent(PlayerPlaceBlockEvent spongeEvent){
  Location location=spongeEvent.getBlock();
  World world=(World)spongeEvent.getBlock().getExtent();
  BlockPos pos=new BlockPos(location.getBlockX(),location.getBlockY(),location.getBlockZ());
  BlockEvent.PlaceEvent event=new BlockEvent.PlaceEvent((net.minecraftforge.common.util.BlockSnapshot)spongeEvent.getReplacementBlock(),world.getBlockState(pos),(EntityPlayer)spongeEvent.getEntity());
  ((IMixinEvent)event).setSpongeEvent(spongeEvent);
  return event;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private static BlockEvent.PlaceEvent fromSpongeEvent(PlayerPlaceBlockEvent spongeEvent){
  Location location=spongeEvent.getBlock();
  World world=(World)spongeEvent.getBlock().getExtent();
  BlockPos pos=new BlockPos(location.getBlockX(),location.getBlockY(),location.getBlockZ());
  BlockEvent.PlaceEvent event=new BlockEvent.PlaceEvent((net.minecraftforge.common.util.BlockSnapshot)spongeEvent.getReplacementBlock(),world.getBlockState(pos),(EntityPlayer)spongeEvent.getEntity());
  ((IMixinEvent)event).setSpongeEvent(spongeEvent);
  return event;
}
Program: 27599
Project: 27599
Buggy source:
@Override public boolean isCancelled(){
  if (spongeEvent instanceof Cancellable) {
    return ((Cancellable)spongeEvent).isCancelled();
  }
  return isCanceled();
}

Fixed version (ground truth):
@Override public boolean isCancelled(){
  if (this.spongeEvent instanceof Cancellable) {
    return ((Cancellable)this.spongeEvent).isCancelled();
  }
  return isCanceled();
}
Program: 27600
Project: 27600
Buggy source:
@Override public void setCancelled(boolean cancel){
  if (spongeEvent instanceof Cancellable) {
    ((Cancellable)spongeEvent).setCancelled(cancel);
  }
  setCanceled(cancel);
}

Fixed version (ground truth):
@Override public void setCancelled(boolean cancel){
  if (this.spongeEvent instanceof Cancellable) {
    ((Cancellable)this.spongeEvent).setCancelled(cancel);
  }
  setCanceled(cancel);
}
Program: 27602
Project: 27602
Buggy source:
@Shadow public abstract int getAverageGroundLevel();

Fixed version (ground truth):
public int getAverageGroundLevel(){
  if (((GeneratorType)this.terrainType).equals(GeneratorTypes.END)) {
    return 50;
  }
 else {
    return this.terrainType.getMinimumSpawnHeight(this.worldObj);
  }
}
Program: 27603
Project: 27603
Buggy source:
@Shadow public abstract boolean getHasNoSky();

Fixed version (ground truth):
public boolean getHasNoSky(){
  if (((GeneratorType)this.terrainType).equals(GeneratorTypes.NETHER)) {
    return true;
  }
 else {
    return this.hasNoSky;
  }
}
Program: 27604
Project: 27604
Buggy source:
@Override public String getName(){
  return name;
}

Fixed version (ground truth):
@Override public String getName(){
  return this.name;
}
Program: 27605
Project: 27605
Buggy source:
@Override public String getId(){
  return name;
}

Fixed version (ground truth):
@Override public String getId(){
  return this.name;
}
Program: 27606
Project: 27606
Buggy source:
protected void prepareSpawnArea(WorldServer world){
  int i=0;
  this.setUserMessage("String_Node_Str");
  MinecraftServer.getServer().logInfo("String_Node_Str" + world.provider.getDimensionId());
  BlockPos blockpos=world.getSpawnPoint();
  long j=MinecraftServer.getCurrentTimeMillis();
  for (int k=-192; k <= 192 && this.isServerRunning(); k+=16) {
    for (int l=-192; l <= 192 && this.isServerRunning(); l+=16) {
      long i1=MinecraftServer.getCurrentTimeMillis();
      if (i1 - j > 1000L) {
        this.outputPercentRemaining("String_Node_Str",i * 100 / 625);
        j=i1;
      }
      ++i;
      world.theChunkProviderServer.loadChunk(blockpos.getX() + k >> 4,blockpos.getZ() + l >> 4);
    }
  }
  this.clearCurrentTask();
}

Fixed version (ground truth):
protected void prepareSpawnArea(WorldServer world){
  int i=0;
  this.setUserMessage("String_Node_Str");
  logger.info("String_Node_Str" + world.provider.getDimensionId());
  BlockPos blockpos=world.getSpawnPoint();
  long j=MinecraftServer.getCurrentTimeMillis();
  for (int k=-192; k <= 192 && this.isServerRunning(); k+=16) {
    for (int l=-192; l <= 192 && this.isServerRunning(); l+=16) {
      long i1=MinecraftServer.getCurrentTimeMillis();
      if (i1 - j > 1000L) {
        this.outputPercentRemaining("String_Node_Str",i * 100 / 625);
        j=i1;
      }
      ++i;
      world.theChunkProviderServer.loadChunk(blockpos.getX() + k >> 4,blockpos.getZ() + l >> 4);
    }
  }
  this.clearCurrentTask();
}
Program: 27610
Project: 27610
Buggy source:
@Overwrite protected void initialWorldChunkLoad(){
  for (  WorldServer worldserver : DimensionManager.getWorlds()) {
    WorldProperties worldProperties=((World)worldserver).getProperties();
    if (worldProperties.doesKeepSpawnLoaded()) {
      int i=0;
      this.setUserMessage("String_Node_Str");
      MinecraftServer.getServer().logInfo("String_Node_Str" + worldserver.provider.getDimensionId());
      BlockPos blockpos=worldserver.getSpawnPoint();
      long j=MinecraftServer.getCurrentTimeMillis();
      for (int k=-192; k <= 192 && this.isServerRunning(); k+=16) {
        for (int l=-192; l <= 192 && this.isServerRunning(); l+=16) {
          long i1=MinecraftServer.getCurrentTimeMillis();
          if (i1 - j > 1000L) {
            this.outputPercentRemaining("String_Node_Str",i * 100 / 625);
            j=i1;
          }
          ++i;
          worldserver.theChunkProviderServer.loadChunk(blockpos.getX() + k >> 4,blockpos.getZ() + l >> 4);
        }
      }
    }
  }
  this.clearCurrentTask();
}

Fixed version (ground truth):
@Overwrite protected void initialWorldChunkLoad(){
  for (  WorldServer worldserver : DimensionManager.getWorlds()) {
    WorldProperties worldProperties=((World)worldserver).getProperties();
    if (worldProperties.doesKeepSpawnLoaded()) {
      prepareSpawnArea(worldserver);
    }
  }
  this.clearCurrentTask();
}
Program: 27611
Project: 27611
Buggy source:
@Override public boolean shouldApplyMixin(String targetClassName,String mixinClassName){
  return true;
}

Fixed version (ground truth):
@Override public boolean shouldApplyMixin(String targetClassName,String mixinClassName){
  if (mixinClassName.contains("String_Node_Str") && MixinEnvironment.getCurrentEnvironment().getSide() == Side.SERVER) {
    return false;
  }
  return true;
}
Program: 27612
Project: 27612
Buggy source:
public String getId(){
  return "String_Node_Str" + this.id;
}

Fixed version (ground truth):
@Override public String getId(){
  return "String_Node_Str" + this.id;
}
Program: 27613
Project: 27613
Buggy source:
@SuppressWarnings("String_Node_Str") @Override public <T extends DataManipulator<T>>Optional<T> getData(Class<T> dataClass){
  if (NameData.class.isAssignableFrom((Class)dataClass)) {
    NameData nameData=new SpongeNameData();
    return (Optional<T>)(Optional)nameData.fill(this);
  }
  return Optional.absent();
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public <T extends DataManipulator<T>>Optional<T> getData(Class<T> dataClass){
  return Optional.absent();
}
Program: 27617
Project: 27617
Buggy source:
private void updateSpongeNbt(){
  this.spongeNbt.setString("String_Node_Str",this.levelName);
  this.spongeNbt.setInteger("String_Node_Str",this.dimension);
  if (this.dimensionType != null) {
    this.spongeNbt.setString("String_Node_Str",this.dimensionType.getDimensionClass().getName());
  }
  if (this.uuid != null) {
    this.spongeNbt.setLong("String_Node_Str",this.uuid.getMostSignificantBits());
    this.spongeNbt.setLong("String_Node_Str",this.uuid.getLeastSignificantBits());
  }
  this.spongeNbt.setBoolean("String_Node_Str",this.worldEnabled);
  this.spongeNbt.setBoolean("String_Node_Str",this.keepSpawnLoaded);
  this.spongeNbt.setBoolean("String_Node_Str",this.loadOnStartup);
}

Fixed version (ground truth):
private void updateSpongeNbt(){
  if (this.levelName != null) {
    this.spongeNbt.setString("String_Node_Str",this.levelName);
  }
  this.spongeNbt.setInteger("String_Node_Str",this.dimension);
  if (this.dimensionType != null) {
    this.spongeNbt.setString("String_Node_Str",this.dimensionType.getDimensionClass().getName());
  }
  if (this.uuid != null) {
    this.spongeNbt.setLong("String_Node_Str",this.uuid.getMostSignificantBits());
    this.spongeNbt.setLong("String_Node_Str",this.uuid.getLeastSignificantBits());
  }
  this.spongeNbt.setBoolean("String_Node_Str",this.worldEnabled);
  this.spongeNbt.setBoolean("String_Node_Str",this.keepSpawnLoaded);
  this.spongeNbt.setBoolean("String_Node_Str",this.loadOnStartup);
}
Program: 27619
Project: 27619
Buggy source:
@Override @SuppressWarnings("String_Node_Str") public List<String> getSuggestions(CommandSource source,String arguments) throws CommandException {
  return this.command.addTabCompletionOptions((ICommandSender)source,arguments.split("String_Node_Str"),null);
}

Fixed version (ground truth):
@Override @SuppressWarnings("String_Node_Str") public List<String> getSuggestions(CommandSource source,String arguments) throws CommandException {
  return this.command.addTabCompletionOptions((ICommandSender)source,splitArgs(arguments),null);
}
Program: 27620
Project: 27620
Buggy source:
private void setEntityInteractionTypes(){
  RegistryHelper.mapFields(EntityInteractionTypes.class,this.entityInteractionTypeMappings);
}

Fixed version (ground truth):
private void setEntityInteractionTypes(){
  RegistryHelper.mapFields(EntityInteractionTypes.class,SpongeGameRegistry.entityInteractionTypeMappings);
}
Program: 27621
Project: 27621
Buggy source:
public int human$getExperienceSinceLevel(){
  return this.human$getTotalExperience() - human$xpAtLevel(this.human$getLevel());
}

Fixed version (ground truth):
public int human$getExperienceSinceLevel(){
  return this.human$getTotalExperience() - xpAtLevel(this.human$getLevel());
}
Program: 27622
Project: 27622
Buggy source:
public void human$setExperienceSinceLevel(int experience){
  this.human$setTotalExperience(human$xpAtLevel(this.experienceLevel) + experience);
}

Fixed version (ground truth):
public void human$setExperienceSinceLevel(int experience){
  this.human$setTotalExperience(xpAtLevel(this.experienceLevel) + experience);
}
Program: 27623
Project: 27623
Buggy source:
public MixinBlockUpdateEvent(World world,BlockPos pos,IBlockState state,EnumSet<EnumFacing> notifiedSides){
  super(world,pos,state);
  this.affectedBlocks=new HashSet<BlockLoc>();
  for (  EnumFacing notifiedSide : notifiedSides) {
    BlockPos offset=pos.offset(notifiedSide);
    this.affectedBlocks.add(((org.spongepowered.api.world.World)world).getFullBlock(offset.getX(),offset.getY(),offset.getZ()));
  }
  this.notifiedSides=notifiedSides;
}

Fixed version (ground truth):
public MixinBlockUpdateEvent(World world,BlockPos pos,IBlockState state,EnumSet<EnumFacing> notifiedSides){
  super(world,pos,state);
  this.notifiedSides=notifiedSides;
}
Program: 27624
Project: 27624
Buggy source:
@Override public Collection<BlockLoc> getAffectedBlocks(){
  return this.affectedBlocks;
}

Fixed version (ground truth):
@Override public Collection<BlockLoc> getAffectedBlocks(){
  if (this.affectedBlocks == null) {
    this.affectedBlocks=new HashSet<BlockLoc>();
    for (    EnumFacing notifiedSide : notifiedSides) {
      BlockPos offset=pos.offset(notifiedSide);
      this.affectedBlocks.add(((org.spongepowered.api.world.World)world).getFullBlock(offset.getX(),offset.getY(),offset.getZ()));
    }
  }
  return this.affectedBlocks;
}
Program: 27627
Project: 27627
Buggy source:
@Shadow public abstract Collection getActivePotionEffects();

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Shadow public abstract Collection getActivePotionEffects();
Program: 27628
Project: 27628
Buggy source:
@Override public ProjectileSource getShooter(){
  if (this.projectileSource != null && this.projectileSource instanceof ProjectileSource) {
    return (ProjectileSource)this.projectileSource;
  }
 else   if (this.shootingEntity != null && this.shootingEntity instanceof ProjectileSource) {
    return (ProjectileSource)this.shootingEntity;
  }
  return new UnknownProjectileSource();
}

Fixed version (ground truth):
@Override public ProjectileSource getShooter(){
  if (this.projectileSource != null && this.projectileSource instanceof ProjectileSource) {
    return this.projectileSource;
  }
 else   if (this.shootingEntity != null && this.shootingEntity instanceof ProjectileSource) {
    return (ProjectileSource)this.shootingEntity;
  }
  return new UnknownProjectileSource();
}
Program: 27629
Project: 27629
Buggy source:
@Override public BlockLoc getBlock(){
  return new BlockWrapper((World)this.world,(int)this.pos.getX(),(int)this.pos.getY(),(int)this.pos.getZ());
}

Fixed version (ground truth):
@Override public BlockLoc getBlock(){
  return new BlockWrapper((World)this.world,this.pos.getX(),this.pos.getY(),this.pos.getZ());
}
Program: 27630
Project: 27630
Buggy source:
@Override public void broadcastMessage(Message message){
  getConfigurationManager().sendChatMsg(((SpongeMessage)message).getHandle());
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public void broadcastMessage(Message message){
  getConfigurationManager().sendChatMsg(((SpongeMessage)message).getHandle());
}
Program: 27631
Project: 27631
Buggy source:
@Override public Optional<ParticleType> getParticleType(String name){
  return Optional.fromNullable((ParticleType)this.particleByName.get(name));
}

Fixed version (ground truth):
@Override public Optional<ParticleType> getParticleType(String name){
  return Optional.fromNullable(this.particleByName.get(name));
}
Program: 27632
Project: 27632
Buggy source:
public List<S45PacketTitle> getPackets(){
  List<S45PacketTitle> packets=Lists.newArrayList();
  if (this.isReset) {
    packets.add(new S45PacketTitle(S45PacketTitle.Type.RESET,null));
  }
 else   if (this.isClear) {
    packets.add(new S45PacketTitle(S45PacketTitle.Type.CLEAR,null));
  }
  if (this.fadeIn.isPresent() && this.stay.isPresent() && this.fadeOut.isPresent()) {
    packets.add(new S45PacketTitle(this.fadeIn.get(),this.stay.get(),this.fadeOut.get()));
  }
  if (this.titleMessage.isPresent()) {
    SpongeMessage message=(SpongeMessage)this.titleMessage.get();
    packets.add(new S45PacketTitle(S45PacketTitle.Type.TITLE,message.getHandle()));
  }
  if (this.subtitleMessage.isPresent()) {
    SpongeMessage message=(SpongeMessage)this.subtitleMessage.get();
    packets.add(new S45PacketTitle(S45PacketTitle.Type.SUBTITLE,message.getHandle()));
  }
  return packets;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public List<S45PacketTitle> getPackets(){
  List<S45PacketTitle> packets=Lists.newArrayList();
  if (this.isReset) {
    packets.add(new S45PacketTitle(S45PacketTitle.Type.RESET,null));
  }
 else   if (this.isClear) {
    packets.add(new S45PacketTitle(S45PacketTitle.Type.CLEAR,null));
  }
  if (this.fadeIn.isPresent() && this.stay.isPresent() && this.fadeOut.isPresent()) {
    packets.add(new S45PacketTitle(this.fadeIn.get(),this.stay.get(),this.fadeOut.get()));
  }
  if (this.titleMessage.isPresent()) {
    SpongeMessage message=(SpongeMessage)this.titleMessage.get();
    packets.add(new S45PacketTitle(S45PacketTitle.Type.TITLE,message.getHandle()));
  }
  if (this.subtitleMessage.isPresent()) {
    SpongeMessage message=(SpongeMessage)this.subtitleMessage.get();
    packets.add(new S45PacketTitle(S45PacketTitle.Type.SUBTITLE,message.getHandle()));
  }
  return packets;
}