test_class.declarator: mockConfig
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private Configuration mockConfig;
test_class.type: Configuration
test_class.var_name: mockConfig
test_class.declarator: mockGazePlay
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private GazePlay mockGazePlay;
test_class.type: GazePlay
test_class.var_name: mockGazePlay
test_class.declarator: mockTranslator
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private Translator mockTranslator;
test_class.type: Translator
test_class.var_name: mockTranslator
test_class.declarator: mockScene
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private Scene mockScene;
test_class.type: Scene
test_class.var_name: mockScene
test_class.declarator: mockStage
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private Stage mockStage;
test_class.type: Stage
test_class.var_name: mockStage
test_class.declarator: profileRoot = "profiles"
test_class.modifier: private static
test_class.original_string: private static String profileRoot = "profiles";
test_class.type: String
test_class.var_name: profileRoot
test_class.declarator: profileDirectory = "test1"
test_class.modifier: private static
test_class.original_string: private static String profileDirectory = "test1";
test_class.type: String
test_class.var_name: profileDirectory
test_class.declarator: exampleFile = "test.txt"
test_class.modifier: private static
test_class.original_string: private static String exampleFile = "test.txt";
test_class.type: String
test_class.var_name: exampleFile
test_class.declarator: hiddenDirectory = ".hidden"
test_class.modifier: private static
test_class.original_string: private static String hiddenDirectory = ".hidden";
test_class.type: String
test_class.var_name: hiddenDirectory
test_class.declarator: sep = File.separator
test_class.modifier: private final
test_class.original_string: private final String sep = File.separator;
test_class.type: String
test_class.var_name: sep
test_class.declarator: localDataFolder =
          System.getProperty("user.dir") + sep
              + "src" + sep
              + "test" + sep
              + "resources" + sep
test_class.modifier: private final
test_class.original_string: private final String localDataFolder =
          System.getProperty("user.dir") + sep
              + "src" + sep
              + "test" + sep
              + "resources" + sep;
test_class.type: String
test_class.var_name: localDataFolder
test_class.declarator: screenDimension = new Dimension2D(1920, 1080)
test_class.modifier: private final
test_class.original_string: private final Dimension2D screenDimension = new Dimension2D(1920, 1080);
test_class.type: Dimension2D
test_class.var_name: screenDimension
test_class.file: gazeplay-core/src/test/java/net/gazeplay/ui/scenes/userselect/UserProfileContextTest.java
test_class.identifier: UserProfileContextTest
test_case.body: @Test
      void shouldThrowExceptionIfUserNameIsEmpty() {
          UserProfileContext context = new UserProfileContext(mockGazePlay);
          FlowPane choicePanel = new FlowPane();
          ImagePattern imagePattern = new ImagePattern(new Image("bear.jpg"));
  
          assertThrows(IllegalArgumentException.class,
              () -> context.createUser(mockGazePlay, choicePanel, "", imagePattern, false, false, screenDimension));
      }
test_case.class_method_signature: UserProfileContextTest.shouldThrowExceptionIfUserNameIsEmpty()
test_case.full_signature: @Test void shouldThrowExceptionIfUserNameIsEmpty()
test_case.identifier: shouldThrowExceptionIfUserNameIsEmpty
test_case.invocations: assertThrows createUser
test_case.modifiers: @Test
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldThrowExceptionIfUserNameIsEmpty()
focal_class.declarator: cardHeight
focal_class.modifier: private final
focal_class.original_string: private final double cardHeight;
focal_class.type: double
focal_class.var_name: cardHeight
focal_class.declarator: cardWidth
focal_class.modifier: private final
focal_class.original_string: private final double cardWidth;
focal_class.type: double
focal_class.var_name: cardWidth
focal_class.file: gazeplay-core/src/main/java/net/gazeplay/ui/scenes/userselect/UserProfileContext.java
focal_class.identifier: UserProfileContext
focal_class.class_method_signature: UserProfileContext.UserProfileContext(final GazePlay gazePlay)
focal_class.full_signature: public  UserProfileContext(final GazePlay gazePlay)
focal_class.identifier: UserProfileContext
focal_class.modifiers: public
focal_class.parameters: (final GazePlay gazePlay)
focal_class.signature:  UserProfileContext(final GazePlay gazePlay)
focal_class.class_method_signature: UserProfileContext.getChildren()
focal_class.full_signature: @Override public ObservableList<Node> getChildren()
focal_class.identifier: getChildren
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: ObservableList<Node>
focal_class.signature: ObservableList<Node> getChildren()
focal_class.class_method_signature: UserProfileContext.findAllUsersProfiles()
focal_class.full_signature: static List<String> findAllUsersProfiles()
focal_class.identifier: findAllUsersProfiles
focal_class.modifiers: static
focal_class.parameters: ()
focal_class.return: List<String>
focal_class.signature: List<String> findAllUsersProfiles()
focal_class.class_method_signature: UserProfileContext.createUserPickerChoicePane(final GazePlay gazePlay)
focal_class.full_signature:  ScrollPane createUserPickerChoicePane(final GazePlay gazePlay)
focal_class.identifier: createUserPickerChoicePane
focal_class.parameters: (final GazePlay gazePlay)
focal_class.return: ScrollPane
focal_class.signature: ScrollPane createUserPickerChoicePane(final GazePlay gazePlay)
focal_class.class_method_signature: UserProfileContext.lookupProfilePicture(final Configuration currentUserProfileConfiguration)
focal_class.full_signature: static ImagePattern lookupProfilePicture(final Configuration currentUserProfileConfiguration)
focal_class.identifier: lookupProfilePicture
focal_class.modifiers: static
focal_class.parameters: (final Configuration currentUserProfileConfiguration)
focal_class.return: ImagePattern
focal_class.signature: ImagePattern lookupProfilePicture(final Configuration currentUserProfileConfiguration)
focal_class.class_method_signature: UserProfileContext.createUser(
          @NonNull final GazePlay gazePlay,
          @NonNull final FlowPane choicePanel,
          @NonNull final String userProfileName,
          @NonNull final ImagePattern imagePattern,
          final boolean editable,
          final boolean newUser,
          final Dimension2D screenDimension
      )
focal_class.full_signature:  User createUser(
          @NonNull final GazePlay gazePlay,
          @NonNull final FlowPane choicePanel,
          @NonNull final String userProfileName,
          @NonNull final ImagePattern imagePattern,
          final boolean editable,
          final boolean newUser,
          final Dimension2D screenDimension
      )
focal_class.identifier: createUser
focal_class.parameters: (
          @NonNull final GazePlay gazePlay,
          @NonNull final FlowPane choicePanel,
          @NonNull final String userProfileName,
          @NonNull final ImagePattern imagePattern,
          final boolean editable,
          final boolean newUser,
          final Dimension2D screenDimension
      )
focal_class.return: User
focal_class.signature: User createUser(
          @NonNull final GazePlay gazePlay,
          @NonNull final FlowPane choicePanel,
          @NonNull final String userProfileName,
          @NonNull final ImagePattern imagePattern,
          final boolean editable,
          final boolean newUser,
          final Dimension2D screenDimension
      )
focal_class.class_method_signature: UserProfileContext.createDeleteUserButton(
          final GazePlay gazePlay,
          final FlowPane choicePanel,
          final User user,
          final double size
      )
focal_class.full_signature: private BorderPane createDeleteUserButton(
          final GazePlay gazePlay,
          final FlowPane choicePanel,
          final User user,
          final double size
      )
focal_class.identifier: createDeleteUserButton
focal_class.modifiers: private
focal_class.parameters: (
          final GazePlay gazePlay,
          final FlowPane choicePanel,
          final User user,
          final double size
      )
focal_class.return: BorderPane
focal_class.signature: BorderPane createDeleteUserButton(
          final GazePlay gazePlay,
          final FlowPane choicePanel,
          final User user,
          final double size
      )
focal_class.class_method_signature: UserProfileContext.createEditUserButton(final GazePlay gazePlay, final FlowPane choicePanel, final User user, final double size, final Dimension2D screenDimension)
focal_class.full_signature: private BorderPane createEditUserButton(final GazePlay gazePlay, final FlowPane choicePanel, final User user, final double size, final Dimension2D screenDimension)
focal_class.identifier: createEditUserButton
focal_class.modifiers: private
focal_class.parameters: (final GazePlay gazePlay, final FlowPane choicePanel, final User user, final double size, final Dimension2D screenDimension)
focal_class.return: BorderPane
focal_class.signature: BorderPane createEditUserButton(final GazePlay gazePlay, final FlowPane choicePanel, final User user, final double size, final Dimension2D screenDimension)
focal_class.class_method_signature: UserProfileContext.createExitButton(final Dimension2D screenDimension)
focal_class.full_signature: private CustomButton createExitButton(final Dimension2D screenDimension)
focal_class.identifier: createExitButton
focal_class.modifiers: private
focal_class.parameters: (final Dimension2D screenDimension)
focal_class.return: CustomButton
focal_class.signature: CustomButton createExitButton(final Dimension2D screenDimension)
focal_class.class_method_signature: UserProfileContext.initializeDialog(Stage primaryStage)
focal_class.full_signature: private Stage initializeDialog(Stage primaryStage)
focal_class.identifier: initializeDialog
focal_class.modifiers: private
focal_class.parameters: (Stage primaryStage)
focal_class.return: Stage
focal_class.signature: Stage initializeDialog(Stage primaryStage)
focal_class.class_method_signature: UserProfileContext.initializeScroller(Pane choicePane, Stage primaryStage)
focal_class.full_signature: private ScrollPane initializeScroller(Pane choicePane, Stage primaryStage)
focal_class.identifier: initializeScroller
focal_class.modifiers: private
focal_class.parameters: (Pane choicePane, Stage primaryStage)
focal_class.return: ScrollPane
focal_class.signature: ScrollPane initializeScroller(Pane choicePane, Stage primaryStage)
focal_class.class_method_signature: UserProfileContext.createRemoveDialog(
          final Stage primaryStage,
          final FlowPane choicePanel,
          final User user,
          final Supplier<Dimension2D> currentScreenDimensionSupplier
      )
focal_class.full_signature:  Stage createRemoveDialog(
          final Stage primaryStage,
          final FlowPane choicePanel,
          final User user,
          final Supplier<Dimension2D> currentScreenDimensionSupplier
      )
focal_class.identifier: createRemoveDialog
focal_class.parameters: (
          final Stage primaryStage,
          final FlowPane choicePanel,
          final User user,
          final Supplier<Dimension2D> currentScreenDimensionSupplier
      )
focal_class.return: Stage
focal_class.signature: Stage createRemoveDialog(
          final Stage primaryStage,
          final FlowPane choicePanel,
          final User user,
          final Supplier<Dimension2D> currentScreenDimensionSupplier
      )
focal_class.class_method_signature: UserProfileContext.createDialog(
          final GazePlay gazePlay,
          final Stage primaryStage,
          final FlowPane choicePanel,
          final User user,
          final boolean newUser,
          final Dimension2D screenDimension
      )
focal_class.full_signature:  Stage createDialog(
          final GazePlay gazePlay,
          final Stage primaryStage,
          final FlowPane choicePanel,
          final User user,
          final boolean newUser,
          final Dimension2D screenDimension
      )
focal_class.identifier: createDialog
focal_class.parameters: (
          final GazePlay gazePlay,
          final Stage primaryStage,
          final FlowPane choicePanel,
          final User user,
          final boolean newUser,
          final Dimension2D screenDimension
      )
focal_class.return: Stage
focal_class.signature: Stage createDialog(
          final GazePlay gazePlay,
          final Stage primaryStage,
          final FlowPane choicePanel,
          final User user,
          final boolean newUser,
          final Dimension2D screenDimension
      )
focal_class.class_method_signature: UserProfileContext.createDialogButton(String text, double minHeight, double minWidth)
focal_class.full_signature: private static Button createDialogButton(String text, double minHeight, double minWidth)
focal_class.identifier: createDialogButton
focal_class.modifiers: private static
focal_class.parameters: (String text, double minHeight, double minWidth)
focal_class.return: Button
focal_class.signature: Button createDialogButton(String text, double minHeight, double minWidth)
focal_class.class_method_signature: UserProfileContext.checkNewName(final String s)
focal_class.full_signature: private boolean checkNewName(final String s)
focal_class.identifier: checkNewName
focal_class.modifiers: private
focal_class.parameters: (final String s)
focal_class.return: boolean
focal_class.signature: boolean checkNewName(final String s)
focal_class.class_method_signature: UserProfileContext.modifyUser(final HBox user, final String name, final ImagePattern ip)
focal_class.full_signature: private void modifyUser(final HBox user, final String name, final ImagePattern ip)
focal_class.identifier: modifyUser
focal_class.modifiers: private
focal_class.parameters: (final HBox user, final String name, final ImagePattern ip)
focal_class.return: void
focal_class.signature: void modifyUser(final HBox user, final String name, final ImagePattern ip)
focal_class.class_method_signature: UserProfileContext.chooseImageFile(final Stage primaryStage)
focal_class.full_signature: private File chooseImageFile(final Stage primaryStage)
focal_class.identifier: chooseImageFile
focal_class.modifiers: private
focal_class.parameters: (final Stage primaryStage)
focal_class.return: File
focal_class.signature: File chooseImageFile(final Stage primaryStage)
focal_class.class_method_signature: UserProfileContext.getImage(final Stage primaryStage, final Button targetButton)
focal_class.full_signature: private String getImage(final Stage primaryStage, final Button targetButton)
focal_class.identifier: getImage
focal_class.modifiers: private
focal_class.parameters: (final Stage primaryStage, final Button targetButton)
focal_class.return: String
focal_class.signature: String getImage(final Stage primaryStage, final Button targetButton)
focal_class.class_method_signature: UserProfileContext.copyFile(final File source, final File dest)
focal_class.full_signature: private static void copyFile(final File source, final File dest)
focal_class.identifier: copyFile
focal_class.modifiers: private static
focal_class.parameters: (final File source, final File dest)
focal_class.return: void
focal_class.signature: void copyFile(final File source, final File dest)
focal_class.superclass: extends GraphicalContext<BorderPane>
focal_method.body: User createUser(
          @NonNull final GazePlay gazePlay,
          @NonNull final FlowPane choicePanel,
          @NonNull final String userProfileName,
          @NonNull final ImagePattern imagePattern,
          final boolean editable,
          final boolean newUser,
          final Dimension2D screenDimension
      ) {
          if (userProfileName.trim().isEmpty()) {
              throw new IllegalArgumentException("userProfileName should not be empty");
          }
  
          final User user = new User(userProfileName);
  
          final Rectangle pictureRectangle = new Rectangle(0, 0, cardWidth, cardHeight);
          pictureRectangle.setFill(imagePattern);
  
          final Text userNameText = new Text(user.getName());
          userNameText.setFill(Color.WHITE);
          userNameText.getStyleClass().add("gameChooserButtonTitle");
          BorderPane.setAlignment(userNameText, Pos.BOTTOM_CENTER);
  
          final BorderPane content = new BorderPane();
          content.getStyleClass().add("gameChooserButton");
          content.getStyleClass().add("button");
          content.setPadding(new Insets(10));
          content.setCenter(pictureRectangle);
          content.setBottom(userNameText);
  
          user.setAlignment(Pos.TOP_RIGHT);
          user.getChildren().add(content);
  
          if (editable) {
              final double buttonsSize = screenDimension.getWidth() / 50;
              final BorderPane editUserButton = createEditUserButton(getGazePlay(), choicePanel, user, buttonsSize, screenDimension);
              final BorderPane deleteUserButton = createDeleteUserButton(getGazePlay(), choicePanel, user, buttonsSize);
              final VBox buttonBox = new VBox();
  
              buttonBox.getChildren().addAll(editUserButton, deleteUserButton);
              user.getChildren().add(buttonBox);
          }
  
          final EventHandler<Event> mouseClickedEventHandler;
          if (newUser) {
              mouseClickedEventHandler = event -> {
                  log.info("Adding user");
                  root.setEffect(new BoxBlur());
                  final Stage dialog = createDialog(gazePlay, gazePlay.getPrimaryStage(), choicePanel, user, true, screenDimension);
  
                  final String dialogTitle = getGazePlay().getTranslator().translate("NewUser");
                  dialog.setTitle(dialogTitle);
                  dialog.show();
  
                  dialog.toFront();
                  dialog.setAlwaysOnTop(true);
              };
          } else {
              mouseClickedEventHandler = event -> {
                  if (!user.getName().equals(getGazePlay().getTranslator().translate("DefaultUser"))) {
                      ActiveConfigurationContext.switchToUser(user.getName());
                  }
                  gazePlay.getTranslator().notifyLanguageChanged();
  
                  final Configuration config = ActiveConfigurationContext.getInstance();
                  CssUtil.setPreferredStylesheets(config, gazePlay.getPrimaryScene(), gazePlay.getCurrentScreenDimensionSupplier());
  
                  BackgroundMusicManager.onConfigurationChanged();
  
                  choicePanel.getChildren().clear();
                  gazePlay.onReturnToMenu();
              };
          }
  
          content.addEventFilter(MouseEvent.MOUSE_CLICKED, mouseClickedEventHandler);
          return user;
      }
focal_method.class_method_signature: UserProfileContext.createUser(
          @NonNull final GazePlay gazePlay,
          @NonNull final FlowPane choicePanel,
          @NonNull final String userProfileName,
          @NonNull final ImagePattern imagePattern,
          final boolean editable,
          final boolean newUser,
          final Dimension2D screenDimension
      )
focal_method.full_signature:  User createUser(
          @NonNull final GazePlay gazePlay,
          @NonNull final FlowPane choicePanel,
          @NonNull final String userProfileName,
          @NonNull final ImagePattern imagePattern,
          final boolean editable,
          final boolean newUser,
          final Dimension2D screenDimension
      )
focal_method.identifier: createUser
focal_method.invocations: isEmpty trim setFill getName setFill add getStyleClass setAlignment add getStyleClass add getStyleClass setPadding setCenter setBottom setAlignment add getChildren getWidth createEditUserButton getGazePlay createDeleteUserButton getGazePlay addAll getChildren add getChildren info setEffect createDialog getPrimaryStage translate getTranslator getGazePlay setTitle show toFront setAlwaysOnTop equals getName translate getTranslator getGazePlay switchToUser getName notifyLanguageChanged getTranslator getInstance setPreferredStylesheets getPrimaryScene getCurrentScreenDimensionSupplier onConfigurationChanged clear getChildren onReturnToMenu addEventFilter
focal_method.parameters: (
          @NonNull final GazePlay gazePlay,
          @NonNull final FlowPane choicePanel,
          @NonNull final String userProfileName,
          @NonNull final ImagePattern imagePattern,
          final boolean editable,
          final boolean newUser,
          final Dimension2D screenDimension
      )
focal_method.return: User
focal_method.signature: User createUser(
          @NonNull final GazePlay gazePlay,
          @NonNull final FlowPane choicePanel,
          @NonNull final String userProfileName,
          @NonNull final ImagePattern imagePattern,
          final boolean editable,
          final boolean newUser,
          final Dimension2D screenDimension
      )