Program: 62617
Project: 62617
Buggy source:
private static void initialiseZWaveThings(){
  if (thingTypeRegistry == null) {
    return;
  }
synchronized (productIndex) {
    zwaveThingTypeUIDList=new HashSet<ThingTypeUID>();
    productIndex=new ArrayList<ZWaveProduct>();
    Collection<ThingType> thingTypes=thingTypeRegistry.getThingTypes();
    for (    ThingType thingType : thingTypes) {
      if (ZWaveBindingConstants.BINDING_ID.equals(thingType.getBindingId()) == false) {
        continue;
      }
      zwaveThingTypeUIDList.add(thingType.getUID());
      Map<String,String> thingProperties=thingType.getProperties();
      if (thingProperties.get(ZWaveBindingConstants.PROPERTY_XML_REFERENCES) == null) {
        continue;
      }
      String[] references=thingProperties.get(ZWaveBindingConstants.PROPERTY_XML_REFERENCES).split("String_Node_Str");
      for (      String ref : references) {
        String[] values=ref.split("String_Node_Str");
        Integer type;
        Integer id=null;
        if (values.length != 2) {
          continue;
        }
        type=Integer.parseInt(values[0],16);
        if (!values[1].trim().equals("String_Node_Str")) {
          id=Integer.parseInt(values[1],16);
        }
        String versionMin=thingProperties.get(ZWaveBindingConstants.PROPERTY_XML_VERSIONMIN);
        String versionMax=thingProperties.get(ZWaveBindingConstants.PROPERTY_XML_VERSIONMAX);
        productIndex.add(new ZWaveProduct(thingType.getUID(),Integer.parseInt(thingProperties.get(ZWaveBindingConstants.PROPERTY_XML_MANUFACTURER),16),type,id,versionMin,versionMax));
      }
    }
  }
}

Fixed version (ground truth):
private static void initialiseZWaveThings(){
  if (thingTypeRegistry == null) {
    return;
  }
synchronized (productIndexLock) {
    zwaveThingTypeUIDList=new HashSet<ThingTypeUID>();
    productIndex=new ArrayList<ZWaveProduct>();
    Collection<ThingType> thingTypes=thingTypeRegistry.getThingTypes();
    for (    ThingType thingType : thingTypes) {
      if (ZWaveBindingConstants.BINDING_ID.equals(thingType.getBindingId()) == false) {
        continue;
      }
      zwaveThingTypeUIDList.add(thingType.getUID());
      Map<String,String> thingProperties=thingType.getProperties();
      if (thingProperties.get(ZWaveBindingConstants.PROPERTY_XML_REFERENCES) == null) {
        continue;
      }
      String[] references=thingProperties.get(ZWaveBindingConstants.PROPERTY_XML_REFERENCES).split("String_Node_Str");
      for (      String ref : references) {
        String[] values=ref.split("String_Node_Str");
        Integer type;
        Integer id=null;
        if (values.length != 2) {
          continue;
        }
        type=Integer.parseInt(values[0],16);
        if (!values[1].trim().equals("String_Node_Str")) {
          id=Integer.parseInt(values[1],16);
        }
        String versionMin=thingProperties.get(ZWaveBindingConstants.PROPERTY_XML_VERSIONMIN);
        String versionMax=thingProperties.get(ZWaveBindingConstants.PROPERTY_XML_VERSIONMAX);
        productIndex.add(new ZWaveProduct(thingType.getUID(),Integer.parseInt(thingProperties.get(ZWaveBindingConstants.PROPERTY_XML_MANUFACTURER),16),type,id,versionMin,versionMax));
      }
    }
  }
}