Buggy code:
public class TestHTTPSamplersAgainstHttpMirrorServer extends JMeterTestCase { private static final int HTTP_SAMPLER = 0 ; private static final int HTTP_SAMPLER2 = 1 ; private static final int HTTP_SAMPLER3 = 2 ; private static final String ISO_8859_1 = "ISO-8859-1" ; private static final String US_ASCII = "US-ASCII" ; private static final byte [ ] CRLF = new byte [ ] { 13 , 10 } ; private static final int MIRROR_PORT = 8182 ; private static byte [ ] TEST_FILE_CONTENT ; private static File temporaryFile ; private final int item ; public TestHTTPSamplersAgainstHttpMirrorServer ( String arg0 ) { } public TestHTTPSamplersAgainstHttpMirrorServer ( String arg0 , int item ) { } public static Test suite ( ) { } public void itemised_testPostRequest_UrlEncoded ( ) throws Exception { } public void itemised_testPostRequest_UrlEncoded2 ( ) throws Exception { } public void itemised_testPostRequest_UrlEncoded3 ( ) throws Exception { } public void testPostRequest_FormMultipart_0 ( ) throws Exception { } public void testPostRequest_FormMultipart2 ( ) throws Exception { } public void testPostRequest_FormMultipart3 ( ) throws Exception { } public void testPostRequest_FileUpload ( ) throws Exception { } public void testPostRequest_FileUpload2 ( ) throws Exception { } public void testPostRequest_FileUpload3 ( ) throws Exception { } public void testPostRequest_BodyFromParameterValues ( ) throws Exception { } public void testPostRequest_BodyFromParameterValues2 ( ) throws Exception { } public void testPostRequest_BodyFromParameterValues3 ( ) throws Exception { } public void testGetRequest ( ) throws Exception { } public void testGetRequest2 ( ) throws Exception { } public void testGetRequest3 ( ) throws Exception { } public void itemised_testGetRequest_Parameters ( ) throws Exception { } public void itemised_testGetRequest_Parameters2 ( ) throws Exception { } public void itemised_testGetRequest_Parameters3 ( ) throws Exception { } private void testPostRequest_UrlEncoded ( int samplerType , String samplerDefaultEncoding , int test ) throws Exception { } private void testPostRequest_FormMultipart ( int samplerType , String samplerDefaultEncoding ) throws Exception { } private void testPostRequest_FileUpload ( int samplerType , String samplerDefaultEncoding ) throws Exception { } private void testPostRequest_BodyFromParameterValues ( int samplerType , String samplerDefaultEncoding ) throws Exception { } private void testGetRequest ( int samplerType ) throws Exception { } private void testGetRequest_Parameters ( int samplerType , int test ) throws Exception { } private HTTPSampleResult executeSampler ( HTTPSamplerBase sampler ) { } private void checkPostRequestUrlEncoded ( HTTPSamplerBase sampler , HTTPSampleResult res , String samplerDefaultEncoding , String contentEncoding , String titleField , String titleValue , String descriptionField , String descriptionValue , boolean valuesAlreadyUrlEncoded ) throws IOException { } private void checkPostRequestFormMultipart ( HTTPSamplerBase sampler , HTTPSampleResult res , String samplerDefaultEncoding , String contentEncoding , String titleField , String titleValue , String descriptionField , String descriptionValue ) throws IOException { } private void checkPostRequestFileUpload ( HTTPSamplerBase sampler , HTTPSampleResult res , String samplerDefaultEncoding , String contentEncoding , String titleField , String titleValue , String descriptionField , String descriptionValue , String fileField , File fileValue , String fileMimeType , byte [ ] fileContent ) throws IOException { } private void checkPostRequestBody ( HTTPSamplerBase sampler , HTTPSampleResult res , String samplerDefaultEncoding , String contentEncoding , String expectedPostBody ) throws IOException { } private void checkGetRequest ( HTTPSamplerBase sampler , HTTPSampleResult res ) throws IOException { } private void checkGetRequest_Parameters ( HTTPSamplerBase sampler , HTTPSampleResult res , String contentEncoding , URL executedUrl , String titleField , String titleValue , String descriptionField , String descriptionValue , boolean valuesAlreadyUrlEncoded ) throws IOException { } private void checkMethodPathQuery ( String headersSent , String expectedMethod , String expectedPath , String expectedQueryString , HTTPSampleResult res ) throws IOException { } private String getHeadersSent ( byte [ ] responseData ) throws IOException { } private byte [ ] getBodySent ( byte [ ] responseData ) throws IOException { byte [ ] bodySent = null ; String headersSent = getHeadersSent ( responseData ) ; if ( headersSent != null ) { String contentLengthValue = getSentRequestHeaderValue ( headersSent , HEADER_CONTENT_LENGTH ) ; int contentLength = - 1 ; if ( contentLengthValue != null ) { <START_BUG> contentLength = new Integer ( contentLengthValue ) . intValue ( ) ; <END_BUG> } else { fail ( "Did<seq2seq4repair_space>not<seq2seq4repair_space>receive<seq2seq4repair_space>any<seq2seq4repair_space>content-length<seq2seq4repair_space>header" ) ; } bodySent = new byte [ contentLength ] ; System . arraycopy ( responseData , ( ( responseData . length ) - contentLength ) , bodySent , 0 , contentLength ) ; } return bodySent ; } private boolean isInRequestHeaders ( String requestHeaders , String headerName , String headerValue ) { } private void checkHeaderTypeLength ( String requestHeaders , String contentType , int contentLen ) { } private String getSentRequestHeaderValue ( String requestHeaders , String headerName ) { } private boolean checkRegularExpression ( String stringToCheck , String regularExpression ) { } private int getPositionOfBody ( String stringToCheck ) { } private String getBoundaryStringFromContentType ( String requestHeaders ) { } private void setupUrl ( HTTPSamplerBase sampler , String contentEncoding ) { } private void setupFormData ( HTTPSamplerBase httpSampler , boolean isEncoded , String titleField , String titleValue , String descriptionField , String descriptionValue ) { } private void setupFileUploadData ( HTTPSamplerBase httpSampler , boolean isEncoded , String titleField , String titleValue , String descriptionField , String descriptionValue , String fileField , File fileValue , String fileMimeType ) { } private void checkArraysHaveSameContent ( byte [ ] expected , byte [ ] actual , String encoding , HTTPSampleResult res ) throws UnsupportedEncodingException { } private byte [ ] createExpectedFormdataOutput ( String boundaryString , String contentEncoding , String titleField , String titleValue , String descriptionField , String descriptionValue , boolean firstMultipart , boolean lastMultipart ) throws IOException { } private byte [ ] createExpectedFilepartOutput ( String boundaryString , String fileField , File file , String mimeType , byte [ ] fileContent , boolean firstMultipart , boolean lastMultipart ) throws IOException { } private byte [ ] createExpectedFormAndUploadOutput ( String boundaryString , String contentEncoding , String titleField , String titleValue , String descriptionField , String descriptionValue , String fileField , File fileValue , String fileMimeType , byte [ ] fileContent ) throws IOException { } private HTTPSamplerBase createHttpSampler ( int samplerType ) { } }

Fix:
contentLength = Integer . parseInt ( contentLengthValue ) ;