Program: 38827
Project: 38827
Buggy source:
public void insertInventory(xAuthPlayer xPlayer){
  try {
    prepStmt=connection.prepareStatement("String_Node_Str" + "String_Node_Str" + xAuthSettings.tblInventory + "String_Node_Str"+ "String_Node_Str");
    prepStmt.setString(1,xPlayer.getPlayerName());
    rs=prepStmt.executeQuery();
    if (rs.next())     return;
  }
 catch (  SQLException e) {
    xAuthLog.severe("String_Node_Str" + xPlayer.getPlayerName(),e);
  }
  PlayerInventory inv=xPlayer.getPlayer().getInventory();
  StringBuilder sbItems=new StringBuilder();
  StringBuilder sbAmount=new StringBuilder();
  StringBuilder sbDurability=new StringBuilder();
  for (  ItemStack item : inv.getContents()) {
    int itemid=0;
    int amount=0;
    short durability=0;
    if (item != null) {
      itemid=item.getTypeId();
      amount=item.getAmount();
      durability=item.getDurability();
    }
    sbItems.append(itemid + "String_Node_Str");
    sbAmount.append(amount + "String_Node_Str");
    sbDurability.append(durability + "String_Node_Str");
  }
  for (  ItemStack item : inv.getArmorContents()) {
    int itemid=0;
    int amount=0;
    short durability=0;
    if (item != null) {
      itemid=item.getTypeId();
      amount=item.getAmount();
      durability=item.getDurability();
    }
    sbItems.append(itemid + "String_Node_Str");
    sbAmount.append(amount + "String_Node_Str");
    sbDurability.append(durability + "String_Node_Str");
  }
  sbItems.deleteCharAt(sbItems.lastIndexOf("String_Node_Str"));
  sbAmount.deleteCharAt(sbAmount.lastIndexOf("String_Node_Str"));
  sbDurability.deleteCharAt(sbDurability.lastIndexOf("String_Node_Str"));
  try {
    prepStmt=connection.prepareStatement("String_Node_Str" + xAuthSettings.tblInventory + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
    prepStmt.setString(1,xPlayer.getPlayerName());
    prepStmt.setString(2,sbItems.toString());
    prepStmt.setString(3,sbAmount.toString());
    prepStmt.setString(4,sbDurability.toString());
    prepStmt.executeUpdate();
  }
 catch (  SQLException e) {
    xAuthLog.severe("String_Node_Str" + xPlayer.getPlayerName(),e);
  }
}

Fixed version (ground truth):
public void insertInventory(xAuthPlayer xPlayer){
  if (!isConnected())   connect();
  try {
    prepStmt=connection.prepareStatement("String_Node_Str" + "String_Node_Str" + xAuthSettings.tblInventory + "String_Node_Str"+ "String_Node_Str");
    prepStmt.setString(1,xPlayer.getPlayerName());
    rs=prepStmt.executeQuery();
    if (rs.next())     return;
  }
 catch (  SQLException e) {
    xAuthLog.severe("String_Node_Str" + xPlayer.getPlayerName(),e);
  }
  PlayerInventory inv=xPlayer.getPlayer().getInventory();
  StringBuilder sbItems=new StringBuilder();
  StringBuilder sbAmount=new StringBuilder();
  StringBuilder sbDurability=new StringBuilder();
  for (  ItemStack item : inv.getContents()) {
    int itemid=0;
    int amount=0;
    short durability=0;
    if (item != null) {
      itemid=item.getTypeId();
      amount=item.getAmount();
      durability=item.getDurability();
    }
    sbItems.append(itemid + "String_Node_Str");
    sbAmount.append(amount + "String_Node_Str");
    sbDurability.append(durability + "String_Node_Str");
  }
  for (  ItemStack item : inv.getArmorContents()) {
    int itemid=0;
    int amount=0;
    short durability=0;
    if (item != null) {
      itemid=item.getTypeId();
      amount=item.getAmount();
      durability=item.getDurability();
    }
    sbItems.append(itemid + "String_Node_Str");
    sbAmount.append(amount + "String_Node_Str");
    sbDurability.append(durability + "String_Node_Str");
  }
  sbItems.deleteCharAt(sbItems.lastIndexOf("String_Node_Str"));
  sbAmount.deleteCharAt(sbAmount.lastIndexOf("String_Node_Str"));
  sbDurability.deleteCharAt(sbDurability.lastIndexOf("String_Node_Str"));
  try {
    prepStmt=connection.prepareStatement("String_Node_Str" + xAuthSettings.tblInventory + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
    prepStmt.setString(1,xPlayer.getPlayerName());
    prepStmt.setString(2,sbItems.toString());
    prepStmt.setString(3,sbAmount.toString());
    prepStmt.setString(4,sbDurability.toString());
    prepStmt.executeUpdate();
  }
 catch (  SQLException e) {
    xAuthLog.severe("String_Node_Str" + xPlayer.getPlayerName(),e);
  }
}