Program: 10475
Project: 10475
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) {
    e.printStackTrace();
  }
  m[0]=getItemPtrn[5].matcher(string);
  if (m[0].matches() && ScriptRegistry.containsScript(m[0].group(1),InteractScriptContainer.class)) {
    return ScriptRegistry.getScriptContainerAs(m[0].group(1),ItemScriptContainer.class).getItemFrom();
  }
  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() && ScriptRegistry.containsScript(m[0].group(1),ItemScriptContainer.class)) {
    return ScriptRegistry.getScriptContainerAs(m[0].group(1),ItemScriptContainer.class).getItemFrom();
  }
  return stack;
}