Program: 166041
Project: 166041
Buggy source:
private boolean checkDimletCrafting(){
  ItemStack stackBase=inventoryHelper.getStacks()[DimletWorkbenchContainer.SLOT_BASE];
  if (stackBase == null) {
    return false;
  }
  ItemStack stackController=inventoryHelper.getStacks()[DimletWorkbenchContainer.SLOT_CONTROLLER];
  if (stackController == null) {
    return false;
  }
  ItemStack stackTypeController=inventoryHelper.getStacks()[DimletWorkbenchContainer.SLOT_TYPE_CONTROLLER];
  if (stackTypeController == null) {
    return false;
  }
  ItemStack stackMemory=inventoryHelper.getStacks()[DimletWorkbenchContainer.SLOT_MEMORY];
  if (stackMemory == null) {
    return false;
  }
  ItemStack stackEnergy=inventoryHelper.getStacks()[DimletWorkbenchContainer.SLOT_ENERGY];
  if (stackEnergy == null) {
    return false;
  }
  ItemStack stackEssence=inventoryHelper.getStacks()[DimletWorkbenchContainer.SLOT_ESSENCE];
  if (stackEssence == null) {
    return false;
  }
  NBTTagCompound essenceCompound=stackEssence.getTagCompound();
  DimletType type=DimletType.values()[stackTypeController.getItemDamage()];
switch (type) {
case DIMLET_BIOME:
    if (!isValidBiomeEssence(stackEssence,essenceCompound))     return false;
  int biomeDimlet=findBiomeDimlet(essenceCompound);
if (biomeDimlet == -1) {
  return false;
}
if (!matchDimletRecipe(biomeDimlet,stackController,stackMemory,stackEnergy)) {
return false;
}
inventoryHelper.setInventorySlotContents(1,DimletWorkbenchContainer.SLOT_OUTPUT,new ItemStack(ModItems.knownDimlet,1,biomeDimlet));
break;
case DIMLET_MOBS:
if (!isValidMobEssence(stackEssence,essenceCompound)) return false;
int mobDimlet=essenceCompound.getInteger("String_Node_Str");
if (!matchDimletRecipe(mobDimlet,stackController,stackMemory,stackEnergy)) {
return false;
}
inventoryHelper.setInventorySlotContents(1,DimletWorkbenchContainer.SLOT_OUTPUT,new ItemStack(ModItems.knownDimlet,1,mobDimlet));
break;
case DIMLET_SPECIAL:
if (!isValidSpecialEssence(stackEssence,essenceCompound)) return false;
int specialDimlet=findSpecialDimlet(stackEssence);
if (specialDimlet == -1) {
return false;
}
if (!matchDimletRecipe(specialDimlet,stackController,stackMemory,stackEnergy)) {
return false;
}
inventoryHelper.setInventorySlotContents(1,DimletWorkbenchContainer.SLOT_OUTPUT,new ItemStack(ModItems.knownDimlet,1,specialDimlet));
break;
case DIMLET_FOLIAGE:
case DIMLET_LIQUID:
case DIMLET_MATERIAL:
case DIMLET_SKY:
case DIMLET_STRUCTURE:
case DIMLET_TERRAIN:
case DIMLET_FEATURE:
case DIMLET_TIME:
case DIMLET_DIGIT:
case DIMLET_EFFECT:
case DIMLET_CONTROLLER:
return false;
}
return true;
}

Fixed version (ground truth):
private boolean checkDimletCrafting(){
  ItemStack stackBase=inventoryHelper.getStacks()[DimletWorkbenchContainer.SLOT_BASE];
  if (stackBase == null) {
    return false;
  }
  ItemStack stackController=inventoryHelper.getStacks()[DimletWorkbenchContainer.SLOT_CONTROLLER];
  if (stackController == null) {
    return false;
  }
  ItemStack stackTypeController=inventoryHelper.getStacks()[DimletWorkbenchContainer.SLOT_TYPE_CONTROLLER];
  if (stackTypeController == null) {
    return false;
  }
  ItemStack stackMemory=inventoryHelper.getStacks()[DimletWorkbenchContainer.SLOT_MEMORY];
  if (stackMemory == null) {
    return false;
  }
  ItemStack stackEnergy=inventoryHelper.getStacks()[DimletWorkbenchContainer.SLOT_ENERGY];
  if (stackEnergy == null) {
    return false;
  }
  ItemStack stackEssence=inventoryHelper.getStacks()[DimletWorkbenchContainer.SLOT_ESSENCE];
  if (stackEssence == null) {
    return false;
  }
  NBTTagCompound essenceCompound=stackEssence.getTagCompound();
  DimletType type=DimletType.values()[stackTypeController.getItemDamage()];
switch (type) {
case DIMLET_BIOME:
    if (!isValidBiomeEssence(stackEssence,essenceCompound))     return false;
  int biomeDimlet=findBiomeDimlet(essenceCompound);
if (biomeDimlet == -1) {
  return false;
}
if (!matchDimletRecipe(biomeDimlet,stackController,stackMemory,stackEnergy)) {
return false;
}
inventoryHelper.setInventorySlotContents(1,DimletWorkbenchContainer.SLOT_OUTPUT,new ItemStack(ModItems.knownDimlet,1,biomeDimlet));
break;
case DIMLET_MOBS:
if (!isValidMobEssence(stackEssence,essenceCompound)) return false;
String mob=essenceCompound.getString("String_Node_Str");
int mobDimlet=KnownDimletConfiguration.dimletToID.get(new DimletKey(DimletType.DIMLET_MOBS,mob));
if (!matchDimletRecipe(mobDimlet,stackController,stackMemory,stackEnergy)) {
return false;
}
inventoryHelper.setInventorySlotContents(1,DimletWorkbenchContainer.SLOT_OUTPUT,new ItemStack(ModItems.knownDimlet,1,mobDimlet));
break;
case DIMLET_SPECIAL:
if (!isValidSpecialEssence(stackEssence,essenceCompound)) return false;
int specialDimlet=findSpecialDimlet(stackEssence);
if (specialDimlet == -1) {
return false;
}
if (!matchDimletRecipe(specialDimlet,stackController,stackMemory,stackEnergy)) {
return false;
}
inventoryHelper.setInventorySlotContents(1,DimletWorkbenchContainer.SLOT_OUTPUT,new ItemStack(ModItems.knownDimlet,1,specialDimlet));
break;
case DIMLET_FOLIAGE:
case DIMLET_LIQUID:
case DIMLET_MATERIAL:
case DIMLET_SKY:
case DIMLET_STRUCTURE:
case DIMLET_TERRAIN:
case DIMLET_FEATURE:
case DIMLET_TIME:
case DIMLET_DIGIT:
case DIMLET_EFFECT:
case DIMLET_CONTROLLER:
return false;
}
return true;
}