Dataset Preview
Full Screen Viewer
Full Screen
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
The dataset generation failed because of a cast error
Error code: DatasetGenerationCastError Exception: DatasetGenerationCastError Message: An error occurred while generating the dataset All the data files must have the same columns, but at some point there are 1 new columns ({'ground_truth'}) and 1 missing columns ({'metadata'}). This happened while the json dataset builder was generating data using hf://datasets/t-shonverch/mergebert/mergebert_minimal.jsonl (at revision 0cec435de0f1c7742beab2fbfa3110decb24d9ce) Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations) Traceback: Traceback (most recent call last): File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 2011, in _prepare_split_single writer.write_table(table) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/arrow_writer.py", line 585, in write_table pa_table = table_cast(pa_table, self._schema) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 2302, in table_cast return cast_table_to_schema(table, schema) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 2256, in cast_table_to_schema raise CastError( datasets.table.CastError: Couldn't cast text: string ground_truth: string to {'text': Value(dtype='string', id=None), 'metadata': {'source': Value(dtype='string', id=None), 'metadata_fname': Value(dtype='string', id=None), 'conflict_index': Value(dtype='int64', id=None)}} because column names don't match During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1542, in compute_config_parquet_and_info_response parquet_operations = convert_to_parquet(builder) File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1156, in convert_to_parquet builder.download_and_prepare( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1027, in download_and_prepare self._download_and_prepare( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1122, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1882, in _prepare_split for job_id, done, content in self._prepare_split_single( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 2013, in _prepare_split_single raise DatasetGenerationCastError.from_cast_error( datasets.exceptions.DatasetGenerationCastError: An error occurred while generating the dataset All the data files must have the same columns, but at some point there are 1 new columns ({'ground_truth'}) and 1 missing columns ({'metadata'}). This happened while the json dataset builder was generating data using hf://datasets/t-shonverch/mergebert/mergebert_minimal.jsonl (at revision 0cec435de0f1c7742beab2fbfa3110decb24d9ce) Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)
Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
text
string | metadata
dict |
---|---|
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
[assembly: Guid("f2fac76e-0d80-4099-a64f-2686d4d99b6b")]
||||||| base
[assembly: Guid("f2fac76e-0d80-4099-a64f-2686d4d99b6b")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.2.0.0")]
[assembly: AssemblyFileVersion("1.2.0.0")]
=======
[assembly: Guid("f2fac76e-0d80-4099-a64f-2686d4d99b6b")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.2.1.0")]
[assembly: AssemblyFileVersion("1.2.1.0")]
>>>>>>> theirs
### Resolution:
[assembly: Guid("f2fac76e-0d80-4099-a64f-2686d4d99b6b")]
[assembly: AssemblyVersion("1.2.1.0")]
[assembly: AssemblyFileVersion("1.2.1.0")] | {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\0_metadata.json",
"conflict_index": 0
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
private ContentControl _popupContentControl;
private DialogSession _session;
||||||| base
private DialogSession _session;
=======
>>>>>>> theirs
### Resolution:
private ContentControl _popupContentControl;
private DialogSession _session;
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10032_metadata.json",
"conflict_index": 0
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
||||||| base
=======
if (newValue)
{
var popupOpenedEventArgs = new RoutedEventArgs()
{
RoutedEvent = OnPopupOpenedEvent,
Source = popupBox
};
popupBox.RaiseEvent(popupOpenedEventArgs);
}
else
{
var popupClosedEventArgs = new RoutedEventArgs()
{
RoutedEvent = OnPopupClosedEvent,
Source = popupBox
};
popupBox.RaiseEvent(popupClosedEventArgs);
}
>>>>>>> theirs
### Resolution:
if (newValue)
{
var popupOpenedEventArgs = new RoutedEventArgs()
{
RoutedEvent = OnPopupOpenedEvent,
Source = popupBox
};
popupBox.RaiseEvent(popupOpenedEventArgs);
}
else
{
var popupClosedEventArgs = new RoutedEventArgs()
{
RoutedEvent = OnPopupClosedEvent,
Source = popupBox
};
popupBox.RaiseEvent(popupClosedEventArgs);
}
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10034_metadata.json",
"conflict_index": 0
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
var hitPositionArg = new OutputArgument();
var hitSomethingArg = new OutputArgument();
var entityHandleArg = new OutputArgument();
var surfaceNormalArg = new OutputArgument();
Result = Function.Call<int>(Hash.GET_SHAPE_TEST_RESULT, handle, hitSomethingArg, hitPositionArg, surfaceNormalArg, entityHandleArg);
||||||| base
var hitPositionArg = new OutputArgument();
var hitSomethingArg = new OutputArgument();
var entityHandleArg = new OutputArgument();
var surfaceNormalArg = new OutputArgument();
Result = Function.Call<int>(Hash._GET_RAYCAST_RESULT, handle, hitSomethingArg, hitPositionArg, surfaceNormalArg, entityHandleArg);
=======
NativeVector3 hitPositionArg;
bool hitSomethingArg;
int entityHandleArg;
NativeVector3 surfaceNormalArg;
unsafe
{
Result = Function.Call<int>(Hash._GET_RAYCAST_RESULT, handle, &hitSomethingArg, &hitPositionArg, &surfaceNormalArg, &entityHandleArg);
}
>>>>>>> theirs
### Resolution:
NativeVector3 hitPositionArg;
bool hitSomethingArg;
int entityHandleArg;
NativeVector3 surfaceNormalArg;
unsafe
{
Result = Function.Call<int>(Hash.GET_SHAPE_TEST_RESULT, handle, &hitSomethingArg, &hitPositionArg, &surfaceNormalArg, &entityHandleArg);
}
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10042_metadata.json",
"conflict_index": 0
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
useWindowsLineEnding = false;
||||||| base
=======
tabSize = 4;
useTabbedBackspace = true;
>>>>>>> theirs
### Resolution:
useWindowsLineEnding = false;
tabSize = 0;
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10047_metadata.json",
"conflict_index": 0
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
useWindowsLineEnding = EditorPrefs.GetBool("MerinoUseWindowsLinesEnding", useWindowsLineEnding );
||||||| base
=======
tabSize = EditorPrefs.GetInt("MerinoTabSize", tabSize);
useTabbedBackspace = EditorPrefs.GetBool("MerinoTabbedBackspace", useTabbedBackspace );
>>>>>>> theirs
### Resolution:
useWindowsLineEnding = EditorPrefs.GetBool("MerinoUseWindowsLinesEnding", useWindowsLineEnding );
tabSize = EditorPrefs.GetInt("MerinoTabSize", tabSize);
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10047_metadata.json",
"conflict_index": 1
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
EditorPrefs.SetBool("MerinoWindowsLineEnding", useWindowsLineEnding );
||||||| base
=======
EditorPrefs.SetInt("MerinoTabSize", tabSize );
EditorPrefs.SetBool("MerinoTabbedBackspace", useTabbedBackspace );
>>>>>>> theirs
### Resolution:
EditorPrefs.SetBool("MerinoWindowsLineEnding", useWindowsLineEnding );
EditorPrefs.SetInt("MerinoTabSize", tabSize );
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10047_metadata.json",
"conflict_index": 2
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
[Fact]
public void ShouldGetCorrectSqlQueryForWhereIn()
||||||| base
[Test]
public void ShouldGetCorrectSqlQueryForWhereIn()
=======
[Test]
public void ShouldGetCorrectSqlQueryForWhereInUsingWhereString()
>>>>>>> theirs
### Resolution:
[Fact]
public void ShouldGetCorrectSqlQueryForWhereInUsingWhereString()
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10052_metadata.json",
"conflict_index": 0
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
[Fact]
||||||| base
[Test]
=======
[Test]
public void ShouldGetCorrectSqlQueryForWhereInUsingWhereArray()
{
const string expectedSql = "SELECT * FROM dbo.[Project] WHERE ([State] IN (@queued, @running)) ORDER BY [Id]";
var queryBuilder = new QueryBuilder<IDocument>(transaction, "Project")
.Where("State", SqlOperand.In, new[] {State.Queued, State.Running });
queryBuilder.DebugViewRawQuery().Should().Be(expectedSql);
}
[Test]
>>>>>>> theirs
### Resolution:
[Fact]
public void ShouldGetCorrectSqlQueryForWhereInUsingWhereArray()
{
const string expectedSql = "SELECT * FROM dbo.[Project] WHERE ([State] IN (@queued, @running)) ORDER BY [Id]";
var queryBuilder = new QueryBuilder<IDocument>(transaction, "Project")
.Where("State", SqlOperand.In, new[] {State.Queued, State.Running });
queryBuilder.DebugViewRawQuery().Should().Be(expectedSql);
}
[Fact]
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10052_metadata.json",
"conflict_index": 1
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
public IBLFilterGGX(RenderPipelineResources renderPipelinesResources)
||||||| base
public bool supportMis
{
get { return !TextureCache.isMobileBuildTarget; }
}
public IBLFilterGGX(RenderPipelineResources renderPipelinesResources)
=======
public bool supportMis
{
get { return !TextureCache.isMobileBuildTarget; }
}
public IBLFilterGGX(RenderPipelineResources renderPipelineResources)
>>>>>>> theirs
### Resolution:
public IBLFilterGGX(RenderPipelineResources renderPipelineResources)
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\1010_metadata.json",
"conflict_index": 0
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
[assembly: InternalsVisibleTo("Unity.RenderPipelines.Universal.Editor")]
||||||| base
[assembly: InternalsVisibleTo("Unity.RenderPipelines.Lightweight.Editor")]
=======
[assembly: InternalsVisibleTo("Unity.ShaderGraph.GraphicsTests")]
[assembly: InternalsVisibleTo("Unity.ShaderGraph.Editor.GraphicsTests")]
[assembly: InternalsVisibleTo("Unity.RenderPipelines.Lightweight.Editor")]
>>>>>>> theirs
### Resolution:
[assembly: InternalsVisibleTo("Unity.RenderPipelines.Universal.Editor")]
[assembly: InternalsVisibleTo("Unity.ShaderGraph.GraphicsTests")]
[assembly: InternalsVisibleTo("Unity.ShaderGraph.Editor.GraphicsTests")]
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\1014_metadata.json",
"conflict_index": 0
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
/// Looks up a localized string similar to Move to the end of the line..
/// </summary>
internal static string MoveToEndOfLineDescription {
get {
return ResourceManager.GetString("MoveToEndOfLineDescription", resourceCulture);
}
}
/// <summary>
||||||| base
=======
/// Looks up a localized string similar to Complete the input if there is a single completion, otherwise complete the input by selecting from a menu of possible completions..
/// </summary>
internal static string MenuCompleteDescription {
get {
return ResourceManager.GetString("MenuCompleteDescription", resourceCulture);
}
}
/// <summary>
>>>>>>> theirs
### Resolution:
/// Looks up a localized string similar to Complete the input if there is a single completion, otherwise complete the input by selecting from a menu of possible completions..
/// </summary>
internal static string MenuCompleteDescription {
get {
return ResourceManager.GetString("MenuCompleteDescription", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Move to the end of the line..
/// </summary>
internal static string MoveToEndOfLineDescription {
get {
return ResourceManager.GetString("MoveToEndOfLineDescription", resourceCulture);
}
}
/// <summary>
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10150_metadata.json",
"conflict_index": 0
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
/// Looks up a localized string similar to Searches backward for the perscribed character..
/// </summary>
internal static string SearchBackwardCharDescription {
get {
return ResourceManager.GetString("SearchBackwardCharDescription", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Starts a new seach backward in the history..
/// </summary>
internal static string SearchBackwardDescription {
get {
return ResourceManager.GetString("SearchBackwardDescription", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Move to the previous occurance of the specified character..
/// </summary>
internal static string SearchCharBackwardDescription {
get {
return ResourceManager.GetString("SearchCharBackwardDescription", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Move to the previous occurance of the specified character and then forward one character..
/// </summary>
internal static string SearchCharBackwardWithBackoffDescription {
get {
return ResourceManager.GetString("SearchCharBackwardWithBackoffDescription", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Move to the next occurance of the specified character..
/// </summary>
internal static string SearchCharDescription {
get {
return ResourceManager.GetString("SearchCharDescription", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Move to he next occurance of the specified character and then back one character..
/// </summary>
internal static string SearchCharWithBackoffDescription {
get {
return ResourceManager.GetString("SearchCharWithBackoffDescription", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Searches for the perscribed character in the perscribed direction..
/// </summary>
internal static string SearchDescription {
get {
return ResourceManager.GetString("SearchDescription", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Prompts for a search string and initiates a search upon AcceptLine..
/// </summary>
internal static string SearchForwardDescription {
get {
return ResourceManager.GetString("SearchForwardDescription", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Select the entire line. Moves the cursor to the end of the line.
/// </summary>
internal static string SelectAllDescription {
get {
return ResourceManager.GetString("SelectAllDescription", resourceCulture);
}
}
/// <summary>
||||||| base
=======
/// Looks up a localized string similar to Select the entire line. Moves the cursor to the end of the line.
/// </summary>
internal static string SelectAllDescription {
get {
return ResourceManager.GetString("SelectAllDescription", resourceCulture);
}
}
/// <summary>
>>>>>>> theirs
### Resolution:
/// Looks up a localized string similar to Searches backward for the perscribed character..
/// </summary>
internal static string SearchBackwardCharDescription {
get {
return ResourceManager.GetString("SearchBackwardCharDescription", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Starts a new seach backward in the history..
/// </summary>
internal static string SearchBackwardDescription {
get {
return ResourceManager.GetString("SearchBackwardDescription", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Move to the previous occurance of the specified character..
/// </summary>
internal static string SearchCharBackwardDescription {
get {
return ResourceManager.GetString("SearchCharBackwardDescription", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Move to the previous occurance of the specified character and then forward one character..
/// </summary>
internal static string SearchCharBackwardWithBackoffDescription {
get {
return ResourceManager.GetString("SearchCharBackwardWithBackoffDescription", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Move to the next occurance of the specified character..
/// </summary>
internal static string SearchCharDescription {
get {
return ResourceManager.GetString("SearchCharDescription", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Move to he next occurance of the specified character and then back one character..
/// </summary>
internal static string SearchCharWithBackoffDescription {
get {
return ResourceManager.GetString("SearchCharWithBackoffDescription", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Searches for the perscribed character in the perscribed direction..
/// </summary>
internal static string SearchDescription {
get {
return ResourceManager.GetString("SearchDescription", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Prompts for a search string and initiates a search upon AcceptLine..
/// </summary>
internal static string SearchForwardDescription {
get {
return ResourceManager.GetString("SearchForwardDescription", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Select the entire line. Moves the cursor to the end of the line.
/// </summary>
internal static string SelectAllDescription {
get {
return ResourceManager.GetString("SelectAllDescription", resourceCulture);
}
}
/// <summary>
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10150_metadata.json",
"conflict_index": 1
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
// If the Url parameter only contains whitespaces or is empty return with BadRequest.
if (string.IsNullOrWhiteSpace(input.Url))
{
return req.CreateErrorResponse(HttpStatusCode.BadRequest, "The url parameter can not be empty.");
}
||||||| base
=======
// Validates if input.url is a valid aboslute url, aka is a complete refrence to the resource, ex: http(s)://google.com
if (!Uri.IsWellFormedUriString(input.Url, UriKind.Absolute))
{
return req.CreateErrorResponse(HttpStatusCode.BadRequest, $"{input.Url} is not a valid absolute Url. The Url parameter must start with 'http://' or 'http://'.");
}
>>>>>>> theirs
### Resolution:
// If the Url parameter only contains whitespaces or is empty return with BadRequest.
if (string.IsNullOrWhiteSpace(input.Url))
{
return req.CreateErrorResponse(HttpStatusCode.BadRequest, "The url parameter can not be empty.");
}
// Validates if input.url is a valid aboslute url, aka is a complete refrence to the resource, ex: http(s)://google.com
if (!Uri.IsWellFormedUriString(input.Url, UriKind.Absolute))
{
return req.CreateErrorResponse(HttpStatusCode.BadRequest, $"{input.Url} is not a valid absolute Url. The Url parameter must start with 'http://' or 'http://'.");
}
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10167_metadata.json",
"conflict_index": 0
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
using (new Utilities.ProfilingSample("Build Light list and render shadows", renderContext))
{
// TODO: Everything here (SSAO, Shadow, Build light list, material and light classification can be parallelize with Async compute)
m_SsaoEffect.Render(m_Asset.ssaoSettingsToUse, hdCamera, renderContext, GetDepthTexture(), m_Asset.renderingSettings.useForwardRenderingOnly);
m_LightLoop.PrepareLightsForGPU(m_Asset.shadowSettings, cullResults, camera);
m_LightLoop.RenderShadows(renderContext, cullResults);
renderContext.SetupCameraProperties(camera); // Need to recall SetupCameraProperties after m_ShadowPass.Render
m_LightLoop.BuildGPULightLists(camera, renderContext, m_CameraDepthStencilBufferRT);
}
||||||| base
using (new Utilities.ProfilingSample("Build Light list and render shadows", renderContext))
{
m_LightLoop.PrepareLightsForGPU(m_Asset.shadowSettings, cullResults, camera);
m_LightLoop.RenderShadows(renderContext, cullResults);
renderContext.SetupCameraProperties(camera); // Need to recall SetupCameraProperties after m_ShadowPass.Render
m_LightLoop.BuildGPULightLists(camera, renderContext, m_CameraDepthStencilBufferRT); // TODO: Use async compute here to run light culling during shadow
}
=======
m_LightLoop.PrepareLightsForGPU(m_Asset.shadowSettings, cullResults, camera);
m_LightLoop.RenderShadows(renderContext, cullResults);
renderContext.SetupCameraProperties(camera); // Need to recall SetupCameraProperties after m_ShadowPass.Render
m_LightLoop.BuildGPULightLists(camera, renderContext, m_CameraDepthStencilBufferRT); // TODO: Use async compute here to run light culling during shadow
>>>>>>> theirs
### Resolution:
// TODO: Everything here (SSAO, Shadow, Build light list, material and light classification can be parallelize with Async compute)
m_SsaoEffect.Render(m_Asset.ssaoSettingsToUse, hdCamera, renderContext, GetDepthTexture(), m_Asset.renderingSettings.useForwardRenderingOnly);
m_LightLoop.PrepareLightsForGPU(m_Asset.shadowSettings, cullResults, camera);
m_LightLoop.RenderShadows(renderContext, cullResults);
renderContext.SetupCameraProperties(camera); // Need to recall SetupCameraProperties after m_ShadowPass.Render
m_LightLoop.BuildGPULightLists(camera, renderContext, m_CameraDepthStencilBufferRT);
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\1016_metadata.json",
"conflict_index": 0
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
||||||| base
using System.Text;
using System.Collections.Generic;
=======
using System.Collections.Generic;
>>>>>>> theirs
### Resolution:
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10189_metadata.json",
"conflict_index": 0
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
AssertRegistrationsAreSame(r => r.Name, "", "special");
||||||| base
AssertRegistrationsAreSame(r => r.Name, "", "special");
=======
this.AssertRegistrationsAreSame(r => r.Name, String.Empty, "special");
>>>>>>> theirs
### Resolution:
this.AssertRegistrationsAreSame(r => r.Name, String.Empty, "special");
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10189_metadata.json",
"conflict_index": 1
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
CollectionAssertExtensions.AreEqual(expectedStrings, container.Registrations.Select(selector).ToList());
||||||| base
CollectionAssert.AreEqual(expectedStrings, container.Registrations.Select(selector).ToList());
=======
CollectionAssert.AreEqual(expectedStrings, this.container.Registrations.Select(selector).ToList());
>>>>>>> theirs
### Resolution:
CollectionAssertExtensions.AreEqual(expectedStrings, this.container.Registrations.Select(selector).ToList());
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10189_metadata.json",
"conflict_index": 2
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
||||||| base
using System;
using System.Text;
using System.Collections.Generic;
=======
using System;
using System.Collections.Generic;
>>>>>>> theirs
### Resolution:
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10195_metadata.json",
"conflict_index": 0
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
CollectionAssertExtensions.AreEqual(
new[] { "string", "int", "ILogger", "MockLogger", "SpecialLogger", "DependentConstructor", "TwoConstructorArgs", "MockDatabase" },
Section.TypeAliases.Select(a => a.Alias).ToList());
||||||| base
CollectionAssert.AreEqual(
new [] { "string", "int", "ILogger", "MockLogger", "SpecialLogger", "DependentConstructor", "TwoConstructorArgs", "MockDatabase" },
Section.TypeAliases.Select(a => a.Alias).ToList());
=======
CollectionAssert.AreEqual(
new[] { "string", "int", "ILogger", "MockLogger", "SpecialLogger", "DependentConstructor", "TwoConstructorArgs", "MockDatabase" },
section.TypeAliases.Select(a => a.Alias).ToList());
>>>>>>> theirs
### Resolution:
CollectionAssertExtensions.AreEqual(
new[] { "string", "int", "ILogger", "MockLogger", "SpecialLogger", "DependentConstructor", "TwoConstructorArgs", "MockDatabase" },
section.TypeAliases.Select(a => a.Alias).ToList());
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10195_metadata.json",
"conflict_index": 1
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
CollectionAssertExtensions.AreEqual(new[] { "", "two" },
Section.Containers.Select(c => c.Name).ToList());
||||||| base
CollectionAssert.AreEqual(new[] {"", "two"},
Section.Containers.Select(c => c.Name).ToList());
=======
CollectionAssert.AreEqual(new[] { String.Empty, "two" },
section.Containers.Select(c => c.Name).ToList());
>>>>>>> theirs
### Resolution:
CollectionAssertExtensions.AreEqual(new[] { String.Empty, "two" },
section.Containers.Select(c => c.Name).ToList());
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10209_metadata.json",
"conflict_index": 0
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
using DependencyAttribute=Microsoft.Practices.ObjectBuilder2.Tests.TestDoubles.DependencyAttribute;
using InjectionConstructorAttribute=Microsoft.Practices.ObjectBuilder2.Tests.TestDoubles.InjectionConstructorAttribute;
using InjectionMethodAttribute=Microsoft.Practices.ObjectBuilder2.Tests.TestDoubles.InjectionMethodAttribute;
#if NETFX_CORE
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
#elif __IOS__
using NUnit.Framework;
using TestClassAttribute = NUnit.Framework.TestFixtureAttribute;
using TestMethodAttribute = NUnit.Framework.TestAttribute;
using TestInitializeAttribute = NUnit.Framework.SetUpAttribute;
#else
using Microsoft.VisualStudio.TestTools.UnitTesting;
#endif
||||||| base
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using DependencyAttribute=Microsoft.Practices.ObjectBuilder2.Tests.TestDoubles.DependencyAttribute;
using InjectionConstructorAttribute=Microsoft.Practices.ObjectBuilder2.Tests.TestDoubles.InjectionConstructorAttribute;
using InjectionMethodAttribute=Microsoft.Practices.ObjectBuilder2.Tests.TestDoubles.InjectionMethodAttribute;
=======
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using DependencyAttribute = Microsoft.Practices.ObjectBuilder2.Tests.TestDoubles.DependencyAttribute;
using InjectionConstructorAttribute = Microsoft.Practices.ObjectBuilder2.Tests.TestDoubles.InjectionConstructorAttribute;
using InjectionMethodAttribute = Microsoft.Practices.ObjectBuilder2.Tests.TestDoubles.InjectionMethodAttribute;
>>>>>>> theirs
### Resolution:
#if NETFX_CORE
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
#elif __IOS__
using NUnit.Framework;
using TestClassAttribute = NUnit.Framework.TestFixtureAttribute;
using TestMethodAttribute = NUnit.Framework.TestAttribute;
using TestInitializeAttribute = NUnit.Framework.SetUpAttribute;
#else
using Microsoft.VisualStudio.TestTools.UnitTesting;
#endif
using DependencyAttribute = Microsoft.Practices.ObjectBuilder2.Tests.TestDoubles.DependencyAttribute;
using InjectionConstructorAttribute = Microsoft.Practices.ObjectBuilder2.Tests.TestDoubles.InjectionConstructorAttribute;
using InjectionMethodAttribute = Microsoft.Practices.ObjectBuilder2.Tests.TestDoubles.InjectionMethodAttribute;
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10210_metadata.json",
"conflict_index": 0
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
AssertExtensions.IsInstanceOfType(accountResult, typeof(LoggingCommand<Account>));
||||||| base
Assert.IsInstanceOfType(accountResult, typeof(LoggingCommand<Account>));
=======
Assert.IsInstanceOfType(accountResult, typeof(LoggingCommand<Account>));
>>>>>>> theirs
### Resolution:
AssertExtensions.IsInstanceOfType(accountResult, typeof(LoggingCommand<Account>));
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10214_metadata.json",
"conflict_index": 0
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
AssertExtensions.IsInstanceOfType(actualResult.inner, typeof(ConcreteCommand<Account>));
||||||| base
Assert.IsInstanceOfType(actualResult.inner, typeof(ConcreteCommand<Account>));
=======
Assert.IsInstanceOfType(actualResult.Inner, typeof(ConcreteCommand<Account>));
>>>>>>> theirs
### Resolution:
AssertExtensions.IsInstanceOfType(actualResult.Inner, typeof(ConcreteCommand<Account>));
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10214_metadata.json",
"conflict_index": 1
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
AssertExtensions.IsInstanceOfType(logCmd.Inner, typeof(ConcreteCommand<Nullable<Customer>>));
||||||| base
Assert.IsInstanceOfType(logCmd.Inner, typeof(ConcreteCommand<Nullable<Customer>>));
=======
Assert.IsInstanceOfType(logCmd.Inner, typeof(ConcreteCommand<Customer?>));
>>>>>>> theirs
### Resolution:
AssertExtensions.IsInstanceOfType(logCmd.Inner, typeof(ConcreteCommand<Customer?>));
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10214_metadata.json",
"conflict_index": 2
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
||||||| base
using System;
using System.Text;
using System.Collections.Generic;
=======
using System;
using System.Collections.Generic;
>>>>>>> theirs
### Resolution:
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10216_metadata.json",
"conflict_index": 0
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
CollectionAssertExtensions.AreEqual(new[] { "int", "string" },
Section.TypeAliases.Select(alias => alias.Alias).ToList());
||||||| base
CollectionAssert.AreEqual(new [] {"int", "string"},
Section.TypeAliases.Select(alias => alias.Alias).ToList());
=======
CollectionAssert.AreEqual(new[] { "int", "string" },
section.TypeAliases.Select(alias => alias.Alias).ToList());
>>>>>>> theirs
### Resolution:
CollectionAssertExtensions.AreEqual(new[] { "int", "string" },
section.TypeAliases.Select(alias => alias.Alias).ToList());
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10216_metadata.json",
"conflict_index": 1
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Fiddler;
using Grabacr07.KanColleWrapper.Models.Raw;
namespace Grabacr07.KanColleWrapper.Models
{
/// <summary>
/// 母港に所属している艦娘を表します。
/// </summary>
public class Ship : RawDataWrapper<kcsapi_ship2>, IIdentifiable
{
private readonly Homeport homeport;
/// <summary>
/// この艦娘を識別する ID を取得します。
/// </summary>
public int Id
{
get { return this.RawData.api_id; }
}
/// <summary>
/// 艦娘の種類に基づく情報を取得します。
/// </summary>
public ShipInfo Info { get; private set; }
public int SortNumber
{
get { return this.RawData.api_sortno; }
}
/// <summary>
/// 艦娘の現在のレベルを取得します。
/// </summary>
public int Level
{
get { return this.RawData.api_lv; }
}
/// <summary>
/// 艦娘の現在の累積経験値を取得します。
/// </summary>
public int Exp
{
get { return this.RawData.api_exp; }
}
/// <summary>
/// この艦娘が次のレベルに上がるために必要な経験値を取得します。
/// </summary>
public int ExpForNextLevel
{
get { return Experience.GetShipExpForNextLevel(this.RawData.api_lv, this.RawData.api_exp); }
}
/// <summary>
/// 耐久値を取得します。
/// </summary>
public LimitedValue HP { get; private set; }
/// <summary>
/// 燃料を取得します。
/// </summary>
public LimitedValue Fuel { get; private set; }
/// <summary>
/// 弾薬を取得します。
/// </summary>
public LimitedValue Bull { get; private set; }
/// <summary>
/// 火力ステータス値を取得します。
/// </summary>
public ModernizableStatus Firepower { get; private set; }
/// <summary>
/// 雷装ステータス値を取得します。
/// </summary>
public ModernizableStatus Torpedo { get; private set; }
/// <summary>
/// 対空ステータス値を取得します。
/// </summary>
public ModernizableStatus AA { get; private set; }
/// <summary>
/// 装甲ステータス値を取得します。
/// </summary>
public ModernizableStatus Armer { get; private set; }
/// <summary>
/// 現在のコンディション値を取得します。
/// </summary>
public int Condition
{
get { return this.RawData.api_cond; }
}
/// <summary>
/// コンディションの種類を示す <see cref="ConditionType" /> 値を取得します。
/// </summary>
public ConditionType ConditionType
{
get { return ConditionTypeHelper.ToConditionType(this.RawData.api_cond); }
}
public SlotItem[] SlotItems { get; private set; }
public int[] OnSlot { get; private set; }
internal Ship(Homeport parent, kcsapi_ship2 rawData)
: base(rawData)
{
this.homeport = parent;
this.Info = KanColleClient.Current.Master.Ships[rawData.api_ship_id] ?? ShipInfo.Dummy;
this.HP = new LimitedValue(this.RawData.api_nowhp, this.RawData.api_maxhp, 0);
this.Fuel = new LimitedValue(this.RawData.api_fuel, this.Info.RawData.api_fuel_max, 0);
this.Bull = new LimitedValue(this.RawData.api_bull, this.Info.RawData.api_bull_max, 0);
if (this.RawData.api_kyouka.Length == 4)
{
this.Firepower = new ModernizableStatus(this.Info.RawData.api_houg, this.RawData.api_kyouka[0]);
this.Torpedo = new ModernizableStatus(this.Info.RawData.api_raig, this.RawData.api_kyouka[1]);
this.AA = new ModernizableStatus(this.Info.RawData.api_tyku, this.RawData.api_kyouka[2]);
this.Armer = new ModernizableStatus(this.Info.RawData.api_souk, this.RawData.api_kyouka[3]);
}
this.SlotItems = this.RawData.api_slot.Select(id => this.homeport.SlotItems[id]).Where(x => x != null).ToArray();
this.OnSlot = this.RawData.api_onslot;
}
public override string ToString()
{
return string.Format("ID = {0}, Name = \"{1}\", ShipType = \"{2}\", Level = {3}", this.Id, this.Info.Name, this.Info.ShipType.Name, this.Level);
}
}
}
||||||| base
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Fiddler;
using Grabacr07.KanColleWrapper.Models.Raw;
namespace Grabacr07.KanColleWrapper.Models
{
/// <summary>
/// 母港に所属している艦娘を表します。
/// </summary>
public class Ship : RawDataWrapper<kcsapi_ship2>, IIdentifiable
{
private readonly Homeport homeport;
/// <summary>
/// この艦娘を識別する ID を取得します。
/// </summary>
public int Id
{
get { return this.RawData.api_id; }
}
/// <summary>
/// 艦娘の種類に基づく情報を取得します。
/// </summary>
public ShipInfo Info { get; private set; }
public int SortNumber
{
get { return this.RawData.api_sortno; }
}
/// <summary>
/// 艦娘の現在のレベルを取得します。
/// </summary>
public int Level
{
get { return this.RawData.api_lv; }
}
/// <summary>
/// 艦娘の現在の累積経験値を取得します。
/// </summary>
public int Exp
{
get { return this.RawData.api_exp; }
}
/// <summary>
/// この艦娘が次のレベルに上がるために必要な経験値を取得します。
/// </summary>
public int ExpForNextLevel
{
get { return Experience.GetShipExpForNextLevel(this.RawData.api_lv, this.RawData.api_exp); }
}
/// <summary>
/// 耐久値を取得します。
/// </summary>
public LimitedValue HP { get; private set; }
/// <summary>
/// 燃料を取得します。
/// </summary>
public LimitedValue Fuel { get; private set; }
/// <summary>
/// 弾薬を取得します。
/// </summary>
public LimitedValue Bull { get; private set; }
/// <summary>
/// 火力ステータス値を取得します。
/// </summary>
public ModernizableStatus Firepower { get; private set; }
/// <summary>
/// 雷装ステータス値を取得します。
/// </summary>
public ModernizableStatus Torpedo { get; private set; }
/// <summary>
/// 対空ステータス値を取得します。
/// </summary>
public ModernizableStatus AA { get; private set; }
/// <summary>
/// 装甲ステータス値を取得します。
/// </summary>
public ModernizableStatus Armer { get; private set; }
/// <summary>
/// 現在のコンディション値を取得します。
/// </summary>
public int Condition
{
get { return this.RawData.api_cond; }
}
/// <summary>
/// コンディションの種類を示す <see cref="ConditionType" /> 値を取得します。
/// </summary>
public ConditionType ConditionType
{
get { return ConditionTypeHelper.ToConditionType(this.RawData.api_cond); }
}
public SlotItem[] SlotItems { get; private set; }
internal Ship(Homeport parent, kcsapi_ship2 rawData)
: base(rawData)
{
this.homeport = parent;
this.Info = KanColleClient.Current.Master.Ships[rawData.api_ship_id] ?? ShipInfo.Dummy;
this.HP = new LimitedValue(this.RawData.api_nowhp, this.RawData.api_maxhp, 0);
this.Fuel = new LimitedValue(this.RawData.api_fuel, this.Info.RawData.api_fuel_max, 0);
this.Bull = new LimitedValue(this.RawData.api_bull, this.Info.RawData.api_bull_max, 0);
if (this.RawData.api_kyouka.Length == 4)
{
this.Firepower = new ModernizableStatus(this.Info.RawData.api_houg, this.RawData.api_kyouka[0]);
this.Torpedo = new ModernizableStatus(this.Info.RawData.api_raig, this.RawData.api_kyouka[1]);
this.AA = new ModernizableStatus(this.Info.RawData.api_tyku, this.RawData.api_kyouka[2]);
this.Armer = new ModernizableStatus(this.Info.RawData.api_souk, this.RawData.api_kyouka[3]);
}
this.SlotItems = this.RawData.api_slot.Select(id => this.homeport.SlotItems[id]).Where(x => x != null).ToArray();
}
public override string ToString()
{
return string.Format("ID = {0}, Name = \"{1}\", ShipType = \"{2}\", Level = {3}", this.Id, this.Info.Name, this.Info.ShipType.Name, this.Level);
}
}
}
=======
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Fiddler;
using Grabacr07.KanColleWrapper.Internal;
using Grabacr07.KanColleWrapper.Models.Raw;
namespace Grabacr07.KanColleWrapper.Models
{
/// <summary>
/// 母港に所属している艦娘を表します。
/// </summary>
public class Ship : RawDataWrapper<kcsapi_ship2>, IIdentifiable
{
private readonly Homeport homeport;
/// <summary>
/// この艦娘を識別する ID を取得します。
/// </summary>
public int Id
{
get { return this.RawData.api_id; }
}
/// <summary>
/// 艦娘の種類に基づく情報を取得します。
/// </summary>
public ShipInfo Info { get; private set; }
public int SortNumber
{
get { return this.RawData.api_sortno; }
}
/// <summary>
/// 艦娘の現在のレベルを取得します。
/// </summary>
public int Level
{
get { return this.RawData.api_lv; }
}
/// <summary>
/// 艦娘の現在の累積経験値を取得します。
/// </summary>
public int Exp
{
get { return this.RawData.api_exp.Get(0) ?? 0; }
}
/// <summary>
/// この艦娘が次のレベルに上がるために必要な経験値を取得します。
/// </summary>
public int ExpForNextLevel
{
get { return this.RawData.api_exp.Get(1) ?? 0; }
}
/// <summary>
/// 耐久値を取得します。
/// </summary>
public LimitedValue HP { get; private set; }
/// <summary>
/// 燃料を取得します。
/// </summary>
public LimitedValue Fuel { get; private set; }
/// <summary>
/// 弾薬を取得します。
/// </summary>
public LimitedValue Bull { get; private set; }
/// <summary>
/// 火力ステータス値を取得します。
/// </summary>
public ModernizableStatus Firepower { get; private set; }
/// <summary>
/// 雷装ステータス値を取得します。
/// </summary>
public ModernizableStatus Torpedo { get; private set; }
/// <summary>
/// 対空ステータス値を取得します。
/// </summary>
public ModernizableStatus AA { get; private set; }
/// <summary>
/// 装甲ステータス値を取得します。
/// </summary>
public ModernizableStatus Armer { get; private set; }
/// <summary>
/// 現在のコンディション値を取得します。
/// </summary>
public int Condition
{
get { return this.RawData.api_cond; }
}
/// <summary>
/// コンディションの種類を示す <see cref="ConditionType" /> 値を取得します。
/// </summary>
public ConditionType ConditionType
{
get { return ConditionTypeHelper.ToConditionType(this.RawData.api_cond); }
}
public SlotItem[] SlotItems { get; private set; }
internal Ship(Homeport parent, kcsapi_ship2 rawData)
: base(rawData)
{
this.homeport = parent;
this.Info = KanColleClient.Current.Master.Ships[rawData.api_ship_id] ?? ShipInfo.Dummy;
this.HP = new LimitedValue(this.RawData.api_nowhp, this.RawData.api_maxhp, 0);
this.Fuel = new LimitedValue(this.RawData.api_fuel, this.Info.RawData.api_fuel_max, 0);
this.Bull = new LimitedValue(this.RawData.api_bull, this.Info.RawData.api_bull_max, 0);
if (this.RawData.api_kyouka.Length == 4)
{
this.Firepower = new ModernizableStatus(this.Info.RawData.api_houg, this.RawData.api_kyouka[0]);
this.Torpedo = new ModernizableStatus(this.Info.RawData.api_raig, this.RawData.api_kyouka[1]);
this.AA = new ModernizableStatus(this.Info.RawData.api_tyku, this.RawData.api_kyouka[2]);
this.Armer = new ModernizableStatus(this.Info.RawData.api_souk, this.RawData.api_kyouka[3]);
}
this.SlotItems = this.RawData.api_slot.Select(id => this.homeport.SlotItems[id]).Where(x => x != null).ToArray();
}
public override string ToString()
{
return string.Format("ID = {0}, Name = \"{1}\", ShipType = \"{2}\", Level = {3}", this.Id, this.Info.Name, this.Info.ShipType.Name, this.Level);
}
}
}
>>>>>>> theirs
### Resolution:
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Fiddler;
using Grabacr07.KanColleWrapper.Internal;
using Grabacr07.KanColleWrapper.Models.Raw;
namespace Grabacr07.KanColleWrapper.Models
{
/// <summary>
/// 母港に所属している艦娘を表します。
/// </summary>
public class Ship : RawDataWrapper<kcsapi_ship2>, IIdentifiable
{
private readonly Homeport homeport;
/// <summary>
/// この艦娘を識別する ID を取得します。
/// </summary>
public int Id
{
get { return this.RawData.api_id; }
}
/// <summary>
/// 艦娘の種類に基づく情報を取得します。
/// </summary>
public ShipInfo Info { get; private set; }
public int SortNumber
{
get { return this.RawData.api_sortno; }
}
/// <summary>
/// 艦娘の現在のレベルを取得します。
/// </summary>
public int Level
{
get { return this.RawData.api_lv; }
}
/// <summary>
/// 艦娘の現在の累積経験値を取得します。
/// </summary>
public int Exp
{
get { return this.RawData.api_exp.Get(0) ?? 0; }
}
/// <summary>
/// この艦娘が次のレベルに上がるために必要な経験値を取得します。
/// </summary>
public int ExpForNextLevel
{
get { return this.RawData.api_exp.Get(1) ?? 0; }
}
/// <summary>
/// 耐久値を取得します。
/// </summary>
public LimitedValue HP { get; private set; }
/// <summary>
/// 燃料を取得します。
/// </summary>
public LimitedValue Fuel { get; private set; }
/// <summary>
/// 弾薬を取得します。
/// </summary>
public LimitedValue Bull { get; private set; }
/// <summary>
/// 火力ステータス値を取得します。
/// </summary>
public ModernizableStatus Firepower { get; private set; }
/// <summary>
/// 雷装ステータス値を取得します。
/// </summary>
public ModernizableStatus Torpedo { get; private set; }
/// <summary>
/// 対空ステータス値を取得します。
/// </summary>
public ModernizableStatus AA { get; private set; }
/// <summary>
/// 装甲ステータス値を取得します。
/// </summary>
public ModernizableStatus Armer { get; private set; }
/// <summary>
/// 現在のコンディション値を取得します。
/// </summary>
public int Condition
{
get { return this.RawData.api_cond; }
}
/// <summary>
/// コンディションの種類を示す <see cref="ConditionType" /> 値を取得します。
/// </summary>
public ConditionType ConditionType
{
get { return ConditionTypeHelper.ToConditionType(this.RawData.api_cond); }
}
public SlotItem[] SlotItems { get; private set; }
public int[] OnSlot { get; private set; }
internal Ship(Homeport parent, kcsapi_ship2 rawData)
: base(rawData)
{
this.homeport = parent;
this.Info = KanColleClient.Current.Master.Ships[rawData.api_ship_id] ?? ShipInfo.Dummy;
this.HP = new LimitedValue(this.RawData.api_nowhp, this.RawData.api_maxhp, 0);
this.Fuel = new LimitedValue(this.RawData.api_fuel, this.Info.RawData.api_fuel_max, 0);
this.Bull = new LimitedValue(this.RawData.api_bull, this.Info.RawData.api_bull_max, 0);
if (this.RawData.api_kyouka.Length == 4)
{
this.Firepower = new ModernizableStatus(this.Info.RawData.api_houg, this.RawData.api_kyouka[0]);
this.Torpedo = new ModernizableStatus(this.Info.RawData.api_raig, this.RawData.api_kyouka[1]);
this.AA = new ModernizableStatus(this.Info.RawData.api_tyku, this.RawData.api_kyouka[2]);
this.Armer = new ModernizableStatus(this.Info.RawData.api_souk, this.RawData.api_kyouka[3]);
}
this.SlotItems = this.RawData.api_slot.Select(id => this.homeport.SlotItems[id]).Where(x => x != null).ToArray();
this.OnSlot = this.RawData.api_onslot;
}
public override string ToString()
{
return string.Format("ID = {0}, Name = \"{1}\", ShipType = \"{2}\", Level = {3}", this.Id, this.Info.Name, this.Info.ShipType.Name, this.Level);
}
}
} | {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10219_metadata.json",
"conflict_index": 0
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
// NOTE: When updating the version, you also need to update the Identity/@Version
// attribtute in src\NuProj.Package\source.extension.vsixmanifest.
[assembly: AssemblyVersion("0.9.2.0")]
[assembly: AssemblyFileVersion("0.9.2.0")]
||||||| base
[assembly: AssemblyVersion("0.9.2.0")]
[assembly: AssemblyFileVersion("0.9.2.0")]
=======
[assembly: AssemblyVersion("0.9.3.0")]
[assembly: AssemblyFileVersion("0.9.3.0")]
>>>>>>> theirs
### Resolution:
// NOTE: When updating the version, you also need to update the Identity/@Version
// attribtute in src\NuProj.Package\source.extension.vsixmanifest.
[assembly: AssemblyVersion("0.9.3.0")]
[assembly: AssemblyFileVersion("0.9.3.0")] | {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10234_metadata.json",
"conflict_index": 0
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
||||||| base
using System.IO;
=======
using System.Collections.Generic;
using System.IO;
>>>>>>> theirs
### Resolution:
using System.Collections.Generic;
using System.IO;
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10235_metadata.json",
"conflict_index": 0
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
||||||| base
using System.Reflection;
=======
using System.Reflection;
using System.Runtime.Versioning;
>>>>>>> theirs
### Resolution:
using System.Reflection;
using System.Runtime.Versioning;
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10235_metadata.json",
"conflict_index": 1
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
using Castle.IO;
using Castle.IO.Internal;
using Castle.MicroKernel;
using Castle.MicroKernel.Facilities;
using Castle.MicroKernel.Registration;
using Castle.MicroKernel.SubSystems.Naming;
using Castle.Transactions;
using Castle.Transactions.Activities;
using Castle.Transactions.Internal;
using Castle.Transactions.IO;
using NLog;
namespace Castle.Facilities.AutoTx
{
using Castle.Transactions.Helpers;
||||||| base
namespace Castle.Facilities.Transactions
{
using System.Linq;
using Activities;
using Core.Logging;
using IO;
using MicroKernel;
using MicroKernel.Facilities;
using MicroKernel.Registration;
using MicroKernel.SubSystems.Naming;
using Registration;
=======
using Castle.Facilities.AutoTx.Registration;
using Castle.MicroKernel.Facilities;
using Castle.MicroKernel.Registration;
using Castle.Core.Logging;
using Castle.Services.Transaction;
using Castle.Services.Transaction.Activities;
using Castle.Services.Transaction.IO;
>>>>>>> theirs
### Resolution:
using Castle.IO;
using Castle.IO.Internal;
using Castle.MicroKernel;
using Castle.MicroKernel.Facilities;
using Castle.MicroKernel.Registration;
using Castle.MicroKernel.SubSystems.Naming;
using Castle.Transactions;
using Castle.Transactions.Activities;
using Castle.Transactions.Internal;
using Castle.Transactions.IO;
using NLog;
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10257_metadata.json",
"conflict_index": 0
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
private static readonly Logger _Logger = LogManager.GetCurrentClassLogger();
||||||| base
private ILogger _Logger = NullLogger.Instance;
public ILogger Logger
{
get { return _Logger; }
set { _Logger = value; }
}
=======
>>>>>>> theirs
### Resolution:
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10257_metadata.json",
"conflict_index": 1
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
<add name=""tx"" type=""Castle.Transactions.Logging.TraceListener, Castle.Transactions""/>
||||||| base
<add name=""tx"" type=""Castle.Facilities.Transactions.Internal.TxTraceListener, Castle.Facilities.Transactions""/>
=======
<add name=""tx"" type=""Castle.Services.Transaction.Internal.TxTraceListener, Castle.Services.Transaction""/>
>>>>>>> theirs
### Resolution:
<add name=""tx"" type=""Castle.Transactions.Logging.TraceListener, Castle.Transactions""/>
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10257_metadata.json",
"conflict_index": 3
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
private static readonly Logger _Logger = LogManager.GetCurrentClassLogger();
||||||| base
private ILogger _Logger = NullLogger.Instance;
=======
>>>>>>> theirs
### Resolution:
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10263_metadata.json",
"conflict_index": 2
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
_Logger.Debug("created transaction interceptor");
||||||| base
_Logger.DebugFormat("created transaction interceptor");
=======
>>>>>>> theirs
### Resolution:
_Logger.Debug("created transaction interceptor");
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10263_metadata.json",
"conflict_index": 3
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
private static void SynchronizedCase(IInvocation invocation, ITransaction transaction)
||||||| base
private void SynchronizedCase(IInvocation invocation, ITransaction transaction)
=======
// TODO: implement WaitAll-semantics with returned task
private void SynchronizedCase(IInvocation invocation, ITransaction transaction)
>>>>>>> theirs
### Resolution:
private static void SynchronizedCase(IInvocation invocation, ITransaction transaction)
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10263_metadata.json",
"conflict_index": 4
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
else
_Logger.Warn(
||||||| base
else
_Logger.WarnFormat(
=======
else if (_Logger.IsWarnEnabled)
_Logger.WarnFormat(
>>>>>>> theirs
### Resolution:
else if (_Logger.IsWarnEnabled)
_Logger.Warn(
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10263_metadata.json",
"conflict_index": 6
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
_Logger.Warn("transaction aborted - synchronized case, tx#{0}", localIdentifier);
||||||| base
_Logger.WarnFormat("transaction aborted - synchronized case, tx#{0}", localIdentifier);
=======
if (_Logger.IsWarnEnabled)
_Logger.WarnFormat("transaction aborted - synchronized case, tx#{0}", localIdentifier);
>>>>>>> theirs
### Resolution:
if (_Logger.IsWarnEnabled)
_Logger.WarnFormat("transaction aborted - synchronized case, tx#{0}", localIdentifier);
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10263_metadata.json",
"conflict_index": 7
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
_Logger.Debug("fork case");
||||||| base
_Logger.DebugFormat("fork case");
=======
if (_Logger.IsDebugEnabled)
_Logger.DebugFormat("fork case");
>>>>>>> theirs
### Resolution:
if (_Logger.IsDebugEnabled)
_Logger.DebugFormat("fork case");
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10263_metadata.json",
"conflict_index": 8
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
_Logger.WarnException("transaction aborted", ex);
||||||| base
_Logger.Warn("transaction aborted", ex);
=======
if (_Logger.IsWarnEnabled)
_Logger.Warn("transaction aborted", ex);
>>>>>>> theirs
### Resolution:
if (_Logger.IsWarnEnabled)
_Logger.Warn("transaction aborted", ex);
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10263_metadata.json",
"conflict_index": 9
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
SetupFrameRenderingConfiguration(out frameRenderingConfiguration, screenspaceShadows, stereoEnabled, sceneViewCamera);
SetupIntermediateResources(frameRenderingConfiguration, ref context);
||||||| base
SetupFrameRenderingConfiguration(out frameRenderingConfiguration, shadows, stereoEnabled, sceneViewCamera);
SetupIntermediateResources(frameRenderingConfiguration, ref context);
=======
SetupFrameRenderingConfiguration(out frameRenderingConfiguration, shadows, stereoEnabled, sceneViewCamera);
SetupIntermediateResources(frameRenderingConfiguration, shadows, ref context);
>>>>>>> theirs
### Resolution:
SetupFrameRenderingConfiguration(out frameRenderingConfiguration, screenspaceShadows, stereoEnabled, sceneViewCamera);
SetupIntermediateResources(frameRenderingConfiguration, screenspaceShadows, ref context);
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\1027_metadata.json",
"conflict_index": 0
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
||||||| base
if (m_ShadowMapRT)
{
cmd.ReleaseTemporaryRT(m_ShadowMapRTID);
m_ShadowMapRT = null;
}
=======
>>>>>>> theirs
### Resolution:
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\1027_metadata.json",
"conflict_index": 1
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
if (m_DirectionalShadowmapRT)
{
RenderTexture.ReleaseTemporary(m_DirectionalShadowmapRT);
m_DirectionalShadowmapRT = null;
}
if (m_AdditionalShadowmapRT)
{
RenderTexture.ReleaseTemporary(m_AdditionalShadowmapRT);
m_AdditionalShadowmapRT = null;
}
||||||| base
=======
if (m_ShadowMapRT)
{
RenderTexture.ReleaseTemporary(m_ShadowMapRT);
m_ShadowMapRT = null;
}
>>>>>>> theirs
### Resolution:
if (m_DirectionalShadowmapRT)
{
RenderTexture.ReleaseTemporary(m_DirectionalShadowmapRT);
m_DirectionalShadowmapRT = null;
}
if (m_AdditionalShadowmapRT)
{
RenderTexture.ReleaseTemporary(m_AdditionalShadowmapRT);
m_AdditionalShadowmapRT = null;
}
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\1027_metadata.json",
"conflict_index": 2
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
private void SetupShaderLightConstants(CommandBuffer cmd, ref LightData lightData)
||||||| base
private void SetupShaderLightConstants(CommandBuffer cmd, List<VisibleLight> lights, ref LightData lightData)
=======
private void SetupPerCameraShaderConstants()
{
float cameraWidth = GetScaledCameraWidth(m_CurrCamera);
float cameraHeight = GetScaledCameraHeight(m_CurrCamera);
Shader.SetGlobalVector(PerCameraBuffer._ScaledScreenParams, new Vector4(cameraWidth, cameraHeight, 1.0f + 1.0f / cameraWidth, 1.0f + 1.0f / cameraHeight));
}
private void SetupShaderLightConstants(CommandBuffer cmd, List<VisibleLight> lights, ref LightData lightData)
>>>>>>> theirs
### Resolution:
private void SetupPerCameraShaderConstants()
{
float cameraWidth = GetScaledCameraWidth(m_CurrCamera);
float cameraHeight = GetScaledCameraHeight(m_CurrCamera);
Shader.SetGlobalVector(PerCameraBuffer._ScaledScreenParams, new Vector4(cameraWidth, cameraHeight, 1.0f + 1.0f / cameraWidth, 1.0f + 1.0f / cameraHeight));
}
private void SetupShaderLightConstants(CommandBuffer cmd, ref LightData lightData)
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\1027_metadata.json",
"conflict_index": 3
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
case "embed":
if (string.IsNullOrEmpty(value))
{
embedAllSourceFiles = true;
continue;
}
embeddedFiles.AddRange(ParseSeparatedFileArgument(value, baseDirectory, diagnostics));
continue;
||||||| base
=======
case "logger":
if (value != null)
{
loggers.Add(value);
}
continue;
>>>>>>> theirs
### Resolution:
case "logger":
if (value != null)
{
loggers.Add(value);
}
continue;
case "embed":
if (string.IsNullOrEmpty(value))
{
embedAllSourceFiles = true;
continue;
}
embeddedFiles.AddRange(ParseSeparatedFileArgument(value, baseDirectory, diagnostics));
continue;
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10280_metadata.json",
"conflict_index": 0
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
BindTargetToMethod_Object_RoutineInfo = ct.Operators.Method("BindTargetToMethod", ct.Object, ct.RoutineInfo);
BuildGenerator_Context_Object_PhpArray_PhpArray_GeneratorStateMachineDelegate_RuntimeMethodHandle = ct.Operators.Method("BuildGenerator", ct.Context, ct.Object, ct.PhpArray, ct.PhpArray, ct.GeneratorStateMachineDelegate, ct.RuntimeMethodHandle);
||||||| base
BuildGenerator_Context_Object_PhpArray_PhpArray_GeneratorStateMachineDelegate_RuntimeMethodHandle = ct.Operators.Method("BuildGenerator", ct.Context, ct.Object, ct.PhpArray, ct.PhpArray, ct.GeneratorStateMachineDelegate, ct.RuntimeMethodHandle);
=======
BuildGenerator_Context_PhpArray_PhpArray_GeneratorStateMachineDelegate_RuntimeMethodHandle = ct.Operators.Method("BuildGenerator", ct.Context, ct.PhpArray, ct.PhpArray, ct.GeneratorStateMachineDelegate, ct.RuntimeMethodHandle);
SetGeneratorDynamicScope_Generator_RuntimeTypeHandle = ct.Operators.Method("SetGeneratorDynamicScope", ct.Generator, ct.RuntimeTypeHandle);
SetGeneratorThis_Generator_Object = ct.Operators.Method("SetGeneratorThis", ct.Generator, ct.Object);
SetGeneratorLazyStatic_Generator_PhpTypeInfo = ct.Operators.Method("SetGeneratorLazyStatic", ct.Generator, ct.PhpTypeInfo);
GetGeneratorLazyStatic_Generator = ct.Operators.Method("GetGeneratorLazyStatic", ct.Generator);
>>>>>>> theirs
### Resolution:
BindTargetToMethod_Object_RoutineInfo = ct.Operators.Method("BindTargetToMethod", ct.Object, ct.RoutineInfo);
BuildGenerator_Context_PhpArray_PhpArray_GeneratorStateMachineDelegate_RuntimeMethodHandle = ct.Operators.Method("BuildGenerator", ct.Context, ct.PhpArray, ct.PhpArray, ct.GeneratorStateMachineDelegate, ct.RuntimeMethodHandle);
SetGeneratorDynamicScope_Generator_RuntimeTypeHandle = ct.Operators.Method("SetGeneratorDynamicScope", ct.Generator, ct.RuntimeTypeHandle);
SetGeneratorThis_Generator_Object = ct.Operators.Method("SetGeneratorThis", ct.Generator, ct.Object);
SetGeneratorLazyStatic_Generator_PhpTypeInfo = ct.Operators.Method("SetGeneratorLazyStatic", ct.Generator, ct.PhpTypeInfo);
GetGeneratorLazyStatic_Generator = ct.Operators.Method("GetGeneratorLazyStatic", ct.Generator);
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10284_metadata.json",
"conflict_index": 0
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
BindTargetToMethod_Object_RoutineInfo,
BuildGenerator_Context_Object_PhpArray_PhpArray_GeneratorStateMachineDelegate_RuntimeMethodHandle,
||||||| base
BuildGenerator_Context_Object_PhpArray_PhpArray_GeneratorStateMachineDelegate_RuntimeMethodHandle,
=======
// Generator
BuildGenerator_Context_PhpArray_PhpArray_GeneratorStateMachineDelegate_RuntimeMethodHandle,
SetGeneratorDynamicScope_Generator_RuntimeTypeHandle, SetGeneratorThis_Generator_Object,
SetGeneratorLazyStatic_Generator_PhpTypeInfo, GetGeneratorLazyStatic_Generator,
>>>>>>> theirs
### Resolution:
BindTargetToMethod_Object_RoutineInfo,
// Generator
BuildGenerator_Context_PhpArray_PhpArray_GeneratorStateMachineDelegate_RuntimeMethodHandle,
SetGeneratorDynamicScope_Generator_RuntimeTypeHandle, SetGeneratorThis_Generator_Object,
SetGeneratorLazyStatic_Generator_PhpTypeInfo, GetGeneratorLazyStatic_Generator,
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10284_metadata.json",
"conflict_index": 1
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
var place = refexpr.Place();
if (place != null && place.HasAddress && place.TypeOpt == targetp.Type)
||||||| base
var place = refexpr.Place(_il);
if (place != null && place.HasAddress && place.TypeOpt == targetp.Type)
=======
var place = refexpr.Place(_il);
if (place != null && place.HasAddress && place.Type == targetp.Type)
>>>>>>> theirs
### Resolution:
var place = refexpr.Place();
if (place != null && place.HasAddress && place.Type == targetp.Type)
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10291_metadata.json",
"conflict_index": 0
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
public enum HeightmapParametrization
{
MinMax = 0,
Amplitude = 1
}
||||||| base
=======
public enum MaterialId
{
LitSSS = 0,
LitStandard = 1,
LitAniso = 2,
LitClearCoat = 3,
LitSpecular = 4,
LitIridescence = 5,
};
>>>>>>> theirs
### Resolution:
public enum MaterialId
{
LitSSS = 0,
LitStandard = 1,
LitAniso = 2,
LitClearCoat = 3,
LitSpecular = 4,
LitIridescence = 5,
};
public enum HeightmapParametrization
{
MinMax = 0,
Amplitude = 1
}
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\1029_metadata.json",
"conflict_index": 0
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
var place = varref.Place();
if (place != null && place.HasAddress && place.TypeOpt == _cg.CoreTypes.PhpValue)
||||||| base
var place = varref.Place(_cg.Builder);
if (place != null && place.HasAddress && place.TypeOpt == _cg.CoreTypes.PhpValue)
=======
var place = varref.Place(_cg.Builder);
if (place != null && place.HasAddress && place.Type == _cg.CoreTypes.PhpValue)
>>>>>>> theirs
### Resolution:
var place = varref.Place();
if (place != null && place.HasAddress && place.Type == _cg.CoreTypes.PhpValue)
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10302_metadata.json",
"conflict_index": 0
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
cullingParameters.shadowDistance = m_ShadowSettings.maxShadowDistance;
CullResults.Cull(ref cullingParameters, context,ref m_CullResults);
||||||| base
cullingParameters.shadowDistance = m_ShadowSettings.maxShadowDistance;
CullResults cullResults = CullResults.Cull(ref cullingParameters, context);
=======
cullingParameters.shadowDistance = Mathf.Min(m_ShadowSettings.maxShadowDistance, camera.farClipPlane);
CullResults cullResults = CullResults.Cull(ref cullingParameters, context);
>>>>>>> theirs
### Resolution:
cullingParameters.shadowDistance = Mathf.Min(m_ShadowSettings.maxShadowDistance, camera.farClipPlane);
CullResults.Cull(ref cullingParameters, context,ref m_CullResults);
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\1030_metadata.json",
"conflict_index": 0
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
bool shadowsRendered = false;
InitializeMainShadowLightIndex(visibleLights);
if (m_ShadowLightIndex > -1)
shadowsRendered = RenderShadows(ref m_CullResults, ref visibleLights[m_ShadowLightIndex], ref context);
||||||| base
bool shadowsRendered = false;
InitializeMainShadowLightIndex(visibleLights);
if (m_ShadowLightIndex > -1)
shadowsRendered = RenderShadows(ref cullResults, ref visibleLights[m_ShadowLightIndex], ref context);
=======
if (lightData.shadowLightIndex > -1)
lightData.shadowsRendered = RenderShadows(ref cullResults, ref visibleLights[lightData.shadowLightIndex], lightData.shadowLightIndex, ref context);
>>>>>>> theirs
### Resolution:
if (lightData.shadowLightIndex > -1)
lightData.shadowsRendered = RenderShadows(ref m_CullResults, ref visibleLights[lightData.shadowLightIndex], lightData.shadowLightIndex, ref context);
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\1030_metadata.json",
"conflict_index": 1
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
SetupLightShaderVariables(visibleLights, ref m_CullResults, ref context, ref lightData);
if (shadowsRendered)
SetupShadowShaderVariables(ref context, m_ShadowCasterCascadesCount);
||||||| base
SetupLightShaderVariables(visibleLights, ref cullResults, ref context, ref lightData);
if (shadowsRendered)
SetupShadowShaderVariables(ref context, m_ShadowCasterCascadesCount);
=======
SetupShaderLightConstants(visibleLights, ref lightData, ref cullResults, ref context);
if (lightData.shadowsRendered)
SetupShadowShaderConstants(ref context, ref visibleLights[lightData.shadowLightIndex], lightData.shadowLightIndex, m_ShadowCasterCascadesCount);
SetShaderKeywords(ref lightData, ref context);
>>>>>>> theirs
### Resolution:
SetupShaderLightConstants(visibleLights, ref lightData, ref m_CullResults, ref context);
if (lightData.shadowsRendered)
SetupShadowShaderConstants(ref context, ref visibleLights[lightData.shadowLightIndex], lightData.shadowLightIndex, m_ShadowCasterCascadesCount);
SetShaderKeywords(ref lightData, ref context);
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\1030_metadata.json",
"conflict_index": 2
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
CommandBuffer cmd = CommandBufferPool.Get("SetupShadowShaderConstants");
cmd.SetGlobalVectorArray("globalLightPos", m_LightPositions);
cmd.SetGlobalVectorArray("globalLightColor", m_LightColors);
cmd.SetGlobalVectorArray("globalLightAtten", m_LightAttenuations);
cmd.SetGlobalVectorArray("globalLightSpotDir", m_LightSpotDirections);
if (!lightData.isSingleDirectionalLight)
cmd.SetGlobalBuffer("globalLightIndexList", m_LightIndexListBuffer);
cmd.SetGlobalVector("globalLightData", new Vector4(lightData.pixelLightsCount, m_ShadowLightIndex, m_Asset.ShadowMinNormalBias, m_Asset.ShadowNormalBias));
SetShaderKeywords(cmd, lightData.isSingleDirectionalLight, lightData.vertexLightsCount > 0);
||||||| base
CommandBuffer cmd = new CommandBuffer() {name = "SetupShadowShaderConstants"};
cmd.SetGlobalVectorArray("globalLightPos", m_LightPositions);
cmd.SetGlobalVectorArray("globalLightColor", m_LightColors);
cmd.SetGlobalVectorArray("globalLightAtten", m_LightAttenuations);
cmd.SetGlobalVectorArray("globalLightSpotDir", m_LightSpotDirections);
if (!lightData.isSingleDirectionalLight)
cmd.SetGlobalBuffer("globalLightIndexList", m_LightIndexListBuffer);
cmd.SetGlobalVector("globalLightData", new Vector4(lightData.pixelLightsCount, m_ShadowLightIndex, m_Asset.ShadowMinNormalBias, m_Asset.ShadowNormalBias));
SetShaderKeywords(cmd, lightData.isSingleDirectionalLight, lightData.vertexLightsCount > 0);
=======
CommandBuffer cmd = new CommandBuffer () { name = "SetupShadowShaderConstants" };
cmd.SetGlobalVector("globalLightCount", new Vector4 (pixelLightsCount, 0.0f, 0.0f, 0.0f));
cmd.SetGlobalVectorArray ("globalLightPos", m_LightPositions);
cmd.SetGlobalVectorArray ("globalLightColor", m_LightColors);
cmd.SetGlobalVectorArray ("globalLightAtten", m_LightAttenuations);
cmd.SetGlobalVectorArray ("globalLightSpotDir", m_LightSpotDirections);
cmd.SetGlobalBuffer("globalLightIndexList", m_LightIndexListBuffer);
context.ExecuteCommandBuffer(cmd);
cmd.Dispose();
}
private void SetShaderKeywords(ref LightData lightData, ref ScriptableRenderContext context)
{
CommandBuffer cmd = new CommandBuffer() { name = "SetShaderKeywords" };
SetShaderKeywords(cmd, lightData.shadowsRendered, lightData.isSingleDirectionalLight, lightData.vertexLightsCount > 0);
>>>>>>> theirs
### Resolution:
CommandBuffer cmd = CommandBufferPool.Get("SetupShadowShaderConstants");
cmd.SetGlobalVector("globalLightCount", new Vector4 (pixelLightsCount, 0.0f, 0.0f, 0.0f));
cmd.SetGlobalVectorArray ("globalLightPos", m_LightPositions);
cmd.SetGlobalVectorArray ("globalLightColor", m_LightColors);
cmd.SetGlobalVectorArray ("globalLightAtten", m_LightAttenuations);
cmd.SetGlobalVectorArray ("globalLightSpotDir", m_LightSpotDirections);
cmd.SetGlobalBuffer("globalLightIndexList", m_LightIndexListBuffer);
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\1030_metadata.json",
"conflict_index": 3
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
// TODO: Move this code inside LightLoop
if (m_LightLoop.GetFeatureVariantsEnabled())
{
// For material classification we use compute shader and so can't read into the stencil, so prepare it.
using (new ProfilingSample(cmd, "Clear and copy stencil texture", GetSampler(CustomSamplerId.ClearAndCopyStencilTexture)))
{
CoreUtils.SetRenderTarget(cmd, m_CameraStencilBufferCopyRT, ClearFlag.Color, CoreUtils.clearColorAllBlack);
cmd.SetRandomWriteTarget(1, GetHTile());
// In the material classification shader we will simply test is we are no lighting
// Use ShaderPassID 1 => "Pass 1 - Write 1 if value different from stencilRef to output"
CoreUtils.DrawFullScreen(cmd, m_CopyStencilForNoLighting, m_CameraStencilBufferCopyRT, m_CameraDepthStencilBufferRT, null, 1);
cmd.ClearRandomWriteTargets();
}
}
m_LightLoop.BuildGPULightLists(camera, cmd, m_CameraDepthStencilBufferRT, m_CameraStencilBufferCopyRT);
||||||| base
m_LightLoop.BuildGPULightLists(camera, cmd, m_CameraDepthStencilBufferRT, GetStencilTexture());
=======
m_LightLoop.BuildGPULightListAsyncEnd(camera, cmd, buildGPULightListsCompleteFence);
}
else
{
using (new ProfilingSample(cmd, "Build Light list", GetSampler(CustomSamplerId.BuildLightList)))
{
m_LightLoop.BuildGPULightLists(camera, cmd, m_CameraDepthStencilBufferRT, GetStencilTexture());
}
>>>>>>> theirs
### Resolution:
m_LightLoop.BuildGPULightListAsyncEnd(camera, cmd, buildGPULightListsCompleteFence);
}
else
{
using (new ProfilingSample(cmd, "Build Light list", GetSampler(CustomSamplerId.BuildLightList)))
{
m_LightLoop.BuildGPULightLists(camera, cmd, m_CameraDepthStencilBufferRT, GetStencilTexture());
}
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\1036_metadata.json",
"conflict_index": 0
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
RenderForward(m_CullResults, camera, renderContext, cmd, ForwardPass.Opaque);
||||||| base
// We compute subsurface scattering here. Therefore, no objects rendered afterwards will exhibit SSS.
// Currently, there is no efficient way to switch between SRT and MRT for the forward pass;
// therefore, forward-rendered objects do not output split lighting required for the SSS pass.
SubsurfaceScatteringPass(hdCamera, cmd, sssSettings);
RenderForward(m_CullResults, camera, renderContext, cmd, ForwardPass.Opaque);
=======
// We compute subsurface scattering here. Therefore, no objects rendered afterwards will exhibit SSS.
// Currently, there is no efficient way to switch between SRT and MRT for the forward pass;
// therefore, forward-rendered objects do not output split lighting required for the SSS pass.
SubsurfaceScatteringPass(hdCamera, cmd, sssSettings);
RenderForward(m_CullResults, hdCamera, renderContext, cmd, ForwardPass.Opaque);
>>>>>>> theirs
### Resolution:
RenderForward(m_CullResults, hdCamera, renderContext, cmd, ForwardPass.Opaque);
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\1036_metadata.json",
"conflict_index": 1
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
if (!m_CurrentDebugDisplaySettings.renderingDebugSettings.enableSSSAndTransmission)
||||||| base
// Currently, forward-rendered objects do not output split lighting required for the SSS pass.
if (!m_CurrentDebugDisplaySettings.renderingDebugSettings.enableSSSAndTransmission || m_Asset.globalRenderingSettings.ShouldUseForwardRenderingOnly())
=======
// Currently, forward-rendered objects do not output split lighting required for the SSS pass.
if (!m_CurrentDebugDisplaySettings.renderingDebugSettings.enableSSSAndTransmission || hdCamera.useForwardOnly)
>>>>>>> theirs
### Resolution:
if (!m_CurrentDebugDisplaySettings.renderingDebugSettings.enableSSSAndTransmission)
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\1036_metadata.json",
"conflict_index": 2
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
||||||| base
CoreUtils.SetRenderTarget(cmd, m_CameraColorBufferRT, m_CameraDepthStencilBufferRT);
=======
CoreUtils.SetRenderTarget(cmd, m_CameraColorBufferRT, m_CameraDepthStencilBufferRT);
var camera = hdCamera.camera;
>>>>>>> theirs
### Resolution:
var camera = hdCamera.camera;
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\1036_metadata.json",
"conflict_index": 3
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
if (!m_Asset.globalRenderingSettings.ShouldUseForwardRenderingOnly())
{
||||||| base
if (!m_Asset.globalRenderingSettings.ShouldUseForwardRenderingOnly())
=======
if (!camera.useForwardOnly)
>>>>>>> theirs
### Resolution:
if (!camera.useForwardOnly)
{
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\1036_metadata.json",
"conflict_index": 4
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
protected int mReadDataSize; // 写入数据时,总共写入的数据大小
protected int mMaxDataSize; // 包体最大的大小,包括如果不使用变长数组时的大小
protected bool mIntReplaceULLong; // 如果ullong的值小于int最大值,是否在序列化时写入或读取int
||||||| base
protected int mMaxDataSize;
=======
protected int mMaxDataSize;
protected bool mFixedLength; // 是否所有参数都是定长的
>>>>>>> theirs
### Resolution:
protected int mReadDataSize; // 写入数据时,总共写入的数据大小
protected int mMaxDataSize; // 包体最大的大小,包括如果不使用变长数组时的大小
protected bool mIntReplaceULLong; // 如果ullong的值小于int最大值,是否在序列化时写入或读取int
protected bool mFixedLength; // 是否所有参数都是定长的
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10394_metadata.json",
"conflict_index": 0
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
private async void Row_Drop(object sender, DragEventArgs e)
{
var row = (Border)sender;
var fse = (FileSystemElement)row.Tag;
StyleHitbox(row, ROW_DEFAULT_STYLE_NAME);
if (fse.IsFolder && e.DataView.Contains(StandardDataFormats.StorageItems))
{
var items = await e.DataView.GetStorageItemsAsync();
//FileSystem.MoveStorageItemsAsync(fse, items.ToList());
}
}
private void Row_DragOver(object sender, DragEventArgs e)
{
var row = (Border)sender;
var fse = (FileSystemElement)row.Tag;
if (fse.IsFolder && e.DataView.Contains(StandardDataFormats.StorageItems))
e.AcceptedOperation = DataPackageOperation.Move;
StyleHitbox(row, ROW_DROP_STYLE_NAME);
}
private void Row_DragLeave(object sender, DragEventArgs e)
{
var row = (Border)sender;
StyleHitbox(row, ROW_DEFAULT_STYLE_NAME);
}
private async void Row_DragStarting(UIElement sender, DragStartingEventArgs args)
{
var row = (Border)sender;
var fse = (FileSystemElement)row.Tag;
Debug.WriteLine("Drag started");
var deferral = args.GetDeferral();
if (!fse.IsFolder)
{
var storageItem = await FileSystem.GetFileAsync(fse);
args.Data.SetStorageItems(new List<IStorageItem> { storageItem }, false);
var ti = await storageItem.GetThumbnailAsync(ThumbnailMode.SingleItem, 30);
if (ti != null)
{
var stream = ti.CloneStream();
var img = new BitmapImage();
await img.SetSourceAsync(stream);
args.Data.RequestedOperation = DataPackageOperation.Move;
args.DragUI.SetContentFromBitmapImage(img, new Point(-1, 0));
//args.Data.Properties.Thumbnail = RandomAccessStreamReference.CreateFromStream(stream);
//args.DragUI.SetContentFromDataPackage();
}
}
else
{
var storageItem = await FileSystem.GetFolderAsync(fse);
args.Data.SetStorageItems(new List<IStorageItem> { storageItem }, false);
var ti = await storageItem.GetThumbnailAsync(ThumbnailMode.SingleItem, 30);
if (ti != null)
{
var stream = ti.CloneStream();
var img = new BitmapImage();
await img.SetSourceAsync(stream);
args.Data.RequestedOperation = DataPackageOperation.Move;
args.DragUI.SetContentFromBitmapImage(img, new Point(-1, 0));
//args.Data.Properties.Thumbnail = RandomAccessStreamReference.CreateFromStream(stream);
//args.DragUI.SetContentFromDataPackage();
}
}
//args.DragUI.SetContentFromDataPackage();
deferral.Complete();
}
||||||| base
=======
private void ContentGrid_PointerMoved(object sender, PointerRoutedEventArgs e)
{
var pointer = e.GetCurrentPoint(ContentGrid);
if (!isDraggingSelection || pointer.Timestamp == lastMoveTimestamp) return;
var startPos = pressedPos.Position;
var newPos = pointer.Position;
var newSizeX = newPos.X - startPos.X; //Get the move delta x
if (newSizeX < 0) //Drag left from start pos
{
Canvas.SetLeft(SelectionRect, newPos.X);
SelectionRect.Width = -newSizeX;
}
else //Drag right from start pos
{
SelectionRect.Width = newPos.X - startPos.X;
}
var newSizeY = newPos.Y - startPos.Y; //Get the move delta y
if (newSizeY < 0) //Drag up from start pos
{
Canvas.SetTop(SelectionRect, newPos.Y);
SelectionRect.Height = -newSizeY;
}
else //Drag down from start pos
{
SelectionRect.Height = newPos.Y - startPos.Y;
}
var rowHeight = 30;
var currentPointerOverRowIndex = (int)newPos.Y / rowHeight;
if (pointerOverRowIndex != currentPointerOverRowIndex) //If pointer is still over the same row dont do anything
{
var topPos = Canvas.GetTop(SelectionRect);
var from = (int)topPos / rowHeight; //start index to select rows (30 is rowHeight)
var to = (int)(topPos + SelectionRect.Height) / rowHeight + 1; //end index
var controlDown = Window.Current.CoreWindow.GetKeyState(VirtualKey.Control).HasFlag(CoreVirtualKeyStates.Down);
if (!controlDown) UnselectOldRows();
for (int i = from; i < to; i++)
{
if (i >= 0 && i < ItemsSource.Count)
SelectRow(ItemsSource[i]);
}
}
lastMoveTimestamp = pointer.Timestamp;
pointerOverRowIndex = currentPointerOverRowIndex;
}
private void ContentGrid_PointerPressed(object sender, PointerRoutedEventArgs e)
{
isDraggingSelection = true;
pressedPos = e.GetCurrentPoint((FrameworkElement)sender);
ContentGrid.CapturePointer(e.Pointer);
Canvas.SetLeft(SelectionRect, pressedPos.Position.X);
Canvas.SetTop(SelectionRect, pressedPos.Position.Y);
}
private void ContentGrid_PointerReleased(object sender, PointerRoutedEventArgs e)
{
isDraggingSelection = false;
ContentGrid.ReleasePointerCapture(e.Pointer);
SelectionRect.Width = 0;
SelectionRect.Height = 0;
}
>>>>>>> theirs
### Resolution:
private async void Row_Drop(object sender, DragEventArgs e)
{
var row = (Border)sender;
var fse = (FileSystemElement)row.Tag;
StyleHitbox(row, ROW_DEFAULT_STYLE_NAME);
if (fse.IsFolder && e.DataView.Contains(StandardDataFormats.StorageItems))
{
var items = await e.DataView.GetStorageItemsAsync();
//FileSystem.MoveStorageItemsAsync(fse, items.ToList());
}
}
private void Row_DragOver(object sender, DragEventArgs e)
{
var row = (Border)sender;
var fse = (FileSystemElement)row.Tag;
if (fse.IsFolder && e.DataView.Contains(StandardDataFormats.StorageItems))
e.AcceptedOperation = DataPackageOperation.Move;
StyleHitbox(row, ROW_DROP_STYLE_NAME);
}
private void Row_DragLeave(object sender, DragEventArgs e)
{
var row = (Border)sender;
StyleHitbox(row, ROW_DEFAULT_STYLE_NAME);
}
private async void Row_DragStarting(UIElement sender, DragStartingEventArgs args)
{
var row = (Border)sender;
var fse = (FileSystemElement)row.Tag;
Debug.WriteLine("Drag started");
var deferral = args.GetDeferral();
if (!fse.IsFolder)
{
var storageItem = await FileSystem.GetFileAsync(fse);
args.Data.SetStorageItems(new List<IStorageItem> { storageItem }, false);
var ti = await storageItem.GetThumbnailAsync(ThumbnailMode.SingleItem, 30);
if (ti != null)
{
var stream = ti.CloneStream();
var img = new BitmapImage();
await img.SetSourceAsync(stream);
args.Data.RequestedOperation = DataPackageOperation.Move;
args.DragUI.SetContentFromBitmapImage(img, new Point(-1, 0));
//args.Data.Properties.Thumbnail = RandomAccessStreamReference.CreateFromStream(stream);
//args.DragUI.SetContentFromDataPackage();
}
}
else
{
var storageItem = await FileSystem.GetFolderAsync(fse);
args.Data.SetStorageItems(new List<IStorageItem> { storageItem }, false);
var ti = await storageItem.GetThumbnailAsync(ThumbnailMode.SingleItem, 30);
if (ti != null)
{
var stream = ti.CloneStream();
var img = new BitmapImage();
await img.SetSourceAsync(stream);
args.Data.RequestedOperation = DataPackageOperation.Move;
args.DragUI.SetContentFromBitmapImage(img, new Point(-1, 0));
//args.Data.Properties.Thumbnail = RandomAccessStreamReference.CreateFromStream(stream);
//args.DragUI.SetContentFromDataPackage();
}
}
//args.DragUI.SetContentFromDataPackage();
deferral.Complete();
}
private void ContentGrid_PointerMoved(object sender, PointerRoutedEventArgs e)
{
var pointer = e.GetCurrentPoint(ContentGrid);
if (!isDraggingSelection || pointer.Timestamp == lastMoveTimestamp) return;
var startPos = pressedPos.Position;
var newPos = pointer.Position;
var newSizeX = newPos.X - startPos.X; //Get the move delta x
if (newSizeX < 0) //Drag left from start pos
{
Canvas.SetLeft(SelectionRect, newPos.X);
SelectionRect.Width = -newSizeX;
}
else //Drag right from start pos
{
SelectionRect.Width = newPos.X - startPos.X;
}
var newSizeY = newPos.Y - startPos.Y; //Get the move delta y
if (newSizeY < 0) //Drag up from start pos
{
Canvas.SetTop(SelectionRect, newPos.Y);
SelectionRect.Height = -newSizeY;
}
else //Drag down from start pos
{
SelectionRect.Height = newPos.Y - startPos.Y;
}
var rowHeight = 30;
var currentPointerOverRowIndex = (int)newPos.Y / rowHeight;
if (pointerOverRowIndex != currentPointerOverRowIndex) //If pointer is still over the same row dont do anything
{
var topPos = Canvas.GetTop(SelectionRect);
var from = (int)topPos / rowHeight; //start index to select rows (30 is rowHeight)
var to = (int)(topPos + SelectionRect.Height) / rowHeight + 1; //end index
var controlDown = Window.Current.CoreWindow.GetKeyState(VirtualKey.Control).HasFlag(CoreVirtualKeyStates.Down);
if (!controlDown) UnselectOldRows();
for (int i = from; i < to; i++)
{
if (i >= 0 && i < ItemsSource.Count)
SelectRow(ItemsSource[i]);
}
}
lastMoveTimestamp = pointer.Timestamp;
pointerOverRowIndex = currentPointerOverRowIndex;
}
private void ContentGrid_PointerPressed(object sender, PointerRoutedEventArgs e)
{
isDraggingSelection = true;
pressedPos = e.GetCurrentPoint((FrameworkElement)sender);
ContentGrid.CapturePointer(e.Pointer);
Canvas.SetLeft(SelectionRect, pressedPos.Position.X);
Canvas.SetTop(SelectionRect, pressedPos.Position.Y);
}
private void ContentGrid_PointerReleased(object sender, PointerRoutedEventArgs e)
{
isDraggingSelection = false;
ContentGrid.ReleasePointerCapture(e.Pointer);
SelectionRect.Width = 0;
SelectionRect.Height = 0;
}
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10397_metadata.json",
"conflict_index": 0
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
deliverEventArgs = Queue.Dequeue();
||||||| base
deliverEventArgs = Queue.Dequeue() as BasicDeliverEventArgs;
=======
if (!_disposed)
{
deliverEventArgs = Queue.Dequeue() as BasicDeliverEventArgs;
}
>>>>>>> theirs
### Resolution:
if (!_disposed)
{
deliverEventArgs = Queue.Dequeue();
}
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10406_metadata.json",
"conflict_index": 0
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
private bool useCCD = false;
||||||| base
private bool continous = false;
=======
private bool allowParent = false;
private bool continous = false;
>>>>>>> theirs
### Resolution:
private bool allowParent = false;
private bool useCCD = false;
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10428_metadata.json",
"conflict_index": 0
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
float bodyAngle = this.body.Rotation - bodyAngleVel * (1.0f - Scene.PhysicsAlpha) * Time.SecondsPerFrame;
transform.IgnoreParent = true; // Force ignore parent!
||||||| base
float bodyAngle = this.body.Rotation - bodyAngleVel * (1.0f - Scene.PhysicsAlpha) * Time.SPFMult;
transform.IgnoreParent = true; // Force ignore parent!
=======
float bodyAngle = this.body.Rotation - bodyAngleVel * (1.0f - Scene.PhysicsAlpha) * Time.SPFMult;
// Unless allowed explicitly, ignore the transform hierarchy, so nested RigidBodies don't clash
if (!this.allowParent)
transform.IgnoreParent = true;
>>>>>>> theirs
### Resolution:
float bodyAngle = this.body.Rotation - bodyAngleVel * (1.0f - Scene.PhysicsAlpha) * Time.SecondsPerFrame;
// Unless allowed explicitly, ignore the transform hierarchy, so nested RigidBodies don't clash
if (!this.allowParent)
transform.IgnoreParent = true;
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10428_metadata.json",
"conflict_index": 1
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
target.useCCD = this.useCCD;
||||||| base
target.continous = this.continous;
=======
target.allowParent = this.allowParent;
target.continous = this.continous;
>>>>>>> theirs
### Resolution:
target.allowParent = this.allowParent;
target.useCCD = this.useCCD;
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10428_metadata.json",
"conflict_index": 2
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
memoryLogOutput = new EditorLogOutput();
Logs.AddGlobalOutput(memoryLogOutput);
// Set up a global exception handler to log errors
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
||||||| base
memoryLogOutput = new InMemoryLogOutput();
Log.AddGlobalOutput(memoryLogOutput);
// Set up a global exception handler to log errors
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
=======
memoryLogOutput = new InMemoryLogOutput();
Log.AddGlobalOutput(memoryLogOutput);
>>>>>>> theirs
### Resolution:
memoryLogOutput = new EditorLogOutput();
Logs.AddGlobalOutput(memoryLogOutput);
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10432_metadata.json",
"conflict_index": 0
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{
Logs.Core.WriteError(LogFormat.Exception(e.ExceptionObject as Exception));
}
||||||| base
private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{
Log.Core.WriteError(Log.Exception(e.ExceptionObject as Exception));
}
=======
>>>>>>> theirs
### Resolution:
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10432_metadata.json",
"conflict_index": 1
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
using (Texture texture = new Texture(width, height, TextureSizeMode.NonPowerOfTwo))
using (RenderTarget renderTarget = new RenderTarget(AAQuality.Off, true, texture))
||||||| base
using (Texture texture = new Texture(width, height, TextureSizeMode.NonPowerOfTwo))
using (RenderTarget renderTarget = new RenderTarget(AAQuality.Off, texture))
=======
using (Texture texture = new Texture(width, height, TextureSizeMode.NonPowerOfTwo, TextureMagFilter.Nearest, TextureMinFilter.Nearest))
using (RenderTarget renderTarget = new RenderTarget(AAQuality.Off, texture))
>>>>>>> theirs
### Resolution:
using (Texture texture = new Texture(width, height, TextureSizeMode.NonPowerOfTwo, TextureMagFilter.Nearest, TextureMinFilter.Nearest))
using (RenderTarget renderTarget = new RenderTarget(AAQuality.Off, true, texture))
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10439_metadata.json",
"conflict_index": 0
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
canvas.State.DepthOffset = -1;
||||||| base
canvas.State.ZOffset = -1;
=======
canvas.State.ZOffset = this.depthOffset;
canvas.State.SetMaterial(new BatchInfo(DrawTechnique.Alpha, ColorRgba.White));
>>>>>>> theirs
### Resolution:
canvas.State.DepthOffset = this.depthOffset;
canvas.State.SetMaterial(new BatchInfo(DrawTechnique.Alpha, ColorRgba.White));
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10441_metadata.json",
"conflict_index": 0
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
[EditorHintRange(0, int.MaxValue)]
public Point2 Size
||||||| base
[EditorHintRange(0, int.MaxValue)]
[EditorHintIncrement(1)]
[EditorHintDecimalPlaces(0)]
public Vector2 Size
=======
[EditorHintRange(1, int.MaxValue)]
[EditorHintIncrement(1)]
[EditorHintDecimalPlaces(0)]
public Vector2 Size
>>>>>>> theirs
### Resolution:
[EditorHintRange(1, int.MaxValue)]
public Point2 Size
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10446_metadata.json",
"conflict_index": 0
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
private ConcreteSlotValueType ConvertDynamicMatrixInputTypeToConcrete(IEnumerable<ConcreteSlotValueType> inputTypes)
{
var concreteSlotValueTypes = inputTypes as IList<ConcreteSlotValueType> ?? inputTypes.ToList();
var inputTypesDistinct = concreteSlotValueTypes.Distinct().ToList();
switch (inputTypesDistinct.Count)
{
case 0:
return ConcreteSlotValueType.Matrix2;
case 1:
return inputTypesDistinct.FirstOrDefault();
default:
var ordered = inputTypesDistinct.OrderByDescending(x => x);
if (ordered.Any())
return ordered.FirstOrDefault();
break;
}
return ConcreteSlotValueType.Matrix2;
}
public override void ValidateNode()
||||||| base
public override void ValidateNode()
=======
public virtual void ValidateNode()
>>>>>>> theirs
### Resolution:
private ConcreteSlotValueType ConvertDynamicMatrixInputTypeToConcrete(IEnumerable<ConcreteSlotValueType> inputTypes)
{
var concreteSlotValueTypes = inputTypes as IList<ConcreteSlotValueType> ?? inputTypes.ToList();
var inputTypesDistinct = concreteSlotValueTypes.Distinct().ToList();
switch (inputTypesDistinct.Count)
{
case 0:
return ConcreteSlotValueType.Matrix2;
case 1:
return inputTypesDistinct.FirstOrDefault();
default:
var ordered = inputTypesDistinct.OrderByDescending(x => x);
if (ordered.Any())
return ordered.FirstOrDefault();
break;
}
return ConcreteSlotValueType.Matrix2;
}
public virtual void ValidateNode()
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\1045_metadata.json",
"conflict_index": 0
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
public static string GetSlotDimension(ConcreteSlotValueType slotValue)
{
switch (slotValue)
{
case ConcreteSlotValueType.Vector1:
return string.Empty;
case ConcreteSlotValueType.Vector2:
return "2";
case ConcreteSlotValueType.Vector3:
return "3";
case ConcreteSlotValueType.Vector4:
return "4";
case ConcreteSlotValueType.Matrix2:
return "2x2";
case ConcreteSlotValueType.Matrix3:
return "3x3";
case ConcreteSlotValueType.Matrix4:
return "4x4";
default:
return "Error";
}
}
public static string ConvertConcreteSlotValueTypeToString(OutputPrecision p, ConcreteSlotValueType slotValue)
{
switch (slotValue)
{
case ConcreteSlotValueType.Vector1:
return p.ToString();
case ConcreteSlotValueType.Vector2:
return p + "2";
case ConcreteSlotValueType.Vector3:
return p + "3";
case ConcreteSlotValueType.Vector4:
return p + "4";
case ConcreteSlotValueType.Texture2D:
return "Texture2D";
case ConcreteSlotValueType.Cubemap:
return "Cubemap";
case ConcreteSlotValueType.Matrix2:
return p + "2x2";
case ConcreteSlotValueType.Matrix3:
return p + "3x3";
case ConcreteSlotValueType.Matrix4:
return p + "4x4";
case ConcreteSlotValueType.SamplerState:
return "SamplerState";
default:
return "Error";
}
}
||||||| base
public static string GetSlotDimension(ConcreteSlotValueType slotValue)
{
switch (slotValue)
{
case ConcreteSlotValueType.Vector1:
return string.Empty;
case ConcreteSlotValueType.Vector2:
return "2";
case ConcreteSlotValueType.Vector3:
return "3";
case ConcreteSlotValueType.Vector4:
return "4";
case ConcreteSlotValueType.Matrix2:
return "2x2";
case ConcreteSlotValueType.Matrix3:
return "3x3";
case ConcreteSlotValueType.Matrix4:
return "4x4";
default:
return "Error";
}
}
public static string ConvertConcreteSlotValueTypeToString(OutputPrecision p, ConcreteSlotValueType slotValue)
{
switch (slotValue)
{
case ConcreteSlotValueType.Vector1:
return p.ToString();
case ConcreteSlotValueType.Vector2:
return p + "2";
case ConcreteSlotValueType.Vector3:
return p + "3";
case ConcreteSlotValueType.Vector4:
return p + "4";
case ConcreteSlotValueType.Texture2D:
return "Texture2D";
case ConcreteSlotValueType.Cubemap:
return "Cubemap";
case ConcreteSlotValueType.Matrix2:
return "Matrix2x2";
case ConcreteSlotValueType.Matrix3:
return "Matrix3x3";
case ConcreteSlotValueType.Matrix4:
return "Matrix4x4";
case ConcreteSlotValueType.SamplerState:
return "SamplerState";
default:
return "Error";
}
}
=======
>>>>>>> theirs
### Resolution:
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\1045_metadata.json",
"conflict_index": 1
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
float clampedDelta = forceFixedStep ? SecondsPerFrame : MathF.Min(realDelta, SecondsPerFrame * 2);
gameDelta = timeScale * clampedDelta;
timeMult = gameDelta / SecondsPerFrame;
if (DualityApp.ExecContext == DualityApp.ExecutionContext.Game)
gameTimer += TimeSpan.FromTicks((long)(gameDelta * TimeSpan.TicksPerSecond));
||||||| base
if (DualityApp.ExecContext == DualityApp.ExecutionContext.Game)
gameTimer += TimeSpan.FromTicks((long)(lastDelta * timeScale * TimeSpan.TicksPerMillisecond));
timeMult = timeScale * lastDelta / MsPFMult;
=======
if (advanceGameTime)
gameTimer += TimeSpan.FromTicks((long)(lastDelta * timeScale * TimeSpan.TicksPerMillisecond));
timeMult = timeScale * lastDelta / MsPFMult;
>>>>>>> theirs
### Resolution:
float clampedDelta = forceFixedStep ? SecondsPerFrame : MathF.Min(realDelta, SecondsPerFrame * 2);
gameDelta = timeScale * clampedDelta;
timeMult = gameDelta / SecondsPerFrame;
if (advanceGameTime)
gameTimer += TimeSpan.FromTicks((long)(gameDelta * TimeSpan.TicksPerSecond));
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10467_metadata.json",
"conflict_index": 0
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
Logs.Core.Write("DualityApp Sandbox terminated");
||||||| base
Log.Core.Write("DualityApp Sandbox terminated");
=======
Log.Core.Write("DualityApp terminated in sandbox mode.");
>>>>>>> theirs
### Resolution:
Logs.Core.Write("DualityApp terminated in sandbox mode.");
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10482_metadata.json",
"conflict_index": 0
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
||||||| base
// Wrapper method for delivering the old API until removing it in v3.0
if (DiscardPluginData != null)
DiscardPluginData(sender, e);
=======
// Wrapper method for delivering the old API until removing it in v3.0
if (DiscardPluginData != null)
DiscardPluginData(sender, e);
// Save user and app data, they'll be reloaded after plugin reload is done,
// as they can reference plugin data as well.
SaveUserData();
SaveAppData();
>>>>>>> theirs
### Resolution:
// Save user and app data, they'll be reloaded after plugin reload is done,
// as they can reference plugin data as well.
SaveUserData();
SaveAppData();
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10482_metadata.json",
"conflict_index": 1
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
||||||| base
/// <summary>
/// Returns whether a Component Type requires another Component Type to work properly.
/// </summary>
/// <param name="cmpType">The Component Type that might require another Component Type.</param>
/// <param name="requiredType">The Component Type that might be required.</param>
/// <returns>True, if there is a requirement, false if not</returns>
[Obsolete("Use Component.RequireMap API instead.")]
public static bool RequiresComponent(Type cmpType, Type requiredType)
{
return requireMap.IsRequired(cmpType, requiredType);
}
/// <summary>
/// Returns all required Component Types of a specified Component Type.
/// </summary>
/// <param name="cmpType">The Component Type that might require other Component Types.</param>
/// <returns>An array of Component Types to require.</returns>
[Obsolete("Use Component.RequireMap API instead.")]
public static IEnumerable<Type> GetRequiredComponents(Type cmpType)
{
return requireMap.GetRequirements(cmpType);
}
/// <summary>
/// Returns the number of Component Types that require the specified Component Type.
/// This can be used as a measure of relative Component significance.
/// </summary>
/// <param name="cmpType"></param>
/// <returns></returns>
[Obsolete("No longer supported.")]
public static IEnumerable<Type> GetRequiringComponents(Type requiredType)
{
return Enumerable.Empty<Type>();
}
/// <summary>
/// Given the specified target <see cref="GameObject"/> and <see cref="Component"/> type,
/// this method will enumerate all <see cref="Component"/> types that need to
/// be added in order to satisfy its requirements.
/// </summary>
/// <param name="targetObj"></param>
/// <param name="targetComponentType"></param>
/// <returns></returns>
[Obsolete("Use Component.RequireMap API instead.")]
public static IEnumerable<Type> GetRequiredComponentsToCreate(GameObject targetObj, Type targetComponentType)
{
return requireMap.GetRequirementsToCreate(targetObj, targetComponentType);
}
=======
/// <summary>
/// [GET] Provides information about the order in which different <see cref="Component"/>
/// types are updated, initialized and shut down.
/// </summary>
public static ComponentExecutionOrder ExecOrder
{
get { return execOrder; }
}
/// <summary>
/// Returns whether a Component Type requires another Component Type to work properly.
/// </summary>
/// <param name="cmpType">The Component Type that might require another Component Type.</param>
/// <param name="requiredType">The Component Type that might be required.</param>
/// <returns>True, if there is a requirement, false if not</returns>
[Obsolete("Use Component.RequireMap API instead.")]
public static bool RequiresComponent(Type cmpType, Type requiredType)
{
return requireMap.IsRequired(cmpType, requiredType);
}
/// <summary>
/// Returns all required Component Types of a specified Component Type.
/// </summary>
/// <param name="cmpType">The Component Type that might require other Component Types.</param>
/// <returns>An array of Component Types to require.</returns>
[Obsolete("Use Component.RequireMap API instead.")]
public static IEnumerable<Type> GetRequiredComponents(Type cmpType)
{
return requireMap.GetRequirements(cmpType);
}
/// <summary>
/// Returns the number of Component Types that require the specified Component Type.
/// This can be used as a measure of relative Component significance.
/// </summary>
/// <param name="cmpType"></param>
/// <returns></returns>
[Obsolete("No longer supported.")]
public static IEnumerable<Type> GetRequiringComponents(Type requiredType)
{
return Enumerable.Empty<Type>();
}
/// <summary>
/// Given the specified target <see cref="GameObject"/> and <see cref="Component"/> type,
/// this method will enumerate all <see cref="Component"/> types that need to
/// be added in order to satisfy its requirements.
/// </summary>
/// <param name="targetObj"></param>
/// <param name="targetComponentType"></param>
/// <returns></returns>
[Obsolete("Use Component.RequireMap API instead.")]
public static IEnumerable<Type> GetRequiredComponentsToCreate(GameObject targetObj, Type targetComponentType)
{
return requireMap.GetRequirementsToCreate(targetObj, targetComponentType);
}
>>>>>>> theirs
### Resolution:
/// <summary>
/// [GET] Provides information about the order in which different <see cref="Component"/>
/// types are updated, initialized and shut down.
/// </summary>
public static ComponentExecutionOrder ExecOrder
{
get { return execOrder; }
}
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10495_metadata.json",
"conflict_index": 0
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
[assembly: InternalsVisibleTo("ReactiveUI.NLog")]
[assembly: InternalsVisibleTo("ReactiveUI.Gtk")]
[assembly: InternalsVisibleTo("ReactiveUI.Cocoa")]
[assembly: InternalsVisibleTo("ReactiveUI.Android")]
[assembly: InternalsVisibleTo("ReactiveUI.Mobile")]
[assembly: InternalsVisibleTo("ReactiveUI.Winforms")]
[assembly: InternalsVisibleTo("ReactiveUI.QuickUI")]
||||||| base
[assembly: InternalsVisibleTo("ReactiveUI.NLog")]
[assembly: InternalsVisibleTo("ReactiveUI.Gtk")]
[assembly: InternalsVisibleTo("ReactiveUI.Cocoa")]
[assembly: InternalsVisibleTo("ReactiveUI.Android")]
[assembly: InternalsVisibleTo("ReactiveUI.Mobile")]
[assembly: InternalsVisibleTo("ReactiveUI.Winforms")]
=======
[assembly: InternalsVisibleTo("ReactiveUI.Winforms")]
>>>>>>> theirs
### Resolution:
[assembly: InternalsVisibleTo("ReactiveUI.Winforms")]
[assembly: InternalsVisibleTo("ReactiveUI.QuickUI")] | {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10499_metadata.json",
"conflict_index": 0
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
void IReactiveObject.RaisePropertyChanged(PropertyChangedEventArgs args)
{
var handler = PropertyChanged;
if (handler != null)
{
handler(this, args);
}
}
protected ReactiveFragment()
{
setupRxObj();
}
||||||| base
=======
void IReactiveObjectExtension.RaisePropertyChanged(PropertyChangedEventArgs args)
{
var handler = PropertyChanged;
if (handler != null) {
handler(this, args);
}
}
>>>>>>> theirs
### Resolution:
void IReactiveObject.RaisePropertyChanged(PropertyChangedEventArgs args)
{
var handler = PropertyChanged;
if (handler != null) {
handler(this, args);
}
}
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10507_metadata.json",
"conflict_index": 4
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
[IgnoreDataMember]
public IObservable<IObservedChange<ReactiveFragment, object>> Changing {
get { return this.getChangingObservable(); }
||||||| base
[IgnoreDataMember]
public IObservable<IObservedChange<object, object>> Changing {
get { return changingSubject; }
=======
public IObservable<IObservedChange<object, object>> Changing {
get { return this.getChangingObservable(); }
>>>>>>> theirs
### Resolution:
public IObservable<IObservedChange<ReactiveFragment, object>> Changing {
get { return this.getChangingObservable(); }
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10507_metadata.json",
"conflict_index": 5
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
[IgnoreDataMember]
public IObservable<IObservedChange<ReactiveFragment, object>> Changed {
get { return this.getChangedObservable(); }
}
[IgnoreDataMember]
protected Lazy<PropertyInfo[]> allPublicProperties;
[IgnoreDataMember]
public IObservable<Exception> ThrownExceptions { get { return this.getThrownExceptionsObservable(); } }
[OnDeserialized]
void setupRxObj(StreamingContext sc) { setupRxObj(); }
void setupRxObj()
{
allPublicProperties = new Lazy<PropertyInfo[]>(() =>
GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance).ToArray());
||||||| base
[IgnoreDataMember]
public IObservable<IObservedChange<object, object>> Changed {
get { return changedSubject; }
}
[IgnoreDataMember]
protected Lazy<PropertyInfo[]> allPublicProperties;
[IgnoreDataMember]
Subject<IObservedChange<object, object>> changingSubject;
[IgnoreDataMember]
Subject<IObservedChange<object, object>> changedSubject;
[IgnoreDataMember]
long changeNotificationsSuppressed = 0;
[IgnoreDataMember]
readonly ScheduledSubject<Exception> thrownExceptions = new ScheduledSubject<Exception>(Scheduler.Immediate, RxApp.DefaultExceptionHandler);
[IgnoreDataMember]
public IObservable<Exception> ThrownExceptions { get { return thrownExceptions; } }
[OnDeserialized]
void setupRxObj(StreamingContext sc) { setupRxObj(); }
void setupRxObj()
{
changingSubject = new Subject<IObservedChange<object, object>>();
changedSubject = new Subject<IObservedChange<object, object>>();
allPublicProperties = new Lazy<PropertyInfo[]>(() =>
GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance).ToArray());
=======
public IObservable<IObservedChange<object, object>> Changed {
get { return this.getChangedObservable(); }
>>>>>>> theirs
### Resolution:
public IObservable<IObservedChange<ReactiveFragment, object>> Changed {
get { return this.getChangedObservable(); }
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10507_metadata.json",
"conflict_index": 6
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
return this.suppressChangeNotifications();
}
public bool AreChangeNotificationsEnabled()
{
return this.areChangeNotificationsEnabled();
||||||| base
Interlocked.Increment(ref changeNotificationsSuppressed);
return Disposable.Create(() =>
Interlocked.Decrement(ref changeNotificationsSuppressed));
}
protected internal void raisePropertyChanging(string propertyName)
{
Contract.Requires(propertyName != null);
if (!areChangeNotificationsEnabled || changingSubject == null)
return;
var handler = this.PropertyChanging;
if (handler != null) {
var e = new PropertyChangingEventArgs(propertyName);
handler(this, e);
}
notifyObservable(new ObservedChange<object, object>() {
PropertyName = propertyName, Sender = this, Value = null
}, changingSubject);
}
protected internal void raisePropertyChanged(string propertyName)
{
Contract.Requires(propertyName != null);
this.Log().Debug("{0:X}.{1} changed", this.GetHashCode(), propertyName);
if (!areChangeNotificationsEnabled || changedSubject == null) {
this.Log().Debug("Suppressed change");
return;
}
var handler = this.PropertyChanged;
if (handler != null) {
var e = new PropertyChangedEventArgs(propertyName);
handler(this, e);
}
notifyObservable(new ObservedChange<object, object>() {
PropertyName = propertyName, Sender = this, Value = null
}, changedSubject);
}
protected bool areChangeNotificationsEnabled {
get {
return (Interlocked.Read(ref changeNotificationsSuppressed) == 0);
}
}
internal void notifyObservable<T>(T item, Subject<T> subject)
{
try {
subject.OnNext(item);
} catch (Exception ex) {
this.Log().ErrorException("ReactiveObject Subscriber threw exception", ex);
thrownExceptions.OnNext(ex);
}
}
/// <summary>
/// RaiseAndSetIfChanged fully implements a Setter for a read-write
/// property on a ReactiveObject, using CallerMemberName to raise the notification
/// and the ref to the backing field to set the property.
/// </summary>
/// <typeparam name="TObj">The type of the This.</typeparam>
/// <typeparam name="TRet">The type of the return value.</typeparam>
/// <param name="This">The <see cref="ReactiveObject"/> raising the notification.</param>
/// <param name="backingField">A Reference to the backing field for this
/// property.</param>
/// <param name="newValue">The new value.</param>
/// <param name="propertyName">The name of the property, usually
/// automatically provided through the CallerMemberName attribute.</param>
/// <returns>The newly set value, normally discarded.</returns>
public TRet RaiseAndSetIfChanged<TRet>(
ref TRet backingField,
TRet newValue,
[CallerMemberName] string propertyName = null)
{
Contract.Requires(propertyName != null);
if (EqualityComparer<TRet>.Default.Equals(backingField, newValue)) {
return newValue;
}
raisePropertyChanging(propertyName);
backingField = newValue;
raisePropertyChanged(propertyName);
return newValue;
}
/// <summary>
/// Use this method in your ReactiveObject classes when creating custom
/// properties where raiseAndSetIfChanged doesn't suffice.
/// </summary>
/// <param name="This">The instance of ReactiveObject on which the property has changed.</param>
/// <param name="propertyName">
/// A string representing the name of the property that has been changed.
/// Leave <c>null</c> to let the runtime set to caller member name.
/// </param>
public void RaisePropertyChanged([CallerMemberName] string propertyName = null)
{
raisePropertyChanged(propertyName);
}
/// <summary>
/// Use this method in your ReactiveObject classes when creating custom
/// properties where raiseAndSetIfChanged doesn't suffice.
/// </summary>
/// <param name="This">The instance of ReactiveObject on which the property has changed.</param>
/// <param name="propertyName">
/// A string representing the name of the property that has been changed.
/// Leave <c>null</c> to let the runtime set to caller member name.
/// </param>
public void RaisePropertyChanging([CallerMemberName] string propertyName = null)
{
raisePropertyChanging(propertyName);
=======
return this.suppressChangeNotifications();
>>>>>>> theirs
### Resolution:
return this.suppressChangeNotifications();
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10507_metadata.json",
"conflict_index": 7
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
/// <summary>When enabled, Cameras using these Frame Settings calculate Transparent Screen Space Reflections.</summary>
[FrameSettingsField(1, displayedName: "Transparent Screen Space Reflection", customOrderInGroup: 25, positiveDependencies: new[] { SSR }, tooltip: "When enabled, Cameras using these Frame Settings calculate Screen Space Reflections on transparent objects.")]
TransparentSSR = 94,
[FrameSettingsField(1, displayedName: "Screen Space Ambient Occlusion", tooltip: "When enabled, Cameras using these Frame Settings calculate Screen Space Ambient Occlusion.")]
/// <summary>When enabled, Cameras using these Frame Settings calculate Screen Space Ambient Occlusion.</summary>
||||||| base
/// <summary>When enabled, Cameras using these Frame Settings calculate Screen Space Ambient Occlusion.</summary>
[FrameSettingsField(1, displayedName: "Screen Space Ambient Occlusion", tooltip: "When enabled, Cameras using these Frame Settings calculate Screen Space Ambient Occlusion.")]
=======
/// <summary>When enabled, Cameras using these Frame Settings calculate Screen Space Ambient Occlusion.</summary>
[FrameSettingsField(1, displayedName: "Screen Space Ambient Occlusion", tooltip: "When enabled, Cameras using these Frame Settings calculate Screen Space Ambient Occlusion (Depends on \"Screen Space Ambient Occlusion\" in current HDRP Asset).")]
>>>>>>> theirs
### Resolution:
/// <summary>When enabled, Cameras using these Frame Settings calculate Transparent Screen Space Reflections.</summary>
[FrameSettingsField(1, displayedName: "Transparent Screen Space Reflection", customOrderInGroup: 25, positiveDependencies: new[] { SSR }, tooltip: "When enabled, Cameras using these Frame Settings calculate Screen Space Reflections on transparent objects.")]
TransparentSSR = 94,
[FrameSettingsField(1, displayedName: "Screen Space Ambient Occlusion", tooltip: "When enabled, Cameras using these Frame Settings calculate Screen Space Ambient Occlusion.")]
/// <summary>When enabled, Cameras using these Frame Settings calculate Screen Space Ambient Occlusion.</summary>
[FrameSettingsField(1, displayedName: "Screen Space Ambient Occlusion", tooltip: "When enabled, Cameras using these Frame Settings calculate Screen Space Ambient Occlusion (Depends on \"Screen Space Ambient Occlusion\" in current HDRP Asset).")]
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\1050_metadata.json",
"conflict_index": 0
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
Console.WriteLine(RxApp.MainThreadScheduler.GetType().FullName);
Assert.Equal(CurrentThreadScheduler.Instance, RxApp.MainThreadScheduler);
||||||| base
Console.WriteLine(RxApp.DeferredScheduler.GetType().FullName);
Assert.Equal(Scheduler.Immediate, RxApp.DeferredScheduler);
}
[Fact]
public void UnitTestDetectorIdentifiesThisTestAsAnXUnitTest()
{
string[] testAssemblies = new[] {
"CSUNIT",
"NUNIT",
"XUNIT",
"MBUNIT",
"TESTDRIVEN",
"QUALITYTOOLS.TIPS.UNITTEST.ADAPTER",
"QUALITYTOOLS.UNITTESTING.SILVERLIGHT",
"PEX",
"MSBUILD",
"NBEHAVE",
"TESTPLATFORM",
};
string[] designEnvironments = new[] {
"BLEND.EXE",
"MONODEVELOP",
"SHARPDEVELOP.EXE",
};
var isInUnitTestRunner = RealUnitTestDetector.InUnitTestRunner(testAssemblies, designEnvironments);
Assert.True(isInUnitTestRunner);
}
[Fact]
public void UnitTestDetectorDoesNotIdentifyThisTestWhenXUnitAssemblyNotChecked()
{
// XUnit assembly name removed
string[] testAssembliesWithoutNunit = new[] {
"CSUNIT",
"NUNIT",
"MBUNIT",
"TESTDRIVEN",
"QUALITYTOOLS.TIPS.UNITTEST.ADAPTER",
"QUALITYTOOLS.UNITTESTING.SILVERLIGHT",
"PEX",
"MSBUILD",
"NBEHAVE",
"TESTPLATFORM",
};
string[] designEnvironments = new[] {
"BLEND.EXE",
"MONODEVELOP",
"SHARPDEVELOP.EXE",
};
var isInUnitTestRunner = RealUnitTestDetector.InUnitTestRunner(testAssembliesWithoutNunit, designEnvironments);
Assert.False(isInUnitTestRunner);
=======
Console.WriteLine(RxApp.DeferredScheduler.GetType().FullName);
Assert.Equal(Scheduler.Immediate, RxApp.DeferredScheduler);
}
[Fact]
public void OverridingInUnitTestRunnerShouldActuallyDoThat()
{
//Set a UnitTestScheduler
RxApp.InUnitTestRunnerOverride = true;
RxApp.DeferredScheduler = ImmediateScheduler.Instance;
//Try to Override
RxApp.InUnitTestRunnerOverride = false;
RxApp.DeferredScheduler = ThreadPoolScheduler.Instance;
Assert.NotEqual(Scheduler.Immediate, RxApp.DeferredScheduler);
//Restore Schedulers
RxApp.InUnitTestRunnerOverride = true;
RxApp.DeferredScheduler = ImmediateScheduler.Instance;
RxApp.InUnitTestRunnerOverride = null;
}
[Fact]
public void UnitTestDetectorIdentifiesThisTestAsAnXUnitTest()
{
string[] testAssemblies = new[] {
"CSUNIT",
"NUNIT",
"XUNIT",
"MBUNIT",
"TESTDRIVEN",
"QUALITYTOOLS.TIPS.UNITTEST.ADAPTER",
"QUALITYTOOLS.UNITTESTING.SILVERLIGHT",
"PEX",
"MSBUILD",
"NBEHAVE",
"TESTPLATFORM",
};
string[] designEnvironments = new[] {
"BLEND.EXE",
"MONODEVELOP",
"SHARPDEVELOP.EXE",
};
var isInUnitTestRunner = RealUnitTestDetector.InUnitTestRunner(testAssemblies, designEnvironments);
Assert.True(isInUnitTestRunner);
}
[Fact]
public void UnitTestDetectorDoesNotIdentifyThisTestWhenXUnitAssemblyNotChecked()
{
// XUnit assembly name removed
string[] testAssembliesWithoutNunit = new[] {
"CSUNIT",
"NUNIT",
"MBUNIT",
"TESTDRIVEN",
"QUALITYTOOLS.TIPS.UNITTEST.ADAPTER",
"QUALITYTOOLS.UNITTESTING.SILVERLIGHT",
"PEX",
"MSBUILD",
"NBEHAVE",
"TESTPLATFORM",
};
string[] designEnvironments = new[] {
"BLEND.EXE",
"MONODEVELOP",
"SHARPDEVELOP.EXE",
};
var isInUnitTestRunner = RealUnitTestDetector.InUnitTestRunner(testAssembliesWithoutNunit, designEnvironments);
Assert.False(isInUnitTestRunner);
>>>>>>> theirs
### Resolution:
Console.WriteLine(RxApp.MainThreadScheduler.GetType().FullName);
Assert.Equal(CurrentThreadScheduler.Instance, RxApp.MainThreadScheduler);
}
[Fact]
public void OverridingInUnitTestRunnerShouldActuallyDoThat()
{
//Set a UnitTestScheduler
RxApp.InUnitTestRunnerOverride = true;
RxApp.DeferredScheduler = ImmediateScheduler.Instance;
//Try to Override
RxApp.InUnitTestRunnerOverride = false;
RxApp.DeferredScheduler = ThreadPoolScheduler.Instance;
Assert.NotEqual(Scheduler.Immediate, RxApp.DeferredScheduler);
//Restore Schedulers
RxApp.InUnitTestRunnerOverride = true;
RxApp.DeferredScheduler = ImmediateScheduler.Instance;
RxApp.InUnitTestRunnerOverride = null;
}
[Fact]
public void UnitTestDetectorIdentifiesThisTestAsAnXUnitTest()
{
string[] testAssemblies = new[] {
"CSUNIT",
"NUNIT",
"XUNIT",
"MBUNIT",
"TESTDRIVEN",
"QUALITYTOOLS.TIPS.UNITTEST.ADAPTER",
"QUALITYTOOLS.UNITTESTING.SILVERLIGHT",
"PEX",
"MSBUILD",
"NBEHAVE",
"TESTPLATFORM",
};
string[] designEnvironments = new[] {
"BLEND.EXE",
"MONODEVELOP",
"SHARPDEVELOP.EXE",
};
var isInUnitTestRunner = RealUnitTestDetector.InUnitTestRunner(testAssemblies, designEnvironments);
Assert.True(isInUnitTestRunner);
}
[Fact]
public void UnitTestDetectorDoesNotIdentifyThisTestWhenXUnitAssemblyNotChecked()
{
// XUnit assembly name removed
string[] testAssembliesWithoutNunit = new[] {
"CSUNIT",
"NUNIT",
"MBUNIT",
"TESTDRIVEN",
"QUALITYTOOLS.TIPS.UNITTEST.ADAPTER",
"QUALITYTOOLS.UNITTESTING.SILVERLIGHT",
"PEX",
"MSBUILD",
"NBEHAVE",
"TESTPLATFORM",
};
string[] designEnvironments = new[] {
"BLEND.EXE",
"MONODEVELOP",
"SHARPDEVELOP.EXE",
};
var isInUnitTestRunner = RealUnitTestDetector.InUnitTestRunner(testAssembliesWithoutNunit, designEnvironments);
Assert.False(isInUnitTestRunner);
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10541_metadata.json",
"conflict_index": 0
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
// IViewFor<IFooBarViewModel>
try {
var ifn = interfaceifyTypeName(viewModel.GetType().AssemblyQualifiedName);
var type = Reflection.ReallyFindType(ifn, false);
if (type != null) {
var ret = RxApp.DependencyResolver.GetService(viewType.MakeGenericType(type), key) as IViewFor;
if (ret != null) return ret;
}
} catch (Exception ex) {
LogHost.Default.DebugException("Couldn't instantiate View via pure interface type", ex);
}
||||||| base
// IViewFor<IFooBarViewModel>
try {
var ifn = interfaceifyTypeName(viewModel.GetType().AssemblyQualifiedName);
var type = Reflection.ReallyFindType(ifn, false);
if (type != null) {
var ret = RxApp.GetService(viewType.MakeGenericType(type), key) as IViewFor;
if (ret != null) return ret;
}
} catch (Exception ex) {
LogHost.Default.DebugException("Couldn't instantiate View via pure interface type", ex);
}
=======
>>>>>>> theirs
### Resolution:
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10545_metadata.json",
"conflict_index": 0
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
private GraphView m_GraphView;
GraphTypeMapper typeMapper { get; set; }
||||||| base
GraphTypeMapper typeMapper { get; set; }
=======
>>>>>>> theirs
### Resolution:
private GraphView m_GraphView;
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\1054_metadata.json",
"conflict_index": 0
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
typeMapper = new GraphTypeMapper(typeof(MaterialNodeView));
typeMapper[typeof(AbstractMaterialNode)] = typeof(MaterialNodeView);
typeMapper[typeof(ColorNode)] = typeof(ColorNodeView);
typeMapper[typeof(GradientNode)] = typeof(GradientNodeView);
// typeMapper[typeof(ScatterNode)] = typeof(ScatterNodeView);
//typeMapper[typeof(TextureNode)] = typeof(TextureNodeView);
//typeMapper[typeof(SamplerAssetNode)] = typeof(SamplerAssetNodeView);
//typeMapper[typeof(TextureSamplerNode)] = typeof(TextureSamplerNodeView);
// typeMapper[typeof(Texture2DNode)] = typeof(TextureAssetNodeView);
// typeMapper[typeof(TextureLODNode)] = typeof(TextureLODNodeView);
typeMapper[typeof(SamplerStateNode)] = typeof(SamplerStateNodeView);
// typeMapper[typeof(CubemapNode)] = typeof(CubeNodeView);
// typeMapper[typeof(ToggleNode)] = typeof(ToggleNodeView);
typeMapper[typeof(UVNode)] = typeof(UVNodeView);
typeMapper[typeof(Vector1Node)] = typeof(Vector1NodeView);
typeMapper[typeof(Vector2Node)] = typeof(Vector2NodeView);
typeMapper[typeof(Vector3Node)] = typeof(Vector3NodeView);
typeMapper[typeof(Vector4Node)] = typeof(Vector4NodeView);
typeMapper[typeof(PropertyNode)] = typeof(PropertyNodeView);
/* typeMapper[typeof(ScaleOffsetNode)] = typeof(AnyNodeView); // anything derived from AnyNode should use the AnyNodeView
typeMapper[typeof(RadialShearNode)] = typeof(AnyNodeView); // anything derived from AnyNode should use the AnyNodeView
typeMapper[typeof(SphereWarpNode)] = typeof(AnyNodeView); // anything derived from AnyNode should use the AnyNodeView
typeMapper[typeof(SphericalIndentationNode)] = typeof(AnyNodeView); // anything derived from AnyNode should use the AnyNodeView
typeMapper[typeof(AACheckerboardNode)] = typeof(AnyNodeView); // anything derived from AnyNode should use the AnyNodeView
typeMapper[typeof(AACheckerboard3dNode)] = typeof(AnyNodeView); // anything derived from AnyNode should use the AnyNodeView*/
typeMapper[typeof(SubGraphNode)] = typeof(SubgraphNodeView);
typeMapper[typeof(MasterRemapNode)] = typeof(MasterRemapNodeView);
// typeMapper[typeof(MasterRemapInputNode)] = typeof(RemapInputNodeView);
typeMapper[typeof(AbstractSubGraphIONode)] = typeof(SubgraphIONodeView);
// typeMapper[typeof(AbstractSurfaceMasterNode)] = typeof(SurfaceMasterNodeView);
typeMapper[typeof(LevelsNode)] = typeof(LevelsNodeView);
typeMapper[typeof(ConstantsNode)] = typeof(ConstantsNodeView);
//typeMapper[typeof(SwizzleNode)] = typeof(SwizzleNodeView);
typeMapper[typeof(BlendModeNode)] = typeof(BlendModeNodeView);
// typeMapper[typeof(AddManyNode)] = typeof(AddManyNodeView);
typeMapper[typeof(IfNode)] = typeof(IfNodeView);
//typeMapper[typeof(CustomCodeNode)] = typeof(CustomCodeView);
typeMapper[typeof(Matrix2Node)] = typeof(Matrix2NodeView);
typeMapper[typeof(Matrix3Node)] = typeof(Matrix3NodeView);
typeMapper[typeof(Matrix4Node)] = typeof(Matrix4NodeView);
typeMapper[typeof(MatrixCommonNode)] = typeof(MatrixCommonNodeView);
typeMapper[typeof(TransformNode)] = typeof(TransformNodeView);
// typeMapper[typeof(ConvolutionFilterNode)] = typeof(ConvolutionFilterNodeView);
||||||| base
typeMapper = new GraphTypeMapper(typeof(MaterialNodePresenter));
typeMapper[typeof(AbstractMaterialNode)] = typeof(MaterialNodePresenter);
typeMapper[typeof(ColorNode)] = typeof(ColorNodePresenter);
typeMapper[typeof(GradientNode)] = typeof(GradientNodePresenter);
// typeMapper[typeof(ScatterNode)] = typeof(ScatterNodePresenter);
//typeMapper[typeof(TextureNode)] = typeof(TextureNodePresenter);
//typeMapper[typeof(SamplerAssetNode)] = typeof(SamplerAssetNodePresenter);
//typeMapper[typeof(TextureSamplerNode)] = typeof(TextureSamplerNodePresenter);
// typeMapper[typeof(Texture2DNode)] = typeof(TextureAssetNodePresenter);
// typeMapper[typeof(TextureLODNode)] = typeof(TextureLODNodePresenter);
typeMapper[typeof(SamplerStateNode)] = typeof(SamplerStateNodePresenter);
// typeMapper[typeof(CubemapNode)] = typeof(CubeNodePresenter);
// typeMapper[typeof(ToggleNode)] = typeof(ToggleNodePresenter);
typeMapper[typeof(UVNode)] = typeof(UVNodePresenter);
typeMapper[typeof(Vector1Node)] = typeof(Vector1NodePresenter);
typeMapper[typeof(Vector2Node)] = typeof(Vector2NodePresenter);
typeMapper[typeof(Vector3Node)] = typeof(Vector3NodePresenter);
typeMapper[typeof(Vector4Node)] = typeof(Vector4NodePresenter);
typeMapper[typeof(PropertyNode)] = typeof(PropertyNodePresenter);
/* typeMapper[typeof(ScaleOffsetNode)] = typeof(AnyNodePresenter); // anything derived from AnyNode should use the AnyNodePresenter
typeMapper[typeof(RadialShearNode)] = typeof(AnyNodePresenter); // anything derived from AnyNode should use the AnyNodePresenter
typeMapper[typeof(SphereWarpNode)] = typeof(AnyNodePresenter); // anything derived from AnyNode should use the AnyNodePresenter
typeMapper[typeof(SphericalIndentationNode)] = typeof(AnyNodePresenter); // anything derived from AnyNode should use the AnyNodePresenter
typeMapper[typeof(AACheckerboardNode)] = typeof(AnyNodePresenter); // anything derived from AnyNode should use the AnyNodePresenter
typeMapper[typeof(AACheckerboard3dNode)] = typeof(AnyNodePresenter); // anything derived from AnyNode should use the AnyNodePresenter*/
typeMapper[typeof(SubGraphNode)] = typeof(SubgraphNodePresenter);
typeMapper[typeof(MasterRemapNode)] = typeof(MasterRemapNodePresenter);
// typeMapper[typeof(MasterRemapInputNode)] = typeof(RemapInputNodePresenter);
typeMapper[typeof(AbstractSubGraphIONode)] = typeof(SubgraphIONodePresenter);
// typeMapper[typeof(AbstractSurfaceMasterNode)] = typeof(SurfaceMasterNodePresenter);
typeMapper[typeof(LevelsNode)] = typeof(LevelsNodePresenter);
typeMapper[typeof(ConstantsNode)] = typeof(ConstantsNodePresenter);
//typeMapper[typeof(SwizzleNode)] = typeof(SwizzleNodePresenter);
typeMapper[typeof(BlendModeNode)] = typeof(BlendModeNodePresenter);
// typeMapper[typeof(AddManyNode)] = typeof(AddManyNodePresenter);
typeMapper[typeof(IfNode)] = typeof(IfNodePresenter);
//typeMapper[typeof(CustomCodeNode)] = typeof(CustomCodePresenter);
typeMapper[typeof(Matrix2Node)] = typeof(Matrix2NodePresenter);
typeMapper[typeof(Matrix3Node)] = typeof(Matrix3NodePresenter);
typeMapper[typeof(Matrix4Node)] = typeof(Matrix4NodePresenter);
typeMapper[typeof(MatrixCommonNode)] = typeof(MatrixCommonNodePresenter);
typeMapper[typeof(TransformNode)] = typeof(TransformNodePresenter);
// typeMapper[typeof(ConvolutionFilterNode)] = typeof(ConvolutionFilterNodePresenter);
=======
>>>>>>> theirs
### Resolution:
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\1054_metadata.json",
"conflict_index": 1
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
var nodeView = (MaterialNodeView)typeMapper.Create(change.node);
||||||| base
var nodePresenter = (MaterialNodePresenter)typeMapper.Create(change.node);
=======
var nodePresenter = CreateInstance<MaterialNodePresenter>();
>>>>>>> theirs
### Resolution:
var nodeView = (MaterialNodeView)typeMapper.Create(change.node);
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\1054_metadata.json",
"conflict_index": 2
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
Undo.RecordObject(m_GraphObject, "Cut");
RemoveElements(
m_GraphView.selection.OfType<MaterialNodeView>(),
m_GraphView.selection.OfType<Edge>());
RecordState();
||||||| base
Undo.RecordObject(m_GraphObject, "Cut");
RemoveElements(elements.OfType<MaterialNodePresenter>().Where(e => e.selected), elements.OfType<GraphEdgePresenter>().Where(e => e.selected));
RecordState();
=======
graph.owner.RegisterCompleteObjectUndo("Cut");
RemoveElements(elements.OfType<MaterialNodePresenter>().Where(e => e.selected), elements.OfType<GraphEdgePresenter>().Where(e => e.selected));
>>>>>>> theirs
### Resolution:
graph.owner.RegisterCompleteObjectUndo("Cut");
RemoveElements(
m_GraphView.selection.OfType<MaterialNodeView>(),
m_GraphView.selection.OfType<Edge>());
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\1054_metadata.json",
"conflict_index": 3
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
var graph = DeserializeCopyBuffer(JsonUtility.ToJson(CreateCopyPasteGraph(m_GraphView.selection.OfType<GraphElement>()), true));
Undo.RecordObject(m_GraphObject, "Duplicate");
InsertCopyPasteGraph(graph);
RecordState();
||||||| base
var graph = DeserializeCopyBuffer(JsonUtility.ToJson(CreateCopyPasteGraph(elements.Where(e => e.selected)), true));
Undo.RecordObject(m_GraphObject, "Duplicate");
InsertCopyPasteGraph(graph);
RecordState();
=======
var deserializedGraph = DeserializeCopyBuffer(JsonUtility.ToJson(CreateCopyPasteGraph(elements.Where(e => e.selected)), true));
graph.owner.RegisterCompleteObjectUndo("Duplicate");
InsertCopyPasteGraph(deserializedGraph);
>>>>>>> theirs
### Resolution:
var deserializedGraph = DeserializeCopyBuffer(JsonUtility.ToJson(CreateCopyPasteGraph(m_GraphView.selection.OfType<GraphElement>()), true));
graph.owner.RegisterCompleteObjectUndo("Duplicate");
InsertCopyPasteGraph(deserializedGraph);
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\1054_metadata.json",
"conflict_index": 4
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
RecordState();
Undo.RecordObject(m_GraphObject, "Delete");
RemoveElements(
m_GraphView.selection.OfType<MaterialNodeView>(),
m_GraphView.selection.OfType<Edge>());
RecordState();
||||||| base
RecordState();
Undo.RecordObject(m_GraphObject, "Delete");
RemoveElements(elements.OfType<MaterialNodePresenter>().Where(e => e.selected), elements.OfType<GraphEdgePresenter>().Where(e => e.selected));
RecordState();
=======
graph.owner.RegisterCompleteObjectUndo("Delete");
RemoveElements(elements.OfType<MaterialNodePresenter>().Where(e => e.selected), elements.OfType<GraphEdgePresenter>().Where(e => e.selected));
>>>>>>> theirs
### Resolution:
graph.owner.RegisterCompleteObjectUndo("Delete");
RemoveElements(
m_GraphView.selection.OfType<MaterialNodeView>(),
m_GraphView.selection.OfType<Edge>());
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\1054_metadata.json",
"conflict_index": 5
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
[IgnoreDataMember]
public IObservable<IObservedChange<ReactiveActivity, object>> Changing {
get { return this.getChangingObservable(); }
||||||| base
[IgnoreDataMember]
public IObservable<IObservedChange<object, object>> Changing {
get { return changingSubject; }
=======
public IObservable<IObservedChange<object, object>> Changing {
get { return this.getChangingObservable(); }
>>>>>>> theirs
### Resolution:
public IObservable<IObservedChange<ReactiveActivity, object>> Changing {
get { return this.getChangingObservable(); }
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10556_metadata.json",
"conflict_index": 2
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
[IgnoreDataMember]
public IObservable<IObservedChange<ReactiveActivity, object>> Changed {
get { return this.getChangedObservable(); }
}
[IgnoreDataMember]
protected Lazy<PropertyInfo[]> allPublicProperties;
[IgnoreDataMember]
public IObservable<Exception> ThrownExceptions { get { return this.getThrownExceptionsObservable(); } }
[OnDeserialized]
void setupRxObj(StreamingContext sc) { setupRxObj(); }
void setupRxObj()
{
allPublicProperties = new Lazy<PropertyInfo[]>(() =>
GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance).ToArray());
||||||| base
[IgnoreDataMember]
public IObservable<IObservedChange<object, object>> Changed {
get { return changedSubject; }
}
[IgnoreDataMember]
protected Lazy<PropertyInfo[]> allPublicProperties;
[IgnoreDataMember]
Subject<IObservedChange<object, object>> changingSubject;
[IgnoreDataMember]
Subject<IObservedChange<object, object>> changedSubject;
[IgnoreDataMember]
long changeNotificationsSuppressed = 0;
[IgnoreDataMember]
readonly ScheduledSubject<Exception> thrownExceptions = new ScheduledSubject<Exception>(Scheduler.Immediate, RxApp.DefaultExceptionHandler);
[IgnoreDataMember]
public IObservable<Exception> ThrownExceptions { get { return thrownExceptions; } }
[OnDeserialized]
void setupRxObj(StreamingContext sc) { setupRxObj(); }
void setupRxObj()
{
changingSubject = new Subject<IObservedChange<object, object>>();
changedSubject = new Subject<IObservedChange<object, object>>();
allPublicProperties = new Lazy<PropertyInfo[]>(() =>
GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance).ToArray());
=======
public IObservable<IObservedChange<object, object>> Changed {
get { return this.getChangedObservable(); }
>>>>>>> theirs
### Resolution:
public IObservable<IObservedChange<ReactiveActivity, object>> Changed {
get { return this.getChangedObservable(); }
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10556_metadata.json",
"conflict_index": 3
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
return this.suppressChangeNotifications();
}
public bool AreChangeNotificationsEnabled()
{
return this.areChangeNotificationsEnabled();
}
||||||| base
Interlocked.Increment(ref changeNotificationsSuppressed);
return Disposable.Create(() =>
Interlocked.Decrement(ref changeNotificationsSuppressed));
}
protected internal void raisePropertyChanging(string propertyName)
{
Contract.Requires(propertyName != null);
if (!areChangeNotificationsEnabled || changingSubject == null)
return;
var handler = this.PropertyChanging;
if (handler != null) {
var e = new PropertyChangingEventArgs(propertyName);
handler(this, e);
}
notifyObservable(new ObservedChange<object, object>() {
PropertyName = propertyName, Sender = this, Value = null
}, changingSubject);
}
protected internal void raisePropertyChanged(string propertyName)
{
Contract.Requires(propertyName != null);
this.Log().Debug("{0:X}.{1} changed", this.GetHashCode(), propertyName);
if (!areChangeNotificationsEnabled || changedSubject == null) {
this.Log().Debug("Suppressed change");
return;
}
var handler = this.PropertyChanged;
if (handler != null) {
var e = new PropertyChangedEventArgs(propertyName);
handler(this, e);
}
notifyObservable(new ObservedChange<object, object>() {
PropertyName = propertyName, Sender = this, Value = null
}, changedSubject);
}
protected bool areChangeNotificationsEnabled {
get {
return (Interlocked.Read(ref changeNotificationsSuppressed) == 0);
}
}
internal void notifyObservable<T>(T item, Subject<T> subject)
{
try {
subject.OnNext(item);
} catch (Exception ex) {
this.Log().ErrorException("ReactiveObject Subscriber threw exception", ex);
thrownExceptions.OnNext(ex);
}
}
/// <summary>
/// RaiseAndSetIfChanged fully implements a Setter for a read-write
/// property on a ReactiveObject, using CallerMemberName to raise the notification
/// and the ref to the backing field to set the property.
/// </summary>
/// <typeparam name="TObj">The type of the This.</typeparam>
/// <typeparam name="TRet">The type of the return value.</typeparam>
/// <param name="This">The <see cref="ReactiveObject"/> raising the notification.</param>
/// <param name="backingField">A Reference to the backing field for this
/// property.</param>
/// <param name="newValue">The new value.</param>
/// <param name="propertyName">The name of the property, usually
/// automatically provided through the CallerMemberName attribute.</param>
/// <returns>The newly set value, normally discarded.</returns>
public TRet RaiseAndSetIfChanged<TRet>(
ref TRet backingField,
TRet newValue,
[CallerMemberName] string propertyName = null)
{
Contract.Requires(propertyName != null);
if (EqualityComparer<TRet>.Default.Equals(backingField, newValue)) {
return newValue;
}
raisePropertyChanging(propertyName);
backingField = newValue;
raisePropertyChanged(propertyName);
return newValue;
}
/// <summary>
/// Use this method in your ReactiveObject classes when creating custom
/// properties where raiseAndSetIfChanged doesn't suffice.
/// </summary>
/// <param name="This">The instance of ReactiveObject on which the property has changed.</param>
/// <param name="propertyName">
/// A string representing the name of the property that has been changed.
/// Leave <c>null</c> to let the runtime set to caller member name.
/// </param>
public void RaisePropertyChanged([CallerMemberName] string propertyName = null)
{
raisePropertyChanged(propertyName);
}
/// <summary>
/// Use this method in your ReactiveObject classes when creating custom
/// properties where raiseAndSetIfChanged doesn't suffice.
/// </summary>
/// <param name="This">The instance of ReactiveObject on which the property has changed.</param>
/// <param name="propertyName">
/// A string representing the name of the property that has been changed.
/// Leave <c>null</c> to let the runtime set to caller member name.
/// </param>
public void RaisePropertyChanging([CallerMemberName] string propertyName = null)
{
raisePropertyChanging(propertyName);
}
=======
return this.suppressChangeNotifications();
}
public IObservable<Exception> ThrownExceptions { get { return this.getThrownExceptionsObservable(); } }
>>>>>>> theirs
### Resolution:
return this.suppressChangeNotifications();
}
public IObservable<Exception> ThrownExceptions { get { return this.getThrownExceptionsObservable(); } }
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10556_metadata.json",
"conflict_index": 4
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
internal static IObservable<object> ViewModelWhenAnyValue<TView, TViewModel>(TViewModel viewModel, TView view, Expression expression)
||||||| base
internal static IObservable<TProp> ViewModelWhenAnyValue<TView, TViewModel, TProp>(TViewModel viewModel, TView view, Expression<Func<TViewModel, TProp>> property)
=======
public static void ThrowIfMethodsNotOverloaded(string callingTypeName, object targetObject, params string[] methodsToCheck)
{
var missingMethod = methodsToCheck
.Select(x => {
var methods = targetObject.GetType().GetTypeInfo().DeclaredMethods;
return Tuple.Create(x, methods.FirstOrDefault(y => y.Name == x));
})
.FirstOrDefault(x => x.Item2 == null);
if (missingMethod != null) {
throw new Exception(String.Format("Your class must implement {0} and call {1}.{0}", missingMethod.Item1, callingTypeName));
}
}
internal static IObservable<TProp> ViewModelWhenAnyValue<TView, TViewModel, TProp>(TViewModel viewModel, TView view, Expression<Func<TViewModel, TProp>> property)
>>>>>>> theirs
### Resolution:
public static void ThrowIfMethodsNotOverloaded(string callingTypeName, object targetObject, params string[] methodsToCheck)
{
var missingMethod = methodsToCheck
.Select(x => {
var methods = targetObject.GetType().GetTypeInfo().DeclaredMethods;
return Tuple.Create(x, methods.FirstOrDefault(y => y.Name == x));
})
.FirstOrDefault(x => x.Item2 == null);
if (missingMethod != null) {
throw new Exception(String.Format("Your class must implement {0} and call {1}.{0}", missingMethod.Item1, callingTypeName));
}
}
internal static IObservable<object> ViewModelWhenAnyValue<TView, TViewModel>(TViewModel viewModel, TView view, Expression expression)
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10576_metadata.json",
"conflict_index": 0
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
using System.Collections.Generic;
||||||| base
using System.Collections.Generic;
=======
using System.Collections.Generic;
using System.Threading.Tasks;
>>>>>>> theirs
### Resolution:
using System.Collections.Generic;
using System.Threading.Tasks;
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10581_metadata.json",
"conflict_index": 0
} |
Below is a git merge conflict for C# source code. Write the
correct resolution for the conflict. Your response should only contain
the resolved code. Do not include any of the original code or the
conflict markers.
### Merge Conflict:
<<<<<<< ours
public InlineQueryResultArticle(string id, string title, InputMessageContent inputMessageContent)
: base(InlineQueryResultType.Article, id)
||||||| base
public InlineQueryResultArticle(string id, string title, InputMessageContent inputMessageContent)
: this()
=======
public InlineQueryResultArticle(string id, string title, InputMessageContentBase inputMessageContent)
: this()
>>>>>>> theirs
### Resolution:
public InlineQueryResultArticle(string id, string title, InputMessageContentBase inputMessageContent)
: base(InlineQueryResultType.Article, id)
| {
"source": "mergebert",
"metadata_fname": "C:\\Users\\t-shonverch\\Downloads\\fse2022\\automated-analysis-data\\CSharp\\10582_metadata.json",
"conflict_index": 0
} |
End of preview.
No dataset card yet
New: Create and edit this dataset card directly on the website!
Contribute a Dataset Card- Downloads last month
- 4