test_class.declarator: entry
test_class.original_string: RegisterEntry entry;
test_class.type: RegisterEntry
test_class.var_name: entry
test_class.file: micro-application-register/src/test/java/com/oath/micro/server/application/registry/RegisterEntryTest.java
test_class.identifier: RegisterEntryTest
test_case.body: @Test
      public void matches() throws Exception {
          RegisterEntry re = new RegisterEntry();
          re.getManifest().clear();
          assertFalse(entry.matches(re));
  
          re = RegisterEntry.builder().port(8080).externalPort(-1).build();
          re.getManifest().clear();
          assertTrue(entry.matches(re));
  
          re = RegisterEntry.builder().port(8080).externalPort(9090).build();
          re.getManifest().clear();
          assertTrue(entry.matches(re));
  
          re = RegisterEntry.builder().port(8080).hostname("host").externalPort(9090).build();
          re.getManifest().clear();
          assertTrue(entry.matches(re));
  
          re = RegisterEntry.builder().port(8080).hostname("host1").externalPort(9090).build();
          re.getManifest().clear();
          assertFalse(entry.matches(re));
  
          re = RegisterEntry.builder().port(8080).hostname("host").externalPort(9090).build();
          re.getManifest().clear();
          re.getManifest().put("Implementation-revision", "a2edfe4bc");
          assertTrue(entry.matches(re));
  
          re = RegisterEntry.builder().port(8080).hostname("host").externalPort(9090).build();
          re.getManifest().clear();
          re.getManifest().put("Implementation-Version", "version1");
          assertFalse(entry.matches(re));
      }
test_case.class_method_signature: RegisterEntryTest.matches()
test_case.full_signature: @Test public void matches()
test_case.identifier: matches
test_case.invocations: clear getManifest assertFalse matches build externalPort port builder clear getManifest assertTrue matches build externalPort port builder clear getManifest assertTrue matches build externalPort hostname port builder clear getManifest assertTrue matches build externalPort hostname port builder clear getManifest assertFalse matches build externalPort hostname port builder clear getManifest put getManifest assertTrue matches build externalPort hostname port builder clear getManifest put getManifest assertFalse matches
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void matches()
focal_class.declarator: f = new SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss Z")
focal_class.modifier: private static
focal_class.original_string: private static SimpleDateFormat f = new SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss Z");
focal_class.type: SimpleDateFormat
focal_class.var_name: f
focal_class.declarator: port
focal_class.modifier: @Wither
      private final
focal_class.original_string: @Wither
      private final int port;
focal_class.type: int
focal_class.var_name: port
focal_class.declarator: hostname
focal_class.modifier: @Wither
      private final
focal_class.original_string: @Wither
      private final String hostname;
focal_class.type: String
focal_class.var_name: hostname
focal_class.declarator: module
focal_class.modifier: @Wither
      private final
focal_class.original_string: @Wither
      private final String module;
focal_class.type: String
focal_class.var_name: module
focal_class.declarator: context
focal_class.modifier: @Wither
      private final
focal_class.original_string: @Wither
      private final String context;
focal_class.type: String
focal_class.var_name: context
focal_class.declarator: time
focal_class.modifier: private final
focal_class.original_string: private final Date time;
focal_class.type: Date
focal_class.var_name: time
focal_class.declarator: uuid
focal_class.modifier: @Wither
      private final
focal_class.original_string: @Wither
      private final String uuid;
focal_class.type: String
focal_class.var_name: uuid
focal_class.declarator: target
focal_class.modifier: @Wither
      private final
focal_class.original_string: @Wither
      private final String target;
focal_class.type: String
focal_class.var_name: target
focal_class.declarator: formattedDate
focal_class.modifier: private final
focal_class.original_string: private final String formattedDate;
focal_class.type: String
focal_class.var_name: formattedDate
focal_class.declarator: manifest = new HashMap<>()
focal_class.modifier: private final
focal_class.original_string: private final Map<String, String> manifest = new HashMap<>();
focal_class.type: Map<String, String>
focal_class.var_name: manifest
focal_class.declarator: health
focal_class.modifier: @Wither
      private final
focal_class.original_string: @Wither
      private final Health health;
focal_class.type: Health
focal_class.var_name: health
focal_class.declarator: stats
focal_class.modifier: @Wither
      private final
focal_class.original_string: @Wither
      private final List<Map<String, Map<String, String>>> stats;
focal_class.type: List<Map<String, Map<String, String>>>
focal_class.var_name: stats
focal_class.declarator: externalPort
focal_class.modifier: @Wither
      private final
focal_class.original_string: @Wither
      private final int externalPort;
focal_class.type: int
focal_class.var_name: externalPort
focal_class.file: micro-application-register/src/main/java/com/oath/micro/server/application/registry/RegisterEntry.java
focal_class.identifier: RegisterEntry
focal_class.class_method_signature: RegisterEntry.RegisterEntry()
focal_class.full_signature: public  RegisterEntry()
focal_class.identifier: RegisterEntry
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  RegisterEntry()
focal_class.class_method_signature: RegisterEntry.RegisterEntry(int port, String hostname, String module, String context, Date time,
          String uuid,
          String target, int externalPort)
focal_class.full_signature: public  RegisterEntry(int port, String hostname, String module, String context, Date time,
          String uuid,
          String target, int externalPort)
focal_class.identifier: RegisterEntry
focal_class.modifiers: public
focal_class.parameters: (int port, String hostname, String module, String context, Date time,
          String uuid,
          String target, int externalPort)
focal_class.signature:  RegisterEntry(int port, String hostname, String module, String context, Date time,
          String uuid,
          String target, int externalPort)
focal_class.class_method_signature: RegisterEntry.RegisterEntry(int port, String hostname, String module, String context, Date time,
          String target,
          int externalPort)
focal_class.full_signature: public  RegisterEntry(int port, String hostname, String module, String context, Date time,
          String target,
          int externalPort)
focal_class.identifier: RegisterEntry
focal_class.modifiers: public
focal_class.parameters: (int port, String hostname, String module, String context, Date time,
          String target,
          int externalPort)
focal_class.signature:  RegisterEntry(int port, String hostname, String module, String context, Date time,
          String target,
          int externalPort)
focal_class.class_method_signature: RegisterEntry.RegisterEntry(int port, String hostname, String module, String context, Date time,
          String uuid,
          String target, String ignoreDate, Health health,
          List<Map<String, Map<String, String>>> stats,
          int externalPort)
focal_class.full_signature: private  RegisterEntry(int port, String hostname, String module, String context, Date time,
          String uuid,
          String target, String ignoreDate, Health health,
          List<Map<String, Map<String, String>>> stats,
          int externalPort)
focal_class.identifier: RegisterEntry
focal_class.modifiers: private
focal_class.parameters: (int port, String hostname, String module, String context, Date time,
          String uuid,
          String target, String ignoreDate, Health health,
          List<Map<String, Map<String, String>>> stats,
          int externalPort)
focal_class.signature:  RegisterEntry(int port, String hostname, String module, String context, Date time,
          String uuid,
          String target, String ignoreDate, Health health,
          List<Map<String, Map<String, String>>> stats,
          int externalPort)
focal_class.class_method_signature: RegisterEntry.matches(RegisterEntry re)
focal_class.full_signature: public boolean matches(RegisterEntry re)
focal_class.identifier: matches
focal_class.modifiers: public
focal_class.parameters: (RegisterEntry re)
focal_class.return: boolean
focal_class.signature: boolean matches(RegisterEntry re)
focal_class.class_method_signature: RegisterEntry.matchManifest(Map<String, String> manifest)
focal_class.full_signature: private boolean matchManifest(Map<String, String> manifest)
focal_class.identifier: matchManifest
focal_class.modifiers: private
focal_class.parameters: (Map<String, String> manifest)
focal_class.return: boolean
focal_class.signature: boolean matchManifest(Map<String, String> manifest)
focal_class.class_method_signature: RegisterEntry.match(Map<String, String> map1, Map<String, String> map2, String key)
focal_class.full_signature: private boolean match(Map<String, String> map1, Map<String, String> map2, String key)
focal_class.identifier: match
focal_class.modifiers: private
focal_class.parameters: (Map<String, String> map1, Map<String, String> map2, String key)
focal_class.return: boolean
focal_class.signature: boolean match(Map<String, String> map1, Map<String, String> map2, String key)
focal_method.body: public boolean matches(RegisterEntry re) {
          //Only the fields which make sense to query is added for now.
          return (re.port == -1 || re.port == port) &&
              (isNull(re.hostname) || nonNull(hostname) && hostname.startsWith(re.hostname)) &&
              (isNull(re.module) || nonNull(module) && module.startsWith(re.module)) &&
              (isNull(re.context) || nonNull(context) && context.startsWith(re.context)) &&
              (isNull(re.health) || re.health.equals(health)) &&
              (re.externalPort == -1 || re.externalPort == externalPort) &&
              (isNull(re.manifest) || re.manifest.isEmpty() || matchManifest(re.manifest));
      }
focal_method.class_method_signature: RegisterEntry.matches(RegisterEntry re)
focal_method.full_signature: public boolean matches(RegisterEntry re)
focal_method.identifier: matches
focal_method.invocations: isNull nonNull startsWith isNull nonNull startsWith isNull nonNull startsWith isNull equals isNull isEmpty matchManifest
focal_method.modifiers: public
focal_method.parameters: (RegisterEntry re)
focal_method.return: boolean
focal_method.signature: boolean matches(RegisterEntry re)