test_class.declarator: thrown = ExpectedException.none()
test_class.modifier: @Rule
    public
test_class.original_string: @Rule
    public ExpectedException thrown = ExpectedException.none();
test_class.type: ExpectedException
test_class.var_name: thrown
test_class.file: osrm-text-instructions/libjava-osrm-instructions/src/test/java/org/project_osrm/instructions/TextInstructionsTest.java
test_class.identifier: TextInstructionsTest
test_class.superclass: extends BaseTest
test_case.body: @Test
    public void testLaneDiagram() {
      TextInstructions textInstructions = new TextInstructions("en", "v5");
      Map<String, LegStep> map = new HashMap<>();
  
      map.put("o", new LegStep(Collections.singletonList(new StepIntersection(new IntersectionLanes[] {
        new IntersectionLanes(true), new IntersectionLanes(true), new IntersectionLanes(true)}))));
      map.put("ox", new LegStep(Collections.singletonList(new StepIntersection(new IntersectionLanes[] {
        new IntersectionLanes(true), new IntersectionLanes(true), new IntersectionLanes(false)}))));
      map.put("ox", new LegStep(Collections.singletonList(new StepIntersection(new IntersectionLanes[] {
        new IntersectionLanes(true), new IntersectionLanes(true), new IntersectionLanes(false),
        new IntersectionLanes(false)}))));
      map.put("oxo", new LegStep(Collections.singletonList(new StepIntersection(new IntersectionLanes[] {
        new IntersectionLanes(true), new IntersectionLanes(false), new IntersectionLanes(true)}))));
      map.put("xox", new LegStep(Collections.singletonList(new StepIntersection(new IntersectionLanes[] {
        new IntersectionLanes(false), new IntersectionLanes(true), new IntersectionLanes(true),
        new IntersectionLanes(false)}))));
      map.put("xoxox", new LegStep(Collections.singletonList(new StepIntersection(new IntersectionLanes[] {
        new IntersectionLanes(false), new IntersectionLanes(true), new IntersectionLanes(false),
        new IntersectionLanes(true), new IntersectionLanes(false)}))));
      map.put("x", new LegStep(Collections.singletonList(new StepIntersection(new IntersectionLanes[] {
        new IntersectionLanes(false), new IntersectionLanes(false), new IntersectionLanes(false)}))));
  
      for (Object entry : map.entrySet()) {
        Map.Entry pair = (Map.Entry) entry;
        assertEquals(pair.getKey(), textInstructions.laneConfig((LegStep) pair.getValue()));
      }
    }
test_case.class_method_signature: TextInstructionsTest.testLaneDiagram()
test_case.full_signature: @Test public void testLaneDiagram()
test_case.identifier: testLaneDiagram
test_case.invocations: put singletonList put singletonList put singletonList put singletonList put singletonList put singletonList put singletonList entrySet assertEquals getKey laneConfig getValue
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testLaneDiagram()
focal_class.declarator: logger = Logger.getLogger(TextInstructions.class.getSimpleName())
focal_class.modifier: private static final
focal_class.original_string: private static final Logger logger = Logger.getLogger(TextInstructions.class.getSimpleName());
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: tokenizedInstructionHook
focal_class.modifier: private
focal_class.original_string: private TokenizedInstructionHook tokenizedInstructionHook;
focal_class.type: TokenizedInstructionHook
focal_class.var_name: tokenizedInstructionHook
focal_class.declarator: rootObject
focal_class.modifier: private
focal_class.original_string: private JsonObject rootObject;
focal_class.type: JsonObject
focal_class.var_name: rootObject
focal_class.declarator: versionObject
focal_class.modifier: private
focal_class.original_string: private JsonObject versionObject;
focal_class.type: JsonObject
focal_class.var_name: versionObject
focal_class.file: osrm-text-instructions/libjava-osrm-instructions/src/main/java/org/project_osrm/instructions/TextInstructions.java
focal_class.identifier: TextInstructions
focal_class.class_method_signature: TextInstructions.TextInstructions(String language, String version)
focal_class.full_signature: public  TextInstructions(String language, String version)
focal_class.identifier: TextInstructions
focal_class.modifiers: public
focal_class.parameters: (String language, String version)
focal_class.signature:  TextInstructions(String language, String version)
focal_class.class_method_signature: TextInstructions.getTokenizedInstructionHook()
focal_class.full_signature: public TokenizedInstructionHook getTokenizedInstructionHook()
focal_class.identifier: getTokenizedInstructionHook
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: TokenizedInstructionHook
focal_class.signature: TokenizedInstructionHook getTokenizedInstructionHook()
focal_class.class_method_signature: TextInstructions.setTokenizedInstructionHook(TokenizedInstructionHook tokenizedInstructionHook)
focal_class.full_signature: public void setTokenizedInstructionHook(TokenizedInstructionHook tokenizedInstructionHook)
focal_class.identifier: setTokenizedInstructionHook
focal_class.modifiers: public
focal_class.parameters: (TokenizedInstructionHook tokenizedInstructionHook)
focal_class.return: void
focal_class.signature: void setTokenizedInstructionHook(TokenizedInstructionHook tokenizedInstructionHook)
focal_class.class_method_signature: TextInstructions.getRootObject()
focal_class.full_signature: public JsonObject getRootObject()
focal_class.identifier: getRootObject
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: JsonObject
focal_class.signature: JsonObject getRootObject()
focal_class.class_method_signature: TextInstructions.getVersionObject()
focal_class.full_signature: public JsonObject getVersionObject()
focal_class.identifier: getVersionObject
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: JsonObject
focal_class.signature: JsonObject getVersionObject()
focal_class.class_method_signature: TextInstructions.capitalizeFirstLetter(String text)
focal_class.full_signature: public static String capitalizeFirstLetter(String text)
focal_class.identifier: capitalizeFirstLetter
focal_class.modifiers: public static
focal_class.parameters: (String text)
focal_class.return: String
focal_class.signature: String capitalizeFirstLetter(String text)
focal_class.class_method_signature: TextInstructions.ordinalize(Integer number)
focal_class.full_signature: public String ordinalize(Integer number)
focal_class.identifier: ordinalize
focal_class.modifiers: public
focal_class.parameters: (Integer number)
focal_class.return: String
focal_class.signature: String ordinalize(Integer number)
focal_class.class_method_signature: TextInstructions.directionFromDegree(Double degree)
focal_class.full_signature: public String directionFromDegree(Double degree)
focal_class.identifier: directionFromDegree
focal_class.modifiers: public
focal_class.parameters: (Double degree)
focal_class.return: String
focal_class.signature: String directionFromDegree(Double degree)
focal_class.class_method_signature: TextInstructions.laneConfig(LegStep step)
focal_class.full_signature: public String laneConfig(LegStep step)
focal_class.identifier: laneConfig
focal_class.modifiers: public
focal_class.parameters: (LegStep step)
focal_class.return: String
focal_class.signature: String laneConfig(LegStep step)
focal_class.class_method_signature: TextInstructions.compile(LegStep step)
focal_class.full_signature: public String compile(LegStep step)
focal_class.identifier: compile
focal_class.modifiers: public
focal_class.parameters: (LegStep step)
focal_class.return: String
focal_class.signature: String compile(LegStep step)
focal_method.body: public String laneConfig(LegStep step) {
      if (step.getIntersections() == null
        || step.getIntersections().size() == 0
        || step.getIntersections().get(0).getLanes() == null
        || step.getIntersections().get(0).getLanes().length == 0) {
        throw new RuntimeException("No lanes object");
      }
  
      StringBuilder config = new StringBuilder();
      Boolean currentLaneValidity = null;
      for (IntersectionLanes lane : step.getIntersections().get(0).getLanes()) {
        if (currentLaneValidity == null || currentLaneValidity != lane.getValid()) {
          if (lane.getValid()) {
            config.append("o");
          } else {
            config.append("x");
          }
          currentLaneValidity = lane.getValid();
        }
      }
  
      return config.toString();
    }
focal_method.class_method_signature: TextInstructions.laneConfig(LegStep step)
focal_method.full_signature: public String laneConfig(LegStep step)
focal_method.identifier: laneConfig
focal_method.invocations: getIntersections size getIntersections getLanes get getIntersections getLanes get getIntersections getLanes get getIntersections getValid getValid append append getValid toString
focal_method.modifiers: public
focal_method.parameters: (LegStep step)
focal_method.return: String
focal_method.signature: String laneConfig(LegStep step)