<commit_before>package io.prediction.commons.settings

import io.prediction.commons.Common

import org.json4s._
import org.json4s.native.Serialization

/**
 * App object.
 *
 * @param id ID.
 * @param userid User ID that owns this app.
 * @param appkey The appkey used to access this app via REST API.
 * @param display The app's display name.
 * @param url The URL where the app is used.
 * @param cat The app's category.
 * @param desc The app's description.
 * @param timezone The app's timezone.
 */
case class App(
  id: Int,
  userid: Int,
  appkey: String,
  display: String,
  url: Option[String] = Some(""),
  cat: Option[String] = Some(""),
  desc: Option[String] = Some(""),
  timezone: String = "UTC")

/** Base trait for implementations that interact with apps in the backend data store. */
trait Apps extends Common {
  /**
   * Insert a new App with basic fields defined.
   *
   * @param app An App object to be inserted. The ID will be ignored and replaced by an implementation of this trait.
   */
  def insert(app: App): Int

  /** Get an App by its ID. */
  def get(id: Int): Option[App]

  /** Get all Apps. */
  def getAll(): Iterator[App]

  /** Get Apps by user ID. */
  def getByUserid(userid: Int): Iterator[App]
<commit_msg>Fix test error<commit_after>package io.prediction.commons.settings

import io.prediction.commons.Common

import org.json4s._
import org.json4s.native.Serialization

/**
 * App object.
 *
 * @param id ID.
 * @param userid User ID that owns this app.
 * @param appkey The appkey used to access this app via REST API.
 * @param display The app's display name.
 * @param url The URL where the app is used.
 * @param cat The app's category.
 * @param desc The app's description.
 * @param timezone The app's timezone.
 */
case class App(
  id: Int,
  userid: Int,
  appkey: String,
  display: String,
  url: Option[String] = None,
  cat: Option[String] = None,
  desc: Option[String] = None,
  timezone: String = "UTC")

/** Base trait for implementations that interact with apps in the backend data store. */
trait Apps extends Common {
  /**
   * Insert a new App with basic fields defined.
   *
   * @param app An App object to be inserted. The ID will be ignored and replaced by an implementation of this trait.
   */
  def insert(app: App): Int

  /** Get an App by its ID. */
  def get(id: Int): Option[App]

  /** Get all Apps. */
  def getAll(): Iterator[App]

  /** Get Apps by user ID. */
  def getByUserid(userid: Int): Iterator[App]

{'fraction_non_alphanumeric': 0.11481332798073063, 'fraction_numerical': 0.0016057808109193096, 'mean_word_length': 3.245315161839864, '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': '531939', 'n_tokens_mistral': 794, 'n_tokens_neox': 773, 'n_words': 324}