Program: 62636
Project: 62636
Buggy source:
/** 
 * The polling future executes this every iteration
 */
protected void execute(){
  logger.trace("String_Node_Str",baseURL);
  clearState();
  StringBuilder sb=new StringBuilder("String_Node_Str");
  String[] statuses={"String_Node_Str","String_Node_Str","String_Node_Str"};
  for (  String status : statuses) {
    String response=getUrl(baseURL + "String_Node_Str" + status+ "String_Node_Str",TIMEOUT);
    logger.trace(baseURL + "String_Node_Str" + status+ "String_Node_Str",response);
    if (response == null) {
      updateStatus(ThingStatus.OFFLINE,ThingStatusDetail.OFFLINE.COMMUNICATION_ERROR);
      return;
    }
    Matcher m=responsePattern.matcher(response);
    if (m.find()) {
      sb.append(m.group(1));
    }
  }
  sb.append("String_Node_Str");
  if (!getThing().getStatus().equals(ThingStatus.ONLINE)) {
    updateStatus(ThingStatus.ONLINE);
  }
  String xmlDoc=sb.toString();
  for (  Channel channel : getThing().getChannels()) {
    String key=channel.getUID().getId().replace('-','/');
    XPathFactory xpathFactory=XPathFactory.newInstance();
    XPath xpath=xpathFactory.newXPath();
    try {
      InputSource is=new InputSource(new StringReader(xmlDoc));
      String value=xpath.evaluate("String_Node_Str" + key,is);
      if (StringUtils.isEmpty((value))) {
        continue;
      }
      State state=toState(channel.getAcceptedItemType(),value);
      State oldState=stateMap.put(channel.getUID().getAsString(),state);
      if (!state.equals(oldState)) {
        logger.trace("String_Node_Str",channel,state);
        updateState(channel.getUID(),state);
      }
    }
 catch (    XPathExpressionException e) {
      logger.error("String_Node_Str",e);
    }
  }
}

Fixed version (ground truth):
/** 
 * The polling future executes this every iteration
 */
protected void execute(){
  logger.trace("String_Node_Str",baseURL);
  clearState(false);
  StringBuilder sb=new StringBuilder("String_Node_Str");
  String[] statuses={"String_Node_Str","String_Node_Str","String_Node_Str"};
  for (  String status : statuses) {
    String response=getUrl(baseURL + "String_Node_Str" + status+ "String_Node_Str",TIMEOUT);
    logger.trace(baseURL + "String_Node_Str" + status+ "String_Node_Str",response);
    if (response == null) {
      updateStatus(ThingStatus.OFFLINE,ThingStatusDetail.OFFLINE.COMMUNICATION_ERROR);
      return;
    }
    Matcher m=responsePattern.matcher(response);
    if (m.find()) {
      sb.append(m.group(1));
    }
  }
  sb.append("String_Node_Str");
  if (!getThing().getStatus().equals(ThingStatus.ONLINE)) {
    updateStatus(ThingStatus.ONLINE);
  }
  String xmlDoc=sb.toString();
  for (  Channel channel : getThing().getChannels()) {
    String key=channel.getUID().getId().replace('-','/');
    XPathFactory xpathFactory=XPathFactory.newInstance();
    XPath xpath=xpathFactory.newXPath();
    try {
      InputSource is=new InputSource(new StringReader(xmlDoc));
      String value=xpath.evaluate("String_Node_Str" + key,is);
      if (StringUtils.isEmpty((value))) {
        continue;
      }
      State state=toState(channel.getAcceptedItemType(),value);
      State oldState=stateMap.put(channel.getUID().getAsString(),state);
      if (!state.equals(oldState)) {
        logger.trace("String_Node_Str",channel,state);
        updateState(channel.getUID(),state);
      }
    }
 catch (    XPathExpressionException e) {
      logger.error("String_Node_Str",e);
    }
  }
}