Source:
<code>public boolean onHttpRequestSend(HttpMessage msg) { String site = msg.getRequestHeader().getHostName() + ":" + msg.getRequestHeader().getHostPort(); if (getView() != null) { this.getParamsPanel().addSite(site); } SiteParameters sps = this.siteParamsMap.get(site); if (sps == null) { sps = new SiteParameters(this, site); this.siteParamsMap.put(site, sps); } TreeSet<HtmlParameter> params; Iterator<HtmlParameter> iter; try { params = msg.getRequestHeader().getCookieParams(); iter = params.iterator(); while (iter.hasNext()) { persist(sps.addParam(site, iter.next(), msg)); } } catch (IllegalArgumentException e) { logger.warn("Failed to obtain the cookies: " + e.getMessage(), e); } params = msg.getUrlParams(); iter = params.iterator(); while (iter.hasNext()) { persist(sps.addParam(site, iter.next(), msg)); } ExtensionAntiCSRF extAntiCSRF = Control.getSingleton().getExtensionLoader().getExtension(ExtensionAntiCSRF.class); params = msg.getFormParams(); iter = params.iterator(); HtmlParameter param; while (iter.hasNext()) { param = iter.next(); if (extAntiCSRF != null && extAntiCSRF.isAntiCsrfToken(param.getName())) { param.addFlag(HtmlParameter.Flags.anticsrf.name()); } persist(sps.addParam(site, param, msg)); } VariantMultipartFormParameters params2 = new VariantMultipartFormParameters(); params2.setMessage(msg); for (NameValuePair nvp : params2.getParamList()) { <START> if (Arrays.asList(NameValuePair.TYPE_MULTIPART_DATA_PARAM, NameValuePair.TYPE_MULTIPART_DATA_FILE_NAME) <END> .contains(nvp.getType())) { persist(sps.addParam(site, new HtmlParameter(HtmlParameter.Type.multipart, nvp.getName(), nvp.getValue()), msg)); } } return true; }</code><technical_language>This created for loop (or moved a constant, compare types)</technical_language>

Target:
public boolean onHttpRequestSend(HttpMessage msg) { String site = msg.getRequestHeader().getHostName() + ":" + msg.getRequestHeader().getHostPort(); if (getView() != null) { this.getParamsPanel().addSite(site); } SiteParameters sps = this.siteParamsMap.get(site); if (sps == null) { sps = new SiteParameters(this, site); this.siteParamsMap.put(site, sps); } TreeSet<HtmlParameter> params; Iterator<HtmlParameter> iter; try { params = msg.getRequestHeader().getCookieParams(); iter = params.iterator(); while (iter.hasNext()) { persist(sps.addParam(site, iter.next(), msg)); } } catch (IllegalArgumentException e) { logger.warn("Failed to obtain the cookies: " + e.getMessage(), e); } params = msg.getUrlParams(); iter = params.iterator(); while (iter.hasNext()) { persist(sps.addParam(site, iter.next(), msg)); } ExtensionAntiCSRF extAntiCSRF = Control.getSingleton().getExtensionLoader().getExtension(ExtensionAntiCSRF.class); params = msg.getFormParams(); iter = params.iterator(); HtmlParameter param; while (iter.hasNext()) { param = iter.next(); if (extAntiCSRF != null && extAntiCSRF.isAntiCsrfToken(param.getName())) { param.addFlag(HtmlParameter.Flags.anticsrf.name()); } persist(sps.addParam(site, param, msg)); } VariantMultipartFormParameters params2 = new VariantMultipartFormParameters(); params2.setMessage(msg); for (NameValuePair nvp : params2.getParamList()) { if (nvp.getType() == NameValuePair.TYPE_MULTIPART_DATA_PARAM || nvp.getType() == NameValuePair.TYPE_MULTIPART_DATA_FILE_NAME) { persist(sps.addParam(site, new HtmlParameter(HtmlParameter.Type.multipart, nvp.getName(), nvp.getValue()), msg)); } } return true; }