Program: 11396
Project: 11396
Buggy source:
private void createTargetProduct(){
  targetProduct=new Product(sourceProduct.getName() + PRODUCT_SUFFIX,sourceProduct.getProductType(),sourceProduct.getSceneRasterWidth(),sourceProduct.getSceneRasterHeight());
  ProductUtils.copyProductNodes(sourceProduct,targetProduct);
  for (  String key : targetMap.keySet()) {
    final List<String> targetBandNames=new ArrayList<>();
    final ProductContainer container=targetMap.get(key);
    final CplxContainer master=container.sourceMaster;
    final CplxContainer slave=container.sourceSlave;
    final String subswath=master.subswath.isEmpty() ? "String_Node_Str" : '_' + master.subswath.toUpperCase();
    final String pol=getPolarisationTag(master);
    final String tag=subswath + pol + '_'+ master.date+ '_'+ slave.date;
    final String targetBandName_I="String_Node_Str" + productTag + tag;
    final Band iBand=targetProduct.addBand(targetBandName_I,ProductData.TYPE_FLOAT32);
    container.addBand(Unit.REAL,iBand.getName());
    iBand.setUnit(Unit.REAL);
    targetBandNames.add(iBand.getName());
    final String targetBandName_Q="String_Node_Str" + productTag + tag;
    final Band qBand=targetProduct.addBand(targetBandName_Q,ProductData.TYPE_FLOAT32);
    container.addBand(Unit.IMAGINARY,qBand.getName());
    qBand.setUnit(Unit.IMAGINARY);
    targetBandNames.add(qBand.getName());
    if (CREATE_VIRTUAL_BAND) {
      final String countStr='_' + productTag + tag;
      ReaderUtils.createVirtualIntensityBand(targetProduct,targetProduct.getBand(targetBandName_I),targetProduct.getBand(targetBandName_Q),countStr);
      Band phaseBand=ReaderUtils.createVirtualPhaseBand(targetProduct,targetProduct.getBand(targetBandName_I),targetProduct.getBand(targetBandName_Q),countStr);
      targetProduct.setQuicklookBandName(phaseBand.getName());
      targetBandNames.add(phaseBand.getName());
    }
    if (includeCoherence) {
      final String targetBandCoh="String_Node_Str" + tag;
      final Band coherenceBand=targetProduct.addBand(targetBandCoh,ProductData.TYPE_FLOAT32);
      coherenceBand.setNoDataValueUsed(true);
      coherenceBand.setNoDataValue(master.realBand.getNoDataValue());
      container.addBand(COHERENCE,coherenceBand.getName());
      coherenceBand.setUnit(Unit.COHERENCE);
      targetBandNames.add(coherenceBand.getName());
    }
    if (subtractTopographicPhase && OUTPUT_PHASE) {
      final String targetBandTgp="String_Node_Str" + tag;
      final Band tgpBand=targetProduct.addBand(targetBandTgp,ProductData.TYPE_FLOAT32);
      container.addBand(TOPO_PHASE,tgpBand.getName());
      tgpBand.setUnit(Unit.PHASE);
      targetBandNames.add(tgpBand.getName());
    }
    if (subtractFlatEarthPhase && OUTPUT_PHASE) {
      final String targetBandFep="String_Node_Str" + tag;
      final Band fepBand=targetProduct.addBand(targetBandFep,ProductData.TYPE_FLOAT32);
      container.addBand(FLAT_EARTH_PHASE,fepBand.getName());
      fepBand.setUnit(Unit.PHASE);
      targetBandNames.add(fepBand.getName());
    }
    outputElevation=outputElevation && sourceProduct.getBand("String_Node_Str") == null;
    if (subtractTopographicPhase && outputElevation) {
      final Band elevBand=targetProduct.addBand("String_Node_Str",ProductData.TYPE_FLOAT32);
      elevBand.setNoDataValueUsed(true);
      elevBand.setNoDataValue(demNoDataValue);
      container.addBand(ELEVATION,elevBand.getName());
      elevBand.setUnit(Unit.METERS);
      targetBandNames.add(elevBand.getName());
    }
    String slvProductName=StackUtils.findOriginalSlaveProductName(sourceProduct,container.sourceSlave.realBand);
    StackUtils.saveSlaveProductBandNames(targetProduct,slvProductName,targetBandNames.toArray(new String[targetBandNames.size()]));
  }
  for (  String bandName : sourceProduct.getBandNames()) {
    if (bandName.startsWith("String_Node_Str")) {
      ProductUtils.copyBand(bandName,sourceProduct,targetProduct,true);
    }
  }
}

Fixed version (ground truth):
private void createTargetProduct(){
  targetProduct=new Product(sourceProduct.getName() + PRODUCT_SUFFIX,sourceProduct.getProductType(),sourceProduct.getSceneRasterWidth(),sourceProduct.getSceneRasterHeight());
  ProductUtils.copyProductNodes(sourceProduct,targetProduct);
  for (  String key : targetMap.keySet()) {
    final List<String> targetBandNames=new ArrayList<>();
    final ProductContainer container=targetMap.get(key);
    final CplxContainer master=container.sourceMaster;
    final CplxContainer slave=container.sourceSlave;
    final String subswath=master.subswath.isEmpty() ? "String_Node_Str" : '_' + master.subswath.toUpperCase();
    final String pol=getPolarisationTag(master);
    final String tag=subswath + pol + '_'+ master.date+ '_'+ slave.date;
    final String targetBandName_I="String_Node_Str" + productTag + tag;
    final Band iBand=targetProduct.addBand(targetBandName_I,ProductData.TYPE_FLOAT32);
    container.addBand(Unit.REAL,iBand.getName());
    iBand.setUnit(Unit.REAL);
    targetBandNames.add(iBand.getName());
    final String targetBandName_Q="String_Node_Str" + productTag + tag;
    final Band qBand=targetProduct.addBand(targetBandName_Q,ProductData.TYPE_FLOAT32);
    container.addBand(Unit.IMAGINARY,qBand.getName());
    qBand.setUnit(Unit.IMAGINARY);
    targetBandNames.add(qBand.getName());
    if (CREATE_VIRTUAL_BAND) {
      final String countStr='_' + productTag + tag;
      ReaderUtils.createVirtualIntensityBand(targetProduct,targetProduct.getBand(targetBandName_I),targetProduct.getBand(targetBandName_Q),countStr);
      Band phaseBand=ReaderUtils.createVirtualPhaseBand(targetProduct,targetProduct.getBand(targetBandName_I),targetProduct.getBand(targetBandName_Q),countStr);
      targetProduct.setQuicklookBandName(phaseBand.getName());
      targetBandNames.add(phaseBand.getName());
    }
    if (includeCoherence) {
      final String targetBandCoh="String_Node_Str" + tag;
      final Band coherenceBand=targetProduct.addBand(targetBandCoh,ProductData.TYPE_FLOAT32);
      coherenceBand.setNoDataValueUsed(true);
      coherenceBand.setNoDataValue(master.realBand.getNoDataValue());
      container.addBand(COHERENCE,coherenceBand.getName());
      coherenceBand.setUnit(Unit.COHERENCE);
      targetBandNames.add(coherenceBand.getName());
    }
    if (subtractTopographicPhase && OUTPUT_PHASE) {
      final String targetBandTgp="String_Node_Str" + tag;
      final Band tgpBand=targetProduct.addBand(targetBandTgp,ProductData.TYPE_FLOAT32);
      container.addBand(TOPO_PHASE,tgpBand.getName());
      tgpBand.setUnit(Unit.PHASE);
      targetBandNames.add(tgpBand.getName());
    }
    if (subtractFlatEarthPhase && OUTPUT_PHASE) {
      final String targetBandFep="String_Node_Str" + tag;
      final Band fepBand=targetProduct.addBand(targetBandFep,ProductData.TYPE_FLOAT32);
      container.addBand(FLAT_EARTH_PHASE,fepBand.getName());
      fepBand.setUnit(Unit.PHASE);
      targetBandNames.add(fepBand.getName());
    }
    if (subtractTopographicPhase && outputElevation && targetProduct.getBand("String_Node_Str") == null) {
      final Band elevBand=targetProduct.addBand("String_Node_Str",ProductData.TYPE_FLOAT32);
      elevBand.setNoDataValueUsed(true);
      elevBand.setNoDataValue(demNoDataValue);
      container.addBand(ELEVATION,elevBand.getName());
      elevBand.setUnit(Unit.METERS);
      targetBandNames.add(elevBand.getName());
    }
    String slvProductName=StackUtils.findOriginalSlaveProductName(sourceProduct,container.sourceSlave.realBand);
    StackUtils.saveSlaveProductBandNames(targetProduct,slvProductName,targetBandNames.toArray(new String[targetBandNames.size()]));
  }
  for (  String bandName : sourceProduct.getBandNames()) {
    if (bandName.startsWith("String_Node_Str")) {
      ProductUtils.copyBand(bandName,sourceProduct,targetProduct,true);
    }
  }
}