Program: 125800
Project: 125800
Buggy source:
@SuppressWarnings("String_Node_Str") public static IMetadataTable getTableByName(ConnectionItem item,String name){
  if (item == null || name == null) {
    return null;
  }
  final Connection connection=item.getConnection();
  if (connection != null) {
    final EList tables=MetadataToolHelper.getMetadataTableFromConnection(connection,name);
    String tableLable=name;
    if (item instanceof SAPConnectionItem && name.split("String_Node_Str").length == 3) {
      tableLable=name.split("String_Node_Str")[2];
    }
    if (tables != null && tables.size() > 0) {
      Object tableObject=tables.get(0);
      if (tableObject instanceof MetadataTable) {
        for (        MetadataTable table : (List<MetadataTable>)tables) {
          if (table.getLabel().equals(tableLable)) {
            if (GlobalServiceRegister.getDefault().isServiceRegistered(IMetadataManagmentService.class)) {
              IMetadataManagmentService mmService=(IMetadataManagmentService)GlobalServiceRegister.getDefault().getService(IMetadataManagmentService.class);
              return mmService.convertMetadataTable(table);
            }
          }
        }
      }
 else       if (tableObject instanceof EObjectContainmentEList) {
        EObjectContainmentEList eObjectContainmentEList=(EObjectContainmentEList)tableObject;
        for (        MetadataTable table : (List<MetadataTable>)eObjectContainmentEList) {
          if (table.getLabel().equals(tableLable)) {
            if (GlobalServiceRegister.getDefault().isServiceRegistered(IMetadataManagmentService.class)) {
              IMetadataManagmentService mmService=(IMetadataManagmentService)GlobalServiceRegister.getDefault().getService(IMetadataManagmentService.class);
              return mmService.convertMetadataTable(table);
            }
          }
        }
      }
    }
  }
  return null;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public static IMetadataTable getTableByName(ConnectionItem item,String name){
  if (item == null || name == null) {
    return null;
  }
  final Connection connection=item.getConnection();
  if (connection != null) {
    List<MetadataTable> tables=null;
    IGenericWizardService wizardService=null;
    if (GlobalServiceRegister.getDefault().isServiceRegistered(IGenericWizardService.class)) {
      wizardService=(IGenericWizardService)GlobalServiceRegister.getDefault().getService(IGenericWizardService.class);
    }
    if (wizardService != null && wizardService.isGenericItem(item)) {
      tables=wizardService.getMetadataTables(connection);
    }
 else {
      tables=MetadataToolHelper.getMetadataTableFromConnection(connection,name);
    }
    String tableLable=name;
    if (item instanceof SAPConnectionItem && name.split("String_Node_Str").length == 3) {
      tableLable=name.split("String_Node_Str")[2];
    }
    if (tables != null && tables.size() > 0) {
      Object tableObject=tables.get(0);
      if (tableObject instanceof MetadataTable) {
        for (        MetadataTable table : tables) {
          if (table.getLabel().equals(tableLable)) {
            if (GlobalServiceRegister.getDefault().isServiceRegistered(IMetadataManagmentService.class)) {
              IMetadataManagmentService mmService=(IMetadataManagmentService)GlobalServiceRegister.getDefault().getService(IMetadataManagmentService.class);
              return mmService.convertMetadataTable(table);
            }
          }
        }
      }
 else       if (tableObject instanceof EObjectContainmentEList) {
        EObjectContainmentEList eObjectContainmentEList=(EObjectContainmentEList)tableObject;
        for (        MetadataTable table : (List<MetadataTable>)eObjectContainmentEList) {
          if (table.getLabel().equals(tableLable)) {
            if (GlobalServiceRegister.getDefault().isServiceRegistered(IMetadataManagmentService.class)) {
              IMetadataManagmentService mmService=(IMetadataManagmentService)GlobalServiceRegister.getDefault().getService(IMetadataManagmentService.class);
              return mmService.convertMetadataTable(table);
            }
          }
        }
      }
    }
  }
  return null;
}