original_prompt
stringlengths
327
2.5k
original_completion
stringlengths
22
2.84k
enhanced_prompt
float64
enhanced_completion
float64
Create method for status timeout Apply this change to `Source/Model/Connecting/MConnectingStatus.swift` and return the full updated file. ```swift import Foundation extension MConnecting { //MARK: internal func statusLoading() { status = MConnectingStatusLoading() } func statusP...
```swift import Foundation extension MConnecting { //MARK: internal func statusLoading() { status = MConnectingStatusLoading() } func statusPin() { status = MConnectingStatusPin() } func statusTimeout() { status = MConnectingStatusTimeout() ...
null
null
Fix transposed 'expected' and 'actual' arguments Also: No need to pass address of pointer to json.Unmarshal Apply this change to `atom/parser_test.go` and return the full updated file. ```go package atom_test import ( "bytes" "encoding/json" "fmt" "io/ioutil" "path/filepath" "strings" "testing" "github.com...
```go package atom_test import ( "bytes" "encoding/json" "fmt" "io/ioutil" "path/filepath" "strings" "testing" "github.com/mmcdole/gofeed/atom" "github.com/stretchr/testify/assert" ) // Tests func TestParser_Parse(t *testing.T) { files, _ := filepath.Glob("../testdata/parser/atom/*.xml") for _, f := rang...
null
null
Fix specifying the service name to store the query processor credentials in. Apply this change to `src/main/java/uk/co/reecedunn/intellij/plugin/processor/query/ConnectionSettings.kt` and return the full updated file. ```kotlin /* * Copyright (C) 2018 Reece H. Dunn * * Licensed under the Apache License, Version 2....
```kotlin /* * Copyright (C) 2018 Reece H. Dunn * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
null
null
Add author and since tag Add author and since tag to the SubscribableMessageSource Apply this change to `messaging/src/main/java/org/axonframework/messaging/SubscribableMessageSource.java` and return the full updated file. ```java /* * Copyright (c) 2010-2018. Axon Framework * * Licensed under the Apache License,...
```java /* * Copyright (c) 2010-2018. Axon Framework * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicab...
null
null
Add explicit reasoning for session sniff From https://vip.wordpress.com/documentation/code-review-what-we-look-for/#session_start-and-other-session-related-functions, linked in #75 Apply this change to `WordPress/Sniffs/VIP/SessionVariableUsageSniff.php` and return the full updated file. ```php <?php /** * WordPres...
```php <?php /** * WordPress_Sniffs_VIP_SessionVariableUsageSniff * * Discourages the use of the session variable. * Creating a session writes a file to the server and is unreliable in a multi-server environment. * * @category PHP * @package PHP_CodeSniffer * @author Shady Sharaf <shady@x-team.com> * @link ...
null
null
Fix study actions order on the toolbar Apply this change to `python/educational-python/student-python/src/com/jetbrains/edu/learning/PyStudyToolWindowConfigurator.java` and return the full updated file. ```java package com.jetbrains.edu.learning; import com.intellij.openapi.actionSystem.DefaultActionGroup; import co...
```java package com.jetbrains.edu.learning; import com.intellij.openapi.actionSystem.DefaultActionGroup; import com.intellij.openapi.project.Project; import com.jetbrains.edu.courseFormat.Course; import org.jetbrains.annotations.NotNull; public class PyStudyToolWindowConfigurator extends StudyBaseToolWindowConfigurat...
null
null
Use SequenceEqual and check null Apply this change to `Project/Util/SharedStructures.cs` and return the full updated file. ```csharp using System.Collections.Generic; namespace Kazyx.RemoteApi { /// <summary> /// Response of getMethodTypes API. /// </summary> public class MethodType { //...
```csharp using System.Collections.Generic; using System.Linq; namespace Kazyx.RemoteApi { /// <summary> /// Response of getMethodTypes API. /// </summary> public class MethodType { /// <summary> /// Name of API /// </summary> public string Name { set; get; } ...
null
null
Update to make GITHUB_TEAM_ID optional properly Apply this change to `app/controllers/auth_controller.rb` and return the full updated file. ```ruby class AuthController < ApplicationController skip_before_filter :auth, :only => :create def create if team_access? user = User.where( :github_id =>...
```ruby class AuthController < ApplicationController skip_before_filter :auth, :only => :create def create if team_access? user = User.where( :github_id => auth_hash['uid'], :login => auth_hash['info']['nickname'] ).first_or_create user.access_token = auth_hash.credentials['t...
null
null
Fix preference-item input element disappearing issue Apply this change to `src/components/preference-item/preference-item.component.ts` and return the full updated file. ```typescript import { Component, Host, Input, OnInit, Optional } from '@angular/core'; import { Preference } from '../../services/preference/types'...
```typescript import { Component, Host, Input, OnInit, Optional } from '@angular/core'; import { Preference } from '../../services/preference/types'; import { PreferenceGroupComponent } from '../preference-group/preference-group.component'; import { BehaviorSubject } from 'rxjs'; @Component({ selector: 'app-preferen...
null
null
Add docs for playlist type. Apply this change to `Sources/Cider/ResourceObjects/Playlist.swift` and return the full updated file. ```swift // // Playlist.swift // Cider // // Created by Scott Hoyt on 8/25/17. // Copyright © 2017 Scott Hoyt. All rights reserved. // import Foundation public typealias Playlist = R...
```swift // // Playlist.swift // Cider // // Created by Scott Hoyt on 8/25/17. // Copyright © 2017 Scott Hoyt. All rights reserved. // import Foundation public typealias Playlist = Resource<PlaylistAttributes, PlaylistRelationships> /// A type describing the kind of playlist public enum PlaylistType: String, Cod...
null
null
Remove comment that is no longer applicable Apply this change to `src/unix_core.c` and return the full updated file. ```c /* * This file is covered by the Internet Software Consortium (ISC) License * Reference: ../License.txt * * __nohang_waitpid is linked directly into Synth but it's related to synthexec * so l...
```c /* * This file is covered by the Internet Software Consortium (ISC) License * Reference: ../License.txt * * __nohang_waitpid is linked directly into Synth but it's related to synthexec * so let's keep the C files together. * return: * 0 when process is still running * 1 when process exited normally ...
null
null
WebAPI: Add route for updating caches via fragment traversal Apply this change to `vs/LCIAToolAPI/LCIAToolAPI/API/FragmentTraversalController.cs` and return the full updated file. ```csharp using Data; using Ninject; using Services; using System; using System.Collections.Generic; using System.Linq; using System.Net;...
```csharp using Data; using Ninject; using Services; using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Net.Http; using System.Web.Http; namespace LCAToolAPI.API { public class FragmentTraversalController : ApiController { [Inject] private readonl...
null
null
Add TIMEOUT status and document statuses. Apply this change to `src/main/java/com/collective/celos/SlotState.java` and return the full updated file. ```java package com.collective.celos; /** * The execution status of a slot. */ public class SlotState extends ValueObject { protected final SlotID slotID; ...
```java package com.collective.celos; /** * The execution status of a slot. */ public class SlotState extends ValueObject { protected final SlotID slotID; protected final Status status; public enum Status { /** No data availability yet. */ WAITING, /** No data availabili...
null
null
Add if exists to table create Apply this change to `db/mysql.sql` and return the full updated file. ```sql CREATE TABLE `HardCache` ( `Id` varchar(255) NOT NULL, `Bucket` varchar(255) NOT NULL, `Value` longtext NOT NULL, `EndDate` datetime NOT NULL, `Created` datetime NOT NULL DEFAULT CURRENT_TIME...
```sql CREATE TABLE IF NOT EXISTS `HardCache` ( `Id` varchar(255) NOT NULL, `Bucket` varchar(255) NOT NULL, `Value` longtext NOT NULL, `EndDate` datetime NOT NULL, `Created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `Modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIM...
null
null
Fix issue about custom emoji. If both custom emoji and emojione's emoji exist, custom emoji should be shown. Apply this change to `src/services/slack/emoji.service.ts` and return the full updated file. ```typescript import { defaultEmojis } from './default_emoji'; import { SlackClient } from './slack-client'; impor...
```typescript import { defaultEmojis } from './default_emoji'; import { SlackClient } from './slack-client'; import * as emojione from 'emojione'; export class EmojiService { emojiList: { string: string }; defaultEmojis = defaultEmojis; get allEmojis(): string[] { return defaultEmojis.concat(Obje...
null
null
Fix the copying of the `SFMono` typeface Apply this change to `install/darwin/theming.sh` and return the full updated file. ```bash #!/usr/bin/env bash # Copy the typefaces to the "Fonts" folder. info "Copying typefaces..." if ! test -n "$(find ~/Library/Fonts -name 'SF Mono*.otf')"; then for file in $(find /Ap...
```bash #!/usr/bin/env bash # Copy the typefaces to the "Fonts" folder. info "Copying typefaces..." if ! test -n "$(find ~/Library/Fonts -name 'SFMono*.otf')"; then for file in $(find /Applications/Utilities/Terminal.app/Contents/Resources/Fonts -name 'SFMono*.otf'); do cp $file ~/Library/Fonts done f...
null
null
Expand -p to --python for virtualenv command Apply this change to `terminal/bash/functions.sh` and return the full updated file. ```bash #!/bin/bash # functions.sh # Caleb Evans # Reloads entire shell, including .bash_profile and any activated virtualenv reload() { deactivate 2> /dev/null exec $SHELL -l } # Makes...
```bash ''#!/bin/bash # functions.sh # Caleb Evans # Reloads entire shell, including .bash_profile and any activated virtualenv reload() { deactivate 2> /dev/null exec $SHELL -l } # Makes new Python virtualenv for current directory mkvirtualenv() { virtualenv --python="$1" "$VIRTUAL_ENV_NAME" # Activate virtualen...
null
null
Drop unused columns from the taxon table Apply this change to `gemma-core/src/main/resources/sql/migrations/db.1.23.1.sql` and return the full updated file. ```sql ## start naming files to reference the release version and git tag at which point the code will require the changes in this file update CHROMOSOME_FEATUR...
```sql ## start naming files to reference the release version and git tag at which point the code will require the changes in this file update CHROMOSOME_FEATURE set class = "GeneProduct" where class = "GeneProductImpl"; alter table TAXON drop COLUMN `UNIGENE_PREFIX`, drop COLUMN `SWISS_PROT_SUFFIX`; ```
null
null
Add Linux & MingW x64 support to coroutines Apply this change to `modules/coroutines/build.gradle.kts` and return the full updated file. ```kotlin /* * Copyright 2019 Louis Cognault Ayeva Derman. Use of this source code is governed by the Apache 2.0 license. */ plugins { kotlin("multiplatform") `maven-publ...
```kotlin /* * Copyright 2019-2020 Louis Cognault Ayeva Derman. Use of this source code is governed by the Apache 2.0 license. */ plugins { kotlin("multiplatform") `maven-publish` } kotlin { jvm() js { useCommonJs() } macos() ios(supportArm32 = true) linux(x64 = true) mingw(x64 = tru...
null
null
Use CSS styling to proportionally resize the iFrame Use the notebook aspect ratio to determine padding for the iFrame container. This keeps the proportions of the JupyterLab Notebook, avoids the delay caused by calculating the height, and seems to work smoothly across browsers. Signed-off-by: Brianna Major <6a62c0472...
```javascript import React, { Component } from 'react'; import PropTypes from 'prop-types'; import Iframe from 'react-iframe' import { Typography, withStyles } from '@material-ui/core'; import PageHead from './page-head'; import PageBody from './page-body'; const styles = () => ({ iframe: { border: 0, left...
null
null
Fix test mod for latest mappings Apply this change to `src/test/java/net/fabricmc/test/mixin/MixinGuiMain.java` and return the full updated file. ```java /* * Copyright 2016 FabricMC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the Licen...
```java /* * Copyright 2016 FabricMC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
null
null
Fix country mapping test for FBCTF configuration Apply this change to `test/server/countryMappingSpec.ts` and return the full updated file. ```typescript /* * Copyright (c) 2014-2022 Bjoern Kimminich & the OWASP Juice Shop contributors. * SPDX-License-Identifier: MIT */ import sinon = require('sinon') const chai ...
```typescript /* * Copyright (c) 2014-2022 Bjoern Kimminich & the OWASP Juice Shop contributors. * SPDX-License-Identifier: MIT */ import sinon = require('sinon') const config = require('config') const chai = require('chai') const sinonChai = require('sinon-chai') const expect = chai.expect chai.use(sinonChai) des...
null
null
Remove the DoctrineBundle from the testing embeded kernel. Apply this change to `Tests/embededKernel/AppKernel.php` and return the full updated file. ```php <?php use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Config\Loader\LoaderInterface; class AppKernel extends Kernel { public function regist...
```php <?php use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Config\Loader\LoaderInterface; class AppKernel extends Kernel { public function registerBundles() { $bundles = array( new Symfony\Bundle\FrameworkBundle\FrameworkBundle(), new Symfony\Bundle\SecurityBun...
null
null
Modify installer for velodyne gazebo plugins Apply this change to `src/fifth_robot_pkgs/fifth_robot_description/install_simulator.sh` and return the full updated file. ```bash #!/bin/bash sudo apt-get install ros-kinetic-controller-manager sudo apt-get install ros-kinetic-gazebo-ros-control sudo apt-get install ros-...
```bash #!/bin/bash sudo apt-get install ros-kinetic-controller-manager ros-kinetic-gazebo-ros-control ros-kinetic-diff-drive-controller ros-kinetic-joint-state-controller ros-kinetic-ros-control ros-kinetic-ros-controllers ros-kinetic-teleop-twist-keyboard ros-kinetic-velodyne-gazebo-plugins ```
null
null
Remove the purposefully failing spec Why you made the change: I did this because now we have seen travis-ci successfully run and fail. Now we want to remove this and see travis-ci successfully run and succeed. Apply this change to `spec/optional_logger_spec.rb` and return the full updated file. ```ruby require "spe...
```ruby require "spec_helper" describe OptionalLogger do it "has a version number" do expect(OptionalLogger::VERSION).not_to be nil end end ```
null
null
Add support for `CheckoutSession` on `Discount` Apply this change to `discount.go` and return the full updated file. ```go package stripe import "encoding/json" // DiscountParams is the set of parameters that can be used when deleting a discount. type DiscountParams struct { Params `form:"*"` } // Discount is the...
```go package stripe import "encoding/json" // DiscountParams is the set of parameters that can be used when deleting a discount. type DiscountParams struct { Params `form:"*"` } // Discount is the resource representing a Stripe discount. // For more details see https://stripe.com/docs/api#discounts. type Discount ...
null
null
Remove closure for 5.2 and 5.3 support Apply this change to `tests/Transport/fsockopen.php` and return the full updated file. ```php <?php class RequestsTest_Transport_fsockopen extends RequestsTest_Transport_Base { protected $transport = 'Requests_Transport_fsockopen'; public function testHTTPS() { // If OpenS...
```php <?php class RequestsTest_Transport_fsockopen extends RequestsTest_Transport_Base { protected $transport = 'Requests_Transport_fsockopen'; public function testHTTPS() { // If OpenSSL isn't loaded, this should fail if (!defined('OPENSSL_VERSION_NUMBER')) { $this->setExpectedException('Requests_Exception...
null
null
Add composite indexes to avoid touching the table while filtering for Q/A. Apply this change to `sql/Posts_post.sql` and return the full updated file. ```sql -- hash index takes too long to create CREATE INDEX posts_post_type_id_idx on Posts USING btree (PostTypeId) WITH (FILLFACTOR = 100); CREATE INDEX posts_...
```sql -- hash index takes too long to create CREATE INDEX posts_post_type_id_idx on Posts USING btree (PostTypeId) WITH (FILLFACTOR = 100); CREATE INDEX posts_score_idx on Posts USING btree (Score) WITH (FILLFACTOR = 100); CREATE INDEX posts_creation_date_idx on Posts USING btree (CreationDate) WI...
null
null
Add guard for multiple calls of Stop-method. Apply this change to `stopper.go` and return the full updated file. ```go //Copyright 2016 lyobzik // //Licensed under the Apache License, Version 2.0 (the "License"); //you may not use this file except in compliance with the License. //You may obtain a copy of the License...
```go //Copyright 2016 lyobzik // //Licensed under the Apache License, Version 2.0 (the "License"); //you may not use this file except in compliance with the License. //You may obtain a copy of the License at // //http://www.apache.org/licenses/LICENSE-2.0 // //Unless required by applicable law or agreed to in writing,...
null
null
Remove text transformation on user account dropdown button Apply this change to `src/js/components/UserAccountDropdown.js` and return the full updated file. ```javascript import {Dropdown} from 'reactjs-components'; import React from 'react'; class UserAccountDropdown extends React.Component { handleItemSelection(...
```javascript import {Dropdown} from 'reactjs-components'; import React from 'react'; class UserAccountDropdown extends React.Component { handleItemSelection(item) { if (item.onClick) { item.onClick(); } } render() { return ( <Dropdown buttonClassName="user-account-dropdown-button text-n...
null
null
(Migrations): Change user_agent column to text Apply this change to `migrations/20151114214613_set_up_authentication_history.php` and return the full updated file. ```php <?php use Phinx\Migration\AbstractMigration; class SetUpAuthenticationHistory extends AbstractMigration { /** * Change Method. * ...
```php <?php use Phinx\Migration\AbstractMigration; class SetUpAuthenticationHistory extends AbstractMigration { /** * Change Method. * * Write your reversible migrations using this method. * * More information on writing migrations is available here: * http://docs.phinx.org/en/lates...
null
null
Update remove all script to reflect new object names Apply this change to `SQLServiceBroker/Setup/03-Remove-all.sql` and return the full updated file. ```sql SELECT name, is_broker_enabled, service_broker_guid FROM sys.databases; ALTER DATABASE msdb SET ENABLE_BROKER; ALTER DATABASE CURRENT SET NEW_BROKER WITH ROLL...
```sql SELECT name, is_broker_enabled, service_broker_guid FROM sys.databases; ALTER DATABASE msdb SET ENABLE_BROKER; ALTER DATABASE CURRENT SET NEW_BROKER WITH ROLLBACK IMMEDIATE; -- Use ENABLE_BROKER if restoring db GO -- Content Queue Procs DROP PROC dbo.UpdateRecommendationsFromSummary; GO DROP PROC dbo.ReadFro...
null
null
Remove /tmp/dotfiles if it exists Signed-off-by: Lou Marvin Caraig <5f33b97f6c357145640aa3022c2df12fd56c93cf@gmail.com> Apply this change to `install.sh` and return the full updated file. ```bash set -e download_dotfiles() { GITHUB_REPOSITORY="se7entyse7en/dotfiles" DOTFILES_ORIGIN="git@github.com:$GITHUB_R...
```bash set -e download_dotfiles() { GITHUB_REPOSITORY="se7entyse7en/dotfiles" DOTFILES_ORIGIN="git@github.com:$GITHUB_REPOSITORY.git" DOTFILES_TARBALL_URL="https://github.com/$GITHUB_REPOSITORY/tarball/master" # Download and extract dotfiles repo into a temporary directory tmp_file="/tmp/dotfiles...
null
null
Fix so that dotnet test command can be used Apply this change to `src/tests/MyNatsClient.IntegrationTests/TestSettings.cs` and return the full updated file. ```csharp using System.IO; using Microsoft.Extensions.Configuration; using System.Linq; namespace MyNatsClient.IntegrationTests { public static class TestS...
```csharp using System; using System.IO; using Microsoft.Extensions.Configuration; using System.Linq; namespace MyNatsClient.IntegrationTests { public static class TestSettings { public static IConfigurationRoot Config { get; set; } static TestSettings() { var builder = ne...
null
null
Fix latest migration's down() function Apply this change to `database/migrations/2016_05_18_015728_add_active_field_to_users_table.php` and return the full updated file. ```php <?php use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddActiveFieldToUsersTable extends Migr...
```php <?php use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddActiveFieldToUsersTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table("users", function(Blueprint $table) { ...
null
null
Add initial attributes tables (schema related attributes). Apply this change to `resources/bootstrap/postgresql/bootstrap.sql` and return the full updated file. ```sql CREATE TYPE partition AS ENUM ('system', 'schema', 'user'); -- A table that will store the whole transaction log -- of the database. CREATE TABLE IF ...
```sql CREATE TYPE partition AS ENUM ('system', 'schema', 'user'); -- A table that will store the whole transaction log -- of the database. CREATE TABLE IF NOT EXISTS txlog ( id bigint PRIMARY KEY, part partition, facts bytea, created_at timestamptz default now() ) WITH (OIDS=FALSE); -- A table that will sto...
null
null
Add a comment to offer a hint to an explanation for why we have a unique constraint on (app_id, pushkey, user_id) Apply this change to `synapse/storage/schema/delta/30/deleted_pushers.sql` and return the full updated file. ```sql /* Copyright 2016 OpenMarket Ltd * * Licensed under the Apache License, Version 2.0 (t...
```sql /* Copyright 2016 OpenMarket Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
null
null
Modify regex to be less greedy Apply this change to `ci/bumpSdkVersionAndPush.sh` and return the full updated file. ```bash #!/bin/bash sed -i "s/appsdk-src:tgz:.*\",/appsdk-src:tgz:${APPSDK_SRC_VERSION}\",/" js_dependencies.json git add js_dependencies.json git config user.name Hudson git config user.email hudson@...
```bash #!/bin/bash sed -i "s/appsdk-src:tgz:[^\"]*\",/appsdk-src:tgz:${APPSDK_SRC_VERSION}\",/" js_dependencies.json git add js_dependencies.json git config user.name Hudson git config user.email hudson@rallydev.com git commit -F appsdk.bump --author="${JOB_NAME} <bogus@rallydev.com>" branch_name_only=`echo $GIT_BR...
null
null
Use vim as zsh and bash EDITOR Apply this change to `scripts/shared-exports.bash` and return the full updated file. ```bash # Always prefer Ruby 1.9 in jRuby export JRUBY_OPTS='--1.9' # Prefer Vim when using `bundle open` export BUNDLER_EDITOR='vi' # Customize to your needs... export PATH=/usr/local/bin:$PATH expor...
```bash # Always prefer Ruby 1.9 in jRuby export JRUBY_OPTS='--1.9' # Set vim to be primary editor export EDITOR='vi' # Customize to your needs... export PATH=/usr/local/bin:$PATH export PATH=/usr/local/sbin:$PATH export PATH=$HOME/bin:$PATH export PATH=$HOME/.rbenv/bin:$PATH # if [[ `uname` == 'Darwin' ]]; then # ...
null
null
Add modifier before modulus to eliminate check for +/- Apply this change to `src/hue.js` and return the full updated file. ```javascript import make from "./make"; export const setHue = (color, hueValue) => { if (hueValue === null) return color; const { s, l, a } = color; return make.fromHsl(hueValue, s, l, a)...
```javascript import make from "./make"; export const setHue = (color, hueValue) => { if (hueValue === null) return color; const { s, l, a } = color; return make.fromHsl(hueValue, s, l, a); } export const spin = (color, degrees = 0) => { const { h } = color; const newHue = h + degrees; return setHue(colo...
null
null
Revert "Colony Compatibility does not need to depend on distribution" This reverts commit 48f3e648ddaa18c5855638747c1bfd036f4fbeca. Apply this change to `.teamcity/Gradle_Check/configurations/ColonyCompatibility.kt` and return the full updated file. ```kotlin package configurations import jetbrains.buildServer.conf...
```kotlin package configurations import jetbrains.buildServer.configs.kotlin.v10.BuildStep import jetbrains.buildServer.configs.kotlin.v10.BuildType import jetbrains.buildServer.configs.kotlin.v10.buildSteps.gradle import jetbrains.buildServer.configs.kotlin.v10.buildSteps.script import model.CIBuildModel class Colon...
null
null
Terminate app after last window closes Apply this change to `Vimari/AppDelegate.swift` and return the full updated file. ```swift import Cocoa @NSApplicationMain class AppDelegate: NSObject, NSApplicationDelegate { func applicationDidFinishLaunching(_ aNotification: Notification) { // Insert code he...
```swift import Cocoa @NSApplicationMain class AppDelegate: NSObject, NSApplicationDelegate { func applicationDidFinishLaunching(_ aNotification: Notification) { // Insert code here to initialize your application } func applicationWillTerminate(_ aNotification: Notification) { // ...
null
null
Use swift lazy vars magic Apply this change to `Pod/Swiftline/Misc/PromptSettings.swift` and return the full updated file. ```swift // // PromptSettings.swift // PromptSettings // // Created by Omar Abdelhafith on 02/11/2015. // Copyright © 2015 Omar Abdelhafith. All rights reserved. // import Foundation class...
```swift // // PromptSettings.swift // PromptSettings // // Created by Omar Abdelhafith on 02/11/2015. // Copyright © 2015 Omar Abdelhafith. All rights reserved. // import Foundation class PromptSettings { static var reader: PromptReader = ConsolePromptReader() static var printer: PromptPrinter = Co...
null
null
Remove Exit variant from PlayerUpdate Apply this change to `shared/src/messages/client.rs` and return the full updated file. ```rust use glam::f32::Vec2; use serde::{Deserialize, Serialize}; use crate::components::*; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub enum PlayerUpdate { Move(PlayerM...
```rust use glam::f32::Vec2; use serde::{Deserialize, Serialize}; use crate::components::*; #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub enum PlayerUpdate { Move(PlayerMoveInputEvent), Shoot(PlayerShootInputEvent), Use(GameEntityId), } #[derive(Clone, Debug, PartialEq, Serialize, Deseri...
null
null
Expand documentation on why 64bit ints are serialized to strings Apply this change to `src/serde_utils.rs` and return the full updated file. ```rust use serde::Serializer; use std::fmt::Display; /// For the times when the `Display` string is more appropriate than the default serialization /// strategy pub fn display...
```rust use serde::Serializer; use std::fmt::Display; /// For the times when the `Display` string is more appropriate than the default serialization /// strategy. This function is useful for 64bit integers, as 64bit integers can't be represented /// wholly in floating point notation, which is how Javascript views all ...
null
null
Add CPU time to submission data Apply this change to `schema.sql` and return the full updated file. ```sql drop table if exists users; create table users ( userid text primary key not null, username text not null, email text not null, passwordhash not null ); drop table if exists submissions; create t...
```sql drop table if exists users; create table users ( userid text primary key not null, username text not null, email text not null, passwordhash not null ); drop table if exists submissions; create table submissions ( submissionid text primary key not null, userid text not null, submissio...
null
null
Rearrange code to be clearer Apply this change to `MultidropBusProtocol/examples/simple/master_node/main.cpp` and return the full updated file. ```cpp /*----------------------------------------*/ // Test sending messages from master. // // In this script, master sends a message (command = 0x01) // with alternating 0s...
```cpp /*----------------------------------------*/ // Test sending messages from master. // // In this script, master sends a message (command = 0x01) // with alternating 0s and 1s for each node on the bus. // /*----------------------------------------*/ #include <stdint.h> #include <util/delay.h> #include "Multidro...
null
null
Fix an unused variable warning Apply this change to `tests/executor.rs` and return the full updated file. ```rust extern crate futures; use std::cell::Cell; use std::sync::Arc; use futures::{Future, Task, Poll}; use futures::executor::{Executor, ExecuteCallback}; thread_local!(static EXECUTOR_HIT: Cell<bool> = Cel...
```rust extern crate futures; use std::cell::Cell; use std::sync::Arc; use futures::{Future, Task, Poll}; use futures::executor::{Executor, ExecuteCallback}; thread_local!(static EXECUTOR_HIT: Cell<bool> = Cell::new(false)); struct MyFuture { executor: Arc<Executor>, } impl Future for MyFuture { type Item ...
null
null
Fix mismatched use of MEF 1 and 2 Apply this change to `src/EditorFeatures/Core.Wpf/Tags/DefaultImageMonikerService.cs` and return the full updated file. ```csharp // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license infor...
```csharp // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System.Collections.Immutable; using Microsoft.CodeAnalysis.Editor.Wpf; using Microsoft.VisualStudio.Imaging; using Microsoft.VisualStudio.Ima...
null
null
Support improved for date fields Apply this change to `lib/comma-heaven/active_record/to_comma_heaven.rb` and return the full updated file. ```ruby module CommaHeaven module ActiveRecord module ClassMethods def self.extended(base) base.class_eval do base.class_inheritable_accessor :comma...
```ruby module CommaHeaven module ActiveRecord module ClassMethods def self.extended(base) base.class_eval do base.class_inheritable_accessor :comma_heaven_columns base.comma_heaven_columns = [] base.class_inheritable_accessor :comma_heaven_associations ...
null
null
Fix testcase for MSVC targets where the output ordering is different. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@266449 91177308-0d34-0410-b5e6-96231b3b80d8 Apply this change to `test/CodeGenCXX/debug-info-limited.cpp` and return the full updated file. ```cpp // RUN: %clang -flimit-debug-info -emit-llvm -g...
```cpp // RUN: %clang -flimit-debug-info -emit-llvm -g -S %s -o - | FileCheck %s // RUN: %clang -flimit-debug-info -emit-llvm -g -S %s -o - | FileCheck --check-prefix=CHECK-C %s // CHECK: !DICompositeType(tag: DW_TAG_class_type, name: "A" // CHECK-NOT: DIFlagFwdDecl // CHECK-SAME: ){{$}} class...
null
null
Remove unused macro_rules feature attribute Apply this change to `src/lib.rs` and return the full updated file. ```rust #![feature(macro_rules)] #![feature(unboxed_closures)] use std::fmt; pub use api::IntoLogger; pub use api::Logger; pub use config::Logger as LoggerConfig; pub use config::Output as LoggerOutput; ...
```rust #![feature(unboxed_closures)] use std::fmt; pub use api::IntoLogger; pub use api::Logger; pub use config::Logger as LoggerConfig; pub use config::Output as LoggerOutput; mod config; mod api; mod loggers; pub enum Level { Debug, Info, Warning, Error, Critical, } impl Copy for Level {} i...
null
null
Change the value to return to stop the loop Apply this change to `src/instruction.php` and return the full updated file. ```php <?php declare(strict_types=1); /** * Return a value based on a condition. */ function condition (bool $test, callable $truthy, callable $falsy = null) { $falsy = $falsy ?? fn () => n...
```php <?php declare(strict_types=1); /** * Return a value based on a condition. */ function condition (bool $test, callable $truthy, callable $falsy = null) { $falsy = $falsy ?? fn () => null; return call_user_func($test ? $truthy : $falsy); } /** * Loop over an iterable and yield new values. */ functio...
null
null
Fix output with trailing newlines from sh. Closes #39 Apply this change to `piper/process.py` and return the full updated file. ```python import logbook import sh from piper.logging import SEPARATOR class Process: """ Helper class for running processes """ def __init__(self, config, cmd, parent_...
```python import logbook import sh from piper.logging import SEPARATOR class Process: """ Helper class for running processes """ def __init__(self, config, cmd, parent_key): self.config = config self.cmd = cmd self.sh = None self.success = None self.log = lo...
null
null
Create profile if user is created Apply this change to `accounts/models.py` and return the full updated file. ```python from django.db import models from django.contrib.auth.models import User class Profile(models.Model): user = models.OneToOneField(User) def __str__(self): return self.user.get_ful...
```python from django.db import models from django.db.models.signals import post_save from django.contrib.auth.models import User class Profile(models.Model): user = models.OneToOneField(User) def __str__(self): return self.user.get_full_name() or self.user.username def create_user_profile(sender, ...
null
null
Test also line feeds in field names Apply this change to `common/csv_test.go` and return the full updated file. ```go package common import ( "testing" "github.com/stretchr/testify/assert" ) func Test_CSVDump(t *testing.T) { type io struct { Fields []string Rows [][]string Output string } tests := []...
```go package common import ( "testing" "github.com/stretchr/testify/assert" ) func Test_CSVDump(t *testing.T) { type io struct { Fields []string Rows [][]string Output string } tests := []io{ io{ Fields: []string{"f1", "f2"}, Rows: [][]string{ []string{"11", "12"}, []string{"21", "22"}...
null
null
Upgrade jvm target to 15 Apply this change to `build.gradle.kts` and return the full updated file. ```kotlin plugins { application kotlin("jvm") version "1.4.32" } description = "An action sequencer to do the boring tasks on the game http://www.riseoflords.com." application { mainClass.set("org.hildan.b...
```kotlin plugins { application kotlin("jvm") version "1.4.32" } description = "An action sequencer to do the boring tasks on the game http://www.riseoflords.com." application { mainClass.set("org.hildan.bots.riseoflords.RolAutomizerKt") } repositories { mavenCentral() } tasks.withType<org.jetbrains...
null
null
Disable function execution for now, to focus on parsing issues Apply this change to `platforms/app_fuzz/fuzzer.c` and return the full updated file. ```c // // Wasm3 - high performance WebAssembly interpreter written in C. // // Copyright © 2019 Steven Massey, Volodymyr Shymanskyy. // All rights reserved. // #incl...
```c // // Wasm3 - high performance WebAssembly interpreter written in C. // // Copyright © 2019 Steven Massey, Volodymyr Shymanskyy. // All rights reserved. // #include <stdint.h> #include <stddef.h> #include "wasm3.h" #define FATAL(...) __builtin_trap() int LLVMFuzzerTestOneInput(const uint8_t *data, size_t si...
null
null
Use let for remove repetition Apply this change to `spec/lib/tumblfetch/cli_spec.rb` and return the full updated file. ```ruby require 'spec_helper' require 'tumblfetch/cli' describe Tumblfetch::CLI, '#version' do it 'should print correct version' do output = capture(:stdout) { subject.version } expect(out...
```ruby require 'spec_helper' require 'tumblfetch/cli' describe Tumblfetch::CLI, '#version' do it 'should print correct version' do output = capture(:stdout) { subject.version } expect(output).to include Tumblfetch::VERSION end end describe Tumblfetch::CLI, '#init' do let(:output) { capture(:stdout) { s...
null
null
Add link for the latest beta of the server ISO. Apply this change to `ubuntu-12.04-extra/build_lib.sh` and return the full updated file. ```bash #!/bin/bash # This file is sourced by build_crowbar.sh when you want to build Crowbar # using Ubuntu 10.10 as the base OS. It includes all Ubuntu 10.10 specific # build ro...
```bash #!/bin/bash # This file is sourced by build_crowbar.sh when you want to build Crowbar # using Ubuntu 10.10 as the base OS. It includes all Ubuntu 10.10 specific # build routines. # OS information for the OS we are building crowbar on to. OS=ubuntu OS_VERSION=12.04 OS_TOKEN="$OS-$OS_VERSION" OS_CODENAME=preci...
null
null
Revert "Add Default to ElementType trait. Required by lindenmayer-system for now" This reverts commit 5a9d030df8018a93389360dc1fa68d08fb681ff7. Apply this change to `src/lib.rs` and return the full updated file. ```rust #![feature(zero_one, box_syntax)] extern crate asexp; pub mod num_expr; pub mod cond; use std:...
```rust #![feature(zero_one, box_syntax)] extern crate asexp; pub mod num_expr; pub mod cond; use std::fmt::Debug; use std::cmp::{PartialEq, PartialOrd}; #[derive(Debug, Eq, PartialEq)] pub enum ExpressionError { /// In case of division by zero. DivByZero, /// In case an invalid variable in references f...
null
null
Fix import error for program page test Apply this change to `src/tests/program_page_test.py` and return the full updated file. ```python from lib.constants.test import create_new_program from lib import base, page class TestProgramPage(base.Test): def create_private_program_test(self): dashboard = page....
```python from lib.constants.test import create_new_program from lib.page import dashboard from lib import base class TestProgramPage(base.Test): def create_private_program_test(self): dashboard_page = dashboard.DashboardPage(self.driver) dashboard_page.navigate_to() lhn_menu = dashboard_p...
null
null
Make docker logs <fetchmail-container> more verbose Collect log informations for docker logs <fetchmail-container> or docker-compose logs. Apply this change to `start.sh` and return the full updated file. ```bash #!/bin/sh run() { chmod 0600 /data/etc/fetchmailrc chown fetchmail:fetchmail /data/etc/ ch...
```bash #!/bin/sh run() { chmod 0600 /data/etc/fetchmailrc chown fetchmail:fetchmail /data/etc/ chown fetchmail:fetchmail /data/etc/fetchmailrc touch /data/log/fetchmail.log chown fetchmail:fetchmail /data/log/fetchmail.log # run cron daemon, which executes the logrotate job crond # co...
null
null
Use getDeclaredField to access Unsafe getField() only gets public fields :( Apply this change to `event/src/main/java/net/md_5/bungee/event/UnsafeUtils.java` and return the full updated file. ```java package net.md_5.bungee.event; import sun.misc.Unsafe; import java.lang.reflect.Field; public class UnsafeUtils { ...
```java package net.md_5.bungee.event; import sun.misc.Unsafe; import java.lang.reflect.Field; public class UnsafeUtils { private UnsafeUtils() {} private static final Unsafe UNSAFE; static { Unsafe unsafe; try { Class c = Class.forName("sun.misc.Unsafe"); Field f...
null
null
Patch broken build. To be reviewed by the author. git-svn-id: 88467cb1fb04b8a755be7e1ee1026be4190196ef@3661 3a8e244f-b0f2-452b-bcba-4c88e055c3ca Apply this change to `compiler/symtab/findCollidingNames.cpp` and return the full updated file. ```cpp #include "findCollidingNames.h" #include "symtab.h" #include "strin...
```cpp #include "findCollidingNames.h" #include "symtab.h" #include "stringutil.h" /* Goal: * Find symbols that have names which already exist and munge those. * Strategy: * Keep track of all function symbols, type symbols and variable symbols in vector structures. * Search those structures for colliding names and...
null
null
Change default route to /tables Apply this change to `client/app/app-routing.module.ts` and return the full updated file. ```typescript import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { NotFoundComponent } from './not-found.component'; const routes: Routes = ...
```typescript import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { NotFoundComponent } from './not-found.component'; const routes: Routes = [ { path: '', redirectTo: '/tables', pathMatch: 'full' }, { path: '**', component: NotFoundComponent } ]; @NgModule...
null
null
Insert into keys array when element isn't present Apply this change to `app/shared/utility.service.ts` and return the full updated file. ```typescript import { Injectable } from '@angular/core'; @Injectable() export class UtilityService{ constructor(){} groupBy(collection: any[], prop: string){ let p...
```typescript import { Injectable } from '@angular/core'; @Injectable() export class UtilityService{ constructor(){} groupBy(collection: any[], prop: string){ let propertiesUniqueArray: any[] = []; collection.forEach((item)=> { let val = item[prop]; if(propertiesUniqueAr...
null
null
Remove unneeded property overrides for the values that are passed to constructor of base type Apply this change to `ktor-core/src/org/jetbrains/ktor/request/Multipart.kt` and return the full updated file. ```kotlin package org.jetbrains.ktor.request import org.jetbrains.ktor.http.* import org.jetbrains.ktor.util.* i...
```kotlin package org.jetbrains.ktor.request import org.jetbrains.ktor.http.* import org.jetbrains.ktor.util.* import java.io.* sealed class PartData(val dispose: () -> Unit, val partHeaders: ValuesMap) { class FormItem(val value: String, dispose: () -> Unit, partHeaders: ValuesMap) : PartData(dispose, partHeader...
null
null
Store every single request for debug and security purposes Apply this change to `engine/rpc.php` and return the full updated file. ```php <?php require_once('vendor/autoload.php'); if (!PRODUCTION) { error_reporting(E_ALL); ini_set('display_errors','On'); } function phoxy_conf() { $ret = phoxy_default_conf();...
```php <?php require_once('vendor/autoload.php'); if (!PRODUCTION) { error_reporting(E_ALL); ini_set('display_errors','On'); } function phoxy_conf() { $ret = phoxy_default_conf(); $ret["api_xss_prevent"] = PRODUCTION; return $ret; } function default_addons() { $ret = [ "cache" => PRODUCTION ? ['gl...
null
null
Initialize Parser with aliases at startup Apply this change to `src/main/java/jfdi/logic/ControlCenter.java` and return the full updated file. ```java package jfdi.logic; import jfdi.logic.commands.InvalidCommand; import jfdi.logic.interfaces.Command; import jfdi.logic.interfaces.ILogic; import jfdi.parser.InputPars...
```java package jfdi.logic; import jfdi.logic.commands.InvalidCommand; import jfdi.logic.interfaces.Command; import jfdi.logic.interfaces.ILogic; import jfdi.parser.InputParser; import jfdi.parser.exceptions.InvalidInputException; import jfdi.storage.apis.AliasDb; import jfdi.storage.apis.MainStorage; import jfdi.stor...
null
null
Add fileName and lineNumber properties to Error Apply this change to `src/modules/fs/methods/access.c` and return the full updated file. ```c #include "mininode.h" #include <unistd.h> #include <fcntl.h> duk_ret_t mn_bi_fs_access(duk_context *ctx) { const int nargs = duk_get_top(ctx); const char *path = NULL; uv_f...
```c #include "mininode.h" #include <unistd.h> #include <fcntl.h> duk_ret_t mn_bi_fs_access(duk_context *ctx) { const int nargs = duk_get_top(ctx); const char *path = NULL; uv_fs_t *req = NULL; int mode = 0; if (nargs == 3) { mode = duk_require_int(ctx, -2); path = duk_require_string(ctx, -3); } else if (na...
null
null
Add FA icons for previous/next/first/last page nav buttons. Apply this change to `src/dash-table/components/Table/style.ts` and return the full updated file. ```typescript import { library } from '@fortawesome/fontawesome-svg-core'; import { faEyeSlash, faTrashAlt } from '@fortawesome/free-regular-svg-icons'; import ...
```typescript import { library } from '@fortawesome/fontawesome-svg-core'; import { faEyeSlash, faTrashAlt } from '@fortawesome/free-regular-svg-icons'; import { faEraser, faPencilAlt, faSort, faSortDown, faSortUp } from '@fortawesome/free-solid-svg-icons'; import { faAngleLeft, faAngleRight, faAngleDoubleLeft, faAngle...
null
null
Move cassert include to OS X specific code Apply this change to `source/glbinding/source/GetProcAddress.cpp` and return the full updated file. ```cpp #include <glbinding/GetProcAddress.h> #include <cassert> #ifdef WIN32 #include <string> #include <windows.h> #elif __APPLE__ #include <string> #include...
```cpp #include <glbinding/GetProcAddress.h> #ifdef WIN32 #include <string> #include <windows.h> #elif __APPLE__ #include <cassert> #include <string> #include <dlfcn.h> #else #include <GL/glx.h> #endif namespace gl { ProcAddress GetProcAddress(const char * name) { #ifdef WIN32 typedef vo...
null
null
Use func for building entity to throw errors Apply this change to `Sources/BodyParametersType/BodyParametersType.swift` and return the full updated file. ```swift import Foundation public enum RequestBodyEntity { case Data(NSData) case InputStream(NSInputStream) } public protocol BodyParametersType { va...
```swift import Foundation public enum RequestBodyEntity { case Data(NSData) case InputStream(NSInputStream) } public protocol BodyParametersType { var contentType: String { get } func buildEntity() throws -> RequestBodyEntity } ```
null
null
Fix rustdoc const generics test Apply this change to `src/test/rustdoc/const-generics/const-impl.rs` and return the full updated file. ```rust // ignore-tidy-linelength #![feature(const_generics)] #![crate_name = "foo"] pub enum Order { Sorted, Unsorted, } // @has foo/struct.VSet.html '//pre[@class="rust ...
```rust // ignore-tidy-linelength #![feature(const_generics)] #![crate_name = "foo"] #[derive(PartialEq, Eq)] pub enum Order { Sorted, Unsorted, } // @has foo/struct.VSet.html '//pre[@class="rust struct"]' 'pub struct VSet<T, const ORDER: Order>' // @has foo/struct.VSet.html '//h3[@id="impl-Send"]/code' 'im...
null
null
Use script name from archive instead of hard coded one Apply this change to `get_and_build.sh` and return the full updated file. ```bash #!/bin/bash # Build! # The default command for `docker run jftr/fairphone2-build-env` is to build as # specified in thread # https://forum.fairphone.com/t/compiling-fairphone-open-...
```bash #!/bin/bash # Build! # The default command for `docker run jftr/fairphone2-build-env` is to build as # specified in thread # https://forum.fairphone.com/t/compiling-fairphone-open-source/11600 # which is based on instructions from # http://code.fairphone.com/projects/fp-osos/dev/fairphone-os-build-instructions...
null
null
TASK: Fix the intendation of the new settings object Apply this change to `src/index.js` and return the full updated file. ```javascript module.exports = { parser: 'babel-eslint', extends: [ 'xo', 'xo-react', 'plugin:jsx-a11y/recommended', 'plugin:promise/recommended', 'plugin:react/recommended' ], plug...
```javascript module.exports = { parser: 'babel-eslint', extends: [ 'xo', 'xo-react', 'plugin:jsx-a11y/recommended', 'plugin:promise/recommended', 'plugin:react/recommended' ], plugins: [ 'compat', 'promise', 'babel', 'react', 'jsx-a11y' ], env: { node: true, browser: true, jest: true }...
null
null
Add restrictions when creating the movie collection Apply this change to `MoviesSystem/WpfMovieSystem/Views/InsertWindowView.xaml.cs` and return the full updated file. ```csharp using MoviesSystem.Models; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tas...
```csharp using MoviesSystem.Models; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; namespace WpfMovieSystem.Views { /// <summary> /// Interaction logic for InsertWindowView.xaml /// </summary> public partial cl...
null
null
Fix build error on `make spm_test` Apply this change to `Source/sourcekitten/main.swift` and return the full updated file. ```swift // // main.swift // SourceKitten // // Created by JP Simard on 2015-01-03. // Copyright (c) 2015 SourceKitten. All rights reserved. // import Darwin import Commandant // `sourcekit...
```swift // // main.swift // SourceKitten // // Created by JP Simard on 2015-01-03. // Copyright (c) 2015 SourceKitten. All rights reserved. // import Darwin import Foundation import Commandant // `sourcekitd_set_notification_handler()` set the handler to be executed on main thread queue. // So, we vacate main th...
null
null
Make sure we still reject static data members in anonymous unions in C++11. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@150724 91177308-0d34-0410-b5e6-96231b3b80d8 Apply this change to `test/CXX/class/class.union/p2-0x.cpp` and return the full updated file. ```cpp // RUN: %clang_cc1 -verify -std=c++11 %s ...
```cpp // RUN: %clang_cc1 -verify -std=c++11 %s // Unlike in C++98, C++11 allows unions to have static data members. union U1 { static constexpr int k1 = 0; static const int k2 = k1; static int k3 = k2; // expected-error {{non-const static data member must be initialized out of line}} static constexpr double ...
null
null
Fix similar "can see but can't path" crash on sprinters. Apply this change to `Trunk/GameEngine/Actors/SprinterMonster.cs` and return the full updated file. ```csharp using System; using System.Collections.Generic; using Magecrawl.Utilities; namespace Magecrawl.GameEngine.Actors { internal class SprinterM...
```csharp using System; using System.Collections.Generic; using Magecrawl.Utilities; namespace Magecrawl.GameEngine.Actors { internal class SprinterMonster : Monster { public SprinterMonster(string name, Point p, int maxHP, int vision, DiceRoll damage, double defense, double evade, double ctIn...
null
null
Update App Engine Go from 1.9.17 to 1.9.18 Apply this change to `lib/autoparts/packages/googleappenginego.rb` and return the full updated file. ```ruby module Autoparts module Packages class GoogleAppEngineGo < Package name 'googleappenginego' version '1.9.17' description 'Google App Engine fo...
```ruby module Autoparts module Packages class GoogleAppEngineGo < Package name 'googleappenginego' version '1.9.18' description 'Google App Engine for Go: A CLI for managing Google App Engine cloud services for Go' category Category::DEPLOYMENT source_url 'https://storage.googleapi...
null
null
Fix warning when generating javadoc ; Add class description Apply this change to `src/main/java/com/boundary/sdk/event/ScriptUtils.java` and return the full updated file. ```java package com.boundary.sdk.event; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.net.URL;...
```java package com.boundary.sdk.event; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.net.URL; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * Utilities used for java script execution * * @author davidg * */ public class ScriptUtils { privat...
null
null
Add strong params for email curation queue items Apply this change to `app/controllers/admin/email_curation_queue_items_controller.rb` and return the full updated file. ```ruby class Admin::EmailCurationQueueItemsController < Admin::BaseController before_filter :load_email_curation_queue_item, except: [:index] d...
```ruby class Admin::EmailCurationQueueItemsController < Admin::BaseController before_filter :load_email_curation_queue_item, except: [:index] def index @email_curation_queue_items = EmailCurationQueueItem.order('created_at desc').includes(edition: :document) end def edit end def update if @email...
null
null
Fix wrong UKI token endpoint Apply this change to `sageone_constants.php` and return the full updated file. ```php <?php $client_id = 'YOUR_CLIENT_ID'; $client_secret = 'YOUR_CLIENT_SECRET'; $signing_secret = 'YOUR_SIGNING_SECRET'; $apim_subscription_key = 'YOUR APIM SUBSCRIPTION_KEY'; $callback_url = 'http...
```php <?php $client_id = 'YOUR_CLIENT_ID'; $client_secret = 'YOUR_CLIENT_SECRET'; $signing_secret = 'YOUR_SIGNING_SECRET'; $apim_subscription_key = 'YOUR APIM SUBSCRIPTION_KEY'; $callback_url = 'http://localhost:8080/callback.php'; $scope = 'full_access'; $auth_endpoint = 'http://www.sageone.com/oauth2/a...
null
null
Change direcory in epics installtion script Apply this change to `workstation_setup/6_install_epics.sh` and return the full updated file. ```bash #!/bin/bash # Install Epics base # Check if git is installed command -v git >/dev/null 2>&1 || { echo >&2 "Git not found. Aborting."; exit 1; } # Check ssh key if [ ! -f ...
```bash #!/bin/bash # Install Epics base # Check if git is installed command -v git >/dev/null 2>&1 || { echo >&2 "Git not found. Aborting."; exit 1; } # Check ssh key if [ ! -f $HOME/.ssh/id_rsa.pub ]; then echo 'No ssh key found. Please create one using ssh-keygen and add it to your github account.' exit 1 fi # I...
null
null
Rename 'res' variable to 'test_result' Apply this change to `src/main.cpp` and return the full updated file. ```cpp /// \file main.cpp #include "HelloTriangleApplication.hpp" #include "VDeleter.hpp" // waf-generated header #include "config.hpp" #define DOCTEST_CONFIG_IMPLEMENT #include "doctest.h" #define GLFW...
```cpp /// \file main.cpp #include "HelloTriangleApplication.hpp" #include "VDeleter.hpp" // waf-generated header #include "config.hpp" #define DOCTEST_CONFIG_IMPLEMENT #include "doctest.h" #define GLFW_INCLUDE_VULKAN #include <GLFW/glfw3.h> #include <iostream> #include <string> int main(int argc, char* argv[]...
null
null
Add return to ensure prodution settings command to get exit status of command Apply this change to `Command/Proxy/EnsureProductionSettingsDoctrineCommand.php` and return the full updated file. ```php <?php /* * This file is part of the Doctrine Bundle * * The code was originally distributed inside the Symfony fra...
```php <?php /* * This file is part of the Doctrine Bundle * * The code was originally distributed inside the Symfony framework. * * (c) Fabien Potencier <fabien@symfony.com> * (c) Doctrine Project, Benjamin Eberlei <kontakt@beberlei.de> * * For the full copyright and license information, please view the LICEN...
null
null
Fix new line at the end of file Apply this change to `Lib/Model/SettingBagInterface.php` and return the full updated file. ```php <?php namespace Galileo\SettingBundle\Lib\Model; interface SettingBagInterface { /** * @param string $name * @param string|integer|boolean|null $default * * @retu...
```php <?php namespace Galileo\SettingBundle\Lib\Model; interface SettingBagInterface { /** * @param string $name * @param string|integer|boolean|null $default * * @return string * * @throws ValueCanNotBeAnObjectException When you add as $default object that can not be converted to s...
null
null
Fix issues with Ruby 1.9.3. `#to_h` does exist on `Middleman::Configuration::ConfigurationManager`. `#to_h` is known as `#to_hash` on Hash. Apply this change to `lib/middleman-disqus/extension.rb` and return the full updated file. ```ruby require "middleman-core" module Middleman class DisqusExtension < Extension...
```ruby require "middleman-core" module Middleman class DisqusExtension < Extension option :shortname, nil, "Your short name for Disqus" def initialize(app, options_hash={}, &block) super # place in class variable so helpers can access @@options = options end def self.options(opti...
null
null
Rename variable "line" to "words" Due to the fact that variable name "letters" is used instead of "word" in the Word class, the variable name in the Line class is also changed for consistency. Apply this change to `src/com/nigorojr/typebest/Line.java` and return the full updated file. ```java package com.nigorojr.ty...
```java package com.nigorojr.typebest; import java.util.ArrayList; import javax.swing.JLabel; import javax.swing.JPanel; public class Line extends JPanel { private ArrayList<Word> words = new ArrayList<Word>(); private final JLabel space = new JLabel(" "); /** * Returns the total width of the words...
null
null
Add using for Template class. Apply this change to `ExoWeb.UnitTests.Server/ExoWebTest.cs` and return the full updated file. ```csharp using ExoWeb; using Microsoft.VisualStudio.TestTools.UnitTesting; using System; using System.Collections.Generic; using ExoWeb.Templates; using System.IO; using System.Linq; namespa...
```csharp using System; using System.IO; using System.Linq; using ExoWeb.Templates.MicrosoftAjax; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace ExoWeb.UnitTests.Server { /// <summary> ///This is a test class for ExoWebTest and is intended ///to contain all ExoWebTest Unit Tests ///</summary> [Tes...
null
null
Add Task and UserDefaults to Service Provider Apply this change to `Zero/Sources/Services/ServiceProvider.swift` and return the full updated file. ```swift // // ServiceProvider.swift // Zero // // Created by Jairo Eli de Leon on 5/8/17. // Copyright © 2017 Jairo Eli de León. All rights reserved. // protocol Ser...
```swift // // ServiceProvider.swift // Zero // // Created by Jairo Eli de Leon on 5/8/17. // Copyright © 2017 Jairo Eli de León. All rights reserved. // protocol ServiceProviderType: class { var userDefaultsService: UserDefaultsServiceType { get } var taskService: TaskServiceType { get } } final class Servic...
null
null
Add condition to check for latest commit activity Apply this change to `fuckit_commit.py` and return the full updated file. ```python ''' This module will send SMS reminders periodically, using Twilio. The aim is to encourage user to code, commit and push to GitHub everyday ''' import requests from twilio.rest impor...
```python ''' This module will send SMS reminders periodically, using Twilio. The aim is to encourage user to code, commit and push to GitHub everyday ''' import requests from twilio.rest import TwilioRestClient from datetime import datetime, date def send_sms(): ''' Send SMS reminder ''' config = {'a...
null
null
Use expand_path because require_relative doesn't work :) Apply this change to `metadata.rb` and return the full updated file. ```ruby name 'chef-sugar' maintainer 'Seth Vargo' maintainer_email 'sethvargo@gmail.com' license 'Apache 2.0' description 'Installs chef-sugar. Please see the c...
```ruby name 'chef-sugar' maintainer 'Seth Vargo' maintainer_email 'sethvargo@gmail.com' license 'Apache 2.0' description 'Installs chef-sugar. Please see the chef-sugar ' \ 'Ruby gem for more information.' long_description <<-EOH Chef Sugar is a Gem & Chef Recipe that i...
null
null
Fix empty void when user has no tags for tags' index view Apply this change to `resources/views/tags/index.blade.php` and return the full updated file. ```php @extends('layout') @section('body') <div class="wrapper spacing-top-large spacing-bottom-large"> <div class="box"> <div class="section...
```php @extends('layout') @section('body') <div class="wrapper spacing-top-large spacing-bottom-large"> <div class="box"> <div class="section"> <div class="row"> <div class="column align-middle"> <span class="color-dark">@lang('general...
null
null
[Form] Replace methods in ChoiceView by public properties (PHP +100ms, Twig +400ms) Apply this change to `Resources/views/Form/choice_widget_options.html.php` and return the full updated file. ```php <?php foreach ($options as $index => $choice): ?> <?php if ($view['form']->isChoiceGroup($choice)): ?> <op...
```php <?php foreach ($options as $index => $choice): ?> <?php if ($view['form']->isChoiceGroup($choice)): ?> <optgroup label="<?php echo $view->escape($view['translator']->trans($index, array(), $translation_domain)) ?>"> <?php foreach ($choice as $nested_choice): ?> <option val...
null
null
Add feature vector size calculation method to mapper interface Apply this change to `nel/features/mapping.py` and return the full updated file. ```python import math import numpy class FeatureMapper(object): def __init__(self, features): self.features = features def map(self, fv): raise ...
```python import math import numpy class FeatureMapper(object): def __init__(self, features): self.features = features def map(self, fv): raise NotImplementedError def __call__(self, doc): for chain in doc.chains: for c in chain.candidates: c.fv = s...
null
null
Use port 465 for SES SMTP transport Fixes #34064 Apply this change to `src/Symfony/Component/Mailer/Bridge/Amazon/Transport/SesSmtpTransport.php` and return the full updated file. ```php <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyrigh...
```php <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Mailer\Bridge\Amazon\Transport; use Psr\Log\Lo...
null
null
Remove delay test for CI for now Apply this change to `LanguageExt.Tests/DelayTests.cs` and return the full updated file. ```csharp using LanguageExt; using static LanguageExt.Prelude; using System; using System.Reactive.Linq; using System.Threading; using Xunit; namespace LanguageExtTests { public class Delay...
```csharp using LanguageExt; using static LanguageExt.Prelude; using System; using System.Reactive.Linq; using System.Threading; using Xunit; namespace LanguageExtTests { public class DelayTests { #if !CI [Fact] public void DelayTest1() { var span = TimeSpan.FromMilliseco...
null
null