nus-yam/ex-repair huggingface dataset:
Program: 34181
Project: 34181
Buggy source:
@Override public void setValueAt(Object aValue,int rowIndex,int columnIndex){
  int rowCount=getRowCount();
  if (rowIndex == rowCount - 1) {
    if (columnIndex == 0) {
      tempKey=(String)aValue;
    }
 else     if (columnIndex == 1) {
      tempValue=(String)aValue;
    }
  }
 else {
    if (columnIndex == 0) {
      String key=(String)aValue;
      if (key.contains("String_Node_Str")) {
        key=key.replace("String_Node_Str","String_Node_Str");
      }
      PdfName oldName=keys.get(rowIndex);
      PdfName newName=new PdfName(key);
      keys.set(rowIndex,newName);
      PdfObject pdfObject=dictionary.get(oldName);
      dictionary.remove(oldName);
      dictionary.put(newName,pdfObject);
    }
 else {
    }
  }
}

Fixed version (ground truth):
@Override public void setValueAt(Object aValue,int rowIndex,int columnIndex){
  int rowCount=getRowCount();
  if (rowIndex == rowCount - 1) {
    if (columnIndex == 0) {
      tempKey=(String)aValue;
    }
 else     if (columnIndex == 1) {
      tempValue=(String)aValue;
    }
  }
 else {
    if (columnIndex == 0) {
      String key=(String)aValue;
      if (key.contains("String_Node_Str")) {
        key=key.replace("String_Node_Str","String_Node_Str");
      }
      PdfName oldName=keys.get(rowIndex);
      PdfName newName=new PdfName(key);
      keys.set(rowIndex,newName);
      PdfObject pdfObject=dictionary.get(oldName);
      dictionary.remove(oldName);
      dictionary.put(newName,pdfObject);
    }
 else {
      String value=(String)aValue;
      PdfObject pdfObject=dictionary.get(keys.get(rowIndex));
      if (pdfObject instanceof PdfArray) {
        value=value.replaceAll("String_Node_Str","String_Node_Str");
      }
      dictionary.put(keys.get(rowIndex),new PdfLiteral(value));
    }
  }
}
Program: 34182
Project: 34182
Buggy source:
/** 
 * Does the actual reading of the file into PdfReader and PDFFile.
 * @param pdf	a Random Access File or Array
 * @throws IOException
 * @throws DocumentException
 */
protected void readFile(RandomAccessFileOrArray pdf) throws IOException, DocumentException {
  permissions=new Permissions();
  try {
    reader=new PdfReader(pdf,null);
    permissions.setEncrypted(false);
  }
 catch (  BadPasswordException bpe) {
    JPasswordField passwordField=new JPasswordField(32);
    JOptionPane.showConfirmDialog(null,passwordField,"String_Node_Str",JOptionPane.OK_CANCEL_OPTION);
    byte[] password=new String(passwordField.getPassword()).getBytes();
    reader=new PdfReader(pdf,password);
    permissions.setEncrypted(true);
    permissions.setCryptoMode(reader.getCryptoMode());
    permissions.setPermissions(reader.getPermissions());
    if (reader.isOpenedWithFullPermissions()) {
      permissions.setOwnerPassword(password);
      permissions.setUserPassword(reader.computeUserPassword());
    }
 else {
      throw new IOException("String_Node_Str");
    }
  }
}

Fixed version (ground truth):
/** 
 * Does the actual reading of the file into PdfReader and PDFFile.
 * @param pdf	a Random Access File or Array
 * @throws IOException
 * @throws DocumentException
 */
protected void readFile(RandomAccessSource ras) throws IOException, DocumentException {
  permissions=new Permissions();
  try {
    reader=new PdfReader(ras);
    permissions.setEncrypted(false);
  }
 catch (  BadPasswordException bpe) {
    JPasswordField passwordField=new JPasswordField(32);
    JOptionPane.showConfirmDialog(null,passwordField,"String_Node_Str",JOptionPane.OK_CANCEL_OPTION);
    byte[] password=new String(passwordField.getPassword()).getBytes();
    reader=new PdfReader(ras,true,password);
    permissions.setEncrypted(true);
    permissions.setCryptoMode(reader.getCryptoMode());
    permissions.setPermissions(reader.getPermissions());
    if (reader.isOpenedWithFullPermissions()) {
      permissions.setOwnerPassword(password);
      permissions.setUserPassword(reader.computeUserPassword());
    }
 else {
      throw new IOException("String_Node_Str");
    }
  }
}
Program: 34183
Project: 34183
Buggy source:
/** 
 * Constructs a PdfFile object.
 * @param file	the byte[] to read
 * @throws IOException 
 * @throws DocumentException 
 */
public PdfFile(byte[] file) throws IOException, DocumentException {
  RandomAccessFileOrArray pdf=new RandomAccessFileOrArray(file);
  readFile(pdf);
}

Fixed version (ground truth):
/** 
 * Constructs a PdfFile object.
 * @param file	the byte[] to read
 * @throws IOException 
 * @throws DocumentException 
 */
public PdfFile(byte[] file) throws IOException, DocumentException {
  RandomAccessSourceFactory rasf=new RandomAccessSourceFactory();
  RandomAccessSource ras=rasf.createSource(file);
  readFile(ras);
}
Program: 34184
Project: 34184
Buggy source:
/** 
 * @see java.util.Observer#update(java.util.Observable,java.lang.Object)
 */
@SuppressWarnings("String_Node_Str") public void update(Observable observable,Object obj){
  if (obj == null) {
    list=new ArrayList<PdfPageTreeNode>();
    repaint();
    return;
  }
  if (obj instanceof ObjectLoader) {
    ObjectLoader loader=(ObjectLoader)obj;
    String[] pagelabels=PdfPageLabels.getPageLabels(loader.getReader());
    int i=0;
    TreeNodeFactory factory=loader.getNodes();
    PdfTrailerTreeNode trailer=controller.getPdfTree().getRoot();
    PdfObjectTreeNode catalog=factory.getChildNode(trailer,PdfName.ROOT);
    PdfPagesTreeNode pages=(PdfPagesTreeNode)factory.getChildNode(catalog,PdfName.PAGES);
    if (pages == null) {
      System.out.println("String_Node_Str");
      return;
    }
    Enumeration<PdfObjectTreeNode> p=pages.depthFirstEnumeration();
    PdfObjectTreeNode child;
    StringBuffer buf;
    while (p.hasMoreElements()) {
      child=p.nextElement();
      if (child instanceof PdfPageTreeNode) {
        buf=new StringBuffer("String_Node_Str");
        buf.append(++i);
        if (pagelabels != null) {
          buf.append("String_Node_Str");
          buf.append(pagelabels[i - 1]);
          buf.append("String_Node_Str");
        }
        child.setUserObject(buf.toString());
        list.add((PdfPageTreeNode)child);
      }
    }
  }
  setModel(new JTableAutoModel(this));
}

Fixed version (ground truth):
/** 
 * @see java.util.Observer#update(java.util.Observable,java.lang.Object)
 */
public void update(Observable observable,Object obj){
  if (obj == null) {
    list=new ArrayList<PdfPageTreeNode>();
    repaint();
    return;
  }
  if (obj instanceof ObjectLoader) {
    ObjectLoader loader=(ObjectLoader)obj;
    String[] pagelabels=PdfPageLabels.getPageLabels(loader.getReader());
    int i=0;
    TreeNodeFactory factory=loader.getNodes();
    PdfTrailerTreeNode trailer=controller.getPdfTree().getRoot();
    PdfObjectTreeNode catalog=factory.getChildNode(trailer,PdfName.ROOT);
    Enumeration<PdfPageTreeNode> p=new PageEnumerator((PdfDictionary)catalog.getPdfObject(),factory);
    PdfPageTreeNode child;
    StringBuffer buf;
    while (p.hasMoreElements()) {
      child=p.nextElement();
      buf=new StringBuffer("String_Node_Str");
      buf.append(++i);
      if (pagelabels != null) {
        buf.append("String_Node_Str");
        buf.append(pagelabels[i - 1]);
        buf.append("String_Node_Str");
      }
      child.setUserObject(buf.toString());
      list.add((PdfPageTreeNode)child);
    }
  }
  setModel(new JTableAutoModel(this));
}
Program: 34185
Project: 34185
Buggy source:
/** 
 * Creates a new Console object.
 * @throws IOException
 */
private Console() throws IOException {
  piCustom=new PipedInputStream();
  poCustom=new PipedOutputStream();
  printStream=new PrintStream(poCustom);
  piOut=new PipedInputStream();
  poOut=new PipedOutputStream(piOut);
  System.setOut(new PrintStream(poOut,true));
  piErr=new PipedInputStream();
  poErr=new PipedOutputStream(piErr);
  System.setErr(new PrintStream(poErr,true));
  textArea.setEditable(false);
  new ReadWriteThread(piCustom,ConsoleStyleContext.CUSTOM).start();
  new ReadWriteThread(piOut,ConsoleStyleContext.SYSTEMOUT).start();
  new ReadWriteThread(piErr,ConsoleStyleContext.SYSTEMERR).start();
}

Fixed version (ground truth):
/** 
 * Creates a new Console object.
 * @throws IOException
 */
private Console() throws IOException {
  piCustom=new PipedInputStream();
  poCustom=new PipedOutputStream(piCustom);
  printStream=new PrintStream(poCustom);
  piOut=new PipedInputStream();
  poOut=new PipedOutputStream(piOut);
  System.setOut(new PrintStream(poOut,true));
  piErr=new PipedInputStream();
  poErr=new PipedOutputStream(piErr);
  System.setErr(new PrintStream(poErr,true));
  textArea.setEditable(false);
  new ReadWriteThread(piCustom,ConsoleStyleContext.CUSTOM).start();
  new ReadWriteThread(piOut,ConsoleStyleContext.SYSTEMOUT).start();
  new ReadWriteThread(piErr,ConsoleStyleContext.SYSTEMERR).start();
}
Program: 34186
Project: 34186
Buggy source:
public String getLoaderName(){
  return loaderName;
}

Fixed version (ground truth):
/** 
 * getter for a human readable name representing this loader
 * @return the human readable name
 * @since 5.0.3
 */
public String getLoaderName(){
  return loaderName;
}
Program: 34187
Project: 34187
Buggy source:
/** 
 * Getter for the filename
 * @return the original filename
 */
public String getFilename(){
  return filename;
}

Fixed version (ground truth):
/** 
 * Getter for the filename
 * @return the original filename
 * @sinece 5.0.3
 */
public String getFilename(){
  return filename;
}
Program: 34188
Project: 34188
Buggy source:
/** 
 * Creates AttributePermutations matching the connection and objectName.
 * @param connection The Connection.
 * @param objectName The name of an MBean, which may or may not match the attributes we're supposed to collect forthe connection.
 */
private void createPermutations(final Connection connection,final ObjectName objectName){
  for (  Attribute attribute : attributes) {
    if (connection.getBeanAliases().contains(attribute.getBeanAlias()) && attribute.getObjectName().apply(objectName)) {
      collectablePermutations.addAll(AttributePermutation.create(new ObjectName[]{objectName},connection,attribute));
    }
  }
}

Fixed version (ground truth):
/** 
 * Creates AttributePermutations matching the connection and objectName.
 * @param connection The Connection.
 * @param objectName The name of an MBean, which may or may not match the attributes we're supposed to collect forthe connection.
 */
private void createPermutations(final Connection connection,final ObjectName objectName){
  for (  Attribute attribute : attributes) {
    if (connection.getBeanAliases().contains(attribute.getBeanAlias()) && attribute.getObjectName().apply(objectName)) {
      List<AttributePermutation> permutations=AttributePermutation.create(new ObjectName[]{objectName},connection,attribute);
synchronized (collectablePermutations) {
        collectablePermutations.addAll(permutations);
      }
    }
  }
}
Program: 34189
Project: 34189
Buggy source:
/** 
 * Creates AttributePermutations matching the connection and objectName.
 * @param connection The Connection.
 * @param objectName The name of an MBean, which may or may not match the attributes we're supposed to collect forthe connection.
 */
private void createPermutations(final Connection connection,final ObjectName objectName){
  for (  Attribute attribute : attributes) {
    if (connection.getBeanAliases().contains(attribute.getBeanAlias()) && attribute.getObjectName().apply(objectName)) {
      collectablePermutations.addAll(AttributePermutation.create(new ObjectName[]{objectName},connection,attribute));
    }
  }
}

Fixed version (ground truth):
/** 
 * Creates AttributePermutations matching the connection and objectName.
 * @param connection The Connection.
 * @param objectName The name of an MBean, which may or may not match the attributes we're supposed to collect forthe connection.
 */
private void createPermutations(final Connection connection,final ObjectName objectName){
  for (  Attribute attribute : attributes) {
    if (connection.getBeanAliases().contains(attribute.getBeanAlias()) && attribute.getObjectName().apply(objectName)) {
      List<AttributePermutation> permutations=AttributePermutation.create(new ObjectName[]{objectName},connection,attribute);
synchronized (collectablePermutations) {
        collectablePermutations.addAll(permutations);
      }
    }
  }
}
Program: 34190
Project: 34190
Buggy source:
@Override public boolean equals(final Object obj){
  if (this == obj) {
    return true;
  }
 else   if (obj instanceof Connection) {
    Connection that=(Connection)obj;
    return that.rawUrl.equals(this.rawUrl) && this.username != null ? this.username.equals(that.username) : this.username == that.username && this.password != null ? this.password.equals(that.password) : this.password == that.password && this.hostname != null ? this.hostname.equals(that.hostname) : this.hostname == that.hostname && this.connectionInstancePrefix != null ? this.connectionInstancePrefix.equals(that.connectionInstancePrefix) : this.connectionInstancePrefix == this.connectionInstancePrefix;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean equals(final Object obj){
  if (this == obj) {
    return true;
  }
 else   if (obj instanceof Connection) {
    Connection that=(Connection)obj;
    return this.rawUrl.equals(that.rawUrl) && this.hostname.equals(that.hostname) && (this.username == null ? that.username == null : this.username.equals(that.username))&& (this.password == null ? that.password == null : this.password.equals(that.password))&& (this.connectionInstancePrefix == null ? that.connectionInstancePrefix == null : this.connectionInstancePrefix.equals(that.connectionInstancePrefix))&& this.ttl == that.ttl && this.forceSynchronous == that.forceSynchronous;
  }
  return false;
}
Program: 34191
Project: 34191
Buggy source:
/** 
 * Creates AttributePermutations matching the connection and objectName.
 * @param connection The Connection.
 * @param objectName The name of an MBean, which may or may not match the attributes we're supposed to collect forthe connection.
 */
private void createPermutations(final Connection connection,final ObjectName objectName){
  for (  Attribute attribute : attributes) {
    if (connection.getBeanAliases().contains(attribute.getBeanAlias()) && attribute.getObjectName().apply(objectName)) {
      collectablePermutations.addAll(AttributePermutation.create(new ObjectName[]{objectName},connection,attribute));
    }
  }
}

Fixed version (ground truth):
/** 
 * Creates AttributePermutations matching the connection and objectName.
 * @param connection The Connection.
 * @param objectName The name of an MBean, which may or may not match the attributes we're supposed to collect forthe connection.
 */
private void createPermutations(final Connection connection,final ObjectName objectName){
  for (  Attribute attribute : attributes) {
    if (connection.getBeanAliases().contains(attribute.getBeanAlias()) && attribute.getObjectName().apply(objectName)) {
      List<AttributePermutation> permutations=AttributePermutation.create(new ObjectName[]{objectName},connection,attribute);
synchronized (collectablePermutations) {
        collectablePermutations.addAll(permutations);
      }
    }
  }
}
Program: 34195
Project: 34195
Buggy source:
public ItemMiniFluidDrop(){
  super(1,0.1F,false);
  this.setCreativeTab(CreativeTabCM2.CM2_TAB);
}

Fixed version (ground truth):
public ItemMiniFluidDrop(){
  super(1,0.1F,false);
  this.setAlwaysEdible();
  this.setCreativeTab(CreativeTabCM2.CM2_TAB);
}
Program: 34196
Project: 34196
Buggy source:
@Override public ActionResult<ItemStack> onItemRightClick(ItemStack itemStack,World world,EntityPlayer player,EnumHand hand){
  if (world.isRemote || !(player instanceof EntityPlayerMP)) {
    return super.onItemRightClick(itemStack,world,player,hand);
  }
  RayTraceResult trace=player.rayTrace(4.5d,0.0f);
  if (trace == null || trace.getBlockPos() == null) {
    return super.onItemRightClick(itemStack,world,player,hand);
  }
  TileEntity te=world.getTileEntity(trace.getBlockPos());
  if (te != null && te.hasCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY,trace.sideHit)) {
    IFluidHandler fluidHandler=world.getTileEntity(trace.getBlockPos()).getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY,trace.sideHit);
    if (fluidHandler.fill(new FluidStack(Fluidss.miniaturizationFluid,125),false) == 125) {
      fluidHandler.fill(new FluidStack(Fluidss.miniaturizationFluid,125),true);
      itemStack.stackSize--;
      return new ActionResult(EnumActionResult.SUCCESS,itemStack);
    }
  }
  return super.onItemRightClick(itemStack,world,player,hand);
}

Fixed version (ground truth):
@Override public ActionResult<ItemStack> onItemRightClick(ItemStack itemStack,World world,EntityPlayer player,EnumHand hand){
  if (world.isRemote || !(player instanceof EntityPlayerMP)) {
    return super.onItemRightClick(itemStack,world,player,hand);
  }
  Vec3d eyeVec=new Vec3d(player.posX,player.posY + (double)player.getEyeHeight(),player.posZ);
  Vec3d lookVec=player.getLook(0.0f);
  Vec3d maxVec=eyeVec.addVector(lookVec.xCoord * 4.5d,lookVec.yCoord * 4.5d,lookVec.zCoord * 4.5d);
  RayTraceResult trace=world.rayTraceBlocks(eyeVec,maxVec,false,false,true);
  if (trace == null || trace.getBlockPos() == null) {
    return super.onItemRightClick(itemStack,world,player,hand);
  }
  TileEntity te=world.getTileEntity(trace.getBlockPos());
  if (te != null && te.hasCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY,trace.sideHit)) {
    IFluidHandler fluidHandler=world.getTileEntity(trace.getBlockPos()).getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY,trace.sideHit);
    if (fluidHandler.fill(new FluidStack(Fluidss.miniaturizationFluid,125),false) == 125) {
      fluidHandler.fill(new FluidStack(Fluidss.miniaturizationFluid,125),true);
      itemStack.stackSize--;
      return new ActionResult(EnumActionResult.SUCCESS,itemStack);
    }
  }
  return super.onItemRightClick(itemStack,world,player,hand);
}
Program: 34197
Project: 34197
Buggy source:
@Override protected void onFoodEaten(ItemStack stack,World worldIn,EntityPlayer player){
  super.onFoodEaten(stack,worldIn,player);
  int duration=ConfigurationHandler.PotionSettings.onEatDuration;
  int amplifier=ConfigurationHandler.PotionSettings.onEatAmplifier;
  if (duration > 0) {
    PotionEffect active=player.getActivePotionEffect(Potionss.miniaturizationPotion);
    PotionEffect effect=new PotionEffect(Potionss.miniaturizationPotion,duration,amplifier,false,false);
    if (active != null) {
      active.combine(effect);
    }
 else {
      player.addPotionEffect(effect);
    }
  }
}

Fixed version (ground truth):
@Override protected void onFoodEaten(ItemStack stack,World worldIn,EntityPlayer player){
  super.onFoodEaten(stack,worldIn,player);
  if (worldIn.isRemote) {
    return;
  }
  int duration=ConfigurationHandler.PotionSettings.onEatDuration;
  int amplifier=ConfigurationHandler.PotionSettings.onEatAmplifier;
  if (duration > 0) {
    PotionEffect active=player.getActivePotionEffect(Potionss.miniaturizationPotion);
    PotionEffect effect=new PotionEffect(Potionss.miniaturizationPotion,duration,amplifier,false,false);
    if (active != null) {
      active.combine(effect);
    }
 else {
      player.addPotionEffect(effect);
    }
  }
}
Program: 34198
Project: 34198
Buggy source:
@Override public void updateTick(World world,BlockPos pos,IBlockState state,Random rand){
  BlockPos adjacent[]={pos.add(1,0,0),pos.add(-1,0,0),pos.add(0,0,1),pos.add(0,0,-1),pos.add(1,0,1),pos.add(1,0,-1),pos.add(-1,0,-1),pos.add(-1,0,1)};
  if (isSourceBlock(world,pos)) {
    for (    BlockPos adjPos : adjacent) {
      flowIntoBlock(world,adjPos,4);
    }
  }
 else {
    boolean hasAdjacentSourceBlock=false;
    for (    BlockPos adjPos : adjacent) {
      if (this.isSourceBlock(world,adjPos)) {
        hasAdjacentSourceBlock=true;
        break;
      }
    }
    if (!hasAdjacentSourceBlock && world.getBlockState(pos.up()).getBlock() != this) {
      int quantaRemaining=quantaPerBlock - state.getValue(LEVEL);
      if (quantaRemaining > 0) {
        world.setBlockState(pos,this.getBlockState().getBaseState().withProperty(LEVEL,state.getValue(LEVEL) + 1));
      }
 else       if (quantaRemaining <= 1) {
        world.setBlockToAir(pos);
      }
    }
  }
  if (canDisplace(world,pos.down())) {
    flowIntoBlock(world,pos.down(),1);
    return;
  }
}

Fixed version (ground truth):
@Override public void updateTick(World world,BlockPos pos,IBlockState state,Random rand){
  BlockPos adjacent[]={pos.add(1,0,0),pos.add(-1,0,0),pos.add(0,0,1),pos.add(0,0,-1),pos.add(1,0,1),pos.add(1,0,-1),pos.add(-1,0,-1),pos.add(-1,0,1)};
  if (isSourceBlock(world,pos)) {
    for (    BlockPos adjPos : adjacent) {
      flowIntoBlock(world,adjPos,1);
    }
  }
 else {
    boolean hasAdjacentSourceBlock=false;
    for (    BlockPos adjPos : adjacent) {
      if (this.isSourceBlock(world,adjPos)) {
        hasAdjacentSourceBlock=true;
        break;
      }
    }
    if (!hasAdjacentSourceBlock && world.getBlockState(pos.up()).getBlock() != this) {
      int quantaRemaining=quantaPerBlock - state.getValue(LEVEL);
      if (quantaRemaining > 0) {
        world.setBlockState(pos,this.getBlockState().getBaseState().withProperty(LEVEL,state.getValue(LEVEL) + 1));
        world.notifyNeighborsOfStateChange(pos.down(),this);
      }
 else       if (quantaRemaining <= 0) {
        world.setBlockToAir(pos);
      }
    }
  }
  if (canDisplace(world,pos.down())) {
    flowIntoBlock(world,pos.down(),1);
    return;
  }
}
Program: 34199
Project: 34199
Buggy source:
public BlockMiniaturizationFluid(){
  super(Fluidss.miniaturizationFluid,Material.WATER);
  this.setUnlocalizedName("String_Node_Str");
  this.quantaPerBlock=4;
  this.quantaPerBlockFloat=4F;
}

Fixed version (ground truth):
public BlockMiniaturizationFluid(){
  super(Fluidss.miniaturizationFluid,Material.WATER);
  this.setUnlocalizedName("String_Node_Str");
  this.setQuantaPerBlock(4);
  this.setTickRate(5);
}
Program: 34201
Project: 34201
Buggy source:
@Override public void onBlockPlacedBy(World world,int x,int y,int z,EntityLivingBase player,ItemStack stack){
  super.onBlockPlacedBy(world,x,y,z,player,stack);
  WorldUtils.updateNeighborAEGrids(world,x,y,z);
  if (stack.stackTagCompound == null) {
    return;
  }
  if (!(world.getTileEntity(x,y,z) instanceof TileEntityMachine)) {
    return;
  }
  TileEntityMachine tileEntityMachine=(TileEntityMachine)world.getTileEntity(x,y,z);
  if (tileEntityMachine.coords != -1) {
    return;
  }
  if (stack.stackTagCompound.hasKey("String_Node_Str")) {
    int coords=stack.stackTagCompound.getInteger("String_Node_Str");
    if (coords != -1) {
      tileEntityMachine.coords=coords;
      tileEntityMachine.isUpgraded=true;
    }
  }
  if (stack.hasDisplayName()) {
    tileEntityMachine.setCustomName(stack.getDisplayName());
  }
  tileEntityMachine.markDirty();
}

Fixed version (ground truth):
@Override public void onBlockPlacedBy(World world,int x,int y,int z,EntityLivingBase player,ItemStack stack){
  super.onBlockPlacedBy(world,x,y,z,player,stack);
  if (stack.stackTagCompound == null) {
    return;
  }
  if (!(world.getTileEntity(x,y,z) instanceof TileEntityMachine)) {
    return;
  }
  TileEntityMachine tileEntityMachine=(TileEntityMachine)world.getTileEntity(x,y,z);
  if (tileEntityMachine.coords != -1) {
    return;
  }
  if (stack.stackTagCompound.hasKey("String_Node_Str")) {
    int coords=stack.stackTagCompound.getInteger("String_Node_Str");
    if (coords != -1) {
      tileEntityMachine.coords=coords;
      tileEntityMachine.isUpgraded=true;
    }
  }
  if (stack.hasDisplayName()) {
    tileEntityMachine.setCustomName(stack.getDisplayName());
  }
  tileEntityMachine.markDirty();
}
Program: 34202
Project: 34202
Buggy source:
public IGridNode getMachineNode(CMGridBlock gridBlock){
  if (machineNode == null) {
    machineNode=AEApi.instance().createGridNode(gridBlock);
    machineNode.updateState();
  }
  connectNodes();
  return machineNode;
}

Fixed version (ground truth):
public IGridNode getMachineNode(CMGridBlock gridBlock){
  if (machineNode == null) {
    machineNode=AEApi.instance().createGridNode(gridBlock);
    machineNode.updateState();
    WorldUtils.updateNeighborAEGrids(gridBlock.getLocation().getWorld(),gridBlock.getLocation().x,gridBlock.getLocation().y,gridBlock.getLocation().z);
  }
  connectNodes();
  return machineNode;
}
Program: 34203
Project: 34203
Buggy source:
public boolean isWorldAccessible(){
  return isWorldAccessable();
}

Fixed version (ground truth):
@Override public boolean isWorldAccessible(){
  return isWorldAccessable();
}
Program: 34204
Project: 34204
Buggy source:
@Override public boolean isWorldAccessable(){
  return false;
}

Fixed version (ground truth):
public boolean isWorldAccessable(){
  return false;
}
Program: 34205
Project: 34205
Buggy source:
@Override public void updateEntity(){
  super.updateEntity();
  if (Reference.PR_AVAILABLE) {
    updateIncomingSignals();
  }
  if (Reference.OC_AVAILABLE && !worldObj.isRemote) {
    Node node=storageOC.getNode();
    if (node != null && node.network() == null) {
      li.cil.oc.api.Network.joinOrCreateNetwork(this);
    }
  }
  if (!worldObj.isRemote) {
    ForgeDirection dir=ForgeDirection.getOrientation(side).getOpposite();
    TileEntity tileEntityInside=worldObj.getTileEntity(xCoord + dir.offsetX,yCoord + dir.offsetY,zCoord + dir.offsetZ);
    if (tileEntityInside != null) {
      hopStorage(storage,tileEntityInside);
      hopStorage(storageLiquid,tileEntityInside);
      if (Reference.MEK_AVAILABLE) {
        hopStorage(storageGas,tileEntityInside);
      }
      hopStorage(storageFlux,tileEntityInside);
    }
  }
}

Fixed version (ground truth):
@Override public void updateEntity(){
  super.updateEntity();
  if (Reference.PR_AVAILABLE) {
    updateIncomingSignals();
  }
  if (Reference.OC_AVAILABLE && !worldObj.isRemote) {
    Node node=storageOC.getNode();
    if (node != null && node.network() == null) {
      li.cil.oc.api.Network.joinOrCreateNetwork(this);
    }
  }
  if (Reference.AE_AVAILABLE && !worldObj.isRemote) {
    getGridNode(ForgeDirection.UNKNOWN);
  }
  if (!worldObj.isRemote) {
    ForgeDirection dir=ForgeDirection.getOrientation(side).getOpposite();
    TileEntity tileEntityInside=worldObj.getTileEntity(xCoord + dir.offsetX,yCoord + dir.offsetY,zCoord + dir.offsetZ);
    if (tileEntityInside != null) {
      hopStorage(storage,tileEntityInside);
      hopStorage(storageLiquid,tileEntityInside);
      if (Reference.MEK_AVAILABLE) {
        hopStorage(storageGas,tileEntityInside);
      }
      hopStorage(storageFlux,tileEntityInside);
    }
  }
}
Program: 34206
Project: 34206
Buggy source:
@Optional.Method(modid="String_Node_Str") @Override public IGridNode getGridNode(ForgeDirection dir){
  if (!worldObj.isRemote) {
    IGridNode gridNode=gridNodes.get(dir.ordinal());
    if (gridNode == null) {
      gridNode=getStorageAE(dir.ordinal()).getMachineNode(getGridBlock(dir));
      gridNodes.put(dir.ordinal(),gridNode);
    }
    return gridNode;
  }
  return null;
}

Fixed version (ground truth):
@Optional.Method(modid="String_Node_Str") @Override public IGridNode getGridNode(ForgeDirection dir){
  if (coords == -1) {
    return null;
  }
  if (!worldObj.isRemote) {
    IGridNode gridNode=gridNodes.get(dir.ordinal());
    if (gridNode == null) {
      gridNode=getStorageAE(dir.ordinal()).getMachineNode(getGridBlock(dir));
      gridNodes.put(dir.ordinal(),gridNode);
    }
    return gridNode;
  }
  return null;
}
Program: 34207
Project: 34207
Buggy source:
@Override public void invalidate(){
  super.invalidate();
  if (Reference.OC_AVAILABLE && !worldObj.isRemote) {
    for (    ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
      if (getStorageOC(dir.ordinal()) == null) {
        continue;
      }
      OpenComputersSharedStorage storage=getStorageOC(dir.ordinal());
      Node node=storage.getNode();
      if (node != null) {
        node.remove();
      }
    }
  }
}

Fixed version (ground truth):
@Override public void invalidate(){
  super.invalidate();
  if (worldObj.isRemote) {
    return;
  }
  for (  ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
    if (Reference.OC_AVAILABLE) {
      OpenComputersSharedStorage storage=getStorageOC(dir.ordinal());
      if (storage == null) {
        continue;
      }
      Node node=storage.getNode();
      if (node != null) {
        node.remove();
      }
    }
    if (Reference.AE_AVAILABLE) {
      AESharedStorage storage=getStorageAE(dir.ordinal());
      if (storage.machineNode != null) {
        storage.machineNode.destroy();
        storage.machineNode=null;
      }
      storage.isConnected=false;
    }
  }
}
Program: 34208
Project: 34208
Buggy source:
public void initialize(){
  if (worldObj.isRemote) {
    return;
  }
  if (ConfigurationHandler.chunkLoadingMode != 0 && !CompactMachines.instance.machineHandler.isCoordChunkLoaded(this)) {
    CompactMachines.instance.machineHandler.forceChunkLoad(this.coords);
  }
  if (Reference.OC_AVAILABLE) {
    for (    ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
      if (getStorageOC(dir.ordinal()) == null) {
        continue;
      }
      OpenComputersSharedStorage storage=getStorageOC(dir.ordinal());
      Node node=storage.getNode();
      if (node != null && node.network() == null) {
        li.cil.oc.api.Network.joinOrCreateNetwork(this);
      }
    }
  }
}

Fixed version (ground truth):
public void initialize(){
  if (worldObj.isRemote) {
    return;
  }
  if (ConfigurationHandler.chunkLoadingMode != 0 && !CompactMachines.instance.machineHandler.isCoordChunkLoaded(this)) {
    CompactMachines.instance.machineHandler.forceChunkLoad(this.coords);
  }
  for (  ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
    if (Reference.OC_AVAILABLE) {
      OpenComputersSharedStorage storage=getStorageOC(dir.ordinal());
      if (storage == null) {
        continue;
      }
      Node node=storage.getNode();
      if (node != null && node.network() == null) {
        li.cil.oc.api.Network.joinOrCreateNetwork(this);
      }
    }
    if (Reference.AE_AVAILABLE) {
      getGridNode(dir);
    }
  }
}
Program: 34209
Project: 34209
Buggy source:
@Override public Collection<String> getAncestorIris(String iri) throws OntologyHelperException {
  Collection<String> parents;
  checkTerm(iri);
  if (!nonDefinitiveTerms.containsKey(iri)) {
    parents=super.getParentIris(iri);
  }
 else {
    parents=findRelatedNonDefinitiveTerms(iri,TermLinkType.ANCESTORS);
  }
  return parents;
}

Fixed version (ground truth):
@Override public Collection<String> getAncestorIris(String iri) throws OntologyHelperException {
  Collection<String> ancestors;
  checkTerm(iri);
  if (!nonDefinitiveTerms.containsKey(iri)) {
    ancestors=super.getAncestorIris(iri);
  }
 else {
    ancestors=findRelatedNonDefinitiveTerms(iri,TermLinkType.ANCESTORS);
  }
  return ancestors;
}
Program: 34211
Project: 34211
Buggy source:
@Override public void modifyRequest(ResponseBuilder rb,SearchComponent who,ShardRequest sreq){
  super.modifyRequest(rb,who,sreq);
  if (!doMerge(rb)) {
    return;
  }
  if (wantsShards(rb)) {
    sreq.params.add(CommonParams.FL,"String_Node_Str");
  }
  ReturnFields rf=rb.rsp.getReturnFields();
  if (rf.wantsAllFields()) {
    return;
  }
  IndexSchema schema=rb.req.getCore().getLatestSchema();
  for (  SchemaField field : schema.getFields().values()) {
    if (!rf.wantsField(field.getName())) {
      continue;
    }
    for (    String source : schema.getCopySources(field.getName())) {
      if (rf.wantsField(source)) {
        continue;
      }
      sreq.params.add(CommonParams.FL,source);
    }
  }
}

Fixed version (ground truth):
@Override public void modifyRequest(ResponseBuilder rb,SearchComponent who,ShardRequest sreq){
  super.modifyRequest(rb,who,sreq);
  if (!doMerge(rb)) {
    return;
  }
  ReturnFields rf=rb.rsp.getReturnFields();
  if (rf.wantsAllFields()) {
    return;
  }
  IndexSchema schema=rb.req.getCore().getLatestSchema();
  for (  SchemaField field : schema.getFields().values()) {
    if (!rf.wantsField(field.getName())) {
      continue;
    }
    for (    String source : schema.getCopySources(field.getName())) {
      if (rf.wantsField(source)) {
        continue;
      }
      sreq.params.add(CommonParams.FL,source);
    }
  }
}
Program: 34212
Project: 34212
Buggy source:
/** 
 * When [shard] is in the field list, it should be returned (and correct!).
 */
@Test @SuppressWarnings({"String_Node_Str","String_Node_Str"}) public void testWantsShard() throws Exception {
  try (SolrCore core=h.getCoreContainer().getCore("String_Node_Str")){
    ModifiableSolrParams params=new ModifiableSolrParams();
    params.add("String_Node_Str","String_Node_Str");
    params.add("String_Node_Str","String_Node_Str");
    params.add("String_Node_Str","String_Node_Str");
    params.add("String_Node_Str","String_Node_Str");
    SolrDocumentList docs=queryDocs(core,"String_Node_Str",params);
    assertEquals(3,docs.size());
    NamedList[] nls=new NamedList[3];
    for (int i=0; i < nls.length; ++i) {
      nls[i]=new NamedList();
      nls[i].add("String_Node_Str","String_Node_Str" + (i + 1) + "String_Node_Str");
    }
    SolrDocument doc0=docs.get(0);
    assertEquals(new HashSet<NamedList>(Arrays.asList(nls[0],nls[1],nls[2])),doc0.getFieldValue("String_Node_Str"));
    SolrDocument doc1=docs.get(1);
    assertEquals(new HashSet<NamedList>(Arrays.asList(nls[1],nls[2])),doc1.getFieldValue("String_Node_Str"));
    SolrDocument doc2=docs.get(2);
    assertEquals(new HashSet<NamedList>(Arrays.asList(nls[0],nls[1],nls[2])),doc2.getFieldValue("String_Node_Str"));
  }
 }

Fixed version (ground truth):
/** 
 * When [shard] is in the field list, it should be returned (and correct!) (but no score).
 */
@Test @SuppressWarnings({"String_Node_Str","String_Node_Str"}) public void testWantsShard() throws Exception {
  try (SolrCore core=h.getCoreContainer().getCore("String_Node_Str")){
    ModifiableSolrParams params=new ModifiableSolrParams();
    params.add("String_Node_Str","String_Node_Str");
    params.add("String_Node_Str","String_Node_Str");
    params.add("String_Node_Str","String_Node_Str");
    SolrDocumentList docs=queryDocs(core,"String_Node_Str",params);
    assertEquals(3,docs.size());
    NamedList[] nls=new NamedList[3];
    for (int i=0; i < nls.length; ++i) {
      nls[i]=new NamedList();
      nls[i].add("String_Node_Str","String_Node_Str" + (i + 1) + "String_Node_Str");
    }
    SolrDocument doc0=docs.get(0);
    assertEquals(new HashSet<NamedList>(Arrays.asList(nls[0],nls[1],nls[2])),doc0.getFieldValue("String_Node_Str"));
    assertNull(doc0.getFieldValue("String_Node_Str"));
    SolrDocument doc1=docs.get(1);
    assertEquals(new HashSet<NamedList>(Arrays.asList(nls[1],nls[2])),doc1.getFieldValue("String_Node_Str"));
    assertNull(doc1.getFieldValue("String_Node_Str"));
    SolrDocument doc2=docs.get(2);
    assertEquals(new HashSet<NamedList>(Arrays.asList(nls[0],nls[1],nls[2])),doc2.getFieldValue("String_Node_Str"));
    assertNull(doc2.getFieldValue("String_Node_Str"));
  }
 }
Program: 34213
Project: 34213
Buggy source:
/** 
 * When shardInfo is not requested, the [shard] field should not be returned.
 */
@Test public void testNotWantsShard() throws Exception {
  try (SolrCore core=h.getCoreContainer().getCore("String_Node_Str")){
    ModifiableSolrParams params=new ModifiableSolrParams();
    params.add("String_Node_Str","String_Node_Str");
    params.add("String_Node_Str","String_Node_Str");
    params.add("String_Node_Str","String_Node_Str");
    SolrDocumentList docs=queryDocs(core,"String_Node_Str",params);
    assertEquals(3,docs.size());
    for (    SolrDocument doc : docs) {
      assertNull(doc.getFieldValue("String_Node_Str"));
    }
  }
 }

Fixed version (ground truth):
/** 
 * When [shard] is not in the field list, the [shard] field should not be returned.
 */
@Test public void testNotWantsShard() throws Exception {
  try (SolrCore core=h.getCoreContainer().getCore("String_Node_Str")){
    ModifiableSolrParams params=new ModifiableSolrParams();
    params.add("String_Node_Str","String_Node_Str");
    params.add("String_Node_Str","String_Node_Str");
    params.add("String_Node_Str","String_Node_Str");
    SolrDocumentList docs=queryDocs(core,"String_Node_Str",params);
    assertEquals(3,docs.size());
    for (    SolrDocument doc : docs) {
      assertNull(doc.getFieldValue("String_Node_Str"));
      assertNull(doc.getFieldValue("String_Node_Str"));
    }
  }
 }
Program: 34214
Project: 34214
Buggy source:
public FastaJobResults getResults() throws IOException {
  if (results == null) {
    String id=fasta.getResultTypes(jobId)[0].getIdentifier();
    byte[] result=fasta.getResult(jobId,id,null);
    InputStream in=new ByteArrayInputStream(result);
    results=parseResults(new BufferedReader(new InputStreamReader(in)));
    results.chooseShownAlignments();
  }
  return results;
}

Fixed version (ground truth):
public FastaJobResults getResults() throws IOException {
  if (results == null) {
    byte[] result=getRawResults();
    InputStream in=new ByteArrayInputStream(result);
    results=parseResults(new BufferedReader(new InputStreamReader(in)));
    results.chooseShownAlignments();
  }
  return results;
}
Program: 34215
Project: 34215
Buggy source:
private static String getEntryEntity(Alignment a){
  if (a.getChain().length() == 1) {
    int chainId=(int)a.getChain().charAt(0) - (int)'A' + 1;
    return a.getPdbId().toLowerCase() + "String_Node_Str" + chainId;
  }
 else {
    return a.getPdbId().toLowerCase() + "String_Node_Str" + a.getChain().toLowerCase();
  }
}

Fixed version (ground truth):
public static String getEntryEntity(Alignment a){
  if (a.getChain().length() == 1) {
    int chainId=(int)a.getChain().charAt(0) - (int)'A' + 1;
    return a.getPdbId().toLowerCase() + "String_Node_Str" + chainId;
  }
 else {
    return a.getPdbId().toLowerCase() + "String_Node_Str" + a.getChain().toLowerCase();
  }
}
Program: 34216
Project: 34216
Buggy source:
/** 
 * Add a NamedList (with given name) with properties from the given object. Returns the new NamedList.
 */
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) public NamedList addNamedList(NamedList target,String name,Object object){
  NamedList<Object> list=new NamedList<>();
  target.add(name,list);
  for (  Method method : object.getClass().getMethods()) {
    if (method.getParameterCount() > 0) {
      continue;
    }
    String fieldName=NameConverter.getFieldName(method.getName());
    if (fieldName == null) {
      continue;
    }
    if (fieldNames == null || fieldNames.contains(fieldName)) {
      try {
        list.add(fieldName,method.invoke(object));
      }
 catch (      IllegalAccessException|IllegalArgumentException|InvocationTargetException e) {
        System.out.println("String_Node_Str" + fieldName + "String_Node_Str"+ method);
        throw new RuntimeException(e);
      }
    }
  }
  return list;
}

Fixed version (ground truth):
/** 
 * Add a NamedList (with given name) with properties from the given object. Returns the new NamedList.
 */
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) public NamedList addNamedList(NamedList target,String name,Object object){
  NamedList<Object> list=new NamedList<>();
  target.add(name,list);
  for (  Method method : object.getClass().getMethods()) {
    if (method.getParameterCount() > 0) {
      continue;
    }
    String fieldName=NameConverter.getFieldName(method.getName());
    if (fieldName == null) {
      continue;
    }
    if (fieldNames == null || fieldNames.contains(fieldName)) {
      try {
        list.add(fieldName,method.invoke(object));
      }
 catch (      IllegalAccessException|IllegalArgumentException|InvocationTargetException e) {
        throw new RuntimeException(fieldName + "String_Node_Str" + e.getCause().getMessage(),e.getCause());
      }
    }
  }
  return list;
}
Program: 34217
Project: 34217
Buggy source:
@Override @SuppressWarnings("String_Node_Str") public Query parse() throws SyntaxError {
  Method method=Method.valueOf(localParams.get(METHOD,Method.termsFilter.name()));
  JoinSpec<T> js=JoinSpec.parse(localParams.get(QueryParsing.V));
  Iterator<T> it=js.iterator(this);
  if (joinField == null) {
    throw new Exception("String_Node_Str");
  }
  FieldType ft=req.getSchema().getFieldTypeNoEx(joinField);
  Iterator<BytesRef> bytesRefs=new TransformIterator(it,transformer(ft));
  return new SolrConstantScoreQuery(method.makeFilter(joinField,bytesRefs));
}

Fixed version (ground truth):
@Override @SuppressWarnings("String_Node_Str") public Query parse() throws SyntaxError {
  Method method=Method.valueOf(localParams.get(METHOD,Method.termsFilter.name()));
  JoinSpec<T> js=JoinSpec.parse(localParams.get(QueryParsing.V));
  Iterator<T> it=js.iterator(this);
  if (joinField == null) {
    throw new Exception("String_Node_Str");
  }
  FieldType ft=req.getSchema().getFieldTypeNoEx(joinField);
  Iterator<BytesRef> bytesRefs=new TransformIterator(it,transformer(ft));
  if (!bytesRefs.hasNext()) {
    return new BooleanQuery.Builder().build();
  }
  return new SolrConstantScoreQuery(method.makeFilter(joinField,bytesRefs));
}
Program: 34218
Project: 34218
Buggy source:
@Override public Collection<TreeFacetField> prune(Collection<TreeFacetField> unprunedTrees){
  Collection<TreeFacetField> prunedTrees=new TreeSet<>(Comparator.comparingLong(TreeFacetField::getCount).reversed());
  Collection<TreeFacetField> incoming=new LinkedList<>(unprunedTrees);
  long total=getNodeTotal(incoming);
  int itCount=1;
  while (prunedTrees.size() < datapoints && !incoming.isEmpty()) {
    int minCount=Math.round((total / datapoints) / itCount);
    if (minCount == 0 && Math.round((total / datapoints) / (itCount - 1)) > 1) {
      break;
    }
    prunedTrees.addAll(getNodesWithCount(incoming,minCount));
    itCount++;
  }
  if (prunedTrees.size() > datapoints) {
    prunedTrees=prunedTrees.stream().limit(datapoints).collect(Collectors.toList());
  }
  incoming=new LinkedList<>(unprunedTrees);
  trimIncomingNodes(incoming,prunedTrees,0);
  TreeFacetField otherNode=buildOtherNode(incoming);
  prunedTrees.add(otherNode);
  return prunedTrees;
}

Fixed version (ground truth):
@Override public Collection<TreeFacetField> prune(Collection<TreeFacetField> unprunedTrees){
  Collection<TreeFacetField> prunedTrees=new TreeSet<>(Comparator.comparingLong(TreeFacetField::getCount).thenComparing(TreeFacetField::getValue).reversed());
  Collection<TreeFacetField> incoming=unprunedTrees.stream().map(TreeFacetField::clone).collect(Collectors.toList());
  long total=getNodeTotal(incoming);
  int itCount=1;
  int prevCount=Integer.MAX_VALUE;
  while (prunedTrees.size() < datapoints && !incoming.isEmpty()) {
    int minCount=getThreshold(itCount,prevCount,total);
    if (minCount <= 0) {
      break;
    }
    prunedTrees.addAll(getNodesWithCount(incoming,minCount));
    itCount++;
    prevCount=minCount;
  }
  if (prunedTrees.size() > datapoints) {
    prunedTrees=prunedTrees.stream().limit(datapoints).collect(Collectors.toList());
  }
  incoming=new LinkedList<>(unprunedTrees);
  trimIncomingNodes(incoming,prunedTrees,0);
  TreeFacetField otherNode=buildOtherNode(incoming);
  if (otherNode.getTotal() > 0) {
    prunedTrees.add(otherNode);
  }
  return prunedTrees;
}
Program: 34220
Project: 34220
Buggy source:
public JExpression hasSetValue(){
  if (constantField != null) {
    return JExpr.TRUE;
  }
 else   if (isSetter != null) {
    return targetObject.invoke(isSetter);
  }
 else {
    return fieldAccessor.hasSetValue();
  }
}

Fixed version (ground truth):
public JExpression hasSetValue(){
  if (constantField != null) {
    return JExpr.TRUE;
  }
 else   if (isSetter != null) {
    return targetObject.invoke(isSetter);
  }
 else   if (type.isPrimitive()) {
    return JExpr.TRUE;
  }
 else {
    return fieldAccessor.hasSetValue();
  }
}
Program: 34221
Project: 34221
Buggy source:
public boolean isAlwaysSet(){
  if (constantField != null) {
    return true;
  }
 else {
    return JExpr.TRUE == fieldAccessor.hasSetValue();
  }
}

Fixed version (ground truth):
public boolean isAlwaysSet(){
  if (constantField != null) {
    return true;
  }
 else   if (type.isPrimitive()) {
    return true;
  }
 else {
    return JExpr.TRUE == fieldAccessor.hasSetValue();
  }
}
Program: 34222
Project: 34222
Buggy source:
private void createClassInfos(final CMModel<T,C> model){
  Collection<? extends ClassInfo<T,C>> beans=typeInfoSet.beans().values();
  for (  ClassInfo<T,C> classInfo : beans) {
    @SuppressWarnings("String_Node_Str") final CI ci=(CI)classInfo;
    classInfos.put(ci,createClassInfo(ci));
  }
  for (  Map.Entry<CI,MClassInfo<T,C>> entry : classInfos.entrySet()) {
    populateClassInfo(entry.getKey(),entry.getValue());
  }
  for (  ClassInfo<T,C> classInfo : beans) {
    model.addClassInfo(getTypeInfo((CI)classInfo));
  }
}

Fixed version (ground truth):
private void createClassInfos(final CMModel<T,C> model){
  Collection<? extends ClassInfo<T,C>> beans=typeInfoSet.beans().values();
  for (  ClassInfo<T,C> classInfo : beans) {
    @SuppressWarnings("String_Node_Str") final CI ci=(CI)classInfo;
    getTypeInfo(ci);
  }
  for (  Map.Entry<CI,MClassInfo<T,C>> entry : classInfos.entrySet()) {
    populateClassInfo(entry.getKey(),entry.getValue());
  }
  for (  ClassInfo<T,C> classInfo : beans) {
    model.addClassInfo(getTypeInfo((CI)classInfo));
  }
}
Program: 34223
Project: 34223
Buggy source:
private void createBuiltinLeafInfos(final CMModel<T,C> model){
  Collection<? extends BuiltinLeafInfo<T,C>> builtins=typeInfoSet.builtins().values();
  for (  BuiltinLeafInfo<T,C> builtinLeafInfo : builtins) {
    @SuppressWarnings("String_Node_Str") final BLI bli=(BLI)builtinLeafInfo;
    builtinLeafInfos.put(bli,createBuiltinLeafInfo(bli));
  }
  for (  BuiltinLeafInfo<T,C> builtinLeafInfo : builtins) {
    model.addBuiltinLeafInfo(getTypeInfo((BLI)builtinLeafInfo));
  }
}

Fixed version (ground truth):
private void createBuiltinLeafInfos(final CMModel<T,C> model){
  Collection<? extends BuiltinLeafInfo<T,C>> builtins=typeInfoSet.builtins().values();
  for (  BuiltinLeafInfo<T,C> builtinLeafInfo : builtins) {
    @SuppressWarnings("String_Node_Str") final BLI bli=(BLI)builtinLeafInfo;
    getTypeInfo(bli);
  }
  for (  BuiltinLeafInfo<T,C> builtinLeafInfo : builtins) {
    model.addBuiltinLeafInfo(getTypeInfo((BLI)builtinLeafInfo));
  }
}
Program: 34224
Project: 34224
Buggy source:
private void createEnumLeafInfos(final CMModel<T,C> model){
  Collection<? extends EnumLeafInfo<T,C>> enums=typeInfoSet.enums().values();
  for (  EnumLeafInfo<T,C> enumLeafInfo : enums) {
    @SuppressWarnings("String_Node_Str") final ELI eli=(ELI)enumLeafInfo;
    enumLeafInfos.put(eli,createEnumLeafInfo(eli));
  }
  for (  Map.Entry<ELI,MEnumLeafInfo<T,C>> entry : enumLeafInfos.entrySet()) {
    populateEnumLeafInfo(entry.getKey(),entry.getValue());
  }
  for (  EnumLeafInfo<T,C> enumLeafInfo : enums) {
    model.addEnumLeafInfo(getTypeInfo((ELI)enumLeafInfo));
  }
}

Fixed version (ground truth):
private void createEnumLeafInfos(final CMModel<T,C> model){
  Collection<? extends EnumLeafInfo<T,C>> enums=typeInfoSet.enums().values();
  for (  EnumLeafInfo<T,C> enumLeafInfo : enums) {
    @SuppressWarnings("String_Node_Str") final ELI eli=(ELI)enumLeafInfo;
    getTypeInfo(eli);
  }
  for (  Map.Entry<ELI,MEnumLeafInfo<T,C>> entry : enumLeafInfos.entrySet()) {
    populateEnumLeafInfo(entry.getKey(),entry.getValue());
  }
  for (  EnumLeafInfo<T,C> enumLeafInfo : enums) {
    model.addEnumLeafInfo(getTypeInfo((ELI)enumLeafInfo));
  }
}
Program: 34225
Project: 34225
Buggy source:
private void createElementInfos(final CMModel<T,C> model){
  Iterable<? extends ElementInfo<T,C>> elements=typeInfoSet.getAllElements();
  for (  ElementInfo<T,C> element : elements) {
    final EI ei=(EI)element;
    elementInfos.put(ei,createElementInfo(ei));
  }
  for (  ElementInfo<T,C> element : elements) {
    model.addElementInfo(getElementInfo((EI)element));
  }
}

Fixed version (ground truth):
private void createElementInfos(final CMModel<T,C> model){
  Iterable<? extends ElementInfo<T,C>> elements=typeInfoSet.getAllElements();
  for (  ElementInfo<T,C> element : elements) {
    final EI ei=(EI)element;
    getElementInfo(ei);
  }
  for (  ElementInfo<T,C> element : elements) {
    model.addElementInfo(getElementInfo((EI)element));
  }
}