test_class.declarator: herdSearchQueryHelper
test_class.modifier: @Autowired
      private
test_class.original_string: @Autowired
      private HerdSearchQueryHelper herdSearchQueryHelper;
test_class.type: HerdSearchQueryHelper
test_class.var_name: herdSearchQueryHelper
test_class.file: herd-code/herd-dao/src/test/java/org/finra/herd/dao/helper/HerdSearchQueryHelperTest.java
test_class.identifier: HerdSearchQueryHelperTest
test_class.superclass: extends AbstractDaoTest
test_case.body: @Test
      public void extractSearchPhrase() throws Exception
      {
          IndexSearchRequest indexSearchRequest = new IndexSearchRequest();
  
          indexSearchRequest.setSearchTerm("foo -foo bar -bar foobar");
          Assert.assertEquals("foo bar foobar", herdSearchQueryHelper.extractSearchPhrase(indexSearchRequest));
      }
test_case.class_method_signature: HerdSearchQueryHelperTest.extractSearchPhrase()
test_case.full_signature: @Test public void extractSearchPhrase()
test_case.identifier: extractSearchPhrase
test_case.invocations: setSearchTerm assertEquals extractSearchPhrase
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void extractSearchPhrase()
focal_class.file: herd-code/herd-dao/src/main/java/org/finra/herd/dao/helper/HerdSearchQueryHelper.java
focal_class.identifier: HerdSearchQueryHelper
focal_class.class_method_signature: HerdSearchQueryHelper.getNegationTermMatcher(final IndexSearchRequest indexSearchRequest)
focal_class.full_signature: private Matcher getNegationTermMatcher(final IndexSearchRequest indexSearchRequest)
focal_class.identifier: getNegationTermMatcher
focal_class.modifiers: private
focal_class.parameters: (final IndexSearchRequest indexSearchRequest)
focal_class.return: Matcher
focal_class.signature: Matcher getNegationTermMatcher(final IndexSearchRequest indexSearchRequest)
focal_class.class_method_signature: HerdSearchQueryHelper.determineNegationTermsPresent(final IndexSearchRequest indexSearchRequest)
focal_class.full_signature: public boolean determineNegationTermsPresent(final IndexSearchRequest indexSearchRequest)
focal_class.identifier: determineNegationTermsPresent
focal_class.modifiers: public
focal_class.parameters: (final IndexSearchRequest indexSearchRequest)
focal_class.return: boolean
focal_class.signature: boolean determineNegationTermsPresent(final IndexSearchRequest indexSearchRequest)
focal_class.class_method_signature: HerdSearchQueryHelper.extractNegationTerms(final IndexSearchRequest indexSearchRequest)
focal_class.full_signature: public List<String> extractNegationTerms(final IndexSearchRequest indexSearchRequest)
focal_class.identifier: extractNegationTerms
focal_class.modifiers: public
focal_class.parameters: (final IndexSearchRequest indexSearchRequest)
focal_class.return: List<String>
focal_class.signature: List<String> extractNegationTerms(final IndexSearchRequest indexSearchRequest)
focal_class.class_method_signature: HerdSearchQueryHelper.extractSearchPhrase(final IndexSearchRequest indexSearchRequest)
focal_class.full_signature: public String extractSearchPhrase(final IndexSearchRequest indexSearchRequest)
focal_class.identifier: extractSearchPhrase
focal_class.modifiers: public
focal_class.parameters: (final IndexSearchRequest indexSearchRequest)
focal_class.return: String
focal_class.signature: String extractSearchPhrase(final IndexSearchRequest indexSearchRequest)
focal_method.body: public String extractSearchPhrase(final IndexSearchRequest indexSearchRequest)
      {
          final Matcher regexMatcher = getNegationTermMatcher(indexSearchRequest);
  
          String searchPhrase = indexSearchRequest.getSearchTerm();
  
          while (regexMatcher.find())
          {
              // extract all matches and remove them from the original search phrase
              searchPhrase = searchPhrase.replace(regexMatcher.group(), StringUtils.EMPTY);
          }
  
          return searchPhrase.trim();
      }
focal_method.class_method_signature: HerdSearchQueryHelper.extractSearchPhrase(final IndexSearchRequest indexSearchRequest)
focal_method.full_signature: public String extractSearchPhrase(final IndexSearchRequest indexSearchRequest)
focal_method.identifier: extractSearchPhrase
focal_method.invocations: getNegationTermMatcher getSearchTerm find replace group trim
focal_method.modifiers: public
focal_method.parameters: (final IndexSearchRequest indexSearchRequest)
focal_method.return: String
focal_method.signature: String extractSearchPhrase(final IndexSearchRequest indexSearchRequest)