nus-yam/ex-repair huggingface dataset:
Program: 12521
Project: 12521
Buggy source:
@Nonnull @SuppressFBWarnings("String_Node_Str") public Schema getSchema(@Nullable final ClassLoader aClassLoader){
  if (m_aSchema == null) {
    final List<IReadableResource> aXSDRes=getAllXSDResources(aClassLoader);
    m_aSchema=XMLSchemaCache.getInstanceOfClassLoader(aClassLoader).getSchema(aXSDRes);
    if (m_aSchema == null)     throw new IllegalStateException("String_Node_Str" + aXSDRes + "String_Node_Str"+ aClassLoader);
  }
  return m_aSchema;
}

Fixed version (ground truth):
@Nonnull @SuppressFBWarnings("String_Node_Str") public Schema getSchema(@Nullable final ClassLoader aClassLoader){
  if (m_aSchema == null) {
    final List<? extends IReadableResource> aXSDRes=getAllXSDResources(aClassLoader);
    m_aSchema=XMLSchemaCache.getInstanceOfClassLoader(aClassLoader).getSchema(aXSDRes);
    if (m_aSchema == null)     throw new IllegalStateException("String_Node_Str" + aXSDRes + "String_Node_Str"+ aClassLoader);
  }
  return m_aSchema;
}
Program: 12522
Project: 12522
Buggy source:
/** 
 * Constructor
 * @param aClass The JAXB generated class of the root element.
 * @param sXSDPaths The classpath relative paths to the XML Schema.
 */
public UBLDocumentType(@Nonnull final Class<?> aClass,@Nonnull @Nonempty final String... aXSDPaths){
  ValueEnforcer.notNull(aClass,"String_Node_Str");
  ValueEnforcer.notEmptyNoNullValue(aXSDPaths,"String_Node_Str");
  final XmlType aXmlType=aClass.getAnnotation(XmlType.class);
  if (aXmlType == null)   throw new IllegalArgumentException("String_Node_Str");
  final Package aPackage=aClass.getPackage();
  final XmlSchema aXmlSchema=aPackage.getAnnotation(XmlSchema.class);
  if (aXmlSchema == null)   throw new IllegalArgumentException("String_Node_Str" + aPackage.getName() + "String_Node_Str");
  String sLocalName=ClassHelper.getClassLocalName(aClass);
  sLocalName=sLocalName.substring(0,sLocalName.length() - "String_Node_Str".length());
  m_aClass=aClass;
  m_sLocalName=sLocalName;
  m_sNamespaceURI=aXmlSchema.namespace();
  if (StringHelper.hasNoText(m_sNamespaceURI))   throw new IllegalArgumentException("String_Node_Str" + aPackage.getName() + "String_Node_Str");
  m_aQName=new QName(m_sNamespaceURI,sLocalName);
  m_aXSDPaths=CollectionHelper.newList(aXSDPaths);
}

Fixed version (ground truth):
/** 
 * Constructor
 * @param aClass The JAXB generated class of the root element.
 * @param sXSDPaths The classpath relative paths to the XML Schema. May neither be <code>null</code> nor empty.
 */
public UBLDocumentType(@Nonnull final Class<?> aClass,@Nonnull @Nonempty final List<String> aXSDPaths){
  ValueEnforcer.notNull(aClass,"String_Node_Str");
  ValueEnforcer.notEmptyNoNullValue(aXSDPaths,"String_Node_Str");
  final XmlType aXmlType=aClass.getAnnotation(XmlType.class);
  if (aXmlType == null)   throw new IllegalArgumentException("String_Node_Str");
  final Package aPackage=aClass.getPackage();
  final XmlSchema aXmlSchema=aPackage.getAnnotation(XmlSchema.class);
  if (aXmlSchema == null)   throw new IllegalArgumentException("String_Node_Str" + aPackage.getName() + "String_Node_Str");
  String sLocalName=ClassHelper.getClassLocalName(aClass);
  sLocalName=sLocalName.substring(0,sLocalName.length() - "String_Node_Str".length());
  m_aClass=aClass;
  m_sLocalName=sLocalName;
  m_sNamespaceURI=aXmlSchema.namespace();
  if (StringHelper.hasNoText(m_sNamespaceURI))   throw new IllegalArgumentException("String_Node_Str" + aPackage.getName() + "String_Node_Str");
  m_aQName=new QName(m_sNamespaceURI,sLocalName);
  m_aXSDPaths=CollectionHelper.newList(aXSDPaths);
}
Program: 12525
Project: 12525
Buggy source:
/** 
 * @return The current default validation event handler. May be<code>null</code> to indicate that no global validation event handler is defined, and the default validation handler is used.
 */
@Nullable public static final ValidationEventHandler getDefaultValidationEventHandler(){
  s_aRWLock.readLock().lock();
  try {
    return s_aEventHandler;
  }
  finally {
    s_aRWLock.readLock().unlock();
  }
}

Fixed version (ground truth):
/** 
 * @return The current default validation event handler. May be<code>null</code> to indicate that no global validation event handler is defined, and the default validation handler is used.
 */
@Nullable public static ValidationEventHandler getDefaultValidationEventHandler(){
  return s_aRWLock.readLocked(() -> s_aEventHandler);
}
Program: 12526
Project: 12526
Buggy source:
/** 
 * @return The special JAXB namespace context to be used. <code>null</code> bydefault.
 */
@Nullable public static NamespaceContext getDefaultNamespaceContext(){
  s_aRWLock.readLock().lock();
  try {
    return s_aNamespaceContext;
  }
  finally {
    s_aRWLock.readLock().unlock();
  }
}

Fixed version (ground truth):
/** 
 * @return The special JAXB namespace context to be used. <code>null</code> bydefault.
 */
@Nullable public static NamespaceContext getDefaultNamespaceContext(){
  return s_aRWLock.readLocked(() -> s_aNamespaceContext);
}
Program: 12527
Project: 12527
Buggy source:
/** 
 * Set the default namespace context (prefix to namespace URL mapping) to be used.
 * @param aNamespaceContext The namespace context to be used by default. May be <code>null</code>.
 */
public static void setDefaultNamespaceContext(@Nullable final NamespaceContext aNamespaceContext){
  s_aRWLock.writeLock().lock();
  try {
    s_aNamespaceContext=aNamespaceContext;
  }
  finally {
    s_aRWLock.writeLock().unlock();
  }
}

Fixed version (ground truth):
/** 
 * Set the default namespace context (prefix to namespace URL mapping) to be used.
 * @param aNamespaceContext The namespace context to be used by default. May be <code>null</code>.
 */
public static void setDefaultNamespaceContext(@Nullable final NamespaceContext aNamespaceContext){
  s_aRWLock.writeLocked(() -> {
    s_aNamespaceContext=aNamespaceContext;
  }
);
}
Program: 12528
Project: 12528
Buggy source:
/** 
 * Set a global event handler that should be passed to all read/write actions. If no global validation handler is defined, a default logging event handler is used.
 * @param aEventHandler The new default event handler. May be <code>null</code> to indicate, that the default handler should be used.
 */
public static final void setDefaultValidationEventHandler(@Nullable final ValidationEventHandler aEventHandler){
  s_aRWLock.writeLock().lock();
  try {
    s_aEventHandler=aEventHandler;
  }
  finally {
    s_aRWLock.writeLock().unlock();
  }
}

Fixed version (ground truth):
/** 
 * Set a global event handler that should be passed to all read/write actions. If no global validation handler is defined, a default logging event handler is used.
 * @param aEventHandler The new default event handler. May be <code>null</code> to indicate, that the default handler should be used.
 */
public static void setDefaultValidationEventHandler(@Nullable final ValidationEventHandler aEventHandler){
  s_aRWLock.writeLocked(() -> {
    s_aEventHandler=aEventHandler;
  }
);
}
Program: 12529
Project: 12529
Buggy source:
private boolean shouldPerformTransformations(final List<DSSTransform> transforms){
  for (  final DSSTransform transform : transforms) {
    if (!transform.isPerform()) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
private boolean shouldPerformTransformations(final List<DSSTransform> transforms){
  if (transforms != null) {
    for (    final DSSTransform transform : transforms) {
      if (!transform.isPerform()) {
        return true;
      }
    }
  }
  return false;
}
Program: 12530
Project: 12530
Buggy source:
public ValidationPolicy(XmlDom xmlDom,URL sourceXSD,HashMap<String,Object> treeResult,Document document){
  this.xmlDom=xmlDom;
  this.treeResult=treeResult;
  this.document=document;
  this.sourceXSD=sourceXSD;
}

Fixed version (ground truth):
public ValidationPolicy(XmlDom xmlDom,URL sourceXSD,Document document){
  this.xmlDom=xmlDom;
  this.document=document;
  this.sourceXSD=sourceXSD;
}
Program: 12531
Project: 12531
Buggy source:
/** 
 * @param signatureNode
 * @param exception
 */
private static void notifyException(final XmlNode signatureNode,final Exception exception){
  signatureNode.addChild(NodeName.INDICATION,Indication.INDETERMINATE);
  signatureNode.addChild(NodeName.SUB_INDICATION,"String_Node_Str");
  signatureNode.addChild(NodeName.INFO,exception.toString());
  LOG.error(exception.getMessage(),exception);
}

Fixed version (ground truth):
/** 
 * @param signatureNode
 * @param exception
 */
private static void notifyException(final XmlNode signatureNode,final Exception exception){
  LOG.error(exception.getMessage(),exception);
  signatureNode.removeChild(NodeName.INDICATION);
  signatureNode.removeChild(NodeName.SUB_INDICATION);
  signatureNode.addChild(NodeName.INDICATION,Indication.INDETERMINATE);
  signatureNode.addChild(NodeName.SUB_INDICATION,SubIndication.UNEXPECTED_ERROR);
  final String message=DSSUtils.getSummaryMessage(exception,SimpleReportBuilder.class);
  signatureNode.addChild(NodeName.INFO,message);
}
Program: 12532
Project: 12532
Buggy source:
/** 
 * This method lists all defined secutity providers.
 */
public static void printSecurityProvides(){
  final Provider[] providers=Security.getProviders();
  for (  final Provider provider : providers) {
    System.out.println("String_Node_Str" + provider.getName());
    final Set<Provider.Service> services=provider.getServices();
    for (    final Provider.Service service : services) {
      System.out.println("String_Node_Str" + service.getAlgorithm() + "String_Node_Str"+ service.getType()+ "String_Node_Str"+ service.getClassName());
    }
  }
}

Fixed version (ground truth):
/** 
 * This method lists all defined security providers.
 */
public static void printSecurityProvides(){
  final Provider[] providers=Security.getProviders();
  for (  final Provider provider : providers) {
    System.out.println("String_Node_Str" + provider.getName());
    final Set<Provider.Service> services=provider.getServices();
    for (    final Provider.Service service : services) {
      System.out.println("String_Node_Str" + service.getAlgorithm() + "String_Node_Str"+ service.getType()+ "String_Node_Str"+ service.getClassName());
    }
  }
}
Program: 12534
Project: 12534
Buggy source:
@Override public void onViewCreated(View view,Bundle savedInstanceState){
  super.onViewCreated(view,savedInstanceState);
  ConnectionInfo connectionInfo=((MainActivity)getActivity()).getConnectionInfo();
  mayContinue=true;
  if (!connectionInfo.isHostNameMatching()) {
    mayContinue=false;
    getListView().addFooterView(getActivity().getLayoutInflater().inflate(R.layout.select_invalid_hostname,null),null,false);
  }
 else   try {
    if (connectionInfo.isTrusted()) {
      mayContinue=false;
      getListView().addFooterView(getActivity().getLayoutInflater().inflate(R.layout.select_already_trusted,null),null,false);
    }
  }
 catch (  Exception e) {
    Log.e(TAG,"String_Node_Str",e);
    mayContinue=false;
  }
  if (mayContinue) {
    TextView tv=new TextView(view.getContext());
    tv.setTextSize(TypedValue.COMPLEX_UNIT_SP,20);
    tv.setText(R.string.select_text);
    tv.setPadding(0,0,0,10);
    getListView().addHeaderView(tv,null,false);
    setListAdapter(adapter);
  }
}

Fixed version (ground truth):
@Override public void onViewCreated(View view,Bundle savedInstanceState){
  super.onViewCreated(view,savedInstanceState);
  ConnectionInfo connectionInfo=((MainActivity)getActivity()).getConnectionInfo();
  mayContinue=true;
  if (!connectionInfo.isHostNameMatching()) {
    mayContinue=false;
    getListView().addFooterView(getActivity().getLayoutInflater().inflate(R.layout.select_invalid_hostname,null),null,false);
  }
 else {
    try {
      if (connectionInfo.isTrusted()) {
        mayContinue=false;
        getListView().addFooterView(getActivity().getLayoutInflater().inflate(R.layout.select_already_trusted,null),null,false);
      }
    }
 catch (    Exception e) {
      Log.e(TAG,"String_Node_Str",e);
      mayContinue=false;
    }
  }
  if (mayContinue) {
    TextView tv=new TextView(view.getContext());
    tv.setTextSize(TypedValue.COMPLEX_UNIT_SP,20);
    tv.setText(R.string.select_text);
    tv.setPadding(0,0,0,10);
    getListView().addHeaderView(tv,null,false);
  }
  setListAdapter(adapter);
}
Program: 12535
Project: 12535
Buggy source:
@Override public void onViewCreated(View view,Bundle savedInstanceState){
  super.onViewCreated(view,savedInstanceState);
  ConnectionInfo connectionInfo=((MainActivity)getActivity()).getConnectionInfo();
  mayContinue=true;
  if (!connectionInfo.isHostNameMatching()) {
    mayContinue=false;
    getListView().addFooterView(getActivity().getLayoutInflater().inflate(R.layout.select_invalid_hostname,null),null,false);
  }
 else   try {
    if (connectionInfo.isTrusted()) {
      mayContinue=false;
      getListView().addFooterView(getActivity().getLayoutInflater().inflate(R.layout.select_already_trusted,null),null,false);
    }
  }
 catch (  Exception e) {
    Log.e(TAG,"String_Node_Str",e);
    mayContinue=false;
  }
  if (mayContinue) {
    TextView tv=new TextView(view.getContext());
    tv.setTextSize(TypedValue.COMPLEX_UNIT_SP,20);
    tv.setText(R.string.select_text);
    tv.setPadding(0,0,0,10);
    getListView().addHeaderView(tv,null,false);
  }
}

Fixed version (ground truth):
@Override public void onViewCreated(View view,Bundle savedInstanceState){
  super.onViewCreated(view,savedInstanceState);
  ConnectionInfo connectionInfo=((MainActivity)getActivity()).getConnectionInfo();
  mayContinue=true;
  if (!connectionInfo.isHostNameMatching()) {
    mayContinue=false;
    getListView().addFooterView(getActivity().getLayoutInflater().inflate(R.layout.select_invalid_hostname,null),null,false);
  }
 else   try {
    if (connectionInfo.isTrusted()) {
      mayContinue=false;
      getListView().addFooterView(getActivity().getLayoutInflater().inflate(R.layout.select_already_trusted,null),null,false);
    }
  }
 catch (  Exception e) {
    Log.e(TAG,"String_Node_Str",e);
    mayContinue=false;
  }
  if (mayContinue) {
    TextView tv=new TextView(view.getContext());
    tv.setTextSize(TypedValue.COMPLEX_UNIT_SP,20);
    tv.setText(R.string.select_text);
    tv.setPadding(0,0,0,10);
    addHeaderToListView(getListView(),tv,null,false);
  }
}
Program: 12536
Project: 12536
Buggy source:
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  MainActivity main=(MainActivity)getActivity();
  main.onShowFragment(TAG);
  ArrayAdapter<String> adapter=new ArrayAdapter<String>(inflater.getContext(),android.R.layout.simple_list_item_1){
    @Override public View getView(    int position,    View convertView,    ViewGroup parent){
      TextView v=(TextView)super.getView(position,convertView,parent);
      if (Build.VERSION.SDK_INT >= 17)       v.setCompoundDrawablesRelativeWithIntrinsicBounds(R.drawable.ic_certificate,0,0,0);
 else       v.setCompoundDrawablesWithIntrinsicBounds(R.drawable.ic_certificate,0,0,0);
      v.setPadding(0,10,0,10);
      v.setCompoundDrawablePadding(10);
      return v;
    }
  }
;
  for (  X509Certificate cert : ((MainActivity)getActivity()).getConnectionInfo().getCertificates())   adapter.add(new CertificateInfo(cert).getSubjectName());
  setListAdapter(adapter);
  setHasOptionsMenu(true);
  return super.onCreateView(inflater,container,savedInstanceState);
}

Fixed version (ground truth):
@Override public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState){
  MainActivity main=(MainActivity)getActivity();
  main.onShowFragment(TAG);
  adapter=new ArrayAdapter<String>(inflater.getContext(),android.R.layout.simple_list_item_1){
    @Override public View getView(    int position,    View convertView,    ViewGroup parent){
      TextView v=(TextView)super.getView(position,convertView,parent);
      if (Build.VERSION.SDK_INT >= 17)       v.setCompoundDrawablesRelativeWithIntrinsicBounds(R.drawable.ic_certificate,0,0,0);
 else       v.setCompoundDrawablesWithIntrinsicBounds(R.drawable.ic_certificate,0,0,0);
      v.setPadding(0,10,0,10);
      v.setCompoundDrawablePadding(10);
      return v;
    }
  }
;
  for (  X509Certificate cert : ((MainActivity)getActivity()).getConnectionInfo().getCertificates())   adapter.add(new CertificateInfo(cert).getSubjectName());
  setHasOptionsMenu(true);
  return super.onCreateView(inflater,container,savedInstanceState);
}
Program: 12537
Project: 12537
Buggy source:
@Override public void onViewCreated(View view,Bundle savedInstanceState){
  super.onViewCreated(view,savedInstanceState);
  ConnectionInfo connectionInfo=((MainActivity)getActivity()).getConnectionInfo();
  mayContinue=true;
  if (!connectionInfo.isHostNameMatching()) {
    mayContinue=false;
    getListView().addFooterView(getActivity().getLayoutInflater().inflate(R.layout.select_invalid_hostname,null),null,false);
  }
 else   try {
    if (connectionInfo.isTrusted()) {
      mayContinue=false;
      getListView().addFooterView(getActivity().getLayoutInflater().inflate(R.layout.select_already_trusted,null),null,false);
    }
  }
 catch (  Exception e) {
    Log.e(TAG,"String_Node_Str",e);
    mayContinue=false;
  }
  if (mayContinue) {
    TextView tv=new TextView(view.getContext());
    tv.setTextSize(TypedValue.COMPLEX_UNIT_SP,20);
    tv.setText(R.string.select_text);
    tv.setPadding(0,0,0,10);
    addHeaderToListView(getListView(),tv,null,false);
  }
}

Fixed version (ground truth):
@Override public void onViewCreated(View view,Bundle savedInstanceState){
  super.onViewCreated(view,savedInstanceState);
  ConnectionInfo connectionInfo=((MainActivity)getActivity()).getConnectionInfo();
  mayContinue=true;
  if (!connectionInfo.isHostNameMatching()) {
    mayContinue=false;
    getListView().addFooterView(getActivity().getLayoutInflater().inflate(R.layout.select_invalid_hostname,null),null,false);
  }
 else   try {
    if (connectionInfo.isTrusted()) {
      mayContinue=false;
      getListView().addFooterView(getActivity().getLayoutInflater().inflate(R.layout.select_already_trusted,null),null,false);
    }
  }
 catch (  Exception e) {
    Log.e(TAG,"String_Node_Str",e);
    mayContinue=false;
  }
  if (mayContinue) {
    TextView tv=new TextView(view.getContext());
    tv.setTextSize(TypedValue.COMPLEX_UNIT_SP,20);
    tv.setText(R.string.select_text);
    tv.setPadding(0,0,0,10);
    getListView().addHeaderView(tv,null,false);
    setListAdapter(adapter);
  }
}
Program: 12540
Project: 12540
Buggy source:
private static void registerItemAndOre(Item item){
  GameRegistry.register(item);
  OreDictionary.registerOre(item.getRegistryName().getResourceDomain(),item);
}

Fixed version (ground truth):
private static void registerItemAndOre(Item item){
  GameRegistry.register(item);
  OreDictionary.registerOre(item.getRegistryName().getResourcePath(),item);
}
Program: 12541
Project: 12541
Buggy source:
@Override public void initGui(){
  xSize=176;
  ySize=227;
  super.initGui();
  recipeList=Lists.newArrayList();
  for (  final ProjectTableRecipe projectTableRecipe : ProjectTableManager.INSTANCE.getRecipes()) {
    recipeList.add(new ProjectTableRecipeInstance(projectTableRecipe));
  }
  filteredList=Lists.newArrayList(recipeList);
  searchField=new GuiTextField(0,fontRendererObj,guiLeft + 9,guiTop + 9,151,fontRendererObj.FONT_HEIGHT);
  searchField.setMaxStringLength(60);
  searchField.setEnableBackgroundDrawing(false);
  searchField.setVisible(true);
  searchField.setTextColor(16777215);
  searchField.setFocused(true);
  createComponents();
  setRecipeRenderText();
}

Fixed version (ground truth):
@Override public void initGui(){
  xSize=175;
  ySize=227;
  super.initGui();
  xSize=317;
  ySize=227;
  recipeList=Lists.newArrayList();
  for (  final ProjectTableRecipe projectTableRecipe : ProjectTableManager.INSTANCE.getRecipes()) {
    recipeList.add(new ProjectTableRecipeInstance(projectTableRecipe));
  }
  filteredList=Lists.newArrayList(recipeList);
  searchField=new GuiTextField(0,fontRendererObj,guiLeft + 9 - (317 - 175) / 2,guiTop + 9,149,fontRendererObj.FONT_HEIGHT);
  searchField.setMaxStringLength(60);
  searchField.setEnableBackgroundDrawing(false);
  searchField.setVisible(true);
  searchField.setTextColor(16777215);
  searchField.setFocused(true);
  createComponents();
  setRecipeRenderText();
}
Program: 12543
Project: 12543
Buggy source:
public static ProjectTableRecipe readFromBuffer(PacketBuffer buf){
  try {
    byte inputItemStackCount=buf.readByte();
    List<IIngredient> input=Lists.newArrayList();
    for (int i=0; i < inputItemStackCount; ++i) {
      input.add(readIngredient(buf));
    }
    byte outputItemStackCount=buf.readByte();
    List<ItemStack> output=Lists.newArrayList();
    for (int i=0; i < outputItemStackCount; ++i) {
      output.add(buf.readItemStackFromBuffer());
    }
    final String displayName=ByteBufUtils.readUTF8String(buf);
    return new ProjectTableRecipe(output,displayName,input);
  }
 catch (  IOException e) {
    throw new SteamNSteelException("String_Node_Str",e);
  }
}

Fixed version (ground truth):
public static ProjectTableRecipe readFromBuffer(PacketBuffer buf){
  try {
    byte inputItemStackCount=buf.readByte();
    List<IIngredient> input=Lists.newArrayList();
    for (int i=0; i < inputItemStackCount; ++i) {
      input.add(readIngredient(buf));
    }
    byte outputItemStackCount=buf.readByte();
    List<ItemStack> output=Lists.newArrayList();
    for (int i=0; i < outputItemStackCount; ++i) {
      output.add(PacketBufferExtensions.readLargeItemStackFromBuffer(buf));
    }
    final String displayName=ByteBufUtils.readUTF8String(buf);
    return new ProjectTableRecipe(output,displayName,input);
  }
 catch (  IOException e) {
    throw new SteamNSteelException("String_Node_Str",e);
  }
}
Program: 12544
Project: 12544
Buggy source:
public void writeToBuffer(PacketBuffer buf){
  buf.writeByte(input.size());
  for (  final IIngredient itemStack : input) {
    writeIngredient(itemStack,buf);
  }
  buf.writeByte(output.size());
  for (  final ItemStack itemStack : output) {
    buf.writeItemStackToBuffer(itemStack);
  }
  buf.writeString(displayName);
}

Fixed version (ground truth):
public void writeToBuffer(PacketBuffer buf){
  buf.writeByte(input.size());
  for (  final IIngredient itemStack : input) {
    writeIngredient(itemStack,buf);
  }
  buf.writeByte(output.size());
  for (  final ItemStack itemStack : output) {
    PacketBufferExtensions.writeLargeItemStackToBuffer(buf,itemStack);
  }
  buf.writeString(displayName);
}
Program: 12545
Project: 12545
Buggy source:
public ProjectTableContainer(InventoryPlayer playerInventory){
  addPlayerInventory(playerInventory,8,145);
  addSlotToContainer(new ProjectTableCraftingSlot(playerInventory.player,craftMatrix,craftResult,0));
}

Fixed version (ground truth):
public ProjectTableContainer(InventoryPlayer playerInventory){
  addPlayerInventory(playerInventory,8,145);
}
Program: 12546
Project: 12546
Buggy source:
@Override public IMessage onMessage(final ProjectTableCraftPacket message,final MessageContext ctx){
  final InventoryPlayer playerInventory=ctx.getServerHandler().playerEntity.inventory;
  final ProjectTableRecipe recipe=message.getRecipe();
  final boolean canCraft=ProjectTableManager.INSTANCE.canCraftRecipe(recipe,playerInventory);
  if (!canCraft) {
    return null;
  }
  IThreadListener mainThread=(WorldServer)ctx.getServerHandler().playerEntity.worldObj;
  mainThread.addScheduledTask(new Runnable(){
    @Override public void run(){
      for (      final IIngredient ingredient : recipe.getInput()) {
        int quantityToConsume=ingredient.getQuantityConsumed();
        for (        final ItemStack itemStack : ingredient.getItemStacks()) {
          quantityToConsume-=playerInventory.clearMatchingItems(itemStack.getItem(),itemStack.getMetadata(),quantityToConsume,itemStack.getTagCompound());
          playerInventory.markDirty();
          if (quantityToConsume <= 0) {
            break;
          }
        }
      }
      for (      final ItemStack itemStack : recipe.getOutput()) {
        final ItemStack copy=itemStack.copy();
        if (!playerInventory.addItemStackToInventory(copy)) {
          ctx.getServerHandler().playerEntity.dropItem(copy,true);
        }
 else {
          playerInventory.markDirty();
        }
      }
    }
  }
);
  return null;
}

Fixed version (ground truth):
@Override public IMessage onMessage(final ProjectTableCraftPacket message,final MessageContext ctx){
  final InventoryPlayer playerInventory=ctx.getServerHandler().playerEntity.inventory;
  final ProjectTableRecipe recipe=message.getRecipe();
  final boolean canCraft=ProjectTableManager.INSTANCE.canCraftRecipe(recipe,playerInventory);
  if (!canCraft) {
    return null;
  }
  IThreadListener mainThread=(WorldServer)ctx.getServerHandler().playerEntity.worldObj;
  mainThread.addScheduledTask(() -> {
    for (    final IIngredient ingredient : recipe.getInput()) {
      int quantityToConsume=ingredient.getQuantityConsumed();
      final ImmutableList<ItemStack> itemStacks=ingredient.getItemStacks();
      for (      final ItemStack itemStack : itemStacks) {
        int metadata=itemStack.getMetadata();
        metadata=metadata == OreDictionary.WILDCARD_VALUE ? -1 : metadata;
        quantityToConsume-=playerInventory.clearMatchingItems(itemStack.getItem(),metadata,quantityToConsume,itemStack.getTagCompound());
        playerInventory.markDirty();
        if (quantityToConsume <= 0) {
          break;
        }
      }
    }
    for (    final ItemStack itemStack : recipe.getOutput()) {
      final ItemStack copy=itemStack.copy();
      if (!playerInventory.addItemStackToInventory(copy)) {
        ctx.getServerHandler().playerEntity.dropItem(copy,true);
      }
 else {
        playerInventory.markDirty();
      }
    }
  }
);
  return null;
}
Program: 12547
Project: 12547
Buggy source:
@Override public void serialize(IIngredient ingredient,PacketBuffer buffer){
  if (!(ingredient instanceof ItemStackIngredient))   throw new SteamNSteelException("String_Node_Str");
  final ItemStackIngredient itemStackIngredient=(ItemStackIngredient)ingredient;
  buffer.writeItemStackToBuffer(itemStackIngredient.getItemStack());
}

Fixed version (ground truth):
@Override public void serialize(IIngredient ingredient,PacketBuffer buffer){
  if (!(ingredient instanceof ItemStackIngredient))   throw new SteamNSteelException("String_Node_Str");
  final ItemStackIngredient itemStackIngredient=(ItemStackIngredient)ingredient;
  PacketBufferExtensions.writeLargeItemStackToBuffer(buffer,itemStackIngredient.getItemStack());
}
Program: 12548
Project: 12548
Buggy source:
@Override public IIngredient deserialize(PacketBuffer buffer){
  try {
    return new ItemStackIngredient(buffer.readItemStackFromBuffer());
  }
 catch (  IOException e) {
    throw new SteamNSteelException(e);
  }
}

Fixed version (ground truth):
@Override public IIngredient deserialize(PacketBuffer buffer){
  try {
    return new ItemStackIngredient(PacketBufferExtensions.readLargeItemStackFromBuffer(buffer));
  }
 catch (  IOException e) {
    throw new SteamNSteelException(e);
  }
}
Program: 12549
Project: 12549
Buggy source:
@Override public StructureDefinitionBuilder getStructureBuild(){
  final StructureDefinitionBuilder builder=new StructureDefinitionBuilder();
  builder.assignConstructionDef(ImmutableMap.of('c',"String_Node_Str",'s',"String_Node_Str"));
  builder.assignConstructionBlocks(new String[]{"String_Node_Str"},new String[]{"String_Node_Str"},new String[]{"String_Node_Str"});
  builder.assignToolFormPosition(BlockPosUtil.of(1,1,0));
  builder.setConfiguration(BlockPosUtil.of(0,0,0),new String[]{"String_Node_Str"},new String[]{"String_Node_Str"},new String[]{"String_Node_Str"});
  builder.setCollisionBoxes(new float[]{0.0f,0.0f,0.0f,3.0f,3.0f,1.0f});
  return builder;
}

Fixed version (ground truth):
@Override public StructureDefinitionBuilder getStructureBuild(){
  final StructureDefinitionBuilder builder=new StructureDefinitionBuilder();
  builder.assignConstructionDef(ImmutableMap.of('c',"String_Node_Str",'s',"String_Node_Str"));
  builder.assignConstructionBlocks(new String[]{"String_Node_Str"},new String[]{"String_Node_Str"},new String[]{"String_Node_Str"});
  builder.assignToolFormPosition(BlockPosUtil.of(1,1,0));
  builder.setConfiguration(BlockPosUtil.of(0,0,0),new String[]{"String_Node_Str"},new String[]{"String_Node_Str"},new String[]{"String_Node_Str"});
  builder.setCollisionBoxes(new float[]{0.0f,0.0f,0.0f,3.0f,0.19f,1.0f},new float[]{0.0f,2.81f,0.0f,3.0f,3.0f,1.0f},new float[]{0.0f,0.0f,0.0f,0.19f,3.0f,1.0f},new float[]{2.81f,0.0f,0.0f,3.0f,3.0f,1.0f},new float[]{0.0f,0.0f,0.0f,0.5f,0.5f,1.0f},new float[]{2.5f,0.0f,0.0f,3.0f,0.5f,1.0f},new float[]{0.0f,2.5f,0.0f,0.5f,3.0f,1.0f},new float[]{2.5f,2.5f,0.0f,3.0f,3.0f,1.0f},new float[]{0.0f,0.0f,0.21f,3.0f,3.0f,0.29f});
  return builder;
}
Program: 12551
Project: 12551
Buggy source:
public static void registerTileEntities(){
  GameRegistry.registerTileEntity(RemnantRuinChestTE.class,getTEName(RemnantRuinChestBlock.NAME));
  GameRegistry.registerTileEntity(CupolaTE.class,getTEName(CupolaBlock.NAME));
  GameRegistry.registerTileEntity(SteamNSteelStructureShapeTE.class,getTEName(SteamNSteelStructureShapeBlock.NAME));
  GameRegistry.registerTileEntity(BallMillTE.class,getTEName(SSBallMillStructure.NAME));
  GameRegistry.registerTileEntity(LargeFanTE.class,getTEName(FanLargeStructure.NAME));
  GameRegistry.registerTileEntity(BlastFurnaceTE.class,getTEName(SSBlastFurnaceStructure.NAME));
  GameRegistry.registerTileEntity(BoilerTE.class,getTEName(SSBoilerStructure.NAME));
  GameRegistry.registerTileEntity(PipeTE.class,getTEName(PipeBlock.NAME));
  GameRegistry.registerTileEntity(PipeValveTE.class,getTEName(PipeValveBlock.NAME));
  GameRegistry.registerTileEntity(PipeRedstoneValveTE.class,getTEName(PipeRedstoneValveBlock.NAME));
  GameRegistry.registerTileEntity(PipeJunctionTE.class,getTEName(PipeJunctionBlock.NAME));
  GameRegistry.registerTileEntity(RemnantRuinPillarTE.class,getTEName(RemnantRuinPillarBlock.NAME));
}

Fixed version (ground truth):
public static void registerTileEntities(){
  GameRegistry.registerTileEntity(RemnantRuinChestTE.class,getTEName(RemnantRuinChestBlock.NAME));
  GameRegistry.registerTileEntity(CupolaTE.class,getTEName(CupolaBlock.NAME));
  GameRegistry.registerTileEntity(SteamNSteelStructureShapeTE.class,getTEName(SteamNSteelStructureShapeBlock.NAME));
  GameRegistry.registerTileEntity(ShapeLITE.class,getTEName(ShapeLIBlock.NAME));
  GameRegistry.registerTileEntity(BallMillTE.class,getTEName(SSBallMillStructure.NAME));
  GameRegistry.registerTileEntity(LargeFanTE.class,getTEName(FanLargeStructure.NAME));
  GameRegistry.registerTileEntity(BlastFurnaceTE.class,getTEName(SSBlastFurnaceStructure.NAME));
  GameRegistry.registerTileEntity(BoilerTE.class,getTEName(SSBoilerStructure.NAME));
  GameRegistry.registerTileEntity(PipeTE.class,getTEName(PipeBlock.NAME));
  GameRegistry.registerTileEntity(PipeValveTE.class,getTEName(PipeValveBlock.NAME));
  GameRegistry.registerTileEntity(PipeRedstoneValveTE.class,getTEName(PipeRedstoneValveBlock.NAME));
  GameRegistry.registerTileEntity(PipeJunctionTE.class,getTEName(PipeJunctionBlock.NAME));
  GameRegistry.registerTileEntity(RemnantRuinPillarTE.class,getTEName(RemnantRuinPillarBlock.NAME));
}
Program: 12552
Project: 12552
Buggy source:
@Override public int[] getSlotsForStructureFace(EnumFacing side,BlockPos local){
  return LOCATION_MATERIAL_INPUT.equals(local) ? slotsMaterialInput : slotsDefault;
}

Fixed version (ground truth):
@Override public int[] getSlotsForStructureFace(EnumFacing side,BlockPos local){
  return globalLocationMaterialInput.equals(local) ? slotsMaterialInput : slotsDefault;
}
Program: 12553
Project: 12553
Buggy source:
@Override public boolean canStructureInsertItem(int slot,ItemStack item,EnumFacing side,BlockPos local){
  return isSide(globalDirectionsMaterialInput,side) && local.equals(LOCATION_MATERIAL_INPUT) && isItemValidForSlot(slot,item);
}

Fixed version (ground truth):
@Override public boolean canStructureInsertItem(int slot,ItemStack item,EnumFacing side,BlockPos local){
  return isSide(globalDirectionsMaterialInput,side) && local.equals(globalLocationMaterialInput) && isItemValidForSlot(slot,item);
}
Program: 12555
Project: 12555
Buggy source:
public IBlockState getBlockState(BlockPos pos){
  int x=pos.getX();
  int y=pos.getY();
  int z=pos.getZ();
  if (x < 0 || y < 0 || z < 0 || x >= this.width || y >= this.height || z >= this.length) {
    return null;
  }
  int index=x + (y * length + z) * width;
  int metadata=this.metadata[index];
  final short blockId=this.blocks[index];
  Block block=BLOCK_REGISTRY.getRaw(blockId);
  if (block == null) {
    return null;
  }
  return block.getStateFromMeta(metadata);
}

Fixed version (ground truth):
public IBlockState getBlockState(){
  return blockState;
}
Program: 12556
Project: 12556
Buggy source:
public IBlockState getBlockState(BlockPos pos){
  int x=pos.getX();
  int y=pos.getY();
  int z=pos.getZ();
  if (x < 0 || y < 0 || z < 0 || x >= this.width || y >= this.height || z >= this.length) {
    return null;
  }
  int index=x + (y * length + z) * width;
  int metadata=this.metadata[index];
  final short blockId=this.blocks[index];
  Block block=BLOCK_REGISTRY.getObjectById(blockId);
  if (block == null) {
    return null;
  }
  return block.getStateFromMeta(metadata);
}

Fixed version (ground truth):
public IBlockState getBlockState(BlockPos pos){
  int x=pos.getX();
  int y=pos.getY();
  int z=pos.getZ();
  if (x < 0 || y < 0 || z < 0 || x >= this.width || y >= this.height || z >= this.length) {
    return null;
  }
  int index=x + (y * length + z) * width;
  int metadata=this.metadata[index];
  final short blockId=this.blocks[index];
  Block block=BLOCK_REGISTRY.getRaw(blockId);
  if (block == null) {
    return null;
  }
  return block.getStateFromMeta(metadata);
}
Program: 12557
Project: 12557
Buggy source:
private void craftRecipe(ProjectTableRecipe recipe){
  boolean canCraft=true;
  for (  final ItemStack recipeInput : recipe.getInput()) {
    boolean itemMatched=false;
    for (    final ItemStack playerItem : usableItems) {
      if (recipeInput.isItemEqual(playerItem)) {
        itemMatched=true;
        if (recipeInput.stackSize > playerItem.stackSize) {
          canCraft=false;
        }
      }
    }
    if (!itemMatched) {
      canCraft=false;
    }
  }
  if (canCraft) {
    Proxies.network.getNetwork().sendToServer(new ProjectTableCraftPacket(recipe));
    processPlayerInventory();
  }
}

Fixed version (ground truth):
private void craftRecipe(ProjectTableRecipe recipe){
  Proxies.network.getNetwork().sendToServer(new ProjectTableCraftPacket(recipe));
}
Program: 12558
Project: 12558
Buggy source:
@Override protected void drawGuiContainerBackgroundLayer(float partialTicks,int mouseX,int mouseY){
  super.drawGuiContainerBackgroundLayer(partialTicks,mouseX,mouseY);
  searchField.drawTextBox();
}

Fixed version (ground truth):
@Override protected void drawGuiContainerBackgroundLayer(float partialTicks,int mouseX,int mouseY){
  super.drawGuiContainerBackgroundLayer(partialTicks,mouseX,mouseY);
  searchField.drawTextBox();
  guiRenderer.notifyTextureChanged();
}
Program: 12559
Project: 12559
Buggy source:
@Override public void initGui(){
  xSize=176;
  ySize=227;
  super.initGui();
  recipeList=Lists.newArrayList(new ProjectTableRecipe(new ItemStack(ModBlock.blockSteel,1),new ItemStack(ModItem.ingotSteel,15)),new ProjectTableRecipe(new ItemStack(Items.diamond,10),new ItemStack(Blocks.dirt,64),new ItemStack(Blocks.dirt,64),new ItemStack(Blocks.dirt,64)),new ProjectTableRecipe(new ItemStack(Items.diamond,1),new ItemStack(Blocks.dirt,64),new ItemStack(Blocks.dirt,64)),new ProjectTableRecipe(new ItemStack(Items.diamond,1),new ItemStack(Blocks.dirt,64),new ItemStack(Blocks.dirt,64)),new ProjectTableRecipe(new ItemStack(Items.diamond,1),new ItemStack(Blocks.dirt,64),new ItemStack(Blocks.dirt,64)),new ProjectTableRecipe(new ItemStack(Items.diamond,1),new ItemStack(Blocks.dirt,64),new ItemStack(Blocks.dirt,64)),new ProjectTableRecipe(new ItemStack(Items.diamond,1),new ItemStack(Blocks.dirt,64),new ItemStack(Blocks.dirt,64)));
  filteredList=Lists.newArrayList(recipeList);
  searchField=new GuiTextField(0,fontRendererObj,guiLeft + 9,guiTop + 9,151,fontRendererObj.FONT_HEIGHT);
  searchField.setMaxStringLength(60);
  searchField.setEnableBackgroundDrawing(false);
  searchField.setVisible(true);
  searchField.setTextColor(16777215);
  searchField.setFocused(true);
  createComponents();
  processPlayerInventory();
  setRecipeRenderText();
}

Fixed version (ground truth):
@Override public void initGui(){
  xSize=176;
  ySize=227;
  super.initGui();
  recipeList=Lists.newArrayList(new ProjectTableRecipe(new ItemStack(ModBlock.blockSteel,1),new ItemStack(ModItem.ingotSteel,15)),new ProjectTableRecipe(new ItemStack(Items.diamond,10),new ItemStack(Blocks.dirt,64),new ItemStack(Blocks.dirt,64),new ItemStack(Blocks.dirt,64)),new ProjectTableRecipe(new ItemStack(Items.gold_nugget,1),new ItemStack(Blocks.gold_block,64),new ItemStack(Blocks.gold_ore,64),new ItemStack(Blocks.beacon,64),new ItemStack(Blocks.brown_mushroom_block,64)),new ProjectTableRecipe(new ItemStack(Items.diamond,1),new ItemStack(Blocks.dirt,64),new ItemStack(Blocks.dirt,64)),new ProjectTableRecipe(new ItemStack(Items.diamond,1),new ItemStack(Blocks.dirt,64),new ItemStack(Blocks.dirt,64)),new ProjectTableRecipe(new ItemStack(Items.diamond,1),new ItemStack(Blocks.dirt,64),new ItemStack(Blocks.dirt,64)),new ProjectTableRecipe(new ItemStack(Items.diamond,1),new ItemStack(Blocks.dirt,64),new ItemStack(Blocks.dirt,64)));
  filteredList=Lists.newArrayList(recipeList);
  searchField=new GuiTextField(0,fontRendererObj,guiLeft + 9,guiTop + 9,151,fontRendererObj.FONT_HEIGHT);
  searchField.setMaxStringLength(60);
  searchField.setEnableBackgroundDrawing(false);
  searchField.setVisible(true);
  searchField.setTextColor(16777215);
  searchField.setFocused(true);
  createComponents();
  processPlayerInventory();
  setRecipeRenderText();
}
Program: 12560
Project: 12560
Buggy source:
protected void createComponents(){
  final GuiRenderer guiRenderer=new GuiRenderer(mc,mc.getTextureManager(),fontRendererObj,itemRender);
  final GuiSubTexture guiBackground=new GuiSubTexture(TEXTURE,new Rectangle(0,0,176,227));
  final GuiTexture inactiveHandle=new GuiSubTexture(TEXTURE,new Rectangle(176,0,12,15));
  final GuiTexture activeHandle=new GuiSubTexture(TEXTURE,new Rectangle(176 + 12,0,12,15));
  final GuiTexture craftableSubtexture=new GuiSubTexture(TEXTURE,new Rectangle(0,227,142,23));
  final GuiTexture uncraftableSubtexture=new GuiSubTexture(TEXTURE,new Rectangle(0,227 + 23,142,23));
  setRootControl(new TexturedPaneControl(guiRenderer,176,227,guiBackground));
  scrollbarGuiComponent=new ScrollbarControl(guiRenderer,activeHandle,inactiveHandle);
  scrollbarGuiComponent.setLocation(156,24);
  scrollbarGuiComponent.setSize(20,115);
  final ProjectTableRecipeControl templateRecipeControl=new ProjectTableRecipeControl(guiRenderer,craftableSubtexture,uncraftableSubtexture);
  recipeListGuiComponent=new ScrollPaneControl<ProjectTableRecipe,ProjectTableRecipeControl>(guiRenderer,141,23 * 5).setScrollbar(scrollbarGuiComponent).setItemRendererTemplate(templateRecipeControl).setVisibleItemCount(5).setItems(filteredList);
  recipeListGuiComponent.setLocation(8,24);
  addChild(recipeListGuiComponent);
  addChild(scrollbarGuiComponent);
  templateRecipeControl.addOnRecipeCraftingEventListener(new RecipeCraftingEventListener());
}

Fixed version (ground truth):
protected void createComponents(){
  guiRenderer=new GuiRenderer(mc,mc.getTextureManager(),fontRendererObj,itemRender);
  final GuiSubTexture guiBackground=new GuiSubTexture(TEXTURE,new Rectangle(0,0,176,227));
  final GuiTexture inactiveHandle=new GuiSubTexture(TEXTURE,new Rectangle(176,0,12,15));
  final GuiTexture activeHandle=new GuiSubTexture(TEXTURE,new Rectangle(176 + 12,0,12,15));
  final GuiTexture craftableSubtexture=new GuiSubTexture(TEXTURE,new Rectangle(0,227,142,23));
  final GuiTexture uncraftableSubtexture=new GuiSubTexture(TEXTURE,new Rectangle(0,227 + 23,142,23));
  setRootControl(new TexturedPaneControl(guiRenderer,176,227,guiBackground));
  scrollbarGuiComponent=new ScrollbarControl(guiRenderer,activeHandle,inactiveHandle);
  scrollbarGuiComponent.setLocation(156,24);
  scrollbarGuiComponent.setSize(20,115);
  final ProjectTableRecipeControl templateRecipeControl=new ProjectTableRecipeControl(guiRenderer,craftableSubtexture,uncraftableSubtexture);
  recipeListGuiComponent=new ScrollPaneControl<ProjectTableRecipe,ProjectTableRecipeControl>(guiRenderer,141,23 * 5).setScrollbar(scrollbarGuiComponent).setItemRendererTemplate(templateRecipeControl).setVisibleItemCount(5).setItems(filteredList);
  recipeListGuiComponent.setLocation(8,24);
  addChild(recipeListGuiComponent);
  addChild(scrollbarGuiComponent);
  templateRecipeControl.addOnRecipeCraftingEventListener(new RecipeCraftingEventListener());
}
Program: 12562
Project: 12562
Buggy source:
public ProjectTableRecipeControl(GuiRenderer guiRenderer,GuiTexture craftableTexture,GuiTexture uncraftableTexture){
  super(guiRenderer,new Rectangle(0,0,craftableTexture.getBounds().getWidth(),craftableTexture.getBounds().getHeight()));
  this.craftableTexture=craftableTexture;
  this.uncraftableTexture=uncraftableTexture;
}

Fixed version (ground truth):
public ProjectTableRecipeControl(GuiRenderer guiRenderer,GuiTexture craftableTexture,GuiTexture uncraftableTexture){
  super(guiRenderer,new Rectangle(0,0,craftableTexture.getBounds().getWidth(),craftableTexture.getBounds().getHeight()));
  this.craftableTexture=craftableTexture;
  this.uncraftableTexture=uncraftableTexture;
  setDefaultTexture(craftableTexture);
  setDisabledTexture(uncraftableTexture);
  setHoverTexture(craftableTexture);
  setPressedTexture(uncraftableTexture);
}
Program: 12563
Project: 12563
Buggy source:
@Override public IMessage onMessage(ProjectTableCraftPacket message,MessageContext ctx){
  InventoryPlayer playerInventory=ctx.getServerHandler().playerEntity.inventory;
  ProjectTableRecipe recipe=message.getRecipe();
  for (  final ItemStack itemStack : recipe.getInput()) {
    playerInventory.clearMatchingItems(itemStack.getItem(),itemStack.getMetadata(),itemStack.stackSize,itemStack.getTagCompound());
    playerInventory.markDirty();
  }
  for (  final ItemStack itemStack : recipe.getOutput()) {
    ItemStack copy=itemStack.copy();
    if (!playerInventory.addItemStackToInventory(copy)) {
    }
 else {
      playerInventory.markDirty();
    }
  }
  return null;
}

Fixed version (ground truth):
@Override public IMessage onMessage(final ProjectTableCraftPacket message,final MessageContext ctx){
  final InventoryPlayer playerInventory=ctx.getServerHandler().playerEntity.inventory;
  final ProjectTableRecipe recipe=message.getRecipe();
  final List<ItemStack> compactedInventoryItems=getCompactedInventoryItems(playerInventory);
  boolean canCraft=true;
  for (  final ItemStack recipeInput : recipe.getConsolidatedInput()) {
    boolean itemMatched=false;
    for (    final ItemStack playerItem : compactedInventoryItems) {
      if (recipeInput.getItem() == playerItem.getItem() && recipeInput.getMetadata() == playerItem.getMetadata() && ItemStack.areItemStackTagsEqual(recipeInput,playerItem)) {
        itemMatched=true;
        if (recipeInput.stackSize > playerItem.stackSize) {
          canCraft=false;
        }
      }
    }
    if (!itemMatched) {
      canCraft=false;
    }
  }
  if (!canCraft) {
    return null;
  }
  IThreadListener mainThread=(WorldServer)ctx.getServerHandler().playerEntity.worldObj;
  mainThread.addScheduledTask(new Runnable(){
    @Override public void run(){
      for (      final ItemStack itemStack : recipe.getInput()) {
        playerInventory.clearMatchingItems(itemStack.getItem(),itemStack.getMetadata(),itemStack.stackSize,itemStack.getTagCompound());
        playerInventory.markDirty();
      }
      for (      final ItemStack itemStack : recipe.getOutput()) {
        ItemStack copy=itemStack.copy();
        if (!playerInventory.addItemStackToInventory(copy)) {
          ctx.getServerHandler().playerEntity.dropPlayerItemWithRandomChoice(copy,true);
        }
 else {
          playerInventory.markDirty();
        }
      }
    }
  }
);
  return null;
}
Program: 12565
Project: 12565
Buggy source:
public void generate(){
  Logger.info("String_Node_Str",intersection.getX(),intersection.getY());
  if (ruin.height == null) {
    Chunk chunk=world.getChunkFromChunkCoords(chunkX,chunkZ);
    ruin.height=chunk.heightMapMinimum - ruin.schematic.heightOffset;
  }
  WorldGen.schematicLoader.renderSchematicToSingleChunk(ruin.schematic.resource,world,intersection.getX(),ruin.height,intersection.getY(),chunkX,chunkZ,ForgeDirection.NORTH,false);
}

Fixed version (ground truth):
public void generate(){
  if (!ruin.hasGenerationStarted()) {
    Logger.info("String_Node_Str",ruin.schematic.resource,intersection.getX(),intersection.getY());
    ruin.setGenerationStarted();
  }
  if (ruin.height == null) {
    Chunk chunk=world.getChunkFromChunkCoords(chunkX,chunkZ);
    ruin.height=chunk.heightMapMinimum - ruin.schematic.heightOffset;
  }
  WorldGen.schematicLoader.renderSchematicToSingleChunk(ruin.schematic.resource,world,intersection.getX(),ruin.height,intersection.getY(),chunkX,chunkZ,ForgeDirection.NORTH,false);
}
Program: 12566
Project: 12566
Buggy source:
private void registerTESRs(){
  PipeBlock.setRenderType(RenderingRegistry.getNextAvailableRenderId());
  PipeValveBlock.setRenderType(RenderingRegistry.getNextAvailableRenderId());
  PipeRedstoneValveBlock.setRenderType(RenderingRegistry.getNextAvailableRenderId());
  PipeJunctionBlock.setRenderType(RenderingRegistry.getNextAvailableRenderId());
  ClientRegistry.bindTileEntitySpecialRenderer(CupolaTE.class,new CupbolaTESR());
  ClientRegistry.bindTileEntitySpecialRenderer(PipeTE.class,new PipeTESR());
  ClientRegistry.bindTileEntitySpecialRenderer(PipeValveTE.class,new PipeValveTESR());
  ClientRegistry.bindTileEntitySpecialRenderer(PipeRedstoneValveTE.class,new PipeRedstoneValveTESR());
  ClientRegistry.bindTileEntitySpecialRenderer(PipeJunctionTE.class,new PipeJunctionTESR());
  ClientRegistry.bindTileEntitySpecialRenderer(PlotoniumChestTE.class,new PlotoniumChestTESR());
}

Fixed version (ground truth):
private void registerTESRs(){
  PipeBlock.setRenderType(RenderingRegistry.getNextAvailableRenderId());
  PipeValveBlock.setRenderType(RenderingRegistry.getNextAvailableRenderId());
  PipeRedstoneValveBlock.setRenderType(RenderingRegistry.getNextAvailableRenderId());
  PipeJunctionBlock.setRenderType(RenderingRegistry.getNextAvailableRenderId());
  ClientRegistry.bindTileEntitySpecialRenderer(CupolaTE.class,new CupolaTESR());
  ClientRegistry.bindTileEntitySpecialRenderer(PipeTE.class,new PipeTESR());
  ClientRegistry.bindTileEntitySpecialRenderer(PipeValveTE.class,new PipeValveTESR());
  ClientRegistry.bindTileEntitySpecialRenderer(PipeRedstoneValveTE.class,new PipeRedstoneValveTESR());
  ClientRegistry.bindTileEntitySpecialRenderer(PipeJunctionTE.class,new PipeJunctionTESR());
  ClientRegistry.bindTileEntitySpecialRenderer(PlotoniumChestTE.class,new PlotoniumChestTESR());
}