Buggy code:
public class SolrSearchResult { private static final Logger logger = Logger . getLogger ( SolrSearchResult . class . getCanonicalName ( ) ) ; private String id ; private Long entityId ; private String identifier ; private String type ; private String url ; private String persistentUrl ; private String query ; private String name ; private String nameSort ; private String status ; private Date releaseOrCreateDate ; private String dateToDisplayOnCard ; private String title ; private String descriptionNoSnippet ; private List < String > datasetAuthors = new ArrayList < > ( ) ; private List < Highlight > highlightsAsList = new ArrayList < > ( ) ; private Map < SolrField , Highlight > highlightsMap ; private Map < String , Highlight > highlightsAsMap ; private Map < String , String > parent ; private List < Dataset > datasets ; private String dataverseAffiliation ; private String citation ; private String filetype ; private String dataverseAlias ; private String dataverseParentAlias ; private boolean unpublishedState ; private boolean draftState ; private boolean deaccessionedState ; private long datasetVersionId ; public boolean isUnpublishedState ( ) { } public void setUnpublishedState ( boolean unpublishedState ) { } public boolean isDraftState ( ) { } public void setDraftState ( boolean draftState ) { } public boolean isDeaccessionedState ( ) { } public void setDeaccessionedState ( boolean deaccessionedState ) { } private List < String > matchedFields ; SolrSearchResult ( String queryFromUser , String name ) { } public Map < String , Highlight > getHighlightsAsMap ( ) { } public void setHighlightsAsMap ( Map < String , Highlight > highlightsAsMap ) { } public String getNameHighlightSnippet ( ) { } public String getDataverseAffiliationHighlightSnippet ( ) { } public String getFileTypeHighlightSnippet ( ) { } public String getTitleHighlightSnippet ( ) { } public List < String > getDescriptionSnippets ( ) { } public Map < SolrField , Highlight > getHighlightsMap ( ) { } public void setHighlightsMap ( Map < SolrField , Highlight > highlightsMap ) { } public List < String > getMatchedFields ( ) { } public void setMatchedFields ( List < String > matchedFields ) { } @ Override public String toString ( ) { } public JsonObject getRelevance ( ) { } public JsonObject toJsonObject ( boolean showRelevance ) { } public JsonObjectBuilder json ( boolean showRelevance ) { } private String getDateTimePublished ( ) { } public String getId ( ) { } public void setId ( String id ) { } public Long getEntityId ( ) { } public void setEntityId ( Long entityId ) { } public String getIdentifier ( ) { } public void setIdentifier ( String identifier ) { } public String getType ( ) { } public void setType ( String type ) { } public String getUrl ( ) { } public void setUrl ( String url ) { } public String getPersistentUrl ( ) { } public void setPersistentUrl ( String persistentUrl ) { } public String getQuery ( ) { } public void setQuery ( String query ) { } public String getName ( ) { } public void setName ( String name ) { } public String getTitle ( ) { } public void setTitle ( String title ) { } public String getDescriptionNoSnippet ( ) { } public void setDescriptionNoSnippet ( String descriptionNoSnippet ) { } public List < String > getDatasetAuthors ( ) { } public void setDatasetAuthors ( List < String > datasetAuthors ) { } public List < Highlight > getHighlightsAsListOrig ( ) { } public List < Highlight > getHighlightsAsList ( ) { } public void setHighlightsAsList ( List < Highlight > highlightsAsList ) { } public Map < String , String > getParent ( ) { } public void setParent ( Map < String , String > parent ) { } public List < Dataset > getDatasets ( ) { } public void setDatasets ( List < Dataset > datasets ) { } public String getDataverseAffiliation ( ) { } public void setDataverseAffiliation ( String dataverseAffiliation ) { } public String getCitation ( ) { } public void setCitation ( String citation ) { } public String getFiletype ( ) { } public void setFiletype ( String filetype ) { } public String getNameSort ( ) { } public void setNameSort ( String nameSort ) { } public String getStatus ( ) { } void setStatus ( String status ) { } public Date getReleaseOrCreateDate ( ) { } public void setReleaseOrCreateDate ( Date releaseOrCreateDate ) { } public String getDateToDisplayOnCard ( ) { } public void setDateToDisplayOnCard ( String dateToDisplayOnCard ) { } public long getDatasetVersionId ( ) { } public void setDatasetVersionId ( long datasetVersionId ) { } public String getDatasetUrl ( ) { } public String getFileUrl ( ) { } public String getDataverseAlias ( ) { } public void setDataverseAlias ( String dataverseAlias ) { } public String getDataverseParentAlias ( ) { } public void setDataverseParentAlias ( String dataverseParentAlias ) { } private String getDisplayType ( String type ) { if ( type . equals ( DATAVERSES ) ) { return SearchConstants . DATAVERSE ; } else if ( type . equals ( DATASETS ) ) { return SearchConstants . DATASET ; } else if ( type . equals ( FILES ) ) { <START_BUG> return SearchConstants . DATASET ; <END_BUG> } else { return null ; } } }

Fix:
return SearchConstants . FILE ;