Program: 30608
Project: 30608
Buggy source:
public IAEItemStack request(MECraftingInventory inv,long l,BaseActionSource src) throws CraftBranchFailure, InterruptedException {
  job.handlepausing();
  List<IAEItemStack> thingsUsed=new LinkedList();
  what.setStackSize(l);
  if (slot >= 0 && parent != null && parent.details.isCraftable()) {
    for (    IAEItemStack fuzz : inv.getItemList().findFuzzy(what,FuzzyMode.IGNORE_ALL)) {
      if (parent.details.isValidItemForSlot(slot,fuzz.getItemStack(),world)) {
        fuzz=fuzz.copy();
        fuzz.setStackSize(l);
        IAEItemStack available=inv.extractItems(fuzz,Actionable.MODULATE,src);
        if (available != null) {
          if (!exhausted) {
            IAEItemStack is=job.checkUse(available);
            if (is != null) {
              thingsUsed.add(is.copy());
              used.add(is);
            }
          }
          bytes+=available.getStackSize();
          l-=available.getStackSize();
          if (l == 0)           return available;
        }
      }
    }
  }
 else {
    IAEItemStack available=inv.extractItems(what,Actionable.MODULATE,src);
    if (available != null) {
      if (!exhausted) {
        IAEItemStack is=job.checkUse(available);
        if (is != null) {
          thingsUsed.add(is.copy());
          used.add(is);
        }
      }
      bytes+=available.getStackSize();
      l-=available.getStackSize();
      if (l == 0)       return available;
    }
  }
  exhausted=true;
  if (nodes.size() == 1) {
    CraftingTreeProcess pro=nodes.get(0);
    while (pro.possible && l > 0) {
      pro.request(inv,pro.getTimes(l,pro.getAmountCrafted(what).getStackSize()),src);
      what.setStackSize(l);
      IAEItemStack available=inv.extractItems(what,Actionable.MODULATE,src);
      if (available != null) {
        bytes+=available.getStackSize();
        l-=available.getStackSize();
        if (l <= 0)         return available;
      }
 else       pro.possible=false;
    }
  }
 else   if (nodes.size() > 1) {
    for (    CraftingTreeProcess pro : nodes) {
      try {
        while (pro.possible && l > 0) {
          MECraftingInventory subInv=new MECraftingInventory(inv,true,true,true);
          pro.request(subInv,1,src);
          what.setStackSize(l);
          IAEItemStack available=subInv.extractItems(what,Actionable.MODULATE,src);
          if (available != null) {
            subInv.commit(src);
            bytes+=available.getStackSize();
            l-=available.getStackSize();
            if (l <= 0)             return available;
          }
 else           pro.possible=false;
        }
      }
 catch (      CraftBranchFailure fail) {
        pro.possible=true;
      }
    }
  }
  if (sim) {
    missing+=l;
    bytes+=l;
    IAEItemStack rv=what.copy();
    rv.setStackSize(l);
    return rv;
  }
  for (  IAEItemStack o : thingsUsed) {
    job.refund(o.copy());
    o.setStackSize(-o.getStackSize());
    used.add(o);
  }
  throw new CraftBranchFailure(what,l);
}

Fixed version (ground truth):
public IAEItemStack request(MECraftingInventory inv,long l,BaseActionSource src) throws CraftBranchFailure, InterruptedException {
  job.handlepausing();
  List<IAEItemStack> thingsUsed=new LinkedList();
  what.setStackSize(l);
  if (slot >= 0 && parent != null && parent.details.isCraftable()) {
    for (    IAEItemStack fuzz : inv.getItemList().findFuzzy(what,FuzzyMode.IGNORE_ALL)) {
      if (parent.details.isValidItemForSlot(slot,fuzz.getItemStack(),world)) {
        fuzz=fuzz.copy();
        fuzz.setStackSize(l);
        IAEItemStack available=inv.extractItems(fuzz,Actionable.MODULATE,src);
        if (available != null) {
          if (!exhausted) {
            IAEItemStack is=job.checkUse(available);
            if (is != null) {
              thingsUsed.add(is.copy());
              used.add(is);
            }
          }
          bytes+=available.getStackSize();
          l-=available.getStackSize();
          if (l == 0)           return available;
        }
      }
    }
  }
 else {
    IAEItemStack available=inv.extractItems(what,Actionable.MODULATE,src);
    if (available != null) {
      if (!exhausted) {
        IAEItemStack is=job.checkUse(available);
        if (is != null) {
          thingsUsed.add(is.copy());
          used.add(is);
        }
      }
      bytes+=available.getStackSize();
      l-=available.getStackSize();
      if (l == 0)       return available;
    }
  }
  exhausted=true;
  if (nodes.size() == 1) {
    CraftingTreeProcess pro=nodes.get(0);
    while (pro.possible && l > 0) {
      IAEItemStack madeWhat=pro.getAmountCrafted(what);
      pro.request(inv,pro.getTimes(l,madeWhat.getStackSize()),src);
      madeWhat.setStackSize(l);
      IAEItemStack available=inv.extractItems(madeWhat,Actionable.MODULATE,src);
      if (available != null) {
        bytes+=available.getStackSize();
        l-=available.getStackSize();
        if (l <= 0)         return available;
      }
 else       pro.possible=false;
    }
  }
 else   if (nodes.size() > 1) {
    for (    CraftingTreeProcess pro : nodes) {
      try {
        while (pro.possible && l > 0) {
          MECraftingInventory subInv=new MECraftingInventory(inv,true,true,true);
          pro.request(subInv,1,src);
          what.setStackSize(l);
          IAEItemStack available=subInv.extractItems(what,Actionable.MODULATE,src);
          if (available != null) {
            subInv.commit(src);
            bytes+=available.getStackSize();
            l-=available.getStackSize();
            if (l <= 0)             return available;
          }
 else           pro.possible=false;
        }
      }
 catch (      CraftBranchFailure fail) {
        pro.possible=true;
      }
    }
  }
  if (sim) {
    missing+=l;
    bytes+=l;
    IAEItemStack rv=what.copy();
    rv.setStackSize(l);
    return rv;
  }
  for (  IAEItemStack o : thingsUsed) {
    job.refund(o.copy());
    o.setStackSize(-o.getStackSize());
    used.add(o);
  }
  throw new CraftBranchFailure(what,l);
}