Buggy code:
public class MediaFileDao extends AbstractDao { private static final String COLUMNS = "id,<seq2seq4repair_space>path,<seq2seq4repair_space>folder,<seq2seq4repair_space>type,<seq2seq4repair_space>format,<seq2seq4repair_space>title,<seq2seq4repair_space>album,<seq2seq4repair_space>artist,<seq2seq4repair_space>album_artist,<seq2seq4repair_space>disc_number,<seq2seq4repair_space>" + ( "track_number,<seq2seq4repair_space>year,<seq2seq4repair_space>genre,<seq2seq4repair_space>bit_rate,<seq2seq4repair_space>variable_bit_rate,<seq2seq4repair_space>duration_seconds,<seq2seq4repair_space>file_size,<seq2seq4repair_space>width,<seq2seq4repair_space>height,<seq2seq4repair_space>cover_art_path,<seq2seq4repair_space>" + "parent_path,<seq2seq4repair_space>play_count,<seq2seq4repair_space>last_played,<seq2seq4repair_space>comment,<seq2seq4repair_space>created,<seq2seq4repair_space>changed,<seq2seq4repair_space>last_scanned,<seq2seq4repair_space>children_last_updated,<seq2seq4repair_space>present,<seq2seq4repair_space>version" ) ; private static final String GENRE_COLUMNS = "name,<seq2seq4repair_space>song_count,<seq2seq4repair_space>album_count" ; public static final int VERSION = 4 ; private final RowMapper rowMapper = new MediaFileDao . MediaFileMapper ( ) ; private final RowMapper musicFileInfoRowMapper = new MediaFileDao . MusicFileInfoMapper ( ) ; private final RowMapper genreRowMapper = new MediaFileDao . GenreMapper ( ) ; public MediaFile getMediaFile ( String path ) { } public MediaFile getMediaFile ( int id ) { } public List < MediaFile > getChildrenOf ( String path ) { } public List < MediaFile > getFilesInPlaylist ( int playlistId ) { } public List < MediaFile > getSongsForAlbum ( String artist , String album ) { } public List < MediaFile > getVideos ( final int count , final int offset , final List < MusicFolder > musicFolders ) { } public MediaFile getArtistByName ( final String name , final List < MusicFolder > musicFolders ) { } public synchronized void createOrUpdateMediaFile ( MediaFile file ) { } private MediaFile getMusicFileInfo ( String path ) { } public void deleteMediaFile ( String path ) { } public List < Genre > getGenres ( boolean sortByAlbum ) { } public void updateGenres ( List < Genre > genres ) { } public List < MediaFile > getMostFrequentlyPlayedAlbums ( final int offset , final int count , final List < MusicFolder > musicFolders ) { } public List < MediaFile > getMostRecentlyPlayedAlbums ( final int offset , final int count , final List < MusicFolder > musicFolders ) { } public List < MediaFile > getNewestAlbums ( final int offset , final int count , final List < MusicFolder > musicFolders ) { } public List < MediaFile > getAlphabeticalAlbums ( final int offset , final int count , boolean byArtist , final List < MusicFolder > musicFolders ) { Map < String , Object > args = new HashMap < String , Object > ( ) { } ; String orderBy = ( byArtist ) ? "artist,<seq2seq4repair_space>album" : "album" ; <START_BUG> return namedQuery ( ( ( ( ( ( "select<seq2seq4repair_space>" + ( MediaFileDao . COLUMNS ) ) + "<seq2seq4repair_space>from<seq2seq4repair_space>media_file<seq2seq4repair_space>where<seq2seq4repair_space>type<seq2seq4repair_space>=<seq2seq4repair_space>:type<seq2seq4repair_space>and<seq2seq4repair_space>folder<seq2seq4repair_space>in<seq2seq4repair_space>(:folders)<seq2seq4repair_space>and<seq2seq4repair_space>artist<seq2seq4repair_space>!=<seq2seq4repair_space>''<seq2seq4repair_space>and<seq2seq4repair_space>present<seq2seq4repair_space>" ) + "order<seq2seq4repair_space>by<seq2seq4repair_space>" ) + orderBy ) + "<seq2seq4repair_space>limit<seq2seq4repair_space>:count<seq2seq4repair_space>offset<seq2seq4repair_space>:offset" ) , rowMapper , args ) ; <END_BUG> } public List < MediaFile > getAlbumsByYear ( final int offset , final int count , final int fromYear , final int toYear , final List < MusicFolder > musicFolders ) { } public List < MediaFile > getAlbumsByGenre ( final int offset , final int count , final String genre , final List < MusicFolder > musicFolders ) { } public List < MediaFile > getSongsByGenre ( final String genre , final int offset , final int count , final List < MusicFolder > musicFolders ) { } public List < MediaFile > getSongsByArtist ( String artist , int offset , int count ) { } public List < MediaFile > getStarredAlbums ( final int offset , final int count , final String username , final List < MusicFolder > musicFolders ) { } public List < MediaFile > getStarredDirectories ( final int offset , final int count , final String username , final List < MusicFolder > musicFolders ) { } public List < MediaFile > getStarredFiles ( final int offset , final int count , final String username , final List < MusicFolder > musicFolders ) { } public int getAlbumCount ( final List < MusicFolder > musicFolders ) { } public int getPlayedAlbumCount ( final List < MusicFolder > musicFolders ) { } public int getStarredAlbumCount ( final String username , final List < MusicFolder > musicFolders ) { } public void starMediaFile ( int id , String username ) { } public void unstarMediaFile ( int id , String username ) { } public Date getMediaFileStarredDate ( int id , String username ) { } public void markPresent ( String path , Date lastScanned ) { } public void markNonPresent ( Date lastScanned ) { } public void expunge ( ) { } private static class MediaFileMapper implements ParameterizedRowMapper < MediaFile > { public MediaFile mapRow ( ResultSet rs , int rowNum ) throws SQLException { } } private static class MusicFileInfoMapper implements ParameterizedRowMapper < MediaFile > { public MediaFile mapRow ( ResultSet rs , int rowNum ) throws SQLException { } } private static class GenreMapper implements ParameterizedRowMapper < Genre > { public Genre mapRow ( ResultSet rs , int rowNum ) throws SQLException { } } }

Fix:
return namedQuery ( ( ( ( ( ( "select<seq2seq4repair_space>" + ( MediaFileDao . COLUMNS ) ) + "<seq2seq4repair_space>from<seq2seq4repair_space>media_file<seq2seq4repair_space>where<seq2seq4repair_space>type<seq2seq4repair_space>=<seq2seq4repair_space>:type<seq2seq4repair_space>and<seq2seq4repair_space>folder<seq2seq4repair_space>in<seq2seq4repair_space>(:folders)<seq2seq4repair_space>and<seq2seq4repair_space>present<seq2seq4repair_space>" ) + "order<seq2seq4repair_space>by<seq2seq4repair_space>" ) + orderBy ) + "<seq2seq4repair_space>limit<seq2seq4repair_space>:count<seq2seq4repair_space>offset<seq2seq4repair_space>:offset" ) , rowMapper , args ) ;