<commit_before>INSERT INTO devgym.task (
  year,
  type,
  timeuuid,
  name,
  description,
  solution_template,
  reference_solution,
  suite,
  solution_trait
) VALUES (
  '2016-01-01 00:00:00 UTC',
  'scalaClass',
  9894cd10-ce12-11e5-8ee9-091830ac5256,
  'Array of max sum',
  'Implement apply function to return  a sub-array of original array ''a'', which has maximum sum of its elements.
   For example, having such input Array(-2, 1, -3, 4, -1, 2, 1, -5, 4), then result should be Array(4, -1, 2, 1), which has maximum sum = 6. You can not rearrange elements of the initial array.',
   'class SubArrayWithMaxSum {
  def apply(a: Array[Int]): Array[Int] = {
    
  }
}',
   'class SubArrayWithMaxSum {
      def apply(a: Array[Int]): Array[Int] = {
        var currentSum = 0
        var maxSum = 0
        var left, right = 0
        var maxI = 0 //used when all negatives in the array

        for (i <- a.indices) {
          val incSum = currentSum + a(i)

          if (incSum > 0) {
            currentSum = incSum
<commit_msg>add proper indent<commit_after>INSERT INTO devgym.task (
  year,
  type,
  timeuuid,
  name,
  description,
  solution_template,
  reference_solution,
  suite,
  solution_trait
) VALUES (
  '2016-01-01 00:00:00 UTC',
  'scalaClass',
  9894cd10-ce12-11e5-8ee9-091830ac5256,
  'Array of max sum',
  'Implement apply function to return  a sub-array of original array ''a'', which has maximum sum of its elements.
   For example, having such input Array(-2, 1, -3, 4, -1, 2, 1, -5, 4), then result should be Array(4, -1, 2, 1), which has maximum sum = 6. You can not rearrange elements of the initial array.',
   'class SubArrayWithMaxSum {
  def apply(a: Array[Int]): Array[Int] = {
        
  }
}',
   'class SubArrayWithMaxSum {
      def apply(a: Array[Int]): Array[Int] = {
        var currentSum = 0
        var maxSum = 0
        var left, right = 0
        var maxI = 0 //used when all negatives in the array

        for (i <- a.indices) {
          val incSum = currentSum + a(i)

          if (incSum > 0) {
            currentSum = incSum

{'fraction_non_alphanumeric': 0.11409395973154363, 'fraction_numerical': 0.053691275167785234, 'mean_word_length': 2.5553662691652472, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1667055', 'n_tokens_mistral': 785, 'n_tokens_neox': 708, 'n_words': 242}