<commit_before>package com.github.mmonkey.Destinations.Migrations;

import com.github.mmonkey.Destinations.Destinations;
import com.github.mmonkey.Destinations.Services.DefaultConfigStorageService;
import ninja.leaping.configurate.commented.CommentedConfigurationNode;

public class AddDatabaseSettingsToDefaultConfig implements Migration {

    private Destinations plugin;

    public void up() {
        CommentedConfigurationNode config = plugin.getDefaultConfigService().getConfig();
        config.getNode(DefaultConfigStorageService.VERSION).setValue(1);
        config.getNode(DefaultConfigStorageService.DATABASE_SETTINGS, DefaultConfigStorageService.PASSWORD).setValue("");
        config.getNode(DefaultConfigStorageService.DATABASE_SETTINGS, DefaultConfigStorageService.USERNAME).setValue("admin");
        config.getNode(DefaultConfigStorageService.DATABASE_SETTINGS, DefaultConfigStorageService.WEBSERVER).setValue(false);
        plugin.getDefaultConfigService().save();
    }

    public void down() {
        CommentedConfigurationNode config = plugin.getDefaultConfigService().getConfig();
        config.getNode(DefaultConfigStorageService.VERSION).setValue(0);
        config.removeChild(DefaultConfigStorageService.DATABASE_SETTINGS);
        plugin.getDefaultConfigService().save();<commit_msg>replaced save with saveConfig in migrations<commit_after>package com.github.mmonkey.Destinations.Migrations;

import com.github.mmonkey.Destinations.Destinations;
import com.github.mmonkey.Destinations.Services.DefaultConfigStorageService;
import ninja.leaping.configurate.commented.CommentedConfigurationNode;

public class AddDatabaseSettingsToDefaultConfig implements Migration {

    private Destinations plugin;

    public void up() {
        CommentedConfigurationNode config = plugin.getDefaultConfigService().getConfig();
        config.getNode(DefaultConfigStorageService.VERSION).setValue(1);
        config.getNode(DefaultConfigStorageService.DATABASE_SETTINGS, DefaultConfigStorageService.PASSWORD).setValue("");
        config.getNode(DefaultConfigStorageService.DATABASE_SETTINGS, DefaultConfigStorageService.USERNAME).setValue("admin");
        config.getNode(DefaultConfigStorageService.DATABASE_SETTINGS, DefaultConfigStorageService.WEBSERVER).setValue(false);
        plugin.getDefaultConfigService().saveConfig();
    }

    public void down() {
        CommentedConfigurationNode config = plugin.getDefaultConfigService().getConfig();
        config.getNode(DefaultConfigStorageService.VERSION).setValue(0);
        config.removeChild(DefaultConfigStorageService.DATABASE_SETTINGS);
        plugin.getDefaultConfigService().saveConfig();
{'fraction_non_alphanumeric': 0.08825729244577413, 'fraction_numerical': 0.0014958863126402393, 'mean_word_length': 5.930051813471502, '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': '3878137', 'n_tokens_mistral': 649, 'n_tokens_neox': 676, 'n_words': 82}