test_class.declarator: token = "AAA-BBB-CCC-00"
test_class.modifier: final
test_class.original_string: final String token = "AAA-BBB-CCC-00";
test_class.type: String
test_class.var_name: token
test_class.declarator: testAddr = "http://zeppelinhub.ltd"
test_class.modifier: final
test_class.original_string: final String testAddr = "http://zeppelinhub.ltd";
test_class.type: String
test_class.var_name: testAddr
test_class.declarator: auth = new AuthenticationInfo("anthony")
test_class.modifier: final
test_class.original_string: final AuthenticationInfo auth = new AuthenticationInfo("anthony");
test_class.type: AuthenticationInfo
test_class.var_name: auth
test_class.declarator: repo
test_class.modifier: private
test_class.original_string: private ZeppelinHubRepo repo;
test_class.type: ZeppelinHubRepo
test_class.var_name: repo
test_class.declarator: pathOfNotebooks = new File(System.getProperty("user.dir") + "/src/test/resources/list_of_notes")
test_class.modifier: private
test_class.original_string: private File pathOfNotebooks = new File(System.getProperty("user.dir") + "/src/test/resources/list_of_notes");
test_class.type: File
test_class.var_name: pathOfNotebooks
test_class.declarator: pathOfNotebook = new File(System.getProperty("user.dir") + "/src/test/resources/note")
test_class.modifier: private
test_class.original_string: private File pathOfNotebook = new File(System.getProperty("user.dir") + "/src/test/resources/note");
test_class.type: File
test_class.var_name: pathOfNotebook
test_class.file: smart-zeppelin/zeppelin-zengine/src/test/java/org/apache/zeppelin/notebook/repo/zeppelinhub/ZeppelinHubRepoTest.java
test_class.identifier: ZeppelinHubRepoTest
test_case.body: @Test
    public void testGetZeppelinHubWsEndpoint() {
      System.setProperty(ZeppelinHubRepo.ZEPPELIN_CONF_PROP_NAME_SERVER, testAddr);
  
      ZeppelinConfiguration config = new ZeppelinConfiguration();
      ZeppelinHubRepo repository = new ZeppelinHubRepo(config);
      assertThat(repository.getZeppelinhubWebsocketUri(config)).isEqualTo("ws://zeppelinhub.ltd:80/async");
  
      System.setProperty(ZeppelinHubRepo.ZEPPELIN_CONF_PROP_NAME_SERVER, "https://zeppelinhub.ltd");
  
      config = new ZeppelinConfiguration();
      repository = new ZeppelinHubRepo(config);
      assertThat(repository.getZeppelinhubWebsocketUri(config)).isEqualTo("wss://zeppelinhub.ltd:443/async");
  
      System.setProperty(ZeppelinHubRepo.ZEPPELIN_CONF_PROP_NAME_SERVER, "yolow");
  
      config = new ZeppelinConfiguration();
      repository = new ZeppelinHubRepo(config);
      assertThat(repository.getZeppelinhubWebsocketUri(config)).isEqualTo("wss://www.zeppelinhub.com:443/async");
  
      System.setProperty(ZeppelinHubRepo.ZEPPELIN_CONF_PROP_NAME_SERVER, "http://zeppelinhub.ltd:4242");
  
      config = new ZeppelinConfiguration();
      repository = new ZeppelinHubRepo(config);
      assertThat(repository.getZeppelinhubWebsocketUri(config)).isEqualTo("ws://zeppelinhub.ltd:4242/async");
  
      System.setProperty(ZeppelinHubRepo.ZEPPELIN_CONF_PROP_NAME_SERVER, "https://www.zeppelinhub.com");
  
      config = new ZeppelinConfiguration();
      repository = new ZeppelinHubRepo(config);
      assertThat(repository.getZeppelinhubWebsocketUri(config)).isEqualTo("wss://www.zeppelinhub.com:443/async");
  
      System.setProperty(ZeppelinHubRepo.ZEPPELIN_CONF_PROP_NAME_SERVER, "http://www.zeppelinhub.com");
  
      config = new ZeppelinConfiguration();
      repository = new ZeppelinHubRepo(config);
      assertThat(repository.getZeppelinhubWebsocketUri(config)).isEqualTo("ws://www.zeppelinhub.com:80/async");
  
      System.setProperty(ZeppelinHubRepo.ZEPPELIN_CONF_PROP_NAME_SERVER, "https://www.zeppelinhub.com:4242");
  
      config = new ZeppelinConfiguration();
      repository = new ZeppelinHubRepo(config);
      assertThat(repository.getZeppelinhubWebsocketUri(config)).isEqualTo("wss://www.zeppelinhub.com:4242/async");
    }
test_case.class_method_signature: ZeppelinHubRepoTest.testGetZeppelinHubWsEndpoint()
test_case.full_signature: @Test public void testGetZeppelinHubWsEndpoint()
test_case.identifier: testGetZeppelinHubWsEndpoint
test_case.invocations: setProperty isEqualTo assertThat getZeppelinhubWebsocketUri setProperty isEqualTo assertThat getZeppelinhubWebsocketUri setProperty isEqualTo assertThat getZeppelinhubWebsocketUri setProperty isEqualTo assertThat getZeppelinhubWebsocketUri setProperty isEqualTo assertThat getZeppelinhubWebsocketUri setProperty isEqualTo assertThat getZeppelinhubWebsocketUri setProperty isEqualTo assertThat getZeppelinhubWebsocketUri
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetZeppelinHubWsEndpoint()
focal_class.declarator: LOG = LoggerFactory.getLogger(ZeppelinHubRepo.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOG = LoggerFactory.getLogger(ZeppelinHubRepo.class);
focal_class.type: Logger
focal_class.var_name: LOG
focal_class.declarator: DEFAULT_SERVER = "https://www.zeppelinhub.com"
focal_class.modifier: private static final
focal_class.original_string: private static final String DEFAULT_SERVER = "https://www.zeppelinhub.com";
focal_class.type: String
focal_class.var_name: DEFAULT_SERVER
focal_class.declarator: ZEPPELIN_CONF_PROP_NAME_SERVER = "zeppelinhub.api.address"
focal_class.modifier: static final
focal_class.original_string: static final String ZEPPELIN_CONF_PROP_NAME_SERVER = "zeppelinhub.api.address";
focal_class.type: String
focal_class.var_name: ZEPPELIN_CONF_PROP_NAME_SERVER
focal_class.declarator: ZEPPELIN_CONF_PROP_NAME_TOKEN = "zeppelinhub.api.token"
focal_class.modifier: static final
focal_class.original_string: static final String ZEPPELIN_CONF_PROP_NAME_TOKEN = "zeppelinhub.api.token";
focal_class.type: String
focal_class.var_name: ZEPPELIN_CONF_PROP_NAME_TOKEN
focal_class.declarator: TOKEN_HEADER = "X-Zeppelin-Token"
focal_class.modifier: public static final
focal_class.original_string: public static final String TOKEN_HEADER = "X-Zeppelin-Token";
focal_class.type: String
focal_class.var_name: TOKEN_HEADER
focal_class.declarator: GSON = new Gson()
focal_class.modifier: private static final
focal_class.original_string: private static final Gson GSON = new Gson();
focal_class.type: Gson
focal_class.var_name: GSON
focal_class.declarator: EMPTY_NOTE = new Note()
focal_class.modifier: private static final
focal_class.original_string: private static final Note EMPTY_NOTE = new Note();
focal_class.type: Note
focal_class.var_name: EMPTY_NOTE
focal_class.declarator: websocketClient
focal_class.modifier: private final
focal_class.original_string: private final Client websocketClient;
focal_class.type: Client
focal_class.var_name: websocketClient
focal_class.declarator: tokenManager
focal_class.modifier: private final
focal_class.original_string: private final UserTokenContainer tokenManager;
focal_class.type: UserTokenContainer
focal_class.var_name: tokenManager
focal_class.declarator: token
focal_class.modifier: private
focal_class.original_string: private String token;
focal_class.type: String
focal_class.var_name: token
focal_class.declarator: restApiClient
focal_class.modifier: private
focal_class.original_string: private ZeppelinhubRestApiHandler restApiClient;
focal_class.type: ZeppelinhubRestApiHandler
focal_class.var_name: restApiClient
focal_class.declarator: conf
focal_class.modifier: private final
focal_class.original_string: private final ZeppelinConfiguration conf;
focal_class.type: ZeppelinConfiguration
focal_class.var_name: conf
focal_class.file: smart-zeppelin/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/zeppelinhub/ZeppelinHubRepo.java
focal_class.identifier: ZeppelinHubRepo
focal_class.interfaces: implements NotebookRepo
focal_class.class_method_signature: ZeppelinHubRepo.ZeppelinHubRepo(ZeppelinConfiguration conf)
focal_class.full_signature: public  ZeppelinHubRepo(ZeppelinConfiguration conf)
focal_class.identifier: ZeppelinHubRepo
focal_class.modifiers: public
focal_class.parameters: (ZeppelinConfiguration conf)
focal_class.signature:  ZeppelinHubRepo(ZeppelinConfiguration conf)
focal_class.class_method_signature: ZeppelinHubRepo.getZeppelinHubWsUri(URI api)
focal_class.full_signature: private String getZeppelinHubWsUri(URI api)
focal_class.identifier: getZeppelinHubWsUri
focal_class.modifiers: private
focal_class.parameters: (URI api)
focal_class.return: String
focal_class.signature: String getZeppelinHubWsUri(URI api)
focal_class.class_method_signature: ZeppelinHubRepo.getZeppelinhubWebsocketUri(ZeppelinConfiguration conf)
focal_class.full_signature:  String getZeppelinhubWebsocketUri(ZeppelinConfiguration conf)
focal_class.identifier: getZeppelinhubWebsocketUri
focal_class.parameters: (ZeppelinConfiguration conf)
focal_class.return: String
focal_class.signature: String getZeppelinhubWebsocketUri(ZeppelinConfiguration conf)
focal_class.class_method_signature: ZeppelinHubRepo.getZeppelinWebsocketUri(ZeppelinConfiguration conf)
focal_class.full_signature: private String getZeppelinWebsocketUri(ZeppelinConfiguration conf)
focal_class.identifier: getZeppelinWebsocketUri
focal_class.modifiers: private
focal_class.parameters: (ZeppelinConfiguration conf)
focal_class.return: String
focal_class.signature: String getZeppelinWebsocketUri(ZeppelinConfiguration conf)
focal_class.class_method_signature: ZeppelinHubRepo.setZeppelinhubRestApiHandler(ZeppelinhubRestApiHandler zeppelinhub)
focal_class.full_signature:  void setZeppelinhubRestApiHandler(ZeppelinhubRestApiHandler zeppelinhub)
focal_class.identifier: setZeppelinhubRestApiHandler
focal_class.parameters: (ZeppelinhubRestApiHandler zeppelinhub)
focal_class.return: void
focal_class.signature: void setZeppelinhubRestApiHandler(ZeppelinhubRestApiHandler zeppelinhub)
focal_class.class_method_signature: ZeppelinHubRepo.getZeppelinHubUrl(ZeppelinConfiguration conf)
focal_class.full_signature:  String getZeppelinHubUrl(ZeppelinConfiguration conf)
focal_class.identifier: getZeppelinHubUrl
focal_class.parameters: (ZeppelinConfiguration conf)
focal_class.return: String
focal_class.signature: String getZeppelinHubUrl(ZeppelinConfiguration conf)
focal_class.class_method_signature: ZeppelinHubRepo.isSubjectValid(AuthenticationInfo subject)
focal_class.full_signature: private boolean isSubjectValid(AuthenticationInfo subject)
focal_class.identifier: isSubjectValid
focal_class.modifiers: private
focal_class.parameters: (AuthenticationInfo subject)
focal_class.return: boolean
focal_class.signature: boolean isSubjectValid(AuthenticationInfo subject)
focal_class.class_method_signature: ZeppelinHubRepo.list(AuthenticationInfo subject)
focal_class.full_signature: @Override public List<NoteInfo> list(AuthenticationInfo subject)
focal_class.identifier: list
focal_class.modifiers: @Override public
focal_class.parameters: (AuthenticationInfo subject)
focal_class.return: List<NoteInfo>
focal_class.signature: List<NoteInfo> list(AuthenticationInfo subject)
focal_class.class_method_signature: ZeppelinHubRepo.get(String noteId, AuthenticationInfo subject)
focal_class.full_signature: @Override public Note get(String noteId, AuthenticationInfo subject)
focal_class.identifier: get
focal_class.modifiers: @Override public
focal_class.parameters: (String noteId, AuthenticationInfo subject)
focal_class.return: Note
focal_class.signature: Note get(String noteId, AuthenticationInfo subject)
focal_class.class_method_signature: ZeppelinHubRepo.save(Note note, AuthenticationInfo subject)
focal_class.full_signature: @Override public void save(Note note, AuthenticationInfo subject)
focal_class.identifier: save
focal_class.modifiers: @Override public
focal_class.parameters: (Note note, AuthenticationInfo subject)
focal_class.return: void
focal_class.signature: void save(Note note, AuthenticationInfo subject)
focal_class.class_method_signature: ZeppelinHubRepo.remove(String noteId, AuthenticationInfo subject)
focal_class.full_signature: @Override public void remove(String noteId, AuthenticationInfo subject)
focal_class.identifier: remove
focal_class.modifiers: @Override public
focal_class.parameters: (String noteId, AuthenticationInfo subject)
focal_class.return: void
focal_class.signature: void remove(String noteId, AuthenticationInfo subject)
focal_class.class_method_signature: ZeppelinHubRepo.close()
focal_class.full_signature: @Override public void close()
focal_class.identifier: close
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void close()
focal_class.class_method_signature: ZeppelinHubRepo.checkpoint(String noteId, String checkpointMsg, AuthenticationInfo subject)
focal_class.full_signature: @Override public Revision checkpoint(String noteId, String checkpointMsg, AuthenticationInfo subject)
focal_class.identifier: checkpoint
focal_class.modifiers: @Override public
focal_class.parameters: (String noteId, String checkpointMsg, AuthenticationInfo subject)
focal_class.return: Revision
focal_class.signature: Revision checkpoint(String noteId, String checkpointMsg, AuthenticationInfo subject)
focal_class.class_method_signature: ZeppelinHubRepo.get(String noteId, String revId, AuthenticationInfo subject)
focal_class.full_signature: @Override public Note get(String noteId, String revId, AuthenticationInfo subject)
focal_class.identifier: get
focal_class.modifiers: @Override public
focal_class.parameters: (String noteId, String revId, AuthenticationInfo subject)
focal_class.return: Note
focal_class.signature: Note get(String noteId, String revId, AuthenticationInfo subject)
focal_class.class_method_signature: ZeppelinHubRepo.revisionHistory(String noteId, AuthenticationInfo subject)
focal_class.full_signature: @Override public List<Revision> revisionHistory(String noteId, AuthenticationInfo subject)
focal_class.identifier: revisionHistory
focal_class.modifiers: @Override public
focal_class.parameters: (String noteId, AuthenticationInfo subject)
focal_class.return: List<Revision>
focal_class.signature: List<Revision> revisionHistory(String noteId, AuthenticationInfo subject)
focal_class.class_method_signature: ZeppelinHubRepo.getUserToken(String user)
focal_class.full_signature: private String getUserToken(String user)
focal_class.identifier: getUserToken
focal_class.modifiers: private
focal_class.parameters: (String user)
focal_class.return: String
focal_class.signature: String getUserToken(String user)
focal_class.class_method_signature: ZeppelinHubRepo.getSettings(AuthenticationInfo subject)
focal_class.full_signature: @Override public List<NotebookRepoSettingsInfo> getSettings(AuthenticationInfo subject)
focal_class.identifier: getSettings
focal_class.modifiers: @Override public
focal_class.parameters: (AuthenticationInfo subject)
focal_class.return: List<NotebookRepoSettingsInfo>
focal_class.signature: List<NotebookRepoSettingsInfo> getSettings(AuthenticationInfo subject)
focal_class.class_method_signature: ZeppelinHubRepo.changeToken(int instanceId, String user)
focal_class.full_signature: private void changeToken(int instanceId, String user)
focal_class.identifier: changeToken
focal_class.modifiers: private
focal_class.parameters: (int instanceId, String user)
focal_class.return: void
focal_class.signature: void changeToken(int instanceId, String user)
focal_class.class_method_signature: ZeppelinHubRepo.updateSettings(Map<String, String> settings, AuthenticationInfo subject)
focal_class.full_signature: @Override public void updateSettings(Map<String, String> settings, AuthenticationInfo subject)
focal_class.identifier: updateSettings
focal_class.modifiers: @Override public
focal_class.parameters: (Map<String, String> settings, AuthenticationInfo subject)
focal_class.return: void
focal_class.signature: void updateSettings(Map<String, String> settings, AuthenticationInfo subject)
focal_class.class_method_signature: ZeppelinHubRepo.setNoteRevision(String noteId, String revId, AuthenticationInfo subject)
focal_class.full_signature: @Override public Note setNoteRevision(String noteId, String revId, AuthenticationInfo subject)
focal_class.identifier: setNoteRevision
focal_class.modifiers: @Override public
focal_class.parameters: (String noteId, String revId, AuthenticationInfo subject)
focal_class.return: Note
focal_class.signature: Note setNoteRevision(String noteId, String revId, AuthenticationInfo subject)
focal_method.body: String getZeppelinhubWebsocketUri(ZeppelinConfiguration conf) {
      String zeppelinHubUri = StringUtils.EMPTY;
      try {
        zeppelinHubUri = getZeppelinHubWsUri(new URI(conf.getString("ZEPPELINHUB_API_ADDRESS",
            ZEPPELIN_CONF_PROP_NAME_SERVER, DEFAULT_SERVER)));
      } catch (URISyntaxException e) {
        LOG.error("Cannot get ZeppelinHub URI", e);
      }
      return zeppelinHubUri;
    }
focal_method.class_method_signature: ZeppelinHubRepo.getZeppelinhubWebsocketUri(ZeppelinConfiguration conf)
focal_method.full_signature:  String getZeppelinhubWebsocketUri(ZeppelinConfiguration conf)
focal_method.identifier: getZeppelinhubWebsocketUri
focal_method.invocations: getZeppelinHubWsUri getString error
focal_method.parameters: (ZeppelinConfiguration conf)
focal_method.return: String
focal_method.signature: String getZeppelinhubWebsocketUri(ZeppelinConfiguration conf)