Source:
<code>public boolean getProducts(VeluxBridge bridge) { logger.trace("getProducts() called."); GetProducts bcp = bridge.bridgeAPI().getProducts(); if (!bridge.bridgeInstance.veluxBridgeConfiguration().isBulkRetrievalEnabled || (bcp == null)) { logger.trace("getProducts() working on step-by-step retrieval."); GetProduct bcpSbS = bridge.bridgeAPI().getProduct(); for (int nodeId = 0; nodeId < VeluxKLFAPI.KLF_SYSTEMTABLE_MAX; nodeId++) { logger.trace("getProducts() {}.", new String(new char[80]).replace('\0', '*')); try { Thread.sleep(2000); } catch (InterruptedException ie) { logger.trace("io() wait interrupted."); } logger.trace("getProducts() working on product {}.", nodeId); bcpSbS.setProductId(nodeId); <START> if ((bridge.bridgeCommunicate(bcpSbS)) && (bcp.isCommunicationSuccessful())) { <END> VeluxProduct veluxProduct = bcpSbS.getProduct(); if (bcpSbS.isCommunicationSuccessful()) { logger.debug("getProducts() found product {}.", veluxProduct); if (!channel.existingProducts.isRegistered(veluxProduct)) { channel.existingProducts.register(veluxProduct); } } } } logger.debug("getProducts() finally has found products {}.", channel.existingProducts); return true; } else { logger.trace("getProducts() working on bulk retrieval."); if ((bridge.bridgeCommunicate(bcp)) && (bcp.isCommunicationSuccessful())) { for (VeluxProduct product : bcp.getProducts()) { logger.trace("getProducts() found product (type {}).", product.getProductName(), product.getProductType()); if (!channel.existingProducts.isRegistered(product)) { logger.debug("getProducts() storing new product {}.", product); channel.existingProducts.register(product); } else { logger.debug("getProducts() storing updates for product {}.", product); channel.existingProducts.update(product); } } logger.debug("getProducts() finally has found products {}.", channel.existingProducts); return true; } else { logger.trace("getProducts() finished with failure."); return false; } } }</code><technical_language>bcp null here</technical_language>

Target:
public boolean getProducts(VeluxBridge bridge) { logger.trace("getProducts() called."); GetProducts bcp = bridge.bridgeAPI().getProducts(); if (!bridge.bridgeInstance.veluxBridgeConfiguration().isBulkRetrievalEnabled || (bcp == null)) { logger.trace("getProducts() working on step-by-step retrieval."); GetProduct bcpSbS = bridge.bridgeAPI().getProduct(); for (int nodeId = 0; nodeId < VeluxKLFAPI.KLF_SYSTEMTABLE_MAX; nodeId++) { logger.trace("getProducts() {}.", new String(new char[80]).replace('\0', '*')); try { Thread.sleep(2000); } catch (InterruptedException ie) { logger.trace("io() wait interrupted."); } logger.trace("getProducts() working on product {}.", nodeId); bcpSbS.setProductId(nodeId); if ((bridge.bridgeCommunicate(bcpSbS)) && (bcpSbS.isCommunicationSuccessful())) { VeluxProduct veluxProduct = bcpSbS.getProduct(); if (bcpSbS.isCommunicationSuccessful()) { logger.debug("getProducts() found product {}.", veluxProduct); if (!channel.existingProducts.isRegistered(veluxProduct)) { channel.existingProducts.register(veluxProduct); } } } } logger.debug("getProducts() finally has found products {}.", channel.existingProducts); return true; } else { logger.trace("getProducts() working on bulk retrieval."); if ((bridge.bridgeCommunicate(bcp)) && (bcp.isCommunicationSuccessful())) { for (VeluxProduct product : bcp.getProducts()) { logger.trace("getProducts() found product (type {}).", product.getProductName(), product.getProductType()); if (!channel.existingProducts.isRegistered(product)) { logger.debug("getProducts() storing new product {}.", product); channel.existingProducts.register(product); } else { logger.debug("getProducts() storing updates for product {}.", product); channel.existingProducts.update(product); } } logger.debug("getProducts() finally has found products {}.", channel.existingProducts); return true; } else { logger.trace("getProducts() finished with failure."); return false; } } }