Source:
<code>private void setProxy(CLArgsParser parser) throws IllegalUserActionException { if (parser.getArgumentById(PROXY_USERNAME) != null) { Properties jmeterProps = JMeterUtils.getJMeterProperties(); if (parser.getArgumentById(PROXY_PASSWORD) != null) { String u = parser.getArgumentById(PROXY_USERNAME).getArgument(); String p = parser.getArgumentById(PROXY_PASSWORD).getArgument(); Authenticator.setDefault(new ProxyAuthenticator(u, p)); log.info("Set Proxy login: {}/{}", u, p); jmeterProps.setProperty(HTTP_PROXY_USER, u); jmeterProps.setProperty(HTTP_PROXY_PASS, p); } else { String u = parser.getArgumentById(PROXY_USERNAME).getArgument(); Authenticator.setDefault(new ProxyAuthenticator(u, "")); log.info("Set Proxy login: {}", u); jmeterProps.setProperty(HTTP_PROXY_USER, u); } } if (parser.getArgumentById(PROXY_HOST) != null && parser.getArgumentById(PROXY_PORT) != null) { String scheme = parser.getArgumentById(PROXY_SCHEME).getArgument(); String h = parser.getArgumentById(PROXY_HOST).getArgument(); String p = parser.getArgumentById(PROXY_PORT).getArgument(); <START> System.setProperty("http.proxyScheme", scheme ); END> System.setProperty("http.proxyHost", h ); System.setProperty("https.proxyHost", h); System.setProperty("http.proxyPort", p); System.setProperty("https.proxyPort", p); log.info("Set scheme: proxyHost: Port: {}", scheme, h, p); } else if (parser.getArgumentById(PROXY_HOST) != null || parser.getArgumentById(PROXY_PORT) != null) { throw new IllegalUserActionException(JMeterUtils.getResString("proxy_cl_error")); } if (parser.getArgumentById(NONPROXY_HOSTS) != null) { String n = parser.getArgumentById(NONPROXY_HOSTS).getArgument(); System.setProperty("http.nonProxyHosts", n ); System.setProperty("https.nonProxyHosts", n ); log.info("Set http[s].nonProxyHosts: {}", n); } }</code><technical_language>set if blank/null</technical_language>

Target:
private void setProxy(CLArgsParser parser) throws IllegalUserActionException { if (parser.getArgumentById(PROXY_USERNAME) != null) { Properties jmeterProps = JMeterUtils.getJMeterProperties(); if (parser.getArgumentById(PROXY_PASSWORD) != null) { String u = parser.getArgumentById(PROXY_USERNAME).getArgument(); String p = parser.getArgumentById(PROXY_PASSWORD).getArgument(); Authenticator.setDefault(new ProxyAuthenticator(u, p)); log.info("Set Proxy login: {}/{}", u, p); jmeterProps.setProperty(HTTP_PROXY_USER, u); jmeterProps.setProperty(HTTP_PROXY_PASS, p); } else { String u = parser.getArgumentById(PROXY_USERNAME).getArgument(); Authenticator.setDefault(new ProxyAuthenticator(u, "")); log.info("Set Proxy login: {}", u); jmeterProps.setProperty(HTTP_PROXY_USER, u); } } if (parser.getArgumentById(PROXY_HOST) != null && parser.getArgumentById(PROXY_PORT) != null) { String h = parser.getArgumentById(PROXY_HOST).getArgument(); String p = parser.getArgumentById(PROXY_PORT).getArgument(); System.setProperty("http.proxyHost", h ); System.setProperty("https.proxyHost", h); System.setProperty("http.proxyPort", p); System.setProperty("https.proxyPort", p); String proxyScheme = parser.getArgumentById(PROXY_SCHEME).getArgument(); if(!StringUtils.isBlank(proxyScheme)){ System.setProperty("http.proxyScheme", proxyScheme ); } log.info("Set scheme: proxyHost: Port: {}", proxyScheme, h, p); } else if (parser.getArgumentById(PROXY_HOST) != null || parser.getArgumentById(PROXY_PORT) != null) { throw new IllegalUserActionException(JMeterUtils.getResString("proxy_cl_error")); } if (parser.getArgumentById(NONPROXY_HOSTS) != null) { String n = parser.getArgumentById(NONPROXY_HOSTS).getArgument(); System.setProperty("http.nonProxyHosts", n ); System.setProperty("https.nonProxyHosts", n ); log.info("Set http[s].nonProxyHosts: {}", n); } }