Program: 30639
Project: 30639
Buggy source:
public IAEItemStack request(MECraftingInventory inv,long l,BaseActionSource src) throws CraftBranchFailure, InterruptedException {
  job.handlepausing();
  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)           used.add(job.checkUse(available));
          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)       used.add(job.checkUse(available));
      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);
          pro.request(subInv,1,src);
          subInv.commit(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;
        }
      }
 catch (      CraftBranchFailure fail) {
        pro.possible=true;
      }
    }
  }
  if (sim) {
    missing+=l;
    bytes+=l;
    IAEItemStack rv=what.copy();
    rv.setStackSize(l);
    return rv;
  }
  throw new CraftBranchFailure(what,l);
}

Fixed version (ground truth):
public IAEItemStack request(MECraftingInventory inv,long l,BaseActionSource src) throws CraftBranchFailure, InterruptedException {
  job.handlepausing();
  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)           used.add(job.checkUse(available));
          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)       used.add(job.checkUse(available));
      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);
          subInv.commit(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;
        }
      }
 catch (      CraftBranchFailure fail) {
        pro.possible=true;
      }
    }
  }
  if (sim) {
    missing+=l;
    bytes+=l;
    IAEItemStack rv=what.copy();
    rv.setStackSize(l);
    return rv;
  }
  throw new CraftBranchFailure(what,l);
}