Buggy code:
public class MockHttpServletRequest implements HttpServletRequest { private class UploadedFile { private String fieldName ; private File file ; private String contentType ; public UploadedFile ( String fieldName , File file , String contentType ) { } public String getContentType ( ) { } public void setContentType ( String contentType ) { } public String getFieldName ( ) { } public void setFieldName ( String fieldName ) { } public File getFile ( ) { } public void setFile ( File file ) { } } private static final Logger log = LoggerFactory . getLogger ( MockHttpServletRequest . class ) ; private final Application application ; private final ValueMap attributes = new ValueMap ( ) ; private String authType ; private String characterEncoding = "UTF-8" ; private final ServletContext context ; private final List < Cookie > cookies = new ArrayList < Cookie > ( ) ; private final ValueMap headers = new ValueMap ( ) ; private String method ; private final LinkedHashMap < String , String [ ] > parameters = new LinkedHashMap < String , String [ ] > ( ) ; private String path ; private final HttpSession session ; private String url ; private Map < String , MockHttpServletRequest . UploadedFile > uploadedFiles ; private boolean useMultiPartContentType ; public MockHttpServletRequest ( final Application application , final HttpSession session , final ServletContext context ) { } public void addCookie ( final Cookie cookie ) { } public void addCookies ( Iterable < Cookie > cookies ) { } public void addFile ( String fieldName , File file , String contentType ) { } public void addHeader ( String name , String value ) { } public void addDateHeader ( String name , long date ) { } public Object getAttribute ( final String name ) { } public Enumeration < String > getAttributeNames ( ) { } public String getAuthType ( ) { } public String getCharacterEncoding ( ) { } public void setUseMultiPartContentType ( boolean useMultiPartContentType ) { } public int getContentLength ( ) { } public String getContentType ( ) { } public String getContextPath ( ) { } public Cookie getCookie ( String name ) { } public Cookie [ ] getCookies ( ) { } public long getDateHeader ( final String name ) throws IllegalArgumentException { } public String getHeader ( final String name ) { } public Enumeration < String > getHeaderNames ( ) { } public Enumeration < String > getHeaders ( final String name ) { } public ServletInputStream getInputStream ( ) throws IOException { } public int getIntHeader ( final String name ) { String value = getHeader ( name ) ; if ( value == null ) { return - 1 ; } <START_BUG> return Integer . valueOf ( value ) . intValue ( ) ; <END_BUG> } public Locale getLocale ( ) { } private Locale getLocale ( final String value ) { } public Enumeration < Locale > getLocales ( ) { } public String getMethod ( ) { } public String getParameter ( final String name ) { } public Map < String , String [ ] > getParameterMap ( ) { } public Enumeration < String > getParameterNames ( ) { } public String [ ] getParameterValues ( final String name ) { } public String getPathInfo ( ) { } public String getPathTranslated ( ) { } public String getProtocol ( ) { } public String getQueryString ( ) { } public BufferedReader getReader ( ) throws IOException { } @ Deprecated public String getRealPath ( String name ) { } public String getRemoteAddr ( ) { } public String getRemoteHost ( ) { } public String getRemoteUser ( ) { } public RequestDispatcher getRequestDispatcher ( String name ) { } public String getRequestedSessionId ( ) { } public String getRequestURI ( ) { } public StringBuffer getRequestURL ( ) { } public String getScheme ( ) { } public String getServerName ( ) { } public int getServerPort ( ) { } public String getServletPath ( ) { } public HttpSession getSession ( ) { } public HttpSession getSession ( boolean b ) { } public Principal getUserPrincipal ( ) { } public boolean hasUploadedFiles ( ) { } public void initialize ( ) { } public boolean isRequestedSessionIdFromCookie ( ) { } public boolean isRequestedSessionIdFromUrl ( ) { } public boolean isRequestedSessionIdFromURL ( ) { } public boolean isRequestedSessionIdValid ( ) { } public boolean isSecure ( ) { } public boolean isUserInRole ( String name ) { } public void removeAttribute ( final String name ) { } public void setAttribute ( final String name , final Object o ) { } public void setAuthType ( final String authType ) { } public void setCharacterEncoding ( final String encoding ) throws UnsupportedEncodingException { } public void setCookies ( final Cookie [ ] theCookies ) { } public void setMethod ( final String method ) { } public void setParameter ( final String name , final String value ) { } public void addParameter ( final String name , final String value ) { } public void setParameters ( final Map < String , String [ ] > parameters ) { } public void setPath ( final String path ) { } public void setURL ( String url ) { } private void setDefaultHeaders ( ) { } private static final String crlf = "\r\n" ; private static final String boundary = "--abcdefgABCDEFG" ; private void newAttachment ( OutputStream out ) throws IOException { } private byte [ ] buildRequest ( ) { } public String getLocalAddr ( ) { } public String getLocalName ( ) { } public int getLocalPort ( ) { } public int getRemotePort ( ) { } public void setUrl ( Url url ) { } public Url getUrl ( ) { } public MockRequestParameters getPostParameters ( ) { } public String getFilterPrefix ( ) { }

Fix:
return Integer . valueOf ( value ) ;