Program: 34120
Project: 34120
Buggy source:
@Override protected Void doInBackground() throws Exception {
  long startTime=System.nanoTime();
  int reactorTicks=0;
  int cooldownTicks=0;
  int totalRodCount=0;
  try {
    publish("String_Node_Str");
    publish(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"));
    reactor.setCurrentHeat(initialHeat);
    reactor.clearVentedHeat();
    double minReactorHeat=initialHeat;
    double maxReactorHeat=initialHeat;
    boolean reachedBurn=initialHeat >= 0.4 * reactor.getMaxHeat();
    boolean reachedEvaporate=initialHeat >= 0.5 * reactor.getMaxHeat();
    boolean reachedHurt=initialHeat >= 0.7 * reactor.getMaxHeat();
    boolean reachedLava=initialHeat >= 0.85 * reactor.getMaxHeat();
    boolean reachedExplode=false;
    for (int row=0; row < 6; row++) {
      for (int col=0; col < 9; col++) {
        ReactorComponent component=reactor.getComponentAt(row,col);
        if (component != null) {
          component.clearCurrentHeat();
          component.clearDamage();
          totalRodCount+=component.getRodCount();
        }
        publish(String.format("String_Node_Str",row,col));
      }
    }
    double lastEUoutput=0.0;
    double totalEUoutput=0.0;
    double lastHeatOutput=0.0;
    double totalHeatOutput=0.0;
    double maxGeneratedHeat=0.0;
    do {
      reactor.clearEUOutput();
      reactor.clearVentedHeat();
      for (int row=0; row < 6; row++) {
        for (int col=0; col < 9; col++) {
          ReactorComponent component=reactor.getComponentAt(row,col);
          if (component != null) {
            component.preReactorTick();
          }
        }
      }
      double generatedHeat=0.0;
      for (int row=0; row < 6; row++) {
        for (int col=0; col < 9; col++) {
          ReactorComponent component=reactor.getComponentAt(row,col);
          if (component != null && !component.isBroken()) {
            generatedHeat+=component.generateHeat();
            maxReactorHeat=Math.max(reactor.getCurrentHeat(),maxReactorHeat);
            minReactorHeat=Math.min(reactor.getCurrentHeat(),minReactorHeat);
            component.dissipate();
            maxReactorHeat=Math.max(reactor.getCurrentHeat(),maxReactorHeat);
            minReactorHeat=Math.min(reactor.getCurrentHeat(),minReactorHeat);
            component.transfer();
            maxReactorHeat=Math.max(reactor.getCurrentHeat(),maxReactorHeat);
            minReactorHeat=Math.min(reactor.getCurrentHeat(),minReactorHeat);
          }
          if (maxReactorHeat >= 0.4 * reactor.getMaxHeat() && !reachedBurn) {
            publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),reactorTicks));
            reachedBurn=true;
          }
          if (maxReactorHeat >= 0.5 * reactor.getMaxHeat() && !reachedEvaporate) {
            publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),reactorTicks));
            reachedEvaporate=true;
          }
          if (maxReactorHeat >= 0.7 * reactor.getMaxHeat() && !reachedHurt) {
            publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),reactorTicks));
            reachedHurt=true;
          }
          if (maxReactorHeat >= 0.85 * reactor.getMaxHeat() && !reachedLava) {
            publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),reactorTicks));
            reachedLava=true;
          }
          if (maxReactorHeat >= reactor.getMaxHeat() && !reachedExplode) {
            publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),reactorTicks));
            reachedExplode=true;
          }
        }
      }
      maxGeneratedHeat=Math.max(generatedHeat,maxGeneratedHeat);
      for (int row=0; row < 6; row++) {
        for (int col=0; col < 9; col++) {
          ReactorComponent component=reactor.getComponentAt(row,col);
          if (component != null && !component.isBroken()) {
            component.generateEnergy();
          }
        }
      }
      lastEUoutput=reactor.getCurrentEUoutput();
      totalEUoutput+=lastEUoutput;
      lastHeatOutput=reactor.getVentedHeat();
      totalHeatOutput+=lastHeatOutput;
      if (reactor.getCurrentHeat() <= reactor.getMaxHeat() && lastEUoutput > 0.0) {
        reactorTicks++;
        minEUoutput=Math.min(lastEUoutput,minEUoutput);
        maxEUoutput=Math.max(lastEUoutput,maxEUoutput);
        minHeatOutput=Math.min(lastHeatOutput,minHeatOutput);
        maxHeatOutput=Math.max(lastHeatOutput,maxHeatOutput);
      }
      for (int row=0; row < 6; row++) {
        for (int col=0; col < 9; col++) {
          ReactorComponent component=reactor.getComponentAt(row,col);
          if (component != null && component.isBroken() && !alreadyBroken[row][col] && !component.getClass().getName().contains("String_Node_Str")) {
            publish(String.format("String_Node_Str",row,col));
            alreadyBroken[row][col]=true;
            publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),row,col,reactorTicks));
          }
        }
      }
    }
 while (reactor.getCurrentHeat() <= reactor.getMaxHeat() && lastEUoutput > 0.0);
    publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),minReactorHeat));
    publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),maxReactorHeat));
    if (reactor.getCurrentHeat() <= reactor.getMaxHeat()) {
      publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),reactorTicks));
      if (reactorTicks > 0) {
        if (reactor.isFluid()) {
          publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),2 * totalHeatOutput,2 * totalHeatOutput / reactorTicks,2 * minHeatOutput,2 * maxHeatOutput));
          if (totalRodCount > 0) {
            publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),totalHeatOutput / reactorTicks / 4/ totalRodCount,minHeatOutput / 4 / totalRodCount,maxHeatOutput / 4 / totalRodCount));
          }
        }
 else {
          publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),totalEUoutput,minEUoutput / 20.0,maxEUoutput / 20.0,totalEUoutput / (reactorTicks * 20)));
          if (totalRodCount > 0) {
            publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),totalEUoutput / reactorTicks / 100/ totalRodCount,minEUoutput / 100 / totalRodCount,maxEUoutput / 100 / totalRodCount));
          }
        }
      }
      lastHeatOutput=0.0;
      totalHeatOutput=0.0;
      double prevReactorHeat=reactor.getCurrentHeat();
      double prevTotalComponentHeat=0.0;
      for (int row=0; row < 6; row++) {
        for (int col=0; col < 9; col++) {
          ReactorComponent component=reactor.getComponentAt(row,col);
          if (component != null && !component.isBroken()) {
            prevTotalComponentHeat+=component.getCurrentHeat();
            if (component.getCurrentHeat() > 0.0) {
              publish(String.format("String_Node_Str",row,col));
              publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),row,col,component.getCurrentHeat()));
              needsCooldown[row][col]=true;
            }
          }
        }
      }
      if (prevReactorHeat == 0.0 && prevTotalComponentHeat == 0.0) {
        output.append(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"));
      }
 else {
        double currentTotalComponentHeat=prevTotalComponentHeat;
        int reactorCooldownTime=0;
        do {
          reactor.clearVentedHeat();
          prevReactorHeat=reactor.getCurrentHeat();
          if (prevReactorHeat == 0.0) {
            reactorCooldownTime=cooldownTicks;
          }
          prevTotalComponentHeat=currentTotalComponentHeat;
          for (int row=0; row < 6; row++) {
            for (int col=0; col < 9; col++) {
              ReactorComponent component=reactor.getComponentAt(row,col);
              if (component != null && !component.isBroken()) {
                component.dissipate();
                component.transfer();
              }
            }
          }
          lastHeatOutput=reactor.getVentedHeat();
          totalHeatOutput+=lastHeatOutput;
          minEUoutput=Math.min(lastEUoutput,minEUoutput);
          maxEUoutput=Math.max(lastEUoutput,maxEUoutput);
          minHeatOutput=Math.min(lastHeatOutput,minHeatOutput);
          maxHeatOutput=Math.max(lastHeatOutput,maxHeatOutput);
          cooldownTicks++;
          currentTotalComponentHeat=0.0;
          for (int row=0; row < 6; row++) {
            for (int col=0; col < 9; col++) {
              ReactorComponent component=reactor.getComponentAt(row,col);
              if (component != null && !component.isBroken()) {
                currentTotalComponentHeat+=component.getCurrentHeat();
                if (component.getCurrentHeat() == 0.0 && needsCooldown[row][col]) {
                  publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),row,col,cooldownTicks));
                  needsCooldown[row][col]=false;
                }
              }
            }
          }
        }
 while (lastHeatOutput > 0 && cooldownTicks < 20000);
        if (reactor.getCurrentHeat() == 0.0) {
          publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),reactorCooldownTime));
        }
 else {
          publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),reactor.getCurrentHeat(),reactorCooldownTime));
        }
        publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),cooldownTicks));
        for (int row=0; row < 6; row++) {
          for (int col=0; col < 9; col++) {
            ReactorComponent component=reactor.getComponentAt(row,col);
            if (component != null && !component.isBroken()) {
              prevTotalComponentHeat+=component.getCurrentHeat();
              if (component.getCurrentHeat() > 0.0) {
                publish(String.format("String_Node_Str",row,col));
                publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),row,col,component.getCurrentHeat()));
              }
            }
          }
        }
      }
    }
 else {
      publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),reactorTicks));
    }
    if (reactor.isFluid() && reactor.getCurrentHeat() < reactor.getMaxHeat()) {
      publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),2 * totalHeatOutput / cooldownTicks,2 * minHeatOutput,2 * maxHeatOutput));
    }
    double totalEffectiveVentCooling=0.0;
    double totalVentCoolingCapacity=0.0;
    double totalCellCooling=0.0;
    double totalCondensatorCooling=0.0;
    for (int row=0; row < 6; row++) {
      for (int col=0; col < 9; col++) {
        ReactorComponent component=reactor.getComponentAt(row,col);
        if (component != null) {
          if (component.getVentCoolingCapacity() > 0) {
            publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),row,col,component.getEffectiveVentCooling(),component.getVentCoolingCapacity()));
            totalEffectiveVentCooling+=component.getEffectiveVentCooling();
            totalVentCoolingCapacity+=component.getVentCoolingCapacity();
          }
 else           if (component.getBestCellCooling() > 0) {
            publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),row,col,component.getBestCellCooling()));
            totalCellCooling+=component.getBestCellCooling();
          }
 else           if (component.getBestCondensatorCooling() > 0) {
            publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),row,col,component.getBestCondensatorCooling()));
            totalCondensatorCooling+=component.getBestCondensatorCooling();
          }
        }
      }
    }
    publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),totalEffectiveVentCooling,totalVentCoolingCapacity));
    publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),totalCellCooling));
    publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),totalCondensatorCooling));
    publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),maxGeneratedHeat));
    double totalCooling=totalEffectiveVentCooling + totalCellCooling + totalCondensatorCooling;
    if (totalCooling >= maxGeneratedHeat) {
      publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),totalCooling - maxGeneratedHeat));
    }
 else {
      publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),maxGeneratedHeat - totalCooling));
    }
  }
 catch (  Throwable e) {
    if (cooldownTicks == 0) {
      publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),reactorTicks));
    }
 else {
      publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),cooldownTicks));
    }
    publish(e.toString(),"String_Node_Str",Arrays.toString(e.getStackTrace()));
  }
  long endTime=System.nanoTime();
  publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),(endTime - startTime) / 1e9));
  return null;
}

Fixed version (ground truth):
@Override protected Void doInBackground() throws Exception {
  long startTime=System.nanoTime();
  int reactorTicks=0;
  int cooldownTicks=0;
  int totalRodCount=0;
  try {
    publish("String_Node_Str");
    publish(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"));
    reactor.setCurrentHeat(initialHeat);
    reactor.clearVentedHeat();
    double minReactorHeat=initialHeat;
    double maxReactorHeat=initialHeat;
    boolean reachedBurn=initialHeat >= 0.4 * reactor.getMaxHeat();
    boolean reachedEvaporate=initialHeat >= 0.5 * reactor.getMaxHeat();
    boolean reachedHurt=initialHeat >= 0.7 * reactor.getMaxHeat();
    boolean reachedLava=initialHeat >= 0.85 * reactor.getMaxHeat();
    boolean reachedExplode=false;
    for (int row=0; row < 6; row++) {
      for (int col=0; col < 9; col++) {
        ReactorComponent component=reactor.getComponentAt(row,col);
        if (component != null) {
          component.clearCurrentHeat();
          component.clearDamage();
          totalRodCount+=component.getRodCount();
        }
        publish(String.format("String_Node_Str",row,col));
      }
    }
    double lastEUoutput=0.0;
    double totalEUoutput=0.0;
    double lastHeatOutput=0.0;
    double totalHeatOutput=0.0;
    double maxGeneratedHeat=0.0;
    do {
      reactor.clearEUOutput();
      reactor.clearVentedHeat();
      for (int row=0; row < 6; row++) {
        for (int col=0; col < 9; col++) {
          ReactorComponent component=reactor.getComponentAt(row,col);
          if (component != null) {
            component.preReactorTick();
          }
        }
      }
      double generatedHeat=0.0;
      for (int row=0; row < 6; row++) {
        for (int col=0; col < 9; col++) {
          ReactorComponent component=reactor.getComponentAt(row,col);
          if (component != null && !component.isBroken()) {
            generatedHeat+=component.generateHeat();
            maxReactorHeat=Math.max(reactor.getCurrentHeat(),maxReactorHeat);
            minReactorHeat=Math.min(reactor.getCurrentHeat(),minReactorHeat);
            component.dissipate();
            maxReactorHeat=Math.max(reactor.getCurrentHeat(),maxReactorHeat);
            minReactorHeat=Math.min(reactor.getCurrentHeat(),minReactorHeat);
            component.transfer();
            maxReactorHeat=Math.max(reactor.getCurrentHeat(),maxReactorHeat);
            minReactorHeat=Math.min(reactor.getCurrentHeat(),minReactorHeat);
          }
          if (maxReactorHeat >= 0.4 * reactor.getMaxHeat() && !reachedBurn) {
            publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),reactorTicks));
            reachedBurn=true;
          }
          if (maxReactorHeat >= 0.5 * reactor.getMaxHeat() && !reachedEvaporate) {
            publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),reactorTicks));
            reachedEvaporate=true;
          }
          if (maxReactorHeat >= 0.7 * reactor.getMaxHeat() && !reachedHurt) {
            publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),reactorTicks));
            reachedHurt=true;
          }
          if (maxReactorHeat >= 0.85 * reactor.getMaxHeat() && !reachedLava) {
            publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),reactorTicks));
            reachedLava=true;
          }
          if (maxReactorHeat >= reactor.getMaxHeat() && !reachedExplode) {
            publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),reactorTicks));
            reachedExplode=true;
          }
        }
      }
      maxGeneratedHeat=Math.max(generatedHeat,maxGeneratedHeat);
      for (int row=0; row < 6; row++) {
        for (int col=0; col < 9; col++) {
          ReactorComponent component=reactor.getComponentAt(row,col);
          if (component != null && !component.isBroken()) {
            component.generateEnergy();
          }
        }
      }
      lastEUoutput=reactor.getCurrentEUoutput();
      totalEUoutput+=lastEUoutput;
      lastHeatOutput=reactor.getVentedHeat();
      totalHeatOutput+=lastHeatOutput;
      if (reactor.getCurrentHeat() <= reactor.getMaxHeat() && lastEUoutput > 0.0) {
        reactorTicks++;
        minEUoutput=Math.min(lastEUoutput,minEUoutput);
        maxEUoutput=Math.max(lastEUoutput,maxEUoutput);
        minHeatOutput=Math.min(lastHeatOutput,minHeatOutput);
        maxHeatOutput=Math.max(lastHeatOutput,maxHeatOutput);
      }
      for (int row=0; row < 6; row++) {
        for (int col=0; col < 9; col++) {
          ReactorComponent component=reactor.getComponentAt(row,col);
          if (component != null && component.isBroken() && !alreadyBroken[row][col] && !component.getClass().getName().contains("String_Node_Str")) {
            publish(String.format("String_Node_Str",row,col));
            alreadyBroken[row][col]=true;
            publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),row,col,reactorTicks));
          }
        }
      }
    }
 while (reactor.getCurrentHeat() <= reactor.getMaxHeat() && lastEUoutput > 0.0);
    publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),minReactorHeat));
    publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),maxReactorHeat));
    if (reactor.getCurrentHeat() <= reactor.getMaxHeat()) {
      publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),reactorTicks));
      if (reactorTicks > 0) {
        if (reactor.isFluid()) {
          publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),2 * totalHeatOutput,2 * totalHeatOutput / reactorTicks,2 * minHeatOutput,2 * maxHeatOutput));
          if (totalRodCount > 0) {
            publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),totalHeatOutput / reactorTicks / 4/ totalRodCount,minHeatOutput / 4 / totalRodCount,maxHeatOutput / 4 / totalRodCount));
          }
        }
 else {
          publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),totalEUoutput,minEUoutput / 20.0,maxEUoutput / 20.0,totalEUoutput / (reactorTicks * 20)));
          if (totalRodCount > 0) {
            publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),totalEUoutput / reactorTicks / 100/ totalRodCount,minEUoutput / 100 / totalRodCount,maxEUoutput / 100 / totalRodCount));
          }
        }
      }
      lastHeatOutput=0.0;
      totalHeatOutput=0.0;
      double prevReactorHeat=reactor.getCurrentHeat();
      double prevTotalComponentHeat=0.0;
      for (int row=0; row < 6; row++) {
        for (int col=0; col < 9; col++) {
          ReactorComponent component=reactor.getComponentAt(row,col);
          if (component != null && !component.isBroken()) {
            prevTotalComponentHeat+=component.getCurrentHeat();
            if (component.getCurrentHeat() > 0.0) {
              publish(String.format("String_Node_Str",row,col));
              publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),row,col,component.getCurrentHeat()));
              needsCooldown[row][col]=true;
            }
          }
        }
      }
      if (prevReactorHeat == 0.0 && prevTotalComponentHeat == 0.0) {
        output.append(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"));
      }
 else {
        double currentTotalComponentHeat=prevTotalComponentHeat;
        int reactorCooldownTime=0;
        do {
          reactor.clearVentedHeat();
          prevReactorHeat=reactor.getCurrentHeat();
          if (prevReactorHeat == 0.0) {
            reactorCooldownTime=cooldownTicks;
          }
          prevTotalComponentHeat=currentTotalComponentHeat;
          for (int row=0; row < 6; row++) {
            for (int col=0; col < 9; col++) {
              ReactorComponent component=reactor.getComponentAt(row,col);
              if (component != null && !component.isBroken()) {
                component.dissipate();
                component.transfer();
              }
            }
          }
          lastHeatOutput=reactor.getVentedHeat();
          totalHeatOutput+=lastHeatOutput;
          minEUoutput=Math.min(lastEUoutput,minEUoutput);
          maxEUoutput=Math.max(lastEUoutput,maxEUoutput);
          minHeatOutput=Math.min(lastHeatOutput,minHeatOutput);
          maxHeatOutput=Math.max(lastHeatOutput,maxHeatOutput);
          cooldownTicks++;
          currentTotalComponentHeat=0.0;
          for (int row=0; row < 6; row++) {
            for (int col=0; col < 9; col++) {
              ReactorComponent component=reactor.getComponentAt(row,col);
              if (component != null && !component.isBroken()) {
                currentTotalComponentHeat+=component.getCurrentHeat();
                if (component.getCurrentHeat() == 0.0 && needsCooldown[row][col]) {
                  publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),row,col,cooldownTicks));
                  needsCooldown[row][col]=false;
                }
              }
            }
          }
        }
 while (lastHeatOutput > 0 && cooldownTicks < 20000);
        if (reactor.getCurrentHeat() == 0.0) {
          publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),reactorCooldownTime));
        }
 else {
          publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),reactor.getCurrentHeat(),reactorCooldownTime));
        }
        publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),cooldownTicks));
        for (int row=0; row < 6; row++) {
          for (int col=0; col < 9; col++) {
            ReactorComponent component=reactor.getComponentAt(row,col);
            if (component != null && !component.isBroken()) {
              prevTotalComponentHeat+=component.getCurrentHeat();
              if (component.getCurrentHeat() > 0.0) {
                publish(String.format("String_Node_Str",row,col));
                publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),row,col,component.getCurrentHeat()));
              }
            }
          }
        }
      }
    }
 else {
      publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),reactorTicks));
    }
    if (reactor.isFluid() && reactor.getCurrentHeat() < reactor.getMaxHeat()) {
      publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),2 * totalHeatOutput,2 * totalHeatOutput / cooldownTicks,2 * minHeatOutput,2 * maxHeatOutput));
    }
    double totalEffectiveVentCooling=0.0;
    double totalVentCoolingCapacity=0.0;
    double totalCellCooling=0.0;
    double totalCondensatorCooling=0.0;
    for (int row=0; row < 6; row++) {
      for (int col=0; col < 9; col++) {
        ReactorComponent component=reactor.getComponentAt(row,col);
        if (component != null) {
          if (component.getVentCoolingCapacity() > 0) {
            publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),row,col,component.getEffectiveVentCooling(),component.getVentCoolingCapacity()));
            totalEffectiveVentCooling+=component.getEffectiveVentCooling();
            totalVentCoolingCapacity+=component.getVentCoolingCapacity();
          }
 else           if (component.getBestCellCooling() > 0) {
            publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),row,col,component.getBestCellCooling()));
            totalCellCooling+=component.getBestCellCooling();
          }
 else           if (component.getBestCondensatorCooling() > 0) {
            publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),row,col,component.getBestCondensatorCooling()));
            totalCondensatorCooling+=component.getBestCondensatorCooling();
          }
        }
      }
    }
    publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),totalEffectiveVentCooling,totalVentCoolingCapacity));
    publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),totalCellCooling));
    publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),totalCondensatorCooling));
    publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),maxGeneratedHeat));
    double totalCooling=totalEffectiveVentCooling + totalCellCooling + totalCondensatorCooling;
    if (totalCooling >= maxGeneratedHeat) {
      publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),totalCooling - maxGeneratedHeat));
    }
 else {
      publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),maxGeneratedHeat - totalCooling));
    }
  }
 catch (  Throwable e) {
    if (cooldownTicks == 0) {
      publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),reactorTicks));
    }
 else {
      publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),cooldownTicks));
    }
    publish(e.toString(),"String_Node_Str",Arrays.toString(e.getStackTrace()));
  }
  long endTime=System.nanoTime();
  publish(String.format(java.util.ResourceBundle.getBundle("String_Node_Str").getString("String_Node_Str"),(endTime - startTime) / 1e9));
  return null;
}