Program: 162314
Project: 162314
Buggy source:
private synchronized void buildContentData(){
  try {
    MultiValueMap<String,Object> builder=new LinkedMultiValueMap<String,Object>();
    Set<String> queryParams=findQueryParams();
    for (    Entry<String,String[]> entry : this.request.getParameterMap().entrySet()) {
      if (!queryParams.contains(entry.getKey())) {
        for (        String value : entry.getValue()) {
          builder.add(entry.getKey(),value);
        }
      }
    }
    if (this.request instanceof MultipartRequest) {
      MultipartRequest multi=(MultipartRequest)this.request;
      for (      Entry<String,List<MultipartFile>> parts : multi.getMultiFileMap().entrySet()) {
        for (        Part file : this.request.getParts()) {
          HttpHeaders headers=new HttpHeaders();
          headers.setContentDispositionFormData(file.getName(),file.getSubmittedFileName());
          if (file.getContentType() != null) {
            headers.setContentType(MediaType.valueOf(file.getContentType()));
          }
          HttpEntity<Resource> entity=new HttpEntity<Resource>(new InputStreamResource(file.getInputStream()),headers);
          builder.add(parts.getKey(),entity);
        }
      }
    }
    FormHttpOutputMessage data=new FormHttpOutputMessage();
    this.contentType=MediaType.valueOf(this.request.getContentType());
    data.getHeaders().setContentType(this.contentType);
    this.converter.write(builder,this.contentType,data);
    this.contentType=data.getHeaders().getContentType();
    this.contentData=data.getInput();
    this.contentLength=this.contentData.length;
  }
 catch (  Exception e) {
    throw new IllegalStateException("String_Node_Str",e);
  }
}

Fixed version (ground truth):
private synchronized void buildContentData(){
  try {
    MultiValueMap<String,Object> builder=new LinkedMultiValueMap<String,Object>();
    Set<String> queryParams=findQueryParams();
    for (    Entry<String,String[]> entry : this.request.getParameterMap().entrySet()) {
      if (!queryParams.contains(entry.getKey())) {
        for (        String value : entry.getValue()) {
          builder.add(entry.getKey(),value);
        }
      }
    }
    if (this.request instanceof MultipartRequest) {
      MultipartRequest multi=(MultipartRequest)this.request;
      for (      Entry<String,List<MultipartFile>> parts : multi.getMultiFileMap().entrySet()) {
        for (        MultipartFile file : parts.getValue()) {
          HttpHeaders headers=new HttpHeaders();
          headers.setContentDispositionFormData(file.getName(),file.getOriginalFilename());
          if (file.getContentType() != null) {
            headers.setContentType(MediaType.valueOf(file.getContentType()));
          }
          HttpEntity<Resource> entity=new HttpEntity<Resource>(new InputStreamResource(file.getInputStream()),headers);
          builder.add(parts.getKey(),entity);
        }
      }
    }
    FormHttpOutputMessage data=new FormHttpOutputMessage();
    this.contentType=MediaType.valueOf(this.request.getContentType());
    data.getHeaders().setContentType(this.contentType);
    this.converter.write(builder,this.contentType,data);
    this.contentType=data.getHeaders().getContentType();
    this.contentData=data.getInput();
    this.contentLength=this.contentData.length;
  }
 catch (  Exception e) {
    throw new IllegalStateException("String_Node_Str",e);
  }
}