Buggy code:
public class KeyToolUtils { private static final Logger log = LoggingManager . getLoggerForClass ( ) ; private static final String DEFAULT_DNAME = "cn=JMeter<seq2seq4repair_space>Proxy<seq2seq4repair_space>(DO<seq2seq4repair_space>NOT<seq2seq4repair_space>TRUST)" ; private static final String DNAME_ROOT_CA_KEY = "cn=Apache<seq2seq4repair_space>JMeter<seq2seq4repair_space>Proxy<seq2seq4repair_space>Root<seq2seq4repair_space>CA<seq2seq4repair_space>(TEMPORARY<seq2seq4repair_space>TRUST<seq2seq4repair_space>ONLY)" ; private static final String DNAME_INTERMEDIATE_CA_KEY = "cn=Apache<seq2seq4repair_space>JMeter<seq2seq4repair_space>Proxy<seq2seq4repair_space>Intermediate<seq2seq4repair_space>CA<seq2seq4repair_space>(TEMPORARY<seq2seq4repair_space>TRUST<seq2seq4repair_space>ONLY)" ; private static final String ROOT_CACERT_CRT = "ApacheJMeterTemporaryRootCA.crt" ; private static final String ROOT_CACERT_USR = "ApacheJMeterTemporaryRootCA.usr" ; private static final String ROOTCA_ALIAS = ":root_ca:" ; private static final String INTERMEDIATE_CA_ALIAS = ":intermediate_ca:" ; public static final boolean SUPPORTS_HOST_CERT = SystemUtils . isJavaVersionAtLeast ( JavaVersion . JAVA_1_7 ) ; private KeyToolUtils ( ) { } public static void genkeypair ( final File keystore , String alias , final String password , int validity , String dname , String ext ) throws IOException { } public static void generateProxyCA ( File keystore , String password , int validity ) throws IOException { } public static void generateHostCert ( File keystore , String password , String host , int validity ) throws IOException { } private static void generateSignedCert ( File keystore , String password , int validity , String alias , String subject ) throws IOException { <START_BUG> String dname = ( "cn=" + subject ) + ",<seq2seq4repair_space>o=JMeter<seq2seq4repair_space>Proxy<seq2seq4repair_space>(TEMPORARY<seq2seq4repair_space>TRUST<seq2seq4repair_space>ONLY" ; <END_BUG> KeyToolUtils . genkeypair ( keystore , alias , password , validity , dname , null ) ; ByteArrayOutputStream certReqOut = new ByteArrayOutputStream ( ) ; KeyToolUtils . keytool ( "-certreq" , keystore , password , alias , null , certReqOut ) ; InputStream certReqIn = new ByteArrayInputStream ( certReqOut . toByteArray ( ) ) ; ByteArrayOutputStream certOut = new ByteArrayOutputStream ( ) ; KeyToolUtils . keytool ( "-gencert" , keystore , password , KeyToolUtils . INTERMEDIATE_CA_ALIAS , certReqIn , certOut , "-ext" , "ku:c=dig,keyE" ) ; InputStream certIn = new ByteArrayInputStream ( certOut . toByteArray ( ) ) ; KeyToolUtils . keytool ( "-importcert" , keystore , password , alias , certIn , null , "-noprompt" ) ; } public static String list ( final File keystore , final String storePass ) throws IOException { } public static String [ ] getCAaliases ( ) { } private static void keytool ( String command , File keystore , String password , String alias , InputStream input , OutputStream output , String ... parameters ) throws IOException { } }

Fix:
String dname = ( "cn=" + subject ) + ",<seq2seq4repair_space>o=JMeter<seq2seq4repair_space>Proxy<seq2seq4repair_space>(TEMPORARY<seq2seq4repair_space>TRUST<seq2seq4repair_space>ONLY)" ;