test_class.file: rosjava/nrosjava_bootstrap/src/test/java/org/ros/namespace/GraphNameTest.java
test_class.identifier: GraphNameTest
test_case.body: @Test
    public void testGetParent() {
      GraphName global = GraphName.of("/");
      GraphName empty = GraphName.of("");
      // parent of empty is empty, just like dirname
      assertEquals(empty, GraphName.of("").getParent());
      // parent of global is global, just like dirname
      assertEquals(global, GraphName.of("/").getParent());
  
      // test with global names
      assertEquals(GraphName.of("/wg"), GraphName.of("/wg/name").getParent());
      assertEquals(GraphName.of("/wg"), GraphName.of("/wg/name/").getParent());
      assertEquals(global, GraphName.of("/wg/").getParent());
      assertEquals(global, GraphName.of("/wg").getParent());
  
      // test with relative names
      assertEquals(GraphName.of("wg"), GraphName.of("wg/name").getParent());
      assertEquals(empty, GraphName.of("wg/").getParent());
    }
test_case.class_method_signature: GraphNameTest.testGetParent()
test_case.full_signature: @Test public void testGetParent()
test_case.identifier: testGetParent
test_case.invocations: of of assertEquals getParent of assertEquals getParent of assertEquals of getParent of assertEquals of getParent of assertEquals getParent of assertEquals getParent of assertEquals of getParent of assertEquals getParent of
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetParent()
focal_class.declarator: ANONYMOUS_PREFIX = "anonymous_"
focal_class.modifier: @VisibleForTesting
    static final
focal_class.original_string: @VisibleForTesting
    static final String ANONYMOUS_PREFIX = "anonymous_";
focal_class.type: String
focal_class.var_name: ANONYMOUS_PREFIX
focal_class.declarator: ROOT = "/"
focal_class.modifier: private static final
focal_class.original_string: private static final String ROOT = "/";
focal_class.type: String
focal_class.var_name: ROOT
focal_class.declarator: SEPARATOR = "/"
focal_class.modifier: private static final
focal_class.original_string: private static final String SEPARATOR = "/";
focal_class.type: String
focal_class.var_name: SEPARATOR
focal_class.declarator: VALID_GRAPH_NAME_REGEXP = "^([\\~\\/A-Za-z][\\w_\\/]*)?$"
focal_class.modifier: public static final
focal_class.original_string: public static final String VALID_GRAPH_NAME_REGEXP = "^([\\~\\/A-Za-z][\\w_\\/]*)?$";
focal_class.type: String
focal_class.var_name: VALID_GRAPH_NAME_REGEXP
focal_class.declarator: VALID_GRAPH_NAME_PATTERN = Pattern
        .compile(VALID_GRAPH_NAME_REGEXP)
focal_class.modifier: public static final
focal_class.original_string: public static final Pattern VALID_GRAPH_NAME_PATTERN = Pattern
        .compile(VALID_GRAPH_NAME_REGEXP);
focal_class.type: Pattern
focal_class.var_name: VALID_GRAPH_NAME_PATTERN
focal_class.declarator: anonymousCounter = new AtomicInteger()
focal_class.modifier: private static
focal_class.original_string: private static AtomicInteger anonymousCounter = new AtomicInteger();
focal_class.type: AtomicInteger
focal_class.var_name: anonymousCounter
focal_class.declarator: name
focal_class.modifier: private final
focal_class.original_string: private final String name;
focal_class.type: String
focal_class.var_name: name
focal_class.file: rosjava/nrosjava_bootstrap/src/main/java/org/ros/namespace/GraphName.java
focal_class.identifier: GraphName
focal_class.class_method_signature: GraphName.newAnonymous()
focal_class.full_signature: public static GraphName newAnonymous()
focal_class.identifier: newAnonymous
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: GraphName
focal_class.signature: GraphName newAnonymous()
focal_class.class_method_signature: GraphName.root()
focal_class.full_signature: public static GraphName root()
focal_class.identifier: root
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: GraphName
focal_class.signature: GraphName root()
focal_class.class_method_signature: GraphName.empty()
focal_class.full_signature: public static GraphName empty()
focal_class.identifier: empty
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: GraphName
focal_class.signature: GraphName empty()
focal_class.class_method_signature: GraphName.of(String name)
focal_class.full_signature: public static GraphName of(String name)
focal_class.identifier: of
focal_class.modifiers: public static
focal_class.parameters: (String name)
focal_class.return: GraphName
focal_class.signature: GraphName of(String name)
focal_class.class_method_signature: GraphName.GraphName(String name)
focal_class.full_signature: private  GraphName(String name)
focal_class.identifier: GraphName
focal_class.modifiers: private
focal_class.parameters: (String name)
focal_class.signature:  GraphName(String name)
focal_class.class_method_signature: GraphName.canonicalize(String name)
focal_class.full_signature: private static String canonicalize(String name)
focal_class.identifier: canonicalize
focal_class.modifiers: private static
focal_class.parameters: (String name)
focal_class.return: String
focal_class.signature: String canonicalize(String name)
focal_class.class_method_signature: GraphName.isGlobal()
focal_class.full_signature: public boolean isGlobal()
focal_class.identifier: isGlobal
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isGlobal()
focal_class.class_method_signature: GraphName.isRoot()
focal_class.full_signature: public boolean isRoot()
focal_class.identifier: isRoot
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isRoot()
focal_class.class_method_signature: GraphName.isEmpty()
focal_class.full_signature: public boolean isEmpty()
focal_class.identifier: isEmpty
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isEmpty()
focal_class.class_method_signature: GraphName.isPrivate()
focal_class.full_signature: public boolean isPrivate()
focal_class.identifier: isPrivate
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isPrivate()
focal_class.class_method_signature: GraphName.isRelative()
focal_class.full_signature: public boolean isRelative()
focal_class.identifier: isRelative
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isRelative()
focal_class.class_method_signature: GraphName.getParent()
focal_class.full_signature: public GraphName getParent()
focal_class.identifier: getParent
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: GraphName
focal_class.signature: GraphName getParent()
focal_class.class_method_signature: GraphName.getBasename()
focal_class.full_signature: public GraphName getBasename()
focal_class.identifier: getBasename
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: GraphName
focal_class.signature: GraphName getBasename()
focal_class.class_method_signature: GraphName.toRelative()
focal_class.full_signature: public GraphName toRelative()
focal_class.identifier: toRelative
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: GraphName
focal_class.signature: GraphName toRelative()
focal_class.class_method_signature: GraphName.toGlobal()
focal_class.full_signature: public GraphName toGlobal()
focal_class.identifier: toGlobal
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: GraphName
focal_class.signature: GraphName toGlobal()
focal_class.class_method_signature: GraphName.join(GraphName other)
focal_class.full_signature: public GraphName join(GraphName other)
focal_class.identifier: join
focal_class.modifiers: public
focal_class.parameters: (GraphName other)
focal_class.return: GraphName
focal_class.signature: GraphName join(GraphName other)
focal_class.class_method_signature: GraphName.join(String other)
focal_class.full_signature: public GraphName join(String other)
focal_class.identifier: join
focal_class.modifiers: public
focal_class.parameters: (String other)
focal_class.return: GraphName
focal_class.signature: GraphName join(String other)
focal_class.class_method_signature: GraphName.toString()
focal_class.full_signature: @Override public String toString()
focal_class.identifier: toString
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toString()
focal_class.class_method_signature: GraphName.hashCode()
focal_class.full_signature: @Override public int hashCode()
focal_class.identifier: hashCode
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int hashCode()
focal_class.class_method_signature: GraphName.equals(Object obj)
focal_class.full_signature: @Override public boolean equals(Object obj)
focal_class.identifier: equals
focal_class.modifiers: @Override public
focal_class.parameters: (Object obj)
focal_class.return: boolean
focal_class.signature: boolean equals(Object obj)
focal_method.body: public GraphName getParent() {
      if (name.length() == 0) {
        return GraphName.empty();
      }
      if (name.equals(GraphName.ROOT)) {
        return GraphName.root();
      }
      int slashIdx = name.lastIndexOf('/');
      if (slashIdx > 1) {
        return new GraphName(name.substring(0, slashIdx));
      }
      if (isGlobal()) {
        return GraphName.root();
      }
      return GraphName.empty();
    }
focal_method.class_method_signature: GraphName.getParent()
focal_method.full_signature: public GraphName getParent()
focal_method.identifier: getParent
focal_method.invocations: length empty equals root lastIndexOf substring isGlobal root empty
focal_method.modifiers: public
focal_method.parameters: ()
focal_method.return: GraphName
focal_method.signature: GraphName getParent()