test_class.file: BiliLiveLib/src/test/java/charlie/bililivelib/user/SessionLoginHelperTest.java
test_class.identifier: SessionLoginHelperTest
test_case.body: @Test
      public void startLogin() throws Exception {
          String email = testInput("E-Mail:");
          String password = testInput("Password:");
  
          SessionLoginHelper helper = new SessionLoginHelper(email, password);
          JOptionPane.showMessageDialog(null, "Captcha", "Captcha",
                  JOptionPane.PLAIN_MESSAGE, new ImageIcon(helper.getCaptcha()));
  
          String captcha = testInput("Captcha:");
          helper.loginWithCaptcha(captcha);
  
          assertEquals(SessionLoginHelper.LoginStatus.SUCCESS, helper.getStatus());
      }
test_case.class_method_signature: SessionLoginHelperTest.startLogin()
test_case.full_signature: @Test public void startLogin()
test_case.identifier: startLogin
test_case.invocations: testInput testInput showMessageDialog getCaptcha testInput loginWithCaptcha assertEquals getStatus
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void startLogin()
focal_class.declarator: DEFAULT_LOGIN_TIMEOUT_MILLIS = 2000
focal_class.modifier: public static final
focal_class.original_string: public static final int DEFAULT_LOGIN_TIMEOUT_MILLIS = 2000;
focal_class.type: int
focal_class.var_name: DEFAULT_LOGIN_TIMEOUT_MILLIS
focal_class.declarator: DEFAULT_KEEP_LOGGING_IN = true
focal_class.modifier: public static final
focal_class.original_string: public static final boolean DEFAULT_KEEP_LOGGING_IN = true;
focal_class.type: boolean
focal_class.var_name: DEFAULT_KEEP_LOGGING_IN
focal_class.declarator: LOGIN_JAVASCRIPT
focal_class.modifier: public static final
focal_class.original_string: public static final String LOGIN_JAVASCRIPT;
focal_class.type: String
focal_class.var_name: LOGIN_JAVASCRIPT
focal_class.declarator: TRUST_STORE_PASSWORD = "bilibili"
focal_class.modifier: public static final
focal_class.original_string: public static final String TRUST_STORE_PASSWORD = "bilibili";
focal_class.type: String
focal_class.var_name: TRUST_STORE_PASSWORD
focal_class.declarator: MINILOGIN_URL = "https://passport.bilibili.com/ajax/miniLogin/minilogin"
focal_class.modifier: public static final
focal_class.original_string: public static final String MINILOGIN_URL = "https://passport.bilibili.com/ajax/miniLogin/minilogin";
focal_class.type: String
focal_class.var_name: MINILOGIN_URL
focal_class.declarator: loginTimeoutMillis
focal_class.modifier: private
focal_class.original_string: private long loginTimeoutMillis;
focal_class.type: long
focal_class.var_name: loginTimeoutMillis
focal_class.declarator: miniLoginPage
focal_class.modifier: private
focal_class.original_string: private HtmlPage miniLoginPage;
focal_class.type: HtmlPage
focal_class.var_name: miniLoginPage
focal_class.declarator: webClient
focal_class.modifier: private
focal_class.original_string: private WebClient webClient;
focal_class.type: WebClient
focal_class.var_name: webClient
focal_class.declarator: email
focal_class.modifier: private
focal_class.original_string: private String email;
focal_class.type: String
focal_class.var_name: email
focal_class.declarator: password
focal_class.modifier: private
focal_class.original_string: private String password;
focal_class.type: String
focal_class.var_name: password
focal_class.declarator: keepLoggingIn
focal_class.modifier: private
focal_class.original_string: private boolean keepLoggingIn;
focal_class.type: boolean
focal_class.var_name: keepLoggingIn
focal_class.declarator: status = NOT_COMPLETED
focal_class.modifier: private
focal_class.original_string: private LoginStatus status = NOT_COMPLETED;
focal_class.type: LoginStatus
focal_class.var_name: status
focal_class.file: BiliLiveLib/src/main/java/charlie/bililivelib/user/SessionLoginHelper.java
focal_class.identifier: SessionLoginHelper
focal_class.class_method_signature: SessionLoginHelper.SessionLoginHelper(@NotNull String email, @NotNull String password)
focal_class.full_signature: public  SessionLoginHelper(@NotNull String email, @NotNull String password)
focal_class.identifier: SessionLoginHelper
focal_class.modifiers: public
focal_class.parameters: (@NotNull String email, @NotNull String password)
focal_class.signature:  SessionLoginHelper(@NotNull String email, @NotNull String password)
focal_class.class_method_signature: SessionLoginHelper.SessionLoginHelper(@NotNull String email, @NotNull String password, @NotNull String userAgent)
focal_class.full_signature: public  SessionLoginHelper(@NotNull String email, @NotNull String password, @NotNull String userAgent)
focal_class.identifier: SessionLoginHelper
focal_class.modifiers: public
focal_class.parameters: (@NotNull String email, @NotNull String password, @NotNull String userAgent)
focal_class.signature:  SessionLoginHelper(@NotNull String email, @NotNull String password, @NotNull String userAgent)
focal_class.class_method_signature: SessionLoginHelper.SessionLoginHelper(@NotNull String email, @NotNull String password,
                                long loginTimeoutMillis, boolean keepLoggingIn, @NotNull String userAgent)
focal_class.full_signature: public  SessionLoginHelper(@NotNull String email, @NotNull String password,
                                long loginTimeoutMillis, boolean keepLoggingIn, @NotNull String userAgent)
focal_class.identifier: SessionLoginHelper
focal_class.modifiers: public
focal_class.parameters: (@NotNull String email, @NotNull String password,
                                long loginTimeoutMillis, boolean keepLoggingIn, @NotNull String userAgent)
focal_class.signature:  SessionLoginHelper(@NotNull String email, @NotNull String password,
                                long loginTimeoutMillis, boolean keepLoggingIn, @NotNull String userAgent)
focal_class.class_method_signature: SessionLoginHelper.initWebClient(String userAgent)
focal_class.full_signature: private void initWebClient(String userAgent)
focal_class.identifier: initWebClient
focal_class.modifiers: private
focal_class.parameters: (String userAgent)
focal_class.return: void
focal_class.signature: void initWebClient(String userAgent)
focal_class.class_method_signature: SessionLoginHelper.checkArguments(String userAgent)
focal_class.full_signature: private void checkArguments(String userAgent)
focal_class.identifier: checkArguments
focal_class.modifiers: private
focal_class.parameters: (String userAgent)
focal_class.return: void
focal_class.signature: void checkArguments(String userAgent)
focal_class.class_method_signature: SessionLoginHelper.avoidUselessErrorMessages()
focal_class.full_signature: private void avoidUselessErrorMessages()
focal_class.identifier: avoidUselessErrorMessages
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void avoidUselessErrorMessages()
focal_class.class_method_signature: SessionLoginHelper.startLogin()
focal_class.full_signature: private void startLogin()
focal_class.identifier: startLogin
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void startLogin()
focal_class.class_method_signature: SessionLoginHelper.parseStatus(@NonNls String statusJSON)
focal_class.full_signature: private void parseStatus(@NonNls String statusJSON)
focal_class.identifier: parseStatus
focal_class.modifiers: private
focal_class.parameters: (@NonNls String statusJSON)
focal_class.return: void
focal_class.signature: void parseStatus(@NonNls String statusJSON)
focal_class.class_method_signature: SessionLoginHelper.getCaptcha()
focal_class.full_signature: public Image getCaptcha()
focal_class.identifier: getCaptcha
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Image
focal_class.signature: Image getCaptcha()
focal_class.class_method_signature: SessionLoginHelper.loginWithCaptcha(String captcha)
focal_class.full_signature: public void loginWithCaptcha(String captcha)
focal_class.identifier: loginWithCaptcha
focal_class.modifiers: public
focal_class.parameters: (String captcha)
focal_class.return: void
focal_class.signature: void loginWithCaptcha(String captcha)
focal_class.class_method_signature: SessionLoginHelper.fillSession(Session session)
focal_class.full_signature: public void fillSession(Session session)
focal_class.identifier: fillSession
focal_class.modifiers: public
focal_class.parameters: (Session session)
focal_class.return: void
focal_class.signature: void fillSession(Session session)
focal_class.class_method_signature: SessionLoginHelper.setLoginTimeoutMillis(long loginTimeoutMillis)
focal_class.full_signature: public void setLoginTimeoutMillis(long loginTimeoutMillis)
focal_class.identifier: setLoginTimeoutMillis
focal_class.modifiers: public
focal_class.parameters: (long loginTimeoutMillis)
focal_class.return: void
focal_class.signature: void setLoginTimeoutMillis(long loginTimeoutMillis)
focal_class.class_method_signature: SessionLoginHelper.setEmail(@NotNull String email)
focal_class.full_signature: public void setEmail(@NotNull String email)
focal_class.identifier: setEmail
focal_class.modifiers: public
focal_class.parameters: (@NotNull String email)
focal_class.return: void
focal_class.signature: void setEmail(@NotNull String email)
focal_class.class_method_signature: SessionLoginHelper.setPassword(@NotNull String password)
focal_class.full_signature: public void setPassword(@NotNull String password)
focal_class.identifier: setPassword
focal_class.modifiers: public
focal_class.parameters: (@NotNull String password)
focal_class.return: void
focal_class.signature: void setPassword(@NotNull String password)
focal_method.body: private void startLogin() throws BiliLiveException {
          try {
              status = NOT_COMPLETED;
              miniLoginPage = webClient.getPage(MINILOGIN_URL);
              miniLoginPage.executeJavaScript(LOGIN_JAVASCRIPT);
              webClient.setStatusHandler((page, message) -> {
                  if (page == miniLoginPage) {
                      parseStatus(message);
                  }
              });
          } catch (IOException ex) {
              throw new NetworkException("IO Exception", ex);
          }
      }
focal_method.class_method_signature: SessionLoginHelper.startLogin()
focal_method.full_signature: private void startLogin()
focal_method.identifier: startLogin
focal_method.invocations: getPage executeJavaScript setStatusHandler parseStatus
focal_method.modifiers: private
focal_method.parameters: ()
focal_method.return: void
focal_method.signature: void startLogin()