test_class.declarator: LARGE_OFFSET = 17000
test_class.modifier: private static final
test_class.original_string: private static final int LARGE_OFFSET = 17000;
test_class.type: int
test_class.var_name: LARGE_OFFSET
test_class.declarator: EXPECTED_NR_LRPS_LONG_LINE = 5
test_class.modifier: private static final
test_class.original_string: private static final int EXPECTED_NR_LRPS_LONG_LINE = 5;
test_class.type: int
test_class.var_name: EXPECTED_NR_LRPS_LONG_LINE
test_class.declarator: LONG_LINE_IDS = {19, 24, 25}
test_class.modifier: private static final
test_class.original_string: private static final long[] LONG_LINE_IDS = {19, 24, 25};
test_class.type: long[]
test_class.var_name: LONG_LINE_IDS
test_class.declarator: mockery = new Mockery()
test_class.modifier: private
test_class.original_string: private Mockery mockery = new Mockery();
test_class.type: Mockery
test_class.var_name: mockery
test_class.declarator: td = TestData.getInstance()
test_class.modifier: private
test_class.original_string: private TestData td = TestData.getInstance();
test_class.type: TestData
test_class.var_name: td
test_class.file: encoder/src/test/java/openlr/encoder/OpenLREncoderTest.java
test_class.identifier: OpenLREncoderTest
test_case.body: @Test
      public final void testReducedLineLocation() {
  
          LocationReferenceHolder encLocRef = null;
          LineLocation inputLocation = td.getLineLocationReducibleOffsets();
          int lengtIn = 0;
          for (Line l : inputLocation.getLocationLines()) {
              lengtIn += l.getLineLength();
          }
  
          int pOffIn = inputLocation.getPositiveOffset();
          int nOffIn = inputLocation.getNegativeOffset();
  
          encLocRef = encodeLocation(inputLocation);
          assertTrue(encLocRef.isValid());
  
          int lengthOut = 0;
          for (LocationReferencePoint lrp : encLocRef.getLRPs()) {
              lengthOut += lrp.getDistanceToNext();
          }
          Offsets offOut = encLocRef.getRawLocationReferenceData().getOffsets();
  
          assertTrue(lengtIn > lengthOut);
          assertTrue(pOffIn != offOut.getPositiveOffset(0));
          assertTrue(nOffIn != offOut.getNegativeOffset(0));
  
          // The central location length is the stretch between the offset points
          int locationLengthIn = lengtIn - pOffIn - nOffIn;
          int locationLengthOut = lengthOut - offOut.getPositiveOffset(0)
                  - offOut.getNegativeOffset(0);
          // ... it should remain the same after pruning
          assertTrue(locationLengthIn == locationLengthOut);
      }
test_case.class_method_signature: OpenLREncoderTest.testReducedLineLocation()
test_case.full_signature: @Test public final void testReducedLineLocation()
test_case.identifier: testReducedLineLocation
test_case.invocations: getLineLocationReducibleOffsets getLocationLines getLineLength getPositiveOffset getNegativeOffset encodeLocation assertTrue isValid getLRPs getDistanceToNext getOffsets getRawLocationReferenceData assertTrue assertTrue getPositiveOffset assertTrue getNegativeOffset getPositiveOffset getNegativeOffset assertTrue
test_case.modifiers: @Test public final
test_case.parameters: ()
test_case.return: void
test_case.signature: void testReducedLineLocation()
focal_class.declarator: LOG = Logger.getLogger(OpenLREncoder.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOG = Logger.getLogger(OpenLREncoder.class);
focal_class.type: Logger
focal_class.var_name: LOG
focal_class.declarator: VERSION = VersionHelper.getVersion("encoder")
focal_class.modifier: private final
focal_class.original_string: private final Version VERSION = VersionHelper.getVersion("encoder");
focal_class.type: Version
focal_class.var_name: VERSION
focal_class.file: encoder/src/main/java/openlr/encoder/OpenLREncoder.java
focal_class.identifier: OpenLREncoder
focal_class.interfaces: implements openlr.OpenLREncoder
focal_class.class_method_signature: OpenLREncoder.getPhysicalEncoderServices()
focal_class.full_signature: public static List<PhysicalEncoder> getPhysicalEncoderServices()
focal_class.identifier: getPhysicalEncoderServices
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: List<PhysicalEncoder>
focal_class.signature: List<PhysicalEncoder> getPhysicalEncoderServices()
focal_class.class_method_signature: OpenLREncoder.encodeLocations(
              final OpenLREncoderParameter parameter, final List<Location> loc)
focal_class.full_signature: @Override public List<LocationReferenceHolder> encodeLocations(
              final OpenLREncoderParameter parameter, final List<Location> loc)
focal_class.identifier: encodeLocations
focal_class.modifiers: @Override public
focal_class.parameters: (
              final OpenLREncoderParameter parameter, final List<Location> loc)
focal_class.return: List<LocationReferenceHolder>
focal_class.signature: List<LocationReferenceHolder> encodeLocations(
              final OpenLREncoderParameter parameter, final List<Location> loc)
focal_class.class_method_signature: OpenLREncoder.encodeLocation(
              final OpenLREncoderParameter parameter, final Location loc)
focal_class.full_signature: @Override public LocationReferenceHolder encodeLocation(
              final OpenLREncoderParameter parameter, final Location loc)
focal_class.identifier: encodeLocation
focal_class.modifiers: @Override public
focal_class.parameters: (
              final OpenLREncoderParameter parameter, final Location loc)
focal_class.return: LocationReferenceHolder
focal_class.signature: LocationReferenceHolder encodeLocation(
              final OpenLREncoderParameter parameter, final Location loc)
focal_class.class_method_signature: OpenLREncoder.encodeLocation(
              final OpenLREncoderParameter parameter,
              final OpenLREncoderProperties properties, final Location loc)
focal_class.full_signature: private LocationReferenceHolder encodeLocation(
              final OpenLREncoderParameter parameter,
              final OpenLREncoderProperties properties, final Location loc)
focal_class.identifier: encodeLocation
focal_class.modifiers: private
focal_class.parameters: (
              final OpenLREncoderParameter parameter,
              final OpenLREncoderProperties properties, final Location loc)
focal_class.return: LocationReferenceHolder
focal_class.signature: LocationReferenceHolder encodeLocation(
              final OpenLREncoderParameter parameter,
              final OpenLREncoderProperties properties, final Location loc)
focal_class.class_method_signature: OpenLREncoder.getMajorVersion()
focal_class.full_signature: @Override public String getMajorVersion()
focal_class.identifier: getMajorVersion
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getMajorVersion()
focal_class.class_method_signature: OpenLREncoder.getMinorVersion()
focal_class.full_signature: @Override public String getMinorVersion()
focal_class.identifier: getMinorVersion
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getMinorVersion()
focal_class.class_method_signature: OpenLREncoder.getPatchVersion()
focal_class.full_signature: @Override public String getPatchVersion()
focal_class.identifier: getPatchVersion
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getPatchVersion()
focal_class.class_method_signature: OpenLREncoder.getVersion()
focal_class.full_signature: @Override public String getVersion()
focal_class.identifier: getVersion
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getVersion()
focal_method.body: @Override
      public LocationReferenceHolder encodeLocation(
              final OpenLREncoderParameter parameter, final Location loc)
              throws OpenLRProcessingException {
          return encodeLocation(parameter,
                  new OpenLREncoderProperties(parameter.getConfiguration(), parameter.getPhysicalEncoders()), loc);
      }
focal_method.class_method_signature: OpenLREncoder.encodeLocation(
              final OpenLREncoderParameter parameter, final Location loc)
focal_method.full_signature: @Override public LocationReferenceHolder encodeLocation(
              final OpenLREncoderParameter parameter, final Location loc)
focal_method.identifier: encodeLocation
focal_method.invocations: encodeLocation getConfiguration getPhysicalEncoders
focal_method.modifiers: @Override public
focal_method.parameters: (
              final OpenLREncoderParameter parameter, final Location loc)
focal_method.return: LocationReferenceHolder
focal_method.signature: LocationReferenceHolder encodeLocation(
              final OpenLREncoderParameter parameter, final Location loc)