Program: 35298
Project: 35298
Buggy source:
@Cacheable(cacheNames="String_Node_Str",sync=true) public MediaInfo convert(String value,IdType fromType) throws InfoProviderException {
  logger.info("String_Node_Str",fromType,value);
  try {
    MediaInfo info;
    if (fromType == TMDB || fromType == IMDB || fromType == MOVIETITLE) {
      MovieInfo movieInfo;
      if (fromType == TMDB) {
        movieInfo=movieInfoRepository.findByTmdbId(value);
      }
 else       if (fromType == IMDB) {
        movieInfo=movieInfoRepository.findByImdbId(value);
      }
 else {
        movieInfo=movieInfoRepository.findByTitle(value);
      }
      if (movieInfo != null) {
        info=new MediaInfo(movieInfo);
      }
 else {
        TmdbSearchResult result=tmdbHandler.getInfos(value,fromType);
        info=new MediaInfo(result);
        movieInfo=new MovieInfo(info.getImdbId().orElse(null),info.getTmdbId().orElse(null),info.getTitle().orElse(null),info.getYear().orElse(null),info.getPosterUrl().orElse(null));
        movieInfoRepository.save(movieInfo);
      }
    }
 else     if (fromType == TVMAZE || fromType == TVDB || fromType == TVRAGE || fromType == TVTITLE) {
      TvInfo tvInfo;
      if (fromType == TVMAZE) {
        tvInfo=tvInfoRepository.findByTvmazeId(value);
      }
 else       if (fromType == TVDB) {
        tvInfo=tvInfoRepository.findByTvdbId(value);
      }
 else       if (fromType == TVRAGE) {
        tvInfo=tvInfoRepository.findByTvrageId(value);
      }
 else {
        tvInfo=tvInfoRepository.findByTitle(value);
      }
      if (tvInfo != null) {
        info=new MediaInfo(tvInfo);
      }
 else {
        TvMazeSearchResult result=tvMazeHandler.getInfos(value,fromType);
        info=new MediaInfo(result);
        tvInfo=new TvInfo(info.getTvDbId().orElse(null),info.getTvRageId().orElse(null),info.getTvMazeId().orElse(null),info.getTitle().orElse(null),info.getYear().orElse(null),info.getPosterUrl().orElse(null));
        tvInfoRepository.save(tvInfo);
      }
    }
 else {
      throw new IllegalArgumentException("String_Node_Str");
    }
    logger.info("String_Node_Str" + info);
    return info;
  }
 catch (  Exception e) {
    logger.error("String_Node_Str" + fromType + "String_Node_Str"+ value,e);
    Throwables.throwIfInstanceOf(e,InfoProviderException.class);
    throw new InfoProviderException("String_Node_Str",e);
  }
}

Fixed version (ground truth):
@Cacheable(cacheNames="String_Node_Str",sync=true) public MediaInfo convert(String value,IdType fromType) throws InfoProviderException {
  logger.debug("String_Node_Str",fromType,value);
  try {
    MediaInfo info;
    if (fromType == TMDB || fromType == IMDB || fromType == MOVIETITLE) {
      MovieInfo movieInfo;
      if (fromType == TMDB) {
        movieInfo=movieInfoRepository.findByTmdbId(value);
      }
 else       if (fromType == IMDB) {
        movieInfo=movieInfoRepository.findByImdbId(value);
      }
 else {
        movieInfo=movieInfoRepository.findByTitle(value);
      }
      if (movieInfo != null) {
        info=new MediaInfo(movieInfo);
      }
 else {
        TmdbSearchResult result=tmdbHandler.getInfos(value,fromType);
        info=new MediaInfo(result);
        movieInfo=new MovieInfo(info.getImdbId().orElse(null),info.getTmdbId().orElse(null),info.getTitle().orElse(null),info.getYear().orElse(null),info.getPosterUrl().orElse(null));
        movieInfoRepository.save(movieInfo);
      }
    }
 else     if (fromType == TVMAZE || fromType == TVDB || fromType == TVRAGE || fromType == TVTITLE) {
      TvInfo tvInfo;
      if (fromType == TVMAZE) {
        tvInfo=tvInfoRepository.findByTvmazeId(value);
      }
 else       if (fromType == TVDB) {
        tvInfo=tvInfoRepository.findByTvdbId(value);
      }
 else       if (fromType == TVRAGE) {
        tvInfo=tvInfoRepository.findByTvrageId(value);
      }
 else {
        tvInfo=tvInfoRepository.findByTitle(value);
      }
      if (tvInfo != null) {
        info=new MediaInfo(tvInfo);
      }
 else {
        TvMazeSearchResult result=tvMazeHandler.getInfos(value,fromType);
        info=new MediaInfo(result);
        tvInfo=new TvInfo(info.getTvDbId().orElse(null),info.getTvRageId().orElse(null),info.getTvMazeId().orElse(null),info.getTitle().orElse(null),info.getYear().orElse(null),info.getPosterUrl().orElse(null));
        tvInfoRepository.save(tvInfo);
      }
    }
 else {
      throw new IllegalArgumentException("String_Node_Str");
    }
    logger.debug("String_Node_Str" + info);
    return info;
  }
 catch (  Exception e) {
    logger.error("String_Node_Str" + fromType + "String_Node_Str"+ value,e);
    Throwables.throwIfInstanceOf(e,InfoProviderException.class);
    throw new InfoProviderException("String_Node_Str",e);
  }
}