Program: 173443
Project: 173443
Buggy source:
/** 
 * @see net.sf.rails.common.parser.Configurable#configureFromXML(org.w3c.dom.Element)
 */
public void configureFromXML(Tag tileSetTop) throws ConfigurationException {
  String tileDefFileName=tileSetTop.getAttributeAsString("String_Node_Str");
  if (tileDefFileName == null)   throw new ConfigurationException(LocalText.getText("String_Node_Str"));
  String directory="String_Node_Str" + getRoot().getGameName();
  Tag tileDefTop=Tag.findTopTagInFile(tileDefFileName,directory,"String_Node_Str",getRoot().getGameOptions());
  if (tileDefTop == null)   throw new ConfigurationException(LocalText.getText("String_Node_Str"));
  List<Tag> tileSetList=tileSetTop.getChildren("String_Node_Str");
  List<Tag> tileDefList=tileDefTop.getChildren("String_Node_Str");
  Map<String,Tag> tileSetMap=Maps.newHashMapWithExpectedSize(tileSetList.size());
  for (  Tag tileSetTag : tileSetList) {
    String tileId=tileSetTag.getAttributeAsString("String_Node_Str");
    if (tileSetMap.containsKey(tileId)) {
      throw new ConfigurationException(LocalText.getText("String_Node_Str",String.valueOf(tileId)));
    }
    tileSetMap.put(tileId,tileSetTag);
  }
  Map<String,Tag> tileDefMap=Maps.newHashMapWithExpectedSize(tileDefList.size());
  for (  Tag tileDefTag : tileDefList) {
    String tileId=tileDefTag.getAttributeAsString("String_Node_Str");
    if (tileDefMap.containsKey(tileId)) {
      throw new ConfigurationException(LocalText.getText("String_Node_Str",String.valueOf(tileId)));
    }
 else     if (!tileSetMap.containsKey(tileId)) {
      log.warn("String_Node_Str" + tileId + "String_Node_Str");
    }
    tileDefMap.put(tileId,tileDefTag);
  }
  ImmutableMap.Builder<String,Tile> tileMapBuilder=ImmutableMap.builder();
  for (  String id : tileSetMap.keySet()) {
    Tile tile=Tile.create(this,id);
    tileMapBuilder.put(id,tile);
  }
  tileMap=tileMapBuilder.build();
  for (  String id : tileMap.keySet()) {
    Tile tile=tileMap.get(id);
    tile.configureFromXML(tileSetMap.get(id),tileDefMap.get(id));
    sortingDigits=Math.max(sortingDigits,tile.toText().length());
  }
  Tag defaultsTag=tileSetTop.getChild("String_Node_Str");
  if (defaultsTag != null) {
    List<Tag> accessTags=defaultsTag.getChildren("String_Node_Str");
    defaultStopTypes=StopType.parseDefaults(this,accessTags);
  }
 else {
    defaultStopTypes=ImmutableMap.of();
  }
}

Fixed version (ground truth):
/** 
 * @see net.sf.rails.common.parser.Configurable#configureFromXML(org.w3c.dom.Element)
 */
public void configureFromXML(Tag tileSetTop) throws ConfigurationException {
  String tileDefFileName=tileSetTop.getAttributeAsString("String_Node_Str");
  if (tileDefFileName == null)   throw new ConfigurationException(LocalText.getText("String_Node_Str"));
  String directory="String_Node_Str" + ResourceLoader.SEPARATOR + getRoot().getGameName();
  Tag tileDefTop=Tag.findTopTagInFile(tileDefFileName,directory,"String_Node_Str",getRoot().getGameOptions());
  if (tileDefTop == null)   throw new ConfigurationException(LocalText.getText("String_Node_Str"));
  List<Tag> tileSetList=tileSetTop.getChildren("String_Node_Str");
  List<Tag> tileDefList=tileDefTop.getChildren("String_Node_Str");
  Map<String,Tag> tileSetMap=Maps.newHashMapWithExpectedSize(tileSetList.size());
  for (  Tag tileSetTag : tileSetList) {
    String tileId=tileSetTag.getAttributeAsString("String_Node_Str");
    if (tileSetMap.containsKey(tileId)) {
      throw new ConfigurationException(LocalText.getText("String_Node_Str",String.valueOf(tileId)));
    }
    tileSetMap.put(tileId,tileSetTag);
  }
  Map<String,Tag> tileDefMap=Maps.newHashMapWithExpectedSize(tileDefList.size());
  for (  Tag tileDefTag : tileDefList) {
    String tileId=tileDefTag.getAttributeAsString("String_Node_Str");
    if (tileDefMap.containsKey(tileId)) {
      throw new ConfigurationException(LocalText.getText("String_Node_Str",String.valueOf(tileId)));
    }
 else     if (!tileSetMap.containsKey(tileId)) {
      log.warn("String_Node_Str" + tileId + "String_Node_Str");
    }
    tileDefMap.put(tileId,tileDefTag);
  }
  ImmutableMap.Builder<String,Tile> tileMapBuilder=ImmutableMap.builder();
  for (  String id : tileSetMap.keySet()) {
    Tile tile=Tile.create(this,id);
    tileMapBuilder.put(id,tile);
  }
  tileMap=tileMapBuilder.build();
  for (  String id : tileMap.keySet()) {
    Tile tile=tileMap.get(id);
    tile.configureFromXML(tileSetMap.get(id),tileDefMap.get(id));
    sortingDigits=Math.max(sortingDigits,tile.toText().length());
  }
  Tag defaultsTag=tileSetTop.getChild("String_Node_Str");
  if (defaultsTag != null) {
    List<Tag> accessTags=defaultsTag.getChildren("String_Node_Str");
    defaultStopTypes=StopType.parseDefaults(this,accessTags);
  }
 else {
    defaultStopTypes=ImmutableMap.of();
  }
}