Buggy code:
res ) + "<seq2seq4repair_space>" ) + ( getPropertyAsString ( LDAPExtSampler . COMPAREDN ) ) ) ) ; responseData = responseData + "<operation><opertype>compare<//opertype>" ; responseData = ( ( responseData + "<comparedn>" ) + ( getPropertyAsString ( LDAPExtSampler . COMPAREDN ) ) ) + "<//comparedn>" ; responseData = ( ( responseData + "<comparefilter>" ) + ( getPropertyAsString ( LDAPExtSampler . COMPAREFILT ) ) ) + "<//comparefilter><//operation>" ; compareOp ( temp_client , dirContext , res ) ; if ( temp_client . compareAnswer . hasMore ( ) ) { } else { res . setResponseCode ( "49" ) ; res . setResponseMessage ( "compareFalse" ) ; isSuccessful = false ; } } else if ( getPropertyAsString ( LDAPExtSampler . TEST ) . equals ( "add" ) ) { res . setSamplerData ( ( "Add<seq2seq4repair_space>object<seq2seq4repair_space>" + ( getPropertyAsString ( LDAPExtSampler . BASE_ENTRY_DN ) ) ) ) ; responseData = responseData + "<operation><opertype>add<//opertype>" ; responseData = ( ( responseData + "<attributes>" ) + ( getArguments ( ) . toString ( ) ) ) + "<//attributes>" ; responseData = ( ( responseData + "<dn>" ) + ( getPropertyAsString ( LDAPExtSampler . BASE_ENTRY_DN ) ) ) + "<//dn><//operation>" ; addTest ( temp_client , dirContext , res ) ; } else if ( getPropertyAsString ( LDAPExtSampler . TEST ) . equals ( "delete" ) ) { res . setSamplerData ( ( "Delete<seq2seq4repair_space>object<seq2seq4repair_space>" + ( getPropertyAsString ( LDAPExtSampler . DELETE ) ) ) ) ; 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 ( "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 ( "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 ( "search" ) ) { 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>" ; searchTest ( temp_client , dirContext , res ) ; while ( temp_client . answer . hasMore ( ) ) { sr = ( ( SearchResult ) ( temp_client . answer . next ( ) ) ) ; responseData = ( ( ( ( ( ( responseData + "<dn>" ) + ( sr . getName ( ) ) ) + "," ) + ( getPropertyAsString ( LDAPExtSampler . SEARCHBASE ) ) ) + "," ) + ( getRootdn ( ) ) ) + "<//dn>" ; responseData = ( ( responseData + "<returnedattr>" ) + ( sr . getAttributes ( ) . size ( ) ) ) + "<//returnedattr>" ; attrlist = sr . getAttributes ( ) . getIDs ( ) ; while ( attrlist . hasMore ( ) ) { iets = ( ( String ) ( attrlist . next ( ) ) ) ; responseData = ( ( responseData + "<attribute><attributename>" ) + ( iets . toString ( ) ) ) + "<//attributename>" ; responseData = ( ( responseData + "<attributevalue>" ) + ( sr . getAttributes ( ) . get ( iets . toString ( ) ) . toString ( ) . substring ( ( ( iets . toString ( ) . length ( ) ) + 2 ) ) ) ) + "<//attributevalue><//attribute>" ; } } responseData = responseData + "<//searchresult><//operation>" ; } } 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 ) ) ) ; } isSuccessful = false ; } catch ( Exception ex ) { res . setResponseData ( ex . toString ( ) . getBytes ( ) ) ; LDAPExtSampler . log . error ( "Ldap<seq2seq4repair_space>client<seq2seq4repair_space>-<seq2seq4repair_space>" , ex ) ; isSuccessful = false ; res . setResponseMessage ( "internal<seq2seq4repair_space>error" ) ; res . setResponseCode ( "800" ) ; } finally { responseData = ( ( responseData + "<responsecode>" ) + ( res . getResponseCode ( ) ) ) + "<//responsecode>" ; responseData = ( ( responseData + "<responsemessage>" ) + ( res . getResponseMessage ( ) ) ) + "<//responsemessage>" ; responseData = responseData + "<//ldapanswer>" ; res . setResponseData ( responseData . getBytes ( ) ) ; res . setThreadName ( Thread . currentThread ( ) . getName ( ) ) ; <START_BUG> res . setDataType ( "text" ) ; <END_BUG>

Fix:
res . setDataType ( TEXT ) ;