+ ": Cannot found item id in last HTML reply<br>");
+ ": Cannot find item id in last HTML reply<br>");
  private int extractItemIdFromHTML()  {    if (lastHTMLReply == null)    {      if (debugLevel > 0)        System.err.println("Thread " + this.getName()            + ": There is no previous HTML reply<br>");      return -1;    }    // Count number of itemId    int count = 0;    int keyIndex = lastHTMLReply.indexOf("itemId=");    while (keyIndex != -1)    {      count++;      keyIndex = lastHTMLReply.indexOf("itemId=", keyIndex + 7); // 7 equals to      // itemId=    }    if (count == 0)    {      if (lastItemId >= 0)        return lastItemId;      if (debugLevel > 0)        System.err.println("Thread " + this.getName()            + ": Cannot found item id in last HTML reply<br>");      if (debugLevel > 1)        System.err.println("Thread " + this.getName()            + ": Last HTML reply is: " + lastHTMLReply + "<br>");      return -1;    }    // Choose randomly an item    count = rand.nextInt(count) + 1;    keyIndex = -7;    while (count > 0)    {      keyIndex = lastHTMLReply.indexOf("itemId=", keyIndex + 7); // 7 equals to      // itemId=      count--;    }    int lastIndex = isMin(Integer.MAX_VALUE, lastHTMLReply.indexOf('\"',        keyIndex + 7));    lastIndex = isMin(lastIndex, lastHTMLReply.indexOf('?', keyIndex + 7));    lastIndex = isMin(lastIndex, lastHTMLReply.indexOf('&', keyIndex + 7));    lastIndex = isMin(lastIndex, lastHTMLReply.indexOf('>', keyIndex + 7));    Integer foo = new Integer(lastHTMLReply.substring(keyIndex + 7, lastIndex));    lastItemId = foo.intValue();    return lastItemId;  }