Buggy code:
responseData = responseData + "<operation><opertype>delete<//opertype>" ; responseData = ( ( responseData + "<dn>" ) + ( getPropertyAsString ( LDAPExtSampler . DELETE ) ) ) + "<//dn><//operation>" ; deleteTest ( temp_client , dirContext , res ) ; } else if ( getPropertyAsString ( LDAPExtSampler . TEST ) . equals ( LDAPExtSampler . MODIFY ) ) { res . setSamplerData ( ( "Modify<seq2seq4repair_space>object<seq2seq4repair_space>" + ( getPropertyAsString ( LDAPExtSampler . BASE_ENTRY_DN ) ) ) ) ; responseData = responseData + "<operation><opertype>modify<//opertype>" ; responseData = ( ( responseData + "<dn>" ) + ( getPropertyAsString ( LDAPExtSampler . BASE_ENTRY_DN ) ) ) + "<//dn>" ; responseData = ( ( responseData + "<attributes>" ) + ( getLDAPArguments ( ) . toString ( ) ) ) + "<//attributes><//operation>" ; modifyTest ( temp_client , dirContext , res ) ; } else if ( getPropertyAsString ( LDAPExtSampler . TEST ) . equals ( LDAPExtSampler . RENAME ) ) { res . setSamplerData ( ( ( ( "ModDN<seq2seq4repair_space>object<seq2seq4repair_space>" + ( getPropertyAsString ( LDAPExtSampler . MODDDN ) ) ) + "<seq2seq4repair_space>to<seq2seq4repair_space>" ) + ( getPropertyAsString ( LDAPExtSampler . NEWDN ) ) ) ) ; responseData = responseData + "<operation><opertype>moddn<//opertype>" ; responseData = ( ( responseData + "<dn>" ) + ( getPropertyAsString ( LDAPExtSampler . MODDDN ) ) ) + "<//dn>" ; responseData = ( ( responseData + "<newdn>" ) + ( getPropertyAsString ( LDAPExtSampler . NEWDN ) ) ) + "<//newdn><//operation>" ; renameTest ( temp_client , dirContext , res ) ; } else if ( getPropertyAsString ( LDAPExtSampler . TEST ) . equals ( LDAPExtSampler . SEARCHBASE ) ) { final String scopeStr = getPropertyAsString ( LDAPExtSampler . SCOPE ) ; final int scope ; res . setSamplerData ( ( "Search<seq2seq4repair_space>with<seq2seq4repair_space>filter<seq2seq4repair_space>" + ( getPropertyAsString ( LDAPExtSampler . SEARCHFILTER ) ) ) ) ; responseData = responseData + "<operation><opertype>search<//opertype>" ; responseData = ( ( responseData + "<searchfilter>" ) + ( getPropertyAsString ( LDAPExtSampler . SEARCHFILTER ) ) ) + "<//searchfilter>" ; responseData = ( ( ( ( responseData + "<searchbase>" ) + ( getPropertyAsString ( LDAPExtSampler . SEARCHBASE ) ) ) + "," ) + ( getPropertyAsString ( LDAPExtSampler . ROOTDN ) ) ) + "<//searchbase>" ; responseData = ( ( responseData + "<scope>" ) + ( getPropertyAsString ( LDAPExtSampler . SCOPE ) ) ) + "<//scope>" ; responseData = ( ( responseData + "<countlimit>" ) + ( getPropertyAsString ( LDAPExtSampler . COUNTLIM ) ) ) + "<//countlimit>" ; responseData = ( ( responseData + "<timelimit>" ) + ( getPropertyAsString ( LDAPExtSampler . TIMELIM ) ) ) + "<//timelimit>" ; responseData = responseData + "<//operation><searchresult>" ; res . sampleStart ( ) ; if ( "object" . equals ( scopeStr ) ) { scope = SearchControls . OBJECT_SCOPE ; } else if ( "onelevel" . equals ( scopeStr ) ) { scope = SearchControls . ONELEVEL_SCOPE ; } else if ( "subtree" . equals ( scopeStr ) ) { scope = SearchControls . SUBTREE_SCOPE ; } else { scope = getPropertyAsInt ( LDAPExtSampler . SCOPE ) ; } NamingEnumeration srch = temp_client . searchTest ( dirContext , getPropertyAsString ( LDAPExtSampler . SEARCHBASE ) , getPropertyAsString ( LDAPExtSampler . SEARCHFILTER ) , scope , getPropertyAsLong ( LDAPExtSampler . COUNTLIM ) , getPropertyAsInt ( LDAPExtSampler . TIMELIM ) , getRequestAttributes ( getPropertyAsString ( LDAPExtSampler . ATTRIBS ) ) , getPropertyAsBoolean ( LDAPExtSampler . RETOBJ ) , getPropertyAsBoolean ( LDAPExtSampler . DEREF ) ) ; res . sampleEnd ( ) ; while ( srch . hasMore ( ) ) { SearchResult sr = ( ( SearchResult ) ( srch . next ( ) ) ) ; responseData = ( ( ( ( ( ( responseData + "<dn>" ) + ( sr . getName ( ) ) ) + "," ) + ( getPropertyAsString ( LDAPExtSampler . SEARCHBASE ) ) ) + "," ) + ( getRootdn ( ) ) ) + "<//dn>" ; responseData = ( ( responseData + "<returnedattr>" ) + ( sr . getAttributes ( ) . size ( ) ) ) + "<//returnedattr>" ; NamingEnumeration attrlist = sr . getAttributes ( ) . getIDs ( ) ; while ( attrlist . hasMore ( ) ) { String iets = ( ( String ) ( attrlist . next ( ) ) ) ; responseData = ( ( responseData + "<attribute><attributename>" ) + iets ) + "<//attributename>" ; responseData = ( ( responseData + "<attributevalue>" ) + ( sr . getAttributes ( ) . get ( iets ) . toString ( ) . substring ( ( ( iets . length ( ) ) + 2 ) ) ) ) + "<//attributevalue><//attribute>" ; } } <START_BUG> responseData = responseData + "<//searchresult><//operation>" ; <END_BUG> } } catch ( NamingException ex ) { String returnData = ex . toString ( ) ; if ( ( returnData . indexOf ( "LDAP:<seq2seq4repair_space>error<seq2seq4repair_space>code" ) ) >= 0 ) { res . setResponseMessage ( returnData . substring ( ( ( returnData . indexOf ( "LDAP:<seq2seq4repair_space>error<seq2seq4repair_space>code" ) ) + 22 ) , returnData . indexOf ( "]" ) ) ) ; res . setResponseCode ( returnData . substring ( ( ( returnData . indexOf ( "LDAP:<seq2seq4repair_space>error<seq2seq4repair_space>code" ) ) + 17 ) , ( ( returnData . indexOf ( "LDAP:<seq2seq4repair_space>error<seq2seq4repair_space>code" ) ) + 19 ) ) ) ; } else { res . setResponseMessage ( returnData ) ; res . setResponseCode ( "800" ) ; } isSuccessful = false ; } finally { responseData = ( ( responseData + "<responsecode>" ) + ( res . getResponseCode ( ) ) ) + "<//responsecode>" ; responseData = ( ( responseData + "<responsemessage>" ) + ( res . getResponseMessage ( ) ) ) + "<//responsemessage>" ; responseData = responseData + "<//ldapanswer>" ; res . setResponseData ( responseData . getBytes ( ) ) ; res . setDataType ( TEXT ) ; res . setSuccessful ( isSuccessful ) ; } return res ; } public void testStarted ( ) { } public void testEnded ( ) { } public void testStarted ( String host ) { }

Fix:
responseData = responseData + "<//searchresult>" ;