Program: 90446
Project: 90446
Buggy source:
@SuppressWarnings("String_Node_Str") private DBClusterInfo _getDBClusterInfo(String clusterName,Node clusterNode) throws LoadConfigException {
  DBClusterInfo dbClusterInfo=new DBClusterInfo();
  dbClusterInfo.setClusterName(clusterName);
  try {
    String classFullPath=xmlUtil.getAttributeValue(clusterNode,"String_Node_Str");
    if (StringUtil.isBlank(classFullPath)) {
      classFullPath=DEFAULT_CLUSTER_ROUTER_CLASS;
    }
    Class<IClusterRouter> clazz=(Class<IClusterRouter>)Class.forName(classFullPath);
    dbClusterInfo.setRouterClass(clazz);
  }
 catch (  Exception e) {
    throw new LoadConfigException(e);
  }
  Node global=xmlUtil.getFirstChildByName(clusterNode,"String_Node_Str");
  if (global != null) {
    Node masterGlobal=xmlUtil.getFirstChildByName(global,"String_Node_Str");
    String dsId=masterGlobal.getTextContent().trim();
    DBInfo masterGlobalDBInfo=dsBucketMap.get(dsId);
    if (masterGlobalDBInfo == null) {
      throw new LoadConfigException("String_Node_Str" + dsId);
    }
    masterGlobalDBInfo.setClusterName(clusterName);
    masterGlobalDBInfo.setMasterSlave(EnumDBMasterSlave.MASTER);
    Map<String,String> propMap=xmlUtil.getAttributeAsMap(masterGlobal);
    masterGlobalDBInfo.setCustomProperties(propMap);
    masterGlobalDBInfo.check();
    dbClusterInfo.setMasterGlobalDBInfo(masterGlobalDBInfo);
    List<Node> slaveGlobalList=xmlUtil.getChildByName(global,"String_Node_Str");
    if (slaveGlobalList != null && !slaveGlobalList.isEmpty()) {
      List<DBInfo> slaveGlobalConnection=new ArrayList<DBInfo>();
      int slaveIndex=0;
      for (      Node slaveGlobal : slaveGlobalList) {
        dsId=slaveGlobal.getTextContent().trim();
        DBInfo slaveGlobalDBInfo=dsBucketMap.get(dsId);
        if (slaveGlobalDBInfo == null) {
          throw new LoadConfigException("String_Node_Str" + dsId);
        }
        slaveGlobalDBInfo.setClusterName(clusterName);
        slaveGlobalDBInfo.setMasterSlave(EnumDBMasterSlave.getSlaveEnum(slaveIndex++));
        propMap=xmlUtil.getAttributeAsMap(slaveGlobal);
        slaveGlobalDBInfo.setCustomProperties(propMap);
        slaveGlobalDBInfo.check();
        slaveGlobalConnection.add(slaveGlobalDBInfo);
      }
      dbClusterInfo.setSlaveGlobalDBInfo(slaveGlobalConnection);
    }
  }
  List<DBRegionInfo> dbRegions=new ArrayList<DBRegionInfo>();
  List<Node> regionNodeList=xmlUtil.getChildByName(clusterNode,"String_Node_Str");
  DBRegionInfo regionInfo=null;
  for (  Node regionNode : regionNodeList) {
    regionInfo=new DBRegionInfo();
    String regionCapacity=xmlUtil.getAttributeValue(regionNode,"String_Node_Str");
    if (regionCapacity == null) {
      throw new LoadConfigException("String_Node_Str");
    }
    List<Value> values=_parseCapacity(clusterName,regionCapacity);
    regionInfo.setValues(values);
    regionInfo.setCapacity(regionCapacity);
    List<DBInfo> regionMasterConnection=new ArrayList<DBInfo>();
    Node master=xmlUtil.getFirstChildByName(regionNode,"String_Node_Str");
    List<Node> shardingNodeList=xmlUtil.getChildByName(master,"String_Node_Str");
    for (    Node shardingNode : shardingNodeList) {
      String dsId=shardingNode.getTextContent().trim();
      DBInfo masterShardingDBInfo=dsBucketMap.get(dsId);
      if (masterShardingDBInfo == null) {
        throw new LoadConfigException("String_Node_Str" + dsId);
      }
      masterShardingDBInfo.setClusterName(clusterName);
      masterShardingDBInfo.setMasterSlave(EnumDBMasterSlave.MASTER);
      Map<String,String> propMap=xmlUtil.getAttributeAsMap(shardingNode);
      masterShardingDBInfo.setCustomProperties(propMap);
      masterShardingDBInfo.check();
      regionMasterConnection.add(masterShardingDBInfo);
    }
    regionInfo.setMasterDBInfos(regionMasterConnection);
    List<List<DBInfo>> regionSlaveConnection=new ArrayList<List<DBInfo>>();
    List<Node> slaveNodeList=xmlUtil.getChildByName(regionNode,"String_Node_Str");
    int slaveIndex=0;
    for (    Node slaveNode : slaveNodeList) {
      shardingNodeList=xmlUtil.getChildByName(slaveNode,"String_Node_Str");
      List<DBInfo> slaveConnections=new ArrayList<DBInfo>();
      for (      Node shardingNode : shardingNodeList) {
        String dsId=shardingNode.getTextContent().trim();
        DBInfo slaveShardingDBInfo=dsBucketMap.get(dsId);
        if (slaveShardingDBInfo == null) {
          throw new LoadConfigException("String_Node_Str" + dsId);
        }
        slaveShardingDBInfo.setClusterName(clusterName);
        slaveShardingDBInfo.setMasterSlave(EnumDBMasterSlave.getSlaveEnum(slaveIndex++));
        Map<String,String> propMap=xmlUtil.getAttributeAsMap(shardingNode);
        slaveShardingDBInfo.setCustomProperties(propMap);
        slaveShardingDBInfo.check();
        slaveConnections.add(slaveShardingDBInfo);
      }
      regionSlaveConnection.add(slaveConnections);
    }
    regionInfo.setSlaveDBInfos(regionSlaveConnection);
    dbRegions.add(regionInfo);
  }
  dbClusterInfo.setDbRegions(dbRegions);
  return dbClusterInfo;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private DBClusterInfo _getDBClusterInfo(String clusterName,Node clusterNode) throws LoadConfigException {
  DBClusterInfo dbClusterInfo=new DBClusterInfo();
  dbClusterInfo.setClusterName(clusterName);
  try {
    String classFullPath=xmlUtil.getAttributeValue(clusterNode,"String_Node_Str");
    if (StringUtil.isBlank(classFullPath)) {
      classFullPath=DEFAULT_CLUSTER_ROUTER_CLASS;
    }
    Class<IClusterRouter> clazz=(Class<IClusterRouter>)Class.forName(classFullPath);
    dbClusterInfo.setRouterClass(clazz);
  }
 catch (  Exception e) {
    throw new LoadConfigException(e);
  }
  Node global=xmlUtil.getFirstChildByName(clusterNode,"String_Node_Str");
  if (global != null) {
    Node masterGlobal=xmlUtil.getFirstChildByName(global,"String_Node_Str");
    String dsId=masterGlobal.getTextContent().trim();
    if (dsBucketMap.get(dsId) == null) {
      throw new LoadConfigException("String_Node_Str" + dsId);
    }
    DBInfo masterGlobalDBInfo=dsBucketMap.get(dsId).clone();
    masterGlobalDBInfo.setClusterName(clusterName);
    masterGlobalDBInfo.setMasterSlave(EnumDBMasterSlave.MASTER);
    Map<String,String> propMap=xmlUtil.getAttributeAsMap(masterGlobal);
    masterGlobalDBInfo.setCustomProperties(propMap);
    masterGlobalDBInfo.check();
    dbClusterInfo.setMasterGlobalDBInfo(masterGlobalDBInfo);
    List<Node> slaveGlobalList=xmlUtil.getChildByName(global,"String_Node_Str");
    if (slaveGlobalList != null && !slaveGlobalList.isEmpty()) {
      List<DBInfo> slaveGlobalConnection=new ArrayList<DBInfo>();
      int slaveIndex=0;
      for (      Node slaveGlobal : slaveGlobalList) {
        dsId=slaveGlobal.getTextContent().trim();
        if (dsBucketMap.get(dsId) == null) {
          throw new LoadConfigException("String_Node_Str" + dsId);
        }
        DBInfo slaveGlobalDBInfo=dsBucketMap.get(dsId).clone();
        slaveGlobalDBInfo.setClusterName(clusterName);
        slaveGlobalDBInfo.setMasterSlave(EnumDBMasterSlave.getSlaveEnum(slaveIndex++));
        propMap=xmlUtil.getAttributeAsMap(slaveGlobal);
        slaveGlobalDBInfo.setCustomProperties(propMap);
        slaveGlobalDBInfo.check();
        slaveGlobalConnection.add(slaveGlobalDBInfo);
      }
      dbClusterInfo.setSlaveGlobalDBInfo(slaveGlobalConnection);
    }
  }
  List<DBRegionInfo> dbRegions=new ArrayList<DBRegionInfo>();
  List<Node> regionNodeList=xmlUtil.getChildByName(clusterNode,"String_Node_Str");
  DBRegionInfo regionInfo=null;
  for (  Node regionNode : regionNodeList) {
    regionInfo=new DBRegionInfo();
    String regionCapacity=xmlUtil.getAttributeValue(regionNode,"String_Node_Str");
    if (regionCapacity == null) {
      throw new LoadConfigException("String_Node_Str");
    }
    List<Value> values=_parseCapacity(clusterName,regionCapacity);
    regionInfo.setValues(values);
    regionInfo.setCapacity(regionCapacity);
    List<DBInfo> regionMasterConnection=new ArrayList<DBInfo>();
    Node master=xmlUtil.getFirstChildByName(regionNode,"String_Node_Str");
    List<Node> shardingNodeList=xmlUtil.getChildByName(master,"String_Node_Str");
    for (    Node shardingNode : shardingNodeList) {
      String dsId=shardingNode.getTextContent().trim();
      if (dsBucketMap.get(dsId) == null) {
        throw new LoadConfigException("String_Node_Str" + dsId);
      }
      DBInfo masterShardingDBInfo=dsBucketMap.get(dsId).clone();
      masterShardingDBInfo.setClusterName(clusterName);
      masterShardingDBInfo.setMasterSlave(EnumDBMasterSlave.MASTER);
      Map<String,String> propMap=xmlUtil.getAttributeAsMap(shardingNode);
      masterShardingDBInfo.setCustomProperties(propMap);
      masterShardingDBInfo.check();
      regionMasterConnection.add(masterShardingDBInfo);
    }
    regionInfo.setMasterDBInfos(regionMasterConnection);
    List<List<DBInfo>> regionSlaveConnection=new ArrayList<List<DBInfo>>();
    List<Node> slaveNodeList=xmlUtil.getChildByName(regionNode,"String_Node_Str");
    int slaveIndex=0;
    for (    Node slaveNode : slaveNodeList) {
      shardingNodeList=xmlUtil.getChildByName(slaveNode,"String_Node_Str");
      List<DBInfo> slaveConnections=new ArrayList<DBInfo>();
      for (      Node shardingNode : shardingNodeList) {
        String dsId=shardingNode.getTextContent().trim();
        if (dsBucketMap.get(dsId) == null) {
          throw new LoadConfigException("String_Node_Str" + dsId);
        }
        DBInfo slaveShardingDBInfo=dsBucketMap.get(dsId).clone();
        slaveShardingDBInfo.setClusterName(clusterName);
        slaveShardingDBInfo.setMasterSlave(EnumDBMasterSlave.getSlaveEnum(slaveIndex++));
        Map<String,String> propMap=xmlUtil.getAttributeAsMap(shardingNode);
        slaveShardingDBInfo.setCustomProperties(propMap);
        slaveShardingDBInfo.check();
        slaveConnections.add(slaveShardingDBInfo);
      }
      regionSlaveConnection.add(slaveConnections);
    }
    regionInfo.setSlaveDBInfos(regionSlaveConnection);
    dbRegions.add(regionInfo);
  }
  dbClusterInfo.setDbRegions(dbRegions);
  return dbClusterInfo;
}