test_class.declarator: lineDecoder = new LineDecoder(new LocationReferencePointDecoder())
test_class.original_string: LineDecoder lineDecoder = new LineDecoder(new LocationReferencePointDecoder());
test_class.type: LineDecoder
test_class.var_name: lineDecoder
test_class.file: proto/src/test/java/openlr/proto/decoder/LineDecoderTest.java
test_class.identifier: LineDecoderTest
test_case.body: @Test
      public void testMissingLocationReference() {
          LocationReferenceData locationReferenceData = LocationReferenceData.newBuilder()
                  .build();
  
          try {
              lineDecoder.decode("1", locationReferenceData);
              fail();
          } catch (PhysicalFormatException e) {
              assertEquals(e.getErrorCode(), OpenLRProtoStatusCode.MISSING_LOCATION_REFERENCE);
          }
      }
test_case.class_method_signature: LineDecoderTest.testMissingLocationReference()
test_case.full_signature: @Test public void testMissingLocationReference()
test_case.identifier: testMissingLocationReference
test_case.invocations: build newBuilder decode fail assertEquals getErrorCode
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testMissingLocationReference()
focal_class.declarator: locationReferencePointDecoder
focal_class.modifier: private final
focal_class.original_string: private final LocationReferencePointDecoder locationReferencePointDecoder;
focal_class.type: LocationReferencePointDecoder
focal_class.var_name: locationReferencePointDecoder
focal_class.file: proto/src/main/java/openlr/proto/decoder/LineDecoder.java
focal_class.identifier: LineDecoder
focal_class.interfaces: implements LocationReferenceDecoder
focal_class.class_method_signature: LineDecoder.LineDecoder(LocationReferencePointDecoder locationReferencePointDecoder)
focal_class.full_signature:   LineDecoder(LocationReferencePointDecoder locationReferencePointDecoder)
focal_class.identifier: LineDecoder
focal_class.parameters: (LocationReferencePointDecoder locationReferencePointDecoder)
focal_class.signature:  LineDecoder(LocationReferencePointDecoder locationReferencePointDecoder)
focal_class.class_method_signature: LineDecoder.decode(String id, LocationReferenceData data)
focal_class.full_signature: @Override public RawLocationReference decode(String id, LocationReferenceData data)
focal_class.identifier: decode
focal_class.modifiers: @Override public
focal_class.parameters: (String id, LocationReferenceData data)
focal_class.return: RawLocationReference
focal_class.signature: RawLocationReference decode(String id, LocationReferenceData data)
focal_method.body: @Override
      public RawLocationReference decode(String id, LocationReferenceData data) throws OpenLRProtoException {
          if (!data.hasLineLocationReference()) {
              throw new OpenLRProtoException(OpenLRProtoStatusCode.MISSING_LOCATION_REFERENCE);
          }
  
          LineLocationReference lineLocationReference = data.getLineLocationReference();
  
          int lrpCount = lineLocationReference.getLocationReferencePointsCount();
  
          if (lrpCount < 2) {
              throw new OpenLRProtoException(OpenLRProtoStatusCode.INVALID_LOCATION_REFERENCE);
          }
  
          List<LocationReferencePoint> locationReferencePoints = new ArrayList<>();
  
          for (int sequenceNumber = 1; sequenceNumber <= lrpCount; sequenceNumber++) {
              LocationReferencePoint locationReferencePoint = locationReferencePointDecoder.decode(
                      lineLocationReference.getLocationReferencePoints(sequenceNumber - 1),
                      sequenceNumber,
                      sequenceNumber == lrpCount);
              locationReferencePoints.add(locationReferencePoint);
          }
  
          Offsets offsets = new OffsetsProtoImpl(
                  lineLocationReference.getPositiveOffset(),
                  lineLocationReference.getNegativeOffset());
  
          return new RawLineLocRef(id, locationReferencePoints, offsets);
      }
focal_method.class_method_signature: LineDecoder.decode(String id, LocationReferenceData data)
focal_method.full_signature: @Override public RawLocationReference decode(String id, LocationReferenceData data)
focal_method.identifier: decode
focal_method.invocations: hasLineLocationReference getLineLocationReference getLocationReferencePointsCount decode getLocationReferencePoints add getPositiveOffset getNegativeOffset
focal_method.modifiers: @Override public
focal_method.parameters: (String id, LocationReferenceData data)
focal_method.return: RawLocationReference
focal_method.signature: RawLocationReference decode(String id, LocationReferenceData data)