Buggy code:
public class WidgetRegistrarImpl implements WidgetRegistrar { private HashMap < String , String > contentType2FriendlyName = new HashMap < String , String > ( ) ; PortalGinInjector ginInjector ; NodeModelCreator nodeModelCreator ; JSONObjectAdapter adapter ; @ Inject public WidgetRegistrarImpl ( PortalGinInjector ginInjector , NodeModelCreator nodeModelCreator , JSONObjectAdapter adapter ) { } @ Override public void registerWidget ( String contentTypeKey , String friendlyName ) { } @ Override public WidgetEditorPresenter getWidgetEditorForWidgetDescriptor ( WikiPageKey wikiKey , String contentTypeKey , Map < String , String > model , boolean isWiki , DialogCallback dialogCallback ) { } @ Override public String getWidgetContentType ( Map < String , String > model ) { } @ Override public WidgetRendererPresenter getWidgetRendererForWidgetDescriptor ( WikiPageKey wikiKey , String contentTypeKey , Map < String , String > model , boolean isWiki , Callback widgetRefreshRequired , Long wikiVersionInView ) { WidgetRendererPresenter presenter = null ; if ( contentTypeKey . equals ( BOOKMARK_CONTENT_TYPE ) ) { presenter = ginInjector . getBookmarkRenderer ( ) ; } else if ( contentTypeKey . equals ( REFERENCE_CONTENT_TYPE ) ) { presenter = ginInjector . getReferenceRenderer ( ) ; } else if ( contentTypeKey . equals ( YOUTUBE_CONTENT_TYPE ) ) { presenter = ginInjector . getYouTubeRenderer ( ) ; } else if ( contentTypeKey . equals ( PROVENANCE_CONTENT_TYPE ) ) { presenter = ginInjector . getProvenanceRenderer ( ) ; } else if ( contentTypeKey . equals ( IMAGE_CONTENT_TYPE ) ) { if ( isWiki ) presenter = ginInjector . getImageRenderer ( ) ; else presenter = ginInjector . getOldImageRenderer ( ) ; } else if ( ( contentTypeKey . equals ( API_TABLE_CONTENT_TYPE ) ) || ( contentTypeKey . equals ( QUERY_TABLE_CONTENT_TYPE ) ) ) { presenter = ginInjector . getSynapseAPICallRenderer ( ) ; } else if ( contentTypeKey . equals ( TOC_CONTENT_TYPE ) ) { presenter = ginInjector . getTableOfContentsRenderer ( ) ; } else if ( contentTypeKey . equals ( WIKI_FILES_PREVIEW_CONTENT_TYPE ) ) { presenter = ginInjector . getWikiFilesPreviewRenderer ( ) ; } else if ( contentTypeKey . equals ( ATTACHMENT_PREVIEW_CONTENT_TYPE ) ) { presenter = ginInjector . getAttachmentPreviewRenderer ( ) ; } else if ( contentTypeKey . equals ( ENTITYLIST_CONTENT_TYPE ) ) { presenter = ginInjector . getEntityListRenderer ( ) ; } else if ( contentTypeKey . equals ( SHINYSITE_CONTENT_TYPE ) ) { presenter = ginInjector . getShinySiteRenderer ( ) ; } else if ( contentTypeKey . equals ( USERBADGE_CONTENT_TYPE ) ) { presenter = ginInjector . getUserBadgeWidget ( ) ; } else if ( contentTypeKey . equals ( USER_TEAM_BADGE_CONTENT_TYPE ) ) { presenter = ginInjector . getUserTeamBadgeWidget ( ) ; } else if ( contentTypeKey . equals ( JOIN_TEAM_CONTENT_TYPE ) ) { presenter = ginInjector . getJoinTeamWidget ( ) ; } else if ( ( contentTypeKey . equals ( SUBMIT_TO_EVALUATION_CONTENT_TYPE ) ) || ( contentTypeKey . equals ( OLD_JOIN_EVALUATION_CONTENT_TYPE ) ) ) { presenter = ginInjector . getEvaluationSubmissionWidget ( ) ; } else if ( contentTypeKey . equals ( BUTTON_LINK_CONTENT_TYPE ) ) { presenter = ginInjector . getButtonLinkWidget ( ) ; } else if ( contentTypeKey . equals ( TUTORIAL_WIZARD_CONTENT_TYPE ) ) { presenter = ginInjector . getTutorialWidgetRenderer ( ) ; } else if ( ( contentTypeKey . equals ( WIKI_SUBPAGES_CONTENT_TYPE ) ) || ( contentTypeKey . equals ( NO_AUTO_WIKI_SUBPAGES ) ) ) { presenter = ginInjector . getEmptyWidget ( ) ; } else if ( contentTypeKey . equals ( VIDEO_CONTENT_TYPE ) ) { presenter = ginInjector . getVideoWidget ( ) ; } else if ( contentTypeKey . equals ( TABLE_CONTENT_TYPE ) ) { <START_BUG> presenter = ginInjector . getJoinTeamWidget ( ) ; <END_BUG> } if ( presenter != null ) presenter . configure ( wikiKey , model , widgetRefreshRequired , wikiVersionInView ) ; return presenter ; } @ Override public String getFriendlyTypeName ( String contentTypeKey ) { } @ Override public String getMDRepresentation ( String contentType , Map < String , String > model ) { } @ Override public Map < String , String > getWidgetDescriptor ( String md ) { } @ Override public String getWidgetContentType ( String mdRepresentation ) { } private void initWithKnownWidgets ( ) { } public static String getWidgetMarkdown ( String contentType , Map < String , String > widgetDescriptor , WidgetRegistrar widgetRegistrar ) throws JSONObjectAdapterException { } }

Fix:
presenter = ginInjector . getTableQueryResultWikiWidget ( ) ;