Program: 10486
Project: 10486
Buggy source:
/** 
 * Gets a Item Object from a string form.
 * @param string  the string or dScript argument String
 * @return  an Item, or null if incorrectly formatted
 */
public static Item valueOf(String string){
  if (string == null)   return null;
  Matcher[] m=new Matcher[4];
  Item stack=null;
  m[0]=getItemPtrn[4].matcher(string);
  if (m[0].matches()) {
  }
  m[0]=getItemPtrn[0].matcher(string);
  m[1]=getItemPtrn[1].matcher(string);
  m[2]=getItemPtrn[2].matcher(string);
  m[3]=getItemPtrn[3].matcher(string);
  try {
    if (m[0].matches()) {
      stack=new Item(Integer.valueOf(m[0].group(1)));
      stack.setDurability(Short.valueOf(m[0].group(2)));
      return stack.setId(stack.getType().name());
    }
 else     if (m[1].matches()) {
      stack=new Item(Integer.valueOf(m[1].group(1)));
      stack.setId(stack.getType().name());
      return stack;
    }
 else     if (m[2].matches()) {
      stack=new Item(Material.valueOf(m[2].group(1).toUpperCase()));
      stack.setDurability(Short.valueOf(m[2].group(2)));
      return stack.setId(stack.getType().name());
    }
 else     if (m[3].matches()) {
      stack=new Item(Material.valueOf(m[3].group(1).toUpperCase()));
      stack.setId(stack.getType().name());
      return stack;
    }
  }
 catch (  Exception e) {
  }
  m[0]=getItemPtrn[5].matcher(string);
  if (m[0].matches()) {
    Script itemScript=Script.valueOf(m[3].group(1));
    if (itemScript != null && itemScript.getType().equalsIgnoreCase("String_Node_Str")) {
      if (itemScript.getContents().contains("String_Node_Str"))       stack=Item.valueOf(itemScript.getContents().getString("String_Node_Str"));
      if (stack == null)       return null;
      ItemMeta meta=stack.getItemMeta();
      if (itemScript.getContents().contains("String_Node_Str"))       meta.setDisplayName(itemScript.getContents().getString("String_Node_Str"));
      if (itemScript.getContents().contains("String_Node_Str"))       meta.setLore(itemScript.getContents().getStringList("String_Node_Str"));
      stack.setItemMeta(meta);
      if (itemScript.getContents().contains("String_Node_Str")) {
        for (        String enchantment : itemScript.getContents().getStringList("String_Node_Str")) {
          try {
            int level=1;
            if (enchantment.split("String_Node_Str").length > 1) {
              level=Integer.valueOf(enchantment.split("String_Node_Str")[1]);
              enchantment=enchantment.split("String_Node_Str")[0];
            }
            Enchantment ench=Enchantment.getByName(enchantment.toUpperCase());
            stack.addEnchantment(ench,level);
          }
 catch (          Exception e) {
            continue;
          }
        }
      }
      if (itemScript.getContents().contains("String_Node_Str"))       LeatherColorer.colorArmor(stack,itemScript.getContents().getString("String_Node_Str"));
      stack.setId(itemScript.getName());
      return stack;
    }
  }
  dB.echoError("String_Node_Str");
  return stack;
}

Fixed version (ground truth):
/** 
 * Gets a Item Object from a string form.
 * @param string  the string or dScript argument String
 * @return  an Item, or null if incorrectly formatted
 */
public static Item valueOf(String string){
  if (string == null)   return null;
  Matcher[] m=new Matcher[4];
  Item stack=null;
  m[0]=getItemPtrn[4].matcher(string);
  if (m[0].matches()) {
  }
  m[0]=getItemPtrn[0].matcher(string);
  m[1]=getItemPtrn[1].matcher(string);
  m[2]=getItemPtrn[2].matcher(string);
  m[3]=getItemPtrn[3].matcher(string);
  try {
    if (m[0].matches()) {
      stack=new Item(Integer.valueOf(m[0].group(1)));
      stack.setDurability(Short.valueOf(m[0].group(2)));
      return stack.setId(stack.getType().name());
    }
 else     if (m[1].matches()) {
      stack=new Item(Integer.valueOf(m[1].group(1)));
      stack.setId(stack.getType().name());
      return stack;
    }
 else     if (m[2].matches()) {
      stack=new Item(Material.valueOf(m[2].group(1).toUpperCase()));
      stack.setDurability(Short.valueOf(m[2].group(2)));
      return stack.setId(stack.getType().name());
    }
 else     if (m[3].matches()) {
      stack=new Item(Material.valueOf(m[3].group(1).toUpperCase()));
      stack.setId(stack.getType().name());
      return stack;
    }
  }
 catch (  Exception e) {
  }
  m[0]=getItemPtrn[5].matcher(string);
  if (m[0].matches()) {
    Script itemScript=Script.valueOf(m[0].group(1));
    if (itemScript != null && itemScript.getType().equalsIgnoreCase("String_Node_Str")) {
      if (itemScript.getContents().contains("String_Node_Str"))       stack=Item.valueOf(itemScript.getContents().getString("String_Node_Str"));
      if (stack == null)       return null;
      ItemMeta meta=stack.getItemMeta();
      if (itemScript.getContents().contains("String_Node_Str"))       meta.setDisplayName(itemScript.getContents().getString("String_Node_Str"));
      if (itemScript.getContents().contains("String_Node_Str"))       meta.setLore(itemScript.getContents().getStringList("String_Node_Str"));
      stack.setItemMeta(meta);
      if (itemScript.getContents().contains("String_Node_Str")) {
        for (        String enchantment : itemScript.getContents().getStringList("String_Node_Str")) {
          try {
            int level=1;
            if (enchantment.split("String_Node_Str").length > 1) {
              level=Integer.valueOf(enchantment.split("String_Node_Str")[1]);
              enchantment=enchantment.split("String_Node_Str")[0];
            }
            Enchantment ench=Enchantment.getByName(enchantment.toUpperCase());
            stack.addEnchantment(ench,level);
          }
 catch (          Exception e) {
            continue;
          }
        }
      }
      if (itemScript.getContents().contains("String_Node_Str"))       LeatherColorer.colorArmor(stack,itemScript.getContents().getString("String_Node_Str"));
      stack.setId(itemScript.getName());
      return stack;
    }
  }
  dB.echoError("String_Node_Str");
  return stack;
}