nus-yam/ex-repair huggingface dataset:
Program: 12568
Project: 12568
Buggy source:
@Override public long getSubProperties(TextureContext context,long currentProperties){
  if (texture.isBlockPartOfWallAndUnobstructed(context,TextureDirection.LEFT,TextureDirection.BELOW)) {
    currentProperties|=ProceduralConnectedTexture.LEFT;
  }
  if (texture.isBlockPartOfWallAndUnobstructed(context,TextureDirection.RIGHT,TextureDirection.BELOW)) {
    currentProperties|=ProceduralConnectedTexture.RIGHT;
  }
  if ((getCrownSplitOpportunity(context.getWorldBlockCoord()) & 14) == 0) {
    currentProperties|=ProceduralConnectedTexture.LEFT;
  }
  if ((getCrownSplitOpportunity(context.getWorldBlockCoord().offset(context.getRightDirection())) & 14) == 0) {
    currentProperties|=ProceduralConnectedTexture.RIGHT;
  }
  return getFeatureId() | (currentProperties & ~ProceduralConnectedTexture.TOP);
}

Fixed version (ground truth):
@Override public long getSubProperties(TextureContext context,long currentProperties){
  if (texture.isBlockPartOfWallAndUnobstructed(context,TextureDirection.LEFT,TextureDirection.BELOW)) {
    currentProperties|=ProceduralConnectedTexture.LEFT;
  }
  if (texture.isBlockPartOfWallAndUnobstructed(context,TextureDirection.RIGHT,TextureDirection.BELOW)) {
    currentProperties|=ProceduralConnectedTexture.RIGHT;
  }
  if ((getCrownSplitOpportunity(context.getWorldBlockCoord()) & 14) == 0) {
    currentProperties|=ProceduralConnectedTexture.LEFT;
  }
  if ((getCrownSplitOpportunity(context.getWorldBlockCoord().offset(context.getRightDirection())) & 14) == 0) {
    currentProperties|=ProceduralConnectedTexture.RIGHT;
  }
  currentProperties|=ProceduralConnectedTexture.BOTTOM;
  return getFeatureId() | (currentProperties & ~ProceduralConnectedTexture.TOP);
}
Program: 12570
Project: 12570
Buggy source:
@Override public long getSubProperties(TextureContext context,long currentProperties){
  if (texture.isBlockPartOfWallAndUnobstructed(context,TextureDirection.LEFT,TextureDirection.ABOVE)) {
    currentProperties|=ProceduralConnectedTexture.LEFT;
  }
  if (texture.isBlockPartOfWallAndUnobstructed(context,TextureDirection.RIGHT,TextureDirection.ABOVE)) {
    currentProperties|=ProceduralConnectedTexture.RIGHT;
  }
  if ((getCrownSplitOpportunity(context.getWorldBlockCoord()) & 14) == 0) {
    currentProperties|=ProceduralConnectedTexture.LEFT;
  }
  if ((getCrownSplitOpportunity(context.getWorldBlockCoord().offset(context.getRightDirection())) & 14) == 0) {
    currentProperties|=ProceduralConnectedTexture.RIGHT;
  }
  return getFeatureId() | currentProperties;
}

Fixed version (ground truth):
@Override public long getSubProperties(TextureContext context,long currentProperties){
  if (texture.isBlockPartOfWallAndUnobstructed(context,TextureDirection.LEFT,TextureDirection.ABOVE)) {
    currentProperties|=ProceduralConnectedTexture.LEFT;
  }
  if (texture.isBlockPartOfWallAndUnobstructed(context,TextureDirection.RIGHT,TextureDirection.ABOVE)) {
    currentProperties|=ProceduralConnectedTexture.RIGHT;
  }
  if ((getCrownSplitOpportunity(context.getWorldBlockCoord()) & 14) == 0) {
    currentProperties|=ProceduralConnectedTexture.LEFT;
  }
  if ((getCrownSplitOpportunity(context.getWorldBlockCoord().offset(context.getRightDirection())) & 14) == 0) {
    currentProperties|=ProceduralConnectedTexture.RIGHT;
  }
  currentProperties|=ProceduralConnectedTexture.TOP;
  return getFeatureId() | currentProperties;
}
Program: 12571
Project: 12571
Buggy source:
@Override public void registerBlockIcons(IIconRegister iconRegister){
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public void registerBlockIcons(IIconRegister iconRegister){
}
Program: 12572
Project: 12572
Buggy source:
@Override public boolean onBlockActivated(World world,int x,int y,int z,EntityPlayer player,int side,float xOffset,float yOffset,float zOffset){
  final TileEntity te=world.getTileEntity(x,y,z);
  if (!world.isRemote && te != null && te instanceof PlotoniumChestTE) {
    player.displayGUIChest((IInventory)te);
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean onBlockActivated(World world,int x,int y,int z,EntityPlayer player,int side,float xOffset,float yOffset,float zOffset){
  final TileEntity te=world.getTileEntity(x,y,z);
  if (!player.isSneaking())   if (!world.isRemote && te != null && te instanceof PlotoniumChestTE)   player.displayGUIChest((IInventory)te);
  return true;
}
Program: 12573
Project: 12573
Buggy source:
@Override public void breakBlock(World world,int x,int y,int z,Block block,int metadata){
  final PlotoniumChestTE te=(PlotoniumChestTE)world.getTileEntity(x,y,z);
  if (te != null) {
    for (int slotindex=0; slotindex < te.getSizeInventory(); ++slotindex) {
      dropSlotContents(world,x,y,z,te,slotindex);
    }
    world.func_147453_f(x,y,z,block);
  }
  super.breakBlock(world,x,y,z,block,metadata);
}

Fixed version (ground truth):
@Override public void breakBlock(World world,int x,int y,int z,Block block,int metadata){
  final PlotoniumChestTE te=(PlotoniumChestTE)world.getTileEntity(x,y,z);
  if (te != null) {
    dropInventory(world,WorldBlockCoord.of(x,y,z),te);
    world.func_147453_f(x,y,z,block);
  }
  super.breakBlock(world,x,y,z,block,metadata);
}
Program: 12574
Project: 12574
Buggy source:
@Override public int getLightValue(IBlockAccess world,int x,int y,int z){
  TileEntity te=world.getTileEntity(x,y,z);
  if (((CupolaTE)te).isSlave()) {
    te=world.getTileEntity(x,y - 1,z);
  }
  if (((CupolaTE)te).isActive())   return 15;
  return super.getLightValue(world,x,y,z);
}

Fixed version (ground truth):
@Override public int getLightValue(IBlockAccess world,int x,int y,int z){
  TileEntity te=world.getTileEntity(x,y,z);
  if (((CupolaTE)te).isSlave()) {
    te=world.getTileEntity(x,y - 1,z);
  }
  if ((te != null) && ((CupolaTE)te).isActive())   return 15;
  return super.getLightValue(world,x,y,z);
}
Program: 12575
Project: 12575
Buggy source:
public SteamNSteelItemArmor(ArmorMaterial material,int armorType,int renderIndex,String name){
  super(material,armorType,renderIndex);
  this.setCreativeTab(Reference.CREATIVE_TAB);
  this.setUnlocalizedName(name);
}

Fixed version (ground truth):
SteamNSteelItemArmor(ArmorMaterial material,int armorType,int renderIndex,String name){
  super(material,armorType,renderIndex);
  setCreativeTab(TheMod.CREATIVE_TAB);
  setUnlocalizedName(name);
}
Program: 12576
Project: 12576
Buggy source:
@SuppressWarnings("String_Node_Str") protected String getUnwrappedUnlocalizedName(String unlocalizedName){
  return unlocalizedName.substring(unlocalizedName.indexOf('.') + 1);
}

Fixed version (ground truth):
private static String getUnwrappedUnlocalizedName(String unlocalizedName){
  return unlocalizedName.substring(unlocalizedName.indexOf('.') + 1);
}
Program: 12577
Project: 12577
Buggy source:
private RecipePattern(String firstRow,String secondRow,String thirdRow){
  pattern=ImmutableList.of(firstRow,secondRow,thirdRow);
}

Fixed version (ground truth):
private RecipePattern(String firstRow){
  pattern=ImmutableList.of(firstRow);
}
Program: 12578
Project: 12578
Buggy source:
public static RecipePattern of(String firstRow){
  return new RecipePattern(firstRow,"String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
public static RecipePattern of(String firstRow){
  return new RecipePattern(firstRow);
}
Program: 12579
Project: 12579
Buggy source:
@Override public String toString(){
  return Objects.toStringHelper(this).add("String_Node_Str",pattern.get(0)).add("String_Node_Str",pattern.get(1)).add("String_Node_Str",pattern.get(2)).toString();
}

Fixed version (ground truth):
@Override public String toString(){
  final StringBuilder sb=new StringBuilder(CAPACITY);
  sb.append('{');
  boolean appendComma=false;
  for (  final String s : pattern) {
    if (appendComma)     sb.append("String_Node_Str");
 else     appendComma=true;
    sb.append('\"');
    sb.append(s);
    sb.append('\"');
  }
  sb.append('}');
  return Objects.toStringHelper(this).addValue(sb).toString();
}
Program: 12580
Project: 12580
Buggy source:
protected void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  String color=null;
  HashMap<String,String> hm=new HashMap<String,String>();
  hm.put("String_Node_Str",request.getParameter("String_Node_Str"));
  hm.put("String_Node_Str",request.getParameter("String_Node_Str"));
  hm.put("String_Node_Str",request.getParameter("String_Node_Str") + "String_Node_Str");
  hm.put("String_Node_Str",request.getParameter("String_Node_Str"));
  hm.put("String_Node_Str",request.getParameter("String_Node_Str"));
  hm.put("String_Node_Str",request.getParameter("String_Node_Str"));
  hm.put("String_Node_Str",request.getParameter("String_Node_Str"));
  hm.put("String_Node_Str",request.getParameter("String_Node_Str"));
  System.out.println("String_Node_Str" + hm);
  BpmsClientThread t=new BpmsClientThread();
  processId=t.starBusinessProcess(hm);
  System.out.println("String_Node_Str");
  response.setCharacterEncoding("String_Node_Str");
  response.setContentType("String_Node_Str");
  PrintWriter out=response.getWriter();
  String content="String_Node_Str";
  if (processId == null) {
    content=getContent(getServletContext().getRealPath(File.separator) + "String_Node_Str");
  }
 else {
    content=getContent(getServletContext().getRealPath(File.separator) + "String_Node_Str");
    content=content.replace("String_Node_Str",processId);
  }
  out.println(content);
}

Fixed version (ground truth):
protected void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  String color=null;
  HashMap<String,String> hm=new HashMap<String,String>();
  hm.put("String_Node_Str",request.getParameter("String_Node_Str"));
  hm.put("String_Node_Str",request.getParameter("String_Node_Str"));
  hm.put("String_Node_Str",request.getParameter("String_Node_Str") + "String_Node_Str");
  hm.put("String_Node_Str",request.getParameter("String_Node_Str"));
  hm.put("String_Node_Str",request.getParameter("String_Node_Str"));
  hm.put("String_Node_Str",request.getParameter("String_Node_Str"));
  hm.put("String_Node_Str",request.getParameter("String_Node_Str"));
  hm.put("String_Node_Str",request.getParameter("String_Node_Str"));
  System.out.println("String_Node_Str" + hm);
  BpmsClientThread t=new BpmsClientThread();
  processId=t.starBusinessProcess(hm);
  System.out.println("String_Node_Str");
  response.setCharacterEncoding("String_Node_Str");
  response.setContentType("String_Node_Str");
  PrintWriter out=response.getWriter();
  String content="String_Node_Str";
  if (processId == null) {
    content=getContent(getServletContext().getRealPath(File.separator) + File.separator + "String_Node_Str");
  }
 else {
    content=getContent(getServletContext().getRealPath(File.separator) + File.separator + "String_Node_Str");
    content=content.replace("String_Node_Str",processId);
  }
  out.println(content);
}
Program: 12581
Project: 12581
Buggy source:
public void enable(){
  if (!MC.isSingleplayer()) {
    ChatUtils.print("String_Node_Str");
    return;
  }
  if (!enabled) {
    ToggleableClippingHelper.getInstance().setEnabled(false);
    reset();
  }
  enabled=true;
}

Fixed version (ground truth):
public void enable(){
  if (!MC.isSingleplayer()) {
    ChatUtils.print("String_Node_Str");
    return;
  }
  if (!enabled) {
    clippingEnabled=clippingHelper.isEnabled();
    clippingHelper.setEnabled(false);
    reset();
  }
  enabled=true;
}
Program: 12582
Project: 12582
Buggy source:
public void disable(){
  if (enabled) {
    ToggleableClippingHelper.getInstance().setEnabled(true);
  }
  enabled=false;
}

Fixed version (ground truth):
public void disable(){
  if (enabled) {
    clippingHelper.setEnabled(clippingEnabled);
  }
  enabled=false;
}
Program: 12583
Project: 12583
Buggy source:
private void modifySettings(){
  ToggleableClippingHelper.getInstance().setEnabled(false);
}

Fixed version (ground truth):
private void modifySettings(){
  clippingEnabled=clippingHelper.isEnabled();
  clippingHelper.setEnabled(false);
}
Program: 12584
Project: 12584
Buggy source:
private void restoreSettings(){
  ToggleableClippingHelper.getInstance().setEnabled(true);
}

Fixed version (ground truth):
private void restoreSettings(){
  clippingHelper.setEnabled(clippingEnabled);
}
Program: 12585
Project: 12585
Buggy source:
@Test public void testInterceptorMultiThreaded() throws Exception {
  ExecutorService executor=Executors.newFixedThreadPool(5);
  final Queue<Event> processed=new ConcurrentLinkedQueue<Event>();
  for (int i=0; i < 5; i++) {
    executor.submit(new Runnable(){
      @Override public void run(){
        List<Event> eventList=Lists.newArrayList();
        final String EVENT_BASE="String_Node_Str";
        for (int i=0; i < 100; i++) {
          eventList.add(EventBuilder.withBody((EVENT_BASE + i).getBytes()));
        }
        processed.addAll(interceptor.intercept(eventList));
      }
    }
);
  }
  Thread.sleep(2000);
  Assert.assertEquals(500,processed.size());
  Set<Integer> counts=Sets.newTreeSet();
  Iterator<Event> iter=processed.iterator();
  while (iter.hasNext()) {
    Event t=iter.next();
    counts.add(Integer.valueOf(t.getHeaders().get("String_Node_Str")));
  }
  Assert.assertEquals(500,counts.size());
  Iterator<Integer> counterIter=counts.iterator();
  Integer expected=1;
  while (counterIter.hasNext()) {
    Integer count=counterIter.next();
    Assert.assertEquals(expected++,count);
  }
}

Fixed version (ground truth):
@Test public void testInterceptorMultiThreaded() throws Exception {
  ExecutorService executor=Executors.newFixedThreadPool(5);
  final Queue<Event> processed=new ConcurrentLinkedQueue<Event>();
  for (int i=0; i < 5; i++) {
    executor.submit(new Runnable(){
      @Override public void run(){
        List<Event> eventList=Lists.newArrayList();
        final String EVENT_BASE="String_Node_Str";
        for (int i=0; i < 100; i++) {
          eventList.add(EventBuilder.withBody((EVENT_BASE + i).getBytes()));
        }
        processed.addAll(interceptor.intercept(eventList));
      }
    }
);
  }
  Thread.sleep(2000);
  Assert.assertEquals(500,processed.size());
  Set<Integer> counts=Sets.newTreeSet();
  Iterator<Event> iter=processed.iterator();
  while (iter.hasNext()) {
    Event t=iter.next();
    counts.add(Integer.valueOf(t.getHeaders().get("String_Node_Str")));
  }
  Assert.assertEquals(500,counts.size());
  Iterator<Integer> counterIter=counts.iterator();
  Integer expected=1;
  while (counterIter.hasNext()) {
    Integer count=counterIter.next();
    Assert.assertEquals((Integer)expected++,count);
  }
}
Program: 12586
Project: 12586
Buggy source:
@Override public void configure(Context context){
  awsAccessKeyId=context.getString("String_Node_Str");
  Preconditions.checkArgument(awsAccessKeyId != null && !awsAccessKeyId.isEmpty(),"String_Node_Str");
  awsSecretKey=context.getString("String_Node_Str");
  Preconditions.checkArgument(awsSecretKey != null && !awsSecretKey.isEmpty(),"String_Node_Str");
  bucket=context.getString("String_Node_Str");
  Preconditions.checkArgument(bucket != null && !bucket.isEmpty(),"String_Node_Str");
  endPoint=context.getInteger("String_Node_Str");
  Preconditions.checkArgument(endPoint != null && !endPoint.isEmpty(),"String_Node_Str");
  batchSize=context.getString("String_Node_Str",1000);
  objPrefix=context.getString("String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
@Override public void configure(Context context){
  awsAccessKeyId=context.getString("String_Node_Str");
  Preconditions.checkArgument(awsAccessKeyId != null && !awsAccessKeyId.isEmpty(),"String_Node_Str");
  awsSecretKey=context.getString("String_Node_Str");
  Preconditions.checkArgument(awsSecretKey != null && !awsSecretKey.isEmpty(),"String_Node_Str");
  bucket=context.getString("String_Node_Str");
  Preconditions.checkArgument(bucket != null && !bucket.isEmpty(),"String_Node_Str");
  endPoint=context.getString("String_Node_Str");
  Preconditions.checkArgument(endPoint != null && !endPoint.isEmpty(),"String_Node_Str");
  batchSize=context.getInteger("String_Node_Str",1000);
  objPrefix=context.getString("String_Node_Str","String_Node_Str");
}
Program: 12587
Project: 12587
Buggy source:
/** 
 * Init
 * @param plugin
 * @param fileName
 */
public ConfigAccessor(JavaPlugin plugin,String fileName){
  if (plugin == null)   throw new IllegalArgumentException("String_Node_Str");
  this.plugin=plugin;
  this.fileName=fileName;
  File dataFolder=plugin.getDataFolder();
  if (dataFolder == null)   throw new IllegalStateException(plugin.lang("String_Node_Str"));
  this.configFile=new File(plugin.getDataFolder(),fileName);
}

Fixed version (ground truth):
/** 
 * Init
 * @param plugin
 * @param fileName
 */
public ConfigAccessor(JavaPlugin plugin,String fileName){
  if (plugin == null)   throw new IllegalArgumentException("String_Node_Str");
  this.plugin=plugin;
  this.fileName=fileName;
  File dataFolder=plugin.getDataFolder();
  if (dataFolder == null)   this.configFile=new File(plugin.getDataFolder(),fileName);
}
Program: 12588
Project: 12588
Buggy source:
/** 
 * Save changes
 */
public void saveConfig(){
  if (fileConfiguration != null && configFile != null) {
    try {
      getConfig().save(configFile);
    }
 catch (    IOException ex) {
      plugin.getLogger().log(Level.SEVERE,plugin.lang("String_Node_Str") + "String_Node_Str" + configFile,ex);
    }
  }
}

Fixed version (ground truth):
/** 
 * Save changes
 */
public void saveConfig(){
  if (fileConfiguration != null && configFile != null) {
    try {
      getConfig().save(configFile);
    }
 catch (    IOException ex) {
    }
  }
}
Program: 12589
Project: 12589
Buggy source:
public void reloadConfig(){
  fileConfiguration=YamlConfiguration.loadConfiguration(configFile);
  InputStream defConfigStream=plugin.getResource(fileName);
  if (defConfigStream != null) {
    YamlConfiguration defConfig=YamlConfiguration.loadConfiguration(new InputStreamReader(defConfigStream));
    fileConfiguration.setDefaults(defConfig);
  }
}

Fixed version (ground truth):
public void reloadConfig(){
  fileConfiguration=YamlConfiguration.loadConfiguration(configFile);
  InputStream defConfigStream=plugin.getResource(fileName);
  if (defConfigStream != null) {
  }
}
Program: 12590
Project: 12590
Buggy source:
public boolean onCommand(CommandSender sender,Command cmd,String label,String[] args){
  if (cmd.getName().equalsIgnoreCase("String_Node_Str")) {
    if (args.length == 0) {
      sender.sendMessage("String_Node_Str");
      sender.sendMessage("String_Node_Str");
      sender.sendMessage("String_Node_Str");
      sender.sendMessage("String_Node_Str");
      return true;
    }
 else     if ((args.length == 1) && args[0].equalsIgnoreCase("String_Node_Str")) {
      sender.sendMessage("String_Node_Str" + plugin.getDescription().getName() + "String_Node_Str"+ plugin.getDescription().getVersion());
      return true;
    }
 else     if ((args.length == 1) && args[0].equalsIgnoreCase("String_Node_Str")) {
      Motd=LittleBrother.Motd;
      port=LittleBrother.port;
      sender.sendMessage("String_Node_Str" + Motd);
      sender.sendMessage("String_Node_Str" + port);
      return true;
    }
 else     if ((args.length == 1) && args[0].equalsIgnoreCase("String_Node_Str")) {
      sender.sendMessage("String_Node_Str");
      sender.sendMessage("String_Node_Str");
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
public boolean onCommand(CommandSender sender,Command cmd,String label,String[] args){
  if (cmd.getName().equalsIgnoreCase("String_Node_Str")) {
    if (args.length == 0) {
      sender.sendMessage("String_Node_Str");
      sender.sendMessage("String_Node_Str");
      sender.sendMessage("String_Node_Str");
      sender.sendMessage("String_Node_Str");
      return true;
    }
 else     if ((args.length == 1) && args[0].equalsIgnoreCase("String_Node_Str")) {
      sender.sendMessage("String_Node_Str" + plugin.getDescription().getName() + "String_Node_Str"+ plugin.getDescription().getVersion());
      return true;
    }
 else     if ((args.length == 1) && args[0].equalsIgnoreCase("String_Node_Str")) {
      Motd=this.plugin.Motd;
      port=this.plugin.port;
      sender.sendMessage("String_Node_Str" + Motd);
      sender.sendMessage("String_Node_Str" + port);
      return true;
    }
 else     if ((args.length == 1) && args[0].equalsIgnoreCase("String_Node_Str")) {
      sender.sendMessage("String_Node_Str");
      sender.sendMessage("String_Node_Str");
      return true;
    }
  }
  return false;
}
Program: 12591
Project: 12591
Buggy source:
public LBCommands(LittleBrother plugin){
  this.plugin=plugin;
}

Fixed version (ground truth):
public LBCommands(LittleBrother plugin){
  this.plugin=plugin;
  this.config=this.plugin.config;
}
Program: 12592
Project: 12592
Buggy source:
public void onEnable(){
  this.thread=new ServerThread(getLogger());
  this.config=new ConfigAccessor(this,"String_Node_Str");
  this.config.saveDefaultConfig();
  getLogger().info("String_Node_Str");
  Motd=this.getConfig().getString("String_Node_Str");
  port=this.getConfig().getInt("String_Node_Str");
  getLogger().info("String_Node_Str" + Motd);
  getLogger().info("String_Node_Str" + port);
  this.getCommand("String_Node_Str").setExecutor(new LBCommands(this));
}

Fixed version (ground truth):
public void onEnable(){
  this.thread=new ServerThread(this,getLogger());
  this.config=new ConfigAccessor(this,"String_Node_Str");
  this.config.saveDefaultConfig();
  getLogger().info("String_Node_Str");
  Motd=this.getConfig().getString("String_Node_Str");
  port=this.getConfig().getInt("String_Node_Str");
  getLogger().info("String_Node_Str" + Motd);
  getLogger().info("String_Node_Str" + port);
  this.getCommand("String_Node_Str").setExecutor(new LBCommands(this));
}
Program: 12593
Project: 12593
Buggy source:
public ServerThread(Logger logger){
  this.logger=logger;
  Motd=LittleBrother.Motd;
  port=LittleBrother.port;
  this.start();
}

Fixed version (ground truth):
public ServerThread(LittleBrother plugin,Logger logger){
  this.plugin=plugin;
  this.logger=logger;
  Motd=plugin.Motd;
  port=plugin.port;
  this.start();
}
Program: 12594
Project: 12594
Buggy source:
@Override public void findAllByName(Iterable<String> names,final Predicate<Profile> consumer) throws IOException, InterruptedException {
  final List<String> missing=new ArrayList<String>();
  Predicate<Profile> forwardingConsumer=new Predicate<Profile>(){
    @Override public boolean apply(    Profile profile){
      missing.remove(profile.getName().toLowerCase());
      return consumer.apply(profile);
    }
  }
;
  for (  String name : names) {
    missing.add(name.toLowerCase());
  }
  for (  ProfileService service : services) {
    service.findAllByName(missing,forwardingConsumer);
    if (missing.isEmpty()) {
      break;
    }
  }
}

Fixed version (ground truth):
@Override public void findAllByName(Iterable<String> names,final Predicate<Profile> consumer) throws IOException, InterruptedException {
  final List<String> missing=Collections.synchronizedList(new ArrayList<String>());
  Predicate<Profile> forwardingConsumer=new Predicate<Profile>(){
    @Override public boolean apply(    Profile profile){
      missing.remove(profile.getName().toLowerCase());
      return consumer.apply(profile);
    }
  }
;
  for (  String name : names) {
    missing.add(name.toLowerCase());
  }
  for (  ProfileService service : services) {
    service.findAllByName(new ArrayList<String>(missing),forwardingConsumer);
    if (missing.isEmpty()) {
      break;
    }
  }
}
Program: 12595
Project: 12595
Buggy source:
public void streamCompleted(ElementReaderEvent event){
  for (  Class_ c : classList) {
    org.modeldriven.fuml.repository.Class_ clss=null;
    if (!(c instanceof Stereotype)) {
      clss=new org.modeldriven.fuml.repository.model.Class_(c,this.artifact);
    }
 else {
      clss=new org.modeldriven.fuml.repository.model.Stereotype((Stereotype)c,this.artifact);
    }
    Repository.INSTANCE.loadClass(clss);
  }
}

Fixed version (ground truth):
public void streamCompleted(ElementReaderEvent event){
  for (  org.modeldriven.fuml.repository.Class_ c : classList) {
    Repository.INSTANCE.loadClass(c);
  }
}
Program: 12597
Project: 12597
Buggy source:
public void mapPackageMerge(Package pkg,String sourcePackageXmiId);

Fixed version (ground truth):
public void mapPackageMerge(fUML.Syntax.Classes.Kernel.Package pkg,String sourcePackageXmiId);
Program: 12598
Project: 12598
Buggy source:
public void mapDataType(DataType t,String currentPackageName,RepositoryArtifact artifact);

Fixed version (ground truth):
public DataType mapDataType(fUML.Syntax.Classes.Kernel.DataType t,String currentPackageName,RepositoryArtifact artifact);
Program: 12599
Project: 12599
Buggy source:
public void mapClass(Class_ clss,String currentPackageName,RepositoryArtifact artifact);

Fixed version (ground truth):
public Class_ mapClass(fUML.Syntax.Classes.Kernel.Class_ clss,String currentPackageName,RepositoryArtifact artifact);
Program: 12600
Project: 12600
Buggy source:
public void mapPrimitiveType(PrimitiveType type,String currentPackageName,RepositoryArtifact artifact);

Fixed version (ground truth):
public Classifier mapPrimitiveType(fUML.Syntax.Classes.Kernel.PrimitiveType type,String currentPackageName,RepositoryArtifact artifact);
Program: 12601
Project: 12601
Buggy source:
public void mapElementByName(NamedElement element,RepositoryArtifact artifact);

Fixed version (ground truth):
public NamedElement mapElementByName(fUML.Syntax.Classes.Kernel.NamedElement element,RepositoryArtifact artifact);
Program: 12602
Project: 12602
Buggy source:
public void mapElementById(Element element,RepositoryArtifact artifact);

Fixed version (ground truth):
public Element mapElementById(fUML.Syntax.Classes.Kernel.Element element,RepositoryArtifact artifact);
Program: 12603
Project: 12603
Buggy source:
public void mapStereotype(Stereotype stereotype,String currentPackageName,RepositoryArtifact artifact);

Fixed version (ground truth):
public Stereotype mapStereotype(org.modeldriven.fuml.repository.ext.Stereotype stereotype,String currentPackageName,RepositoryArtifact artifact);
Program: 12604
Project: 12604
Buggy source:
public void mapClassifier(Classifier classifier,String currentPackageName,RepositoryArtifact artifact);

Fixed version (ground truth):
public Classifier mapClassifier(fUML.Syntax.Classes.Kernel.Classifier classifier,String currentPackageName,RepositoryArtifact artifact);
Program: 12605
Project: 12605
Buggy source:
public void mapEnumerationExternal(Enumeration e,String currentPackageName,RepositoryArtifact artifact);

Fixed version (ground truth):
public Enumeration mapEnumerationExternal(fUML.Syntax.Classes.Kernel.Enumeration e,String currentPackageName,RepositoryArtifact artifact);
Program: 12606
Project: 12606
Buggy source:
public void mapEnumerationLiteral(EnumerationLiteral literal,String currentPackageName,RepositoryArtifact artifact);

Fixed version (ground truth):
public EnumerationLiteral mapEnumerationLiteral(fUML.Syntax.Classes.Kernel.EnumerationLiteral literal,String currentPackageName,RepositoryArtifact artifact);
Program: 12607
Project: 12607
Buggy source:
public void mapEnumeration(Enumeration e,String currentPackageName,RepositoryArtifact artifact);

Fixed version (ground truth):
public Enumeration mapEnumeration(fUML.Syntax.Classes.Kernel.Enumeration e,String currentPackageName,RepositoryArtifact artifact);
Program: 12608
Project: 12608
Buggy source:
public void mapAssociation(Association assoc,String currentPackageName,RepositoryArtifact artifact);

Fixed version (ground truth):
public Association mapAssociation(fUML.Syntax.Classes.Kernel.Association assoc,String currentPackageName,RepositoryArtifact artifact);
Program: 12609
Project: 12609
Buggy source:
public void mapProperty(Classifier clss,Property proprty,RepositoryArtifact artifact);

Fixed version (ground truth):
public Property mapProperty(fUML.Syntax.Classes.Kernel.Classifier clss,fUML.Syntax.Classes.Kernel.Property proprty,RepositoryArtifact artifact);
Program: 12610
Project: 12610
Buggy source:
public void mapPackage(Package pkg,String currentPackageName,RepositoryArtifact artifact);

Fixed version (ground truth):
public Package mapPackage(fUML.Syntax.Classes.Kernel.Package pkg,String currentPackageName,RepositoryArtifact artifact);
Program: 12611
Project: 12611
Buggy source:
public Cookie(){
  cookiePtr=createCookie();
  if (cookiePtr == 0)   throw new OutOfMemoryError();
}

Fixed version (ground truth):
public Cookie(){
  cookiePtr=createCookie();
  if (cookiePtr == 0)   throw new RuntimeException("String_Node_Str");
}
Program: 12612
Project: 12612
Buggy source:
/** 
 * Registers the splash recipes for the given holywater bottle tier stack. Should only be used once and after the item has been registed
 * @param item The item
 * @param tier The tier
 */
@Deprecated public static void registerSplashRecipes(ItemHolyWaterBottle item,TIER tier){
  ItemStack base=item.setTier(new ItemStack(item),tier);
  Ingredient bottle=new IngredientNBT(base);
  Ingredient g=Ingredient.fromItem(Items.GUNPOWDER);
  ItemStack splash=item.setSplash(base.copy(),true);
  GameRegistry.addShapelessRecipe(new ResourceLocation("String_Node_Str" + tier + "String_Node_Str"),null,splash.copy(),bottle,g);
  ItemStackUtil.grow(splash,1);
  GameRegistry.addShapelessRecipe(new ResourceLocation("String_Node_Str" + tier + "String_Node_Str"),null,splash.copy(),bottle,bottle,g);
  ItemStackUtil.grow(splash,1);
  GameRegistry.addShapelessRecipe(new ResourceLocation("String_Node_Str" + tier + "String_Node_Str"),null,splash.copy(),bottle,bottle,bottle,g);
  ItemStackUtil.grow(splash,1);
  GameRegistry.addShapelessRecipe(new ResourceLocation("String_Node_Str" + tier + "String_Node_Str"),null,splash.copy(),bottle,bottle,bottle,bottle,g);
  ItemStackUtil.grow(splash,1);
  GameRegistry.addShapelessRecipe(new ResourceLocation("String_Node_Str" + tier + "String_Node_Str"),null,splash.copy(),bottle,bottle,bottle,bottle,bottle,g);
}

Fixed version (ground truth):
/** 
 * Registers the splash recipes for the given holy water bottle tier stack. Should only be used once and after the item has been registered
 * @param item The item
 * @param tier The tier
 */
@Deprecated public static void registerSplashRecipes(ItemHolyWaterBottle item,TIER tier){
  ItemStack base=item.setTier(new ItemStack(item),tier);
  Ingredient bottle=new IngredientNBT(base);
  Ingredient g=Ingredient.fromItem(Items.GUNPOWDER);
  ItemStack splash=item.setSplash(base.copy(),true);
  GameRegistry.addShapedRecipe(new ResourceLocation("String_Node_Str" + tier + "String_Node_Str"),null,splash.copy(),"String_Node_Str",'X',bottle,'Y',g);
  ItemStackUtil.grow(splash,1);
  GameRegistry.addShapedRecipe(new ResourceLocation("String_Node_Str" + tier + "String_Node_Str"),null,splash.copy(),"String_Node_Str",'X',bottle,'Y',g);
  ItemStackUtil.grow(splash,1);
  GameRegistry.addShapedRecipe(new ResourceLocation("String_Node_Str" + tier + "String_Node_Str"),null,splash.copy(),"String_Node_Str","String_Node_Str",'X',bottle,'Y',g);
  ItemStackUtil.grow(splash,1);
  GameRegistry.addShapedRecipe(new ResourceLocation("String_Node_Str" + tier + "String_Node_Str"),null,splash.copy(),"String_Node_Str","String_Node_Str",'X',bottle,'Y',g);
  ItemStackUtil.grow(splash,1);
  GameRegistry.addShapedRecipe(new ResourceLocation("String_Node_Str" + tier + "String_Node_Str"),null,splash.copy(),"String_Node_Str","String_Node_Str",'X',bottle,'Y',g);
}
Program: 12613
Project: 12613
Buggy source:
@Nonnull @Override public ActionResult<ItemStack> onItemRightClick(World worldIn,EntityPlayer playerIn,EnumHand handIn){
  ItemStack stack=playerIn.getHeldItem(handIn);
  if (isSplash(stack)) {
    if (!playerIn.capabilities.isCreativeMode) {
      ItemStackUtil.decr(stack);
    }
    worldIn.playSound(null,playerIn.posX,playerIn.posY,playerIn.posZ,SoundEvents.ENTITY_SPLASH_POTION_THROW,SoundCategory.NEUTRAL,0.5F,0.4F / (itemRand.nextFloat() * 0.4F + 0.8F));
    if (!worldIn.isRemote) {
      EntityThrowableItem entityThrowable=new EntityThrowableItem(worldIn,playerIn);
      entityThrowable.setItem(stack);
      entityThrowable.shoot(playerIn,playerIn.rotationPitch,playerIn.rotationYaw,-20.0F,0.5F,1.0F);
      worldIn.spawnEntity(entityThrowable);
    }
    playerIn.addStat(StatList.getObjectUseStats(this));
    return new ActionResult<>(EnumActionResult.SUCCESS,stack);
  }
  return new ActionResult<>(EnumActionResult.PASS,stack);
}

Fixed version (ground truth):
@Nonnull @Override public ActionResult<ItemStack> onItemRightClick(World worldIn,EntityPlayer playerIn,EnumHand handIn){
  ItemStack stack=playerIn.getHeldItem(handIn);
  if (isSplash(stack)) {
    worldIn.playSound(null,playerIn.posX,playerIn.posY,playerIn.posZ,SoundEvents.ENTITY_SPLASH_POTION_THROW,SoundCategory.NEUTRAL,0.5F,0.4F / (itemRand.nextFloat() * 0.4F + 0.8F));
    if (!worldIn.isRemote) {
      EntityThrowableItem entityThrowable=new EntityThrowableItem(worldIn,playerIn);
      ItemStack throwStack=stack.copy();
      throwStack.setCount(1);
      entityThrowable.setItem(throwStack);
      entityThrowable.shoot(playerIn,playerIn.rotationPitch,playerIn.rotationYaw,-20.0F,0.5F,1.0F);
      worldIn.spawnEntity(entityThrowable);
    }
    playerIn.addStat(StatList.getObjectUseStats(this));
    if (!playerIn.capabilities.isCreativeMode) {
      ItemStackUtil.decr(stack);
    }
    return new ActionResult<>(EnumActionResult.SUCCESS,stack);
  }
  return new ActionResult<>(EnumActionResult.PASS,stack);
}
Program: 12615
Project: 12615
Buggy source:
NBTTagCompound writeFullUpdate(NBTTagCompound nbt){
  nbt=writeUpdate(nbt);
  nbt.setInteger("String_Node_Str",maxBlood);
  return nbt;
}

Fixed version (ground truth):
NBTTagCompound writeFullUpdate(NBTTagCompound nbt){
  writeUpdate(nbt);
  nbt.setInteger("String_Node_Str",maxBlood);
  return nbt;
}
Program: 12616
Project: 12616
Buggy source:
@Override public void onContainerClosed(EntityPlayer playerIn){
  super.onContainerClosed(playerIn);
  if (!playerIn.getEntityWorld().isRemote) {
    for (int i=0; i < 1; ++i) {
      ItemStack itemstack=this.tile.removeStackFromSlot(i);
      if (!ItemStackUtil.isEmpty(itemstack)) {
        playerIn.dropItem(itemstack,false);
      }
    }
  }
}

Fixed version (ground truth):
@Override public void onContainerClosed(EntityPlayer playerIn){
  super.onContainerClosed(playerIn);
  if (!playerIn.getEntityWorld().isRemote) {
    for (int i=0; i < this.tile.getSizeInventory(); ++i) {
      ItemStack itemstack=this.tile.removeStackFromSlot(i);
      if (!ItemStackUtil.isEmpty(itemstack)) {
        playerIn.dropItem(itemstack,false);
      }
    }
  }
}
Program: 12617
Project: 12617
Buggy source:
public void onContainerClosed(EntityPlayer playerIn){
  super.onContainerClosed(playerIn);
  if (!playerIn.getEntityWorld().isRemote) {
    for (int i=0; i < 4; ++i) {
      ItemStack itemstack=this.inventory.removeStackFromSlot(i);
      if (!ItemStackUtil.isEmpty(itemstack)) {
        playerIn.dropItem(itemstack,false);
      }
    }
  }
}

Fixed version (ground truth):
public void onContainerClosed(EntityPlayer playerIn){
  super.onContainerClosed(playerIn);
  if (!playerIn.getEntityWorld().isRemote) {
    for (int i=0; i < this.inventory.getSizeInventory(); ++i) {
      ItemStack itemstack=this.inventory.removeStackFromSlot(i);
      if (!ItemStackUtil.isEmpty(itemstack)) {
        playerIn.dropItem(itemstack,false);
      }
    }
  }
}
Program: 12618
Project: 12618
Buggy source:
@Override public void onContainerClosed(EntityPlayer playerIn){
  super.onContainerClosed(playerIn);
  if (!playerIn.getEntityWorld().isRemote) {
    for (int i=0; i < 3; ++i) {
      ItemStack itemstack=this.tile.removeStackFromSlot(i);
      if (!ItemStackUtil.isEmpty(itemstack)) {
        playerIn.dropItem(itemstack,false);
      }
    }
  }
}

Fixed version (ground truth):
@Override public void onContainerClosed(EntityPlayer playerIn){
  super.onContainerClosed(playerIn);
  if (!playerIn.getEntityWorld().isRemote) {
    for (int i=0; i < tile.getSizeInventory(); ++i) {
      ItemStack itemstack=this.tile.removeStackFromSlot(i);
      if (!ItemStackUtil.isEmpty(itemstack)) {
        playerIn.dropItem(itemstack,false);
      }
    }
  }
}
Program: 12619
Project: 12619
Buggy source:
public void onContainerClosed(EntityPlayer playerIn){
  super.onContainerClosed(playerIn);
  if (!this.world.isRemote) {
    for (int i=0; i < 9; ++i) {
      ItemStack itemstack=this.craftMatrix.removeStackFromSlot(i);
      if (!ItemStackUtil.isEmpty(itemstack)) {
        playerIn.dropItem(itemstack,false);
      }
    }
  }
}

Fixed version (ground truth):
public void onContainerClosed(EntityPlayer playerIn){
  super.onContainerClosed(playerIn);
  if (!this.world.isRemote) {
    for (int i=0; i < this.craftMatrix.getSizeInventory(); ++i) {
      ItemStack itemstack=this.craftMatrix.removeStackFromSlot(i);
      if (!ItemStackUtil.isEmpty(itemstack)) {
        playerIn.dropItem(itemstack,false);
      }
    }
  }
}
Program: 12620
Project: 12620
Buggy source:
@Override public ItemStack transferStackInSlot(EntityPlayer player,int slot){
  ItemStack stack=ItemStackUtil.getEmptyStack();
  net.minecraft.inventory.Slot slotObject=inventorySlots.get(slot);
  ItemStack stackInSlot;
  if (slotObject != null && !ItemStackUtil.isEmpty(stackInSlot=slotObject.getStack())) {
    stack=stackInSlot.copy();
    if (slot < tile.getSlots().length) {
      if (!this.mergeItemStack(stackInSlot,tile.getSlots().length,tile.getSlots().length + 36,true)) {
        return null;
      }
    }
 else     if (!this.mergeItemStack(stackInSlot,0,tile.getSlots().length,false)) {
      return null;
    }
    if (ItemStackUtil.getCount(stack) == 0) {
      slotObject.putStack(ItemStackUtil.getEmptyStack());
    }
 else {
      slotObject.onSlotChanged();
    }
    if (ItemStackUtil.getCount(stackInSlot) == ItemStackUtil.getCount(stack)) {
      return ItemStackUtil.getEmptyStack();
    }
    slotObject.onTake(player,stackInSlot);
  }
  return stack;
}

Fixed version (ground truth):
@Nonnull @Override public ItemStack transferStackInSlot(EntityPlayer player,int slot){
  ItemStack stack=ItemStackUtil.getEmptyStack();
  net.minecraft.inventory.Slot slotObject=inventorySlots.get(slot);
  ItemStack stackInSlot;
  if (slotObject != null && !ItemStackUtil.isEmpty(stackInSlot=slotObject.getStack())) {
    stack=stackInSlot.copy();
    if (slot < tile.getSlots().length) {
      if (!this.mergeItemStack(stackInSlot,tile.getSlots().length,tile.getSlots().length + 36,true)) {
        return ItemStackUtil.getEmptyStack();
      }
    }
 else     if (!this.mergeItemStack(stackInSlot,0,tile.getSlots().length,false)) {
      return ItemStackUtil.getEmptyStack();
    }
    if (ItemStackUtil.getCount(stack) == 0) {
      slotObject.putStack(ItemStackUtil.getEmptyStack());
    }
 else {
      slotObject.onSlotChanged();
    }
    if (ItemStackUtil.getCount(stackInSlot) == ItemStackUtil.getCount(stack)) {
      return ItemStackUtil.getEmptyStack();
    }
    slotObject.onTake(player,stackInSlot);
  }
  return stack;
}
Program: 12621
Project: 12621
Buggy source:
@Nullable public ItemStack transferStackInSlot(EntityPlayer playerIn,int index){
  ItemStack itemstack=ItemStackUtil.getEmptyStack();
  Slot slot=this.inventorySlots.get(index);
  if (slot != null && slot.getHasStack()) {
    ItemStack itemstack1=slot.getStack();
    itemstack=itemstack1.copy();
    if (index >= 0 && index < 4) {
      if (!this.mergeItemStack(itemstack1,3,39,true)) {
        return null;
      }
    }
 else     if (index >= 3 && index < 30) {
      if (!this.mergeItemStack(itemstack1,30,39,false)) {
        return null;
      }
    }
 else     if (index >= 30 && index < 39) {
      if (!this.mergeItemStack(itemstack1,3,30,false)) {
        return null;
      }
    }
 else     if (!this.mergeItemStack(itemstack1,3,39,false)) {
      return null;
    }
    if (ItemStackUtil.isEmpty(itemstack1)) {
      slot.putStack(ItemStackUtil.getEmptyStack());
    }
 else {
      slot.onSlotChanged();
    }
    if (ItemStackUtil.getCount(itemstack) == ItemStackUtil.getCount(itemstack1)) {
      return ItemStackUtil.getEmptyStack();
    }
    slot.onTake(playerIn,itemstack1);
  }
  return itemstack;
}

Fixed version (ground truth):
@Nonnull public ItemStack transferStackInSlot(EntityPlayer playerIn,int index){
  ItemStack itemstack=ItemStackUtil.getEmptyStack();
  Slot slot=this.inventorySlots.get(index);
  if (slot != null && slot.getHasStack()) {
    ItemStack itemstack1=slot.getStack();
    itemstack=itemstack1.copy();
    if (index >= 0 && index < 4) {
      if (!this.mergeItemStack(itemstack1,3,39,true)) {
        return ItemStackUtil.getEmptyStack();
      }
    }
 else     if (index >= 3 && index < 30) {
      if (!this.mergeItemStack(itemstack1,30,39,false)) {
        return ItemStackUtil.getEmptyStack();
      }
    }
 else     if (index >= 30 && index < 39) {
      if (!this.mergeItemStack(itemstack1,3,30,false)) {
        return ItemStackUtil.getEmptyStack();
      }
    }
 else     if (!this.mergeItemStack(itemstack1,3,39,false)) {
      return ItemStackUtil.getEmptyStack();
    }
    if (ItemStackUtil.isEmpty(itemstack1)) {
      slot.putStack(ItemStackUtil.getEmptyStack());
    }
 else {
      slot.onSlotChanged();
    }
    if (ItemStackUtil.getCount(itemstack) == ItemStackUtil.getCount(itemstack1)) {
      return ItemStackUtil.getEmptyStack();
    }
    slot.onTake(playerIn,itemstack1);
  }
  return itemstack;
}
Program: 12622
Project: 12622
Buggy source:
@Nullable public ItemStack transferStackInSlot(EntityPlayer playerIn,int index){
  ItemStack itemstack=ItemStackUtil.getEmptyStack();
  Slot slot=this.inventorySlots.get(index);
  if (slot != null && slot.getHasStack()) {
    ItemStack itemstack1=slot.getStack();
    itemstack=itemstack1.copy();
    if (index == 0) {
      if (!this.mergeItemStack(itemstack1,17,53,true)) {
        return null;
      }
      slot.onSlotChange(itemstack1,itemstack);
    }
 else     if (index >= 17 && index < 44) {
      if (!this.mergeItemStack(itemstack1,44,53,false)) {
        return null;
      }
    }
 else     if (index >= 44 && index < 53) {
      if (!this.mergeItemStack(itemstack1,17,44,false)) {
        return null;
      }
    }
 else     if (!this.mergeItemStack(itemstack1,17,53,false)) {
      return null;
    }
    if (ItemStackUtil.isEmpty(itemstack)) {
      slot.putStack(ItemStackUtil.getEmptyStack());
    }
 else {
      slot.onSlotChanged();
    }
    if (ItemStackUtil.getCount(itemstack) == ItemStackUtil.getCount(itemstack1)) {
      return ItemStackUtil.getEmptyStack();
    }
    slot.onTake(playerIn,itemstack1);
  }
  return itemstack;
}

Fixed version (ground truth):
@Nonnull public ItemStack transferStackInSlot(EntityPlayer playerIn,int index){
  ItemStack itemstack=ItemStackUtil.getEmptyStack();
  Slot slot=this.inventorySlots.get(index);
  if (slot != null && slot.getHasStack()) {
    ItemStack itemstack1=slot.getStack();
    itemstack=itemstack1.copy();
    if (index == 0) {
      if (!this.mergeItemStack(itemstack1,17,53,true)) {
        return ItemStackUtil.getEmptyStack();
      }
      slot.onSlotChange(itemstack1,itemstack);
    }
 else     if (index >= 17 && index < 44) {
      if (!this.mergeItemStack(itemstack1,44,53,false)) {
        return ItemStackUtil.getEmptyStack();
      }
    }
 else     if (index >= 44 && index < 53) {
      if (!this.mergeItemStack(itemstack1,17,44,false)) {
        return ItemStackUtil.getEmptyStack();
      }
    }
 else     if (!this.mergeItemStack(itemstack1,17,53,false)) {
      return ItemStackUtil.getEmptyStack();
    }
    if (ItemStackUtil.isEmpty(itemstack)) {
      slot.putStack(ItemStackUtil.getEmptyStack());
    }
 else {
      slot.onSlotChanged();
    }
    if (ItemStackUtil.getCount(itemstack) == ItemStackUtil.getCount(itemstack1)) {
      return ItemStackUtil.getEmptyStack();
    }
    slot.onTake(playerIn,itemstack1);
  }
  return itemstack;
}
Program: 12624
Project: 12624
Buggy source:
/** 
 * Checks if the given stack has a   {@link CapabilityFluidHandler#FLUID_HANDLER_CAPABILITY} and contains the required fluid, if so it returns the required Fluid Stack otherwise null.
 * @param stack may be EMPTY
 * @return If nonnull the ItemStack has a {@link CapabilityFluidHandler#FLUID_HANDLER_CAPABILITY} and contains the required (and returned) fluid.
 */
@Nullable FluidStack isValidFluidItem(@Nonnull ItemStack stack);

Fixed version (ground truth):
/** 
 * Checks if the given stack has a   {@link CapabilityFluidHandler#FLUID_HANDLER_ITEM_CAPABILITY} and contains the required fluid, if so it returns the required Fluid Stack otherwise null.
 * @param stack may be EMPTY
 * @return If nonnull the ItemStack has a {@link CapabilityFluidHandler#FLUID_HANDLER_ITEM_CAPABILITY} and contains the required (and returned) fluid.
 */
@Nullable FluidStack isValidFluidItem(@Nonnull ItemStack stack);
Program: 12625
Project: 12625
Buggy source:
/** 
 * Used for items without   {@link CapabilityFluidHandler#FLUID_HANDLER_CAPABILITY}
 * @param stack may be EMPTY
 * @return If the given stack contains the required 'liquid' item stack
 */
boolean isValidLiquidItem(@Nonnull ItemStack stack);

Fixed version (ground truth):
/** 
 * Used for items without   {@link CapabilityFluidHandler#FLUID_HANDLER_ITEM_CAPABILITY}
 * @param stack may be EMPTY
 * @return If the given stack contains the required 'liquid' item stack
 */
boolean isValidLiquidItem(@Nonnull ItemStack stack);
Program: 12626
Project: 12626
Buggy source:
@Override public boolean onBlockActivated(World worldIn,BlockPos pos,IBlockState state,EntityPlayer playerIn,EnumHand hand,EnumFacing facing,float hitX,float hitY,float hitZ){
  ItemStack stack=playerIn.getHeldItem(hand);
  if (!ItemStackUtil.isEmpty(stack) && !worldIn.isRemote) {
    if (stack.hasCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY,null)) {
      TileAltarInspiration tileEntity=(TileAltarInspiration)worldIn.getTileEntity(pos);
      if (!playerIn.isSneaking()) {
        FluidActionResult result=FluidUtil.tryEmptyContainer(stack,tileEntity.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY,null),Integer.MAX_VALUE,playerIn,true);
        if (result.isSuccess()) {
          playerIn.setHeldItem(hand,result.getResult());
        }
      }
      worldIn.notifyBlockUpdate(pos,state,state,3);
      tileEntity.markDirty();
      return true;
    }
  }
  if (ItemStackUtil.isEmpty(stack)) {
    TileAltarInspiration tileEntity=(TileAltarInspiration)worldIn.getTileEntity(pos);
    tileEntity.startRitual(playerIn);
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean onBlockActivated(World worldIn,BlockPos pos,IBlockState state,EntityPlayer playerIn,EnumHand hand,EnumFacing facing,float hitX,float hitY,float hitZ){
  ItemStack stack=playerIn.getHeldItem(hand);
  if (!ItemStackUtil.isEmpty(stack) && !worldIn.isRemote) {
    if (FluidLib.hasFluidItemCap(stack)) {
      TileAltarInspiration tileEntity=(TileAltarInspiration)worldIn.getTileEntity(pos);
      if (!playerIn.isSneaking()) {
        FluidActionResult result=FluidUtil.tryEmptyContainer(stack,tileEntity.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY,null),Integer.MAX_VALUE,playerIn,true);
        if (result.isSuccess()) {
          playerIn.setHeldItem(hand,result.getResult());
        }
      }
      worldIn.notifyBlockUpdate(pos,state,state,3);
      tileEntity.markDirty();
      return true;
    }
  }
  if (ItemStackUtil.isEmpty(stack)) {
    TileAltarInspiration tileEntity=(TileAltarInspiration)worldIn.getTileEntity(pos);
    tileEntity.startRitual(playerIn);
  }
  return true;
}