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 testnotConnectedLocation() {
  
          List<LocationReferenceHolder> locationRef = null;
          try {
              OpenLREncoder encoder = new OpenLREncoder();
              OpenLREncoderParameter params = new OpenLREncoderParameter.Builder().with(td.getMapDatabase()).with(td.getConfiguration()).buildParameter();
              locationRef = encoder.encodeLocations(params,
                      Arrays.asList(td.getNotConnectedLocation()));
              assertFalse(locationRef.get(0).isValid());
  
          } catch (OpenLRProcessingException e) {
              fail("Encoding location failed with exception: " + e.getErrorCode(),
                      e);
          }
      }
test_case.class_method_signature: OpenLREncoderTest.testnotConnectedLocation()
test_case.full_signature: @Test public final void testnotConnectedLocation()
test_case.identifier: testnotConnectedLocation
test_case.invocations: buildParameter with with getMapDatabase getConfiguration encodeLocations asList getNotConnectedLocation assertFalse isValid get fail getErrorCode
test_case.modifiers: @Test public final
test_case.parameters: ()
test_case.return: void
test_case.signature: void testnotConnectedLocation()
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 List<LocationReferenceHolder> encodeLocations(
              final OpenLREncoderParameter parameter, final List<Location> loc)
              throws OpenLRProcessingException {
          if (loc == null || loc.isEmpty()) {
              LOG.error("No location provided!");
              throw new OpenLREncoderProcessingException(
                      EncoderProcessingError.INVALID_PARAMETER);
          }
          if (LOG.isDebugEnabled()) {
              LOG.debug("OpenLR encoding of " + loc.size() + " locations started");
          }
          List<LocationReferenceHolder> llr = new ArrayList<LocationReferenceHolder>();
          OpenLREncoderProperties properties = new OpenLREncoderProperties(parameter.getConfiguration(), parameter.getPhysicalEncoders());
          // encode every single location
          for (Location l : loc) {
              LocationReferenceHolder lr = encodeLocation(parameter, properties, l);
  
              llr.add(lr);
          }
          return llr;
      }
focal_method.class_method_signature: OpenLREncoder.encodeLocations(
              final OpenLREncoderParameter parameter, final List<Location> loc)
focal_method.full_signature: @Override public List<LocationReferenceHolder> encodeLocations(
              final OpenLREncoderParameter parameter, final List<Location> loc)
focal_method.identifier: encodeLocations
focal_method.invocations: isEmpty error isDebugEnabled debug size getConfiguration getPhysicalEncoders encodeLocation add
focal_method.modifiers: @Override public
focal_method.parameters: (
              final OpenLREncoderParameter parameter, final List<Location> loc)
focal_method.return: List<LocationReferenceHolder>
focal_method.signature: List<LocationReferenceHolder> encodeLocations(
              final OpenLREncoderParameter parameter, final List<Location> loc)