crossfile_context_retrievalwref dict | prompt stringlengths 82 26.2k | right_context stringlengths 19 68.4k | metadata dict | crossfile_context_retrieval dict | groundtruth stringlengths 8 297 |
|---|---|---|---|---|---|
{
"list": [
{
"filename": "Assets/Mochineko/RelentStateMachine/StateResults.cs",
"retrieved_chunk": "#nullable enable\nusing Mochineko.Relent.Result;\nnamespace Mochineko.RelentStateMachine\n{\n internal static class StateResults\n {\n public static ISuccessResult<IEventRequest<TEvent>> S... | #nullable enable
using System.Collections.Generic;
namespace Mochineko.RelentStateMachine
{
public static class EventRequests<TEvent>
{
public static |
if (requestsCache.TryGetValue(@event, out var request))
{
return request;
}
else
{
var newInstance = new SomeEventRequest<TEvent>(@event);
requestsCache.Add(@event, newInstance);
return newInstan... | {
"context_start_lineno": 0,
"file": "Assets/Mochineko/RelentStateMachine/EventRequests.cs",
"groundtruth_start_lineno": 7,
"repository": "mochi-neko-RelentStateMachine-64762eb",
"right_context_start_lineno": 9,
"task_id": "project_cc_csharp/500"
} | {
"list": [
{
"filename": "Assets/Mochineko/RelentStateMachine/StateResults.cs",
"retrieved_chunk": " public static IFailureResult<IEventRequest<TEvent>> Fail<TEvent>(string message)\n => Results.FailWithTrace<IEventRequest<TEvent>>(message);\n }\n}",
"score": 23.12712786603... | IEventRequest<TEvent> Request(TEvent @event)
{ |
{
"list": [
{
"filename": "Ultrapain/Patches/Parry.cs",
"retrieved_chunk": " break;\n }\n }\n foreach (Explosion e in __instance.explosion.GetComponentsInChildren<Explosion>())\n {\n e.speed *= 1f... | using HarmonyLib;
using UnityEngine;
namespace Ultrapain.Patches
{
class Solider_Start_Patch
{
static void Postfix(ZombieProjectiles __instance, ref GameObject ___decProjectile, ref GameObject ___projectile, ref EnemyIdentifier ___eid, ref Animator ___anim)
{
if (___eid.enemyType !=... |
if (!__state)
return;
SoliderGrenadeFlag flag = __instance.GetComponent<SoliderGrenadeFlag>();
GameObject.Destroy(flag.tempExplosion);
}
}
class SoliderShootCounter : MonoBehaviour
{
public int remainingShots = ConfigManager.soliderShoot... | {
"context_start_lineno": 0,
"file": "Ultrapain/Patches/Solider.cs",
"groundtruth_start_lineno": 112,
"repository": "eternalUnion-UltraPain-ad924af",
"right_context_start_lineno": 114,
"task_id": "project_cc_csharp/404"
} | {
"list": [
{
"filename": "Ultrapain/Patches/Parry.cs",
"retrieved_chunk": " else\n {\n if (flag != null/* && flag.bigExplosionOverride*/)\n {\n __2 = true;\n GameObject explosion = GameObject.Instantiate(__insta... | Grenade __instance, bool __state)
{ |
{
"list": [
{
"filename": "source/Models/RoboCacher.cs",
"retrieved_chunk": " entry.State = GameCacheState.Empty;\n entry.CacheSize = 0;\n entry.CacheSizeOnDisk = 0;\n }\n else if (DirectoryUtils.IsEmptyDirectory(ca... | using NowPlaying.Utils;
using NowPlaying.Models;
using System;
using System.Collections.Generic;
using System.IO;
namespace NowPlaying.ViewModels
{
public class GameCacheViewModel : ObservableObject
{
private readonly NowPlaying plugin;
public readonly GameCacheManagerViewModel manager;
... |
public GameCachePlatform Platform => entry.Platform;
private string installQueueStatus;
private string uninstallQueueStatus;
private bool nowInstalling;
private bool nowUninstalling;
private string formatStringXofY;
private int bytesScale;
private strin... | {
"context_start_lineno": 0,
"file": "source/ViewModels/GameCacheViewModel.cs",
"groundtruth_start_lineno": 28,
"repository": "gittromney-Playnite-NowPlaying-23eec41",
"right_context_start_lineno": 29,
"task_id": "project_cc_csharp/425"
} | {
"list": [
{
"filename": "source/ViewModels/GameCacheManagerViewModel.cs",
"retrieved_chunk": " }\n }\n plugin.panelViewModel.RefreshGameCaches();\n }\n if (needToUpdateCacheStats.Count > 0)\n {\n plugin.... | GameCacheState State => entry.State; |
{
"list": [
{
"filename": "src/Gum/InnerThoughts/Criterion.cs",
"retrieved_chunk": "using System.Text;\nusing System.Diagnostics;\nusing Gum.Utilities;\nnamespace Gum.InnerThoughts\n{\n [DebuggerDisplay(\"{DebuggerDisplay(),nq}\")]\n public readonly struct Criterion\n {\n public reado... | using System.Diagnostics;
using Gum.Utilities;
namespace Gum.InnerThoughts
{
[DebuggerDisplay("{DebuggerDisplay(),nq}")]
public readonly struct CriterionNode
{
public readonly |
public readonly CriterionNodeKind Kind = CriterionNodeKind.And;
public CriterionNode() { }
public CriterionNode(Criterion criterion) =>
Criterion = criterion;
public CriterionNode(Criterion criterion, CriterionNodeKind kind) =>
(Criterion, Kind) = (criterion, ... | {
"context_start_lineno": 0,
"file": "src/Gum/InnerThoughts/CriterionNode.cs",
"groundtruth_start_lineno": 8,
"repository": "isadorasophia-gum-032cb2d",
"right_context_start_lineno": 9,
"task_id": "project_cc_csharp/481"
} | {
"list": [
{
"filename": "src/Gum/InnerThoughts/Criterion.cs",
"retrieved_chunk": " public readonly string? StrValue = null;\n public readonly int? IntValue = null;\n public readonly bool? BoolValue = null;\n public Criterion() { }\n /// <summary>\n /// Creat... | Criterion Criterion = new(); |
{
"list": [
{
"filename": "Magic.IndexedDb/Factories/MagicDbFactory.cs",
"retrieved_chunk": " readonly IJSRuntime _jsRuntime;\n readonly IServiceProvider _serviceProvider;\n readonly IDictionary<string, IndexedDbManager> _dbs = new Dictionary<string, IndexedDbManager>();\n ... | using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Dynamic;
using System.Linq.Expressions;
using System.Reflection;
using System.Security.Cryptography.X509Certificates;
using System.Text.Json;
using System.Threading.Tasks;
using Magic.IndexedDb.Helpers;
using Magic.IndexedDb.Models;
... |
IDictionary<Guid, TaskCompletionSource<BlazorDbEvent>> _taskTransactions = new Dictionary<Guid, TaskCompletionSource<BlazorDbEvent>>();
private IJSObjectReference? _module { get; set; }
/// <summary>
/// A notification event that is raised when an action is completed
/// </summ... | {
"context_start_lineno": 0,
"file": "Magic.IndexedDb/IndexDbManager.cs",
"groundtruth_start_lineno": 30,
"repository": "magiccodingman-Magic.IndexedDb-a279d6d",
"right_context_start_lineno": 31,
"task_id": "project_cc_csharp/490"
} | {
"list": [
{
"filename": "Magic.IndexedDb/Factories/MagicDbFactory.cs",
"retrieved_chunk": " //{\n // var manager = new IndexedDbManager(dbStore, _jsRuntime);\n // var importedManager = await _jsRuntime.InvokeAsync<IJSObjectReference>(\"import\", \"./_content/Magic.IndexedD... | BlazorDbEvent>>> _transactions = new Dictionary<Guid, WeakReference<Action<BlazorDbEvent>>>(); |
{
"list": [
{
"filename": "VeilsClaim/Classes/Managers/EntityManager.cs",
"retrieved_chunk": " List<Entity> found = FindAll(bounds);\n for (int i = found.Count - 1; i >= 0; i--)\n if (Vector2.Distance(found[i].Position, position) > range)\n found... | using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using System.Collections.Generic;
namespace VeilsClaim.Classes.Objects
{
public class QuadTree
{
public QuadTree(Rectangle bounds)
{
Capacity = 32;
Bounds = bounds;
GameObjec... |
List<GameObject> found = new List<GameObject>();
// Bounds dont overlap quad...
if (!Bounds.Intersects(bounds))
return found;
// The bounds do overlap and the quad has subtrees...
if (Divided)
foreach (QuadTree subTree in Sub... | {
"context_start_lineno": 0,
"file": "VeilsClaim/Classes/Objects/QuadTree.cs",
"groundtruth_start_lineno": 78,
"repository": "IsCactus0-Veils-Claim-de09cef",
"right_context_start_lineno": 80,
"task_id": "project_cc_csharp/495"
} | {
"list": [
{
"filename": "VeilsClaim/Classes/Objects/Polygon.cs",
"retrieved_chunk": " for (int i = 0; i < vertices.Count; i++)\n vertices[i] += new Vector2(moveX, moveY);\n }\n public float CalculateLight(Vector2 vertice, float sunAngle, float sunStrength = 1f... | GameObject> Query(Rectangle bounds)
{ |
{
"list": [
{
"filename": "Ultrapain/Patches/SisyphusInstructionist.cs",
"retrieved_chunk": " esi.enraged = true;\n }\n GameObject effect = GameObject.Instantiate(Plugin.enrageEffect, __instance.transform);\n effect.transform.localScale = Vector3.one * 0... | using BepInEx;
using UnityEngine;
using UnityEngine.SceneManagement;
using System;
using HarmonyLib;
using System.IO;
using Ultrapain.Patches;
using System.Linq;
using UnityEngine.UI;
using UnityEngine.EventSystems;
using System.Reflection;
using Steamworks;
using Unity.Audio;
using System.Text;
using System.Collection... |
public static GameObject maliciousCannonBeam;
public static GameObject lightningBoltSFX;
public static GameObject revolverBeam;
public static GameObject blastwave;
public static GameObject cannonBall;
public static GameObject shockwave;
public static GameObject s... | {
"context_start_lineno": 0,
"file": "Ultrapain/Plugin.cs",
"groundtruth_start_lineno": 78,
"repository": "eternalUnion-UltraPain-ad924af",
"right_context_start_lineno": 79,
"task_id": "project_cc_csharp/449"
} | {
"list": [
{
"filename": "Ultrapain/Patches/SisyphusInstructionist.cs",
"retrieved_chunk": " {\n get {\n if(_shockwave == null && Plugin.shockwave != null)\n {\n _shockwave = GameObject.Instantiate(Plugin.shockwave);\n ... | GameObject revolverBullet; |
{
"list": [
{
"filename": "Microsoft.Build.Utilities/CanonicalTrackedInputFiles.cs",
"retrieved_chunk": " }\n }\n private void RemoveDependenciesFromEntryIfMissing(string rootingMarker, Dictionary<string, bool> fileCache)\n {\n if (!DependencyTable.TryGetValu... | using System;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Resources;
using System.Text;
using System.Text.RegularExpressions;
using Microsoft.Build.CPPTasks;
using Microsoft.Build.Framework;
using Microsoft.Build.Shared;
using Microsoft.Build.Uti... |
private Dictionary<string, Dictionary<string, string>> values = new Dictionary<string, Dictionary<string, string>>(StringComparer.OrdinalIgnoreCase);
private string additionalOptions = string.Empty;
private char prefix = '/';
private TaskLoggingHelper logPrivate;
protected ... | {
"context_start_lineno": 0,
"file": "Microsoft.Build.CPPTasks/VCToolTask.cs",
"groundtruth_start_lineno": 80,
"repository": "Chuyu-Team-MSBuildCppCrossToolset-6c84a69",
"right_context_start_lineno": 81,
"task_id": "project_cc_csharp/363"
} | {
"list": [
{
"filename": "Microsoft.Build.CPPTasks/ToolSwitch.cs",
"retrieved_chunk": " private string displayName = string.Empty;\n private const string typeBoolean = \"ToolSwitchType.Boolean\";\n private const string typeInteger = \"ToolSwitchType.Integer\";\n private co... | ToolSwitch> activeToolSwitches = new Dictionary<string, ToolSwitch>(StringComparer.OrdinalIgnoreCase); |
{
"list": [
{
"filename": "Ultrapain/Patches/Leviathan.cs",
"retrieved_chunk": " {\n flag.projectileDelayRemaining = Mathf.MoveTowards(flag.projectileDelayRemaining, 0f, Time.deltaTime * __instance.lcon.eid.totalSpeedModifier);\n }\n else... | using HarmonyLib;
using Mono.Cecil;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Reflection.Emit;
using System.Text;
using UnityEngine;
namespace Ultrapain.Patches
{
/*
u = initial, f = final, d = delta, s = speed multiplier
u = 40f * Time.deltaT... |
if (__instance.rev1charge < 400f)
__instance.rev1charge = Mathf.Min(400f, __instance.rev1charge + 25f * __0 * (ConfigManager.coinRegSpeedMulti.value - 1f));
if (__instance.rev2charge < 300f)
__instance.rev2charge = Mathf.Min(300f, __instance.rev2charge + (__insta... | {
"context_start_lineno": 0,
"file": "Ultrapain/Patches/PlayerStatTweaks.cs",
"groundtruth_start_lineno": 537,
"repository": "eternalUnion-UltraPain-ad924af",
"right_context_start_lineno": 539,
"task_id": "project_cc_csharp/440"
} | {
"list": [
{
"filename": "Ultrapain/Patches/Leviathan.cs",
"retrieved_chunk": " {\n proj = GameObject.Instantiate(Plugin.hideousMassProjectile, ___shootPoint.position, ___shootPoint.rotation);\n comp = proj.GetComponent<Projectile>();\n... | WeaponCharges __instance, float __0)
{ |
{
"list": [
{
"filename": "src/OGXbdmDumper/XboxMemoryStream.cs",
"retrieved_chunk": " public void Write(long position, double value) { Position = position; Write(value); }\n public void WriteAscii(string value) => _writer.Write(Encoding.ASCII.GetBytes(value));\n public void Write... | using Serilog;
using System.Diagnostics;
using System.Net;
using System.Net.NetworkInformation;
using System.Net.Sockets;
using System.Text;
using System.Text.RegularExpressions;
namespace OGXbdmDumper
{
public class Connection : Stream
{
#region Properties
private bool _disposed;
pri... |
if (_disposed) throw new ObjectDisposedException(nameof(Connection));
CommandResponse response = SendCommand(command, args);
if (response.Success) return response;
throw response.Code switch
{
// TODO: other error codes
402 =... | {
"context_start_lineno": 0,
"file": "src/OGXbdmDumper/Connection.cs",
"groundtruth_start_lineno": 333,
"repository": "Ernegien-OGXbdmDumper-07a1e82",
"right_context_start_lineno": 335,
"task_id": "project_cc_csharp/559"
} | {
"list": [
{
"filename": "src/OGXbdmDumper/XboxMemoryStream.cs",
"retrieved_chunk": " public override void Flush() { throw new NotSupportedException(); }\n /// <summary>\n /// TODO: description. possibly return total memory size\n /// </summary>\n public override lo... | CommandResponse SendCommandStrict(string command, params object[] args)
{ |
{
"list": [
{
"filename": "godot-project/Scripts/DataManagement/Downloader.cs",
"retrieved_chunk": "\t\tprivate byte[] data;\n\t\tprivate bool done;\n\t\tprivate string error;\n\t\tpublic Downloader(string url, Node downloaderParent)\n\t\t{\n\t\t\tthis.url = url;\n\t\t\tdownloaderParent.AddChild(this)... | //#define PRINT_DEBUG
using System;
using Godot;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Path = System.IO.Path;
using File = System.IO.File;
namespace GodotLauncher
{
public partial class LauncherManager : Control
{
[Export] private bool useLocalData;
private CheckBox insta... |
private Dictionary<string, InstallerEntryData> previousInstallers = new ();
private Dictionary<string, Downloader> downloaders = new ();
private Config config;
public override void _Ready()
{
GetWindow().Title = "Ready To Launch (Alpha)";
GetWindow().FilesDropped += _onFilesDropped;
DataPaths.Cr... | {
"context_start_lineno": 0,
"file": "godot-project/Scripts/DataManagement/LauncherManager.cs",
"groundtruth_start_lineno": 40,
"repository": "NathanWarden-ready-to-launch-58eba6d",
"right_context_start_lineno": 41,
"task_id": "project_cc_csharp/568"
} | {
"list": [
{
"filename": "godot-project/Scripts/DataManagement/Downloader.cs",
"retrieved_chunk": "\t\t\tdownloader.RequestCompleted += OnRequestCompleted;\n\t\t}\n\t\tvoid OnRequestCompleted(long result, long responseCode, string[] headers, byte[] body)\n\t\t{\n\t\t\tif (responseCode != (int)HttpCli... | InstallerEntryData> installerEntries = new (); |
{
"list": [
{
"filename": "Views/Pages/SyncPage.xaml.cs",
"retrieved_chunk": "using Wpf.Ui.Common.Interfaces;\nnamespace SupernoteDesktopClient.Views.Pages\n{\n /// <summary>\n /// Interaction logic for SyncPage.xaml\n /// </summary>\n public partial class SyncPage : INavigableView<ViewMo... | using Wpf.Ui.Common.Interfaces;
namespace SupernoteDesktopClient.Views.Pages
{
/// <summary>
/// Interaction logic for DashboardPage.xaml
/// </summary>
public partial class DashboardPage : INavigableView<ViewModels. |
public ViewModels.DashboardViewModel ViewModel
{
get;
}
public DashboardPage(ViewModels.DashboardViewModel viewModel)
{
ViewModel = viewModel;
InitializeComponent();
}
}
} | {
"context_start_lineno": 0,
"file": "Views/Pages/DashboardPage.xaml.cs",
"groundtruth_start_lineno": 7,
"repository": "nelinory-SupernoteDesktopClient-e527602",
"right_context_start_lineno": 9,
"task_id": "project_cc_csharp/473"
} | {
"list": [
{
"filename": "Views/Pages/SyncPage.xaml.cs",
"retrieved_chunk": " get;\n }\n public SyncPage(ViewModels.SyncViewModel viewModel)\n {\n ViewModel = viewModel;\n InitializeComponent();\n }\n }\n}",
"score": 54.04457903059... | DashboardViewModel>
{ |
{
"list": [
{
"filename": "EF012.CodeFirstMigration/Migrations/20230521143459_AddScheduleEnumAsValueConverter.Designer.cs",
"retrieved_chunk": "// <auto-generated />\nusing System;\nusing EF012.CodeFirstMigration.Data;\nusing Microsoft.EntityFrameworkCore;\nusing Microsoft.EntityFrameworkCore.Infrast... | // <auto-generated />
using System;
using EF012.CodeFirstMigration.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace EF012.CodeFirstMigrat... |
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "7.0.5")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIden... | {
"context_start_lineno": 0,
"file": "EF012.CodeFirstMigration/Migrations/AppDbContextModelSnapshot.cs",
"groundtruth_start_lineno": 12,
"repository": "metigator-EF012-054d65d",
"right_context_start_lineno": 15,
"task_id": "project_cc_csharp/544"
} | {
"list": [
{
"filename": "EF012.CodeFirstMigration/Migrations/20230521143459_AddScheduleEnumAsValueConverter.Designer.cs",
"retrieved_chunk": "{\n [DbContext(typeof(AppDbContext))]\n [Migration(\"20230521143459_AddScheduleEnumAsValueConverter\")]\n partial class AddScheduleEnumAsValueConvert... | AppDbContext))]
partial class AppDbContextModelSnapshot : ModelSnapshot
{ |
{
"list": [
{
"filename": "src/Ryan.EntityFrameworkCore.Shard/EntityFrameworkCore/Builder/EntityImplementationDictionary.cs",
"retrieved_chunk": " /// 实体类型\n /// </summary>\n public Type EntityType { get; }\n /// <summary>\n /// 创建实体实现字典\n /// </summary>\n ... | using Microsoft.EntityFrameworkCore;
using System;
using System.Linq;
namespace Ryan.EntityFrameworkCore.Builder
{
/// <summary>
/// 实体模型构建访问器
/// </summary>
public class EntityModelBuilderAccessor
{
/// <summary>
/// 实体类型
/// </summary>
public Type EntityType { get;... |
EntityType = entityType;
Dictionary = dictionary;
EntityModelBuilder = entityModelBuilder;
// 获取构建方法
var buildMethodInfo = EntityModelBuilder.GetType().GetMethod("Build")!;
// 创建委托 (如果不大量动态建表,效率不会太低)
Accessor = (t, m) =>
... | {
"context_start_lineno": 0,
"file": "src/Ryan.EntityFrameworkCore.Shard/EntityFrameworkCore/Builder/EntityModelBuilderAccessor.cs",
"groundtruth_start_lineno": 34,
"repository": "c-y-r-Ryan.EntityFrameworkCore.Shard-f15124c",
"right_context_start_lineno": 36,
"task_id": "project_cc_csharp/483"
} | {
"list": [
{
"filename": "src/Ryan.EntityFrameworkCore.Shard/EntityFrameworkCore/Proxy/EntityProxy.cs",
"retrieved_chunk": " /// <summary>\n /// 上下文\n /// </summary>\n public DbContext DbContext { get; }\n /// <summary>\n /// 创建实体代理\n /// </summary>\n ... | EntityImplementationDictionary dictionary, object entityModelBuilder)
{ |
{
"list": [
{
"filename": "Ultrapain/Patches/SwordsMachine.cs",
"retrieved_chunk": " class ThrownSword_Start_Patch\n {\n static void Postfix(ThrownSword __instance)\n {\n __instance.gameObject.AddComponent<ThrownSwordCollisionDetector>();\n }\n }\n class Thr... | using HarmonyLib;
using ULTRAKILL.Cheats;
using UnityEngine;
namespace Ultrapain.Patches
{
public class Stalker_SandExplode_Patch
{
static bool Prefix(Stalker __instance, ref int ___difficulty, ref EnemyIdentifier ___eid, int __0,
ref bool ___exploding, ref float ___countDownAmount, ref flo... |
if (__0.gameObject.layer == 10 || __0.gameObject.layer == 11)
{
EnemyIdentifierIdentifier component = __0.gameObject.GetComponent<EnemyIdentifierIdentifier>();
if (component && component.eid && !component.eid.dead && component.eid.enemyType != EnemyType.Stalker)
... | {
"context_start_lineno": 0,
"file": "Ultrapain/Patches/Stalker.cs",
"groundtruth_start_lineno": 99,
"repository": "eternalUnion-UltraPain-ad924af",
"right_context_start_lineno": 101,
"task_id": "project_cc_csharp/452"
} | {
"list": [
{
"filename": "Ultrapain/Patches/CommonComponents.cs",
"retrieved_chunk": " public float harmlessSize = 1f;\n public float harmlessSpeed = 1f;\n public float harmlessDamage = 1f;\n public int harmlessPlayerDamageOverride = -1;\n public bool normalMod = fa... | SandificationZone __instance, Collider __0)
{ |
{
"list": [
{
"filename": "src/LegendaryDownloadManager.xaml.cs",
"retrieved_chunk": " {\n download.status = (int)DownloadStatus.Paused;\n }\n SaveData();\n }\n }\n public RelayCommand<object> NavigateBackCommand\... | using LegendaryLibraryNS.Enums;
using LegendaryLibraryNS.Services;
using Playnite;
using Playnite.Commands;
using Playnite.SDK;
using Playnite.SDK.Data;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
u... |
Settings = LoadSavedSettings() ?? new LegendaryLibrarySettings();
}
private async Task Login()
{
try
{
var clientApi = new EpicAccountClient(PlayniteApi, LegendaryLauncher.TokensPath);
await clientApi.Login();
... | {
"context_start_lineno": 0,
"file": "src/LegendaryLibrarySettingsViewModel.cs",
"groundtruth_start_lineno": 58,
"repository": "hawkeye116477-playnite-legendary-plugin-d7af6b2",
"right_context_start_lineno": 60,
"task_id": "project_cc_csharp/504"
} | {
"list": [
{
"filename": "src/LegendaryDownloadManager.xaml.cs",
"retrieved_chunk": " playniteAPI.MainView.SwitchToLibraryView();\n });\n }\n public DownloadManagerData.Rootobject LoadSavedData()\n {\n var dataDir = LegendaryLibrary.Instance.G... | LegendaryLibrary library, IPlayniteAPI api) : base(library, api)
{ |
{
"list": [
{
"filename": "SemanticXamlPrint.PDF/Extensions/XGraphicsQRCodeExtensions.cs",
"retrieved_chunk": "using PdfSharp.Drawing;\nusing QRCoder;\nusing System;\nusing System.Drawing;\nusing System.IO;\nnamespace SemanticXamlPrint.PDF\n{\n internal static class XGraphicsQRCodeExtensions\n ... | using SemanticXamlPrint.Parser.Components;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.IO;
using System.Linq;
namespace SemanticXamlPrint
{
internal static class GraphicsExtensions
{
public static float DrawComponent(this Graphics g... |
maxLayoutWidth = maxLayoutWidth == 0 ? graphics.VisibleClipBounds.Width : maxLayoutWidth;
//Draw
if (component.Type == typeof(LineBreakComponent))
{
currentY += 3;
}
else if (component.Type == typeof(LineComponent))
{
... | {
"context_start_lineno": 0,
"file": "SemanticXamlPrint/Extensions/GraphicsExtensions.cs",
"groundtruth_start_lineno": 12,
"repository": "swagfin-SemanticXamlPrint-41d87fa",
"right_context_start_lineno": 14,
"task_id": "project_cc_csharp/525"
} | {
"list": [
{
"filename": "SemanticXamlPrint.PDF/Extensions/XGraphicsExtensions.cs",
"retrieved_chunk": " public static class XGraphicsExtensions\n {\n public static float DrawComponent(this XGraphics graphics, IXamlComponent component, ComponentXDrawingFormatting TemplateFormatting, floa... | IXamlComponent component, ComponentDrawingFormatting TemplateFormatting, float currentX, float currentY, float maxLayoutWidth)
{ |
{
"list": [
{
"filename": "objective/objective/objective.Forms/Local/Models/PageModel.cs",
"retrieved_chunk": "namespace objective.Forms.Local.Models\n{\n\t\tpublic partial class PageModel : ObservableBase\n\t\t{\n\t\t\t\t[ObservableProperty]\n\t\t\t\tprivate ObservableCollection<ReportObject> _report... | using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using Jamesnet.Wpf.Controls;
using Jamesnet.Wpf.Mvvm;
using Microsoft.Win32;
using Newtonsoft.Json;
using objective.Core;
using objective.Core.Events;
using objective.Forms.Local.Models;
using objective.Models;
using objective.SampleData;
us... |
[ObservableProperty]
private List<ToolItem> _tools;
[ObservableProperty]
private ObservableCollection<PageModel> pages;
[ObservableProperty]
ObservableCollection<ReportObject> multiObject = new ();
[ObservableProperty]
private List<ToolItem> _subTools;
private readonly IEventAgg... | {
"context_start_lineno": 0,
"file": "objective/objective/objective.Forms/Local/ViewModels/MainContentViewModel.cs",
"groundtruth_start_lineno": 34,
"repository": "jamesnet214-objective-0e60b6f",
"right_context_start_lineno": 35,
"task_id": "project_cc_csharp/476"
} | {
"list": [
{
"filename": "objective/objective/objective.Forms/Local/Models/PageModel.cs",
"retrieved_chunk": "\t\t\t\tpublic ReportModel Save()\n\t\t\t\t{\n\t\t\t\t\t\tReportModel m = new ();\n\t\t\t\t\t\tm.Objects = new ();\n\t\t\t\t\t\tforeach (ReportObject data in ReportSource)\n\t\t\t\t\t\t{\n\t\... | ReportObject _selectedObject; |
{
"list": [
{
"filename": "source/ViewModels/GameCacheViewModel.cs",
"retrieved_chunk": " public TimeSpan InstallEtaTimeSpan { get; private set; }\n public string InstallEta { get; private set; }\n public string CacheRootSpaceAvailable { get; private set; }\n public string ... | using NowPlaying.Utils;
using NowPlaying.Models;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
namespace NowPlaying.ViewModels
{
public class CacheRootViewModel : ObservableObject
{
public readonly GameCacheManagerViewModel manager;
public readonly N... |
this.manager = manager;
this.plugin = manager.plugin;
this.root = root;
this.cachesAggregateSizeOnDisk = 0;
SetMaxFillLevel(root.MaxFillLevel);
UpdateGameCaches();
}
public void UpdateGameCaches()
{
GameCaches... | {
"context_start_lineno": 0,
"file": "source/ViewModels/CacheRootViewModel.cs",
"groundtruth_start_lineno": 30,
"repository": "gittromney-Playnite-NowPlaying-23eec41",
"right_context_start_lineno": 32,
"task_id": "project_cc_csharp/451"
} | {
"list": [
{
"filename": "source/ViewModels/NowPlayingPanelViewModel.cs",
"retrieved_chunk": " public ICommand AddGameCachesCommand { get; private set; }\n public ICommand InstallCachesCommand { get; private set; }\n public ICommand UninstallCachesCommand { get; private set; }\n ... | GameCacheManagerViewModel manager, CacheRoot root)
{ |
{
"list": [
{
"filename": "src/LegendaryLibrarySettingsView.xaml.cs",
"retrieved_chunk": "using System.Windows.Navigation;\nusing System.Windows.Shapes;\nnamespace LegendaryLibraryNS\n{\n /// <summary>\n /// Interaction logic for LegendaryLibrarySettingsView.xaml\n /// </summary>\n public ... | using LegendaryLibraryNS.Enums;
using LegendaryLibraryNS.Models;
using Playnite.Common;
using Playnite.SDK;
using Playnite.SDK.Data;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
u... |
public DownloadManagerData.Rootobject downloadManagerData;
private IPlayniteAPI playniteAPI = API.Instance;
public List<string> requiredThings;
public LegendaryDownloadProperties()
{
InitializeComponent();
LoadSavedData();
}
private Down... | {
"context_start_lineno": 0,
"file": "src/LegendaryDownloadProperties.xaml.cs",
"groundtruth_start_lineno": 27,
"repository": "hawkeye116477-playnite-legendary-plugin-d7af6b2",
"right_context_start_lineno": 28,
"task_id": "project_cc_csharp/521"
} | {
"list": [
{
"filename": "src/LegendaryExcludeOnlineGames.xaml.cs",
"retrieved_chunk": " public partial class LegendaryExcludeOnlineGames : UserControl\n {\n public LegendaryExcludeOnlineGames()\n {\n InitializeComponent();\n Dispatcher.BeginInvoke((Action)((... | DownloadManagerData.Download SelectedDownload => (DownloadManagerData.Download)DataContext; |
{
"list": [
{
"filename": "Ultrapain/Patches/OrbitalStrike.cs",
"retrieved_chunk": " {\n GameObject.Destroy(__instance.blastWave);\n __instance.blastWave = Plugin.explosionWaveKnuckleblaster;\n }\n }\n class Explosion_Collide\n {\n static bool Prefix... | using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
namespace Ultrapain.Patches
{
public static class V2Utils
{
public static Transform GetClosestGrenade()
{
Transform closestTransform = null;
float closestDistance = 1000000;
... |
V2CommonRevolverBulletSharp comp = __instance.GetComponent<V2CommonRevolverBulletSharp>();
if (comp == null)
return true;
if ((__0.gameObject.tag == "Head" || __0.gameObject.tag == "Body" || __0.gameObject.tag == "Limb" || __0.gameObject.tag == "EndLimb") && __0.gam... | {
"context_start_lineno": 0,
"file": "Ultrapain/Patches/V2Common.cs",
"groundtruth_start_lineno": 154,
"repository": "eternalUnion-UltraPain-ad924af",
"right_context_start_lineno": 156,
"task_id": "project_cc_csharp/466"
} | {
"list": [
{
"filename": "Ultrapain/Patches/PlayerStatTweaks.cs",
"retrieved_chunk": " }\n public static void ModifyPumpExplosion(Explosion exp)\n {\n exp.damage = ConfigManager.shotgunGreenExplosionDamage.value;\n exp.playerDamageOverride = ConfigManager.sh... | Projectile __instance, Collider __0)
{ |
{
"list": [
{
"filename": "Assets/Mochineko/RelentStateMachine/TransitionMapBuilder.cs",
"retrieved_chunk": " }\n private TransitionMapBuilder(IState<TEvent, TContext> initialState)\n {\n this.initialState = initialState;\n states.Add(this.initialState);\n ... | #nullable enable
using System;
using System.Collections.Generic;
namespace Mochineko.RelentStateMachine
{
public sealed class StateStore<TContext> : IStateStore<TContext>
{
private readonly IStackState<TContext> initialState;
private readonly IReadOnlyList<IStackState<TContext>> states;
... |
IStackState<TContext> IStateStore<TContext>.Get<TState>()
{
foreach (var state in states)
{
if (state is TState target)
{
return target;
}
}
throw new ArgumentException($"Not found stat... | {
"context_start_lineno": 0,
"file": "Assets/Mochineko/RelentStateMachine/StateStore.cs",
"groundtruth_start_lineno": 19,
"repository": "mochi-neko-RelentStateMachine-64762eb",
"right_context_start_lineno": 21,
"task_id": "project_cc_csharp/532"
} | {
"list": [
{
"filename": "Assets/Mochineko/RelentStateMachine/StateStoreBuilder.cs",
"retrieved_chunk": " private bool disposed = false;\n public static StateStoreBuilder<TContext> Create<TInitialState>()\n where TInitialState : IStackState<TContext>, new()\n {\n ... | IStateStore<TContext>.InitialState
=> initialState; |
{
"list": [
{
"filename": "CloudDistributedLock/CosmosLockClient.cs",
"retrieved_chunk": "using Microsoft.Azure.Cosmos;\nusing System.Net;\nnamespace CloudDistributedLock\n{\n public class CosmosLockClient\n {\n private readonly CloudDistributedLockProviderOptions options;\n priva... | using CloudDistributedLock;
using Microsoft.Azure.Functions.Worker;
using Microsoft.Azure.Functions.Worker.Http;
using System.Net;
namespace ExampleApp
{
public class Functions
{
public const string LockName = "MyLock";
public const string OtherLockName = "OtherLockName";
private reado... |
public Functions(ICloudDistributedLockProviderFactory lockProviderFactory)
{
this.lockProviderFactory = lockProviderFactory;
}
[Function("TryLock")]
public async Task<HttpResponseData> TryLock([HttpTrigger(AuthorizationLevel.Anonymous, "get")] HttpRequestData req)
... | {
"context_start_lineno": 0,
"file": "ExampleApp/Functions.cs",
"groundtruth_start_lineno": 12,
"repository": "briandunnington-CloudDistributedLock-04f72e6",
"right_context_start_lineno": 13,
"task_id": "project_cc_csharp/637"
} | {
"list": [
{
"filename": "CloudDistributedLock/CosmosLockClient.cs",
"retrieved_chunk": " this.options = options;\n this.container = options.CosmosClient!.GetContainer(options.DatabaseName, options.ContainerName);\n }\n public async Task<ItemResponse<LockRecord>?> ... | ICloudDistributedLockProviderFactory lockProviderFactory; |
{
"list": [
{
"filename": "src/ExampleWebApplication/Controllers/WebSocket2Controller.cs",
"retrieved_chunk": "using ExampleWebApplication.WebSocketHubKeys;\nusing Microsoft.AspNetCore.Mvc;\nusing TraTech.WebSocketHub;\nnamespace ExampleWebApplication.Controllers\n{\n [ApiController]\n [Route(\"... | using Microsoft.AspNetCore.Mvc;
using TraTech.WebSocketHub;
namespace ExampleWebApplication.Controllers
{
[ApiController]
[Route("[controller]")]
public class WebSocket1Controller : ControllerBase
{
private readonly |
public WebSocket1Controller(WebSocketHub<int> webSocketHub)
{
_webSocketHub = webSocketHub;
}
[HttpGet("GetSocketList")]
public IActionResult GetSocketList(int id)
{
var socketListOfUser = _webSocketHub.GetSocketList(id);
return Ok(s... | {
"context_start_lineno": 0,
"file": "src/ExampleWebApplication/Controllers/WebSocket1Controller.cs",
"groundtruth_start_lineno": 9,
"repository": "TRA-Tech-dotnet-websocket-9049854",
"right_context_start_lineno": 10,
"task_id": "project_cc_csharp/585"
} | {
"list": [
{
"filename": "src/ExampleWebApplication/Controllers/WebSocket2Controller.cs",
"retrieved_chunk": " public WebSocket2Controller(WebSocketHub<SocketUser> webSocketHub)\n {\n _webSocketHub = webSocketHub;\n }\n [HttpGet(\"GetSocketListWithSelector\")]\n... | WebSocketHub<int> _webSocketHub; |
{
"list": [
{
"filename": "src/Program.cs",
"retrieved_chunk": "using Beeching;\nusing Beeching.Commands;\nusing Beeching.Commands.Interfaces;\nusing Beeching.Helpers;\nusing Beeching.Infrastructure;\nusing Microsoft.Extensions.DependencyInjection;\nusing Spectre.Console;\nusing Spectre.Console.Cli;\... | using Beeching.Commands.Interfaces;
using Spectre.Console;
using Spectre.Console.Cli;
namespace Beeching.Commands
{
internal class AxeCommand : AsyncCommand<AxeSettings>
{
private readonly |
public AxeCommand(IAxe axe)
{
_axe = axe;
}
public override ValidationResult Validate(CommandContext context, AxeSettings settings)
{
if (!string.IsNullOrEmpty(settings.Name) && !string.IsNullOrEmpty(settings.Tag))
{
return V... | {
"context_start_lineno": 0,
"file": "src/Commands/AxeCommand.cs",
"groundtruth_start_lineno": 8,
"repository": "irarainey-beeching-e846af0",
"right_context_start_lineno": 9,
"task_id": "project_cc_csharp/574"
} | {
"list": [
{
"filename": "src/Program.cs",
"retrieved_chunk": " .AddHttpClient(\n \"ArmApi\",\n client =>\n {\n client.BaseAddress = new Uri(Constants.ArmBaseUrl);\n client.DefaultRequestHeaders.Add(\"Accept\", \"application/json\");\n }\n )\n ... | IAxe _axe; |
{
"list": [
{
"filename": "UserManagement.Api/Controllers/RefreshTokensController.cs",
"retrieved_chunk": " {\n private readonly IAuthService _authService;\n private readonly ILogger<AuthenticationController> _logger;\n private readonly IConfiguration _configuration;\n p... | using Microsoft.AspNetCore.Identity;
using Microsoft.IdentityModel.Tokens;
using System.IdentityModel.Tokens.Jwt;
using System.Security.Claims;
using System.Security.Cryptography;
using System.Text;
using UserManagement.Data.Models;
namespace UserManagement.Api.Services
{
public class AuthService : IAuthService
... |
var userExists = await userManager.FindByNameAsync(model.Username);
if (userExists != null)
return (0, "User already exists");
ApplicationUser user = new()
{
Email = model.Email,
SecurityStamp = Guid.NewGuid().ToString(),
... | {
"context_start_lineno": 0,
"file": "UserManagement.Api/Services/AuthService.cs",
"groundtruth_start_lineno": 22,
"repository": "shahedbd-API.RefreshTokens-c4d606e",
"right_context_start_lineno": 24,
"task_id": "project_cc_csharp/591"
} | {
"list": [
{
"filename": "UserManagement.Api/Controllers/RefreshTokensController.cs",
"retrieved_chunk": " _userManager = userManager; \n }\n [HttpPost]\n [Route(\"refresh-token\")]\n public async Task<IActionResult> RefreshToken(GetRefreshTokenViewModel model)\... | RegistrationModel model, string role)
{ |
{
"list": [
{
"filename": "Applets/Applets.cs",
"retrieved_chunk": " }\n });\n }\n #endregion\n #region 获取用户手机号\n /// <summary>\n /// 获取用户手机号\n /// </summary>\n /// <param name=\"code\">手机号获取凭证</param>\n /// <returns></r... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using XiaoFeng;
using FayElf.Plugins.WeChat.OfficialAccount.Model;
/****************************************************************
* Copyright © (2022) www.fayelf.com All Rights Reserved. *
* Au... |
if (buttons == null || buttons.Count == 0)
return new BaseResult
{
ErrCode = 500,
ErrMsg = "数据不能为空."
};
var config = this.Config.GetConfig(WeChatType.OfficeAccount);
return Common.Execute(config.... | {
"context_start_lineno": 0,
"file": "OfficialAccount/Menu.cs",
"groundtruth_start_lineno": 49,
"repository": "zhuovi-FayElf.Plugins.WeChat-5725d1e",
"right_context_start_lineno": 51,
"task_id": "project_cc_csharp/526"
} | {
"list": [
{
"filename": "OfficialAccount/Subscribe.cs",
"retrieved_chunk": " return Common.Execute(config.AppID, config.AppSecret, token =>\n {\n var response = HttpHelper.GetHtml(new HttpRequest\n {\n Method = HttpMethod.Post,\n... | BaseResult CreateMenu(List<ButtonModel> buttons)
{ |
{
"list": [
{
"filename": "Ultrapain/Patches/MaliciousFace.cs",
"retrieved_chunk": " flag.charging = false;\n }\n return true;\n }\n }\n class MaliciousFace_ShootProj_Patch\n {\n /*static bool Prefix(SpiderBody __instance, ref GameObject ___p... | using HarmonyLib;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using UnityEngine;
namespace Ultrapain.Patches
{
public class OrbitalStrikeFlag : MonoBehaviour
{
public CoinChainList chainList;
public bool isOrbitalRay = false;
... |
if ((Coin_ReflectRevolver.coinIsShooting && Coin_ReflectRevolver.shootingCoin != null) || (Time.time - Coin_ReflectRevolver.lastCoinTime <= 0.1f))
{
CoinChainList list = null;
if (Coin_ReflectRevolver.shootingAltBeam != null)
{
... | {
"context_start_lineno": 0,
"file": "Ultrapain/Patches/OrbitalStrike.cs",
"groundtruth_start_lineno": 348,
"repository": "eternalUnion-UltraPain-ad924af",
"right_context_start_lineno": 350,
"task_id": "project_cc_csharp/492"
} | {
"list": [
{
"filename": "Ultrapain/Patches/CommonComponents.cs",
"retrieved_chunk": " if (__state.tempNormal != null)\n GameObject.Destroy(__state.tempNormal);\n if (__state.tempSuper != null)\n GameObject.Destroy(__state.tempSuper);\n }\n ... | GameObject ___breakEffect)
{ |
{
"list": [
{
"filename": "src/Gum/Parser.cs",
"retrieved_chunk": " if (_script.CurrentSituation.Blocks.Count == 1 ||\n (isNested && Block.IsChoice && !Block.Conditional))\n {\n Block? result = _script.CurrentSituation.AddBlock(\n ... | using Gum.Utilities;
using Newtonsoft.Json;
using System.Diagnostics;
namespace Gum.InnerThoughts
{
[DebuggerDisplay("{Name}")]
public class Situation
{
[JsonProperty]
public readonly int Id = 0;
[JsonProperty]
public readonly string Name = string.Empty;
public int... |
Block lastBlock = PeekLastBlock();
if (joinLevel == 0 && playUntil == 1 && lastBlock.PlayUntil == 1 && !lastBlock.NonLinearNode)
{
// Consider this:
// @1 -> Go
//
// @1 Some other dialog with the same indenta... | {
"context_start_lineno": 0,
"file": "src/Gum/InnerThoughts/Situation.cs",
"groundtruth_start_lineno": 101,
"repository": "isadorasophia-gum-032cb2d",
"right_context_start_lineno": 103,
"task_id": "project_cc_csharp/550"
} | {
"list": [
{
"filename": "src/Gum/InnerThoughts/Fact.cs",
"retrieved_chunk": " internal static Fact Weight => new(FactKind.Weight);\n /// <summary>\n /// Creates a fact of type <see cref=\"FactKind.Component\"/>.\n /// </summary>\n internal static Fact Component => ... | Block? AddBlock(int playUntil, int joinLevel, bool isNested, EdgeKind kind = EdgeKind.Next)
{ |
{
"list": [
{
"filename": "Runtime/QuestLog.cs",
"retrieved_chunk": " {\n public List<Quest> curentQuests = new List<Quest>();\n public List<Quest> doneQuest = new List<Quest>();\n public List<Quest> failedQuest = new List<Quest>();\n public int businessDay;\n pub... | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using QuestSystem.SaveSystem;
namespace QuestSystem
{
public class QuestManager
{
public QuestLog misionLog;
public QuestLogSaveData data;
private static QuestManager instance;
pu... |
public bool IsDoned(Quest q) => misionLog.IsDoned(q);
public bool IsFailed(Quest q) => misionLog.IsFailed(q);
public void DonearQuest(Quest q)
{
misionLog.curentQuests.Remove(q);
misionLog.doneQuest.Add(q);
Save();
}
public void S... | {
"context_start_lineno": 0,
"file": "Runtime/QuestManager.cs",
"groundtruth_start_lineno": 56,
"repository": "lluispalerm-QuestSystem-cd836cc",
"right_context_start_lineno": 57,
"task_id": "project_cc_csharp/605"
} | {
"list": [
{
"filename": "Runtime/QuestLog.cs",
"retrieved_chunk": " //Coger el dia\n businessDay = qls.dia;\n //Actualizar currents\n curentQuests = new List<Quest>();\n foreach (QuestSaveData qs in qls.currentQuestSave)\n {\n ... | Quest q) => misionLog.IsCurrent(q); |
{
"list": [
{
"filename": "VSIntelliSenseTweaks/Utilities/BitField64.cs",
"retrieved_chunk": " }\n public static bool operator ==(BitField64 x, BitField64 y) => x.data == y.data;\n public static bool operator !=(BitField64 x, BitField64 y) => x.data != y.data;\n public stat... | /*
Copyright 2023 Carl Foghammar Nömtak
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or ... |
return !HasActiveBlacklistFilter(completionFilters) && HasActiveWhitelistFilter(completionFilters);
}
}
private void AddDebugSuffix(ref VSCompletionItem completion, in CompletionItemKey key)
{
var patternScoreString = key.patternScore == int.MinValue ? "... | {
"context_start_lineno": 0,
"file": "VSIntelliSenseTweaks/CompletionItemManager.cs",
"groundtruth_start_lineno": 561,
"repository": "cfognom-VSIntelliSenseTweaks-4099741",
"right_context_start_lineno": 563,
"task_id": "project_cc_csharp/650"
} | {
"list": [
{
"filename": "VSIntelliSenseTweaks/Utilities/CharKind.cs",
"retrieved_chunk": " flags |= char.IsLetter(c) ? isLetter : default;\n flags |= char.IsUpper(c) ? isUpper : default;\n }\n public bool IsLetter => (flags & isLetter) != 0;\n public bool I... | BitField64 completionFilters)
{ |
{
"list": [
{
"filename": "Assets/ZimGui/Core/UiMesh.cs",
"retrieved_chunk": " quad.V3.Position= lastV2;\n var interSectionX = lastN.x * half;\n var interSectionY = lastN.y * half;\n quad.V1.Position.x = end.x + interSectionX;\n ... | using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Unity.Collections.LowLevel.Unsafe;
using UnityEngine;
namespace ZimGui.Core {
[StructLayout(LayoutKind.Sequential)]
public struct Options {
public byte Size;
public byte Padding0; //TODO use padding... |
V3.UV = V2.UV = V1.UV = V0.UV = quadUV;
V3.Options.Size = V2.Options.Size = V1.Options.Size = V0.Options.Size = 255;
V3.Color = V0.Color = startColor;
V2.Color = V1.Color = endColor;
var p = (end - start).Perpendicular();
var verticalX = p.x * wid... | {
"context_start_lineno": 0,
"file": "Assets/ZimGui/Core/Quad.cs",
"groundtruth_start_lineno": 118,
"repository": "Akeit0-ZimGui-Unity-cc82fb9",
"right_context_start_lineno": 120,
"task_id": "project_cc_csharp/503"
} | {
"list": [
{
"filename": "Assets/ZimGui/Core/UiMesh.cs",
"retrieved_chunk": " quad.V1.Position.x = p1.x+ interSectionX;\n quad.V1.Position.y = p1.y +interSectionY;\n quad.V2.Position.x = p1.x -interSectionX;\n quad.V2.Position.y = p1.y -inte... | UiColor startColor, UiColor endColor,
Vector2 quadUV) { |
{
"list": [
{
"filename": "Assets/Mochineko/FacialExpressions/LipSync/SkinnedMeshLipMorpher.cs",
"retrieved_chunk": "#nullable enable\nusing System.Collections.Generic;\nusing UnityEngine;\nnamespace Mochineko.FacialExpressions.LipSync\n{\n /// <summary>\n /// An implementation of <see cref=\"IL... | #nullable enable
using System.Collections.Generic;
using UnityEngine;
namespace Mochineko.FacialExpressions.LipSync
{
/// <summary>
/// An implementation of <see cref="ILipMorpher"/> to morph lip by <see cref="Animator"/>.
/// </summary>
public sealed class AnimatorLipMorpher : ILipMorpher
{
... |
/// <summary>
/// Creates a new instance of <see cref="AnimatorLipMorpher"/>.
/// </summary>
/// <param name="animator">Target animator.</param>
/// <param name="idMap">Map of viseme to animator float key.</param>
public AnimatorLipMorpher(
Animator animator... | {
"context_start_lineno": 0,
"file": "Assets/Mochineko/FacialExpressions/LipSync/AnimatorLipMorpher.cs",
"groundtruth_start_lineno": 12,
"repository": "mochi-neko-facial-expressions-unity-ab0d020",
"right_context_start_lineno": 13,
"task_id": "project_cc_csharp/547"
} | {
"list": [
{
"filename": "Assets/Mochineko/FacialExpressions/LipSync/SkinnedMeshLipMorpher.cs",
"retrieved_chunk": " private readonly SkinnedMeshRenderer skinnedMeshRenderer;\n private readonly IReadOnlyDictionary<Viseme, int> indexMap;\n /// <summary>\n /// Creates a new ... | Viseme, int> idMap; |
{
"list": [
{
"filename": "Source/TreeifyTask.WpfSample/TaskNodeViewModel.cs",
"retrieved_chunk": "using TreeifyTask;\nusing System.Collections.ObjectModel;\nusing System.ComponentModel;\nnamespace TreeifyTask.Sample\n{\n public class TaskNodeViewModel : INotifyPropertyChanged\n {\n priv... | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
namespace TreeifyTask
{
public class TaskNode : ITaskNode
{
private static Random rnd = new Random();
private readonly List<Task> taskObjects = n... |
private bool hasCustomAction;
private Func<IProgressReporter, CancellationToken, Task> action =
async (rep, tok) => await Task.Yield();
public event ProgressReportingEventHandler Reporting;
private bool seriesRunnerIsBusy;
private bool concurrentRunnerIsBusy;
... | {
"context_start_lineno": 0,
"file": "Source/TreeifyTask/TaskTree/TaskNode.cs",
"groundtruth_start_lineno": 13,
"repository": "intuit-TreeifyTask-4b124d4",
"right_context_start_lineno": 14,
"task_id": "project_cc_csharp/597"
} | {
"list": [
{
"filename": "Source/TreeifyTask.WpfSample/TaskNodeViewModel.cs",
"retrieved_chunk": " public TaskNodeViewModel(ITaskNode baseTaskNode)\n {\n this.baseTaskNode = baseTaskNode;\n PopulateChild(baseTaskNode);\n baseTaskNode.Reporting += BaseTas... | ITaskNode> childTasks = new(); |
{
"list": [
{
"filename": "Assets/Mochineko/FacialExpressions.Extensions/uLipSync/ULipSyncAnimator.cs",
"retrieved_chunk": " /// </summary>\n public sealed class ULipSyncAnimator : IFramewiseLipAnimator, IDisposable\n {\n private readonly FollowingLipAnimator followingLipAnimator;\n ... | #nullable enable
using System.Collections.Generic;
using Mochineko.FacialExpressions.LipSync;
using Mochineko.VOICEVOX_API.QueryCreation;
namespace Mochineko.FacialExpressions.Extensions.VOICEVOX
{
/// <summary>
/// Provides converting from <see cref="AudioQuery"/> to collection of <see cref="LipAnimationFrame... |
// Vowels
["pau"] = Viseme.sil, ["cl"] = Viseme.sil,
["a"] = Viseme.aa, ["A"] = Viseme.aa,
["i"] = Viseme.ih, ["I"] = Viseme.ih,
["u"] = Viseme.ou, ["U"] = Viseme.ou,
["e"] = Viseme.E, ["E"] = Viseme.E,
["o"... | {
"context_start_lineno": 0,
"file": "Assets/Mochineko/FacialExpressions.Extensions/VOICEVOX/AudioQueryConverter.cs",
"groundtruth_start_lineno": 12,
"repository": "mochi-neko-facial-expressions-unity-ab0d020",
"right_context_start_lineno": 15,
"task_id": "project_cc_csharp/542"
} | {
"list": [
{
"filename": "Assets/Mochineko/FacialExpressions.Samples/SampleForULipSyncAndVRM.cs",
"retrieved_chunk": " [SerializeField] private BasicEmotion basicEmotion = BasicEmotion.Neutral;\n [SerializeField] private float emotionWeight = 1f;\n [SerializeField] private float ... | Viseme> VisemeMap
= new Dictionary<string, Viseme>
{ |
{
"list": [
{
"filename": "Functions/GraphNotificationsHub.cs",
"retrieved_chunk": "using Microsoft.Extensions.Options;\nusing Azure.Messaging.EventHubs;\nusing System.Text;\nusing Newtonsoft.Json;\nnamespace GraphNotifications.Functions\n{\n public class GraphNotificationsHub : ServerlessHub\n ... | using GraphNotifications.Models;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using Microsoft.Graph;
namespace GraphNotifications.Services
{
public class GraphNotificationService : IGraphNotificationService
{
private readonly ILogger _logger;
private readonly string _... |
private readonly ICertificateService _certificateService;
public GraphNotificationService(IGraphClientService graphClientService,
ICertificateService certificateService, IOptions<AppSettings> settings, ILogger<GraphNotificationService> logger)
{
_graphClientService = g... | {
"context_start_lineno": 0,
"file": "Services/GraphNotificationService.cs",
"groundtruth_start_lineno": 11,
"repository": "microsoft-GraphNotificationBroker-b1564aa",
"right_context_start_lineno": 12,
"task_id": "project_cc_csharp/651"
} | {
"list": [
{
"filename": "Functions/GraphNotificationsHub.cs",
"retrieved_chunk": " private readonly ICertificateService _certificateService;\n private readonly ICacheService _cacheService;\n private readonly ILogger _logger;\n private readonly AppSettings _settings;\n ... | IGraphClientService _graphClientService; |
{
"list": [
{
"filename": "AssemblyCacheHelper/Utilities.cs",
"retrieved_chunk": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Diagnostics;\nusing System.IO;\nnamespace AssemblyCacheHelper\n{\n public class Utilities\n {",
"score":... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AssemblyCacheHelper.DTO;
using System.Threading;
using System.Threading.Tasks;
using System.Resources;
namespace AssemblyCacheHelper
{
using System.IO;
using System.Reflection;
using System.Diagnostics;
using Sy... |
public static List<NetAssembly> NetAssemblyCache
{
get
{
if (_netAssemblyCache.Count() == 0)
{
if (File.Exists("NetAssemblyCache.xml"))
{
StreamReader sr = new StreamReader("NetAsse... | {
"context_start_lineno": 0,
"file": "AssemblyCacheHelper/NetAssemblies.cs",
"groundtruth_start_lineno": 18,
"repository": "peterbaccaro-assembly-cache-explorer-a5dae15",
"right_context_start_lineno": 19,
"task_id": "project_cc_csharp/586"
} | {
"list": [
{
"filename": "AssemblyCacheHelper/Utilities.cs",
"retrieved_chunk": " public static string RunProcess(string exePath, string arguments)\n {\n string result = \"\";\n Process process = new Process();\n process.StartInfo.FileName = exePath;\n ... | NetAssembly> _netAssemblyCache = new List<NetAssembly>(); |
{
"list": [
{
"filename": "source/ViewModels/InstallProgressViewModel.cs",
"retrieved_chunk": " private string formatStringCopyingFile;\n private string formatStringCopyingFilePfr;\n private string formatStringXofY;\n private string formatStringFilesAndBytes;\n priva... | using NowPlaying.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
namespace NowPlaying.ViewModels
{
public class TopPanelViewModel : ViewModelBase
{
public enum Mode { Processing, Enable, Uninstall, Install, SlowInstall };
private readonly NowPlaying plugin;
... |
private bool isSlowInstall;
private int cachesToInstall;
private int cachesInstalled;
private long totalBytesToInstall;
private long totalBytesInstalled;
private TimeSpan queuedInstallEta;
private LinkedList<string> processingMessage;
public bool IsProce... | {
"context_start_lineno": 0,
"file": "source/ViewModels/TopPanelViewModel.cs",
"groundtruth_start_lineno": 21,
"repository": "gittromney-Playnite-NowPlaying-23eec41",
"right_context_start_lineno": 22,
"task_id": "project_cc_csharp/505"
} | {
"list": [
{
"filename": "source/ViewModels/InstallProgressViewModel.cs",
"retrieved_chunk": " private string copiedFilesOfFiles;\n private string copiedBytesOfBytes;\n private string currentFile;\n private long currentFileSize;\n private bool partialFileResume;... | GameCacheViewModel nowInstallingCache; |
{
"list": [
{
"filename": "src/OGXbdmDumper/KernelExports.cs",
"retrieved_chunk": "using PeNet.Header.Pe;\nnamespace OGXbdmDumper\n{\n /// <summary>\n /// TODO: description\n /// </summary>\n public class KernelExports\n {\n private ExportFunction[] _functions;\n private ... | using Serilog;
namespace OGXbdmDumper
{
public class ScratchBuffer
{
private bool _hasScratchReassigned;
private Xbox _xbox;
public |
public ScratchBuffer(Xbox xbox)
{
_xbox = xbox ?? throw new ArgumentNullException(nameof(xbox));
// get the xbdm reloc section info to be used as a scratch buffer
var xbdm = xbox.Modules.Find(m => m.Name == "xbdm.dll") ?? throw new DllNotFoundException("xbdm.dll")... | {
"context_start_lineno": 0,
"file": "src/OGXbdmDumper/ScratchBuffer.cs",
"groundtruth_start_lineno": 8,
"repository": "Ernegien-OGXbdmDumper-07a1e82",
"right_context_start_lineno": 9,
"task_id": "project_cc_csharp/640"
} | {
"list": [
{
"filename": "src/OGXbdmDumper/KernelExports.cs",
"retrieved_chunk": " #region Exports\n /// <summary>\n /// \n /// </summary>\n public long HalReadSMBusValue { get; }\n /// <summary>\n /// \n /// </summary>\n public long NtCl... | MemoryRegion Region; |
{
"list": [
{
"filename": "Ultrapain/Patches/Parry.cs",
"retrieved_chunk": " {\n static bool Prefix(Grenade __instance, ref bool __2, ref bool __1, ref bool ___exploded)\n {\n GrenadeParriedFlag flag = __instance.GetComponent<GrenadeParriedFlag>();\n if (flag == ... | using HarmonyLib;
using Sandbox;
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine.AI;
namespace Ultrapain.Patches
{
class MinosPrimeCharge
{
static GameObject decoy;
public static void CreateDecoy()
{
if (decoy != null ... |
if (UnityEngine.Random.Range(0, 99.9f) > ConfigManager.minosPrimeCrushAttackChance.value)
return true;
___previouslyRiderKicked = true;
Vector3 vector = MonoSingleton<PlayerTracker>.Instance.PredictPlayerPosition(0.5f);
Transform target = MonoSingleton<... | {
"context_start_lineno": 0,
"file": "Ultrapain/Patches/MinosPrime.cs",
"groundtruth_start_lineno": 267,
"repository": "eternalUnion-UltraPain-ad924af",
"right_context_start_lineno": 269,
"task_id": "project_cc_csharp/524"
} | {
"list": [
{
"filename": "Ultrapain/Patches/Cerberus.cs",
"retrieved_chunk": " {\n CerberusFlag flag = __instance.GetComponent<CerberusFlag>();\n if (flag == null)\n return true;\n if (___eid.hitter != \"punch\" && ___eid.hitter != \"shotgunzone\... | MinosPrime __instance, ref bool ___previouslyRiderKicked)
{ |
{
"list": [
{
"filename": "ProcessManager/Models/Configs/LassoProfile.cs",
"retrieved_chunk": " public string AffinityMaskHex { get; set; }\n /// <summary>\n /// Delay in milliseconds for setting profile.\n /// </summary>\n public int DelayMS { get; set; }\n /... | using LassoProcessManager.Models.Rules;
namespace ProcessManager.Models.Configs
{
public class ManagerConfig
{
/// <summary>
/// Indicates to auto apply default profile for processes when no profiles are assigned.
/// </summary>
public bool AutoApplyDefaultProfile { get; set; }
... | get; set; }
/// <summary>
/// List of process rules.
/// </summary>
public ProcessRule[] ProcessRules { get; set; }
/// <summary>
/// List of folders rules.
/// </summary>
public FolderRule[] FolderRules { get; set; }
}
}
| {
"context_start_lineno": 0,
"file": "ProcessManager/Models/Configs/ManagerConfig.cs",
"groundtruth_start_lineno": 19,
"repository": "kenshinakh1-LassoProcessManager-bcc481f",
"right_context_start_lineno": 20,
"task_id": "project_cc_csharp/686"
} | {
"list": [
{
"filename": "ProcessManager/Models/Configs/LassoProfile.cs",
"retrieved_chunk": " {\n if (affinityMask == 0)\n {\n affinityMask = Convert.ToUInt64(AffinityMaskHex, 16);\n }\n return affinityMask;\n }\n }\n}",
... | LassoProfile[] Profiles { |
{
"list": [
{
"filename": "Editor/AASEmulatorRuntimeEditor.cs",
"retrieved_chunk": "using System;\nusing NAK.AASEmulator.Runtime;\nusing UnityEditor;\nusing UnityEngine;\nusing static NAK.AASEmulator.Editor.EditorExtensions;\nusing static NAK.AASEmulator.Runtime.AASEmulatorRuntime;\nnamespace NAK.AAS... | using NAK.AASEmulator.Runtime;
using UnityEditor;
using UnityEngine;
using static ABI.CCK.Scripts.CVRAdvancedSettingsEntry;
using static NAK.AASEmulator.Runtime.AASEmulatorRuntime;
using static NAK.AASEmulator.Runtime.AASMenu;
namespace NAK.AASEmulator.Editor
{
[CustomEditor(typeof(AASMenu))]
public class AASM... |
#endregion
#region Unity / GUI Methods
private void OnEnable()
{
OnRequestRepaint -= Repaint;
OnRequestRepaint += Repaint;
_targetScript = (AASMenu)target;
}
private void OnDisable() => OnRequestRepaint -= Repaint;
public o... | {
"context_start_lineno": 0,
"file": "Editor/AASMenuEditor.cs",
"groundtruth_start_lineno": 14,
"repository": "NotAKidOnSteam-AASEmulator-aacd289",
"right_context_start_lineno": 15,
"task_id": "project_cc_csharp/668"
} | {
"list": [
{
"filename": "Editor/AASEmulatorRuntimeEditor.cs",
"retrieved_chunk": " {\n #region Variables\n private GUIStyle _boldFoldoutStyle;\n private AASEmulatorRuntime _targetScript;\n #endregion\n #region Unity / GUI Methods\n private void OnEnable()... | AASMenu _targetScript; |
{
"list": [
{
"filename": "Ultrapain/Patches/GabrielSecond.cs",
"retrieved_chunk": " chaosRemaining -= 1;\n CancelInvoke(\"CallChaoticAttack\");\n Invoke(\"CallChaoticAttack\", delay);\n }\n static MethodInfo BasicCombo = typeof(GabrielSecond).GetMethod(\... | using HarmonyLib;
using System.Reflection;
using UnityEngine;
namespace Ultrapain.Patches
{
class Mindflayer_Start_Patch
{
static void Postfix(Mindflayer __instance, ref EnemyIdentifier ___eid)
{
__instance.gameObject.AddComponent<MindflayerPatch>();
//___eid.SpeedBuff()... |
__state = __0.gameObject.layer;
return true;
}
static void Postfix(SwingCheck2 __instance, Collider __0, int __state)
{
if (__0.tag == "Player")
Debug.Log($"Collision with {__0.name} with tag {__0.tag} and layer {__state}");
if (_... | {
"context_start_lineno": 0,
"file": "Ultrapain/Patches/Mindflayer.cs",
"groundtruth_start_lineno": 101,
"repository": "eternalUnion-UltraPain-ad924af",
"right_context_start_lineno": 103,
"task_id": "project_cc_csharp/511"
} | {
"list": [
{
"filename": "Ultrapain/Patches/GabrielSecond.cs",
"retrieved_chunk": " if (UnityEngine.Random.Range(0, 100) <= teleportChance)\n {\n Debug.Log(\"Attemted teleport\");\n comp.Teleport(false, false, true, false, false);\n t... | Collider __0, out int __state)
{ |
{
"list": [
{
"filename": "Assets/Mochineko/RelentStateMachine/FiniteStateMachine.cs",
"retrieved_chunk": " private readonly ITransitionMap<TEvent, TContext> transitionMap;\n public TContext Context { get; }\n private IState<TEvent, TContext> currentState;\n public bool IsC... | #nullable enable
using System;
using System.Collections.Generic;
using System.Threading;
using Cysharp.Threading.Tasks;
using Mochineko.Relent.Result;
namespace Mochineko.RelentStateMachine
{
public sealed class StackStateMachine<TContext>
: IStackStateMachine<TContext>
{
private readonly IStat... |
private PopToken(StackStateMachine<TContext> publisher)
{
this.publisher = publisher;
}
public async UniTask<IResult> PopAsync(CancellationToken cancellationToken)
{
if (popped)
{
throw new... | {
"context_start_lineno": 0,
"file": "Assets/Mochineko/RelentStateMachine/StackStateMachine.cs",
"groundtruth_start_lineno": 106,
"repository": "mochi-neko-RelentStateMachine-64762eb",
"right_context_start_lineno": 108,
"task_id": "project_cc_csharp/603"
} | {
"list": [
{
"filename": "Assets/Mochineko/RelentStateMachine/FiniteStateMachine.cs",
"retrieved_chunk": " private const float DefaultSemaphoreTimeoutSeconds = 30f;\n public static async UniTask<FiniteStateMachine<TEvent, TContext>> CreateAsync(\n ITransitionMap<TEvent, TCont... | IPopToken Publish(StackStateMachine<TContext> publisher)
=> new PopToken(publisher); |
{
"list": [
{
"filename": "src/CsvParsing/CsvReader.cs",
"retrieved_chunk": "// ReSharper disable once RedundantUsingDirective\nusing System.Collections.Generic; // can't alias\nnamespace CsvParsing\n{\n public class CsvReader\n {\n private readonly TextReaderWhichIgnoresReturnCarrier _... | // ReSharper disable once RedundantUsingDirective
using System.Collections.Generic; // can't alias
namespace CsvParsing
{
public class CsvDictionaryReader
{
private readonly |
private List<string>? _header;
private Dictionary<string, string>? _dictionary;
public CsvDictionaryReader(CsvReader reader)
{
_reader = reader;
}
/**
* <summary>Read the header from the reader.</summary>
* <returns>Error, if any.</return... | {
"context_start_lineno": 0,
"file": "src/CsvParsing/CsvDictionaryReader.cs",
"groundtruth_start_lineno": 7,
"repository": "aas-core-works-aas-core3.0-cli-swiss-knife-eb9a3ef",
"right_context_start_lineno": 8,
"task_id": "project_cc_csharp/474"
} | {
"list": [
{
"filename": "src/CsvParsing/CsvReader.cs",
"retrieved_chunk": " }\n private (string?, string?) ReadQuotedCell()\n {\n // Pre-condition\n if (_reader.Peek() != '\"')\n {\n throw new System.InvalidOperationException(\n ... | CsvReader _reader; |
{
"list": [
{
"filename": "Runtime/Core/Internal/FuncFlux.cs",
"retrieved_chunk": " /// <summary>\n /// A dictionary that stores functions with no parameters and a return value of type `TReturn`.\n /// </summary>\n internal readonly Dictionary<TKey, Func<TReturn>> dictionar... | /*
Copyright (c) 2023 Xavier Arpa López Thomas Peter ('Kingdox')
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, ... |
if(dictionary.TryGetValue(key, out var values))
{
if (condition) dictionary[key] += func;
else
{
values -= func;
if (values is null) dictionary.Remove(key);
else dictionary[key] = values;... | {
"context_start_lineno": 0,
"file": "Runtime/Core/Internal/FuncFluxParam.cs",
"groundtruth_start_lineno": 42,
"repository": "xavierarpa-UniFlux-a2d46de",
"right_context_start_lineno": 44,
"task_id": "project_cc_csharp/560"
} | {
"list": [
{
"filename": "Runtime/Core/Internal/FuncFlux.cs",
"retrieved_chunk": " if(dictionary.TryGetValue(key, out var values))\n {\n if (condition) dictionary[key] += func;\n else\n {\n values -= func;\n ... | IStore<TKey, Func<TParam, TReturn>>.Store(in bool condition, TKey key, Func<TParam, TReturn> func)
{ |
{
"list": [
{
"filename": "src/dotnetdev-badge/dotnetdev-badge.web/Model/UserSummary.cs",
"retrieved_chunk": " public int TopicsEntered { get; set; }\n [JsonProperty(\"posts_read_count\")]\n public int PostsReadCount { get; set; }\n [JsonProperty(\"days_visited\")]\n ... | using DotNetDevBadgeWeb.Common;
using Newtonsoft.Json;
namespace DotNetDevBadgeWeb.Model
{
public class User
{
private const int AVATAR_SIZE = 128;
[JsonProperty("id")]
public int Id { get; set; }
[JsonProperty("username")]
public string Username { get; set; }
... | get; set; }
[JsonProperty("trust_level")]
public int TrustLevel { get; set; }
[JsonProperty("admin")]
public bool? Admin { get; set; }
[JsonProperty("moderator")]
public bool? Moderator { get; set; }
public ELevel Level => TrustLevel switch
{
... | {
"context_start_lineno": 0,
"file": "src/dotnetdev-badge/dotnetdev-badge.web/Model/User.cs",
"groundtruth_start_lineno": 22,
"repository": "chanos-dev-dotnetdev-badge-5740a40",
"right_context_start_lineno": 24,
"task_id": "project_cc_csharp/682"
} | {
"list": [
{
"filename": "src/dotnetdev-badge/dotnetdev-badge.web/Model/UserSummary.cs",
"retrieved_chunk": " public int TimeRead { get; set; }\n [JsonProperty(\"recent_time_read\")]\n public int RecentTimeRead { get; set; }\n [JsonProperty(\"bookmark_count\")]\n pu... | JsonProperty("flair_name")]
public object FlairName { |
{
"list": [
{
"filename": "Canvas.Library/Models/Student.cs",
"retrieved_chunk": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nnamespace Canvas.CLI.Models\n{\n public class Student\n {\n public int Id { get; set;... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Canvas.CLI.Models
{
public class Course
{
public int Id { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public Lis... | get; set; }
}
}
| {
"context_start_lineno": 0,
"file": "Canvas.Library/Models/Course.cs",
"groundtruth_start_lineno": 13,
"repository": "crmillsfsu-Canvas_Su2023-bcfeccd",
"right_context_start_lineno": 14,
"task_id": "project_cc_csharp/663"
} | {
"list": [
{
"filename": "Canvas.Library/Models/Student.cs",
"retrieved_chunk": " public string Name { get; set; }\n public Student()\n {\n Name = string.Empty;\n }\n public override string ToString()\n {\n return $\"{Id}. {Name}\";\n ... | Student> Roster { |
{
"list": [
{
"filename": "Ultrapain/Patches/Panopticon.cs",
"retrieved_chunk": " }\n }\n return code.AsEnumerable();\n }\n }\n}",
"score": 20.13283643306795
},
{
"filename": "Ultrapain/Patches/V2Common.cs",
"retrieved_chunk": " ... | using HarmonyLib;
using Mono.Cecil;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Reflection.Emit;
using System.Text;
using UnityEngine;
namespace Ultrapain.Patches
{
/*
u = initial, f = final, d = delta, s = speed multiplier
u = 40f * Time.deltaT... |
if (shotgun.variation == 0)
{
proj.damage = ConfigManager.shotgunBlueDamagePerPellet.value;
}
else
{
if (primaryCharge == 0)
proj.damage = ConfigManager.shotgunGreenPump1Damage.value;
else if... | {
"context_start_lineno": 0,
"file": "Ultrapain/Patches/PlayerStatTweaks.cs",
"groundtruth_start_lineno": 145,
"repository": "eternalUnion-UltraPain-ad924af",
"right_context_start_lineno": 147,
"task_id": "project_cc_csharp/538"
} | {
"list": [
{
"filename": "Ultrapain/Patches/Panopticon.cs",
"retrieved_chunk": " }\n }\n return code.AsEnumerable();\n }\n }\n}",
"score": 20.13283643306795
},
{
"filename": "Ultrapain/ILUtils.cs",
"retrieved_chunk": " pu... | Projectile proj, Shotgun shotgun, int primaryCharge)
{ |
{
"list": [
{
"filename": "Ultrapain/Patches/PlayerStatTweaks.cs",
"retrieved_chunk": " if (localIndex.Equals(normalBeamLocalIndex))\n {\n Debug.Log($\"Patching normal beam\");\n i += 1;\n code.I... | using HarmonyLib;
using System;
using System.Collections.Generic;
using System.Reflection.Emit;
using System.Text;
using UnityEngine;
namespace Ultrapain
{
public static class ILUtils
{
public static string TurnInstToString(CodeInstruction inst)
{
return $"{inst.opcode}{(inst.operan... |
if (localIndex == 0)
return new CodeInstruction(OpCodes.Ldloc_0);
if (localIndex == 1)
return new CodeInstruction(OpCodes.Ldloc_1);
if (localIndex == 2)
return new CodeInstruction(OpCodes.Ldloc_2);
if (localIndex == 3)
... | {
"context_start_lineno": 0,
"file": "Ultrapain/ILUtils.cs",
"groundtruth_start_lineno": 31,
"repository": "eternalUnion-UltraPain-ad924af",
"right_context_start_lineno": 33,
"task_id": "project_cc_csharp/537"
} | {
"list": [
{
"filename": "Ultrapain/Patches/PlayerStatTweaks.cs",
"retrieved_chunk": " {\n Debug.Log($\"Patching super beam\");\n i += 1;\n code.Insert(i, ILUtils.LoadLocalInstruction(localIndex));\n ... | CodeInstruction LoadLocalInstruction(int localIndex)
{ |
{
"list": [
{
"filename": "Ultrapain/Patches/V2Second.cs",
"retrieved_chunk": " public class V2SecondFlag : MonoBehaviour\n {\n public V2RocketLauncher rocketLauncher;\n public V2MaliciousCannon maliciousCannon;\n public Collider v2collider;\n public Transform targetG... | using HarmonyLib;
using UnityEngine;
namespace Ultrapain.Patches
{
class Virtue_Start_Patch
{
static void Postfix(Drone __instance, ref EnemyIdentifier ___eid)
{
VirtueFlag flag = __instance.gameObject.AddComponent<VirtueFlag>();
flag.virtue = __instance;
}
}... |
private EnemyIdentifier eid;
public Drone virtue;
public void Awake()
{
eid = GetComponent<EnemyIdentifier>();
ligtningBoltAud = Instantiate(Plugin.lighningBoltSFX, transform);
lighningBoltSFX = ligtningBoltAud.GetComponent<AudioSource>();
}
... | {
"context_start_lineno": 0,
"file": "Ultrapain/Patches/Virtue.cs",
"groundtruth_start_lineno": 30,
"repository": "eternalUnion-UltraPain-ad924af",
"right_context_start_lineno": 31,
"task_id": "project_cc_csharp/546"
} | {
"list": [
{
"filename": "Ultrapain/Patches/CommonComponents.cs",
"retrieved_chunk": " if (rend != null)\n rend.enabled = true;\n if (rb != null)\n {\n rb.isKinematic = kinematic;\n rb.detectCollisions = colDetect;\n ... | Transform windupObj; |
{
"list": [
{
"filename": "IndexDb.Example/Models/Person.cs",
"retrieved_chunk": "using Magic.IndexedDb;\nusing Magic.IndexedDb.SchemaAnnotations;\nnamespace IndexDb.Example\n{\n [MagicTable(\"Person\", DbNames.Client)]\n public class Person\n {\n [MagicPrimaryKey(\"id\")]\n pu... | using Magic.IndexedDb.Models;
using System;
namespace IndexDb.Example.Pages
{
public partial class Index
{
private List<Person> allPeople { get; set; } = new List<Person>();
private IEnumerable< | get; set; } = Enumerable.Empty<Person>();
private double storageQuota { get; set; }
private double storageUsage { get; set; }
protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (firstRender)
{
try
{
... | {
"context_start_lineno": 0,
"file": "IndexDb.Example/Pages/Index.razor.cs",
"groundtruth_start_lineno": 9,
"repository": "magiccodingman-Magic.IndexedDb-a279d6d",
"right_context_start_lineno": 10,
"task_id": "project_cc_csharp/629"
} | {
"list": [
{
"filename": "IndexDb.Example/Models/Person.cs",
"retrieved_chunk": " public string Name { get; set; }\n [MagicIndex(\"Age\")]\n public int _Age { get; set; }\n [MagicIndex]\n public int TestInt { get; set; }\n [MagicUniqueIndex(\"guid\")]\n ... | Person> WhereExample { |
{
"list": [
{
"filename": "LibreDteDotNet.RestRequest/Services/BoletaService.cs",
"retrieved_chunk": " new KeyValuePair<string, string>(\"AREA\", \"P\")\n }\n )\n }\n )!;\n return await msg.Conten... | using System.Net;
using LibreDteDotNet.Common;
using LibreDteDotNet.RestRequest.Infraestructure;
using LibreDteDotNet.RestRequest.Interfaces;
using Microsoft.Extensions.Configuration;
namespace LibreDteDotNet.RestRequest.Services
{
internal class ContribuyenteService : ComunEnum, IContribuyente
{
pri... |
HttpStatCode = await repositoryWeb.Conectar(Properties.Resources.UrlConsultaRut);
return this;
}
}
}
| {
"context_start_lineno": 0,
"file": "LibreDteDotNet.RestRequest/Services/ContribuyenteService.cs",
"groundtruth_start_lineno": 42,
"repository": "sergiokml-LibreDteDotNet.RestRequest-6843109",
"right_context_start_lineno": 44,
"task_id": "project_cc_csharp/617"
} | {
"list": [
{
"filename": "LibreDteDotNet.RestRequest/Services/FolioCafService.cs",
"retrieved_chunk": " \"COD_DOCTO\",\n ((int)tipodoc).ToString()\n ),\n new KeyValuePair<string, string... | IContribuyente> SetCookieCertificado()
{ |
{
"list": [
{
"filename": "LibreDteDotNet.RestRequest/Models/Request/ReqLibroDetalle.cs",
"retrieved_chunk": "using System.Text.Json.Serialization;\nnamespace LibreDteDotNet.RestRequest.Models.Request\n{\n public class ReqLibroDetalle\n {\n [JsonPropertyName(\"metaData\")]\n publi... | using System.Text.Json.Serialization;
namespace LibreDteDotNet.RestRequest.Models.Request
{
internal class ReqLibroResumen
{
// Root myDeserializedClass = JsonSerializer.Deserialize<Root>(myJsonResponse);
[JsonPropertyName("metaData")]
public ReqMetaDataLibroResumen? MetaData { get; se... | get; set; }
public ReqLibroResumen(ReqMetaDataLibroResumen? metaData, ReqDataLibroResumen? data)
{
MetaData = metaData;
Data = data;
}
}
}
| {
"context_start_lineno": 0,
"file": "LibreDteDotNet.RestRequest/Models/Request/ReqLibroResumen.cs",
"groundtruth_start_lineno": 12,
"repository": "sergiokml-LibreDteDotNet.RestRequest-6843109",
"right_context_start_lineno": 13,
"task_id": "project_cc_csharp/627"
} | {
"list": [
{
"filename": "LibreDteDotNet.RestRequest/Models/Request/ReqLibroDetalle.cs",
"retrieved_chunk": " {\n MetaData = metaData;\n Data = data;\n }\n }\n}",
"score": 42.948167096412696
},
{
"filename": "LibreDteDotNet.RestRequest/Models... | ReqDataLibroResumen? Data { |
{
"list": [
{
"filename": "src/dotnetdev-badge/dotnetdev-badge.web/Endpoints/Badge/BadgeEndpoints.cs",
"retrieved_chunk": " {\n app.UseMiddleware<BadgeIdValidatorMiddleware>();\n app.MapBadgeEndpointsV1();\n return app;\n }\n internal static WebApp... | namespace DotNetDevBadgeWeb.Middleware
{
public class BadgeIdValidatorMiddleware
{
private readonly RequestDelegate _next;
public BadgeIdValidatorMiddleware(RequestDelegate next)
{
_next = next;
}
public async |
if (context.Request.Query.ContainsKey("id"))
{
string id = context.Request.Query["id"].ToString();
if (id.Length > 20)
{
context.Response.StatusCode = StatusCodes.Status400BadRequest;
await context.Response... | {
"context_start_lineno": 0,
"file": "src/dotnetdev-badge/dotnetdev-badge.web/Middleware/BadgeIdValidatorMiddleware.cs",
"groundtruth_start_lineno": 11,
"repository": "chanos-dev-dotnetdev-badge-5740a40",
"right_context_start_lineno": 13,
"task_id": "project_cc_csharp/714"
} | {
"list": [
{
"filename": "src/dotnetdev-badge/dotnetdev-badge.web/Core/MeasureText/MeasureTextV1.cs",
"retrieved_chunk": " public MeasureTextV1()\n {\n SPECIFIC_CHAR_WIDTH = new()\n {\n { '_', 4.150390625f },\n { '-', 4.072265625f },... | Task InvokeAsync(HttpContext context)
{ |
{
"list": [
{
"filename": "Ultrapain/Patches/DruidKnight.cs",
"retrieved_chunk": " }\n static void Postfix(Mandalore __instance, StateInfo __state)\n {\n __instance.fullAutoProjectile = __state.oldProj;\n if (__state.tempProj != null)\n GameObj... | using HarmonyLib;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Reflection.Emit;
using System.Text;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.UIElements;
namespace Ultrapain.Patches
{
class Panopticon_Start
{
... |
if (!instance.altVersion || !ConfigManager.panopticonBlueProjToggle.value)
return;
int count = ConfigManager.panopticonBlueProjCount.value;
float deltaAngle = 360f / (count + 1);
float currentAngle = deltaAngle;
for (int i = 0; i < count; i+... | {
"context_start_lineno": 0,
"file": "Ultrapain/Patches/Panopticon.cs",
"groundtruth_start_lineno": 252,
"repository": "eternalUnion-UltraPain-ad924af",
"right_context_start_lineno": 254,
"task_id": "project_cc_csharp/554"
} | {
"list": [
{
"filename": "Ultrapain/Patches/OrbitalStrike.cs",
"retrieved_chunk": " static bool Prefix(Cannonball __instance, GameObject ___interruptionExplosion, ref GameObject ___breakEffect)\n {\n if ((Coin_ReflectRevolver.coinIsShooting && Coin_ReflectRevolver.shootingCoi... | FleshPrison instance)
{ |
{
"list": [
{
"filename": "src/SQLServerCoverageLib/Trace/TraceControllerBuilder.cs",
"retrieved_chunk": "using System;\nusing SQLServerCoverage.Gateway;\nusing SQLServerCoverage.Objects;\nusing SQLServerCoverage.Source;\nnamespace SQLServerCoverage.Trace\n{\n class TraceControllerBuilder\n {\n ... | using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Threading;
using SQLServerCoverage.Gateway;
using SQLServerCoverage.Source;
using SQLServerCoverage.Trace;
namespace SQLServerCoverage
{
public class CodeCoverage
{
private const i... |
private readonly string _databaseName;
private readonly bool _debugger;
private readonly TraceControllerType _traceType;
private readonly List<string> _excludeFilter;
private readonly bool _logging;
private readonly SourceGateway _source;
private CoverageResult _... | {
"context_start_lineno": 0,
"file": "src/SQLServerCoverageLib/CodeCoverage.cs",
"groundtruth_start_lineno": 15,
"repository": "sayantandey-SQLServerCoverage-aea57e3",
"right_context_start_lineno": 16,
"task_id": "project_cc_csharp/670"
} | {
"list": [
{
"filename": "src/SQLServerCoverageLib/Trace/AzureTraceController.cs",
"retrieved_chunk": "ADD EVENT sqlserver.sp_statement_starting(action (sqlserver.plan_handle, sqlserver.tsql_stack) where ([sqlserver].[database_id]=({1})))\nadd target package0.ring_buffer(set max_memory = 500\n) /* no... | DatabaseGateway _database; |
{
"list": [
{
"filename": "BlockadeLabs/Packages/com.rest.blockadelabs/Runtime/Skyboxes/SkyboxInfo.cs",
"retrieved_chunk": " [JsonProperty(\"error_message\")]\n public string ErrorMessage { get; set; }\n public override string ToString() => JsonConvert.SerializeObject(this, Format... | // Licensed under the MIT License. See LICENSE in the project root for license information.
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using UnityEngine;
using UnityEngine.Scripting;
using Utilities.WebRequestRest;
name... |
var formData = new WWWForm();
formData.AddField("prompt", skyboxRequest.Prompt);
if (!string.IsNullOrWhiteSpace(skyboxRequest.NegativeText))
{
formData.AddField("negative_text", skyboxRequest.NegativeText);
}
if (skyboxRequest.Se... | {
"context_start_lineno": 0,
"file": "BlockadeLabs/Packages/com.rest.blockadelabs/Runtime/Skyboxes/SkyboxEndpoint.cs",
"groundtruth_start_lineno": 76,
"repository": "RageAgainstThePixel-com.rest.blockadelabs-aa2142f",
"right_context_start_lineno": 78,
"task_id": "project_cc_csharp/694"
} | {
"list": [
{
"filename": "BlockadeLabs/Packages/com.rest.blockadelabs/Runtime/Skyboxes/SkyboxInfo.cs",
"retrieved_chunk": " var downloadTasks = new List<Task>(2)\n {\n Task.Run(async () =>\n {\n if (!string.IsNullOrWhiteSpace(Thum... | SkyboxInfo> GenerateSkyboxAsync(SkyboxRequest skyboxRequest, int? pollingInterval = null, CancellationToken cancellationToken = default)
{ |
{
"list": [
{
"filename": "src/Gum/InnerThoughts/Situation.cs",
"retrieved_chunk": " }\n private void AssignOwnerToEdge(int id, Edge edge)\n {\n Edges.Add(id, edge);\n edge.Owner = id;\n // Track parents.\n foreach (int block in edge.Blo... | using Newtonsoft.Json;
namespace Gum.InnerThoughts
{
public class CharacterScript
{
/// <summary>
/// List of tasks or events that the <see cref="Situations"/> may do.
/// </summary>
[JsonProperty]
private readonly SortedList<int, Situation> _situations = new();
... |
if (_situations.TryGetValue(id, out Situation? value))
{
return value;
}
return null;
}
public int? FetchSituationId(string name)
{
if (_situationNames.TryGetValue(name, out int id))
{
retu... | {
"context_start_lineno": 0,
"file": "src/Gum/InnerThoughts/CharacterScript.cs",
"groundtruth_start_lineno": 45,
"repository": "isadorasophia-gum-032cb2d",
"right_context_start_lineno": 47,
"task_id": "project_cc_csharp/655"
} | {
"list": [
{
"filename": "src/Gum/InnerThoughts/Situation.cs",
"retrieved_chunk": " /// Given C and D:\n /// Before:\n /// A D\n /// / \\\n /// B C \n /// \n /// D\n /// After:\n /// A C\n /// / \\",
... | Situation? FetchSituation(int id)
{ |
{
"list": [
{
"filename": "src/RosettaStone.Core/Services/VendorMetadataService.cs",
"retrieved_chunk": " _ORM.GetColumnName<VendorMetadata>(nameof(VendorMetadata.Id)),\n OperatorEnum.GreaterThan,\n 0);\n expr.PrependAnd(\n _ORM.Ge... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ExpressionTree;
using FindClosestString;
using SyslogLogging;
using Watson.ORM;
using static Mysqlx.Expect.Open.Types.Condition.Types;
namespace RosettaStone.Core.Services
{
public class CodecM... |
if (String.IsNullOrEmpty(key)) throw new ArgumentNullException(nameof(key));
key = key.ToUpper();
Expr expr = new Expr(
_ORM.GetColumnName<CodecMetadata>(nameof(CodecMetadata.Key)),
OperatorEnum.Equals,
key);
expr.Prepen... | {
"context_start_lineno": 0,
"file": "src/RosettaStone.Core/Services/CodecMetadataService.cs",
"groundtruth_start_lineno": 72,
"repository": "jchristn-RosettaStone-898982c",
"right_context_start_lineno": 74,
"task_id": "project_cc_csharp/745"
} | {
"list": [
{
"filename": "src/RosettaStone.Core/Services/VendorMetadataService.cs",
"retrieved_chunk": " {\n if (String.IsNullOrEmpty(key)) throw new ArgumentNullException(nameof(key));\n key = key.ToUpper();\n Expr expr = new Expr(\n _ORM.GetCol... | CodecMetadata GetByKey(string key)
{ |
{
"list": [
{
"filename": "Ultrapain/Patches/Mindflayer.cs",
"retrieved_chunk": " }\n else\n patch.swingComboLeft = 2;*/\n }\n }\n class Mindflayer_MeleeTeleport_Patch\n {\n public static Vector3 deltaPosition = new Vector3(0, -10, 0);\n ... | using HarmonyLib;
using Sandbox;
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEngine.AI;
namespace Ultrapain.Patches
{
class MinosPrimeCharge
{
static GameObject decoy;
public static void CreateDecoy()
{
if (decoy != null ... |
if (___eid.health <= 0)
return true;
MinosPrimeFlag flag = __instance.GetComponent<MinosPrimeFlag>();
if (flag == null)
return true;
if (!flag.explosionAttack)
return true;
___anim.speed = ___eid.totalSpeedMo... | {
"context_start_lineno": 0,
"file": "Ultrapain/Patches/MinosPrime.cs",
"groundtruth_start_lineno": 303,
"repository": "eternalUnion-UltraPain-ad924af",
"right_context_start_lineno": 305,
"task_id": "project_cc_csharp/564"
} | {
"list": [
{
"filename": "Ultrapain/Patches/Ferryman.cs",
"retrieved_chunk": " //if (flag.remainingCombo == ConfigManager.ferrymanComboCount.value && clipName == \"KickCombo\")\n // flag.remainingCombo -= 1;\n flag.remainingCombo -= 1;\n if(flag.remainin... | MinosPrime __instance, EnemyIdentifier ___eid, Animator ___anim, ref bool ___vibrating)
{ |
{
"list": [
{
"filename": "Code/ConflictDetection.cs",
"retrieved_chunk": " using AlgernonCommons.Translation;\n using ColossalFramework.Plugins;\n using ColossalFramework.UI;\n /// <summary>\n /// Mod conflict detection.\n /// </summary>\n internal sealed class ConflictDetection\... | // <copyright file="Mod.cs" company="algernon (K. Algernon A. Sheppard)">
// Copyright (c) algernon (K. Algernon A. Sheppard). All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
// </copyright>
namespace LineToolMod
{
using AlgernonCommons... |
/// <summary>
/// Gets the mod's base display name (name only).
/// </summary>
public override string BaseName => "Line Tool";
/// <summary>
/// Gets the mod's unique Harmony identfier.
/// </summary>
public override string HarmonyID => "com.github.alger... | {
"context_start_lineno": 0,
"file": "Code/Mod.cs",
"groundtruth_start_lineno": 16,
"repository": "algernon-A-LineTool-f63b447",
"right_context_start_lineno": 18,
"task_id": "project_cc_csharp/680"
} | {
"list": [
{
"filename": "Code/ConflictDetection.cs",
"retrieved_chunk": " /// <summary>\n /// Checks for mod conflicts and displays a notification when a conflict is detected.\n /// </summary>\n /// <returns>True if a mod conflict was detected, false otherwise.</returns>\... | OptionsPanel, Patcher>, IUserMod
{ |
{
"list": [
{
"filename": "src/ClockSnowFlake/Generator/ILongGenerator.cs",
"retrieved_chunk": "namespace ClockSnowFlake\n{\n /// <summary>\n /// Long Id 生成器\n /// </summary>\n public interface ILongGenerator : IIdGenerator<long>\n {\n }\n}",
"score": 24.694307748827086
},... | using System;
namespace ClockSnowFlake
{
/// <summary>
/// Id 生成器
/// </summary>
public static class IdGener
{
/// <summary>
///基于时钟序列的 Long 生成器
/// </summary>
public static | get; set; } = ClockSnowFlakeIdGenerator.Current;
/// <summary>
/// 用Guid创建标识
/// </summary>
/// <returns></returns>
public static string GetGuid()
{
return Guid.NewGuid().ToString("N");
}
/// <summary>
/// 创建 Long ID
/// </su... | {
"context_start_lineno": 0,
"file": "src/ClockSnowFlake/IdGener.cs",
"groundtruth_start_lineno": 12,
"repository": "Bryan-Cyf-ClockSnowFlake-7c4a524",
"right_context_start_lineno": 13,
"task_id": "project_cc_csharp/713"
} | {
"list": [
{
"filename": "src/ClockSnowFlake/Generator/ILongGenerator.cs",
"retrieved_chunk": "namespace ClockSnowFlake\n{\n /// <summary>\n /// Long Id 生成器\n /// </summary>\n public interface ILongGenerator : IIdGenerator<long>\n {\n }\n}",
"score": 21.092693094255964
},... | ILongGenerator ClockLongGenerator { |
{
"list": [
{
"filename": "Ultrapain/ConfigManager.cs",
"retrieved_chunk": " public Sprite sprite;\n public Color color;\n public ConfigField field;\n private GameObject currentUI;\n private Image currentImage;\n private static FieldInfo f_IntField_currentUi =... | using HarmonyLib;
using Mono.Cecil;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Reflection.Emit;
using System.Text;
using UnityEngine;
namespace Ultrapain.Patches
{
/*
u = initial, f = final, d = delta, s = speed multiplier
u = 40f * Time.deltaT... |
Nail comp = nail.GetComponent<Nail>();
if (inst.altVersion)
{
// Blue saw launcher
if (inst.variation == 1)
{
comp.damage = ConfigManager.sawBlueDamage.value;
comp.hitAmount = ConfigManager.sawB... | {
"context_start_lineno": 0,
"file": "Ultrapain/Patches/PlayerStatTweaks.cs",
"groundtruth_start_lineno": 363,
"repository": "eternalUnion-UltraPain-ad924af",
"right_context_start_lineno": 365,
"task_id": "project_cc_csharp/565"
} | {
"list": [
{
"filename": "Ultrapain/ConfigManager.cs",
"retrieved_chunk": " private const float fieldAnchorY = -30f;\n private const float fieldSizeX = 270f;\n public ImageInputField(ConfigField field, Sprite sprite, Color color) : base(field.parentPanel, 0, 0)\n {\n ... | GameObject nail)
{ |
{
"list": [
{
"filename": "Magic.IndexedDb/Factories/EncryptionFactory.cs",
"retrieved_chunk": "using Microsoft.Extensions.DependencyInjection;\nusing Microsoft.JSInterop;\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing s... | using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Magic.IndexedDb.Extensions
{
public static class ServiceCollectionExtensions
{... |
var dbStore = new DbStore();
options(dbStore);
services.AddTransient<DbStore>((_) => dbStore);
services.TryAddSingleton<IMagicDbFactory, MagicDbFactory>();
return services;
}
public static IServiceCollection AddEncryptionFactory(this IServi... | {
"context_start_lineno": 0,
"file": "Magic.IndexedDb/Extensions/ServiceCollectionExtensions.cs",
"groundtruth_start_lineno": 12,
"repository": "magiccodingman-Magic.IndexedDb-a279d6d",
"right_context_start_lineno": 14,
"task_id": "project_cc_csharp/661"
} | {
"list": [
{
"filename": "Magic.IndexedDb/Factories/EncryptionFactory.cs",
"retrieved_chunk": " public class EncryptionFactory: IEncryptionFactory\n {\n readonly IJSRuntime _jsRuntime;\n readonly IndexedDbManager _indexDbManager;\n public EncryptionFactory(IJSRuntime jsRunt... | DbStore> options)
{ |
{
"list": [
{
"filename": "src/RosettaStone.Core/Services/CodecMetadataService.cs",
"retrieved_chunk": " Expr expr = new Expr(\n _ORM.GetColumnName<CodecMetadata>(nameof(CodecMetadata.Id)),\n OperatorEnum.GreaterThan,\n 0);\n expr.Prep... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ExpressionTree;
using FindClosestString;
using SyslogLogging;
using Watson.ORM;
namespace RosettaStone.Core.Services
{
public class VendorMetadataService
{
#region Public-Members
... |
if (String.IsNullOrEmpty(key)) throw new ArgumentNullException(nameof(key));
key = key.ToUpper();
Expr expr = new Expr(
_ORM.GetColumnName<VendorMetadata>(nameof(VendorMetadata.Key)),
OperatorEnum.Equals,
key);
expr.Prep... | {
"context_start_lineno": 0,
"file": "src/RosettaStone.Core/Services/VendorMetadataService.cs",
"groundtruth_start_lineno": 52,
"repository": "jchristn-RosettaStone-898982c",
"right_context_start_lineno": 54,
"task_id": "project_cc_csharp/755"
} | {
"list": [
{
"filename": "src/RosettaStone.Core/Services/CodecMetadataService.cs",
"retrieved_chunk": " public List<CodecMetadata> AllByVendor(string vendorGuid)\n {\n if (String.IsNullOrEmpty(vendorGuid)) throw new ArgumentNullException(nameof(vendorGuid));\n vend... | VendorMetadata GetByKey(string key)
{ |
{
"list": [
{
"filename": "src/Gum/Parser.cs",
"retrieved_chunk": " /// <param name=\"end\">The end of the parameter. If -1, this is an empty word.</param>\n private static ReadOnlySpan<char> PopNextWord(ref ReadOnlySpan<char> line, out int end)\n {\n ReadOnlySpan<char>... | using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using Gum.InnerThoughts;
using Gum.Utilities;
namespace Gum
{
internal static partial class Tokens
{
public const string And = "and";
public const string And2 = "&&";
public const string Or = "or";
public const st... |
node = null;
if (line.IsEmpty)
{
return true;
}
if (line.StartsWith(Tokens.Else))
{
// This is actually a "else" block!
line = line.Slice(Tokens.Else.Length);
currentColumn += Token... | {
"context_start_lineno": 0,
"file": "src/Gum/Parser_Requirements.cs",
"groundtruth_start_lineno": 39,
"repository": "isadorasophia-gum-032cb2d",
"right_context_start_lineno": 41,
"task_id": "project_cc_csharp/669"
} | {
"list": [
{
"filename": "src/Gum/Parser.cs",
"retrieved_chunk": " int separatorIndex = trimmed.IndexOf(_separatorChar);\n ReadOnlySpan<char> result = separatorIndex == -1 ?\n trimmed : trimmed.Slice(0, separatorIndex);\n end = trimmed.IsEmpty ? -1 : re... | CriterionNode? node)
{ |
{
"list": [
{
"filename": "Ultrapain/Patches/Solider.cs",
"retrieved_chunk": " {\n static void Postfix(ZombieProjectiles __instance, ref GameObject ___currentProjectile, ref EnemyIdentifier ___eid, ref GameObject ___player, ref Animator ___anim, ref float ___coolDown)\n {\n ... | using HarmonyLib;
using UnityEngine;
using UnityEngine.AI;
namespace Ultrapain.Patches
{
public class StrayFlag : MonoBehaviour
{
//public int extraShotsRemaining = 6;
private Animator anim;
private EnemyIdentifier eid;
public GameObject standardProjectile;
public GameO... |
if (___eid.enemyType != EnemyType.Stray)
return;
StrayFlag flag = __instance.gameObject.GetComponent<StrayFlag>();
if (flag == null)
return;
if (flag.currentMode == StrayFlag.AttackMode.FastHoming)
{
Projectil... | {
"context_start_lineno": 0,
"file": "Ultrapain/Patches/Stray.cs",
"groundtruth_start_lineno": 78,
"repository": "eternalUnion-UltraPain-ad924af",
"right_context_start_lineno": 81,
"task_id": "project_cc_csharp/570"
} | {
"list": [
{
"filename": "Ultrapain/Plugin.cs",
"retrieved_chunk": " get\n {\n if (_lighningBoltSFX == null)\n _lighningBoltSFX = ferryman.gameObject.transform.Find(\"LightningBoltChimes\").gameObject;\n return _lighningBoltSFX;\n... | EnemyIdentifier ___eid, ref Animator ___anim, ref GameObject ___currentProjectile
, ref NavMeshAgent ___nma, ref Zombie ___zmb)
{ |
{
"list": [
{
"filename": "Ultrapain/Patches/Schism.cs",
"retrieved_chunk": " class ZombieProjectile_Start_Patch\n {\n static void Postfix(ZombieProjectiles __instance, ref EnemyIdentifier ___eid)\n {\n if (___eid.enemyType != EnemyType.Schism)\n return;\n... | using HarmonyLib;
using UnityEngine;
namespace Ultrapain.Patches
{
class Solider_Start_Patch
{
static void Postfix(ZombieProjectiles __instance, ref GameObject ___decProjectile, ref GameObject ___projectile, ref EnemyIdentifier ___eid, ref Animator ___anim)
{
if (___eid.enemyType !=... |
if (___eid.enemyType != EnemyType.Soldier)
return;
___eid.weakPoint = null;
}
}
class SoliderGrenadeFlag : MonoBehaviour
{
public GameObject tempExplosion;
}
class Solider_ThrowProjectile_Patch
{
static void Postfix(ZombieProjec... | {
"context_start_lineno": 0,
"file": "Ultrapain/Patches/Solider.cs",
"groundtruth_start_lineno": 23,
"repository": "eternalUnion-UltraPain-ad924af",
"right_context_start_lineno": 25,
"task_id": "project_cc_csharp/573"
} | {
"list": [
{
"filename": "Ultrapain/Patches/Schism.cs",
"retrieved_chunk": " class ZombieProjectile_Start_Patch\n {\n static void Postfix(ZombieProjectiles __instance, ref EnemyIdentifier ___eid)\n {\n if (___eid.enemyType != EnemyType.Schism)\n return;\n... | ZombieProjectiles __instance, ref EnemyIdentifier ___eid, ref GameObject ___origWP)
{ |
{
"list": [
{
"filename": "JWLSLMerge.Data/Models/Tag.cs",
"retrieved_chunk": "using JWLSLMerge.Data.Attributes;\nnamespace JWLSLMerge.Data.Models\n{\n public class Tag\n {\n [Ignore]\n public int TagId { get; set; }\n public int Type { get; set; }\n public string Na... | using JWLSLMerge.Data.Attributes;
namespace JWLSLMerge.Data.Models
{
public class TagMap
{
[ | get; set; }
public int? PlaylistItemId { get; set; }
public int? LocationId { get; set; }
public int? NoteId { get; set; }
public int TagId { get; set; }
public int Position { get; set; }
}
}
| {
"context_start_lineno": 0,
"file": "JWLSLMerge.Data/Models/TagMap.cs",
"groundtruth_start_lineno": 6,
"repository": "pliniobrunelli-JWLSLMerge-7fe66dc",
"right_context_start_lineno": 8,
"task_id": "project_cc_csharp/741"
} | {
"list": [
{
"filename": "JWLSLMerge.Data/JWDal.cs",
"retrieved_chunk": " {\n connectionString = $\"Data Source={dbPath}\";\n }\n public IEnumerable<T> TableList<T>()\n {\n using (IDbConnection cnn = new SQLiteConnection(connectionString))\n ... | Ignore]
public int TagMapId { |
{
"list": [
{
"filename": "source/ViewModels/GameCacheManagerViewModel.cs",
"retrieved_chunk": "using static NowPlaying.Models.GameCacheManager;\nusing Playnite.SDK;\nnamespace NowPlaying.ViewModels\n{\n public class GameCacheManagerViewModel : ViewModelBase\n {\n public readonly NowPlayi... | using NowPlaying.Utils;
using System.Collections.Generic;
using System.Threading;
namespace NowPlaying.Models
{
public class GameCacheJob
{
public readonly GameCacheEntry entry;
public readonly RoboStats stats;
public readonly CancellationTokenSource tokenSource;
public readonly... |
public long? partialFileResumeThresh;
public int interPacketGap;
public bool cancelledOnDiskFull;
public bool cancelledOnMaxFill;
public bool cancelledOnError;
public List<string> errorLog;
public GameCacheJob(GameCacheEntry entry, RoboStats stats=null, int inte... | {
"context_start_lineno": 0,
"file": "source/Models/GameCacheJob.cs",
"groundtruth_start_lineno": 12,
"repository": "gittromney-Playnite-NowPlaying-23eec41",
"right_context_start_lineno": 13,
"task_id": "project_cc_csharp/609"
} | {
"list": [
{
"filename": "source/NowPlayingInstallController.cs",
"retrieved_chunk": " public readonly RoboStats jobStats;\n public readonly GameCacheViewModel gameCache;\n public readonly GameCacheManagerViewModel cacheManager;\n public readonly InstallProgressViewModel p... | PartialFileResumeOpts pfrOpts; |
{
"list": [
{
"filename": "Packages/net.koyashiro.genericdatacontainer/Runtime/DataDictionary.cs",
"retrieved_chunk": " return (DataDictionary<TKey, TValue>)(object)new DataDictionary();\n }\n }\n}",
"score": 94.53394620395252
},
{
"filename": "Packages/net.koy... | using VRC.SDK3.Data;
using Koyashiro.GenericDataContainer.Internal;
namespace Koyashiro.GenericDataContainer
{
public static class DataDictionaryExt
{
public static int Count<TKey, TValue>(this DataDictionary<TKey, TValue> dictionary)
{
var dataDictionary = (DataDictionary)(object)(... |
var dataDictionary = (DataDictionary)(object)(dictionary);
var keyToken = DataTokenUtil.NewDataToken(key);
var result = dataDictionary.Remove(keyToken, out var valueToken);
switch (valueToken.TokenType)
{
case TokenType.Reference:
... | {
"context_start_lineno": 0,
"file": "Packages/net.koyashiro.genericdatacontainer/Runtime/DataDictionaryExt.cs",
"groundtruth_start_lineno": 66,
"repository": "koyashiro-generic-data-container-1aef372",
"right_context_start_lineno": 68,
"task_id": "project_cc_csharp/705"
} | {
"list": [
{
"filename": "Packages/net.koyashiro.genericdatacontainer/Runtime/DataDictionary.cs",
"retrieved_chunk": " return (DataDictionary<TKey, TValue>)(object)new DataDictionary();\n }\n }\n}",
"score": 79.78214646248344
},
{
"filename": "Packages/net.koy... | DataDictionary<TKey, TValue> dictionary, TKey key, out TValue value)
{ |
{
"list": [
{
"filename": "Source/TreeifyTask/TaskTree/ITaskNode.cs",
"retrieved_chunk": " object ProgressState { get; }\n ITaskNode Parent { get; set; }\n IEnumerable<ITaskNode> ChildTasks { get; }\n TaskStatus TaskStatus { get; }\n void SetAction(Func<IProgressRepo... | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
namespace TreeifyTask
{
public class TaskNode : ITaskNode
{
private static Random rnd = new Random();
private readonly List<Task> taskObjects = n... |
cancellableProgressReportingAction = cancellableProgressReportingAction ??
throw new ArgumentNullException(nameof(cancellableProgressReportingAction));
hasCustomAction = true;
action = cancellableProgressReportingAction;
}
public void ResetStatus()
... | {
"context_start_lineno": 0,
"file": "Source/TreeifyTask/TaskTree/TaskNode.cs",
"groundtruth_start_lineno": 288,
"repository": "intuit-TreeifyTask-4b124d4",
"right_context_start_lineno": 290,
"task_id": "project_cc_csharp/725"
} | {
"list": [
{
"filename": "Source/TreeifyTask/TaskTree/IProgressReporter.cs",
"retrieved_chunk": "namespace TreeifyTask\n{\n public interface IProgressReporter\n {\n void Report(TaskStatus taskStatus, double progressValue, object progressState = default);\n event ProgressReporting... | IProgressReporter, CancellationToken, Task> cancellableProgressReportingAction)
{ |
{
"list": [
{
"filename": "Ultrapain/Patches/EnrageEffect.cs",
"retrieved_chunk": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing UnityEngine;\nnamespace Ultrapain.Patches\n{\n class EnrageEffect_Start\n {\n static void Postfix(EnrageEffec... | using System;
using System.Collections.Generic;
using System.Text;
using UnityEngine;
namespace Ultrapain.Patches
{
class Idol_Death_Patch
{
static void Postfix( |
if(ConfigManager.idolExplodionType.value == ConfigManager.IdolExplosionType.Sand)
{
GameObject.Instantiate(Plugin.sandExplosion, __instance.transform.position, Quaternion.identity);
return;
}
GameObject tempExplosion = null;
s... | {
"context_start_lineno": 0,
"file": "Ultrapain/Patches/Idol.cs",
"groundtruth_start_lineno": 9,
"repository": "eternalUnion-UltraPain-ad924af",
"right_context_start_lineno": 11,
"task_id": "project_cc_csharp/578"
} | {
"list": [
{
"filename": "Ultrapain/Patches/EnrageEffect.cs",
"retrieved_chunk": " {\n AudioSource enrageAud = __instance.gameObject.GetComponents<AudioSource>().Where(src => src.loop).First();\n if (enrageAud.isPlaying)\n enrageAud.Stop();\n enr... | Idol __instance)
{ |
{
"list": [
{
"filename": "ClientBase/Modules/ArrayList.cs",
"retrieved_chunk": " {\n List<Module> enabledModules = ModuleManager.GetEnabledModules();\n List<string> moduleNames = enabledModules.Select(m => m.name).OrderByDescending(n => n.Length).ToList();\n in... | namespace Client.ClientBase
{
public static class ModuleManager
{
public static List<Module> modules = new List<Module>();
public static void AddModule(Module module)
{
modules.Add(module);
}
public static void RemoveModule(Module module)
{
... |
List<Module> enabledModulesInCategory = new List<Module>();
foreach (Module module in modules)
{
if (module.enabled && module.category == category)
{
enabledModulesInCategory.Add(module);
}
}
... | {
"context_start_lineno": 0,
"file": "ClientBase/ModuleManager.cs",
"groundtruth_start_lineno": 73,
"repository": "R1ck404-External-Cheat-Base-65a7014",
"right_context_start_lineno": 75,
"task_id": "project_cc_csharp/762"
} | {
"list": [
{
"filename": "ClientBase/UI/Overlay/Overlay.cs",
"retrieved_chunk": " }\n public void FormLayout()\n {\n this.Name = Program.client_name;\n this.Text = Program.client_name;\n this.Size = new System.Drawing.Size(500, 500);\n ... | Module> GetEnabledModulesInCategory(string category)
{ |
{
"list": [
{
"filename": "Ultrapain/Patches/PlayerStatTweaks.cs",
"retrieved_chunk": "using HarmonyLib;\nusing Mono.Cecil;\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Reflection;\nusing System.Reflection.Emit;\nusing System.Text;\nusing UnityEngine;\nnamespace... | using HarmonyLib;
using System;
using System.Collections.Generic;
using System.Reflection.Emit;
using System.Text;
using UnityEngine;
namespace Ultrapain
{
public static class ILUtils
{
public static string TurnInstToString( |
return $"{inst.opcode}{(inst.operand == null ? "" : $" : ({inst.operand.GetType()}){inst.operand}")}";
}
public static OpCode LoadLocalOpcode(int localIndex)
{
if (localIndex == 0)
return OpCodes.Ldloc_0;
if (localIndex == 1)
... | {
"context_start_lineno": 0,
"file": "Ultrapain/ILUtils.cs",
"groundtruth_start_lineno": 11,
"repository": "eternalUnion-UltraPain-ad924af",
"right_context_start_lineno": 13,
"task_id": "project_cc_csharp/600"
} | {
"list": [
{
"filename": "Ultrapain/Patches/PlayerStatTweaks.cs",
"retrieved_chunk": "{\n /*\n u = initial, f = final, d = delta, s = speed multiplier\n u = 40f * Time.deltaTime\n f = 40f * S * Time.deltaTime\n d = 40f * Time.deltaTime * (S - 1)\n revCharge += 40f * Time.deltaTime *... | CodeInstruction inst)
{ |
{
"list": [
{
"filename": "Ultrapain/ConfigManager.cs",
"retrieved_chunk": " public Sprite sprite;\n public Color color;\n public ConfigField field;\n private GameObject currentUI;\n private Image currentImage;\n private static FieldInfo f_IntField_currentUi =... | using BepInEx;
using UnityEngine;
using UnityEngine.SceneManagement;
using System;
using HarmonyLib;
using System.IO;
using Ultrapain.Patches;
using System.Linq;
using UnityEngine.UI;
using UnityEngine.EventSystems;
using System.Reflection;
using Steamworks;
using Unity.Audio;
using System.Text;
using System.Collection... |
public static GameObject maliciousRailcannon;
// Variables
public static float SoliderShootAnimationStart = 1.2f;
public static float SoliderGrenadeForce = 10000f;
public static float SwordsMachineKnockdownTimeNormalized = 0.8f;
public static float SwordsMachineCoreSpe... | {
"context_start_lineno": 0,
"file": "Ultrapain/Plugin.cs",
"groundtruth_start_lineno": 120,
"repository": "eternalUnion-UltraPain-ad924af",
"right_context_start_lineno": 121,
"task_id": "project_cc_csharp/624"
} | {
"list": [
{
"filename": "Ultrapain/ConfigManager.cs",
"retrieved_chunk": " private const float fieldAnchorY = -30f;\n private const float fieldSizeX = 270f;\n public ImageInputField(ConfigField field, Sprite sprite, Color color) : base(field.parentPanel, 0, 0)\n {\n ... | GameObject rocketLauncherAlt; |
{
"list": [
{
"filename": "src/dotnetdev-badge/dotnetdev-badge.web/Interfaces/IProvider.cs",
"retrieved_chunk": "using DotNetDevBadgeWeb.Model;\nnamespace DotNetDevBadgeWeb.Interfaces\n{\n public interface IProvider\n {\n Task<(UserSummary summary, User user)> GetUserInfoAsync(string id,... | using DotNetDevBadgeWeb.Interfaces;
using DotNetDevBadgeWeb.Model;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace DotNetDevBadgeWeb.Core.Provider
{
internal class ForumDataProvider : IProvider
{
private const string UNKOWN_IMG_PATH = "Assets/unknown.png";
private const string BAS... |
Uri summaryUri = new(string.Format(SUMMARY_URL, id));
string summaryData = await GetResponseStringAsync(summaryUri, token);
JObject summaryJson = JObject.Parse(summaryData);
UserSummary userSummary = JsonConvert.DeserializeObject<UserSummary>(summaryJson["user_summary"]... | {
"context_start_lineno": 0,
"file": "src/dotnetdev-badge/dotnetdev-badge.web/Core/Provider/ForumDataProvider.cs",
"groundtruth_start_lineno": 40,
"repository": "chanos-dev-dotnetdev-badge-5740a40",
"right_context_start_lineno": 42,
"task_id": "project_cc_csharp/759"
} | {
"list": [
{
"filename": "src/dotnetdev-badge/dotnetdev-badge.web/Endpoints/Badge/BadgeEndpoints.cs",
"retrieved_chunk": " context.Response.SetCacheControl(TimeSpan.FromDays(1).TotalSeconds);\n return Results.Content(response, \"image/svg+xml\");\n });\n ... | Task<(UserSummary summary, User user)> GetUserInfoAsync(string id, CancellationToken token)
{ |
{
"list": [
{
"filename": "Dto/Packet.cs",
"retrieved_chunk": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nnamespace Moadian.Dto\n{\n using System;\n public class Packet : PrimitiveDto\n {",
"score": 58.854033... | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Moadian.Dto
{
public class InvoiceDto : PrimitiveDto
{
public | get; set; }
public List<InvoiceBodyDto> body { get; set; }
public List<InvoicePaymentDto> payments { get; set; }
}
}
| {
"context_start_lineno": 0,
"file": "Dto/InvoiceDto.cs",
"groundtruth_start_lineno": 10,
"repository": "Torabi-srh-Moadian-482c806",
"right_context_start_lineno": 11,
"task_id": "project_cc_csharp/747"
} | {
"list": [
{
"filename": "Dto/Packet.cs",
"retrieved_chunk": " public string uid { get; set; } = \"\";\n public string packetType { get; set; } = \"\";\n public bool retry { get; set; } = false;\n public object data { get; set; } = null;\n public string encryptionKe... | InvoiceHeaderDto header { |
{
"list": [
{
"filename": "Parser/TSLangParser.cs",
"retrieved_chunk": " private Token lastToken;\n /// <summary>\n /// Gets current token.\n /// </summary>\n private Token CurrentToken => lastToken;\n /// <summary>\n /// Root symbol table of the code.\... | namespace Parser.SymbolTableUtil
{
/// <summary>
/// Represents a symbol table for TSLang.
/// </summary>
internal class SymbolTable
{
/// <summary>
/// Gets the symbol table of the upper scope.
/// </summary>
public SymbolTable? UpperScope { get; }
/// <summ... |
/// <summary>
/// Initializes a new instance of the <see cref="SymbolTable"/> class.
/// </summary>
public SymbolTable()
{
symbols = new();
}
/// <summary>
/// Initializes a new instance of the <see cref="SymbolTable"/> class.
/// </... | {
"context_start_lineno": 0,
"file": "Parser/SymbolTableUtil/SymbolTable.cs",
"groundtruth_start_lineno": 15,
"repository": "amirsina-mashayekh-TSLang-Compiler-3a68caf",
"right_context_start_lineno": 16,
"task_id": "project_cc_csharp/773"
} | {
"list": [
{
"filename": "Parser/TSLangParser.cs",
"retrieved_chunk": " /// Symbol table for current scope.\n /// </summary>\n private SymbolTable currentSymTab;\n /// <summary>\n /// Gets whether an error occured while parsing the code.\n /// </summary>\n ... | ISymbol> symbols; |
{
"list": [
{
"filename": "src/Gum/InnerThoughts/CharacterScript.cs",
"retrieved_chunk": " private readonly Dictionary<string, int> _situationNames = new();\n [JsonProperty]\n private int _nextId = 0;\n public readonly string Name;\n public CharacterScript(string nam... | using Gum.Utilities;
using Newtonsoft.Json;
using System.Diagnostics;
namespace Gum.InnerThoughts
{
[DebuggerDisplay("{Name}")]
public class Situation
{
[JsonProperty]
public readonly int Id = 0;
[JsonProperty]
public readonly string Name = string.Empty;
public int... |
/// <summary>
/// This points
/// [ Node Id -> Edge ]
/// </summary>
public readonly Dictionary<int, Edge> Edges = new();
/// <summary>
/// This points
/// [ Node Id -> Parent ]
/// If parent is empty, this is at the top.
/// </summary>
... | {
"context_start_lineno": 0,
"file": "src/Gum/InnerThoughts/Situation.cs",
"groundtruth_start_lineno": 17,
"repository": "isadorasophia-gum-032cb2d",
"right_context_start_lineno": 18,
"task_id": "project_cc_csharp/698"
} | {
"list": [
{
"filename": "src/Gum/InnerThoughts/CharacterScript.cs",
"retrieved_chunk": " {\n int id = _nextId++;\n string situationName = name.TrimStart().TrimEnd().ToString();\n if (_situationNames.ContainsKey(situationName))\n {\n r... | Block> Blocks = new(); |
{
"list": [
{
"filename": "src/ExampleWebApplication/Controllers/WebSocket1Controller.cs",
"retrieved_chunk": "using Microsoft.AspNetCore.Mvc;\nusing TraTech.WebSocketHub;\nnamespace ExampleWebApplication.Controllers\n{\n [ApiController]\n [Route(\"[controller]\")]\n public class WebSocket1Co... | using ExampleWebApplication.WebSocketHubKeys;
using Microsoft.AspNetCore.Mvc;
using TraTech.WebSocketHub;
namespace ExampleWebApplication.Controllers
{
[ApiController]
[Route("[controller]")]
public class WebSocket2Controller : ControllerBase
{
private readonly WebSocketHub< |
public WebSocket2Controller(WebSocketHub<SocketUser> webSocketHub)
{
_webSocketHub = webSocketHub;
}
[HttpGet("GetSocketListWithSelector")]
public IActionResult GetSocketListWithSelector(int id)
{
var socketListOfUser = _webSocketHub.GetSocketLi... | {
"context_start_lineno": 0,
"file": "src/ExampleWebApplication/Controllers/WebSocket2Controller.cs",
"groundtruth_start_lineno": 10,
"repository": "TRA-Tech-dotnet-websocket-9049854",
"right_context_start_lineno": 11,
"task_id": "project_cc_csharp/764"
} | {
"list": [
{
"filename": "src/ExampleWebApplication/Controllers/WebSocket1Controller.cs",
"retrieved_chunk": " {\n _webSocketHub = webSocketHub;\n }\n [HttpGet(\"GetSocketList\")]\n public IActionResult GetSocketList(int id)\n {\n var socketLis... | SocketUser> _webSocketHub; |
{
"list": [
{
"filename": "Ultrapain/Patches/GabrielSecond.cs",
"retrieved_chunk": " chaosRemaining -= 1;\n CancelInvoke(\"CallChaoticAttack\");\n Invoke(\"CallChaoticAttack\", delay);\n }\n static MethodInfo BasicCombo = typeof(GabrielSecond).GetMethod(\... | using HarmonyLib;
using System.Reflection;
using UnityEngine;
namespace Ultrapain.Patches
{
class Mindflayer_Start_Patch
{
static void Postfix(Mindflayer __instance, ref EnemyIdentifier ___eid)
{
__instance.gameObject.AddComponent<MindflayerPatch>();
//___eid.SpeedBuff()... |
if (__0.tag == "Player")
Debug.Log($"Collision with {__0.name} with tag {__0.tag} and layer {__state}");
if (__0.gameObject.tag != "Player" || __state == 15)
return;
if (__instance.transform.parent == null)
return;
Debug.... | {
"context_start_lineno": 0,
"file": "Ultrapain/Patches/Mindflayer.cs",
"groundtruth_start_lineno": 107,
"repository": "eternalUnion-UltraPain-ad924af",
"right_context_start_lineno": 109,
"task_id": "project_cc_csharp/628"
} | {
"list": [
{
"filename": "Ultrapain/Patches/GabrielSecond.cs",
"retrieved_chunk": " if (UnityEngine.Random.Range(0, 100) <= teleportChance)\n {\n Debug.Log(\"Attemted teleport\");\n comp.Teleport(false, false, true, false, false);\n t... | SwingCheck2 __instance, Collider __0, int __state)
{ |
{
"list": [
{
"filename": "Magic.IndexedDb/Models/MagicQuery.cs",
"retrieved_chunk": " JsonQueries = new List<string>();\n }\n public List<StoredMagicQuery> storedMagicQueries { get; set; } = new List<StoredMagicQuery>();\n public bool ResultsUnique { get; set; } = true... | using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Dynamic;
using System.Linq.Expressions;
using System.Reflection;
using System.Security.Cryptography.X509Certificates;
using System.Text.Json;
using System.Threading.Tasks;
using Magic.IndexedDb.Helpers;
using Magic.IndexedDb.Models;
... |
var trans = GenerateTransaction(action);
try
{
recordToAdd.DbName = DbName;
await CallJavascriptVoid(IndexedDbFunctions.ADD_ITEM, trans, recordToAdd);
}
catch (JSException e)
{
RaiseEvent(trans, true... | {
"context_start_lineno": 0,
"file": "Magic.IndexedDb/IndexDbManager.cs",
"groundtruth_start_lineno": 118,
"repository": "magiccodingman-Magic.IndexedDb-a279d6d",
"right_context_start_lineno": 120,
"task_id": "project_cc_csharp/703"
} | {
"list": [
{
"filename": "Magic.IndexedDb/Models/MagicQuery.cs",
"retrieved_chunk": " public MagicQuery<T> ResultsNotUnique()\n {\n ResultsUnique = false;\n return this;\n }\n public MagicQuery<T> Take(int amount)\n {\n StoredMagicQu... | StoreRecord<T> recordToAdd, Action<BlazorDbEvent>? action = null)
{ |
{
"list": [
{
"filename": "Packages/net.koyashiro.genericdatacontainer/Runtime/DataList.cs",
"retrieved_chunk": " {\n return (DataList<T>)(object)new DataList();\n }\n public static DataList<T> New(params T[] array)\n {\n var tokens = DataTokenUtil.New... | using VRC.SDK3.Data;
using Koyashiro.GenericDataContainer.Internal;
namespace Koyashiro.GenericDataContainer
{
public static class DataListExt
{
public static int Capacity<T>(this DataList<T> list)
{
var dataList = (DataList)(object)(list);
return dataList.Capacity;
... |
var dataList = (DataList)(object)(list);
return (DataList<T>)(object)dataList.ShallowClone();
}
public static void Sort<T>(this DataList<T> list)
{
var dataList = (DataList)(object)(list);
dataList.Sort();
}
public static void So... | {
"context_start_lineno": 0,
"file": "Packages/net.koyashiro.genericdatacontainer/Runtime/DataListExt.cs",
"groundtruth_start_lineno": 189,
"repository": "koyashiro-generic-data-container-1aef372",
"right_context_start_lineno": 191,
"task_id": "project_cc_csharp/733"
} | {
"list": [
{
"filename": "Packages/net.koyashiro.genericdatacontainer/Runtime/DataList.cs",
"retrieved_chunk": " {\n return (DataList<T>)(object)new DataList();\n }\n public static DataList<T> New(params T[] array)\n {\n var tokens = DataTokenUtil.New... | DataList<T> ShallowClone<T>(this DataList<T> list)
{ |
{
"list": [
{
"filename": "Assets/Mochineko/KoeiromapAPI/InverseDictionaryExtension.cs",
"retrieved_chunk": "#nullable enable\nusing System;\nusing System.Collections.Generic;\nnamespace Mochineko.KoeiromapAPI\n{\n internal static class InverseDictionaryExtension\n {\n public static T Inv... | #nullable enable
using System.Collections.Generic;
namespace Mochineko.KoeiromapAPI
{
internal static class StyleResolver
{
private static readonly IReadOnlyDictionary< |
[Style.Talk] = "talk",
[Style.Happy] = "happy",
[Style.Sad] = "sad",
[Style.Angry] = "angry",
[Style.Fear] = "fear",
[Style.Surprised] = "surprised",
};
public static Style ToStyle(this string style)
=> Dictionary.Inve... | {
"context_start_lineno": 0,
"file": "Assets/Mochineko/KoeiromapAPI/StyleResolver.cs",
"groundtruth_start_lineno": 7,
"repository": "mochi-neko-llm-agent-sandbox-unity-6521c0b",
"right_context_start_lineno": 9,
"task_id": "project_cc_csharp/672"
} | {
"list": [
{
"filename": "Assets/Mochineko/KoeiromapAPI/InverseDictionaryExtension.cs",
"retrieved_chunk": " foreach (var pair in dictionary)\n {\n if (pair.Value == key)\n {\n return pair.Key;\n }\n }\n ... | Style, string> Dictionary = new Dictionary<Style, string>
{ |
{
"list": [
{
"filename": "src/UtilComps/HTTPGetRequestComponent.cs",
"retrieved_chunk": "using System;\nusing System.Collections.Generic;\nusing Grasshopper.Kernel;\nusing Rhino.Geometry;\nusing Brain.Templates;\nusing static System.Windows.Forms.VisualStyles.VisualStyleElement.Tab;\nnamespace Brain... | using Grasshopper.Kernel;
using Rhino;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using static System.Windows.Forms.VisualStyles.VisualStyleElement.Tab;
namespace Brain.Templates
{
public abstract class GH_C... |
public GH_Component_HTTPAsync(string name, string nickname, string description, string category, string subcategory)
: base(name, nickname, description, category, subcategory)
{
}
protected override void ExpireDownStreamObjects()
{
if (_shouldExpire)
... | {
"context_start_lineno": 0,
"file": "src/Templates/GH_Component_HTTPAsync.cs",
"groundtruth_start_lineno": 17,
"repository": "ParametricCamp-brain-plugin-grasshopper-9240b81",
"right_context_start_lineno": 18,
"task_id": "project_cc_csharp/791"
} | {
"list": [
{
"filename": "src/UtilComps/HTTPGetRequestComponent.cs",
"retrieved_chunk": " /// <summary>\n /// Initializes a new instance of the HTTPGetRequestComponent class.\n /// </summary>\n public HTTPGetRequestComponent()\n : base(\"HTTP GET\", \n ... | RequestState _currentState = RequestState.Off; |
{
"list": [
{
"filename": "src/Commands/AxeCommand.cs",
"retrieved_chunk": " return ValidationResult.Error(\"Retry pause must be set between 5 and 60 seconds.\");\n }\n return ValidationResult.Success();\n }\n public override async Task<int> ExecuteAs... | using Beeching.Commands.Interfaces;
using Beeching.Helpers;
using Beeching.Models;
using Newtonsoft.Json;
using Polly;
using Spectre.Console;
using System.Net.Http.Headers;
using System.Text;
namespace Beeching.Commands
{
internal class Axe : IAxe
{
private readonly HttpClient _client;
public ... |
var apiVersion = await _client.GetAsync(
$"subscriptions/{settings.Subscription}/providers/{provider}/resourceTypes?api-version=2021-04-01"
);
string apiJson = await apiVersion.Content.ReadAsStringAsync();
List<ApiVersion> allApiVersions = new();
... | {
"context_start_lineno": 0,
"file": "src/Commands/Axe.cs",
"groundtruth_start_lineno": 354,
"repository": "irarainey-beeching-e846af0",
"right_context_start_lineno": 356,
"task_id": "project_cc_csharp/783"
} | {
"list": [
{
"filename": "src/Commands/AxeCommand.cs",
"retrieved_chunk": " return ValidationResult.Error(\"Retry pause must be set between 5 and 60 seconds.\");\n }\n return ValidationResult.Success();\n }\n public override async Task<int> ExecuteAs... | AxeSettings settings, string provider, string type)
{ |
{
"list": [
{
"filename": "ServiceSelf/NamedPipeLogger.cs",
"retrieved_chunk": "using Microsoft.Extensions.Logging;\nusing System;\nnamespace ServiceSelf\n{\n /// <summary>\n /// 命名管道日志\n /// </summary>\n sealed class NamedPipeLogger : ILogger\n {\n private readonly string categ... | using Microsoft.Extensions.Logging;
using System;
namespace ServiceSelf
{
/// <summary>
/// 命名管道日志提供者
/// </summary>
sealed class NamedPipeLoggerProvider : ILoggerProvider
{
private static readonly |
/// <summary>
/// 创建与当前processId对应的NamedPipeClient
/// </summary>
/// <returns></returns>
private static NamedPipeClient CreateNamedPipeClient()
{
#if NET6_0_OR_GREATER
var processId = Environment.ProcessId;
#else
var processId = System.Diagnosti... | {
"context_start_lineno": 0,
"file": "ServiceSelf/NamedPipeLoggerProvider.cs",
"groundtruth_start_lineno": 10,
"repository": "xljiulang-ServiceSelf-7f8604b",
"right_context_start_lineno": 11,
"task_id": "project_cc_csharp/765"
} | {
"list": [
{
"filename": "ServiceSelf/NamedPipeLogger.cs",
"retrieved_chunk": " private readonly NamedPipeClient pipeClient;\n public NamedPipeLogger(string categoryName, NamedPipeClient pipeClient)\n {\n this.categoryName = categoryName;\n this.pipeClient =... | NamedPipeClient pipeClient = CreateNamedPipeClient(); |
{
"list": [
{
"filename": "Assets/Mochineko/FacialExpressions/Emotion/CompositeEmotionMorpher.cs",
"retrieved_chunk": " this.morphers = morphers;\n }\n void IEmotionMorpher<TEmotion>.MorphInto(EmotionSample<TEmotion> sample)\n {\n foreach (var morpher in morp... | #nullable enable
using System.Collections.Generic;
namespace Mochineko.FacialExpressions.LipSync
{
/// <summary>
/// Composition of some <see cref="Mochineko.FacialExpressions.LipSync.ILipMorpher"/>s.
/// </summary>
public sealed class CompositeLipMorpher : ILipMorpher
{
private readonly IR... |
return morphers[0].GetWeightOf(viseme);
}
void ILipMorpher.Reset()
{
foreach (var morpher in morphers)
{
morpher.Reset();
}
}
}
}
| {
"context_start_lineno": 0,
"file": "Assets/Mochineko/FacialExpressions/LipSync/CompositeLipMorpher.cs",
"groundtruth_start_lineno": 29,
"repository": "mochi-neko-facial-expressions-unity-ab0d020",
"right_context_start_lineno": 31,
"task_id": "project_cc_csharp/684"
} | {
"list": [
{
"filename": "Assets/Mochineko/FacialExpressions/Emotion/CompositeEmotionMorpher.cs",
"retrieved_chunk": " {\n return morphers[0].GetWeightOf(emotion);\n }\n void IEmotionMorpher<TEmotion>.Reset()\n {\n foreach (var morpher in morphers)\n ... | ILipMorpher.GetWeightOf(Viseme viseme)
{ |
{
"list": [
{
"filename": "Components/EditorComponent.cs",
"retrieved_chunk": " // Verify that our dictionary has our zone/patrol in it\n if (!zoneWaypoints.ContainsKey(zoneName))\n {\n zoneWaypoints.Add(zoneName, new Dictionary<string, C... | using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
namespace DrakiaXYZ.Waypoints
{
public class CustomWaypointLoader
{
// Singleton because I'm lazy
private static CustomWaypointLoader instance = new CustomWaypointLoader();
public static CustomWaypoi... |
if (!mapZoneWaypoints.ContainsKey(map))
{
return null;
}
if (!mapZoneWaypoints[map].ContainsKey(zone))
{
return null;
}
return mapZoneWaypoints[map][zone];
}
private string getMapFromF... | {
"context_start_lineno": 0,
"file": "CustomWaypointLoader.cs",
"groundtruth_start_lineno": 88,
"repository": "DrakiaXYZ-SPT-Waypoints-051d99b",
"right_context_start_lineno": 90,
"task_id": "project_cc_csharp/750"
} | {
"list": [
{
"filename": "Components/EditorComponent.cs",
"retrieved_chunk": " {\n return false;\n }\n // Find the nearest waypoint we've created this session, and make sure we're near it\n FindNearestAddedWaypointSphere(position, out GameObj... | CustomPatrol> getMapZonePatrols(string map, string zone)
{ |
{
"list": [
{
"filename": "Ultrapain/Patches/OrbitalStrike.cs",
"retrieved_chunk": " }\n class OrbitalExplosionInfo : MonoBehaviour\n {\n public bool active = true;\n public string id;\n public int points;\n }\n class Grenade_Explode\n {\n class StateInfo"... | using BepInEx;
using UnityEngine;
using UnityEngine.SceneManagement;
using System;
using HarmonyLib;
using System.IO;
using Ultrapain.Patches;
using System.Linq;
using UnityEngine.UI;
using UnityEngine.EventSystems;
using System.Reflection;
using Steamworks;
using Unity.Audio;
using System.Text;
using System.Collection... |
private static MethodInfo GetMethod<T>(string name)
{
return typeof(T).GetMethod(name, BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic);
}
private static Dictionary<MethodInfo, HarmonyMethod> methodCache = new Dictionary<MethodInfo... | {
"context_start_lineno": 0,
"file": "Ultrapain/Plugin.cs",
"groundtruth_start_lineno": 413,
"repository": "eternalUnion-UltraPain-ad924af",
"right_context_start_lineno": 414,
"task_id": "project_cc_csharp/667"
} | {
"list": [
{
"filename": "Ultrapain/Patches/Drone.cs",
"retrieved_chunk": " lr.receiveShadows = false;\n lr.shadowCastingMode = UnityEngine.Rendering.ShadowCastingMode.Off;\n lr.startWidth = lr.endWidth = lr.widthMultiplier = 0.025f;\n if (whiteMat == null)... | Harmony harmonyBase; |
{
"list": [
{
"filename": "src/ExampleWebApplication/Controllers/WebSocket2Controller.cs",
"retrieved_chunk": "using ExampleWebApplication.WebSocketHubKeys;\nusing Microsoft.AspNetCore.Mvc;\nusing TraTech.WebSocketHub;\nnamespace ExampleWebApplication.Controllers\n{\n [ApiController]\n [Route(\"... | using System.Net.WebSockets;
using System.Text;
using Microsoft.AspNetCore.Http;
using Newtonsoft.Json;
namespace TraTech.WebSocketHub
{
public class WebSocketHubMiddleware<TKey>
where TKey : notnull
{
private readonly IServiceProvider _serviceProvider;
private readonly RequestDeleg... |
private readonly Func<HttpContext, TKey> _keyGenerator;
private readonly byte[] _receiveBuffer;
public WebSocketHubMiddleware(IServiceProvider serviceProvider, RequestDelegate next, WebSocketHub<TKey> webSocketHub, Func<HttpContext, bool> acceptIf, Func<HttpContext, TKey> keyGenerator)
... | {
"context_start_lineno": 0,
"file": "src/WebSocketHub/Core/src/WebSocketHubMiddleware.cs",
"groundtruth_start_lineno": 13,
"repository": "TRA-Tech-dotnet-websocket-9049854",
"right_context_start_lineno": 14,
"task_id": "project_cc_csharp/793"
} | {
"list": [
{
"filename": "src/ExampleWebApplication/Controllers/WebSocket2Controller.cs",
"retrieved_chunk": " public WebSocket2Controller(WebSocketHub<SocketUser> webSocketHub)\n {\n _webSocketHub = webSocketHub;\n }\n [HttpGet(\"GetSocketListWithSelector\")]\n... | WebSocketHub<TKey> _webSocketHub; |
{
"list": [
{
"filename": "src/LogDashboard.Authorization/LogDashboardServiceCollectionExtensions.cs",
"retrieved_chunk": "{\n public static class LogDashboardServiceCollectionExtensions\n {\n public static ILogDashboardBuilder AddLogDashboard(this IServiceCollection services, Logdashboar... | using LogDashboard.Models;
using LogDashboard.Route;
using System;
using System.Threading.Tasks;
namespace LogDashboard.Handle
{
public class AuthorizationHandle : LogDashboardHandleBase
{
private readonly LogdashboardAccountAuthorizeFilter _filter;
public AuthorizationHandle(
ISer... |
if (_filter.Password == input?.Password && _filter.UserName == input?.Name)
{
_filter.SetCookieValue(Context.HttpContext);
//Redirect
var homeUrl = LogDashboardRoutes.Routes.FindRoute(string.Empty).Key;
Context.HttpContext.Respons... | {
"context_start_lineno": 0,
"file": "src/LogDashboard.Authorization/Handle/AuthorizationHandle.cs",
"groundtruth_start_lineno": 18,
"repository": "Bryan-Cyf-LogDashboard.Authorization-14d4540",
"right_context_start_lineno": 20,
"task_id": "project_cc_csharp/797"
} | {
"list": [
{
"filename": "src/LogDashboard.Authorization/LogDashboardServiceCollectionExtensions.cs",
"retrieved_chunk": " var options = new LogDashboardOptions();\n func?.Invoke(options);\n options.AddAuthorizationFilter(filter);\n Action<LogDashboardOptio... | LoginInput input)
{ |
{
"list": [
{
"filename": "Ultrapain/Patches/PlayerStatTweaks.cs",
"retrieved_chunk": "\t\tstatic FieldInfo f_HealthBar_hp = typeof(HealthBar).GetField(\"hp\", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public);\n\t\tstatic FieldInfo f_HealthBar_antiHp = typeof(HealthBar).GetField(\... | using HarmonyLib;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Runtime.ConstrainedExecution;
using UnityEngine;
namespace Ultrapain.Patches
{
class Drone_Start_Patch
{
static void Postfix(Drone __instance, ref EnemyIdentifier ___eid)
{... |
public void Awake()
{
lr = gameObject.AddComponent<LineRenderer>();
lr.enabled = false;
lr.receiveShadows = false;
lr.shadowCastingMode = UnityEngine.Rendering.ShadowCastingMode.Off;
lr.startWidth = lr.endWidth = lr.widthMultiplier = 0.025f;
... | {
"context_start_lineno": 0,
"file": "Ultrapain/Patches/Drone.cs",
"groundtruth_start_lineno": 194,
"repository": "eternalUnion-UltraPain-ad924af",
"right_context_start_lineno": 195,
"task_id": "project_cc_csharp/659"
} | {
"list": [
{
"filename": "Ultrapain/Patches/PlayerStatTweaks.cs",
"retrieved_chunk": "\t\t\t\t\tfloat operand = (Single)inst.operand;\n\t\t\t\t\tif (operand == 30f)\n\t\t\t\t\t\tcode[i].operand = (Single)(ConfigManager.maxPlayerHp.value * 0.3f);\n\t\t\t\t\telse if (operand == 50f)\n\t\t\t\t\t\tcode[i... | Material whiteMat; |
{
"list": [
{
"filename": "Assets/Mochineko/YouTubeLiveStreamingClient/Responses/AuthorDetails.cs",
"retrieved_chunk": " public string ChannelUrl { get; private set; } = string.Empty;\n [JsonProperty(\"displayName\"), JsonRequired]\n public string DisplayName { get; private set; }... | #nullable enable
using System;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
namespace Mochineko.YouTubeLiveStreamingClient.Responses
{
[JsonObject]
public sealed class LiveChatMessageSnippet
{
[JsonProperty("type"), JsonRequired, JsonConverter(typeof(StringEnumConverter))]
publi... | get; private set; }
[JsonProperty("messageDeletedDetails")]
public MessageDeletedDetails? MessageDeletedDetails { get; private set; }
[JsonProperty("userBannedDetails")]
public UserBannedDetails? UserBannedDetails { get; private set; }
[JsonProperty("memberMil... | {
"context_start_lineno": 0,
"file": "Assets/Mochineko/YouTubeLiveStreamingClient/Responses/LiveChatMessageSnippet.cs",
"groundtruth_start_lineno": 29,
"repository": "mochi-neko-youtube-live-streaming-client-unity-b712d77",
"right_context_start_lineno": 30,
"task_id": "project_cc_csharp/756"
} | {
"list": [
{
"filename": "Assets/Mochineko/YouTubeLiveStreamingClient/Responses/AuthorDetails.cs",
"retrieved_chunk": " public bool IsChatSponsor { get; private set; }\n [JsonProperty(\"isChatModerator\"), JsonRequired]\n public bool IsChatModerator { get; private set; }\n }\n... | TextMessageDetails? TextMessageDetails { |
{
"list": [
{
"filename": "YY.Build.Cross.Tasks/Cross/Ld.cs",
"retrieved_chunk": " switchOrderList.Add(\"LibraryDependencies\");\n switchOrderList.Add(\"BuildingInIde\");\n switchOrderList.Add(\"EnableASAN\");\n switchOrderList.Add(\"UseOfStl\");\n ... | using System;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Resources;
using System.Text;
using System.Text.RegularExpressions;
using Microsoft.Build.CPPTasks;
using Microsoft.Build.Framework;
using Microsoft.Build.Shared;
using Microsoft.Build.Uti... |
get
{
return activeToolSwitchesValues;
}
set
{
activeToolSwitchesValues = value;
}
}
public string EffectiveWorkingDirectory { get; set; }
[Output]
public string ResolvedPathToTool ... | {
"context_start_lineno": 0,
"file": "Microsoft.Build.CPPTasks/VCToolTask.cs",
"groundtruth_start_lineno": 177,
"repository": "Chuyu-Team-MSBuildCppCrossToolset-6c84a69",
"right_context_start_lineno": 179,
"task_id": "project_cc_csharp/582"
} | {
"list": [
{
"filename": "YY.Build.Cross.Tasks/Cross/Ld.cs",
"retrieved_chunk": " protected override ITaskItem[] TrackedInputFiles => Sources;\n protected override bool MaintainCompositeRootingMarkers => true;\n protected override string CommandTLogName\n {\n ge... | ToolSwitch> ActiveToolSwitchesValues
{ |
{
"list": [
{
"filename": "Ultrapain/Patches/FleshPrison.cs",
"retrieved_chunk": " flag.prison = __instance;\n flag.damageMod = ___eid.totalDamageModifier;\n flag.speedMod = ___eid.totalSpeedModifier;\n }\n }\n /*[HarmonyPatch(typeof(FleshPrison), \"SpawnI... | using HarmonyLib;
using System;
using System.ComponentModel;
using UnityEngine;
namespace Ultrapain.Patches
{
class MaliciousFaceFlag : MonoBehaviour
{
public bool charging = false;
}
class MaliciousFace_Start_Patch
{
static void Postfix(SpiderBody __instance, ref GameObject ___pro... |
if (__instance.TryGetComponent<MaliciousFaceFlag>(out MaliciousFaceFlag flag) && flag.charging)
{
if (__instance.health < ___maxHealth / 2)
___beamsAmount = ConfigManager.maliciousFaceBeamCountEnraged.value;
else
___beamsAm... | {
"context_start_lineno": 0,
"file": "Ultrapain/Patches/MaliciousFace.cs",
"groundtruth_start_lineno": 37,
"repository": "eternalUnion-UltraPain-ad924af",
"right_context_start_lineno": 39,
"task_id": "project_cc_csharp/675"
} | {
"list": [
{
"filename": "Ultrapain/Plugin.cs",
"retrieved_chunk": " harmonyTweaks.Patch(GetMethod<Mindflayer>(\"Start\"), postfix: GetHarmonyMethod(GetMethod<Mindflayer_Start_Patch>(\"Postfix\")));\n if (ConfigManager.mindflayerShootTweakToggle.value)\n {\n ... | SpiderBody __instance, float ___maxHealth, ref int ___beamsAmount)
{ |
{
"list": [
{
"filename": "src/client.cs",
"retrieved_chunk": "// Copyright (c) 2023, João Matos\n// Check the end of the file for extended copyright notice.\nusing System.Text;\nusing System;\nusing ProtoIP;\nusing ProtoIP.Common;\nnamespace ProtoIP\n{\n public class ProtoClient\n {",
... | // Copyright (c) 2023, João Matos
// Check the end of the file for extended copyright notice.
using System;
namespace ProtoIP
{
class Node
{
protected |
protected ProtoClient _client;
// Constructors
public Node()
{
}
}
}
// MIT License
//
// Copyright (c) 2023 João Matos
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files ... | {
"context_start_lineno": 0,
"file": "src/p2p.cs",
"groundtruth_start_lineno": 9,
"repository": "JoaoAJMatos-ProtoIP-84f8797",
"right_context_start_lineno": 10,
"task_id": "project_cc_csharp/788"
} | {
"list": [
{
"filename": "src/client.cs",
"retrieved_chunk": " protected Common.Network.Connection _serverConnection;\n protected ProtoStream _protoStream;\n public ProtoClient() {}\n // Connect to the remote host and create a new ProtoStream object.\n ... | ProtoServer _server; |
{
"list": [
{
"filename": "objective/objective/objective.Forms/Local/Models/PageModel.cs",
"retrieved_chunk": "namespace objective.Forms.Local.Models\n{\n\t\tpublic partial class PageModel : ObservableBase\n\t\t{\n\t\t\t\t[ObservableProperty]\n\t\t\t\tprivate ObservableCollection<ReportObject> _report... | using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using Jamesnet.Wpf.Controls;
using Jamesnet.Wpf.Mvvm;
using Microsoft.Win32;
using Newtonsoft.Json;
using objective.Core;
using objective.Core.Events;
using objective.Forms.Local.Models;
using objective.Models;
using objective.SampleData;
us... |
[ObservableProperty]
private ObservableCollection<PageModel> pages;
[ObservableProperty]
ObservableCollection<ReportObject> multiObject = new ();
[ObservableProperty]
private List<ToolItem> _subTools;
private readonly IEventAggregator _eh;
public MainContentViewModel(IEventAggregator... | {
"context_start_lineno": 0,
"file": "objective/objective/objective.Forms/Local/ViewModels/MainContentViewModel.cs",
"groundtruth_start_lineno": 37,
"repository": "jamesnet214-objective-0e60b6f",
"right_context_start_lineno": 38,
"task_id": "project_cc_csharp/689"
} | {
"list": [
{
"filename": "objective/objective/objective.Forms/Local/Models/PageModel.cs",
"retrieved_chunk": "\t\t\t\tpublic ReportModel Save()\n\t\t\t\t{\n\t\t\t\t\t\tReportModel m = new ();\n\t\t\t\t\t\tm.Objects = new ();\n\t\t\t\t\t\tforeach (ReportObject data in ReportSource)\n\t\t\t\t\t\t{\n\t\... | ToolItem> _tools; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.