<commit_before>package com.beust.kobalt.misc

import com.beust.kobalt.api.IClasspathDependency
import com.beust.kobalt.api.Project
import com.beust.kobalt.maven.DepFactory
import com.beust.kobalt.maven.dependency.MavenDependency
import com.beust.kobalt.maven.MavenId
import javax.inject.Inject

/**
 * Find out if any newer versions of the dependencies are available.
 */
public class CheckVersions @Inject constructor(val depFactory : DepFactory,
        val executors : KobaltExecutors) {

    fun run(projects: List<Project>) {
        val executor = executors.newExecutor("CheckVersions", 5)

        val newVersions = hashSetOf<String>()
        projects.forEach {
            arrayListOf(it.compileDependencies, it.testDependencies).forEach { cds ->
                cds.forEach { compileDependency ->
                    if (MavenId.isMavenId(compileDependency.id)) {
                        val dep: IClasspathDependency
                        try {
                            dep = depFactory.create(compileDependency.shortId, executor, false /* go remote */)
                        } catch(e: Exception) {
                            log(1, "cannot resolve ${compileDependency.shortId}. ignoring")
                            return@forEach
                        }
                        if (dep is MavenDependency) {
                            val other = compileDependency as MavenDependency
                            if (dep.id != compileDependency.id
                                    && Versions.toLongVersion(dep.version) > Versions.toLongVersion(other.version)) {
                                newVersions.add(dep.id)
                            }
                        }
                    }
                }
            }
        }

        if (newVersions.size > 0) {
            log(1, "New versions found:")
            newVersions.forEach { log(1, "        $it") }
        } else {
            log(1, "All dependencies up to date")
        }
        executor.shutdown()
    }
}<commit_msg>get rid of the return by making the throw clause bigger.<commit_after>package com.beust.kobalt.misc

import com.beust.kobalt.KobaltException
import com.beust.kobalt.api.Project
import com.beust.kobalt.maven.DepFactory
import com.beust.kobalt.maven.MavenId
import com.beust.kobalt.maven.dependency.MavenDependency
import javax.inject.Inject

/**
 * Find out if any newer versions of the dependencies are available.
 */
public class CheckVersions @Inject constructor(val depFactory : DepFactory,
        val executors : KobaltExecutors) {

    fun run(projects: List<Project>) {
        val executor = executors.newExecutor("CheckVersions", 5)

        val newVersions = hashSetOf<String>()
        projects.forEach {
            arrayListOf(it.compileDependencies, it.testDependencies).forEach { cds ->
                cds.forEach { compileDependency ->
                    if (MavenId.isMavenId(compileDependency.id)) {
                        try {
                            val dep = depFactory.create(compileDependency.shortId, executor, false /* go remote */)
                            if (dep is MavenDependency) {
                                val other = compileDependency as MavenDependency
                                if (dep.id != compileDependency.id
                                        && Versions.toLongVersion(dep.version) > Versions.toLongVersion(other.version)) {
                                    newVersions.add(dep.id)
                                }
                            }
                        } catch(e: KobaltException) {
                            log(1, "cannot resolve ${compileDependency.shortId}. ignoring")
                        }
                    }
                }
            }
        }

        if (newVersions.size > 0) {
            log(1, "New versions found:")
            newVersions.forEach { log(1, "        $it") }
        } else {
            log(1, "All dependencies up to date")
        }
        executor.shutdown()
    }
}
{'fraction_non_alphanumeric': 0.08781939965269164, 'fraction_numerical': 0.002976928801786157, 'mean_word_length': 1.5168539325842696, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 7, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2399295', 'n_tokens_mistral': 1055, 'n_tokens_neox': 1003, 'n_words': 217}