test_class.file: bigquery/src/test/java/com/google/cloud/hadoop/io/bigquery/BigQueryStringsTest.java
test_class.identifier: BigQueryStringsTest
test_case.body: @Test
    public void testParseTableReferenceThrowsWhenDashesArePresent() {
      assertThrows(
          IllegalArgumentException.class, () -> BigQueryStrings.parseTableReference("foo-o.bar"));
    }
test_case.class_method_signature: BigQueryStringsTest.testParseTableReferenceThrowsWhenDashesArePresent()
test_case.full_signature: @Test public void testParseTableReferenceThrowsWhenDashesArePresent()
test_case.identifier: testParseTableReferenceThrowsWhenDashesArePresent
test_case.invocations: assertThrows parseTableReference
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testParseTableReferenceThrowsWhenDashesArePresent()
focal_class.declarator: DATASET_AND_TABLE_REGEX = "[a-zA-Z0-9_]+\\.[a-zA-Z0-9_$]+"
focal_class.modifier: public static final
focal_class.original_string: public static final String DATASET_AND_TABLE_REGEX = "[a-zA-Z0-9_]+\\.[a-zA-Z0-9_$]+";
focal_class.type: String
focal_class.var_name: DATASET_AND_TABLE_REGEX
focal_class.declarator: DOT_SPLITTER = Splitter.on('.')
focal_class.modifier: private static final
focal_class.original_string: private static final Splitter DOT_SPLITTER = Splitter.on('.');
focal_class.type: Splitter
focal_class.var_name: DOT_SPLITTER
focal_class.file: bigquery/src/main/java/com/google/cloud/hadoop/io/bigquery/BigQueryStrings.java
focal_class.identifier: BigQueryStrings
focal_class.class_method_signature: BigQueryStrings.toString(TableReference tableRef)
focal_class.full_signature: public static String toString(TableReference tableRef)
focal_class.identifier: toString
focal_class.modifiers: public static
focal_class.parameters: (TableReference tableRef)
focal_class.return: String
focal_class.signature: String toString(TableReference tableRef)
focal_class.class_method_signature: BigQueryStrings.parseTableReference(String tableRefString)
focal_class.full_signature: public static TableReference parseTableReference(String tableRefString)
focal_class.identifier: parseTableReference
focal_class.modifiers: public static
focal_class.parameters: (String tableRefString)
focal_class.return: TableReference
focal_class.signature: TableReference parseTableReference(String tableRefString)
focal_method.body: public static TableReference parseTableReference(String tableRefString) {
      // Logic mirrored from cloud/helix/clients/cli/bigquery_client.py.
      TableReference tableRef = new TableReference();
      int projectIdEnd = tableRefString.lastIndexOf(':');
      String datasetAndTableString = tableRefString;
      if (projectIdEnd != -1) {
        tableRef.setProjectId(tableRefString.substring(0, projectIdEnd));
  
        // Omit the ':' from the remaining datasetId.tableId substring.
        datasetAndTableString = tableRefString.substring(projectIdEnd + 1);
      }
  
      Preconditions.checkArgument(datasetAndTableString.matches(DATASET_AND_TABLE_REGEX),
          "Invalid datasetAndTableString '%s'; must match regex '%s'.",
          datasetAndTableString, DATASET_AND_TABLE_REGEX);
  
      List<String> idParts = DOT_SPLITTER.splitToList(datasetAndTableString);
      tableRef.setDatasetId(idParts.get(0));
      tableRef.setTableId(idParts.get(1));
      return tableRef;
    }
focal_method.class_method_signature: BigQueryStrings.parseTableReference(String tableRefString)
focal_method.full_signature: public static TableReference parseTableReference(String tableRefString)
focal_method.identifier: parseTableReference
focal_method.invocations: lastIndexOf setProjectId substring substring checkArgument matches splitToList setDatasetId get setTableId get
focal_method.modifiers: public static
focal_method.parameters: (String tableRefString)
focal_method.return: TableReference
focal_method.signature: TableReference parseTableReference(String tableRefString)