<commit_before>// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.util;

import com.intellij.openapi.util.SystemInfo;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.TestOnly;

/**
 * Utility wrappers for accessing system properties.
 *
 * @see SystemInfo
 * @author yole
 */
public class SystemProperties {
  private static String ourTestUserName;
  private static String ourTestUserHome;

  private SystemProperties() { }

  @NotNull
  public static String getUserHome() {
    return ourTestUserHome != null ? ourTestUserHome : System.getProperty("user.home");
  }

  public static String getUserName() {
    return ourTestUserName != null ? ourTestUserName : System.getProperty("user.name");
  }

  @TestOnly
  public static void setTestUserHome(@Nullable String userHome) {
    ourTestUserHome = userHome;<commit_msg>IDEA-CR-49585 SSH Tests: override ssh home path from ~/.ssh to a temporary directory<commit_after>// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.util;

import com.intellij.openapi.util.SystemInfo;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.TestOnly;

/**
 * Utility wrappers for accessing system properties.
 *
 * @see SystemInfo
 * @author yole
 */
public class SystemProperties {
  private static String ourTestUserName;

  private SystemProperties() { }

  @NotNull
  public static String getUserHome() {
    return System.getProperty("user.home");
  }

  public static String getUserName() {
    return ourTestUserName != null ? ourTestUserName : System.getProperty("user.name");
{'fraction_non_alphanumeric': 0.09016811003565971, 'fraction_numerical': 0.01273560876209883, 'mean_word_length': 4.611428571428571, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2649689', 'n_tokens_mistral': 583, 'n_tokens_neox': 544, 'n_words': 171}