test_class.file: singa-mathematics/src/test/java/bio/singa/mathematics/graphs/parser/GraphMLParserServiceTest.java
test_class.identifier: GraphMLParserServiceTest
test_case.body: @Test
      void shouldParseGraphXML() {
          String file = Thread.currentThread().getContextClassLoader().getResource("graphml_sample_01.xml").getFile();
          GraphMLParserService service = new GraphMLParserService(file);
          UndirectedGraph graph = service.parse();
          // determine correct size
          assertEquals(graph.getNodes().size(), 100);
          assertEquals(graph.getEdges().size(), 180);
          RegularNode node37 = graph.getNode(37);
          // identifiers and position are correctly assigned
          assertEquals(node37.getPosition().getX(), 436.3636363636364);
          assertEquals(node37.getPosition().getY(), 218.1818181818182);
          // connections are set
          RegularNode node72 = graph.getNode(72);
          assertTrue(node72.hasNeighbour(graph.getNode(71)));
          assertTrue(node72.hasNeighbour(graph.getNode(73)));
          assertTrue(node72.hasNeighbour(graph.getNode(62)));
          assertTrue(node72.hasNeighbour(graph.getNode(82)));
      }
test_case.class_method_signature: GraphMLParserServiceTest.shouldParseGraphXML()
test_case.full_signature: @Test void shouldParseGraphXML()
test_case.identifier: shouldParseGraphXML
test_case.invocations: getFile getResource getContextClassLoader currentThread parse assertEquals size getNodes assertEquals size getEdges getNode assertEquals getX getPosition assertEquals getY getPosition getNode assertTrue hasNeighbour getNode assertTrue hasNeighbour getNode assertTrue hasNeighbour getNode assertTrue hasNeighbour getNode
test_case.modifiers: @Test
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldParseGraphXML()
focal_class.declarator: logger = LoggerFactory.getLogger(GraphMLParserService.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger logger = LoggerFactory.getLogger(GraphMLParserService.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.file: singa-mathematics/src/main/java/bio/singa/mathematics/graphs/parser/GraphMLParserService.java
focal_class.identifier: GraphMLParserService
focal_class.class_method_signature: GraphMLParserService.GraphMLParserService(String filePath)
focal_class.full_signature: public  GraphMLParserService(String filePath)
focal_class.identifier: GraphMLParserService
focal_class.modifiers: public
focal_class.parameters: (String filePath)
focal_class.signature:  GraphMLParserService(String filePath)
focal_class.class_method_signature: GraphMLParserService.parse()
focal_class.full_signature: @Override public UndirectedGraph parse()
focal_class.identifier: parse
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: UndirectedGraph
focal_class.signature: UndirectedGraph parse()
focal_class.superclass: extends AbstractXMLParser<UndirectedGraph>
focal_method.body: @Override
      public UndirectedGraph parse() {
          logger.debug("Parsing graph from file {}.", getFetchResult());
          try {
              getXmlReader().parse(getResource());
          } catch (IOException | SAXException e) {
              logger.error("No graph could be parsed from file {}.", getFetchResult());
              e.printStackTrace();
          }
          return ((GraphMLContentHandler) getXmlReader().getContentHandler()).getGraph();
      }
focal_method.class_method_signature: GraphMLParserService.parse()
focal_method.full_signature: @Override public UndirectedGraph parse()
focal_method.identifier: parse
focal_method.invocations: debug getFetchResult parse getXmlReader getResource error getFetchResult printStackTrace getGraph getContentHandler getXmlReader
focal_method.modifiers: @Override public
focal_method.parameters: ()
focal_method.return: UndirectedGraph
focal_method.signature: UndirectedGraph parse()