Source:
<code>private SearchParameters getSearchParameters(SearchType searchType, String constraint) { SearchParameters searchParams = new SearchParameters(constraint, searchType); HashMap<String, String> matrixConstraints = QueryHelper.getMatrixConstraints(getUriInfo(), CASE_SENSITIVE_CONSTRAINT_PARAMETER, FROM_CONSTRAINT_PARAMETER); HashMap<String, String> queryConstraints = QueryHelper.getQueryConstraints(getUriInfo(), FROM_CONSTRAINT_PARAMETER); if (matrixConstraints.containsKey(FROM_CONSTRAINT_PARAMETER)) { try { searchParams.setSearchFrom(Long.parseLong(matrixConstraints.get(FROM_CONSTRAINT_PARAMETER))); } catch (Exception ex) { log.error("Unwrapping of '{}' matrix search parameter failed: {}", FROM_CONSTRAINT_PARAMETER, ex.getMessage()); <START> log.debug("Exception", ex); <END> } } else if (queryConstraints.containsKey(FROM_CONSTRAINT_PARAMETER)) { try { searchParams.setSearchFrom(Long.parseLong(queryConstraints.get(FROM_CONSTRAINT_PARAMETER))); } catch (Exception ex) { log.error("Unwrapping of '{}' query search parameter failed: {}", FROM_CONSTRAINT_PARAMETER, ex.getMessage()); log.debug("Exception", ex); } } if (matrixConstraints.containsKey(CASE_SENSITIVE_CONSTRAINT_PARAMETER)) { try { searchParams.setCaseSensitive(Boolean.parseBoolean(matrixConstraints.get(CASE_SENSITIVE_CONSTRAINT_PARAMETER))); } catch (Exception ex) { log.error("Unwrapping of '{}' search parameter failed: {}", CASE_SENSITIVE_CONSTRAINT_PARAMETER, ex.getMessage()); log.debug("Exception", ex); } } try { if (QueryHelper.hasMatrixParam(getUriInfo(), MAX) && getMaxResults()!=NO_LIMIT) { searchParams.setMaxCount(getMaxResults()); } } catch (MalformedNumberException ex) { handleError(ex, false); } return searchParams; }</code><technical_language>stack trace log level error message</technical_language>

Target:
private SearchParameters getSearchParameters(SearchType searchType, String constraint) { SearchParameters searchParams = new SearchParameters(constraint, searchType); HashMap<String, String> matrixConstraints = QueryHelper.getMatrixConstraints(getUriInfo(), CASE_SENSITIVE_CONSTRAINT_PARAMETER, FROM_CONSTRAINT_PARAMETER); HashMap<String, String> queryConstraints = QueryHelper.getQueryConstraints(getUriInfo(), FROM_CONSTRAINT_PARAMETER); if (matrixConstraints.containsKey(FROM_CONSTRAINT_PARAMETER)) { try { searchParams.setSearchFrom(Long.parseLong(matrixConstraints.get(FROM_CONSTRAINT_PARAMETER))); } catch (Exception ex) { log.error("Unwrapping of '{}' matrix search parameter failed: {}", FROM_CONSTRAINT_PARAMETER, ex.getMessage()); log.error("Exception", ex); } } else if (queryConstraints.containsKey(FROM_CONSTRAINT_PARAMETER)) { try { searchParams.setSearchFrom(Long.parseLong(queryConstraints.get(FROM_CONSTRAINT_PARAMETER))); } catch (Exception ex) { log.error("Unwrapping of '{}' query search parameter failed: {}", FROM_CONSTRAINT_PARAMETER, ex.getMessage()); log.error("Exception", ex); } } if (matrixConstraints.containsKey(CASE_SENSITIVE_CONSTRAINT_PARAMETER)) { try { searchParams.setCaseSensitive(Boolean.parseBoolean(matrixConstraints.get(CASE_SENSITIVE_CONSTRAINT_PARAMETER))); } catch (Exception ex) { log.error("Unwrapping of '{}' search parameter failed: {}", CASE_SENSITIVE_CONSTRAINT_PARAMETER, ex.getMessage()); log.error("Exception", ex); } } try { if (QueryHelper.hasMatrixParam(getUriInfo(), MAX) && getMaxResults()!=NO_LIMIT) { searchParams.setMaxCount(getMaxResults()); } } catch (MalformedNumberException ex) { handleError(ex, false); } return searchParams; }