<commit_before>//
//  Debug.swift
//  Sample
//
//  Created by g08m11 on 2015/09/18.
//  Copyright (c) 2015年 Bloc. All rights reserved.
//

import Foundation

struct Debug {
  static func debugInfoPlist(file: String = __FILE__, function: String = __FUNCTION__, line: Int = __LINE__) {
    var str = ""
    for (k, v) in NSBundle.mainBundle().infoDictionary! {
      str += "\(k) : \(v)\n"
    }
    log("\(str)", file: file, function: function,  line: line)
  }
  
  static func log(message: AnyObject,
    function: String = __FUNCTION__,
    file: String = __FILE__,
    line: Int = __LINE__) {
      #if DEBUG
        var str = "\(message)\n-- FileName: \(file)\n-- Method: \(function)\n-- Line: \(line)"
        str = str.stringByReplacingOccurrencesOfString("\n", withString: "\n  ", options: nil, range: nil)
        println("\n*** \(str)\n")
      #endif
  }
}<commit_msg>fix: convert code to swift2.0<commit_after>//
//  Debug.swift
//  Sample
//
//  Created by g08m11 on 2015/09/18.
//  Copyright (c) 2015年 Bloc. All rights reserved.
//

import Foundation

struct Debug {
  static func debugInfoPlist(file: String = __FILE__, function: String = __FUNCTION__, line: Int = __LINE__) {
    var str = ""
    for (k, v) in NSBundle.mainBundle().infoDictionary! {
      str += "\(k) : \(v)\n"
    }
    log("\(str)", file: file, function: function,  line: line)
  }
  
  static func log(message: AnyObject,
    function: String = __FUNCTION__,
    file: String = __FILE__,
    line: Int = __LINE__) {
      #if DEBUG
        var str = "\(message)\n-- FileName: \(file)\n-- Method: \(function)\n-- Line: \(line)"
        str = str.stringByReplacingOccurrencesOfString("\n", withString: "\n  ", options: [], range: nil)
        print("\n*** \(str)\n")
      #endif
  }
}
{'fraction_non_alphanumeric': 0.16939582156973462, 'fraction_numerical': 0.019198193111236588, 'mean_word_length': 2.6163265306122447, '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': '7287195', 'n_tokens_mistral': 619, 'n_tokens_neox': 586, 'n_words': 167}