Program: 55947
Project: 55947
Buggy source:
@Override public void executeTask(TaskPacket iTask){
  if (!(iTask instanceof SimpleGuiTask)) {
    return;
  }
  SimpleGuiTask guiTask=(SimpleGuiTask)iTask;
  System.out.println("String_Node_Str" + guiTask.getGuiAction());
switch (guiTask.getGuiAction()) {
case SET_WORK_AREA:
{
      WorkAreaGuiTask task=(WorkAreaGuiTask)guiTask;
      setWorkArea(task.getPosition(),task.getBuildingPos().x,task.getBuildingPos().y);
    }
  break;
case BUILD:
{
  ConstructBuildingTask task=(ConstructBuildingTask)guiTask;
  grid.constructBuildingAt(task.getPosition(),task.getType(),task.getPlayerId());
}
break;
case MOVE_TO:
{
MoveToGuiTask task=(MoveToGuiTask)guiTask;
moveSelectedTo(task.getPosition(),task.getSelection());
}
break;
case QUICK_SAVE:
System.out.println("String_Node_Str" + RandomSingleton.nextD());
save();
break;
case DESTROY_BUILDING:
{
ShortPoint2D buildingPos=((DestroyBuildingGuiTask)guiTask).getPosition();
Building building=((Building)grid.getBuildingAt(buildingPos.x,buildingPos.y));
if (building != null) {
building.kill();
}
}
break;
case DESTROY_MOVABLES:
killSelectedMovables(((MovableGuiTask)guiTask).getSelection());
break;
case START_WORKING:
case STOP_WORKING:
stopOrStartWorking(((MovableGuiTask)guiTask).getSelection(),guiTask.getGuiAction() == EGuiAction.STOP_WORKING);
break;
case CONVERT:
convertMovables((ConvertGuiTask)guiTask);
break;
case SET_BUILDING_PRIORITY:
setBuildingPriority((SetBuildingPriorityGuiTask)guiTask);
break;
case SET_MATERIAL_DISTRIBUTION_SETTINGS:
{
SetMaterialDistributionSettingsGuiTask task=(SetMaterialDistributionSettingsGuiTask)guiTask;
grid.setMaterialDistributionSettings(task.getManagerPosition(),task.getMaterialType(),task.getProbabilities());
}
break;
case SET_MATERIAL_PRIORITIES:
{
SetMaterialPrioritiesGuiTask task=(SetMaterialPrioritiesGuiTask)guiTask;
grid.setMaterialPrioritiesSettings(task.getManagerPosition(),task.getMaterialTypeForPriority());
}
break;
case UPGRADE_SOLDIERS:
{
UpgradeSoldiersGuiTask task=(UpgradeSoldiersGuiTask)guiTask;
grid.getPlayer(task.getPlayerId()).getManaInformation().upgrade(task.getSoldierType());
}
case SET_MATERIAL_PRODUCTION:
{
SetMaterialProductionGuiTask task=(SetMaterialProductionGuiTask)guiTask;
switch (task.getProductionType()) {
case INCREASE:
grid.getMaterialProductionAt(task.getPosition()).increaseNumberOfFutureProducedMaterial(task.getMaterialType());
break;
case DECREASE:
grid.getMaterialProductionAt(task.getPosition()).decreaseNumberOfFutureProducedMaterial(task.getMaterialType());
break;
case SET_RATIO:
grid.getMaterialProductionAt(task.getPosition()).setRatioOfMaterial(task.getMaterialType(),task.getRatio());
break;
}
break;
}
default :
break;
}
}

Fixed version (ground truth):
@Override public void executeTask(TaskPacket iTask){
  if (!(iTask instanceof SimpleGuiTask)) {
    return;
  }
  SimpleGuiTask guiTask=(SimpleGuiTask)iTask;
  System.out.println("String_Node_Str" + guiTask.getGuiAction());
switch (guiTask.getGuiAction()) {
case SET_WORK_AREA:
{
      WorkAreaGuiTask task=(WorkAreaGuiTask)guiTask;
      setWorkArea(task.getPosition(),task.getBuildingPos().x,task.getBuildingPos().y);
    }
  break;
case BUILD:
{
  ConstructBuildingTask task=(ConstructBuildingTask)guiTask;
  grid.constructBuildingAt(task.getPosition(),task.getType(),task.getPlayerId());
}
break;
case MOVE_TO:
{
MoveToGuiTask task=(MoveToGuiTask)guiTask;
moveSelectedTo(task.getPosition(),task.getSelection());
}
break;
case QUICK_SAVE:
System.out.println("String_Node_Str" + RandomSingleton.nextD());
save();
break;
case DESTROY_BUILDING:
{
ShortPoint2D buildingPos=((DestroyBuildingGuiTask)guiTask).getPosition();
Building building=((Building)grid.getBuildingAt(buildingPos.x,buildingPos.y));
if (building != null) {
building.kill();
}
}
break;
case DESTROY_MOVABLES:
killSelectedMovables(((MovableGuiTask)guiTask).getSelection());
break;
case START_WORKING:
case STOP_WORKING:
stopOrStartWorking(((MovableGuiTask)guiTask).getSelection(),guiTask.getGuiAction() == EGuiAction.STOP_WORKING);
break;
case CONVERT:
convertMovables((ConvertGuiTask)guiTask);
break;
case SET_BUILDING_PRIORITY:
setBuildingPriority((SetBuildingPriorityGuiTask)guiTask);
break;
case SET_MATERIAL_DISTRIBUTION_SETTINGS:
{
SetMaterialDistributionSettingsGuiTask task=(SetMaterialDistributionSettingsGuiTask)guiTask;
grid.setMaterialDistributionSettings(task.getManagerPosition(),task.getMaterialType(),task.getProbabilities());
}
break;
case SET_MATERIAL_PRIORITIES:
{
SetMaterialPrioritiesGuiTask task=(SetMaterialPrioritiesGuiTask)guiTask;
grid.setMaterialPrioritiesSettings(task.getManagerPosition(),task.getMaterialTypeForPriority());
}
break;
case UPGRADE_SOLDIERS:
{
UpgradeSoldiersGuiTask task=(UpgradeSoldiersGuiTask)guiTask;
grid.getPlayer(task.getPlayerId()).getManaInformation().upgrade(task.getSoldierType());
}
break;
case SET_MATERIAL_PRODUCTION:
{
SetMaterialProductionGuiTask task=(SetMaterialProductionGuiTask)guiTask;
switch (task.getProductionType()) {
case INCREASE:
grid.getMaterialProductionAt(task.getPosition()).increaseNumberOfFutureProducedMaterial(task.getMaterialType());
break;
case DECREASE:
grid.getMaterialProductionAt(task.getPosition()).decreaseNumberOfFutureProducedMaterial(task.getMaterialType());
break;
case SET_RATIO:
grid.getMaterialProductionAt(task.getPosition()).setRatioOfMaterial(task.getMaterialType(),task.getRatio());
break;
}
break;
}
default :
break;
}
}