Source:
<code>public JSONObject getPoolByBarcode(HttpSession session, JSONObject json) { String barcode = json.getString("barcode"); int container = json.getInt("container"); int partition = json.getInt("partition"); RunImpl r = (RunImpl) session.getAttribute("run_" + json.getString("run_cId")); try { Pool<? extends Poolable> p = null; <START> if (barcode != null && !isStringEmptyOrNull(barcode)) { <END> if (LimsUtils.isBase64String(barcode)) { barcode = new String(Base64.decodeBase64(barcode)); } } if (json.has("platform") && !isStringEmptyOrNull(json.getString("platform"))) { PlatformType pt = PlatformType.get(json.getString("platform")); if (pt != null) { p = requestManager.getPoolByBarcode(barcode, pt); } else { p = requestManager.getPoolByBarcode(barcode); } } else { if (r.getPlatformType() != null) { p = requestManager.getPoolByBarcode(barcode, r.getPlatformType()); } else { p = requestManager.getPoolByBarcode(barcode); } } List<SequencerPartitionContainer> fs = new ArrayList<SequencerPartitionContainer>(r.getSequencerPartitionContainers()); if (!fs.isEmpty()) { SequencerPartitionContainer f = fs.get(container); if (f.getPlatform().getPlatformType().equals(p.getPlatformType())) { return JSONUtils.JSONObjectResponse("html", poolHtml(p, container, partition)); } else { return JSONUtils.JSONObjectResponse("err", "Error: pool platform does not match container platform"); } } return JSONUtils.JSONObjectResponse("err", "Error: cannot get containers from this run"); } catch (IOException e) { log.error("no such pool", e); return JSONUtils.JSONObjectResponse("err", "Error: no such pool"); } }</code><technical_language>This shortened down</technical_language>

Target:
public JSONObject getPoolByBarcode(HttpSession session, JSONObject json) { String barcode = json.getString("barcode"); int container = json.getInt("container"); int partition = json.getInt("partition"); RunImpl r = (RunImpl) session.getAttribute("run_" + json.getString("run_cId")); try { Pool<? extends Poolable> p = null; if (!isStringEmptyOrNull(barcode)) { if (LimsUtils.isBase64String(barcode)) { barcode = new String(Base64.decodeBase64(barcode)); } } if (json.has("platform") && !isStringEmptyOrNull(json.getString("platform"))) { PlatformType pt = PlatformType.get(json.getString("platform")); if (pt != null) { p = requestManager.getPoolByBarcode(barcode, pt); } else { p = requestManager.getPoolByBarcode(barcode); } } else { if (r.getPlatformType() != null) { p = requestManager.getPoolByBarcode(barcode, r.getPlatformType()); } else { p = requestManager.getPoolByBarcode(barcode); } } List<SequencerPartitionContainer> fs = new ArrayList<SequencerPartitionContainer>(r.getSequencerPartitionContainers()); if (!fs.isEmpty()) { SequencerPartitionContainer f = fs.get(container); if (f.getPlatform().getPlatformType().equals(p.getPlatformType())) { return JSONUtils.JSONObjectResponse("html", poolHtml(p, container, partition)); } else { return JSONUtils.JSONObjectResponse("err", "Error: pool platform does not match container platform"); } } return JSONUtils.JSONObjectResponse("err", "Error: cannot get containers from this run"); } catch (IOException e) { log.error("no such pool", e); return JSONUtils.JSONObjectResponse("err", "Error: no such pool"); } }