Incorporates the information provided by a counterexample into the observation data structure.

@param ce
the query which contradicts the hypothesis

@return the rows (equivalence classes) which became unclosed by adding the information.
766643
protected List<List<Row<I>>> incorporateCounterExample(DefaultQuery<I, D> ce) {
        return ObservationTableCEXHandlers.handleClassicLStar(ce, table, oracle);
    }
863883
@SuppressWarnings("unchecked")
	public static Throwable getCausedBy(Throwable throwable, Class<? extends Exception>... causeClasses) {
		Throwable cause = throwable;
		while (cause != null) {
			for (Class<? extends Exception> causeClass : causeClasses) {
				if (causeClass.isInstance(cause)) {
					return cause;
				}
			}
			cause = cause.getCause();
		}
		return null;
	}
990480
public static int cusparseCsr2cscEx(
        cusparseHandle handle, 
        int m, 
        int n, 
        int nnz, 
        Pointer csrSortedVal, 
        int csrSortedValtype, 
        Pointer csrSortedRowPtr, 
        Pointer csrSortedColInd, 
        Pointer cscSortedVal, 
        int cscSortedValtype, 
        Pointer cscSortedRowInd, 
        Pointer cscSortedColPtr, 
        int copyValues, 
        int idxBase, 
        int executiontype)
    {
        return checkResult(cusparseCsr2cscExNative(handle, m, n, nnz, csrSortedVal, csrSortedValtype, csrSortedRowPtr, csrSortedColInd, cscSortedVal, cscSortedValtype, cscSortedRowInd, cscSortedColPtr, copyValues, idxBase, executiontype));
    }
806483
def classes(equivalences):
    
    node = OrderedDict()
    def N(x):
        if x in node:
            return node[x]
        n = node[x] = Node(x)
        return n
    for x, y in equivalences:
        union(N(x), N(y))
    eqclass = OrderedDict()
    for x, n in node.iteritems():
        x_ = find(n).element
        if x_ not in eqclass:
            eqclass[x_] = []
        eqclass[x_].append(x)
        eqclass[x] = eqclass[x_]
    return eqclass
448970
public static List<String> getGeometryFields(ResultSet resultSet) throws SQLException {
        List<String> fieldsName = new LinkedList<>();
        ResultSetMetaData meta = resultSet.getMetaData();
        int columnCount = meta.getColumnCount();
        for (int i = 1; i <= columnCount; i++) {
            if (meta.getColumnTypeName(i).equalsIgnoreCase("geometry")) {
                fieldsName.add(meta.getColumnName(i));
            }
        }
        return fieldsName;
    }
57400
@Override
  public CounterRow<K, N> peekLast() {
    return rowsList != null && rowsList.size() > 0 ? rowsList.get(rowsList.size()-1) : null;
  }
1193555
private Set<Dataset> getDatasetsWithThrowables() {
    Set<Dataset> datasetsWithThrowables = Sets.newHashSet();
    for (Dataset dataset : this.datasets) {
      if (!dataset.throwables().isEmpty()) {
        datasetsWithThrowables.add(dataset);
      }
    }
    return datasetsWithThrowables;
  }
986359
@SuppressWarnings("unchecked")
  public static <E, C extends Counter<E>> C union(C c1, C c2) {
    C result = (C) c1.getFactory().create();
    addInPlace(result, c1);
    addInPlace(result, c2);
    return result;
  }
973325
public static Predicate<Class<?>> classIs(final Class<?> reference) {
        return candidate -> candidate != null && candidate.equals(reference);
    }
82802
def _process_counter_example(self, mma, w_string):
        "
        if len(w_string) == 1:
            self.observation_table.smi_vector.append(w_string)
            for exp in self.observation_table.em_vector:
                self._fill_table_entry(w_string, exp)

        diff = len(w_string)
        same = 0
        membership_answer = self._membership_query(w_string)
        while True:
            i = (same + diff) / 2
            access_string = self._run_in_hypothesis(mma, w_string, i)
            if membership_answer != self._membership_query(access_string + w_string[i:]):
                diff = i
            else:
                same = i
            if diff - same == 1:
                break

        # First check if the transition is part of our training data.
        access_string = self._run_in_hypothesis(mma, w_string, diff - 1)
        wrong_transition = access_string + w_string[diff - 1]
        if wrong_transition not in self.observation_table.smi_vector:
            # If transition is not part of our training data add s_ib to Smi and
            # return to checking table closedness.
            self.observation_table.smi_vector.append(wrong_transition)
            for exp in self.observation_table.em_vector:
                self._fill_table_entry(wrong_transition, exp)
            return

        # This point presents a tradeoff between equivalence and membership
        # queries. If the transition in the counterexample'input_string breakpoint is not
        # part of our current training data (i.e. s_ib is not part of our Smi
        # set), then we assume a wrong transition and return to checking table
        # closure by adding s_ib to our training data. This saves a number of
        # membership queries since we don't add a row in our table unless
        # absolutely necessary. Notice that even if Equivalence queries are
        # expensive in general caching the result will be able to discover that
        # this iteration required a new state in the next equivalence query.

        exp = w_string[diff:]
        self.observation_table.em_vector.append(exp)
        for row in self.observation_table.sm_vector + self.observation_table.smi_vector:
            self._fill_table_entry(row, exp)
652472
public static <E> Counter<E> asCounter(Collection<E> c) {
    Counter<E> count = new ClassicCounter<E>();
    for (E elem : c) {
      count.incrementCount(elem);
    }
    return count;
  }
1027646
public List<MapRow> readTableConditional(Class<? extends TableReader> readerClass) throws IOException
   {
      List<MapRow> result;
      if (DatatypeConverter.getBoolean(m_stream))
      {
         result = readTable(readerClass);
      }
      else
      {
         result = Collections.emptyList();
      }
      return result;
   }
1061120
public int[] getEquivalenceClassesSizeVector() {
        List equivalenceClasses = cycleBasis().equivalenceClasses();
        int[] result = new int[equivalenceClasses.size()];
        for (int i = 0; i < equivalenceClasses.size(); i++) {
            result[i] = ((Collection) equivalenceClasses.get(i)).size();
        }
        return result;
    }
883934
public static List<String> extractNonExistingColumns(final Collection<String> expectedColumns,
        final Collection<String> actualColumns) {
        final List<String> columnsNotSpecifiedInExpectedDataSet = new ArrayList<String>();

        for (String column : expectedColumns) {
            if (!actualColumns.contains(column.toLowerCase())) {
                columnsNotSpecifiedInExpectedDataSet.add(column.toLowerCase());
            }
        }

        return columnsNotSpecifiedInExpectedDataSet;
    }
404722
public List<MappedClass> getSubTypes(final MappedClass mc) {
        List<MappedClass> subtypes = new ArrayList<MappedClass>();
        for (MappedClass mappedClass : getMappedClasses()) {
            if (mappedClass.isSubType(mc)) {
                subtypes.add(mappedClass);
            }
        }

        return subtypes;
    }
1139848
@Override
    public Collection<ProcessDefinition> getProcessDefinitions(QueryContext queryContext) {
        Collection<ProcessDefinition> cases = availableProcesses.stream()
                .filter(caseDef -> caseDef.isActive())
                .sorted(new ProcessDefinitionComparator(queryContext.getOrderBy(), queryContext.isAscending()))
                .skip(queryContext.getOffset())
                .limit(queryContext.getCount())
                .collect(toList());
        return cases;
    }
1208272
@Override
    public ResultSet getSchemas() throws SQLException
    {
        checkClosed();
        VoltTable vtable = new VoltTable(
                new ColumnInfo("TABLE_SCHEM", VoltType.STRING),
                new ColumnInfo("TABLE_CATALOG", VoltType.STRING));
        JDBC4ResultSet res = new JDBC4ResultSet(this.sysCatalog, vtable);
        return res;
    }