Are there unwanted Apple tables?
167403
def com_google_fonts_check_aat(ttFont):
  """"""
  UNWANTED_TABLES = {
    'EBSC', 'Zaph', 'acnt', 'ankr', 'bdat', 'bhed', 'bloc',
    'bmap', 'bsln', 'fdsc', 'feat', 'fond', 'gcid', 'just',
    'kerx', 'lcar', 'ltag', 'mort', 'morx', 'opbd', 'prop',
    'trak', 'xref'
  }
  unwanted_tables_found = []
  for table in ttFont.keys():
    if table in UNWANTED_TABLES:
      unwanted_tables_found.append(table)

  if len(unwanted_tables_found) > 0:
    yield FAIL, ("Unwanted AAT tables were found"
                 " in the font and should be removed, either by"
                 " fonttools/ttx or by editing them using the tool"
                 " they built with:"
                 " {}").format(", ".join(unwanted_tables_found))
  else:
    yield PASS, "There are no unwanted AAT tables."
1211855
public void bumpTableSize(int iBumpIncrement, boolean bInsertRowsInModel)
    {
        int iRowCount = this.setRowCount(this.getRowCount(false) + iBumpIncrement);          // Theoretical EOF value for table scroller (Actual when known).
        if (m_iLastRecord != RECORD_UNKNOWN)
            m_iLastRecord = iRowCount - 1;     // Sync
        if (bInsertRowsInModel)
            this.fireTableRowsInserted(this.getRowCount(true) - iBumpIncrement, this.getRowCount(true) - 1);
    }
770294
def delete_table(self, tablename):
        
        self.tables = filter(lambda x: x.name != tablename, self.tables)
885146
function (table) {
			if (!((table || shine.EMPTY_OBJ) instanceof shine.Table)) throw new shine.Error('Bad argument #1 in pairs(). Table expected');
			return [shine.lib.next, table];
		}
1165720
public static void dropTablesAndIndices(SQLiteDatabase db) {
		drop(db, QueryType.INDEX, null);
		drop(db, QueryType.TABLE, null);
	}
377518
private void checkViewSources(ArrayList<Table> tableList) throws VoltCompilerException {
        HashSet<String> tableSet = new HashSet<>();
        for (Table tbl : tableList) {
            if (! tableSet.add(tbl.getTypeName())) {
                String errMsg = "Table " + tbl.getTypeName() + " appeared in the table list more than once: " +
                                "materialized view does not support self-join.";
                throw m_compiler.new VoltCompilerException(errMsg);
            }
        }
    }
1350888
def mac_table(self):
        
        table = []
        namespace = 'urn:brocade.com:mgmt:brocade-mac-address-table'
        request_mac_table = ET.Element('get-mac-address-table',
                                       xmlns=namespace)
        result = self._callback(request_mac_table, handler='get')
        for entry in result.findall('{%s}mac-address-table' % namespace):
            address = entry.find('{%s}mac-address' % namespace).text
            vlan = entry.find('{%s}vlanid' % namespace).text
            mac_type = entry.find('{%s}mac-type' % namespace).text
            state = entry.find('{%s}mac-state' % namespace).text
            interface = entry.find('{%s}forwarding-interface' % namespace)
            interface_type = interface.find('{%s}interface-type' %
                                            namespace).text
            interface_name = interface.find('{%s}interface-name' %
                                            namespace).text
            interface = '%s%s' % (interface_type, interface_name)

            table.append(dict(mac_address=address, interface=interface,
                              state=state, vlan=vlan,
                              type=mac_type))

        return table
935163
function tableDoesNotHaveHeaderRow(rows) {
        var headerRow = rows[0];

        var headerCells = headerRow.children;

        for (var i = 0; i < headerCells.length; i++) {
            if (headerCells[i].tagName != 'TH') {
                return true;
            }
        }
        return false;
    }
595936
public void unreferenceSSTables()
    {
        Set<SSTableReader> notCompacting;

        View currentView, newView;
        do
        {
            currentView = view.get();
            notCompacting = currentView.nonCompactingSStables();
            newView = currentView.replace(notCompacting, Collections.<SSTableReader>emptySet());
        }
        while (!view.compareAndSet(currentView, newView));

        if (notCompacting.isEmpty())
        {
            // notifySSTablesChanged -> LeveledManifest.promote doesn't like a no-op "promotion"
            return;
        }
        notifySSTablesChanged(notCompacting, Collections.<SSTableReader>emptySet(), OperationType.UNKNOWN);
        removeOldSSTablesSize(notCompacting);
        releaseReferences(notCompacting, true);
    }
250824
def drop_table(self, tablename, silent=False):
        
        if not silent and not self.is_table_existed(tablename):
            raise MonSQLException('TABLE %s DOES NOT EXIST' %tablename)

        self.__cursor.execute('DROP TABLE IF EXISTS %s' %(tablename))
        self.__db.commit()
617286
private void clearAuthorizationTable() {
        accessIdToRoles.clear();
        userToAccessId.clear();
        groupToAccessId.clear();
        userToRoles.clear();
        groupToRoles.clear();
    }
937125
private function check_table_exists()
    {
        if ($this->type == 'sqlite') {
            $query = "SELECT count(*) FROM sqlite_master WHERE name='cache'";
            $result = $this->db->query($query);
            $numbers = $result->fetchAll();
            if ($numbers[0]['count(*)'] > 0) {
                // Ok
            } else {
                $this->create_table();
            }
        } else {
            $query = "show tables like 'cache'";
            $result = $this->db->query($query);
            if ($result->size() > 0) {
                // Ok
            } else {
                $this->create_table();
            }
        }
    }
1298355
private boolean tableListIncludesExportOnly(List<Table> tableList) {
        // list of all export tables (assume uppercase)
        NavigableSet<String> exportTables = CatalogUtil.getExportTableNames(m_catalogDb);

        // this loop is O(number-of-joins * number-of-export-tables)
        // which seems acceptable if not great. Probably faster than
        // re-hashing the export only tables for faster lookup.
        for (Table table : tableList) {
            if (exportTables.contains(table.getTypeName()) && TableType.isStream(table.getTabletype())) {
                return true;
            }
        }

        return false;
    }
1026147
def drop(self, table):
        
        existing_tables = self.tables
        if isinstance(table, (list, set, tuple)):
            for t in table:
                self._drop(t, existing_tables)
        else:
            self._drop(table, existing_tables)
        return table
1353110
public void removeStaleSimulatorLaunchds() {

    // The instruments crashes sometimes by throwing the following error in the logs
    // The below logs were taken from Xcode5.1.1
    // sim[2430:303] Multiple instances of launchd_sim detected, using com.apple.iphonesimulator.launchd.3bd855a 
    // instead of com.apple.iphonesimulator.launchd.59ef76ee.
    List<String> launchctlCmd = Arrays.asList("launchctl", "list");
    Command cmd = new Command(launchctlCmd, false);
    SimulatorLaunchd simLaunchd = new SimulatorLaunchd();
    cmd.registerListener(simLaunchd);
    cmd.executeAndWait(true);

    // Retrieve the stale iphonesimulator launch IDs
    Set<String> simIDs = simLaunchd.getLaunchdIDs();
    if (simIDs.size() > 0) {
      if (log.isLoggable(Level.FINE)) {
        log.log(Level.FINE, "Removing stale iphonesimulator launchds: " + simIDs);
      }
      String iphoneSimulatorPrefix = "com.apple.iphonesimulator.launchd.";
      for (String id : simIDs) {
        launchctlCmd = Arrays.asList("launchctl", "remove", iphoneSimulatorPrefix + id);
        cmd = new Command(launchctlCmd, false);
        cmd.executeAndWait(true);
      }
    }
  }
945419
public void removeTableDef(TableDefinition tableDef) {
        assert tableDef != null;
        assert tableDef.getAppDef() == this;
        
        m_tableMap.remove(tableDef.getTableName());
    }
1329415
def check_table(table=None, family='ipv4'):
    '''
    
    '''
    ret = {'comment': '',
           'result': False}

    if not table:
        ret['comment'] = 'Table needs to be specified'
        return ret

    nft_family = _NFTABLES_FAMILIES[family]
    cmd = '{0} list tables {1}' . format(_nftables_cmd(), nft_family)
    out = __salt__['cmd.run'](cmd, python_shell=False).find('table {0} {1}'.format(nft_family, table))

    if out == -1:
        ret['comment'] = 'Table {0} in family {1} does not exist'.\
                         format(table, family)
    else:
        ret['comment'] = 'Table {0} in family {1} exists'.\
                         format(table, family)
        ret['result'] = True
    return ret