test_class.file: encoder/src/test/java/openlr/encoder/routesearch/RouteSearchTest.java
test_class.identifier: RouteSearchTest
test_case.body: @Test
      public final void testRouteSearch() {
          TestData td = TestData.getInstance();
          Location loc = td.getRoute();
          List<? extends Line> theRoute = loc.getLocationLines();
          RouteSearchResult result = null;
          try {
              RouteSearch rs = new RouteSearch(theRoute);
              result = rs.calculateRoute();
          } catch (OpenLREncoderProcessingException e1) {
              fail("Unexpected exception", e1);
          }
          assertTrue("Route search failed for first calculation!", result
                  .getResult() == RouteSearchResult.RouteSearchReturnCode.INTERMEDIATE_FOUND);
          assertEquals("Wrong intermediate found!", result.getIntermediate()
                  .getID(), td.getIntermediate().getID());
          assertEquals("Wrong route length 1!", result.getRouteLength(), td
                  .getRoutLength1());
          List<? extends Line> rest = theRoute.subList(td.getIntermediatePos(),
                  theRoute.size());
          try {
              RouteSearch rs = new RouteSearch(rest);
              result = rs.calculateRoute();
  
              CommonObjectTestUtils.testToString(rs);
          } catch (OpenLREncoderProcessingException e) {
              fail("Unexpected exception", e);
          }
          assertTrue("Route search failed for first calculation!", result
                  .getResult() == RouteSearchResult.RouteSearchReturnCode.ROUTE_FOUND);
          assertEquals("Wrong route length 2!", result.getRouteLength(), td
                  .getRoutLength2());
  
          //TODO calculate invalid route
      }
test_case.class_method_signature: RouteSearchTest.testRouteSearch()
test_case.full_signature: @Test public final void testRouteSearch()
test_case.identifier: testRouteSearch
test_case.invocations: getInstance getRoute getLocationLines calculateRoute fail assertTrue getResult assertEquals getID getIntermediate getID getIntermediate assertEquals getRouteLength getRoutLength1 subList getIntermediatePos size calculateRoute testToString fail assertTrue getResult assertEquals getRouteLength getRoutLength2
test_case.modifiers: @Test public final
test_case.parameters: ()
test_case.return: void
test_case.signature: void testRouteSearch()
focal_class.declarator: FRC_COMPARATOR = new FunctionalRoadClass.FrcComparator()
focal_class.modifier: private static final
focal_class.original_string: private static final FrcComparator FRC_COMPARATOR = new FunctionalRoadClass.FrcComparator();
focal_class.type: FrcComparator
focal_class.var_name: FRC_COMPARATOR
focal_class.declarator: LOG = Logger.getLogger(RouteSearch.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOG = Logger.getLogger(RouteSearch.class);
focal_class.type: Logger
focal_class.var_name: LOG
focal_class.declarator: location
focal_class.modifier: private final
focal_class.original_string: private final List<? extends Line> location;
focal_class.type: List<? extends Line>
focal_class.var_name: location
focal_class.declarator: startLine
focal_class.modifier: private final
focal_class.original_string: private final Line startLine;
focal_class.type: Line
focal_class.var_name: startLine
focal_class.declarator: destLine
focal_class.modifier: private final
focal_class.original_string: private final Line destLine;
focal_class.type: Line
focal_class.var_name: destLine
focal_class.declarator: startLoopIndex
focal_class.modifier: private final
focal_class.original_string: private final int startLoopIndex;
focal_class.type: int
focal_class.var_name: startLoopIndex
focal_class.declarator: endLoopIndex
focal_class.modifier: private final
focal_class.original_string: private final int endLoopIndex;
focal_class.type: int
focal_class.var_name: endLoopIndex
focal_class.declarator: destX = 0
focal_class.modifier: private
focal_class.original_string: private double destX = 0;
focal_class.type: double
focal_class.var_name: destX
focal_class.declarator: destY = 0
focal_class.modifier: private
focal_class.original_string: private double destY = 0;
focal_class.type: double
focal_class.var_name: destY
focal_class.declarator: lengthBetweenStartAndEndLineAlongLocation = 0
focal_class.modifier: private
focal_class.original_string: private int lengthBetweenStartAndEndLineAlongLocation = 0;
focal_class.type: int
focal_class.var_name: lengthBetweenStartAndEndLineAlongLocation
focal_class.file: encoder/src/main/java/openlr/encoder/routesearch/RouteSearch.java
focal_class.identifier: RouteSearch
focal_class.class_method_signature: RouteSearch.RouteSearch(final List<? extends Line> loc)
focal_class.full_signature: public  RouteSearch(final List<? extends Line> loc)
focal_class.identifier: RouteSearch
focal_class.modifiers: public
focal_class.parameters: (final List<? extends Line> loc)
focal_class.signature:  RouteSearch(final List<? extends Line> loc)
focal_class.class_method_signature: RouteSearch.checkLoopAtStart()
focal_class.full_signature: private int checkLoopAtStart()
focal_class.identifier: checkLoopAtStart
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int checkLoopAtStart()
focal_class.class_method_signature: RouteSearch.checkLoopAtEnd()
focal_class.full_signature: private int checkLoopAtEnd()
focal_class.identifier: checkLoopAtEnd
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int checkLoopAtEnd()
focal_class.class_method_signature: RouteSearch.calculateRoute()
focal_class.full_signature: public final RouteSearchResult calculateRoute()
focal_class.identifier: calculateRoute
focal_class.modifiers: public final
focal_class.parameters: ()
focal_class.return: RouteSearchResult
focal_class.signature: RouteSearchResult calculateRoute()
focal_class.class_method_signature: RouteSearch.extractNextLines(final PQElem actualElement,
                                    final RouteSearchData data)
focal_class.full_signature: private void extractNextLines(final PQElem actualElement,
                                    final RouteSearchData data)
focal_class.identifier: extractNextLines
focal_class.modifiers: private
focal_class.parameters: (final PQElem actualElement,
                                    final RouteSearchData data)
focal_class.return: void
focal_class.signature: void extractNextLines(final PQElem actualElement,
                                    final RouteSearchData data)
focal_class.class_method_signature: RouteSearch.toString()
focal_class.full_signature: @Override public final String toString()
focal_class.identifier: toString
focal_class.modifiers: @Override public final
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toString()
focal_method.body: public RouteSearch(final List<? extends Line> loc)
              throws OpenLREncoderProcessingException {
          location = loc;
          if (location == null || location.isEmpty()) {
              throw new OpenLREncoderProcessingException(
                      EncoderProcessingError.ROUTE_CONSTRUCTION_ERROR);
          }
          startLine = location.get(0);
          destLine = location.get(location.size() - 1);
          for (int routeIndex = 0; routeIndex < location.size(); ++routeIndex) {
              lengthBetweenStartAndEndLineAlongLocation += location.get(routeIndex).getLineLength();
          }
          startLoopIndex = checkLoopAtStart();
          endLoopIndex = checkLoopAtEnd();
      }
focal_method.class_method_signature: RouteSearch.RouteSearch(final List<? extends Line> loc)
focal_method.full_signature: public  RouteSearch(final List<? extends Line> loc)
focal_method.identifier: RouteSearch
focal_method.modifiers: public
focal_method.parameters: (final List<? extends Line> loc)
focal_method.signature:  RouteSearch(final List<? extends Line> loc)