messages listlengths 2 2 | language stringclasses 8
values | prompt_type stringclasses 2
values | lint_errors int64 0 129 ⌀ | cyclomatic_complexity int64 0 32 ⌀ | license stringclasses 7
values | commit stringlengths 40 40 | repos stringlengths 5 116k | new_file stringlengths 4 220 | status stringclasses 6
values | error stringlengths 26 74 ⌀ | is_valid_syntax bool 2
classes |
|---|---|---|---|---|---|---|---|---|---|---|---|
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport View from '../base/view';\nimport Feed from '../models/feed';\nimport {capfirst} from '../utils';\n\nimport FeedView from './feed-view';\n\nimport itemTemplate from '../../templates/feed-place.ejs';\n\n\nexport default class Plac... | javascript | edit | 0 | 1 | mit | 955bd081bf37c5fd0aa336767766145197b0aeea | despawnerer/theatrics,despawnerer/theatrics,despawnerer/theatrics | client/src/js/views/places-view.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { moduleForComponent, test } from 'ember-qunit';\nimport hbs from 'htmlbars-inline-precompile';\n\nmoduleForComponent('f-account', 'Integration | Component | f account', {\n integration: true\n});\n\ntest('it renders', function(... | javascript | edit | 0 | 1 | mit | 617ea4b1ac424daddd02f75727c149b016a26c16 | yandex-shri-minsk-2016/yummy-time,yandex-shri-minsk-2016/yummy-time,yandex-shri-minsk-2016/yummy-time | client/tests/integration/components/f-account-test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*global Ghost */\n(function () {\n 'use strict';\n\n Ghost.Collections.Tags = Ghost.ProgressCollection.extend({\n url: Ghost.paths.apiRoot + '/tags/'\n });\n}());\n\n```\n\nApply this change: Tag API: Primary Document F... | javascript | edit | 0 | 1 | mit | 5ddfe279f1e6d097113c303333198a741bf5f0dd | TryGhost/Ghost,TryGhost/Ghost,TryGhost/Ghost | ghost/admin/models/tag.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { PropTypes } from 'react';\nimport ReactDOM from 'react-dom';\n\nimport { Link } from 'react-router';\n\nimport { createPureComponent } from 'utils/createPureComponent';\n\nexport default createPureComponent({\n\n displa... | javascript | edit | null | null | mit | 467cab061de0819402d424d2c340c91a445c4f9d | mattesja/mygame,mattesja/mygame | src/components/App/App.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport GithubAPI from '../../api/githubAPI';\n\nclass HomePage extends React.Component {\n constructor(props, context) {\n super(props, context);\n\n this.state = {\n showResult: \"l\"\n };\n\n... | javascript | edit | 0 | 2 | mit | 6594732058f60b90ebebbdd47070aa72c176b670 | compumike08/GitHub_Status_API_GUI,compumike08/GitHub_Status_API_GUI | src/components/home/HomePage.js | rejected_duplicate | Near-duplicate of sample 106885 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = function(app) {\n var users = require('../../app/controllers/users.server.controller');\n var courses = require('../../app/controllers/courses.server.controller');\n var authorized = ['manager', 'adm... | javascript | edit | 0 | 1 | mit | 059c261d2b8bdce31133ac9875a59504d89c4f8f | combefis/ECM,combefis/ECM,combefis/ECM | app/routes/courses.server.routes.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nvar argv = require('minimist')(process.argv.slice(2));\nvar injection = require('./services/injection');\nvar _ = require('lodash');\n\nvar port = argv.port || process.env.PORT || 9080;\nvar gitUrl = argv.git || p... | javascript | edit | 0 | 3 | mit | f54d70fdd2c28ca99d94eb5e9cb10004418e7338 | allcount/allcountjs,chikh/allcountjs,allcount/allcountjs,chikh/allcountjs | allcount.js | rejected_duplicate | Near-duplicate of sample 95288 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n assetPath: '{{govukAssetPath}}',\n afterHeader: '{{$afterHeader}}{{/afterHeader}}',\n bodyClasses: '{{$bodyClasses}}{{/bodyClasses}}',\n bodyEnd: '{{$bodyEnd}}{{/bodyEnd}}',\n content: '{{$main}}{{/main}}',\n ... | javascript | edit | 0 | 0 | mit | f92e1de51f035f660d7c736e2869d3c9fa9a53f8 | UKHomeOffice/govuk-template-compiler,UKHomeOffice/govuk-template-compiler | build/config.js | rejected_duplicate | Near-duplicate of sample 67770 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar expect = require('chai').expect;\nvar storage = require('../storage');\nvar utility = require('../utility');\n\ndescribe('text.localize', function() {\n var text = new storage.Localizable({\n key1: 'value',\n key2: ... | javascript | edit | 0 | 1 | apache-2.0 | b6abcef1e466aa09ab920cf56bfe806e71f727ad | negar-binary/binary-static,negar-binary/binary-static,negar-binary/binary-static,4p00rv/binary-static,fayland/binary-static,fayland/binary-static,teo-binary/binary-static,teo-binary/binary-static,4p00rv/binary-static,binary-com/binary-static,binary-static-deployed/binary-static,ashkanx/binary-static,kellybinary/binary-... | src/javascript/binary/base/__tests__/storage.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n rules: {\n // enforce spacing inside array brackets\n 'array-bracket-spacing': [ 'error', 'always', {\n objectsInArrays: false,\n arraysInArrays: false,\n }],\n // specify the maximum length o... | javascript | edit | 0 | 0 | mit | ec0c03368db293ede60115050bd201bfbd9566bc | wyze/eslint-config-wyze | rules/style.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nlet http = require('http');\nlet url = require('url');\nlet fs = require('fs');\n\nhttp.createServer(function (req, res) {\n let q = url.parse(req.url, true);\n let filename = \"app/.\" + q.pathname;\n fs.readFile(filename, fun... | javascript | edit | 0 | 4 | mit | 25b6749b21e4f4f17b7abb239ce2921d279b0ad3 | adilek/jirtdan,adilek/jirtdan | app/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\nconst resources = require('../resources')\nconst querySyntax = require('./querySyntax')\n\nmodule.exports = (propToBind, dispatch) => {\n resources.forEach(resource => {\n propToBind[resource.name] = query =>\n ... | javascript | edit | 0 | 6 | mit | 1467a50893393792b8ec47df9796733a40877e7d | saschabratton/sparkpay | lib/helpers/bindResources.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar gulp = require('gulp')\nvar connect = require('gulp-connect')\nvar browserify = require('browserify')\nvar source = require('vinyl-source-stream');\nvar gulp = require('gulp');\nvar mocha = require('gulp-mocha');\n\ngulp.task('conne... | javascript | edit | 0 | 1 | mit | 558bd4544d76beed8e3d2f8c03c8e228227aed46 | Martin-Cox/AirFlow,Martin-Cox/AirFlow | gulpfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar gulp = require('gulp');\nvar browserify = require('browserify');\nvar source = require('vinyl-source-stream');\nvar imagemin = require('gulp-imagemin');\nvar open = require('gulp-open');\n\ngulp.task('scripts', function () {\n retu... | javascript | edit | 0 | 1 | mit | 853fcd169a4fea0d8efcfc2be789ee535e49e423 | brunops/zombies-game,brunops/zombies-game | gulpfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar gulp = require('gulp');\nvar concat = require('gulp-concat');\nvar sass = require('gulp-sass');\nvar minifyCSS = require('gulp-minify-css');\nvar uglify = require('gulp-uglify');\n\nvar paths = {\n js: ... | javascript | edit | 0 | 1 | mit | d55fdf086698484fffdbfc095ab7547b05daa0d7 | andrew/first-pr,andrew/first-pr | gulpfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport PropTypes from 'prop-types'\nimport Component from 'hyper/component'\nimport decorate from 'hyper/decorate'\n\nclass HyperLine extends Component {\n static propTypes() {\n return {\n plugins: P... | javascript | edit | 0 | 1 | mit | d3dd2c2766f04d3984a2445d110f4b370e860ec9 | Hyperline/hyperline | src/lib/core/hyperline.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndocument.addEventListener('DOMContentLoaded', () => {\n setTimeout(window.browserCheck, 1000);\n\n window.setupGol();\n window.navUpdate(true);\n window.setupLaptops();\n\n window.onscroll();\n\n // Configure scrolling when naviga... | javascript | edit | 0 | 2 | mit | f4985c3b6a55f316f3818ff821ee84718b715459 | controversial/controversial.io,controversial/controversial.io,controversial/controversial.io | app/js/init.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * The LandRights layer module.\n *\n * @return LandRightsLayer class (extends CartoDBLayerClass)\n */\ndefine([\n 'abstract/layer/CartoDBLayerClass',\n 'text!map/cartocss/land_rights.cartocss'\n], function(CartoDBLayerClass, Lan... | javascript | edit | 0 | 1 | mit | cb60f989e6b0174f3a02a69ae9203f52fd163f2e | Vizzuality/gfw,Vizzuality/gfw | app/assets/javascripts/map/views/layers/LandRightsLayer.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function(win) {\n var cordova = require('cordova'),\n Acceleration = require('org.apache.cordova.device-motion.Acceleration'),\n accelerometerCallback = null;\n\n module.exports = {\n start: function (success... | javascript | edit | 0 | 2 | apache-2.0 | baf3f40889a2d00ce0dec7fa98e0d9b2b170ed68 | purplecabbage/cordova-plugin-device-motion,corimf/cordova-plugin-device-motion,jomo0825/cordova-plugin-device-motion,jomo0825/cordova-plugin-device-motion,purplecabbage/cordova-plugin-device-motion,blackberry-webworks/cordova-plugin-device-motion,apache/cordova-plugin-device-motion,jomo0825/cordova-plugin-device-motion... | src/tizen/AccelerometerProxy.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport async function genArrayBufferFromFileReference(fileReference) {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onload = function(e) {\n resolve(e.target.result);\n };\n r... | javascript | edit | 0 | 1 | mit | 857d37d8682fc94af2fc9bdd35f35fbb77376f63 | captbaritone/winamp2-js,captbaritone/winamp2-js,captbaritone/winamp2-js | js/fileUtils.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport {materializeReference} from '../data/fetch'\nimport {ReferencePreview} from '../../..'\n\nexport default ReferencePreview.create(materializeReference)\n\n```\n\nApply this change: Change path to reference preview"
},
{
"r... | javascript | edit | 0 | 0 | mit | ca9ae7313050e9ff873e04d532a99d5ea3969cba | sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity | src/sanity/preview/Reference.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar childProcess = require('child_process');\nvar fs = require('fs');\n\nprocess.chdir('examples');\nchildProcess.execSync('npm install', { stdio: 'inherit' });\nchildProcess.execSync('npm run update', { stdio: 'inherit' });\nprocess.ch... | javascript | edit | 0 | 0 | bsd-3-clause | c429bbab8a4ac3d9d637af8bc8cb10759ea65f5a | jupyter/jupyter-js-notebook,jupyter/jupyter-js-notebook,blink1073/jupyter-js-notebook,jupyter/jupyter-js-notebook,blink1073/jupyter-js-notebook,blink1073/jupyter-js-notebook,blink1073/jupyter-js-notebook,jupyter/jupyter-js-notebook,blink1073/jupyter-js-notebook,jupyter/jupyter-js-notebook | scripts/buildexamples.js | rejected_duplicate | Near-duplicate of sample 102045 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\ndescribe('pointcloud.service', function() {\n\n // load the module\n beforeEach(module('pattyApp.pointcloud'));\n\n var PointcloudService;\n var Potree;\n beforeEach(function() {\n inject(function(_PointcloudSer... | javascript | edit | 0 | 1 | apache-2.0 | 62aac5749c19a11f797d38ee99cbfba2f6714d46 | NLeSC/PattyVis,NLeSC/PattyVis | test/spec/pointcloud/pointcloud.service.spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst basketItemViews = {\n remove: function remove(el) {\n el.addEventListener(\"click\", function() {\n el.parentNode.remove();\n });\n },\n\n addToBasket: function addToBasket(el, props) {\n el.addEventListener(\"cli... | javascript | edit | 0 | 2 | mit | ab46c8e8ac688107a1a7c52a836ac774a10ebb90 | icelab/viewloader | examples/add-to-basket/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*globals document */\nlet hasDOM = typeof document !== 'undefined';\n\nfunction appendContainerElement(rootElementId, id) {\n if (!hasDOM) {\n return;\n }\n\n if (document.getElementById(id)) {\n return;\n }\n\n let rootEl =... | javascript | edit | 0 | 4 | mit | af3d1a81abc124affe3e4f5eabefe6946c635b42 | yapplabs/ember-modal-dialog,yapplabs/ember-modal-dialog | addon/initializers/add-modals-container.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*!\n * angular-katex v0.2.1\n * https://github.com/tfoxy/angular-katex\n *\n * Copyright 2015 Tomás Fox\n * Released under the MIT license\n */\n\n(function() {\n 'use strict';\n\n angular.module('katex', [])\n .provider('katexC... | javascript | edit | 0 | 3 | mit | b3ecee926842a8ffc129e9baf01e82be3b326f71 | tfoxy/angular-katex | angular-katex.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function () {\n var codes = [\n 38, // up\n 38, // up\n 40, // down\n 40, // down\n 37, // left\n 39, // right\n 37, // left\n 39, // right\n 66, // b\n 65 // a\n ];\n\n kamo.Stream.fromEventHandlerSet... | javascript | edit | 0 | 1 | mit | d9ca32775708b9d3ede66e4fad902e4b2a7a3966 | r7kamura/kamo.js | example/konami_code/main.js | rejected_duplicate | Near-duplicate of sample 77119 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nangular.module('publicApp', [\n 'ngCookies',\n 'ngResource',\n 'ngSanitize',\n 'ngRoute'\n])\n .config(function ($routeProvider) {\n $routeProvider\n .when('/', {\n templateUrl: 'views/main.html',\n ... | javascript | edit | 0 | 1 | isc | 7c4f727f9f3f52ab2a6491740e5e8ddbc3b67aa4 | Parkjeahwan/awegeeks,xdv/gatewayd,zealord/gatewayd,zealord/gatewayd,crazyquark/gatewayd,crazyquark/gatewayd,whotooktwarden/gatewayd,xdv/gatewayd,Parkjeahwan/awegeeks,whotooktwarden/gatewayd | public/app/scripts/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport View from \"ember-views/views/view\";\nimport { runAppend, runDestroy } from \"ember-runtime/tests/utils\";\nimport compile from \"ember-template-compiler/system/compile\";\nimport Registry from \"container/registry\";\n\nvar vie... | javascript | edit | 0 | 1 | mit | ad7e5373322aa618b2e7374a8699c054b84b2d64 | mfeckie/ember.js,lan0/ember.js,olivierchatry/ember.js,tofanelli/ember.js,miguelcobain/ember.js,mdehoog/ember.js,mitchlloyd/ember.js,Krasnyanskiy/ember.js,femi-saliu/ember.js,nicklv/ember.js,pangratz/ember.js,delftswa2016/ember.js,xtian/ember.js,topaxi/ember.js,cdl/ember.js,vikram7/ember.js,tricknotes/ember.js,selvagsz/... | packages/ember-views/tests/compat/attrs_proxy_test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nlet config = {};\n\nconfig.port = 3000;\nconfig.apiKey = process.env.LFM_API_KEY;\nconfig.apiSecret = process.env.LFM_SECRET;\n\nmodule.exports = config;\n\n```\n\nApply this change: Add session key to config and update... | javascript | edit | 0 | 0 | mit | c77f36aa39fa95208dd25f9db39abee804aa2c90 | FTLam11/Audio-Station-Scrobbler,FTLam11/Audio-Station-Scrobbler | config/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\ndefine([\"angular\", \"app/services/LoginChecker\", \"app/services/FileLoader\", \"app/services/FigureUploader\", \"app/services/SnippetLoader\", \"app/services/TagLoader\", \"app/services/IdLoader\"], function() {\n\n\... | javascript | edit | 0 | 1 | mit | a6f2abe06879273c426ff7c1cf1f4a4e3365e6ed | ucam-cl-dtg/scooter,ucam-cl-dtg/scooter | app/js/app/services.js | rejected_duplicate | Near-duplicate of sample 83237 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n//= require jquery\n//= require jquery_ujs\n//= require turbolinks\n//= require foundation\n\n//= require ace/ace\n//= require ace/mode-ruby\n//= require ace/mode-golang\n//= require ace/mode-python\n//= require ace/mode-c_cpp\n//= requ... | javascript | edit | 0 | 0 | mit | 9aadb6e0383e7615b66da3fc1cce659c5a475c86 | tamzi/grounds.io,foliea/grounds.io,grounds/grounds.io,tamzi/grounds.io,grounds/grounds.io,foliea/grounds.io,tamzi/grounds.io,grounds/grounds.io,grounds/grounds.io,foliea/grounds.io,tamzi/grounds.io,foliea/grounds.io | vendor/assets/javascripts/vendor_application.js | rejected_duplicate | Near-duplicate of sample 73803 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimportScripts('/js/sha256.js');\n\nonmessage = function(e) {\n console.log('received work!');\n\n var date = (new Date()).yyyymmdd();\n var bits = 0;\n var rand = Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5);\n\n ... | javascript | edit | 0 | 1 | mit | 9bec7b6e05e2b0cdc856959d3358f5cfd3703a7d | martindale/converse,martindale/converse,willricketts/converse,willricketts/converse | public/js/worker.js | accepted | null | true |
[
{
"role": "user",
"content": "Write javascript code for the following: Add key* functions to Graphics backend"
},
{
"role": "assistant",
"content": "document.write(\"<canvas>\")\nvar Graphics = new Processing(document.querySelector('canvas'));\n\nGraphics.keyPressed = function() {\n World.query... | javascript | new_file | 0 | 1 | mit | 10dce7b80924d70fde48129873be5e63808e30f4 | sangohan/twelve,nasser/twelve,nasser/twelve,sangohan/twelve | js/backends/graphics/graphics.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Use the web-push library to hide the implementation details of the communication\n// between the application server and the push service.\n// For details, see https://tools.ietf.org/html/draft-ietf-webpush-protocol and\n// https://to... | javascript | edit | 0 | 2 | mit | 14db2d58cd866166e047e4c50c12bd88e5f64cd3 | mozilla/serviceworker-cookbook,mozilla/serviceworker-cookbook | push-rich/server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Dictionary = function() {\n var jsonURL = './json/dictionary.json';\n\n this._wordList = (function() {\n var json = null;\n $.ajax({\n 'async': false,\n 'global': false,\n 'url': jsonURL,\n 'dataType': 'j... | javascript | edit | 0 | 1 | mit | 41991574f6105df69ac940cc6aa27885ec76d503 | razh/spellquest | js/dictionary.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function () {\n var server = sinon.fakeServer.create();\n server.xhr.useFilters = true;\n server.xhr.addFilter(function (method, url) {\n //whenever the this returns true the request will not faked\n return !url.... | javascript | edit | 0 | 1 | mit | 1e26d91c9706abb49ee0d5b5224b30ce8ce629b8 | Starcounter/starcounter-include,Starcounter/starcounter-include | test/helpers/mock-htmlmerger.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// CHANGE the current collection\r\nvar changeCollection=function(new_index){\r\n\tdbIndex = new_index;\r\n\timageDB = DATABASE[dbIndex];\r\n\t$(\"#collectionFooter\").text(collections[dbIndex]);\r\n\tlocalStorage.setItem(\"last_visited... | javascript | edit | 0 | 3 | cc0-1.0 | 4862fbed37854b9be0fe9271a04d786786c9eca7 | johnprattchristian/imagecollection,johnprattchristian/imagecollection | collections.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport Registry from '../utils/Registry';\n\nexport default class Markup extends Component {\n render() {\n return (\n <div dangerouslySetInnerHTML={ {__html: this.props.data}}></div>\... | javascript | edit | 0 | 7 | mit | 598b062784f68a1fe3c07dfdfeeba89abdc3e148 | NuCivic/react-dash,NuCivic/react-dashboard,NuCivic/react-dash,NuCivic/react-dash,NuCivic/react-dashboard,NuCivic/react-dashboard | src/components/Markup.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function(grunt) {\n\n require('load-grunt-tasks')(grunt);\n\n // Add the grunt-mocha-test tasks.\n [\n 'grunt-mocha-test',\n 'grunt-contrib-watch'\n ]\n .forEach( grunt.loadNpmTasks );\n\n grunt.initConfig({... | javascript | edit | 0 | 1 | mit | 63afc625a808e66ac2bc1159557fc1547628a23a | BrianSilvia/http-fs-node,BrianSilvia/http-fs-node | Gruntfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function(grunt) {\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n\n copy: {\n jquery: {\n expand: true,\n flatten: true,\n src:... | javascript | edit | 0 | 1 | apache-2.0 | fdcd6a46e85cee80cda021b8dad199101b3d888d | PeterDaveHello/git-webui,peter-genesys/git-webui,alberthier/git-webui,desyncr/git-webui,epicagency/git-webui,desyncr/git-webui,epicagency/git-webui,Big-Shark/git-webui,Big-Shark/git-webui,PeterDaveHello/git-webui,PeterDaveHello/git-webui,desyncr/git-webui,alberthier/git-webui,peter-genesys/git-webui,peter-genesys/git-w... | Gruntfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function(grunt) {\n\n require('load-grunt-tasks')(grunt);\n\n // Add the grunt-mocha-test tasks.\n [\n 'grunt-mocha-test',\n 'grunt-contrib-watch'\n ]\n .forEach( grunt.loadNpmTasks );\n\n grunt.initConfig({... | javascript | edit | 0 | 1 | mit | cd931b99fdb37f549ac0362baabc2dbfaab3de3b | BrianSilvia/http-fs-node,BrianSilvia/http-fs-node | Gruntfile.js | rejected_duplicate | Near-duplicate of sample 107713 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * grunt-dco\n *\n * Copyright (c) 2014 Rafael Xavier de Souza\n * Licensed under the MIT license.\n */\n\n\"use strict\";\n\nmodule.exports = function(grunt) {\n\n // Project configuration.\n grunt.initConfig({\n jshint: {\n ... | javascript | edit | 0 | 1 | mit | 7ca0d5b081b5eefafbca80965d5140f9cc8cef0e | rxaviers/grunt-dco | Gruntfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function( grunt ) {\n\t'use strict';\n\n\t// Project configuration.\n\tgrunt.initConfig( {\n\n\t\tpkg: grunt.file.readJSON( 'package.json' ),\n\n\t\tcopy: {\n\t\t\tmain: {\n\t\t\t\tsrc: [\n\t\t\t\t\t'includes/**',\n\t\t... | javascript | edit | 0 | 1 | mit | 8aac3f2f829792220578c31ba1df5a308327c1b0 | liquidweb/sticky-tax,liquidweb/sticky-tax,liquidweb/sticky-tax | Gruntfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function (grunt) {\n var paths = require('./paths');\n\n grunt.loadNpmTasks('grunt-mocha-test');\n grunt.loadNpmTasks('grunt-contrib-concat');\n grunt.loadNpmTasks('grunt-contrib-watch');\n\n grunt.initCo... | javascript | edit | 0 | 1 | bsd-3-clause | 5aa65c9489168b55c1b936582609ebd3e80f9e32 | praekelt/vumi-ureport,praekelt/vumi-ureport | Gruntfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function(grunt) {\n 'use strict';\n\n require('grunt-horde')\n .create(grunt)\n .demand('projName', 'sinon-doublist')\n .demand('instanceName', 'sinonDoublist')\n .demand('klassName', 'sinonDoublist')\n ... | javascript | edit | 0 | 1 | mit | 9454a3e4032193b29c498e477a165f04a082afbb | codeactual/sinon-doublist | Gruntfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport default class MetaController {\n constructor(PageMetadata) {\n this.meta = PageMetadata;\n }\n}\nMetaController.$inject = ['PageMetadata'];\n```\n\nApply this change: Upgrade MetaController to ES6 syntax"
},
{
"role"... | javascript | edit | 0 | 1 | mit | 63bde0dab0d5cb013e8165ed897af201e0eeb5e1 | demerzel3/desmond,demerzel3/desmond,demerzel3/desmond,demerzel3/desmond | src/client/controller/meta_controller.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * @license\n * Copyright 2014 Google Inc. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a cop... | javascript | edit | 0 | 1 | apache-2.0 | c9e083cc8b431390042b744d7252e64ce758b50a | foam-framework/foam,mdittmer/foam,foam-framework/foam,jlhughes/foam,osric-the-knight/foam,jlhughes/foam,osric-the-knight/foam,jacksonic/foam,foam-framework/foam,jlhughes/foam,mdittmer/foam,jlhughes/foam,osric-the-knight/foam,foam-framework/foam,osric-the-knight/foam,jacksonic/foam,foam-framework/foam,mdittmer/foam,mdit... | apps/acalc/bg.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport AsyncPlayer from './async-player.js';\n\n// An online player whose moves are determined by a remote human user\nclass OnlinePlayer extends AsyncPlayer {\n\n constructor({ game }) {\n game.session.on('receive-next-move', ({ co... | javascript | edit | 0 | 1 | mit | 35de520dffd5a7e592b44295ae79e5abd117a630 | caleb531/connect-four | app/scripts/models/online-player.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* @flow */\nconst alternativeValues = {\n 'space-around': 'distribute',\n 'space-between': 'justify',\n 'flex-start': 'start',\n 'flex-end': 'end'\n}\nconst alternativeProps = {\n alignContent: 'msFlexLinePack',\n alignSelf: 'msF... | javascript | edit | null | null | mit | 532d59bddb0f38a3d440c1cdabd4ac92d9105b13 | rofrischmann/inline-style-prefixer | modules/static/plugins/flexboxIE.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Image from 'substance/packages/image/Image'\nimport ImageComponent from 'substance/packages/image/ImageComponent'\nimport ImageMarkdownComponent from './ImageMarkdownComponent'\nimport ImageHTMLConverter from 'substance/packages/... | javascript | edit | 0 | 1 | apache-2.0 | ea2d72768aa3eb8f15400ed343662918755df702 | stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila | src/document/nodes/image/ImagePackage.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Copyright (c) 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n ... | javascript | edit | null | null | mit | 6fea7c2846d3977e2b6549aa3243d582b4c39c78 | Applied-Duality/react-native,judastree/react-native,javache/react-native,corbt/react-native,charlesvinette/react-native,sghiassy/react-native,Poplava/react-native,soxunyi/react-native,cez213/react-native,hengcj/react-native,cdlewis/react-native,tarkus/react-native-appletv,peterp/react-native,BretJohnson/react-native,ed... | Libraries/react-native/react-native-interface.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst Discord = require('discord.js'),\n client = new Discord.Client;\n\nclient.run = ctx => {\n client.on('ready', () => {\n if (client.user.bot) {\n client.destroy();\n } else {\n ctx.gui.put(`{bold}Logged in as ${cl... | javascript | edit | 0 | 3 | mit | aad192238064aa6546555b3391546ebcbc04c0df | wwwg/retrocord-light,wwwg/retrocord-light | src/discord.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport ReactDOMServer from 'react-dom/server';\nimport jsBeautify from 'js-beautify';\nimport * as Settings from './settings';\n\n/*\n * Render React components to markup in order to compare to a Jest Snapsho... | javascript | edit | 0 | 1 | bsd-3-clause | c9482b9e34a1b2243370d66864f38d9f35d56b79 | salesforce/design-system-react,salesforce/design-system-react,salesforce/design-system-react | tests/snapshot-helpers.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* @flow */\nvar React = require('react');\nvar FlexCell: any = require('./FlexCell.react');\nvar FlexDetail = require('./FlexDetail.react');\n\nclass FlexGrid extends React.Component{\n state: {detail: string};\n render: Function... | javascript | edit | null | null | mit | 316fa2ac078fdad20deeca235580387821f3b29f | thewazir/pokemon-react,thewazir/pokemon-react | src/js/FlexGrid.react.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine( [ \"Ember\" ], function( Ember ) {\n\n\tvar concat = [].concat;\n\tvar makeArray = Ember.makeArray;\n\n\treturn function preload( withError, list ) {\n\t\tif ( list === undefined ) {\n\t\t\tlist = withError;\n\t\t\twithError = f... | javascript | edit | 0 | 3 | mit | c5ba74bea4488be4a66ab8a32aa2a314fcfcf03b | streamlink/streamlink-twitch-gui,chhe/livestreamer-twitch-gui,streamlink/streamlink-twitch-gui,bastimeyer/livestreamer-twitch-gui,bastimeyer/livestreamer-twitch-gui,streamlink/streamlink-twitch-gui,bastimeyer/livestreamer-twitch-gui,chhe/livestreamer-twitch-gui,chhe/livestreamer-twitch-gui | src/app/utils/preload.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * @fileOverview \n */\ndefine(['parse/parse',\n 'ecma/ast/value', \n 'khepri/parse/token_parser'],\nfunction(parse,\n astValue, \n token){\n\"use strict\";\n\n// Literal\n///////////////////////////////... | javascript | edit | 0 | 1 | mit | 2d7acc374a01b4342e35dd86aeabf9eee5a5b72d | mattbierner/khepri | lib/parse/value_parser.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* PSEUDO CODE FOR LOGIN MENU\n\n1. COLLECT DATA ENTERED INTO THE <INPUT>\n2. WHEN .LOGIN-SUBMIT IS 'CLICKED' `GET/users/id` TO DATABASE TO BE VERIFIED?\n*/\n\n\n;(function(){\n angular.module('Front-Rails', [ ])\n\n.run(function($htt... | javascript | edit | 0 | 1 | mit | 538a1fca657d35875ce2a679f39e6b5868627e3e | front-rails/GUI,front-rails/GUI | src/js/main.js | rejected_duplicate | Near-duplicate of sample 95459 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst winston = require('winston')\nconst authorisedRequest = require('../lib/authorisedrequest')\nconst config = require('../config')\n\nfunction getInteraction (token, interactionId) {\n return authorisedRequest(token, `${config.apiR... | javascript | edit | 0 | 3 | mit | 72773fb2aa29ab226a5bcb2a8ce7bf468ede0c69 | uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2 | src/repositorys/interactionrepository.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst _ = require('lodash');\n\nmodule.exports = function parseSectionName(sectionName, name) {\n const ret = sectionName + name;\n\n // Root exception (/)\n return ret.length > 1 ? _.trimStart(ret, '/') : ret;\n};\n\n```\n\nApply th... | javascript | edit | 0 | 2 | mit | 775532063ca4c85d3217bd25d7476460fe778308 | antwarjs/antwar | packages/antwar/src/core/paths/parse-section-name.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar cacheManager = require(\"cache-manager\");\n\nmodule.exports = {\n // cache system (see https://github.com/BryanDonovan/node-cache-manager)\n Cache: cacheManager.caching({\n store: \"memory\",\n ... | javascript | edit | 0 | 0 | mit | b561eeeb08843c71c327d548d8bfb47d66ac7458 | cubehouse/themeparks | lib/settings.js | rejected_duplicate | Near-duplicate of sample 71198 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction filterF(i, el) {\n var pattern = /(From|To|Subject|Cc|Date):/i;\n return el.textContent.match(pattern);\n}\n\n$($(\"blockquote\").get().reverse()).each(function(i, el) {\n var contents = $(el).contents();\n var matches = co... | javascript | edit | 0 | 1 | mit | 347755aa2c6c280a118005dd06b13a43f5496460 | kubkon/email-chattifier,kubkon/email-chattifier | chattify.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\n'use strict';\n\nco... | javascript | edit | null | null | mit | 51c5761d4d0d7ed74fef80ca9277d529912b862d | xuorig/relay,facebook/relay,cpojer/relay,xuorig/relay,freiksenet/relay,xuorig/relay,wincent/relay,iamchenxin/relay,cpojer/relay,facebook/relay,kassens/relay,dbslone/relay,voideanvalue/relay,josephsavona/relay,zpao/relay,dbslone/relay,facebook/relay,wincent/relay,atxwebs/relay,yungsters/relay,voideanvalue/relay,atxwebs/... | packages/babel-plugin-relay/getSchemaIntrospection.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { module } from 'qunit';\nimport startApp from '../helpers/start-app';\nimport destroyApp from '../helpers/destroy-app';\n\nexport default function(name, options = {}) {\n module(name, {\n beforeEach() {\n this.applicati... | javascript | edit | 0 | 2 | mit | 17ea0550201dea34b44397eec927e00f575bac5d | martypenner/ember-cli,seawatts/ember-cli,eccegordo/ember-cli,acorncom/ember-cli,kanongil/ember-cli,patocallaghan/ember-cli,nathanhammond/ember-cli,thoov/ember-cli,calderas/ember-cli,johnotander/ember-cli,scalus/ember-cli,jrjohnson/ember-cli,patocallaghan/ember-cli,rtablada/ember-cli,ef4/ember-cli,johnotander/ember-cli,... | blueprints/app/files/tests/helpers/module-for-acceptance.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// @flow\nimport React, { Component } from 'react';\nimport { inject, observer } from 'mobx-react';\nimport ReactModal from 'react-modal';\nimport About from '../../components/static/About';\nimport styles from './AboutDialog.scss';\nim... | javascript | edit | null | null | apache-2.0 | eea12ffb865c76519476e8c339e2bbd56423ab4d | input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus | source/renderer/app/containers/static/AboutDialog.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(function () {\n $.get(\"/point_types.json\", function (typeList) {\n $(\"#point_type\").autocomplete({\n source: typeList, delay: 0, minLength: 0, autoFocus: true\n });\n\n $(\"#point_type\").focus(function () {\n ... | javascript | edit | 0 | 1 | bsd-2-clause | 0353d63465f9a393600708c19b158cdf20a817d3 | Sayhired/SaygePoints,Sayhired/SaygePoints | app/assets/javascripts/autocomplete_point_fields.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(function() {\n // Body headings\n $('h1.juttuotsikko span.otsikko:last-of-type').satanify();\n\n // Left\n $('#container_vasen p a:not(.palstakuva)').satanify(' ');\n\n // Right\n $('#container_oikea [class$=link-list] p a:not(.... | javascript | edit | 0 | 3 | mit | 792dc7a8405a900c8120739498fc1aaeb5113cf4 | veeti/iltasaatana,veeti/iltasaatana | scripts/iltalehti.user.js | rejected_duplicate | Near-duplicate of sample 84603 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar Command = require('./command');\n\nvar SelectAll = Command.extend({\n static: {\n name: 'selectAll'\n },\n\n execute: function() {\n var ctrl = this.getController();\n var surface = ctrl.getSurface();\n ... | javascript | edit | 0 | 1 | mit | a815c7e9d888053d37d6d98a56c84b3836265331 | TypesetIO/substance,jacwright/substance,andene/substance,substance/substance,abhaga/substance,stencila/substance,substance/substance,michael/substance-1,andene/substance,michael/substance-1,TypesetIO/substance,podviaznikov/substance,abhaga/substance,podviaznikov/substance,jacwright/substance | ui/commands/select_all.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * Copyright (c) 2015 Steven Soloff\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without... | javascript | edit | 0 | 2 | mit | f2360e8ac9e7d0ef3c2174df60936c1451daa8d6 | ssoloff/dice-server-js,ssoloff/dice-server-js,ssoloff/dice-server-js,ssoloff/dice-server-js | lib/dice-bag.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Module = require('module')\nvar path = require('path')\nvar fs = require('fs')\n\nfunction exists (target, extensions) {\n if (fs.existsSync(target)) {\n return target\n }\n\n if (path.extname(target) === '') {\n for (var i... | javascript | edit | 0 | 8 | mit | 96322552efa957b565247b7121a6dcfcd3a037ab | chrisyip/requere | lib/resolver.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar validate = require('validate.js');\n\nvar validateFxoObject = function(type, value, key, options) {\n if(options.required) {\n if(!value) {\n return ' is required';\n }\n }\n\n if(value && !value.valid... | javascript | edit | 0 | 5 | mit | be619af686fc09d843e90a246fed60fb26524197 | marian2js/flowxo-sdk,equus71/flowxo-sdk,flowxo/flowxo-sdk | lib/validate.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n * @ngdoc directive\n * @name angular-uploadcare.directive:UploadCare\n * @description Provides a directive for the Uploadcare widget.\n * # UploadCare\n */\nangular.module('ng-uploadcare', [])\n .directive('uploa... | javascript | edit | 0 | 2 | mit | 48ff97b172c1c186cbcdacb817f3866a10a1fd58 | uploadcare/angular-uploadcare | angular-uploadcare.js | rejected_duplicate | Near-duplicate of sample 98628 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ncontext('Form', () => {\n\tbefore(() => {\n\t\tcy.login('Administrator', 'qwe');\n\t\tcy.visit('/desk');\n\t});\n\n\tit('add custom column in report', () => {\n\t\tcy.visit('/desk#query-report/Permitted Documents For User');\n\n\t\tcy.g... | javascript | edit | 0 | 1 | mit | 5139a033cc4083fd86416a330e3220babe377341 | yashodhank/frappe,yashodhank/frappe,mhbu50/frappe,StrellaGroup/frappe,frappe/frappe,StrellaGroup/frappe,frappe/frappe,mhbu50/frappe,vjFaLk/frappe,frappe/frappe,almeidapaulopt/frappe,adityahase/frappe,adityahase/frappe,adityahase/frappe,yashodhank/frappe,mhbu50/frappe,saurabh6790/frappe,saurabh6790/frappe,almeidapaulopt... | cypress/integration/query_report.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* ---------------------------------------------------- +/\n\n## Client Router ##\n\nClient-side Router.\n\n/+ ---------------------------------------------------- */\n\n// Config\n\nRouter.configure({\n layoutTemplate: 'layout',\n lo... | javascript | edit | 0 | 3 | mit | 557c5a62d82c86efed996e468183a4e0688ff987 | scimusmn/sd-scrapbook,scimusmn/sd-scrapbook,scimusmn/sd-scrapbook | meteor/client/helpers/router.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nwindow.GOVUK = window.GOVUK || {}\nwindow.GOVUK.Modules = window.GOVUK.Modules || {};\n\n(function (GOVUK) {\n 'use strict'\n\n GOVUK.Modules.EnableAriaControls = function EnableAriaControls () {\n this.start = function (element) {... | javascript | edit | 0 | 4 | mit | 66c0d320a73c792dfeca3a7f783c9f8c180bb1b0 | alphagov/finder-frontend,alphagov/finder-frontend,alphagov/finder-frontend,alphagov/finder-frontend | app/assets/javascripts/modules/enable-aria-controls.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction DeferredChain() {\n var self = this;\n this.chain = new Promise(function(accept, reject) {\n self._accept = accept;\n self._reject = reject;\n });\n\n this.await = new Promise(function() {\n self._done = arguments[... | javascript | edit | 0 | 2 | mit | 54522d1a072cc76c10b4953c62d7eca04af10152 | ConsenSys/truffle | packages/truffle-core/lib/deferredchain.js | rejected_duplicate | Near-duplicate of sample 75419 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport fetch from '../io/fetch.js'\nimport decodeBuffer from './decode-buffer.js'\n\nexport default function loadData3d (url, options) {\n return fetch(url, options).then(function(res){\n return res.arrayBuffer()\n }).then(function... | javascript | edit | 0 | 1 | mit | 47bd5107690ab5b34cd210a6a45942b4b469e6ba | archilogic-com/3dio-js,archilogic-com/3dio-js | src/utils/data3d/load.js | accepted | null | true |
[
{
"role": "user",
"content": "Write javascript code for the following: Add basic outline to Backbone question view -define template -empty events -empty initialize -empty render"
},
{
"role": "assistant",
"content": "app = app || {};\n\napp.QuestionView = Backbone.View.extend({\n\n template: _.... | javascript | new_file | 0 | 1 | cc0-1.0 | 99d332faca68dedf51f31b9fda60ea9672b66126 | red-spotted-newts-2014/food-overflow,red-spotted-newts-2014/food-overflow | app/assets/javascripts/global/views/questions.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport default {\n \"defs\": {\n \"spec\": {\n \"title\": \"Vega visualization specification\",\n \"type\": \"object\",\n \"allOf\": [\n {\"$ref\": \"#/defs/scope\"},\n {\n \"properties\": {\n ... | javascript | edit | 0 | 0 | bsd-3-clause | fa0c582c42f81d4f94a4e2fdc16ac7df9bf1d1c1 | vega/vega,vega/vega,vega/vega,vega/vega,lgrammel/vega | packages/vega-parser/schema/spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF lic... | javascript | edit | 0 | 1 | apache-2.0 | 435ca8ef211b92be8222a2aeee44bef7bdd74890 | pwcberry/climate,riverma/climate,lewismc/climate,MBoustani/climate,pwcberry/climate,apache/climate,huikyole/climate,Omkar20895/climate,jarifibrahim/climate,jarifibrahim/climate,Omkar20895/climate,pwcberry/climate,riverma/climate,apache/climate,pwcberry/climate,MJJoyce/climate,huikyole/climate,MBoustani/climate,lewismc/... | rcmet/src/main/ui/test/unit/controllers/SettingsCtrlTest.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport DS from 'ember-data';\nimport Ember from 'ember';\n\nexport default DS.RESTAdapter.extend({\n defaultSerializer: 'ember-loopback/serializers/ember-loopback',\n\n /**\n * Serializes the query params as a json because loopback ... | javascript | edit | 0 | 3 | mit | 2b4785dca28b3863353de148a78e4aeed595a98c | mediasuitenz/ember-loopback,mediasuitenz/ember-loopback | addon/adapters/ember-loopback.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* global exports */\n\"use strict\";\n\n// module Data.Foreign\n\n// jshint maxparams: 3\nexports.parseJSONImpl = function (left, right, str) {\n try {\n return right(JSON.parse(str));\n } catch (e) {\n return left(e.toString()... | javascript | edit | 0 | 2 | bsd-3-clause | c3627324afb753e7b4393e8f2ddd1269768ac8e1 | purescript/purescript-foreign | src/Data/Foreign.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nangular.module('webClientApp')\n .directive('scrollSpy', ['$window', '$interval',\n function ($window, $interval) {\n var didScroll;\n var lastScroll = 0;\n\n return function(scope) {\n angular.eleme... | javascript | edit | 0 | 6 | bsd-2-clause | 76f678705e608d086b8dc549f180229b787398b4 | ahmgeek/manshar,manshar/manshar,manshar/manshar,manshar/manshar,ahmgeek/manshar,ahmgeek/manshar,ahmgeek/manshar,manshar/manshar | web-client/app/scripts/directives/scrollSpy.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\njQuery.fn.extend({\n coverVid: function(width, height) {\n\n var $this = this;\n\n $(window).on('resize load', function(){\n\n // Get parent element height and width\n var parentHeight = $this.parent().height();\n ... | javascript | edit | 0 | 2 | mit | 1cffb363b4456ffc9064479c02c72b96b2deba33 | zonayedpca/covervid,tianskyluj/covervid,A11oW/ngCovervid,jfeigel/ngCovervid,gdseller/covervid,space150/covervid,AlptugYaman/covervid,AlptugYaman/covervid,gdseller/covervid,tatygrassini/covervid,kitestudio/covervid,PabloValor/covervid,stefanerickson/covervid,stefanerickson/covervid,kitestudio/covervid,PabloValor/covervi... | covervid.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar gulp = require('gulp'),\n istanbul = require('gulp-istanbul'),\n jasmine = require('gulp-jasmine'),\n jshint = require('gulp-jshint'),\n plumber = require('gulp-plumber');\n\nvar paths = {\n src: ['index.js'],\n test: ... | javascript | edit | 0 | 1 | mit | 12fc327a90f7ff6dcb372728270a6275215bb52a | yuanqing/mitch | gulpfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction maReferenceManyField(ReferenceRefresher) {\n 'use strict';\n\n return {\n scope: {\n 'field': '&',\n 'value': '=',\n 'entry': '=?',\n 'datastore': '&?'\n },\n ... | javascript | edit | 0 | 4 | mit | 27606e9ed8891f71c4cdab341d77ce0aa4c0bc8e | Benew/ng-admin,thachp/ng-admin,marmelab/ng-admin,LuckeyHomes/ng-admin,marmelab/ng-admin,heliodor/ng-admin,ahgittin/ng-admin,gxr1028/ng-admin,manekinekko/ng-admin,arturbrasil/ng-admin,jainpiyush111/ng-admin,arturbrasil/ng-admin,vasiakorobkin/ng-admin,jainpiyush111/ng-admin,janusnic/ng-admin,rao1219/ng-admin,eBoutik/ng-a... | src/javascripts/ng-admin/Crud/field/maReferenceManyField.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar gulp = require('gulp');\nvar sass = require('gulp-sass');\n\n// Common paths.\nvar paths = {\n BootstrapSCSS: 'priv/assets/bootstrap-custom/bootstrap-custom.scss',\n BootstrapInclude: 'priv/components/bootstrap-sass/assets/sty... | javascript | edit | 0 | 1 | mit | d73be27d2bcb8481c1bc86702b82e38445c7e33e | OxySocks/micro,OxySocks/micro | gulpfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nexport default Ember.Route.extend({\n beforeModel: function() {\n this.transitionTo('dashboard');\n }\n});\n\n```\n\nApply this change: Use replaceWith to redirect to dashboard on login"
},
{
"... | javascript | edit | 0 | 1 | mit | be4dd0a0f52aae22e349b9b711ae28d26747add1 | thecoolestguy/frontend,thecoolestguy/frontend,stopfstedt/frontend,gabycampagna/frontend,ilios/frontend,gboushey/frontend,djvoa12/frontend,stopfstedt/frontend,ilios/frontend,jrjohnson/frontend,gboushey/frontend,gabycampagna/frontend,dartajax/frontend,jrjohnson/frontend,djvoa12/frontend,dartajax/frontend | app/routes/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint-disable no-new-func */\n'use strict';\n\n/**\n* Test if the global scope is bound to the \"window\" variable present in browser environments. When creating a new function using the `function(){}` constructor, the execution sco... | javascript | edit | 0 | 1 | apache-2.0 | 5349a3f6b0ff47b4d0be4d9b291d3c9e9c1a0718 | stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib | lib/node_modules/@stdlib/assert/is-browser/lib/global_scope.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nlet { isArray } = require('../mindash');\nlet findApp = require('../core/findApp');\n\nmodule.exports = function (React) {\n let ApplicationContainer = React.createClass({\n childContextTypes: {\n app: React.PropTypes.object\n ... | javascript | edit | 0 | 3 | mit | 8e44961e67fa00f9b97252843423451150f7d215 | goldensunliu/marty-lib,KeKs0r/marty-lib,thredup/marty-lib,gmccrackin/marty-lib,CumpsD/marty-lib,martyjs/marty-lib | src/application/applicationContainer.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction OnConfig($stateProvider, $locationProvider, $urlRouterProvider) {\n 'ngInject';\n\n $locationProvider.html5Mode(true);\n\n $stateProvider\n .state('Home', {\n url: '/',\n controller: 'ExampleCtrl as home',\n templa... | javascript | edit | 0 | 1 | mit | d8b936eabb69ac5fd0cd4cd38cbd54a0ed7d6540 | 8bithappy/happyhack,8bithappy/happyhack | app/js/on_config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function() {\n 'use strict';\n\n angular.module('chaise.errors', [])\n\n // Factory for each error type\n .factory('ErrorService', [function ErrorService() {\n\n function error409(error) {\n // retry logic... | javascript | edit | 0 | 1 | apache-2.0 | 8742d2bffb4c2f02b2372c9a4be0385c0422411d | informatics-isi-edu/chaise,informatics-isi-edu/chaise,informatics-isi-edu/chaise,informatics-isi-edu/chaise | common/errors.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n * Module dependencies.\n */\nvar recipesPolicy = require('../policies/recipes.server.policy'),\n recipes = require('../controllers/recipes.server.controller');\n\nmodule.exports = function (app) {\n // Recipes c... | javascript | edit | 0 | 1 | mit | 884e849c8fa169320355c1544ab9e236f56f868e | SEGroup9b/whatUEatin,SEGroup9b/whatUEatin,SEGroup9b/whatUEatin | modules/recipes/server/routes/recipes.server.routes.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar prepare = require('../../lib/prepare');\nvar expect = require('expect');\n\nvar samples = {\n 'copy': {\n 'assets': require('../samples/copy/assets'),\n 'report': require('../samples/copy/report')\n },\n 'compress': {\n ... | javascript | edit | 0 | 2 | mit | 528a764e786787535ab6d763072cb0550435075b | arrowrowe/tam | test/lib/prepare-spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst path = require('path')\nconst NODE_ENV = process.env.NODE_ENV || 'production'\nconst KF_USER_PATH = process.env.KF_USER_PATH || __dirname\nconst KF_SERVER_PORT = parseInt(process.env.KF_SERVER_PORT, 10)\nconst KF_LOG_LEVEL = parse... | javascript | edit | 0 | 0 | isc | bad1014c435b94e2c18515ae619152adcc392dcc | bhj/karaoke-forever,bhj/karaoke-forever | project.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nexport default Ember.Route.extend({\n model(params) {\n return Ember.RSVP.hash({\n movie: Ember.$.getJSON(\"https://api.themoviedb.org/3/movie/\" + params.movie_id+ \"?api_key=0910db574... | javascript | edit | 0 | 2 | mit | 6c376933137540938bd869be1dd27ac039108704 | JaxonWright/CineR8,JaxonWright/CineR8 | app/routes/movie.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nwindow.ModelWithLanguageMixin = {\n\n LANGUAGE_CHOICES: {\n en: 'English',\n es: 'Spanish',\n hi: 'Hindi',\n pt: 'Portuguese',\n ru: 'Russian',\n ja: 'Japanese',\n de: 'German',\n id: 'Malay/Indo... | javascript | edit | 0 | 2 | mit | b78aee002c1f991ea02ef734dea40c872a979dc3 | ivarvong/documentcloud,dannguyen/documentcloud,roberttdev/dactyl4,gunjanmodi/documentcloud,roberttdev/dactyl,roberttdev/dactyl4,monofox/documentcloud,monofox/documentcloud,dannguyen/documentcloud,Teino1978-Corp/Teino1978-Corp-documentcloud,dannguyen/documentcloud,moodpo/documentcloud,monofox/documentcloud,Teino1978-Cor... | public/javascripts/lib/model_with_language_mixin.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { transformFile } from 'babel-core'\nimport { then } from '../util/async'\nimport { debug } from '../util/stdio'\nimport { default as es2015 } from 'babel-preset-es2015'\nimport { default as amd } from 'babel-plugin-transform-es2... | javascript | edit | 0 | 3 | mit | cfa1f1741701930afa9813dc11674c15bd83849e | zambezi/ez-build,zambezi/ez-build | src/builder/javascript.js | rejected_duplicate | Near-duplicate of sample 97121 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar app = express();\nvar redis = require('redis').createClient(process.env.REDIS_URL);\n\napp.get('/', function(req, res){\n res.send('hello world');\n});\n\napp.get('/sayhello', function (req, res){... | javascript | edit | 0 | 2 | mit | 20ba3c4e8995318e1ef937cd57fd9c6304412998 | codehackdays/HelloWorld | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = function (arr) {\n\tvar arch = process.arch === 'x64' ? 'x64' : process.arch === 'arm' ? 'arm' : 'x86';\n\tvar platform = process.platform;\n\n\tif (!arr.length) {\n\t\treturn null;\n\t}\n\n\treturn arr... | javascript | edit | 0 | 9 | mit | 06347c6e939899854a98f0655df67e5d83ba378a | kevva/os-filter-obj | index.js | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.