<commit_before>﻿
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Forms;
using Microsoft.TeamFoundation;
using Microsoft.TeamFoundation.Client;
using Microsoft.TeamFoundation.WorkItemTracking.Client;
using Microsoft.TeamFoundation.TestManagement.Client;
using Microsoft.TeamFoundation.Server;
using System.ComponentModel;
using System.Xml;
using log4net.Config;
using log4net;
using System.Threading;

namespace TFSProjectMigration
{
    /// <summary>
    /// Interaction logic for TFSProjectMigrationUI.xaml
    /// </summary>
    public partial class TFSWorkItemMigrationUI : Window
    {

        private TfsTeamProjectCollection sourceTFS;
        private TfsTeamProjectCollection destinationTFS;
        private WorkItemStore sourceStore;
        private WorkItemStore destinationStore;
        private Project sourceProject;
        private Project destinationProject;
        private static readonly ILog logger = LogManager.GetLogger(typeof(TFSWorkItemMigrationUI));
        public int migrationState = 0;
        private bool IsNotIncludeClosed = false;
        private bool IsNotIncludeRemoved = false;
        WorkItemRead readSource;
        WorkItemWrite writeTarget;
        Hashtable fieldMap;
        Hashtable finalFieldMap;
        Hashtable copyingFieldSet;
        List<object> migrateTypeSet;

        public TFSWorkItemMigrationUI()
        {
            InitializeComponent();
            DOMConfigurator.Configure();
        }

        private void ConnectSourceProjectButton_Click(object sender, RoutedEventArgs e)
        {
            TeamProjectPicker tpp = new TeamProjectPicker(TeamProjectPickerMode.SingleProject, false);
            DialogResult result = tpp.ShowDialog();
            if (result.ToString() == "OK")
            {
                StatusViwer.Content = "";
                MigratingLabel.Content = "";
                StatusBar.Value = 0;
                SourceFieldGrid.ItemsSource = new List<string>();
                TargetFieldGrid.ItemsSource = new List<string>();
                MappedListGrid.ItemsSource = new List<object>();
                FieldToCopyGrid.ItemsSource = new List<object>();
                WorkFlowListGrid.ItemsSource = new List<object>();

                finalFieldMap = new Hashtable();
                copyingFieldSet = new Hashtable();
                migrateTypeSet = new List<object>();
                this.sourceTFS = tpp.SelectedTeamProjectCollection;
                this.sourceStore = (WorkItemStore)sourceTFS.GetService(typeof(WorkItemStore));

                this.sourceProject = sourceStore.Projects[tpp.SelectedProjects[0].Name];
                SourceProjectText.Text = string.Format("{0}/{1}", sourceTFS.Uri.ToString(), sourceProject.Name);
                readSource = new WorkItemRead(sourceTFS, sourceProject);

                if ((string)ConnectionStatusLabel.Content == "Select a Source project")<commit_msg>Fix for warning: CS0618 'DOMConfigurator.Configure()' is obsolete<commit_after>﻿
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Forms;
using Microsoft.TeamFoundation;
using Microsoft.TeamFoundation.Client;
using Microsoft.TeamFoundation.WorkItemTracking.Client;
using Microsoft.TeamFoundation.TestManagement.Client;
using Microsoft.TeamFoundation.Server;
using System.ComponentModel;
using System.Xml;
using log4net.Config;
using log4net;
using System.Threading;

namespace TFSProjectMigration
{
    /// <summary>
    /// Interaction logic for TFSProjectMigrationUI.xaml
    /// </summary>
    public partial class TFSWorkItemMigrationUI : Window
    {

        private TfsTeamProjectCollection sourceTFS;
        private TfsTeamProjectCollection destinationTFS;
        private WorkItemStore sourceStore;
        private WorkItemStore destinationStore;
        private Project sourceProject;
        private Project destinationProject;
        private static readonly ILog logger = LogManager.GetLogger(typeof(TFSWorkItemMigrationUI));
        public int migrationState = 0;
        private bool IsNotIncludeClosed = false;
        private bool IsNotIncludeRemoved = false;
        WorkItemRead readSource;
        WorkItemWrite writeTarget;
        Hashtable fieldMap;
        Hashtable finalFieldMap;
        Hashtable copyingFieldSet;
        List<object> migrateTypeSet;

        public TFSWorkItemMigrationUI()
        {
            InitializeComponent();
            XmlConfigurator.Configure();
        }

        private void ConnectSourceProjectButton_Click(object sender, RoutedEventArgs e)
        {
            TeamProjectPicker tpp = new TeamProjectPicker(TeamProjectPickerMode.SingleProject, false);
            DialogResult result = tpp.ShowDialog();
            if (result.ToString() == "OK")
            {
                StatusViwer.Content = "";
                MigratingLabel.Content = "";
                StatusBar.Value = 0;
                SourceFieldGrid.ItemsSource = new List<string>();
                TargetFieldGrid.ItemsSource = new List<string>();
                MappedListGrid.ItemsSource = new List<object>();
                FieldToCopyGrid.ItemsSource = new List<object>();
                WorkFlowListGrid.ItemsSource = new List<object>();

                finalFieldMap = new Hashtable();
                copyingFieldSet = new Hashtable();
                migrateTypeSet = new List<object>();
                this.sourceTFS = tpp.SelectedTeamProjectCollection;
                this.sourceStore = (WorkItemStore)sourceTFS.GetService(typeof(WorkItemStore));

                this.sourceProject = sourceStore.Projects[tpp.SelectedProjects[0].Name];
                SourceProjectText.Text = string.Format("{0}/{1}", sourceTFS.Uri.ToString(), sourceProject.Name);
                readSource = new WorkItemRead(sourceTFS, sourceProject);

                if ((string)ConnectionStatusLabel.Content == "Select a Source project")
{'fraction_non_alphanumeric': 0.0832579185520362, 'fraction_numerical': 0.0027149321266968325, 'mean_word_length': 2.937648456057007, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, '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': '3742944', 'n_tokens_mistral': 1679, 'n_tokens_neox': 1634, 'n_words': 371}