class BugController {

  @RequestMapping(
      value = "/{bugid}",
      method = RequestMethod.GET,
      produces = {"application/json;charset=UTF-8"})
  @JsonView(Views.BugDetails.class)
  public ResponseEntity<Bug> getBug(@PathVariable String bugid) {
    final StopWatch sw = new StopWatch("GET bug [" + bugid + "]").start();
    try {
      final Bug b = BugRepository.FILTER.findOne(this.bugRepository.findByBugId(bugid));
      this.bugRepository.updateCachedCveData(b, false);
      sw.stop();
      return new ResponseEntity<Bug>(b, HttpStatus.OK);
    } catch (EntityNotFoundException enfe) {
      sw.stop(enfe);
      return new ResponseEntity<Bug>(HttpStatus.NOT_FOUND);
    } catch (Exception e) {
      sw.stop(e);
      return new ResponseEntity<Bug>(HttpStatus.INTERNAL_SERVER_ERROR);
    }
  }

  @Autowired  BugController(
      BugRepository bugRepository,
      AffectedLibraryRepository afflibRepository,
      LibraryRepository libRepository,
      TenantRepository tenantRepository);

}