nus-yam/ex-repair huggingface dataset:
Program: 31459
Project: 31459
Buggy source:
@Override @Nonnull public String getPageString(){
  if (state == null) {
    return "String_Node_Str";
  }
  return (state.pageIndex + 1) + "String_Node_Str" + pageCount(recipesPerPage);
}

Fixed version (ground truth):
@Override @Nonnull public String getPageString(){
  if (state == null) {
    return "String_Node_Str";
  }
  return (state.pageIndex + 1) + "String_Node_Str" + pageCount(state.recipesPerPage);
}
Program: 31460
Project: 31460
Buggy source:
@Override public boolean hasMultiplePages(){
  return recipes.size() > recipesPerPage;
}

Fixed version (ground truth):
@Override public boolean hasMultiplePages(){
  return state != null && recipes.size() > state.recipesPerPage;
}
Program: 31461
Project: 31461
Buggy source:
@Override public String getItemStackDisplayName(ItemStack stack){
  return stack.getTagCompound().getString("String_Node_Str");
}

Fixed version (ground truth):
@Override public String getItemStackDisplayName(ItemStack stack){
  NBTTagCompound tagCompound=stack.getTagCompound();
  if (tagCompound == null) {
    return "String_Node_Str";
  }
  return tagCompound.getString("String_Node_Str");
}
Program: 31462
Project: 31462
Buggy source:
public void drawScreen(@Nonnull Minecraft minecraft,int mouseX,int mouseY){
  if (!isOpen()) {
    return;
  }
  GlStateManager.disableLighting();
  minecraft.fontRendererObj.drawString(pageNumDisplayString,pageNumDisplayX,pageNumDisplayY,Color.white.getRGB(),true);
  searchField.drawTextBox();
  nextButton.drawButton(minecraft,mouseX,mouseY);
  backButton.drawButton(minecraft,mouseX,mouseY);
  configButton.drawButton(minecraft,mouseX,mouseY);
  configButtonIcon.draw(minecraft,configButton.xPosition + 2,configButton.yPosition + 2);
  GlStateManager.disableBlend();
  boolean mouseOver=isMouseOver(mouseX,mouseY);
  if (mouseOver && shouldShowDeleteItemTooltip(minecraft)) {
    hovered=guiItemStacks.render(null,minecraft,false,mouseX,mouseY);
  }
 else {
    hovered=guiItemStacks.render(hovered,minecraft,mouseOver,mouseX,mouseY);
  }
}

Fixed version (ground truth):
public void drawScreen(@Nonnull Minecraft minecraft,int mouseX,int mouseY){
  if (!isOpen()) {
    return;
  }
  GlStateManager.disableLighting();
  minecraft.fontRendererObj.drawString(pageNumDisplayString,pageNumDisplayX,pageNumDisplayY,Color.white.getRGB(),true);
  searchField.drawTextBox();
  nextButton.drawButton(minecraft,mouseX,mouseY);
  backButton.drawButton(minecraft,mouseX,mouseY);
  configButton.drawButton(minecraft,mouseX,mouseY);
  configButtonIcon.draw(minecraft,configButton.xPosition + 2,configButton.yPosition + 2);
  GlStateManager.disableBlend();
  boolean mouseOver=isMouseOver(mouseX,mouseY);
  if (mouseOver && shouldShowDeleteItemTooltip(minecraft)) {
    hovered=guiItemStacks.render(null,minecraft,false,mouseX,mouseY);
  }
 else {
    hovered=guiItemStacks.render(hovered,minecraft,mouseOver,mouseX,mouseY);
  }
  GlStateManager.enableAlpha();
}
Program: 31463
Project: 31463
Buggy source:
public void drawBackground(){
  this.zLevel=-100;
  this.drawDefaultBackground();
  GlStateManager.enableAlpha();
  GlStateManager.color(1.0F,1.0F,1.0F,1.0F);
  bindTexture(backgroundTexture);
  int x=(width - xSize) / 2;
  int y=(height - ySize) / 2;
  this.zLevel=0;
  drawTexturedModalRect(x,y,0,0,xSize,ySize);
}

Fixed version (ground truth):
public void drawBackground(){
  this.zLevel=-100;
  this.drawDefaultBackground();
  GlStateManager.color(1.0F,1.0F,1.0F,1.0F);
  bindTexture(backgroundTexture);
  int x=(width - xSize) / 2;
  int y=(height - ySize) / 2;
  this.zLevel=0;
  drawTexturedModalRect(x,y,0,0,xSize,ySize);
}
Program: 31465
Project: 31465
Buggy source:
private static void addModdedBrewingRecipes(Collection<BrewingRecipeWrapper> recipes){
  List<IBrewingRecipe> brewingRecipes=BrewingRecipeRegistry.getRecipes();
  for (  IBrewingRecipe iBrewingRecipe : brewingRecipes) {
    if (iBrewingRecipe instanceof BrewingRecipe) {
      BrewingRecipe brewingRecipe=(BrewingRecipe)iBrewingRecipe;
      BrewingRecipeWrapper recipe=new BrewingRecipeWrapper(brewingRecipe.ingredient,brewingRecipe.input,brewingRecipe.output,0);
      recipes.add(recipe);
    }
 else     if (iBrewingRecipe instanceof BrewingOreRecipe) {
      BrewingOreRecipe brewingRecipe=(BrewingOreRecipe)iBrewingRecipe;
      List<List<ItemStack>> ingredients=StackUtil.expandRecipeInputs(Collections.singletonList(brewingRecipe.ingredient),true);
      BrewingRecipeWrapper recipe=new BrewingRecipeWrapper(ingredients.get(0),brewingRecipe.input,brewingRecipe.output,0);
      recipes.add(recipe);
    }
 else     if (!(iBrewingRecipe instanceof VanillaBrewingRecipe)) {
      Class recipeClass=iBrewingRecipe.getClass();
      if (!unhandledRecipeClasses.contains(recipeClass)) {
        unhandledRecipeClasses.add(recipeClass);
        Log.debug("String_Node_Str",recipeClass);
      }
    }
  }
}

Fixed version (ground truth):
private static void addModdedBrewingRecipes(Collection<BrewingRecipeWrapper> recipes){
  List<IBrewingRecipe> brewingRecipes=BrewingRecipeRegistry.getRecipes();
  for (  IBrewingRecipe iBrewingRecipe : brewingRecipes) {
    if (iBrewingRecipe instanceof BrewingRecipe) {
      BrewingRecipe brewingRecipe=(BrewingRecipe)iBrewingRecipe;
      BrewingRecipeWrapper recipe=new BrewingRecipeWrapper(brewingRecipe.ingredient,brewingRecipe.input,brewingRecipe.output,0);
      recipes.add(recipe);
    }
 else     if (iBrewingRecipe instanceof BrewingOreRecipe) {
      BrewingOreRecipe brewingRecipe=(BrewingOreRecipe)iBrewingRecipe;
      BrewingRecipeWrapper recipe=new BrewingRecipeWrapper(brewingRecipe.ingredient,brewingRecipe.input,brewingRecipe.output,0);
      recipes.add(recipe);
    }
 else     if (!(iBrewingRecipe instanceof VanillaBrewingRecipe)) {
      Class recipeClass=iBrewingRecipe.getClass();
      if (!unhandledRecipeClasses.contains(recipeClass)) {
        unhandledRecipeClasses.add(recipeClass);
        Log.debug("String_Node_Str",recipeClass);
      }
    }
  }
}
Program: 31466
Project: 31466
Buggy source:
@Nullable public static ItemStack containsStack(@Nullable Iterable<ItemStack> stacks,@Nullable ItemStack contains){
  if (stacks == null || contains == null) {
    return null;
  }
  for (  ItemStack stack : stacks) {
    if (isIdentical(stack,contains)) {
      return stack;
    }
  }
  return null;
}

Fixed version (ground truth):
@Nullable public static ItemStack containsStack(@Nullable Iterable<ItemStack> stacks,@Nullable ItemStack contains){
  if (stacks == null || contains == null) {
    return null;
  }
  for (  ItemStack stack : stacks) {
    if (isIdentical(contains,stack)) {
      return stack;
    }
  }
  return null;
}
Program: 31467
Project: 31467
Buggy source:
public PacketRecipeTransfer(@Nonnull Map<Integer,ItemStack> recipeMap,@Nonnull Collection<Integer> craftingSlots,@Nonnull Collection<Integer> inventorySlots){
  this.recipeMap=recipeMap;
  this.craftingSlots=craftingSlots;
  this.inventorySlots=inventorySlots;
}

Fixed version (ground truth):
public PacketRecipeTransfer(@Nonnull Map<Integer,ItemStack> recipeMap,@Nonnull List<Integer> craftingSlots,@Nonnull List<Integer> inventorySlots){
  this.recipeMap=recipeMap;
  this.craftingSlots=craftingSlots;
  this.inventorySlots=inventorySlots;
}
Program: 31468
Project: 31468
Buggy source:
@Nullable private static Slot getSlotWithStack(@Nonnull Container container,@Nonnull Iterable<Integer> slotIndexes,@Nonnull ItemStack stack){
  for (  Integer slotIndex : slotIndexes) {
    Slot slot=container.getSlot(slotIndex);
    if (slot != null) {
      ItemStack slotStack=slot.getStack();
      if (StackUtil.isIdentical(stack,slotStack)) {
        return slot;
      }
    }
  }
  return null;
}

Fixed version (ground truth):
@Nullable private static Slot getSlotWithStack(@Nonnull Container container,@Nonnull Iterable<Integer> slotNumbers,@Nonnull ItemStack stack){
  for (  Integer slotNumber : slotNumbers) {
    Slot slot=container.getSlot(slotNumber);
    if (slot != null) {
      ItemStack slotStack=slot.getStack();
      if (StackUtil.isIdentical(stack,slotStack)) {
        return slot;
      }
    }
  }
  return null;
}
Program: 31470
Project: 31470
Buggy source:
/** 
 * Build slot map (Crafting Slot Index -> ItemStack) for the recipe. Based on slot position info from itemStackGroup the ingredients from the player's inventory in matchingStacks.
 */
@Nullable private static Map<Integer,ItemStack> buildSlotMap(@Nonnull GuiItemStackGroup itemStackGroup,@Nonnull List<ItemStack> matchingStacks){
  Map<Integer,ItemStack> slotMap=new HashMap<>();
  for (  Map.Entry<Integer,GuiIngredient<ItemStack>> entry : itemStackGroup.getGuiIngredients().entrySet()) {
    GuiIngredient<ItemStack> guiIngredient=entry.getValue();
    if (!guiIngredient.isInput()) {
      continue;
    }
    List<ItemStack> requiredStacks=guiIngredient.getAll();
    if (requiredStacks.isEmpty()) {
      continue;
    }
    ItemStack matchingStack=StackUtil.containsStack(matchingStacks,requiredStacks);
    if (matchingStack != null) {
      slotMap.put(entry.getKey(),matchingStack);
      matchingStacks.remove(matchingStack);
    }
 else {
      return null;
    }
  }
  return slotMap;
}

Fixed version (ground truth):
/** 
 * Build slot map (Crafting Slot Number -> ItemStack) for the recipe. Based on slot position info from itemStackGroup the ingredients from the player's inventory in matchingStacks.
 */
@Nullable private static Map<Integer,ItemStack> buildSlotMap(@Nonnull GuiItemStackGroup itemStackGroup,@Nonnull List<ItemStack> matchingStacks){
  Map<Integer,ItemStack> slotMap=new HashMap<>();
  Map<Integer,GuiIngredient<ItemStack>> ingredientsMap=itemStackGroup.getGuiIngredients();
  int recipeSlotNumber=-1;
  SortedSet<Integer> keys=new TreeSet<>(ingredientsMap.keySet());
  for (  Integer key : keys) {
    GuiIngredient<ItemStack> guiIngredient=ingredientsMap.get(key);
    if (!guiIngredient.isInput()) {
      continue;
    }
    recipeSlotNumber++;
    List<ItemStack> requiredStacks=guiIngredient.getAll();
    if (requiredStacks.isEmpty()) {
      continue;
    }
    ItemStack matchingStack=StackUtil.containsStack(matchingStacks,requiredStacks);
    if (matchingStack != null) {
      slotMap.put(recipeSlotNumber,matchingStack);
      matchingStacks.remove(matchingStack);
    }
 else {
      return null;
    }
  }
  return slotMap;
}
Program: 31472
Project: 31472
Buggy source:
@Nonnull public static String uniqueIdentifierForStack(@Nonnull ItemStack stack,boolean wildcard){
  Item item=stack.getItem();
  Object itemName=GameData.getItemRegistry().getNameForObject(item);
  String itemNameString=String.valueOf(itemName);
  if (wildcard) {
    return itemNameString;
  }
  StringBuilder itemKey=new StringBuilder(itemNameString).append(':').append(stack.getItemDamage());
  if (stack.hasTagCompound()) {
    itemKey.append(':').append(stack.getTagCompound());
  }
  return itemKey.toString();
}

Fixed version (ground truth):
@Nonnull public static String uniqueIdentifierForStack(@Nonnull ItemStack stack,boolean wildcard){
  Item item=stack.getItem();
  Object itemName=GameData.getItemRegistry().getNameForObject(item);
  String itemNameString=String.valueOf(itemName);
  int metadata=stack.getMetadata();
  if (wildcard || metadata == OreDictionary.WILDCARD_VALUE) {
    return itemNameString;
  }
  StringBuilder itemKey=new StringBuilder(itemNameString).append(':').append(metadata);
  if (stack.hasTagCompound()) {
    itemKey.append(':').append(stack.getTagCompound());
  }
  return itemKey.toString();
}
Program: 31473
Project: 31473
Buggy source:
@Override public IRecipeCategory getRecipeCategory(){
  return recipeCategories.get(recipeCategoryIndex);
}

Fixed version (ground truth):
@Override public IRecipeCategory getRecipeCategory(){
  if (recipeCategories.size() == 0) {
    return null;
  }
  return recipeCategories.get(recipeCategoryIndex);
}
Program: 31474
Project: 31474
Buggy source:
@Nonnull private static String asKey(@Nonnull ItemStack itemstack){
  return itemstack.getUnlocalizedName() + "String_Node_Str" + GameData.getItemRegistry().getId(itemstack.getItem());
}

Fixed version (ground truth):
@Nonnull private static String asKey(@Nonnull ItemStack itemstack){
  return itemstack.getUnlocalizedName() + "String_Node_Str" + itemstack.getItemDamage();
}
Program: 31475
Project: 31475
Buggy source:
public static List<ItemStack> removeDuplicateItemStacks(Iterable<ItemStack> stacks){
  ArrayList<ItemStack> newStacks=new ArrayList<ItemStack>();
  if (stacks == null)   return newStacks;
  for (  ItemStack stack : stacks) {
    if (stack != null && !containsStack(newStacks,stack))     newStacks.add(stack);
  }
  return newStacks;
}

Fixed version (ground truth):
public static List<ItemStack> removeDuplicateItemStacks(Iterable<ItemStack> stacks){
  ArrayList<ItemStack> newStacks=new ArrayList<ItemStack>();
  if (stacks == null)   return newStacks;
  for (  ItemStack stack : stacks) {
    if (stack != null && containsStack(newStacks,stack) == null)     newStacks.add(stack);
  }
  return newStacks;
}
Program: 31476
Project: 31476
Buggy source:
public static boolean containsStack(Iterable<ItemStack> stacks,ItemStack contains){
  if (stacks == null || contains == null)   return false;
  for (  ItemStack stack : stacks) {
    if (isIdentical(stack,contains))     return true;
  }
  return false;
}

Fixed version (ground truth):
public static ItemStack containsStack(Iterable<ItemStack> stacks,ItemStack contains){
  if (stacks == null || contains == null)   return null;
  for (  ItemStack stack : stacks) {
    if (isIdentical(stack,contains))     return stack;
  }
  return null;
}
Program: 31477
Project: 31477
Buggy source:
private boolean setStack(@Nullable ItemStack stack,@Nonnull Mode mode){
  if (stack == null)   return false;
  if (this.focusStack != null && this.focusStack.equals(stack) && this.mode == mode)   return true;
switch (mode) {
case INPUT:
    recipeTypes=JEIManager.recipeRegistry.getRecipeTypesForInput(stack);
  break;
case OUTPUT:
recipeTypes=JEIManager.recipeRegistry.getRecipeTypesForOutput(stack);
break;
}
if (recipeTypes.isEmpty()) {
return false;
}
this.focusStack=stack;
this.mode=mode;
this.recipeTypeIndex=0;
this.pageIndex=0;
updateLayout();
return true;
}

Fixed version (ground truth):
private boolean setStack(@Nullable ItemStack stack,@Nonnull Mode mode){
  if (stack == null)   return false;
  if (this.focusStack != null && this.focusStack.equals(stack) && this.mode == mode)   return true;
  List<IRecipeType> types=null;
switch (mode) {
case INPUT:
    types=JEIManager.recipeRegistry.getRecipeTypesForInput(stack);
  break;
case OUTPUT:
types=JEIManager.recipeRegistry.getRecipeTypesForOutput(stack);
break;
}
if (types.isEmpty()) {
return false;
}
this.recipeTypes=types;
this.focusStack=stack;
this.mode=mode;
this.recipeTypeIndex=0;
this.pageIndex=0;
updateLayout();
return true;
}
Program: 31479
Project: 31479
Buggy source:
@Override public void draw(@Nonnull Minecraft minecraft,int mouseX,int mouseY){
  if (recipeWrapper == null)   return;
  GL11.glPushMatrix();
  GL11.glTranslatef(posX,posY,0.0F);
  GL11.glColor4f(1.0F,1.0F,1.0F,1.0F);
  mouseX-=posX;
  mouseY-=posY;
  background.draw(minecraft);
  recipeWrapper.drawInfo(minecraft,mouseX,mouseY);
  guiItemStacks.draw(minecraft,mouseX,mouseY);
  GL11.glPopMatrix();
}

Fixed version (ground truth):
@Override public void draw(@Nonnull Minecraft minecraft,int mouseX,int mouseY){
  if (recipeWrapper == null)   return;
  background.draw(minecraft);
  recipeWrapper.drawInfo(minecraft,mouseX,mouseY);
  guiItemStacks.draw(minecraft,mouseX,mouseY);
}
Program: 31480
Project: 31480
Buggy source:
@Override public void draw(@Nonnull Minecraft minecraft,int mouseX,int mouseY){
  if (recipeWrapper == null)   return;
  GL11.glPushMatrix();
  GL11.glTranslatef(posX,posY,0.0F);
  GL11.glColor4f(1.0F,1.0F,1.0F,1.0F);
  mouseX-=posX;
  mouseY-=posY;
  background.draw(minecraft);
  recipeWrapper.drawInfo(minecraft,mouseX,mouseY);
  guiItemStacks.draw(minecraft,mouseX,mouseY);
  GL11.glPopMatrix();
}

Fixed version (ground truth):
@Override public void draw(@Nonnull Minecraft minecraft,int mouseX,int mouseY){
  if (recipeWrapper == null)   return;
  background.draw(minecraft);
  recipeWrapper.drawInfo(minecraft,mouseX,mouseY);
  guiItemStacks.draw(minecraft,mouseX,mouseY);
}
Program: 31481
Project: 31481
Buggy source:
public ImmutableMap<String,String> getReverseClasses(){
  return reverseClasses.build();
}

Fixed version (ground truth):
public ImmutableMap<String,String> getReverseClasses(){
  return this.reverseClasses.build();
}
Program: 31482
Project: 31482
Buggy source:
public ImmutableMap<String,ClassMappings> getMappings(){
  return mappings.build();
}

Fixed version (ground truth):
public ImmutableMap<String,ClassMappings> getMappings(){
  return this.mappings.build();
}
Program: 31483
Project: 31483
Buggy source:
private TerminalConsoleAppender(String name,Filter filter,Layout<? extends Serializable> layout,boolean ignoreExceptions){
  super(name,filter,layout,ignoreExceptions);
  initialize();
}

Fixed version (ground truth):
private TerminalConsoleAppender(String name,Filter filter,Layout<? extends Serializable> layout,boolean ignoreExceptions){
  super(name,filter,layout,ignoreExceptions);
  doInitialize();
}
Program: 31484
Project: 31484
Buggy source:
@PluginFactory public static TerminalConsoleAppender createAppender(@PluginAttribute("String_Node_Str") String name,@PluginElement("String_Node_Str") Filter filter,@PluginElement("String_Node_Str") @Nullable Layout<? extends Serializable> layout,@PluginAttribute("String_Node_Str") String ignore){
  if (name == null) {
    LOGGER.error("String_Node_Str");
    return null;
  }
  if (layout == null) {
    layout=PatternLayout.createLayout(null,null,null,null,null);
  }
  boolean ignoreExceptions=parseBoolean(ignore,true);
  return new TerminalConsoleAppender(name,filter,layout,ignoreExceptions);
}

Fixed version (ground truth):
@PluginFactory public static TerminalConsoleAppender createAppender(@PluginAttribute("String_Node_Str") String name,@PluginElement("String_Node_Str") Filter filter,@PluginElement("String_Node_Str") @Nullable Layout<? extends Serializable> layout,@PluginAttribute("String_Node_Str") String ignore){
  if (name == null) {
    LOGGER.error("String_Node_Str");
    return null;
  }
  if (layout == null) {
    layout=PatternLayout.createLayout(null,null,null,null,null,true,false,null,null);
  }
  boolean ignoreExceptions=parseBoolean(ignore,true);
  return new TerminalConsoleAppender(name,filter,layout,ignoreExceptions);
}
Program: 31485
Project: 31485
Buggy source:
@Inject(method="String_Node_Str",at=@At("String_Node_Str"),cancellable=true,remap=false) private void onRun(CallbackInfo ci){
  final Terminal terminal=TerminalConsoleAppender.getTerminal();
  if (terminal != null) {
    TerminalConsoleAppender.setFormatter(ConsoleFormatter.INSTANCE);
    LineReader reader=LineReaderBuilder.builder().appName("String_Node_Str").terminal(terminal).completer(new ConsoleCommandCompleter(this.server)).build();
    reader.unsetOpt(LineReader.Option.INSERT_TAB);
    TerminalConsoleAppender.setReader(reader);
    try {
      String line;
      while (!this.server.isServerStopped() && this.server.isServerRunning()) {
        line=reader.readLine("String_Node_Str");
        if (line == null) {
          break;
        }
        line=line.trim();
        if (!line.isEmpty()) {
          this.server.addPendingCommand(line,this.server);
        }
      }
    }
 catch (    UserInterruptException e) {
      this.server.initiateShutdown();
    }
 finally {
      TerminalConsoleAppender.setReader(null);
    }
    ci.cancel();
  }
 else {
    TerminalConsoleAppender.setFormatter(s -> LegacyTexts.strip(s,SpongeTexts.COLOR_CHAR));
  }
}

Fixed version (ground truth):
@Inject(method="String_Node_Str",at=@At("String_Node_Str"),cancellable=true,remap=false) private void onRun(CallbackInfo ci){
  final Terminal terminal=TerminalConsoleAppender.getTerminal();
  if (terminal != null) {
    TerminalConsoleAppender.setFormatter(ConsoleFormatter.INSTANCE);
    LineReader reader=LineReaderBuilder.builder().appName("String_Node_Str").terminal(terminal).completer(new ConsoleCommandCompleter(this.server)).build();
    reader.unsetOpt(LineReader.Option.INSERT_TAB);
    TerminalConsoleAppender.setReader(reader);
    try {
      String line;
      while (!this.server.mth_0365_al() && this.server.isServerRunning()) {
        line=reader.readLine("String_Node_Str");
        if (line == null) {
          break;
        }
        line=line.trim();
        if (!line.isEmpty()) {
          this.server.addPendingCommand(line,this.server);
        }
      }
    }
 catch (    UserInterruptException e) {
      this.server.initiateShutdown();
    }
 finally {
      TerminalConsoleAppender.setReader(null);
    }
    ci.cancel();
  }
 else {
    TerminalConsoleAppender.setFormatter(s -> LegacyTexts.strip(s,SpongeTexts.COLOR_CHAR));
  }
}
Program: 31486
Project: 31486
Buggy source:
public static void main(String[] args) throws Exception {
  DebugClient.disableReadTimeoutHandler(ReadTimeoutHandler.class);
  Main.main(args);
}

Fixed version (ground truth):
public static void main(String[] args) throws Exception {
  DebugClient.disableReadTimeoutHandler(IdleStateHandler.class);
  Main.main(args);
}
Program: 31487
Project: 31487
Buggy source:
public static void main(String[] args) throws Exception {
  DebugClient.disableReadTimeoutHandler(ReadTimeoutHandler.class);
  SpongeVanilla.main(new String[0]);
  List<URL> urls=new ArrayList<>(Arrays.asList(Launch.classLoader.getURLs()));
  urls.removeIf(url -> url.getFile().contains("String_Node_Str"));
  URLClassLoader loader=new DebugClientClassloader(urls.toArray(new URL[urls.size()]));
  Class<?> main=Class.forName("String_Node_Str",false,loader);
  main.getMethod("String_Node_Str",String[].class).invoke(null,(Object)args);
}

Fixed version (ground truth):
public static void main(String[] args) throws Exception {
  DebugClient.disableReadTimeoutHandler(IdleStateHandler.class);
  SpongeVanilla.main(new String[0]);
  List<URL> urls=new ArrayList<>(Arrays.asList(Launch.classLoader.getURLs()));
  urls.removeIf(url -> url.getFile().contains("String_Node_Str"));
  URLClassLoader loader=new DebugClientClassloader(urls.toArray(new URL[urls.size()]));
  Class<?> main=Class.forName("String_Node_Str",false,loader);
  main.getMethod("String_Node_Str",String[].class).invoke(null,(Object)args);
}
Program: 31488
Project: 31488
Buggy source:
/** 
 * @author Minecrell - May 28th, 2016
 * @reason Replaced to throw an exception because everything should gothrough the async chunk loader
 */
@Overwrite @Final public Chunk loadChunk(World worldIn,int x,int z) throws IOException {
  throw new UnsupportedOperationException("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * @author Minecrell - May 28th, 2016
 * @reason Replaced to throw an exception because everything should gothrough the async chunk loader
 */
@Nullable @Overwrite @Final public Chunk loadChunk(World worldIn,int x,int z) throws IOException {
  throw new UnsupportedOperationException("String_Node_Str");
}
Program: 31489
Project: 31489
Buggy source:
public static void main(String[] args) throws Exception {
  DebugClient.disableReadTimeoutHandler(ReadTimeoutHandler.class);
  SpongeVanillaLauncher.main(new String[0]);
  List<URL> urls=new ArrayList<>(Arrays.asList(Launch.classLoader.getURLs()));
  urls.removeIf(url -> url.getFile().contains("String_Node_Str"));
  URLClassLoader loader=new DebugClientClassloader(urls.toArray(new URL[urls.size()]));
  Class<?> main=Class.forName("String_Node_Str",false,loader);
  main.getMethod("String_Node_Str",String[].class).invoke(null,(Object)args);
}

Fixed version (ground truth):
public static void main(String[] args) throws Exception {
  DebugClient.disableReadTimeoutHandler(ReadTimeoutHandler.class);
  SpongeVanilla.main(new String[0]);
  List<URL> urls=new ArrayList<>(Arrays.asList(Launch.classLoader.getURLs()));
  urls.removeIf(url -> url.getFile().contains("String_Node_Str"));
  URLClassLoader loader=new DebugClientClassloader(urls.toArray(new URL[urls.size()]));
  Class<?> main=Class.forName("String_Node_Str",false,loader);
  main.getMethod("String_Node_Str",String[].class).invoke(null,(Object)args);
}
Program: 31490
Project: 31490
Buggy source:
public static Optional<Path> findSource(Class<?> type){
  CodeSource source=type.getProtectionDomain().getCodeSource();
  if (source == null) {
    return Optional.empty();
  }
  URL location=source.getLocation();
  String path=location.getPath();
  if (location.getProtocol().equals("String_Node_Str")) {
    if (path.startsWith("String_Node_Str")) {
      int pos=path.lastIndexOf('!');
      if (pos >= 0) {
        path=path.substring(5,pos);
      }
 else {
        path=path.substring(5);
      }
    }
  }
 else   if (!location.getProtocol().equals("String_Node_Str")) {
    return Optional.empty();
  }
  if (path.endsWith(JAR_EXTENSION)) {
    return Optional.of(Paths.get(path));
  }
  return Optional.empty();
}

Fixed version (ground truth):
public static Optional<Path> findSource(Class<?> type){
  CodeSource source=type.getProtectionDomain().getCodeSource();
  if (source == null) {
    return Optional.empty();
  }
  URL location=source.getLocation();
  String path=location.getPath();
  if (location.getProtocol().equals("String_Node_Str")) {
    if (path.startsWith("String_Node_Str")) {
      int pos=path.lastIndexOf('!');
      if (pos >= 0) {
        path=path.substring(0,pos);
      }
    }
  }
 else   if (!location.getProtocol().equals("String_Node_Str")) {
    return Optional.empty();
  }
  if (path.endsWith(JAR_EXTENSION)) {
    try {
      return Optional.of(Paths.get(new URI(path)));
    }
 catch (    URISyntaxException e) {
      throw new InvalidPathException(path,"String_Node_Str");
    }
  }
  return Optional.empty();
}
Program: 31491
Project: 31491
Buggy source:
@Override public BlockPos getRandomizedSpawnPoint(){
  BlockPos ret=this.worldObj.getSpawnPoint();
  boolean isAdventure=this.worldObj.getWorldInfo().getGameType() == WorldSettings.GameType.ADVENTURE;
  int spawnFuzz=((IMixinWorldType)this.terrainType).getSpawnFuzz();
  int border=MathHelper.floor_double(this.worldObj.getWorldBorder().getClosestDistance(ret.getX(),ret.getZ()));
  if (border < spawnFuzz) {
    spawnFuzz=border;
  }
  if (spawnFuzz < 1) {
    spawnFuzz=1;
  }
  int spawnFuzzHalf=spawnFuzz / 2;
  if (!this.getHasNoSky() && !isAdventure) {
    ret=this.worldObj.getTopSolidOrLiquidBlock(ret.add(this.worldObj.rand.nextInt(spawnFuzzHalf) - spawnFuzz,0,this.worldObj.rand.nextInt(spawnFuzzHalf) - spawnFuzz));
  }
  return ret;
}

Fixed version (ground truth):
@Override public BlockPos getRandomizedSpawnPoint(){
  BlockPos ret=this.worldObj.getSpawnPoint();
  boolean isAdventure=this.worldObj.getWorldInfo().getGameType() == GameType.ADVENTURE;
  int spawnFuzz=((IMixinWorldType)this.terrainType).getSpawnFuzz();
  int border=MathHelper.floor_double(this.worldObj.getWorldBorder().getClosestDistance(ret.getX(),ret.getZ()));
  if (border < spawnFuzz) {
    spawnFuzz=border;
  }
  if (spawnFuzz < 1) {
    spawnFuzz=1;
  }
  int spawnFuzzHalf=spawnFuzz / 2;
  if (!this.getHasNoSky() && !isAdventure) {
    ret=this.worldObj.getTopSolidOrLiquidBlock(ret.add(this.worldObj.rand.nextInt(spawnFuzzHalf) - spawnFuzz,0,this.worldObj.rand.nextInt(spawnFuzzHalf) - spawnFuzz));
  }
  return ret;
}
Program: 31493
Project: 31493
Buggy source:
private boolean addCandidate(PluginCandidate candidate){
  final String pluginClass=candidate.getPluginClass();
  final String id=candidate.getId();
  if (!ID_PATTERN.matcher(id).matches()) {
    logger.error("String_Node_Str" + "String_Node_Str",id,candidate.getDisplaySource());
    return false;
  }
  if (this.pluginClasses.add(pluginClass)) {
    if (this.plugins.containsKey(id)) {
      logger.error("String_Node_Str",id,candidate.getDisplaySource());
      return false;
    }
    this.plugins.put(id,candidate);
    return true;
  }
 else {
    logger.error("String_Node_Str",pluginClass,candidate.getDisplaySource());
  }
  return false;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private boolean addCandidate(PluginCandidate candidate){
  final String pluginClass=candidate.getPluginClass();
  final String id=candidate.getId();
  if (!ID_PATTERN.matcher(id).matches()) {
    logger.error("String_Node_Str" + "String_Node_Str",id,candidate.getDisplaySource());
    return false;
  }
  if (this.pluginClasses.add(pluginClass)) {
    if (this.plugins.containsKey(id)) {
      logger.error("String_Node_Str",id,candidate.getDisplaySource());
      return false;
    }
    this.plugins.put(id,candidate);
    return true;
  }
 else {
    logger.error("String_Node_Str",pluginClass,candidate.getDisplaySource());
  }
  return false;
}
Program: 31494
Project: 31494
Buggy source:
@Inject(method="String_Node_Str",at=@At(value="String_Node_Str",target="String_Node_Str"),cancellable=true,locals=LocalCapture.CAPTURE_FAILHARD) private void onSetActiveItemStack(EnumHand hand,CallbackInfo ci,ItemStack stack){
  UseItemStackEvent.Start event=SpongeEventFactory.createUseItemStackEventStart(Cause.of(NamedCause.source(this)),stack.getMaxItemUseDuration(),stack.getMaxItemUseDuration(),ItemStackUtil.snapshotOf(stack));
  if (SpongeImpl.postEvent(event)) {
    ci.cancel();
  }
 else {
    this.activeItemStackUseCount=event.getRemainingDuration();
  }
}

Fixed version (ground truth):
@Inject(method="String_Node_Str",cancellable=true,locals=LocalCapture.CAPTURE_FAILHARD,at=@At(value="String_Node_Str",target="String_Node_Str")) private void onSetActiveItemStack(EnumHand hand,CallbackInfo ci,ItemStack stack){
  UseItemStackEvent.Start event=SpongeEventFactory.createUseItemStackEventStart(Cause.of(NamedCause.source(this)),stack.getMaxItemUseDuration(),stack.getMaxItemUseDuration(),ItemStackUtil.snapshotOf(stack));
  if (SpongeImpl.postEvent(event)) {
    ci.cancel();
  }
 else {
    this.activeItemStackUseCount=event.getRemainingDuration();
  }
}
Program: 31495
Project: 31495
Buggy source:
/** 
 * @author Zidane - March 13th, 2016Vanilla simply returns worldServers[0]/[1]/[2] here. We change this to ask the  {@link WorldManager}.
 */
@Overwrite public WorldServer worldServerForDimension(int dim){
  return WorldManager.getWorldByDimensionId(dim).orElse(null);
}

Fixed version (ground truth):
/** 
 * @author Zidane - March 13th, 2016
 * @reason  Vanilla simply returns worldServers[0]/[1]/[2] here. We change this to ask the {@link WorldManager}.
 */
@Overwrite public WorldServer worldServerForDimension(int dim){
  return WorldManager.getWorldByDimensionId(dim).orElse(null);
}
Program: 31496
Project: 31496
Buggy source:
@Overwrite public void changePlayerDimension(EntityPlayerMP player,int dimensionIn){
  ((IMixinPlayerList)this).transferPlayerToDimension(player,dimensionIn,this.mcServer.worldServerForDimension(dimensionIn).getDefaultTeleporter());
}

Fixed version (ground truth):
/** 
 * @author Zidane - May 31th, 2016
 * @reason Force Vanilla methods to call derivatives with Teleporter
 */
@Overwrite public void changePlayerDimension(EntityPlayerMP player,int dimensionIn){
  ((IMixinPlayerList)this).transferPlayerToDimension(player,dimensionIn,this.mcServer.worldServerForDimension(dimensionIn).getDefaultTeleporter());
}
Program: 31497
Project: 31497
Buggy source:
@Overwrite public void transferEntityToWorld(Entity entityIn,int lastDimension,WorldServer oldWorldIn,WorldServer toWorldIn){
  ((IMixinPlayerList)this).transferEntityToWorld(entityIn,lastDimension,oldWorldIn,toWorldIn,toWorldIn.getDefaultTeleporter());
}

Fixed version (ground truth):
/** 
 * @author Zidane - May 31th, 2016
 * @reason Force Vanilla methods to call derivatives with Teleporter
 */
@Overwrite public void transferEntityToWorld(Entity entityIn,int lastDimension,WorldServer oldWorldIn,WorldServer toWorldIn){
  ((IMixinPlayerList)this).transferEntityToWorld(entityIn,lastDimension,oldWorldIn,toWorldIn,toWorldIn.getDefaultTeleporter());
}
Program: 31498
Project: 31498
Buggy source:
@Override public String[] getLaunchArguments(){
  return args;
}

Fixed version (ground truth):
@Override public String[] getLaunchArguments(){
  return this.args;
}
Program: 31499
Project: 31499
Buggy source:
@Override public void injectIntoClassLoader(LaunchClassLoader classLoader){
  List<String> tweakers=(List<String>)Launch.blackboard.get("String_Node_Str");
  tweakers.add("String_Node_Str");
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public void injectIntoClassLoader(LaunchClassLoader classLoader){
  List<String> tweakers=(List<String>)Launch.blackboard.get("String_Node_Str");
  tweakers.add("String_Node_Str");
}
Program: 31500
Project: 31500
Buggy source:
private SpongeVanilla(){
  Guice.createInjector(new VanillaGuiceModule(this,LogManager.getLogger(SpongeImpl.ECOSYSTEM_NAME))).getInstance(SpongeImpl.class);
  this.game=SpongeImpl.getGame();
  try {
    RegistryHelper.setFinalStatic(Sponge.class,"String_Node_Str",this.game);
  }
 catch (  IllegalAccessException|NoSuchFieldException e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
private SpongeVanilla(){
  Guice.createInjector(new VanillaGuiceModule(this,LogManager.getLogger(SpongeImpl.ECOSYSTEM_NAME))).getInstance(SpongeImpl.class);
  this.game=SpongeImpl.getGame();
  RegistryHelper.setFinalStatic(Sponge.class,"String_Node_Str",this.game);
}
Program: 31502
Project: 31502
Buggy source:
@Inject public VanillaGame(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 VanillaGame(Platform platform,PluginManager pluginManager,EventManager eventManager,SpongeGameRegistry gameRegistry,ServiceManager serviceManager,TeleportHelper teleportHelper,Logger logger){
  super(platform,pluginManager,eventManager,gameRegistry,serviceManager,teleportHelper,logger);
}
Program: 31504
Project: 31504
Buggy source:
@Inject(method="String_Node_Str",at=@At(value="String_Node_Str",target="String_Node_Str",shift=At.Shift.BY,by=2),locals=LocalCapture.CAPTURE_FAILHARD,cancellable=true) public void callMarkAndNotifyBlock(BlockPos pos,IBlockState newState,int flags,CallbackInfoReturnable<Boolean> cir,Chunk chunk,Block block,IBlockState iblockstate1,Block block1){
  cir.setReturnValue(true);
  if (this.injectCacheSnapshot == null) {
    this.markAndNotifyBlock(pos,chunk,iblockstate1,newState,flags);
  }
}

Fixed version (ground truth):
@Surrogate public void callMarkAndNotifyBlock(BlockPos pos,IBlockState newState,int flags,CallbackInfoReturnable<Boolean> cir,Chunk chunk,Block block,IBlockState iblockstate1){
  this.callMarkAndNotifyBlock(pos,newState,flags,cir,chunk,block,iblockstate1,null);
}
Program: 31506
Project: 31506
Buggy source:
@Inject(method="String_Node_Str",at=@At(value="String_Node_Str",target="String_Node_Str" + "String_Node_Str"),cancellable=true) public void injectProcessPlayerDigging(C07PacketPlayerDigging packetIn,CallbackInfo ci){
  ci.cancel();
  final WorldServer worldserver=this.serverController.worldServerForDimension(this.playerEntity.dimension);
  boolean cancelled=Sponge.getGame().getEventManager().post(SpongeEventFactory.createPlayerInteractBlock(Sponge.getGame(),new Cause(null,this.playerEntity,null),(Player)this.playerEntity,new Location((World)worldserver,VecHelper.toVector(packetIn.getPosition())),EntityInteractionTypes.ATTACK,null));
  boolean revert=cancelled;
  if (!cancelled) {
    if (!this.serverController.isBlockProtected(worldserver,packetIn.getPosition(),this.playerEntity) && worldserver.getWorldBorder().contains(packetIn.getPosition())) {
      this.playerEntity.theItemInWorldManager.onBlockClicked(packetIn.getPosition(),packetIn.getFacing());
    }
 else {
      revert=true;
    }
  }
  if (revert) {
    this.playerEntity.playerNetServerHandler.sendPacket(new S23PacketBlockChange(worldserver,packetIn.getPosition()));
  }
}

Fixed version (ground truth):
@Inject(method="String_Node_Str",at=@At(value="String_Node_Str",target="String_Node_Str" + "String_Node_Str"),cancellable=true) public void injectProcessPlayerDigging(C07PacketPlayerDigging packetIn,CallbackInfo ci){
  ci.cancel();
  final WorldServer worldserver=this.serverController.worldServerForDimension(this.playerEntity.dimension);
  boolean cancelled=Sponge.getGame().getEventManager().post(SpongeEventFactory.createPlayerInteractBlock(Sponge.getGame(),new Cause(null,this.playerEntity,null),(Player)this.playerEntity,new Location((World)worldserver,VecHelper.toVector(packetIn.getPosition())),SpongeGameRegistry.directionMap.inverse().get(packetIn.getFacing()),EntityInteractionTypes.ATTACK,null));
  boolean revert=cancelled;
  if (!cancelled) {
    if (!this.serverController.isBlockProtected(worldserver,packetIn.getPosition(),this.playerEntity) && worldserver.getWorldBorder().contains(packetIn.getPosition())) {
      this.playerEntity.theItemInWorldManager.onBlockClicked(packetIn.getPosition(),packetIn.getFacing());
    }
 else {
      revert=true;
    }
  }
  if (revert) {
    this.playerEntity.playerNetServerHandler.sendPacket(new S23PacketBlockChange(worldserver,packetIn.getPosition()));
  }
}
Program: 31507
Project: 31507
Buggy source:
public static Vec3 getPositionEyes(Entity entity,float partialTicks){
  if (partialTicks == 1.0F) {
    return new Vec3(entity.posX,entity.posY + entity.getEyeHeight(),entity.posZ);
  }
  double interpX=entity.prevPosX + (entity.posX - entity.prevPosX) * partialTicks;
  double interpY=entity.prevPosY + (entity.posY - entity.prevPosY) * partialTicks + entity.getEyeHeight();
  double interpZ=entity.prevPosZ + (entity.posZ - entity.prevPosZ) * partialTicks;
  return new Vec3(interpX,interpY,interpZ);
}

Fixed version (ground truth):
public static Vec3 getPositionEyes(Entity entity,float partialTicks){
  if (partialTicks == 1.0F) {
    return new Vec3(entity.posX,entity.posY + entity.getEyeHeight(),entity.posZ);
  }
  double interpX=GenericMath.lerp(entity.prevPosX,entity.posX,partialTicks);
  double interpY=GenericMath.lerp(entity.prevPosY,entity.posY,partialTicks);
  double interpZ=GenericMath.lerp(entity.prevPosZ,entity.posZ,partialTicks);
  return new Vec3(interpX,interpY,interpZ);
}
Program: 31508
Project: 31508
Buggy source:
public static MovingObjectPosition rayTraceFromEntity(Entity entity,double traceDistance,float partialTicks){
  Vec3 var4=EntityUtils.getPositionEyes(entity,partialTicks);
  Vec3 var5=entity.getLook(partialTicks);
  Vec3 var6=var4.addVector(var5.xCoord * traceDistance,var5.yCoord * traceDistance,var5.zCoord * traceDistance);
  return entity.worldObj.rayTraceBlocks(var4,var6,false,false,true);
}

Fixed version (ground truth):
public static MovingObjectPosition rayTraceFromEntity(Entity entity,double traceDistance,float partialTicks){
  final Vec3 vecPositionEyes=EntityUtils.getPositionEyes(entity,partialTicks);
  final Vec3 vecFacing=entity.getLook(partialTicks);
  final Vec3 vecInFront=vecPositionEyes.addVector(vecFacing.xCoord * traceDistance,vecFacing.yCoord * traceDistance,vecFacing.zCoord * traceDistance);
  return entity.worldObj.rayTraceBlocks(vecPositionEyes,vecInFront,false,false,true);
}
Program: 31509
Project: 31509
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_item_list);
  isTwoPane=getResources().getBoolean(R.bool.isTwoPane);
  if (isTwoPane) {
    getSupportActionBar().setDisplayShowHomeEnabled(false);
    getSupportActionBar().setDisplayUseLogoEnabled(false);
    ((ItemListFragment)getSupportFragmentManager().findFragmentById(R.id.item_list)).setActivateOnItemClick(true);
    onItemSelected(0);
  }
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  isTwoPane=getResources().getBoolean(R.bool.isTwoPane);
  setContentView(isTwoPane ? R.layout.activity_item_twopane : R.layout.activity_item_list);
  if (isTwoPane) {
    getSupportActionBar().setDisplayShowHomeEnabled(false);
    getSupportActionBar().setDisplayUseLogoEnabled(false);
    ((ItemListFragment)getSupportFragmentManager().findFragmentById(R.id.item_list)).setActivateOnItemClick(true);
    onItemSelected(0);
  }
}
Program: 31511
Project: 31511
Buggy source:
public AnimatorSet openPromotedActions(){
  if (objectAnimator == null) {
    objectAnimatorSetup();
  }
  AnimatorSet animation=new AnimatorSet();
  for (int i=0; i < promotedActions.size(); i++) {
    objectAnimator[i]=setOpenAnimation(promotedActions.get(i),i);
  }
  animation.playTogether(objectAnimator);
  animation.addListener(new Animator.AnimatorListener(){
    @Override public void onAnimationStart(    Animator animator){
      mainImageButton.startAnimation(rotateOpenAnimation);
      mainImageButton.setClickable(false);
      showPromotedActions();
    }
    @Override public void onAnimationEnd(    Animator animator){
      mainImageButton.setClickable(true);
    }
    @Override public void onAnimationCancel(    Animator animator){
      mainImageButton.setClickable(true);
    }
    @Override public void onAnimationRepeat(    Animator animator){
    }
  }
);
  return animation;
}

Fixed version (ground truth):
public AnimatorSet openPromotedActions(){
  if (objectAnimator == null) {
    objectAnimatorSetup();
  }
  AnimatorSet animation=new AnimatorSet();
  for (int i=0; i < promotedActions.size(); i++) {
    objectAnimator[i]=setOpenAnimation(promotedActions.get(i),i);
  }
  if (objectAnimator.length == 0) {
    objectAnimator=null;
  }
  animation.playTogether(objectAnimator);
  animation.addListener(new Animator.AnimatorListener(){
    @Override public void onAnimationStart(    Animator animator){
      mainImageButton.startAnimation(rotateOpenAnimation);
      mainImageButton.setClickable(false);
      showPromotedActions();
    }
    @Override public void onAnimationEnd(    Animator animator){
      mainImageButton.setClickable(true);
    }
    @Override public void onAnimationCancel(    Animator animator){
      mainImageButton.setClickable(true);
    }
    @Override public void onAnimationRepeat(    Animator animator){
    }
  }
);
  return animation;
}
Program: 31512
Project: 31512
Buggy source:
/** 
 * Set close animation for promoted actions
 */
public AnimatorSet closePromotedActions(){
  if (objectAnimator == null) {
    objectAnimatorSetup();
  }
  AnimatorSet animation=new AnimatorSet();
  for (int i=0; i < promotedActions.size(); i++) {
    objectAnimator[i]=setCloseAnimation(promotedActions.get(i),i);
  }
  animation.playTogether(objectAnimator);
  animation.addListener(new Animator.AnimatorListener(){
    @Override public void onAnimationStart(    Animator animator){
      mainImageButton.startAnimation(rotateCloseAnimation);
      mainImageButton.setClickable(false);
    }
    @Override public void onAnimationEnd(    Animator animator){
      mainImageButton.setClickable(true);
      hidePromotedActions();
    }
    @Override public void onAnimationCancel(    Animator animator){
      mainImageButton.setClickable(true);
    }
    @Override public void onAnimationRepeat(    Animator animator){
    }
  }
);
  return animation;
}

Fixed version (ground truth):
/** 
 * Set close animation for promoted actions
 */
public AnimatorSet closePromotedActions(){
  if (objectAnimator == null) {
    objectAnimatorSetup();
  }
  AnimatorSet animation=new AnimatorSet();
  for (int i=0; i < promotedActions.size(); i++) {
    objectAnimator[i]=setCloseAnimation(promotedActions.get(i),i);
  }
  if (objectAnimator.length == 0) {
    objectAnimator=null;
  }
  animation.playTogether(objectAnimator);
  animation.addListener(new Animator.AnimatorListener(){
    @Override public void onAnimationStart(    Animator animator){
      mainImageButton.startAnimation(rotateCloseAnimation);
      mainImageButton.setClickable(false);
    }
    @Override public void onAnimationEnd(    Animator animator){
      mainImageButton.setClickable(true);
      hidePromotedActions();
    }
    @Override public void onAnimationCancel(    Animator animator){
      mainImageButton.setClickable(true);
    }
    @Override public void onAnimationRepeat(    Animator animator){
    }
  }
);
  return animation;
}
Program: 31513
Project: 31513
Buggy source:
public void checkLocation(){
  if (location != null) {
    if ((int)location.getLatitude() == 45 && (int)location.getLongitude() == -93) {
      Vibrator vibrator=(Vibrator)context.getSystemService(Context.VIBRATOR_SERVICE);
      vibrator.vibrate(1400);
      Toast.makeText(context,getString(R.string.string_challenge_four_win),Toast.LENGTH_SHORT).show();
    }
 else {
      Toast.makeText(context,getString(R.string.string_challenge_four_lose),Toast.LENGTH_SHORT).show();
    }
  }
}

Fixed version (ground truth):
public void checkLocation(){
  if (location != null) {
    if ((int)location.getLatitude() == 44 && (int)location.getLongitude() == -93) {
      Vibrator vibrator=(Vibrator)context.getSystemService(Context.VIBRATOR_SERVICE);
      vibrator.vibrate(1400);
      Toast.makeText(context,getString(R.string.string_challenge_four_win),Toast.LENGTH_SHORT).show();
    }
 else {
      Toast.makeText(context,getString(R.string.string_challenge_four_lose),Toast.LENGTH_SHORT).show();
    }
  }
}
Program: 31514
Project: 31514
Buggy source:
private void generateBudgets(User user,int month,int year){
  LocalDate now=LocalDate.now();
  List<Budget> originalBudgets=budgetDAO.findBudgets(user,now.getMonthValue(),now.getYear(),false);
  if (originalBudgets.isEmpty()) {
    LocalDate previousMonth=LocalDate.now().minusMonths(1L);
    originalBudgets=budgetDAO.findBudgets(user,previousMonth.getMonthValue(),previousMonth.getYear(),false);
  }
  Date period=Util.yearMonthDate(month,year);
  for (  Budget budget : originalBudgets) {
    Budget newBudget=new Budget();
    newBudget.setName(budget.getName());
    newBudget.setProjected(budget.getProjected());
    newBudget.setPeriod(period);
    newBudget.setCategory(budget.getCategory());
    newBudget.setBudgetType(budget.getBudgetType());
    budgetDAO.addBudget(user,newBudget);
  }
}

Fixed version (ground truth):
private void generateBudgets(User user,int month,int year){
  LocalDate now=LocalDate.now();
  List<Budget> originalBudgets=budgetDAO.findBudgets(user,now.getMonthValue(),now.getYear(),false);
  if (originalBudgets.isEmpty()) {
    Date latestDate=budgetDAO.findLatestBudget(user);
    LocalDate date=latestDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
    originalBudgets=budgetDAO.findBudgets(user,date.getMonthValue(),date.getYear(),false);
  }
  Date period=Util.yearMonthDate(month,year);
  for (  Budget budget : originalBudgets) {
    Budget newBudget=new Budget();
    newBudget.setName(budget.getName());
    newBudget.setProjected(budget.getProjected());
    newBudget.setPeriod(period);
    newBudget.setCategory(budget.getCategory());
    newBudget.setBudgetType(budget.getBudgetType());
    budgetDAO.addBudget(user,newBudget);
  }
}
Program: 31515
Project: 31515
Buggy source:
private List<String> getMessage(ConstraintViolationException e){
  if ("String_Node_Str".equals(e.getConstraintName())) {
    return Collections.singletonList("String_Node_Str");
  }
 else   if ("String_Node_Str".equals(e.getConstraintName())) {
    return Collections.singletonList("String_Node_Str");
  }
  return Collections.singletonList(e.getMessage());
}

Fixed version (ground truth):
private List<String> getMessage(ConstraintViolationException e){
  if ("String_Node_Str".equalsIgnoreCase(e.getConstraintName())) {
    return Collections.singletonList("String_Node_Str");
  }
 else   if ("String_Node_Str".equalsIgnoreCase(e.getConstraintName())) {
    return Collections.singletonList("String_Node_Str");
  }
  return Collections.singletonList(e.getMessage());
}