Buggy code:
public static final String SORT_ORDER_ASC = "ASC" ; public static final String SORT_ORDER_DESC = "DESC" ; private boolean isExportEnabled = false ; private boolean isRefreshEnabled = false ; public static final int SEARCH_SIMPLE = 0 ; public static final int SEARCH_ADVANCED = 1 ; public static final int SEARCH_EXPERT = 2 ; public static final int SEARCH_XML = 3 ; private int searchType = PdcSearchSessionController . SEARCH_EXPERT ; public static final int SEARCH_FULLTEXT = 0 ; public static final int SEARCH_PDC = 1 ; public static final int SEARCH_MIXED = 2 ; private String searchPage = null ; private String searchPageId = null ; private String resultPage = null ; private String resultPageId = null ; private PublicationTemplateImpl xmlTemplate = null ; private DataRecord xmlData = null ; private int searchScope = PdcSearchSessionController . SEARCH_FULLTEXT ; private ComponentSecurity componentSecurity = null ; private String xmlFormSortValue = null ; private String sortImplementor = null ; private int currentResultsDisplay = PdcSearchSessionController . SHOWRESULTS_ALL ; public static final int SHOWRESULTS_ALL = 0 ; public static final int SHOWRESULTS_OnlyPDC = 1 ; private List < String > spellingwords = Collections . EMPTY_LIST ; private boolean isEnableExternalSearch = false ; private List < ExternalSPConfigVO > externalServers = null ; private String curServerName = null ; public static final String ALL_DATA_TYPE = "0" ; private String dataType = PdcSearchSessionController . ALL_DATA_TYPE ; private List < SearchTypeConfigurationVO > dataSearchTypes = null ; private Map < String , Facet > fieldFacets = null ; private ResultFilterVO selectedFacetEntries = null ; private boolean platformUsesPDC = false ; private boolean includeUsers = false ; private static final String locationSeparator = ">" ; public PdcSearchSessionController ( MainSessionController mainSessionCtrl , ComponentContext componentContext , String multilangBundle , String iconBundle ) { } private void getExternalSPConfig ( ) { } public void setContainerWorkspace ( ContainerWorkspace givenContainerWorkspace ) { } public ContainerWorkspace getContainerWorkspace ( ) { } public ContainerPositionInterface getContainerPosition ( ) { } public SearchContext getSearchContext ( ) { } public void setPDCResults ( List < GlobalSilverContent > globalSilverContents ) throws Exception { } public int getNbItemsPerPage ( ) { } public int getIndexOfFirstItemToDisplay ( ) { } public void setIndexOfFirstItemToDisplay ( String index ) { } public void setResults ( List < GlobalSilverContent > globalSilverResults ) { } public int getIndexOfFirstResultToDisplay ( ) { } public void setIndexOfFirstResultToDisplay ( String index ) { } public String getDisplayParamChoices ( ) { } public List < String > getListChoiceNbResToDisplay ( ) { } public int getNbResToDisplay ( ) { } public void setNbResToDisplay ( int nbResToDisplay ) { } public String getSortOrder ( ) { } public void setSortOrder ( String sortOrder ) { } public int getSortValue ( ) { } public void setSortValue ( int sortValue ) { } public void setQueryParameters ( QueryParameters query ) { } public QueryParameters getQueryParameters ( ) { } public void clearQueryParameters ( ) { } public MatchingIndexEntry [ ] search ( ) throws ParseException { } private void addExternalComponents ( QueryDescription query ) { } private void browseExternalServerDirectory ( QueryDescription query , ExternalSPConfigVO extServerCfg ) { } private void filterExternalComponents ( QueryDescription query , ExternalSPConfigVO extServerCfg , File file ) { } public boolean isMatchingIndexEntryAvailable ( MatchingIndexEntry mie ) { } private ComponentSecurity getSecurityIntf ( ) throws Exception { } public List < GlobalSilverResult > getResultsToDisplay ( ) throws Exception { <START_BUG> return getSortedResultsToDisplay ( getSortValue ( ) , getSortOrder ( ) , getXmlFormSortValue ( ) , getSortImplemtor ( ) , null ) ; <END_BUG> } public ResultGroupFilter getResultGroupFilter ( ) { } private void processFacetAuthor ( Facet facet , GlobalSilverResult result ) { } private void processFacetDatatype ( Facet facet , GlobalSilverResult result , Map < String , ComponentInstLight > components ) { } private void processFacetFiletype ( Facet facet , GlobalSilverResult result ) { } private void processFacetComponent ( Facet facet , GlobalSilverResult result , List < String > blackList ) { } private void processFacetsFormField ( Map < String , Facet > fieldFacetsMap , GlobalSilverResult result ) { } public Map < String , Facet > getFieldFacets ( ) { } private String getFieldLabel ( String formName , String fieldName ) throws FormException , PublicationTemplateException { } private String getFieldValue ( String formName , String fieldName , String fieldValue ) throws FormException , PublicationTemplateException { } private String [ ] getFormNameAndFieldName ( String compressedFieldName ) { } private boolean isFieldStillAFacet ( String formName , String fieldName ) { } public List < GlobalSilverResult > processResultsToDisplay ( MatchingIndexEntry [ ] indexEntries ) throws Exception { } public List < GlobalSilverResult > processResultsToDisplay ( List < GlobalSilverContent > silverContents ) throws Exception { } public List < GlobalSilverResult > getSortedResultsToDisplay ( int sortValue , String sortOrder , String xmlFormSortValue , String sortType , ResultFilterVO filter ) { } private void setPopularityToResults ( ) { } private boolean isPopularityCompliant ( GlobalSilverResult gsr ) { } public StatisticBm getStatisticBm ( ) { } private List < GlobalSilverResult > filterResult ( ResultFilterVO filter , List < GlobalSilverResult > listGSR ) { } private List < String > getFacetBlackList ( ) { } private void setExtraInfoToResultsToDisplay ( List < GlobalSilverResult > results ) { } private String buildExternalServerURL ( String resultType , String markAsReadJS , MatchingIndexEntry indexEntry , String serverName ) { } private String buildTitleLink ( String markAsReadJS , String downloadLink , String componentId , String underLink , boolean openFile ) { } public int getTotalResults ( ) { } public int getTotalFilteredResults ( ) { } private int getLastIndexToDisplay ( ) { } private List < GlobalSilverResult > matchingIndexEntries2GlobalSilverResults ( List < MatchingIndexEntry > matchingIndexEntries ) throws Exception { } public String getLocation ( String instanceId ) { } private boolean isWysiwyg ( String filename , List < String > wysiwygSuffixes ) { } private List < String > getListObjectTypeFilter ( ) { } private boolean processResult ( MatchingIndexEntry result , List < String > objectTypeFilter ) { } private boolean isExternalComponent ( String serverName ) { } private String getExternalServerLabel ( String serverName ) { }

Fix:
return getSortedResultsToDisplay ( getSortValue ( ) , getSortOrder ( ) , getXmlFormSortValue ( ) , getSortImplemtor ( ) , getSelectedFacetEntries ( ) ) ;