<commit_before>package service
import play.api.Logger

import awscala.simpledb.SimpleDBClient
import awscala.simpledb.Domain
import models.User
import scala.concurrent.Future
import scala.concurrent.ExecutionContext.Implicits.global
import securesocial.core.providers.MailToken
import securesocial.core.BasicProfile
import securesocial.core.PasswordInfo
import securesocial.core.services.SaveMode
import play.api.Logger
import java.util.UUID
import models.{ Project, User }
import awscala.simpledb.Item
import securesocial.core.BasicProfile
import models.PhysalisProfile

class SimpleDBUserService extends UpdatableUserService {

  def find(username: String): Future[Option[User]] = {
    Logger.info(s"UserService: find '$username")
    null
  }

  def projects: List[Project] = {
    SimpleDBService.findProjects().toList
  }

  def update(user: User): User = {
    SimpleDBService.saveUser(user)
    user
  }

  // not needed
  def deleteExpiredTokens() = {}

  // not needed
  def deleteToken(uuid: String): Future[Option[MailToken]] = { null }

  def find(providerId: String, profileId: String): Future[Option[BasicProfile]] = Future.successful {
    SimpleDBService.findPhysalisProfile(providerId, profileId).map { _.toBasicProfile() }
  }

  // not needed?
  def findByEmailAndProvider(email: String, providerId: String): Future[Option[BasicProfile]] = {
    Logger.info(s"UserService: findByEmailAndProvide '$providerId' '$email")
    null<commit_msg>Improved Logging.<commit_after>package service
import play.api.Logger

import awscala.simpledb.SimpleDBClient
import awscala.simpledb.Domain
import models.User
import scala.concurrent.Future
import scala.concurrent.ExecutionContext.Implicits.global
import securesocial.core.providers.MailToken
import securesocial.core.BasicProfile
import securesocial.core.PasswordInfo
import securesocial.core.services.SaveMode
import play.api.Logger
import java.util.UUID
import models.{ Project, User }
import awscala.simpledb.Item
import securesocial.core.BasicProfile
import models.PhysalisProfile

class SimpleDBUserService extends UpdatableUserService {

  def find(username: String): Future[Option[User]] = {
    Logger.info(s"UserService: find '$username")
    null
  }

  def projects: List[Project] = {
    SimpleDBService.findProjects().toList
  }

  def update(user: User): User = {
    SimpleDBService.saveUser(user)
    user
  }

  // not needed
  def deleteExpiredTokens() = {}

  // not needed
  def deleteToken(uuid: String): Future[Option[MailToken]] = { null }

  def find(providerId: String, profileId: String): Future[Option[BasicProfile]] = Future.successful {
    Logger.info(s"UserService: find '$providerId' '$profileId")
    SimpleDBService.findPhysalisProfile(providerId, profileId).map { _.toBasicProfile() }
  }

  // not needed?
  def findByEmailAndProvider(email: String, providerId: String): Future[Option[BasicProfile]] = {
    Logger.info(s"UserService: findByEmailAndProvide '$providerId' '$email")
    null
{'fraction_non_alphanumeric': 0.10381781647689216, 'fraction_numerical': 0.0, 'mean_word_length': 5.222916666666666, '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': '914412', 'n_tokens_mistral': 895, 'n_tokens_neox': 887, 'n_words': 188}