{@inheritDoc}

Cases of failures :
<ul>
<li>this row is not the last row of the Specification table</li>
<li>there is more than one cell in this row</li>
</ul>
773331
@Override
    public void interpret(Specification table)
    {
        Example row = table.nextExample();
        Statistics statistics = new Statistics(0, 0, 0, 0);
        if (table.hasMoreExamples()) {
            SyntaxException e = new SyntaxException("end", "This keyword should end the table");
            statistics.exception();
            CollectionUtil.first( keywordCells(row) ).annotate( Annotations.exception( e ) );
        }
        if (row.at(0, 1) != null) {            
            SyntaxException e = new SyntaxException("end", "This keyword doesn't take any argument");
            statistics.exception();
            CollectionUtil.first( keywordCells(row) ).annotate( Annotations.exception( e ) );
        }
        table.exampleDone(statistics);
    }
105404
public boolean hasErrors() {

        if ((m_validatedNewEntry != null) && m_validatedNewEntry.hasErrors()) {
            return true;
        }
        for (CmsAliasTableRow row : m_changedRows) {
            if (row.hasErrors()) {
                return true;
            }
        }
        return false;
    }
182672
public void addRowAfter(I_CmsEditableGroupRow row) {

        int index = m_container.getComponentIndex(row);
        if (index >= 0) {
            Component component = m_newComponentFactory.get();
            I_CmsEditableGroupRow newRow = m_rowBuilder.buildRow(this, component);
            m_container.addComponent(newRow, index + 1);
        }
        updatePlaceholder();
        updateButtonBars();
        updateGroupValidation();
    }
1071652
private void placeCell(ArrayList<Row> someRows, Cell aCell, Point aPosition) {
        int i;
        Row row = null;
        int rowCount = aPosition.x + aCell.getRowspan() - someRows.size();
        assumeTableDefaults(aCell);
        if ( (aPosition.x + aCell.getRowspan()) > someRows.size() ) {
            for (i = 0; i < rowCount; i++) {
                row = new Row(columns);
                someRows.add(row);
            }
        }
        
        // reserve cell in rows below
        for (i = aPosition.x + 1; i < (aPosition.x  + aCell.getRowspan()); i++) {
            if ( !someRows.get(i).reserve(aPosition.y, aCell.getColspan())) {
                
                // should be impossible to come here :-)
                throw new RuntimeException("addCell - error in reserve");
            }
        }
        row = someRows.get(aPosition.x);
        row.addElement(aCell, aPosition.y);
        
    }
1283485
private void fixCellValue(MergeRow mergeRowAnn, int fromRow, int col) {
        val sep = mergeRowAnn.prefixSeperate();
        if (StringUtils.isEmpty(sep)) return;

        val cell = sheet.getRow(fromRow).getCell(col);
        val old = PoiUtil.getCellStringValue(cell);
        val fixed = substringAfterSep(old, sep);

        PoiUtil.writeCellValue(cell, fixed);
    }
788207
@Override
    public TableCellRenderer getCellRenderer(int row, int column) {
        PropertySheetTableModel.Item item = getSheetModel()
                .getPropertySheetElement(row);

        switch (column) {
            case PropertySheetTableModel.NAME_COLUMN:
                // name column gets a custom renderer
                return nameRenderer;

            case PropertySheetTableModel.VALUE_COLUMN:
                if (!item.isProperty()) {
                    return nameRenderer;
                }

                // property value column gets the renderer from the factory
                Property property = item.getProperty();
                TableCellRenderer renderer = getRendererFactory().createTableCellRenderer(property);
                if (renderer == null) {
                    renderer = getCellRenderer(property.getType());
                }
                return renderer;
            default:
                // when will this happen, given the above?
                return super.getCellRenderer(row, column);
        }
    }
369881
public void setValidTable(TableCandidate tc)
    {
    	/**
    	 * TODO [improve]: Table/TableCandidate not match
    	 * */
    	this.setHeight(tc.getHeight());
    	this.setWidth(tc.getWidth());
    	this.setCaption(tc.getCaption());
    	this.setRowNumber(tc.getRows().size());
    	this.setColumnNumber(tc.getColumnNum_thisTable());
    	this.setRefTextList(tc.getRefText());
    	this.setFootNote(tc.getFootnoteText());
    	this.setHeading(tc.getColumnHeadings());
    	this.setBody(tc.getTableContent());
    	
    }
454024
public function valid() {
        // columnIndexFromString() returns an index based at one,
        // treat it as a count when comparing it to the base zero
        // position.
        $columnCount = PHPExcel_Cell::columnIndexFromString($this->_subject->getHighestColumn());

        if ($this->_onlyExistingCells) {
            // If we aren't looking at an existing cell, either
            // because the first column doesn't exist or next() has
            // been called onto a nonexistent cell, then loop until we
            // find one, or pass the last column.
            while ($this->_position < $columnCount &&
                   !$this->_subject->cellExistsByColumnAndRow($this->_position, $this->_rowIndex)) {
                ++$this->_position;
            }
        }

        return $this->_position < $columnCount;
    }
571751
@Override
    public boolean isCellEditable(int row, int column) {
        // names are not editable
        if (column == 0) {
            return false;
        }

        PropertySheetTableModel.Item item = getSheetModel().getPropertySheetElement(row);
        return item.isProperty() && item.getProperty().isEditable();
    }
172278
public static String getLimitPartitionRowsDeleteStmt(Table table) {
        CatalogMap<Statement> map = table.getTuplelimitdeletestmt();
        if (map.isEmpty()) {
            return null;
        }

        assert (map.size() == 1);
        return map.iterator().next().getSqltext();
    }
238659
public boolean isValid() {
        int totalNumberOfColumns = 0;
        Set<Object> columns = new HashSet<>();
        for(Map.Entry<Object, AssociativeArray> entry : internalData.entrySet()) {
            AssociativeArray row = entry.getValue();
            if(columns.isEmpty()) {
                //this is executed only for the first row
                for(Object column : row.internalData.keySet()) {
                    columns.add(column);
                }
                totalNumberOfColumns = columns.size();
            }
            else {
                //validating the columns of next rows based on first column
                if(totalNumberOfColumns!=row.size()) {
                    return false; //if the number of rows do not much then it is invalid
                }
                
                for(Object column : columns) {
                    if(row.containsKey(column)==false) {
                        return false; //if one of the detected columns do not exist, it is invalid
                    }
                }
            }
        }
        return true;
    }
1278458
def ensure_cell_exists(row_index, column_index = 0)
    validate_nonnegative(row_index)
    validate_nonnegative(column_index)

    sheet_data.rows[row_index] || add_row(row_index)
  end
1108209
public void newCell(final int row,
            final int column,
            final String value,
            final int mergedColStart) {
        if ( emptyCellValue( value ) ) {
            return;
        }
        final Integer rowInt = new Integer( row );
        if ( this._rowProperties.containsKey( rowInt ) ) {
            final String[] keyValue = (String[]) this._rowProperties.get( rowInt );
            if ( PropertiesSheetListener.EMPTY_STRING.equals( keyValue[1] ) ) {
                keyValue[1] = value;
                keyValue[2] = RuleSheetParserUtil.rc2name(row, column);
            }
        } else {
            final String trimmedValue = value.trim();
            final String[] keyValue = {trimmedValue, PropertiesSheetListener.EMPTY_STRING, RuleSheetParserUtil.rc2name(row, column+1) };
            this._rowProperties.put( rowInt, keyValue );
        }
    }
137125
private void executeRow(Example valuesRow, Example headers, Fixture rowFixtureAdapter)
    {
        valuesRow.annotate( Annotations.right() );

        Statistics rowStats = new Statistics();

        for (int i = 0; i != valuesRow.remainings(); ++i)
        {
            Example cell = valuesRow.at( i );

            if (i < headers.remainings())
            {
                // We can do the cast because #parseColumn returns an ExpectedColumn
                ExpectedColumn column = (ExpectedColumn) columns[i];

                try
                {
                    chekOneCell(rowFixtureAdapter, rowStats, cell, column);
                }
                catch (Exception e)
                {
                    cell.annotate( exception( e ) );
                    stats.exception();
                }
            }
            else
            {
                cell.annotate( ignored( cell.getContent() ) );
            }
        }
        applyRowStatistic(rowStats);
    }
1072147
public int numOfTableColumns() {
        Element rows = tableRows();
        if (rows == null) {
            return -1;
        }
        Element thCells = rows.findChild(app.newElement(Locator.TAGNAME, "th"));
        Element tdCells = rows.findChild(app.newElement(Locator.TAGNAME, "td"));
        return thCells.get().matchCount() + tdCells.get().matchCount();
    }
595651
public void consistencyCheck() {
        for (int iRow = 0; iRow < 9; iRow++) {
            for (int iCol = 0; iCol < 9; iCol++) {
                Cell cell = cells[iRow][iCol];
                Integer value = cell.getValue();
                if (value != null) {
                    if (! cell.getFree().isEmpty()) {
                        throw new IllegalStateException("free not empty");
                    }
                    // any containing group
                    for (Cell other: cell.getExCells()) {
                        // must not occur in any of the other cells
                        if (value.equals(other.getValue())) {
                            throw new IllegalStateException("duplicate");
                        }
                        // must not occur in the permissibles of any of the other cells
                        if (other.getFree().contains(value)) {
                            throw new IllegalStateException("not eliminated");
                        }
                    }
                }
            }
        }
        
        for (int i = 0; i < rows.length; i++) {
            Set<Integer> aSet = new HashSet<Integer>();
            for (int j = 0; j < rows[i].getCells().size(); j++) {
                Cell cell = rows[i].getCells().get(j);
                Integer value = cell.getValue();
                if (value != null) {
                    aSet.add(value);
                } else {
                    aSet.addAll(cell.getFree());
                }
            }
            if (! aSet.equals(CellGroup.ALL_NINE)) {
                throw new IllegalStateException("deficit in row");
            }
        }
        
        for (int i = 0; i < cols.length; i++) {
            Set<Integer> aSet = new HashSet<Integer>();
            for (int j = 0; j < cols[i].getCells().size(); j++) {
                Cell cell = cols[i].getCells().get(j);
                Integer value = cell.getValue();
                if (value != null) {
                    aSet.add(value);
                } else {
                    aSet.addAll(cell.getFree());
                }
            }
            if (! aSet.equals(CellGroup.ALL_NINE)) {
                throw new IllegalStateException("deficit in column");
            }
        }

        for (int ir = 0; ir < sqrs.length; ir++) {
            for (int ic = 0; ic < sqrs[ir] .length; ic++) {
                Set<Integer> aSet = new HashSet<Integer>();
                for (int j = 0; j < sqrs[ir][ic].getCells().size(); j++) {
                    Cell cell = sqrs[ir][ic].getCells().get(j);
                    Integer value = cell.getValue();
                    if (value != null) {
                        aSet.add(value);
                    } else {
                        aSet.addAll(cell.getFree());
                    }
                }
                if (! aSet.equals(CellGroup.ALL_NINE)) {
                    throw new IllegalStateException("deficit in square");
                }
            }
        }
        System.out.println("+++ check OK +++");
    }
153572
public function hasDataValidation()
    {
        if (!isset($this->parent)) {
            throw new PHPExcel_Exception('Cannot check for data validation when cell is not bound to a worksheet');
        }

        return $this->getWorksheet()->dataValidationExists($this->getCoordinate());
    }