Program: 173919
Project: 173919
Buggy source:
/** 
 * Add terrain, hexsides, elevation, and exits to hexes. Cliffs are bidirectional; other hexside obstacles are noted only on the high side, since they only interfere with uphill movement. 
 */
private static synchronized void setupHexesGameState(String terrain,GUIHex[][] h,boolean serverSideFirstLoad){
  List directories=null;
  String rndSourceName=null;
  BattleHex[][] hexModel=new BattleHex[h.length][h[0].length];
  for (int i=0; i < h.length; i++) {
    for (int j=0; j < h[0].length; j++) {
      if (show[i][j]) {
        hexModel[i][j]=new BattleHex(i,j);
      }
    }
  }
  try {
    if ((rndSourceName == null) || (!serverSideFirstLoad)) {
    }
 else {
    }
    final String[] hazards=null;
    HashMap t2n=new HashMap();
    for (int i=0; i < hazards.length; i++) {
      int count=0;
      for (int x=0; x < 6; x++) {
        for (int y=0; y < 6; y++) {
          if (show[x][y]) {
            if (hexModel[x][y].getTerrain().equals(hazards[i])) {
              count++;
            }
          }
        }
      }
      if (count > 0) {
        t2n.put(hazards[i],new Integer(count));
      }
    }
    hazardNumberMap.put(terrain,t2n);
    char[] hazardSides=BattleHex.getHexsides();
    HashMap s2n=new HashMap();
    for (int i=0; i < hazardSides.length; i++) {
      int count=0;
      for (int x=0; x < 6; x++) {
        for (int y=0; y < 6; y++) {
          if (show[x][y]) {
            for (int k=0; k < 6; k++) {
              if (hexModel[x][y].getHexside(k) == hazardSides[i]) {
                count++;
              }
            }
          }
        }
      }
      if (count > 0) {
        s2n.put(new Character(hazardSides[i]),new Integer(count));
      }
    }
    hazardSideNumberMap.put(terrain,s2n);
    for (int i=0; i < hexModel.length; i++) {
      BattleHex[] row=hexModel[i];
      for (int j=0; j < row.length; j++) {
        BattleHex hex=row[j];
        if (show[i][j]) {
          h[i][j].setHexModel(hex);
        }
      }
    }
  }
 catch (  Exception e) {
    Log.error("String_Node_Str" + terrain + "String_Node_Str"+ e);
    e.printStackTrace();
  }
}

Fixed version (ground truth):
/** 
 * Add terrain, hexsides, elevation, and exits to hexes. Cliffs are bidirectional; other hexside obstacles are noted only on the high side, since they only interfere with uphill movement. 
 */
private static synchronized void setupHexesGameState(String terrain,GUIHex[][] h,boolean serverSideFirstLoad){
  List directories=null;
  String rndSourceName=null;
  BattleHex[][] hexModel=new BattleHex[h.length][h[0].length];
  for (int i=0; i < h.length; i++) {
    for (int j=0; j < h[0].length; j++) {
      if (show[i][j]) {
        hexModel[i][j]=new BattleHex(i,j);
      }
    }
  }
  try {
    if ((rndSourceName == null) || (!serverSideFirstLoad)) {
    }
    final String[] hazards=null;
    HashMap t2n=new HashMap();
    for (int i=0; i < hazards.length; i++) {
      int count=0;
      for (int x=0; x < 6; x++) {
        for (int y=0; y < 6; y++) {
          if (show[x][y]) {
            if (hexModel[x][y].getTerrain().equals(hazards[i])) {
              count++;
            }
          }
        }
      }
      if (count > 0) {
        t2n.put(hazards[i],new Integer(count));
      }
    }
    hazardNumberMap.put(terrain,t2n);
    char[] hazardSides=BattleHex.getHexsides();
    HashMap s2n=new HashMap();
    for (int i=0; i < hazardSides.length; i++) {
      int count=0;
      for (int x=0; x < 6; x++) {
        for (int y=0; y < 6; y++) {
          if (show[x][y]) {
            for (int k=0; k < 6; k++) {
              if (hexModel[x][y].getHexside(k) == hazardSides[i]) {
                count++;
              }
            }
          }
        }
      }
      if (count > 0) {
        s2n.put(new Character(hazardSides[i]),new Integer(count));
      }
    }
    hazardSideNumberMap.put(terrain,s2n);
    for (int i=0; i < hexModel.length; i++) {
      BattleHex[] row=hexModel[i];
      for (int j=0; j < row.length; j++) {
        BattleHex hex=row[j];
        if (show[i][j]) {
          h[i][j].setHexModel(hex);
        }
      }
    }
  }
 catch (  Exception e) {
    Log.error("String_Node_Str" + terrain + "String_Node_Str"+ e);
    e.printStackTrace();
  }
}