<commit_before>// <copyright file="Linker.cs" company="<NAME>">
//  Opus package
// </copyright>
// <summary>C package</summary>
// <author><NAME></author>
namespace C
{
    [System.AttributeUsage(System.AttributeTargets.Method)]
    public class ExportLinkerOptionsDelegateAttribute : System.Attribute
    {
    }

    [System.AttributeUsage(System.AttributeTargets.Method)]
    public class LocalLinkerOptionsDelegateAttribute : System.Attribute
    {
    }

    public abstract class Linker
    {
        public abstract string ExecutableCPlusPlus(Opus.Core.Target target);

        protected abstract string StartLibraryList
        {
            get;
        }

        protected abstract string EndLibraryList
        {
            get;
        }

        public void AppendLibrariesToCommandLine(Opus.Core.StringArray commandLineBuilder,
                                                 ILinkerOptions linkerOptions,
                                                 Opus.Core.StringArray otherLibraryPaths)
        {
            if ((linkerOptions.DoNotAutoIncludeStandardLibraries && linkerOptions.StandardLibraries.Count > 0) ||
                (linkerOptions.Libraries.Count > 0) ||
                ((null != otherLibraryPaths) && (otherLibraryPaths.Count > 0)))
            {
                commandLineBuilder.Add(this.StartLibraryList);
                if (linkerOptions.DoNotAutoIncludeStandardLibraries)
                {
                    foreach (string standardLibraryPath in linkerOptions.StandardLibraries)
                    {
                        commandLineBuilder.Add(System.String.Format("\"{0}\"", standardLibraryPath));
                    }
                }
                foreach (string libraryPath in linkerOptions.Libraries)
                {
                    commandLineBuilder.Add(System.String.Format("\"{0}\"", libraryPath));
                }
                if (otherLibraryPaths != null)
                {
                    commandLineBuilder.Add(otherLibraryPaths.ToString(' '));
                }
                commandLineBuilder.Add(this.EndLibraryList);
            }
        }
    }
}<commit_msg>[qtcreator] Slightly more correct C.Linker.AppendLibrariesToCommandLine so that empty strings do not end up in the array of libraries.<commit_after>// <copyright file="Linker.cs" company="<NAME>">
//  Opus package
// </copyright>
// <summary>C package</summary>
// <author><NAME></author>
namespace C
{
    [System.AttributeUsage(System.AttributeTargets.Method)]
    public class ExportLinkerOptionsDelegateAttribute : System.Attribute
    {
    }

    [System.AttributeUsage(System.AttributeTargets.Method)]
    public class LocalLinkerOptionsDelegateAttribute : System.Attribute
    {
    }

    public abstract class Linker
    {
        public abstract string ExecutableCPlusPlus(Opus.Core.Target target);

        protected abstract string StartLibraryList
        {
            get;
        }

        protected abstract string EndLibraryList
        {
            get;
        }

        public void AppendLibrariesToCommandLine(Opus.Core.StringArray commandLineBuilder,
                                                 ILinkerOptions linkerOptions,
                                                 Opus.Core.StringArray otherLibraryPaths)
        {
            bool includeStandardLibraries = linkerOptions.DoNotAutoIncludeStandardLibraries && linkerOptions.StandardLibraries.Count > 0;
            bool includeOtherLibraries = (null != otherLibraryPaths) && (otherLibraryPaths.Count > 0);
            if (includeStandardLibraries ||
                (linkerOptions.Libraries.Count > 0) ||
                includeOtherLibraries)
            {
                commandLineBuilder.Add(this.StartLibraryList);

                if (includeStandardLibraries)
                {
                    foreach (string standardLibraryPath in linkerOptions.StandardLibraries)
                    {
                        commandLineBuilder.Add(System.String.Format("\"{0}\"", standardLibraryPath));
                    }
                }

                foreach (string libraryPath in linkerOptions.Libraries)
                {
                    commandLineBuilder.Add(System.String.Format("\"{0}\"", libraryPath));
                }

                if (includeOtherLibraries)
                {
                    commandLineBuilder.Add(otherLibraryPaths.ToString(' '));
                }

                commandLineBuilder.Add(this.EndLibraryList);
            }
        }
    }
}
{'fraction_non_alphanumeric': 0.08322608322608323, 'fraction_numerical': 0.002145002145002145, 'mean_word_length': 1.6434240362811792, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4018566', 'n_tokens_mistral': 1133, 'n_tokens_neox': 1037, 'n_words': 184}