original_prompt
stringlengths
327
2.5k
original_completion
stringlengths
22
2.84k
enhanced_prompt
float64
enhanced_completion
float64
Fix bad code sample style Apply this change to `core/kotlinx-coroutines-core/test/guide/example-basic-05s.kt` and return the full updated file. ```kotlin /* * Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ // This file was automatically generated from corouti...
```kotlin /* * Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ // This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit. package kotlinx.coroutines.experimental.guide.basic05s import kotlinx.coroutines.experimental.* fun main...
null
null
Delete autogenerated kallax.go if generation failed Apply this change to `generator/generator.go` and return the full updated file. ```go package generator import "os" // Generator is in charge of generating files for packages. type Generator struct { filename string } // NewGenerator creates a new generator that...
```go package generator import ( "fmt" "os" ) // Generator is in charge of generating files for packages. type Generator struct { filename string } // NewGenerator creates a new generator that can save on the given filename. func NewGenerator(filename string) *Generator { return &Generator{filename} } // Genera...
null
null
Make room for longer field names Apply this change to `branch.sql` and return the full updated file. ```sql BEGIN; CREATE TABLE emails ( id serial PRIMARY KEY , address text NOT NULL , verified boolean DEFAULT NULL ...
```sql BEGIN; CREATE TABLE emails ( id serial PRIMARY KEY , address text NOT NULL , verified boolean DEFAULT NULL CONSTRAINT verified_ca...
null
null
Fix JAVA_HOME setting for Java9 test coverage Apply this change to `.teamcity/Gradle_Check_TestCoverageForkedJava9Linux/buildTypes/Gradle_Check_TestCoverageForkedJava9Linux_1.kt` and return the full updated file. ```kotlin package Gradle_Check_TestCoverageForkedJava9Linux.buildTypes import jetbrains.buildServer.conf...
```kotlin package Gradle_Check_TestCoverageForkedJava9Linux.buildTypes import jetbrains.buildServer.configs.kotlin.v10.BuildType class Gradle_Check_TestCoverageForkedJava9Linux_1(bucket: String) : BuildType({ template(Gradle_Check.buildTypes.Gradle_Check_TestCoverageForkedLinux) uuid = "Gradle_Check_TestCover...
null
null
Revert "Add `deferOnMainQueue` blocks method" This reverts commit f76920f68e04bf5e233f9f37e788586b1671d349. Apply this change to `ledger-wallet-ios/Helpers/Utils/Blocks.swift` and return the full updated file. ```swift // // Blocks.swift // ledger-wallet-ios // // Created by Nicolas Bigot on 22/01/2015. // Copyr...
```swift // // Blocks.swift // ledger-wallet-ios // // Created by Nicolas Bigot on 22/01/2015. // Copyright (c) 2015 Ledger. All rights reserved. // import Foundation func delayOnMainQueue(delay: Double, closure: () -> ()) { dispatch_after(dispatch_time(DISPATCH_TIME_NOW, Int64(delay * Double(NSEC_PER_SEC))),...
null
null
Add 'build' task to build PHAR Apply this change to `bob_config.php` and return the full updated file. ```php <?php namespace Bob\BuildConfig; task("default", array("test")); desc('Sets up development dependencies'); task('dev', array('deps', 'composer.json')); task('deps', function() { if (!is_file('composer...
```php <?php namespace Bob\BuildConfig; task("default", array("build")); desc('Sets up development dependencies'); task('dev', array('deps', 'composer.json')); task('deps', function() { if (!is_file('composer.phar')) { $src = fopen('http://getcomposer.org/composer.phar', 'rb'); $dest = fopen('co...
null
null
Fix invalid value detection for capKey data not working Apply this change to `enderio-base/src/main/java/crazypants/enderio/base/config/recipes/xml/Data.java` and return the full updated file. ```java package crazypants.enderio.base.config.recipes.xml; import javax.xml.stream.XMLStreamException; import javax.xml.str...
```java package crazypants.enderio.base.config.recipes.xml; import javax.xml.stream.XMLStreamException; import javax.xml.stream.events.StartElement; import crazypants.enderio.base.config.recipes.InvalidRecipeConfigException; import crazypants.enderio.base.config.recipes.RecipeConfigElement; import crazypants.enderio....
null
null
Fix bug that user can not be specified Apply this change to `lib/middleman-deploy/methods/rsync.rb` and return the full updated file. ```ruby module Middleman module Deploy module Methods class Rsync < Base attr_reader :clean, :flags, :host, :path, :port, :user def initialize(server_insta...
```ruby module Middleman module Deploy module Methods class Rsync < Base attr_reader :clean, :flags, :host, :path, :port, :user def initialize(server_instance, options = {}) super(server_instance, options) @clean = self.options.clean @flags = self.options.fl...
null
null
Rename edit interaction to addRemoveVideos to be more clear about its purpose Apply this change to `models/src/main/java/com/vimeo/networking2/FolderInteractions.kt` and return the full updated file. ```kotlin package com.vimeo.networking2 import com.squareup.moshi.Json import com.squareup.moshi.JsonClass /** * Th...
```kotlin package com.vimeo.networking2 import com.squareup.moshi.Json import com.squareup.moshi.JsonClass /** * The interactions for a folder. * * @param addRemoveVideos The interaction used to determine if the user can add to or remove videos from the folder. * @param addSubfolder The interaction used to add a ...
null
null
Fix -march= name for x86-64. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@89445 91177308-0d34-0410-b5e6-96231b3b80d8 Apply this change to `test/FrontendC/cstring-align.c` and return the full updated file. ```c // RUN: %llvmgcc %s -c -Os -m32 -emit-llvm -o - | llc -march=x86 -mtriple=i386-apple-darwin10 | Fil...
```c // RUN: %llvmgcc %s -c -Os -m32 -emit-llvm -o - | llc -march=x86 -mtriple=i386-apple-darwin10 | FileCheck %s -check-prefix=DARWIN32 // RUN: %llvmgcc %s -c -Os -m64 -emit-llvm -o - | llc -march=x86-64 -mtriple=x86_64-apple-darwin10 | FileCheck %s -check-prefix=DARWIN64 extern void func(const char *, const char *);...
null
null
Use var instead of make Apply this change to `generator_tcsh.go` and return the full updated file. ```go package acgen import ( "io" "strings" "text/template" ) func init() { RegisterGenerator("tcsh", generateTcshCompletion) } type tcsh struct { Name string Opt string } func newTcsh(c *Command) (t *tcsh, e...
```go package acgen import ( "io" "strings" "text/template" ) func init() { RegisterGenerator("tcsh", generateTcshCompletion) } type tcsh struct { Name string Opt string } func newTcsh(c *Command) (t *tcsh, err error) { var opts []string for _, flag := range c.Flags { for _, opt := range flag.Long { o...
null
null
Make the read command target to only a single resource Apply this change to `schema/command_type.go` and return the full updated file. ```go package schema // CommandType is an enum of the type that can be represented by a schema. type CommandType int //go:generate stringer -type=CommandType :: manual const ( Comm...
```go package schema // CommandType is an enum of the type that can be represented by a schema. type CommandType int //go:generate stringer -type=CommandType :: manual const ( CommandInvalid CommandType = iota CommandList CommandCreate CommandRead CommandUpdate CommandDelete CommandManipulateMulti CommandMani...
null
null
Clean tmp folder after unzipping KoreBuild Apply this change to `build.sh` and return the full updated file. ```bash #!/usr/bin/env bash repoFolder="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" cd $repoFolder koreBuildZip="https://github.com/aspnet/KoreBuild/archive/dev.zip" if [ ! -z $KOREBUILD_ZIP ]; then ...
```bash #!/usr/bin/env bash repoFolder="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" cd $repoFolder koreBuildZip="https://github.com/aspnet/KoreBuild/archive/dev.zip" if [ ! -z $KOREBUILD_ZIP ]; then koreBuildZip=$KOREBUILD_ZIP fi buildFolder=".build" buildFile="$buildFolder/KoreBuild.sh" if test ! -d $bui...
null
null
Remove project id in URL Apply this change to `routes/index.js` and return the full updated file. ```javascript var router = module.exports = new (require('koa-router'))(); function *renderIndex(next) { this.locals.me = yield this.api.users('me').get(); this.locals.projects = yield this.api.projects.get(); if...
```javascript var router = module.exports = new (require('koa-router'))(); var middlewares = require('../middlewares'); router.get('/', middlewares.me(), middlewares.currentProject({ fetch: true }), function *() { yield this.render('index'); }); router.get('/launchpad', function *() { this.locals.projects = yield...
null
null
Use translation.override as a context manager instead of a decorator. Apply this change to `tests/integration/templatetags/test_currency_filters.py` and return the full updated file. ```python # -*- coding: utf-8 -*- from decimal import Decimal as D from django.utils import translation from django.test import TestCa...
```python # -*- coding: utf-8 -*- from decimal import Decimal as D from django.utils import translation from django.test import TestCase from django import template def render(template_string, ctx): tpl = template.Template(template_string) return tpl.render(template.Context(ctx)) class TestCurrencyFilter(T...
null
null
Use built in instead of Finder method Apply this change to `format.sh` and return the full updated file. ```bash source bash-toolbox/init.sh include base.comparator.BaseComparator include finder.Finder include formatter.Formatter include help.message.HelpMessage include logger.Logger include string.util.StringU...
```bash source bash-toolbox/init.sh include base.comparator.BaseComparator include formatter.Formatter include help.message.HelpMessage include logger.Logger include string.util.StringUtil include string.validator.StringValidator main(){ Logger logProgressMsg "validating_formatting_rules" files=($(find * -type...
null
null
refactor(configurationproject): Implement tests for the EventAggregatorExtensions class. Apply this change to `test/Zuehlke.Eacm.Web.Backend.Tests/CQRS/EventAggregatorExtensionsFixture.cs` and return the full updated file. ```csharp using System; using Xunit; using Zuehlke.Eacm.Web.Backend.CQRS; namespace Zuehlk...
```csharp using System; using Xunit; using Zuehlke.Eacm.Web.Backend.CQRS; using Zuehlke.Eacm.Web.Backend.Utils.PubSubEvents; namespace Zuehlke.Eacm.Web.Backend.Tests.DomainModel { public class EventAggregatorExtensionsFixture { [Fact] public void PublishEvent_EventAggregatorIsNull_Thr...
null
null
Add an explanation for graphics_*_draw prototype Apply this change to `src/graphics_tb.h` and return the full updated file. ```c #ifndef __GRAPHICS_TB_H__ #define __GRAPHICS_TB_H__ #include <termbox.h> #include "models.h" #include "graphics.h" typedef struct {} graphics_tb_t; // graphics_tb initialize the graph...
```c #ifndef __GRAPHICS_TB_H__ #define __GRAPHICS_TB_H__ #include <termbox.h> #include "models.h" #include "graphics.h" typedef struct {} graphics_tb_t; // graphics_tb initializes the graphic module. graphics_tb_t *graphics_tb_init(); // graphics_tb_draw draws the given state on the screen. // // We do not use `...
null
null
DbgILGen: Use element type name for variable names Apply this change to `MonoMod/DebugIL/DebugILGeneratorExt.cs` and return the full updated file. ```csharp using Mono.Cecil; using Mono.Cecil.Cil; using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using Syst...
```csharp using Mono.Cecil; using Mono.Cecil.Cil; using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Text; using System.Text.RegularExpressions; namespace MonoMod.DebugIL { public static class DebugILGeneratorExt { public readonly st...
null
null
Use query profile when querying for results documents Apply this change to `src/main/java/com/hp/autonomy/frontend/find/search/DocumentsServiceImpl.java` and return the full updated file. ```java /* * Copyright 2014-2015 Hewlett-Packard Development Company, L.P. * Licensed under the MIT License (the "License"); you...
```java /* * Copyright 2014-2015 Hewlett-Packard Development Company, L.P. * Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. */ package com.hp.autonomy.frontend.find.search; import com.hp.autonomy.frontend.find.ApiKeyService; import com.hp.autonomy.f...
null
null
Make `build_grammar` private in file converter Apply this change to `lib/calyx/file_converter.rb` and return the full updated file. ```ruby require 'yaml' require 'json' module Calyx class Grammar class << self def load(filename) file = File.read(filename) extension = File.extname(filenam...
```ruby require 'yaml' require 'json' module Calyx class Grammar class << self def load(filename) file = File.read(filename) extension = File.extname(filename) if extension == ".yml" load_yml(file) elsif extension == ".json" load_json(file) else ...
null
null
[product-except-self][vs] Fix double to unsigned error Apply this change to `algorithms/contiguous-data/product-except-self/main_perfs.cpp` and return the full updated file. ```cpp #include <numeric> #include <vector> #include SPECIFIC_HEADER int main(int /*argc*/, char** /*argv*/) { constexpr unsigned num_entrie...
```cpp #include <numeric> #include <vector> #include SPECIFIC_HEADER int main(int /*argc*/, char** /*argv*/) { constexpr unsigned num_entries = 10000000; std::vector<int> in(num_entries); std::iota(std::begin(in), std::end(in), 0); auto out = product_except(in); bool success = out[1] == 0; return !succ...
null
null
Use real network interface for gRPC acceptance testing Apply this change to `pkg/app/acceptance_test.go` and return the full updated file. ```go // +build acceptance package app_test import ( stdnet "net" "time" "github.com/DATA-DOG/godog" "github.com/deshboard/boilerplate-grpc-service/test" "github.com/goph/...
```go // +build acceptance package app_test import ( "net" "github.com/DATA-DOG/godog" "github.com/deshboard/boilerplate-grpc-service/test" "google.golang.org/grpc" ) func init() { test.RegisterFeaturePath("../features") test.RegisterFeatureContext(FeatureContext) } func FeatureContext(s *godog.Suite) { lis...
null
null
Set UserAgent on HTTP Client. Apply this change to `FluentMetacritic/Net/HttpClientWrapper.cs` and return the full updated file. ```csharp using System.Net.Http; using System.Threading.Tasks; namespace FluentMetacritic.Net { public class HttpClientWrapper : IHttpClient { private static readonly Http...
```csharp using System.Net.Http; using System.Threading.Tasks; namespace FluentMetacritic.Net { public class HttpClientWrapper : IHttpClient { private static readonly HttpClient Client; static HttpClientWrapper() { Client = new HttpClient(); Client.DefaultReque...
null
null
Add `figure` to default screenshot selector To prevent including any server-rendered html output in the screenshot Apply this change to `app/render_png.js` and return the full updated file. ```javascript var http = require('http'); var url = require('url'); var renderPng = function (req, res) { var options = url....
```javascript var http = require('http'); var url = require('url'); var renderPng = function (req, res) { var options = url.parse(renderPng.getScreenshotPath(req.url)); http.get(options, function (screenshot) { res.status(screenshot.statusCode); for (var i in screenshot.headers) { res.setHeader(i, sc...
null
null
Fix pre/post plugins for generateSVGOConfig helper not being overwritten properly Apply this change to `lib/helpers/generate-svgo-config.js` and return the full updated file. ```javascript const svgo = require('svgo'); const { omit, concat, uniqBy } = require('lodash'); const { merge } = require('webpack-merge'); mo...
```javascript const svgo = require('svgo'); const { omit, concat, uniqBy } = require('lodash'); const { merge } = require('webpack-merge'); module.exports = (options, pre = [], post = []) => { try { // The preset-default plugin is only available since SVGO 2.4.0 svgo.optimize('', { plug...
null
null
Change argument type of OscChar to char Apply this change to `src/types.rs` and return the full updated file. ```rust use errors; // see OSC Type Tag String: http://opensoundcontrol.org/spec-1_0 // padding: zero bytes (n*4) #[derive(Debug)] pub enum OscType { Int(i32), Float(f32), String(String), Bl...
```rust use errors; // see OSC Type Tag String: http://opensoundcontrol.org/spec-1_0 // padding: zero bytes (n*4) #[derive(Debug)] pub enum OscType { Int(i32), Float(f32), String(String), Blob(Vec<u8>), Time(u32, u32), // nonstandard argument types // ignore them if not implemented Lon...
null
null
Use less verbose syntax for error annotations Co-authored-by: Esteban Kuber <5e12ad489afad14290b7861a616342b241775a66@users.noreply.github.com> Apply this change to `src/test/ui/const-generics/parser-error-recovery/issue-89013.rs` and return the full updated file. ```rust trait Foo<const N: usize> { fn do_x(&sel...
```rust trait Foo<const N: usize> { fn do_x(&self) -> [u8; N]; } struct Bar; const T: usize = 42; impl Foo<N = const 3> for Bar { //~^ ERROR expected lifetime, type, or constant, found keyword `const` //~| ERROR cannot constrain an associated constant to a value //~| ERROR this trait takes 1 generic argument but...
null
null
i18n: Annotate console title generator class with `@TabTitle` GitOrigin-RevId: 72d7faa81f967500916bfe0a8854482ae61009e7 Apply this change to `platform/execution-impl/src/com/intellij/execution/runners/ConsoleTitleGen.kt` and return the full updated file. ```kotlin // Copyright 2000-2020 JetBrains s.r.o. Use of this ...
```kotlin // Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.execution.runners import com.intellij.execution.ExecutionHelper import com.intellij.openapi.project.Project import com.intellij.openapi.util.NlsCon...
null
null
Fix package name to dmpy Apply this change to `setup.py` and return the full updated file. ```python #!/usr/bin/env python from setuptools import setup setup( name='Pydm', version='0.1.1', description='Python Distributed Make', author='Kiran Garimella', author_email='kiran.garimella@gmail.com', ...
```python #!/usr/bin/env python from setuptools import setup setup( name='dmpy', version='0.1.1', description='Python Distributed Make', author='Kiran Garimella', author_email='kiran.garimella@gmail.com', packages=['dmpy'], ) ```
null
null
Initialize AppConfigCommand with an IAppHarborClient Apply this change to `src/AppHarbor/Commands/AddConfigCommand.cs` and return the full updated file. ```csharp using System; namespace AppHarbor.Commands { public class AddConfigCommand : ICommand { private readonly IApplicationConfiguration _applicationConfig...
```csharp using System; namespace AppHarbor.Commands { public class AddConfigCommand : ICommand { private readonly IApplicationConfiguration _applicationConfiguration; private readonly IAppHarborClient _appharborClient; public AddConfigCommand(IApplicationConfiguration applicationConfiguration, IAppHarborCli...
null
null
select_menu: Remove extraneous "?" when no queries. Previously, when the last query parameter was removed, the URL was set to "http://example.org/foo?" with a trailing "?" symbol. This is visually displeasing. Make it so that the URL becomes a cleaner "http://example.org/foo" instead. Also remove unneeded blank line...
```go // +build js package select_menu import ( "fmt" "net/url" "github.com/gopherjs/gopherjs/js" "github.com/shurcooL/go/gopherjs_http/jsutil" "honnef.co/go/js/dom" ) func init() { js.Global.Set("SelectMenuOnInput", jsutil.Wrap(SelectMenuOnInput)) } func SelectMenuOnInput(event dom.Event, selElem dom.HTMLEl...
null
null
Fix the yield infinite loop error Because Blade uses the footer variable to store the template information, has to be initialized as an empty array. Apply this change to `src/Bkwld/LaravelHaml/HamlBladeCompiler.php` and return the full updated file. ```php <?php namespace Bkwld\LaravelHaml; // Dependencies use Illu...
```php <?php namespace Bkwld\LaravelHaml; // Dependencies use Illuminate\View\Compilers\BladeCompiler; use Illuminate\View\Compilers\CompilerInterface; use Illuminate\Filesystem\Filesystem; use MtHaml\Environment; class HamlBladeCompiler extends BladeCompiler implements CompilerInterface { /** * The MtHaml instan...
null
null
Fix "class not found" bug when removing puzzle from composer Apply this change to `src/Plugin/PuzzlePlugin.php` and return the full updated file. ```php <?php /** * @package Puzzle-DI * @copyright Copyright © 2015 Danny Smart */ namespace Lexide\PuzzleDI\Plugin; use Composer\Composer; use Composer\EventDispatche...
```php <?php /** * @package Puzzle-DI * @copyright Copyright © 2015 Danny Smart */ namespace Lexide\PuzzleDI\Plugin; use Composer\Composer; use Composer\EventDispatcher\EventSubscriberInterface; use Composer\IO\IOInterface; use Composer\Plugin\PluginInterface; use Composer\Script\Event; use Composer\Script\ScriptE...
null
null
Stop to writing to STD_OUT in tests Apply this change to `spring-context/src/test/java/org/springframework/core/task/NoOpRunnable.java` and return the full updated file. ```java /* * Copyright 2002-2012 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may n...
```java /* * Copyright 2002-2020 the original author or authors. * * 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 * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless requi...
null
null
Verify options is a hash before pulling out confirm Apply this change to `lib/sweet-alert2-rails/view_helpers.rb` and return the full updated file. ```ruby module SweetAlert2Rails module ViewHelpers def link_to(*args, &block) html_options = args[block_given? ? 1 : 2] || {} if options_has_confirm?(h...
```ruby module SweetAlert2Rails module ViewHelpers def link_to(*args, &block) html_options = args[block_given? ? 1 : 2] || {} if options_has_confirm?(html_options) html_options['data-sweet-alert-confirm'] = html_options.delete(:confirm) || html_options[:data].delete(:confi...
null
null
:white_check_mark: Add tests for actual FM Apply this change to `tests/plugins/front-matter.js` and return the full updated file. ```javascript import test from 'ava'; import {fromString, fromNull, fromStream} from '../helpers/pipe'; import fm from '../../lib/plugins/front-matter'; test('No Compile - null', t => { ...
```javascript import test from 'ava'; import {fromString} from '../helpers/pipe'; import plugin from '../helpers/plugin'; import fm from '../../lib/plugins/front-matter'; test('Extracts Front Matter', t => { const input = `--- foo: bar baz: - qux - where - waldo more: good: stuff: - lives: here ...
null
null
Change nasbench dependency to git+https style. Apply this change to `setup.py` and return the full updated file. ```python import os import sys from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) requires = [ 'h5py', 'numpy', 'ConfigSpace' 'pandas', # missin...
```python import os import sys from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) requires = [ 'h5py', 'numpy', 'ConfigSpace' 'pandas', # missing dependency of nasbench 'git+https://github.com/google-research/nasbench.git@master' ] setup(name='profet...
null
null
Add some tests for utf8 string Apply this change to `src/utf8/mod.rs` and return the full updated file. ```rust #![allow(missing_docs, unused_variables)] mod pascal_str; mod pascal_string; pub use self::pascal_str::{Chars, Bytes, Lines, PascalStr}; pub use self::pascal_string::PascalString; #[cfg(test)] mod tests ...
```rust #![allow(missing_docs, unused_variables)] mod pascal_str; mod pascal_string; pub use self::pascal_str::{Chars, Bytes, Lines, PascalStr}; pub use self::pascal_string::PascalString; #[cfg(test)] mod tests { use super::*; use std::borrow::Cow; use std::ffi::{CStr, CString}; use std::iter::IntoIt...
null
null
Fix rule name in space after comma Apply this change to `lib/rules/space-after-comma.js` and return the full updated file. ```javascript 'use strict'; var gonzales = require('gonzales-pe'), util = require('util'), merge = require('merge'); module.exports = { 'name': 'space-after-colon', 'defaults': { ...
```javascript 'use strict'; var gonzales = require('gonzales-pe'), util = require('util'), merge = require('merge'); module.exports = { 'name': 'space-after-comma', 'defaults': { 'include': true }, 'detect': function (ast, parser) { var result = [], determineResult; ast.traverseByType('o...
null
null
Add terminal-notifier to the list of software to download Apply this change to `homebrew/install.sh` and return the full updated file. ```bash #!/usr/bin/env bash # # Homebrew # # If we're on a Mac, let's install http://brew.sh and setup some of the common # dependencies needed (or at least desired) for us. # if [ "...
```bash #!/usr/bin/env bash # # Homebrew # # If we're on a Mac, let's install http://brew.sh and setup some of the common # dependencies needed (or at least desired) for us. # if [ "$(uname -s)" != "Darwin" ] then return fi # Check if we already have Homebrew installed type -P brew &>/dev/null || ruby -e "$(curl ...
null
null
Add more tests to tokenize Apply this change to `rusty.rs` and return the full updated file. ```rust extern mod std; #[test] fn test_tokenize() { assert tokenize( ~"(1 2 3)" ) == ~[~"(", ~"1", ~"2", ~"3", ~")"]; } #[test] fn test_addspaces() { assert addspaces( ~"(1 2 3)" ) == ~" ( 1 2 3 ) " } fn addspaces...
```rust extern mod std; #[test] fn test_tokenize() { assert tokenize( ~"(1 2 3)" ) == ~[~"(", ~"1", ~"2", ~"3", ~")"]; } #[test] fn test_tokenize_empty() { assert tokenize( ~"" ) == ~[]; } #[test] fn test_tokenize_no_spaces() { assert tokenize( ~"one" ) == ~[~"one"]; } #[test] fn test_addspaces() { ...
null
null
Stop using PHP 5.4 short array syntax. Package only requires 5.3.7 Apply this change to `src/lang/en/logviewer.php` and return the full updated file. ```php <?php use Psr\Log\LogLevel; return [ 'delete' => array( 'error' => 'There was an error while deleting the log.', 'success' => 'Log del...
```php <?php use Psr\Log\LogLevel; return array( 'delete' => array( 'error' => 'There was an error while deleting the log.', 'success' => 'Log deleted successfully!', 'text' => 'Delete Current Log', ), 'empty_file' => ':sapi log for :date appears to be empty. Did you manually...
null
null
mdb: Add NOT NULL constraint to file.file_name Apply this change to `files/sql/create-table-file.sql` and return the full updated file. ```sql CREATE TABLE file ( file_id INTEGER PRIMARY KEY AUTOINCREMENT , file_sha1 BINARY(20) , file_name TEXT UNIQUE , file_size INTEGER NOT NULL ...
```sql CREATE TABLE file ( file_id INTEGER PRIMARY KEY AUTOINCREMENT , file_sha1 BINARY(20) , file_name TEXT NOT NULL UNIQUE , file_size INTEGER NOT NULL , file_mime TEXT NOT NULL , file_add_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL ); ```
null
null
Fix test failing after BDL -> `[Test]` change Apply this change to `osu.Game.Tournament.Tests/Screens/TestSceneTeamWinScreen.cs` and return the full updated file. ```csharp // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence te...
```csharp // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System.Linq; using NUnit.Framework; using osu.Framework.Graphics; using osu.Game.Tournament.Screens.TeamWin; namespace osu.Game.Tournament.Tests.Screens ...
null
null
Disable frequently failing test until the rootcause is fixed. Apply this change to `presto-raptor/src/test/java/com/facebook/presto/raptor/integration/TestRaptorDistributedQueries.java` and return the full updated file. ```java /* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use t...
```java /* * 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, software * d...
null
null
Add prototype to read .a files git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@5821 91177308-0d34-0410-b5e6-96231b3b80d8 Apply this change to `include/llvm/Bytecode/Reader.h` and return the full updated file. ```c //===-- llvm/Bytecode/Reader.h - Reader for VM bytecode files ----*- C++ -*--=// // // This funct...
```c //===-- llvm/Bytecode/Reader.h - Reader for VM bytecode files ----*- C++ -*--=// // // This functionality is implemented by the lib/Bytecode/Reader library. // This library is used to read VM bytecode files from an iostream. // // Note that performance of this library is _crucial_ for performance of the // JIT typ...
null
null
Create failing specs for Delivery. Apply this change to `spec/model/delivery_spec.rb` and return the full updated file. ```ruby require 'rspec' require 'date' # TODO Improve the way model requires are working require "#{File.dirname(__FILE__)}/../../model/cargo/cargo" require "#{File.dirname(__FILE__)}/../../model/ca...
```ruby require 'spec_helper' require 'rspec' require 'date' # TODO Improve the way model requires are working require "#{File.dirname(__FILE__)}/../../model/cargo/cargo" require "#{File.dirname(__FILE__)}/../../model/cargo/leg" require "#{File.dirname(__FILE__)}/../../model/cargo/itinerary" require "#{File.dirname(__...
null
null
Fix crashes when no arguments or no input Apply this change to `WifiProfiles/Program.cs` and return the full updated file. ```csharp using NetSh; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace WifiProfiles { class Program { ...
```csharp using NetSh; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace WifiProfiles { class Program { static void Main(string[] args) { var profiles = NetShWrapper.GetWifiProfiles(); bool sawB...
null
null
Change hosting service name in NNDD.app Cask Apply this change to `Casks/nndd.rb` and return the full updated file. ```ruby cask :v1 => 'nndd' do version '2.4.3' sha256 '6a73dcad2e73d877ad1503ed1162cae1a1c84f21d1abaa6aaf9b31bb2fbca531' url 'http://dl.sourceforge.jp/nndd/62201/NNDD_v2_4_3.dmg' name 'NNDD' h...
```ruby cask :v1 => 'nndd' do version '2.4.3' sha256 '6a73dcad2e73d877ad1503ed1162cae1a1c84f21d1abaa6aaf9b31bb2fbca531' url 'http://dl.osdn.jp/nndd/62201/NNDD_v2_4_3.dmg' name 'NNDD' homepage 'http://osdn.jp/projects/nndd/' license :x11 preflight do system_command staged_path.join('Install NNDD.app/...
null
null
Make customer search options optional Apply this change to `options/customers.ts` and return the full updated file. ```typescript export interface CustomerSearchOptions { /** * Text to search for in the shop's customer data. */ query: string; /** * Set the field and direction by which to order results...
```typescript export interface CustomerSearchOptions { /** * Text to search for in the shop's customer data. */ query?: string; /** * Set the field and direction by which to order results. */ order?: string; } ```
null
null
Add other prereqs to windows Apply this change to `win/getprereqs.sh` and return the full updated file. ```bash #!/bin/sh get_it() { lib=$1 url=$2 if [ -e $lib ]; then return fi powershell.exe ../win/webget.ps1 $url $lib.tar.gz tar -xzvf $lib.tar.gz pushd $lib ./configure --prefix=/mingw && make && make ...
```bash #!/bin/sh get_it() { lib=$1 url=$2 if [ -e $lib ]; then return fi powershell.exe ../win/webget.ps1 $url $lib.tar.gz tar -xzvf $lib.tar.gz pushd $lib ./configure --prefix=/mingw && make && make install || exit 1 popd } mkdir -p prereqs && pushd prereqs get_it zlib-1.2.8 http://zlib.net/zlib-1.2.8...
null
null
Add CalDAVClientLibrary to the path as well, so its PROPFIND response parser can be used. git-svn-id: 81e381228600e5752b80483efd2b45b26c451ea2@6793 e27351fd-9f3e-4f54-a53b-843176b1656c Apply this change to `contrib/performance/run.sh` and return the full updated file. ```bash #!/bin/bash ## # Copyright (c) 2010 App...
```bash #!/bin/bash ## # Copyright (c) 2010 Apple Inc. All rights reserved. # # 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 requ...
null
null
Add missing enums for File purpose Apply this change to `src/Stripe.net/Constants/FilePurpose.cs` and return the full updated file. ```csharp namespace Stripe { public static class FilePurpose { public const string AdditionalVerification = "additional_verification"; public const string Busine...
```csharp namespace Stripe { public static class FilePurpose { public const string AccountRequirement = "account_requirement"; public const string AdditionalVerification = "additional_verification"; public const string BusinessIcon = "business_icon"; public const string Busine...
null
null
Update to Spoofax Gradle 0.3.5. Apply this change to `build.gradle.kts` and return the full updated file. ```kotlin plugins { id("org.metaborg.gradle.config.root-project") version "0.3.21" id("org.metaborg.gitonium") version "0.1.2" // Set versions for plugins to use, only applying them in subprojects (apply f...
```kotlin plugins { id("org.metaborg.gradle.config.root-project") version "0.3.21" id("org.metaborg.gitonium") version "0.1.2" // Set versions for plugins to use, only applying them in subprojects (apply false here). id("org.metaborg.spoofax.gradle.langspec") version "0.3.5" apply false id("de.set.ecj") vers...
null
null
Clean up layout and homepage styling. Apply this change to `lib/spree_brewbit_dashboard/engine.rb` and return the full updated file. ```ruby module SpreeBrewbitDashboard class Engine < Rails::Engine require 'spree/core' isolate_namespace Spree engine_name 'spree_brewbit_dashboard' # use rspec for t...
```ruby module SpreeBrewbitDashboard class Engine < Rails::Engine require 'spree/core' isolate_namespace Spree engine_name 'spree_brewbit_dashboard' # use rspec for tests config.generators do |g| g.test_framework :rspec end def self.activate Dir.glob(File.join(File.dirname(__...
null
null
core/app/linker: Fix build failure on windows. Return value was of wrong type Apply this change to `core/app/linker/linker_windows.go` and return the full updated file. ```go // Copyright (C) 2018 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in...
```go // Copyright (C) 2018 Google Inc. // // 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 ag...
null
null
Enable animation for image loading Apply this change to `app/src/main/java/com/neeplayer/ui/common/BindingUtils.kt` and return the full updated file. ```kotlin package com.neeplayer.ui.common import android.databinding.BindingAdapter import android.graphics.drawable.Drawable import android.widget.ImageView import an...
```kotlin package com.neeplayer.ui.common import android.databinding.BindingAdapter import android.graphics.drawable.Drawable import android.widget.ImageView import android.widget.TextView import com.bumptech.glide.Glide import java.util.concurrent.TimeUnit @BindingAdapter("imagePath") fun loadImageFile(view: ImageVi...
null
null
Refactor C++ code to real C++ code Apply this change to `c++/abcdefghppp.cpp` and return the full updated file. ```cpp #include <cstdio> #include <algorithm> using namespace std; #define X(a,b) (x[a]*10+x[b]) int main() { int x[] = { 0, 2, 3, 4, 5, 6, 7, 8, 9 }; do { int ab = X(0, 1), cd = X(2, 3),...
```cpp #include <iostream> #include <vector> #include <algorithm> using namespace std; #define X(a,b) (x[a]*10+x[b]) int mkInt(vector<int> &v) { int ret = 0; for (vector<int>::iterator it = v.begin(); it != v.end(); ++it) { ret = ret * 10 + *it; } return ret; } int main() { int init_x[] ...
null
null
Update email subjects to include job titles Apply this change to `app/mailers/job_mailer.rb` and return the full updated file. ```ruby class JobMailer < ApplicationMailer add_template_helper(JobsHelper) def new_job(job_id) @job = Job.find(job_id).decorate subject = "MENAdevs - #{@job.user.try(:name)} po...
```ruby class JobMailer < ApplicationMailer add_template_helper(JobsHelper) def new_job(job_id) @job = Job.find(job_id).decorate subject = "MENAdevs - #{@job.user.try(:name)} posted a new job '#{@job.title}''" mail to: AppSettings.admin_email, reply_to: @job.user.email, subject: sub...
null
null
Fix sample perf (Option 1) No need to await just return Task Apply this change to `samples/SampleApp/Startup.cs` and return the full updated file. ```csharp // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license infor...
```csharp // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; using Microsoft.AspNet.Builder; using Microsoft.AspNet.Http; namespace SampleApp { public class Startup { publ...
null
null
Update the HeartbeatCollector to send in Metricly checks Apply this change to `src/collectors/heartbeat/heartbeat.py` and return the full updated file. ```python # coding=utf-8 """ Send a value of 1 as a heartbeat every time this collector is invoked. #### Dependencies None #### Usage Add the collector config as :...
```python # coding=utf-8 """ Send a value of 1 as a heartbeat every time this collector is invoked. #### Dependencies None #### Usage Add the collector config as : enabled = True path = netuitive Metrics are collected as : - metrics.heartbeat Netuitive Change History ======================== DVG 2016/11/...
null
null
Remove unused macro use warning Apply this change to `futures/tests/inspect.rs` and return the full updated file. ```rust #![feature(pin, arbitrary_self_types, futures_api)] #[macro_use] extern crate futures; use futures::executor::block_on; use futures::future; use futures::prelude::*; #[test] fn smoke() { le...
```rust #![feature(pin, arbitrary_self_types, futures_api)] use futures::executor::block_on; use futures::future; use futures::prelude::*; #[test] fn smoke() { let mut counter = 0; { let work = future::ready::<i32>(40).inspect(|val| { counter += *val; }); assert_eq!(block_on(work), 40); }...
null
null
Add message of reading path Apply this change to `src/driver/servo_krs/src/servo_krs_node.cpp` and return the full updated file. ```cpp #include<ros/ros.h> #include<servo_msgs/IdBased.h> #include<ics3/ics> ics::ICS3* driver {nullptr}; ros::Publisher pub; void move(const servo_msgs::IdBased::ConstPtr& msg) { servo...
```cpp #include<ros/ros.h> #include<servo_msgs/IdBased.h> #include<ics3/ics> ics::ICS3* driver {nullptr}; ros::Publisher pub; void move(const servo_msgs::IdBased::ConstPtr& msg) { servo_msgs::IdBased result; try { result.angle = driver->move(msg->id, ics::Angle::newDegree(msg->angle)); result.id = msg->id...
null
null
Fix install line syntax error Apply this change to `setupHost.sh` and return the full updated file. ```bash #!/bin/bash set -e sudo apt-get update sudo apt-get -y install linux-image-extra-name -r mount -M /mnt /var/lib/docker sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 36A1D7869245C8950F966E92D...
```bash #!/bin/bash set -e sudo apt-get update sudo apt-get -y install linux-image-extra-name `uname -r` mount -M /mnt /var/lib/docker sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9 sudo sh -c "echo deb http://get.docker.io/ubuntu docker main\ > /etc/apt/sour...
null
null
Add the dispatch header to X_SEMAPHORE Apply this change to `src/xenia/kernel/objects/xsemaphore.h` and return the full updated file. ```c /** ****************************************************************************** * Xenia : Xbox 360 Emulator Research Project * **************...
```c /** ****************************************************************************** * Xenia : Xbox 360 Emulator Research Project * ****************************************************************************** * Copyright 2013 Ben Vanik. All rights reserved. ...
null
null
Add link to the library Apply this change to `bottleopener/shiftrConnector.h` and return the full updated file. ```c #pragma once #include <YunMQTTClient.h> class ShiftrConnector { public : void sendCounter(int counter); void init(); void loop(); //default constructor ShiftrConnector() {};...
```c #pragma once //https://github.com/256dpi/arduino-mqtt #include <YunMQTTClient.h> class ShiftrConnector { public : void sendCounter(int counter); void init(); void loop(); //default constructor ShiftrConnector() {}; private : YunMQTTClient client; void connect(); }; ```
null
null
Use Timer based Observable to generate data Apply this change to `Program.cs` and return the full updated file. ```csharp using System; using System.Collections.Generic; using System.Configuration; using System.Linq; using System.Text; using System.Threading.Tasks; namespace DataGenerator { class Progr...
```csharp using System; using System.Collections.Generic; using System.Configuration; using System.Linq; using System.Reactive.Linq; using System.Text; using System.Threading.Tasks; namespace DataGenerator { class Program { static void Main(string[] args) { var data =...
null
null
Fix interaction with popover when textbox is disabled Apply this change to `osu.Game/Screens/Edit/Setup/LabelledTextBoxWithPopover.cs` and return the full updated file. ```csharp // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full lice...
```csharp // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System; using osu.Framework.Extensions; using osu.Framework.Graphics; using osu.Framework.Graphics.Cursor; using osu.Framework.Graphics.UserInterface; usi...
null
null
Change CRS for area calculation to Zhi's suggestion Apply this change to `db/migrations/1503021056__add_area_to_country.sql` and return the full updated file. ```sql -- Add area to country (in square km). "COALESCE with 0" is for compatibility with "create.test.database", where some countries lack geoms. -- Copyright...
```sql -- Add area to country (in square km). "COALESCE with 0" is for compatibility with "create.test.database", where some countries lack geoms. -- Copyright (c) 2014 University of Oxford -- Add Zhi's recommend area calculation projection (http://epsg.io/54009) INSERT into spatial_ref_sys (srid, auth_name, auth_srid...
null
null
Copy the title through too Apply this change to `app/src/lib/git/revert.ts` and return the full updated file. ```typescript import { git, gitNetworkArguments, IGitExecutionOptions } from './core' import { Repository } from '../../models/repository' import { Commit } from '../../models/commit' import { envForAuthentic...
```typescript import { git, gitNetworkArguments, IGitExecutionOptions } from './core' import { Repository } from '../../models/repository' import { Commit } from '../../models/commit' import { envForAuthentication, IGitAccount } from './authentication' import { IRevertProgress } from '../app-state' import { executionOp...
null
null
Remove `hub` git wrapper initialization code Not using it anyways. Apply this change to `git/aliases.zsh` and return the full updated file. ```bash # Use `hub` as our git wrapper: # http://defunkt.github.com/hub/ hub_path=$(which hub) if (( $+commands[hub] )) then alias git=$hub_path fi # The rest of my fun git...
```bash # The rest of my fun git aliases alias gl='git pull --prune' alias glog="git log --graph --pretty=format:'%Cred%h%Creset %an: %s - %Creset %C(yellow)%d%Creset %Cgreen(%cr)%Creset' --abbrev-commit --date=relative" alias gp='git push origin HEAD' # Remove `+` and `-` from start of diff lines; just rely upon colo...
null
null
[util] Fix FileExists does not take into account "not a directory" error Apply this change to `pkg/util/file.go` and return the full updated file. ```go package util import ( "os" ) // FileExists returns true if path exists func FileExists(path string) (bool, error) { _, err := os.Stat(path) if err != nil { if...
```go package util import ( "os" "strings" ) // FileExists returns true if path exists func FileExists(path string) (bool, error) { _, err := os.Stat(path) if err != nil { if isNotExistError(err) { return false, nil } return false, err } return true, nil } func DirExists(path string) (bool, error) {...
null
null
Send ‘testCandidate’ message to background process when user is in the HTML5 Trial. Apply this change to `includes/trial-applicant.js` and return the full updated file. ```javascript // ==UserScript== // @include http://youtube.com/html5 // @include http://www.youtube.com/html5 // @include https://youtube.com/html5 /...
```javascript // ==UserScript== // @include http://youtube.com/html5 // @include http://www.youtube.com/html5 // @include https://youtube.com/html5 // @include https://www.youtube.com/html5 // ==/UserScript== (function() { window.addEventListener('DOMContentLoaded', function() { submitFormWithSessionToken(); ...
null
null
Replace all occurances of $graph->getNumberOfEdges() replaced with count($graph->getEdges()) Apply this change to `tests/CompleteGraphTest.php` and return the full updated file. ```php <?php use Fhaculty\Graph\Algorithm\Complete; use Fhaculty\Graph\Algorithm\Directed; use Fhaculty\Graph\Graph; use Fhaculty\Graph\...
```php <?php use Fhaculty\Graph\Algorithm\Complete; use Fhaculty\Graph\Algorithm\Directed; use Fhaculty\Graph\Graph; use Fhaculty\Graph\Loader\CompleteGraph; class CompleteGraphTest extends TestCase { public function testOne() { $loader = new CompleteGraph(1); $graph = $loader->createGraph(...
null
null
Add UserName to LogEntries When Authenticated Apply this change to `Portal.CMS.Web/Global.asax.cs` and return the full updated file. ```csharp using LogBook.Services; using LogBook.Services.Models; using Portal.CMS.Web.Architecture.ViewEngines; using System.Web.Mvc; using System.Web.Optimization; using System.Web.Ra...
```csharp using LogBook.Services; using LogBook.Services.Models; using Portal.CMS.Web.Architecture.Helpers; using Portal.CMS.Web.Architecture.ViewEngines; using System.Web.Mvc; using System.Web.Optimization; using System.Web.Razor; using System.Web.Routing; using System.Web.WebPages; namespace Portal.CMS.Web { pu...
null
null
Increase varchar size of the link in the db Apply this change to `database.sql` and return the full updated file. ```sql CREATE DATABASE `newsbot` /*!40100 DEFAULT CHARACTER SET utf8 */; CREATE TABLE GROUP_TELEGRAM ( `group_id` bigint(20) NOT NULL, `registered` varchar(1) DEFAULT NULL, PRIMARY KEY (`group...
```sql CREATE DATABASE `newsbot` /*!40100 DEFAULT CHARACTER SET utf8 */; CREATE TABLE GROUP_TELEGRAM ( `group_id` bigint(20) NOT NULL, `registered` varchar(1) DEFAULT NULL, PRIMARY KEY (`group_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE NEWS ( `id` bigint(20) unsigned NOT NULL AUTO_INCREM...
null
null
Add feature gate for raw. Apply this change to `src/lib.rs` and return the full updated file. ```rust // Copyright 2014 Michael Yang. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. #![feature(concat_idents)] #![feature(libc)] //! BLAS bind...
```rust // Copyright 2014 Michael Yang. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. #![feature(concat_idents)] #![feature(raw)] #![feature(libc)] //! BLAS bindings and wrappers. //! //! Bindings are split by BLAS level and contained in a ...
null
null
Update for the old_io stopgap Apply this change to `src/main.rs` and return the full updated file. ```rust mod board; #[cfg(not(test))] fn main() { let mut brd = board::Board::new(65, 248).random(); let mut timer = std::io::Timer::new().unwrap(); let ref mut worker_pool = board::WorkerPool::new_with_default_si...
```rust mod board; #[cfg(not(test))] fn main() { let mut brd = board::Board::new(65, 248).random(); let mut timer = std::old_io::Timer::new().unwrap(); let ref mut worker_pool = board::WorkerPool::new_with_default_size(); let periodic = timer.periodic(std::time::Duration::milliseconds(64)); loop { printl...
null
null
Remove NoErrorsPlugin until webpack-hot-middleware learns to display syntax error overlay after reload as well Apply this change to `webpack.config.dev.js` and return the full updated file. ```javascript var path = require('path'); var webpack = require('webpack'); module.exports = { // or devtool: 'eval' to debug...
```javascript var path = require('path'); var webpack = require('webpack'); module.exports = { // or devtool: 'eval' to debug issues with compiled output: devtool: 'cheap-module-eval-source-map', entry: [ // necessary for hot reloading with IE: 'eventsource-polyfill', // listen to code updates emitte...
null
null
Check if every source file exists Apply this change to `cmd/speeldoos/cmd-check.go` and return the full updated file. ```go package main import ( "log" "os" ) func check_main(args []string) { allCarr, err := allCarriersWithErrors() if err != nil { log.Fatalf("Unable to open library: %s", err) } exitStatus ...
```go package main import ( "fmt" "log" "os" "path" "github.com/thijzert/speeldoos" "github.com/thijzert/speeldoos/lib/zipmap" ) type checkF func(*speeldoos.Carrier) []error var allChecks []checkF = []checkF{ check_carrierID, check_sourceFiles, } func check_main(args []string) { allCarr, err := allCarrier...
null
null
Change how pins are rendered Apply this change to `src/controls/peripherals/peripheral_list.tsx` and return the full updated file. ```typescript import * as React from "react"; import { ToggleButton } from "../toggle_button"; import { pinToggle } from "../../devices/actions"; import { Row, Col } from "../../ui"; impo...
```typescript import * as React from "react"; import { ToggleButton } from "../toggle_button"; import { pinToggle } from "../../devices/actions"; import { Row, Col } from "../../ui"; import { PeripheralListProps } from "./interfaces"; export function PeripheralList(props: PeripheralListProps) { let { pins } = props;...
null
null
Remove unused arguments for the time being. Apply this change to `src/audio/recorder/writer.rs` and return the full updated file. ```rust // STD Dependencies ----------------------------------------------------------- use std::fs::File; // Internal Dependencies ------------------------------------------------------...
```rust // STD Dependencies ----------------------------------------------------------- use std::fs::File; // Internal Dependencies ------------------------------------------------------ use super::{Chunk, Track}; // Audio Writer Trait --------------------------------------------------------- pub trait AudioWriter:...
null
null
Add method listing all the protocols Apply this change to `protocols/views.py` and return the full updated file. ```python from django.shortcuts import render from django.conf.urls import * from django.contrib.auth.decorators import user_passes_test from .forms import ProtocolForm, TopicFormSet def can_add_protoc...
```python from django.shortcuts import render from django.conf.urls import * from django.contrib.auth.decorators import user_passes_test from .forms import ProtocolForm, TopicFormSet def can_add_protocols(user): return user.is_authenticated() and user.has_perm('protocols.add_protocol') @user_passes_test(can_a...
null
null
Fix value to update to. Improve log message with old and new values. Apply this change to `updater.go` and return the full updated file. ```go package main import ( "fmt" "io/ioutil" "github.com/jeffail/gabs" "github.com/mitchellh/packer/packer" ) func UpdateJsonFile(file string, paths []string, value string, ...
```go package main import ( "fmt" "io/ioutil" "github.com/jeffail/gabs" "github.com/mitchellh/packer/packer" ) func UpdateJsonFile(file string, paths []string, newValue string, ui packer.Ui) error { content, err := ioutil.ReadFile(file) if err != nil { return err } json, err := gabs.ParseJSON(content) i...
null
null
Use Keep annotation from AndroidX instead of android.support Apply this change to `modules/stetho-init/src/androidMain/kotlin/splitties/stetho/init/StethoInitializer.kt` and return the full updated file. ```kotlin /* * Copyright 2019-2021 Louis Cognault Ayeva Derman. Use of this source code is governed by the Apache...
```kotlin /* * Copyright 2019-2021 Louis Cognault Ayeva Derman. Use of this source code is governed by the Apache 2.0 license. */ package splitties.stetho.init import android.content.Context import androidx.annotation.Keep import androidx.startup.Initializer import com.facebook.stetho.Stetho @Keep // Needed becaus...
null
null
Fix email overlap check so it looks at cohorts with transfer sender (but not approved) Apply this change to `src/SFA.DAS.Commitments.Database/StoredProcedures/CheckForOverlappingEmailsForTable.sql` and return the full updated file. ```sql CREATE PROCEDURE [dbo].[CheckForOverlappingEmailsForTable] @Emails [EmailCheck...
```sql CREATE PROCEDURE [dbo].[CheckForOverlappingEmailsForTable] @Emails [EmailCheckTable] READONLY, @CohortId BIGINT = NULL AS BEGIN SELECT E.RowId, A.Id, A.FirstName, A.LastName, A.DateOfBirth, A.CommitmentId AS CohortId, A.StartDate, A.EndDate, A.IsApproved, A.Email, dbo.CourseDatesOverla...
null
null
Replace refs to 'Keystone API' with 'Identity API' Formally, OpenStack Keystone implements the OpenStack Identity API, and this is a client to the API, not to Keystone itself. Change-Id: If568866221a29ba041f0f2cd56dc81deeb9ebc00 Apply this change to `setup.py` and return the full updated file. ```python import os i...
```python import os import sys import setuptools from keystoneclient.openstack.common import setup def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() requires = setup.parse_requirements() depend_links = setup.parse_dependency_links() tests_require = setup.parse_requirements(['to...
null
null
Add int hook to Python3 Fixes #120 Apply this change to `pwndbg/inthook.py` and return the full updated file. ```python #!/usr/bin/env python # -*- coding: utf-8 -*- """ This hook is necessary for compatibility with Python2.7 versions of GDB since they cannot directly cast to integer a gdb.Value object that is not a...
```python #!/usr/bin/env python # -*- coding: utf-8 -*- """ This hook is necessary for compatibility with Python2.7 versions of GDB since they cannot directly cast to integer a gdb.Value object that is not already an integer type. """ from __future__ import absolute_import from __future__ import division from __future_...
null
null
Clarify our reason for Monkey Patching Apply this change to `lib/ami_spec/server_spec.rb` and return the full updated file. ```ruby # Loading serverspec first causes a weird error - stack level too deep # Requiring rspec first fixes that *shrug* require 'rspec' require 'serverspec' # I hate Monkeys class Specinfra::...
```ruby # Loading serverspec first causes a weird error - stack level too deep # Requiring rspec first fixes that *shrug* require 'rspec' require 'serverspec' # The Monkey Patch can be removed once https://github.com/mizzy/specinfra/pull/504 is merged class Specinfra::Backend::Base def self.clear @instance = nil...
null
null
Extend test for Jobs list Issue #99 Apply this change to `TMDbLibTests/ClientJobTests.cs` and return the full updated file. ```csharp using System.Collections.Generic; using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; using TMDbLib.Objects.General; namespace TMDbLibTests { [TestClass] ...
```csharp using System.Collections.Generic; using System.Linq; using Microsoft.VisualStudio.TestTools.UnitTesting; using TMDbLib.Objects.General; namespace TMDbLibTests { [TestClass] public class ClientJobTests { private TestConfig _config; /// <summary> /// Run once, on every tes...
null
null
Make the remove*OnSignal functions deal with Paths not strings git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@17761 91177308-0d34-0410-b5e6-96231b3b80d8 Apply this change to `include/llvm/System/Signals.h` and return the full updated file. ```c //===- llvm/System/Signals.h - Signal Handling support ----------...
```c //===- llvm/System/Signals.h - Signal Handling support ----------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. // //===---...
null
null
Remove field from the XML that we don't use. Apply this change to `libvirt_schema/schema.go` and return the full updated file. ```go // Copyright 2017 Kumina, https://kumina.nl/ // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // Yo...
```go // Copyright 2017 Kumina, https://kumina.nl/ // 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...
null
null
Remove collection.js from building workflow Apply this change to `bin/build-js.sh` and return the full updated file. ```bash #!/bin/bash node_modules/.bin/uglifyjs \ src/javascript/app.js \ src/javascript/services/store.js \ src/javascript/services/share.js \ src/javascript/services/imageloader.js \ src/ja...
```bash #!/bin/bash node_modules/.bin/uglifyjs \ src/javascript/app.js \ src/javascript/services/store.js \ src/javascript/services/share.js \ src/javascript/services/imageloader.js \ src/javascript/controllers/home.js \ --mangle \ --compress \ -o www/dist/javascript/tuchong.min.js \ --source-map www...
null
null
Remove an old stdio.h include from the invalid-array test This should get it up and running on win and other builders without system headers. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@196738 91177308-0d34-0410-b5e6-96231b3b80d8 Apply this change to `test/Sema/crash-invalid-array.c` and return the full upd...
```c // RUN: %clang_cc1 -triple=x86_64-apple-darwin -fsyntax-only -verify %s // PR6913 int main() { int x[10][10]; int (*p)[] = x; int i; for(i = 0; i < 10; ++i) { p[i][i] = i; // expected-error {{subscript of pointer to incomplete type 'int []'}} } } // rdar://13705391 void foo(int a[*][2]...
null
null
Fix accessors to pass unit tests Apply this change to `src/main/java/com/grayben/riskExtractor/headingMarker/elector/ElectedTextList.java` and return the full updated file. ```java package com.grayben.riskExtractor.headingMarker.elector; import java.util.List; import com.grayben.riskExtractor.headingMarker.TextCand...
```java package com.grayben.riskExtractor.headingMarker.elector; import java.util.List; import com.grayben.riskExtractor.headingMarker.TextCandidate; import com.grayben.riskExtractor.headingMarker.nominator.NomineesRetrievable; public class ElectedTextList implements NomineesRetrievable, ElecteesRetrievable { Li...
null
null
Add ability to delete sessions. Apply this change to `examples/server.go` and return the full updated file. ```go package main import ( "fmt" "net/http" "github.com/ymichael/sessions" "github.com/zenazn/goji" "github.com/zenazn/goji/web" ) var ( Sessions = sessions.NewSessionOptions("thisismysecret.", &sessi...
```go package main import ( "fmt" "net/http" "github.com/ymichael/sessions" "github.com/zenazn/goji" "github.com/zenazn/goji/web" ) var ( Sessions = sessions.NewSessionOptions("thisismysecret.", &sessions.MemoryStore{}) ) func hello(c web.C, w http.ResponseWriter, r *http.Request) { x := Sessions.GetSessionO...
null
null
Test the COM Port assignments in the AWG class Apply this change to `tests/testAWG.cpp` and return the full updated file. ```cpp #include <gtest/gtest.h> #include "../src/awg.hpp" #include "../src/pulseTrain.hpp" class AWGConstructors : public ::testing::Test { protected: }; class AWGAcessors : public ::testing...
```cpp #include <gtest/gtest.h> #include "../src/awg.hpp" #include "../src/pulseTrain.hpp" TEST(AwgClass, ComPort) { awg testAwg; EXPECT_EQ(std::string("COM1"),testAwg.comPort()); testAwg.comPort(2); EXPECT_EQ(std::string("COM2"),testAwg.comPort()); testAwg.comPort("com1"); EXPECT_EQ(std::string("com1"),tes...
null
null
Use of linear probing and the same hash function as other libraries Apply this change to `bench/udb2/test-mlib.c` and return the full updated file. ```c #include "../common.c" #include "m-dict.h" static inline bool oor_equal_p(unsigned int k, unsigned char n) { return k == (unsigned int)n; } static inline void oor...
```c #include "../common.c" #define DICTI_OA_PROBING(s) 1 #include "m-dict.h" static inline bool oor_equal_p(unsigned int k, unsigned char n) { return k == (unsigned int)n; } static inline void oor_set(unsigned int *k, unsigned char n) { *k = (unsigned int)n; } DICT_OA_DEF2(dict_oa_uint, unsigned int, M_OPE...
null
null
Make sure the submodule is brought in Apply this change to `build.rs` and return the full updated file. ```rust use std::io::Command; use std::os; fn main() { let curr_dir = os::getenv("CARGO_MANIFEST_DIR").unwrap(); let nvim_dir = Path::new(curr_dir).join("neovim"); Command::new("make").arg("libnvim").c...
```rust use std::io::Command; use std::os; fn main() { let curr_dir = Path::new(os::getenv("CARGO_MANIFEST_DIR").unwrap()); Command::new("git").arg("submodule").arg("update").arg("--init").cwd(&curr_dir).status().unwrap(); let nvim_dir = Path::new(curr_dir).join("neovim"); Command::new("make").arg("li...
null
null