private static IndexPatternSearch getInstance() {
    IndexPatternSearch result = ourInstance;
    if (result == null) {
      result = ApplicationManager.getApplication().getService(IndexPatternSearch.class);
      ourInstance = result;
    }
    return result;
  }
private static IndexPatternSearch getInstance()