Source:
<code>public boolean isAuthenticated(HttpMessage msg, User user, boolean force) { if (msg == null || user == null) { return false; } AuthenticationState authState = user.getAuthenticationState(); if (loggedInIndicatorPattern == null && loggedOutIndicatorPattern == null) { try { Stats.incCounter(SessionStructure.getHostName(msg), AUTH_STATE_NO_INDICATOR_STATS); } catch (URIException e) { } if (View.isInitialised()) { View.getSingleton() .getOutputPanel() .append( Constant.messages.getString( "authentication.output.indicatorsNotSet", msg.getRequestHeader().getURI()) + "\n"); } return true; } HttpMessage msgToTest; switch (this.authCheckingStrategy) { <START> case EACH_REQ: msgToTest = msg; break; case EACH_REQ_RESP: <END> msgToTest = msg; break; case EACH_RESP: msgToTest = msg; break; case POLL_URL: if (!force && authState.getLastPollResult() != null && authState.getLastPollResult()) { switch (pollFrequencyUnits) { case SECONDS: if ((System.currentTimeMillis() - authState.getLastPollTime()) / 1000 < pollFrequency) { try { Stats.incCounter( SessionStructure.getHostName(msg), AUTH_STATE_ASSUMED_IN_STATS); } catch (URIException e) { } return true; } break; case REQUESTS: default: if (authState.getRequestsSincePoll() < pollFrequency) { authState.incRequestsSincePoll(); try { Stats.incCounter( SessionStructure.getHostName(msg), AUTH_STATE_ASSUMED_IN_STATS); } catch (URIException e) { } return true; } break; } } try { HttpMessage pollMsg = pollAsUser(user); msgToTest = pollMsg; } catch (Exception e1) { LOGGER.warn("Failed sending poll request to " + this.getPollUrl(), e1); return false; } break; default: return false; } return evaluateAuthRequest(msgToTest, authState); }</code><technical_language>merged</technical_language>

Target:
public boolean isAuthenticated(HttpMessage msg, User user, boolean force) { if (msg == null || user == null) { return false; } AuthenticationState authState = user.getAuthenticationState(); if (loggedInIndicatorPattern == null && loggedOutIndicatorPattern == null) { try { Stats.incCounter(SessionStructure.getHostName(msg), AUTH_STATE_NO_INDICATOR_STATS); } catch (URIException e) { } if (View.isInitialised()) { View.getSingleton() .getOutputPanel() .append( Constant.messages.getString( "authentication.output.indicatorsNotSet", msg.getRequestHeader().getURI()) + "\n"); } return true; } HttpMessage msgToTest; switch (this.authCheckingStrategy) { case EACH_REQ: case EACH_REQ_RESP: case EACH_RESP: msgToTest = msg; break; case POLL_URL: if (!force && authState.getLastPollResult() != null && authState.getLastPollResult()) { switch (pollFrequencyUnits) { case SECONDS: if ((System.currentTimeMillis() - authState.getLastPollTime()) / 1000 < pollFrequency) { try { Stats.incCounter( SessionStructure.getHostName(msg), AUTH_STATE_ASSUMED_IN_STATS); } catch (URIException e) { } return true; } break; case REQUESTS: default: if (authState.getRequestsSincePoll() < pollFrequency) { authState.incRequestsSincePoll(); try { Stats.incCounter( SessionStructure.getHostName(msg), AUTH_STATE_ASSUMED_IN_STATS); } catch (URIException e) { } return true; } break; } } try { HttpMessage pollMsg = pollAsUser(user); msgToTest = pollMsg; } catch (Exception e1) { LOGGER.warn("Failed sending poll request to " + this.getPollUrl(), e1); return false; } break; default: return false; } return evaluateAuthRequest(msgToTest, authState); }