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 gulp from 'gulp';\nimport {build} from './build';\nimport {test} from './test';\nimport {makeParser, fixParser} from './parse';\n\nconst allSrcGlob = [\n 'src/**/*.js',\n '!src/static/antlr4/parsers/**/*.js',\n 'test/**/*.js',... | javascript | edit | 0 | 1 | mit | 3b3d8b40a5b4dda16440a0262246aa6ff8da4332 | jlenoble/ecmascript-parser | gulp/watch.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Em from 'ember';\n\nfunction _getNormalisedRootUrl(router) {\n let rootURL = router.rootURL;\n if(rootURL.charAt(rootURL.length - 1) !== '/') {\n rootURL = rootURL + '/';\n }\n return rootURL;\n}\n\nexport default {\n nam... | javascript | edit | 0 | 7 | apache-2.0 | 37dc947297bb6b630e3442cd93451ab2a88a791b | intercom/ember-href-to,intercom/ember-href-to | app/instance-initializers/ember-href-to.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Syncer from '../syncer';\n\nexport function initialize(application) {\n application.register('syncer:main', Syncer);\n}\n\nexport default {\n name: 'syncer',\n before: 'store',\n initialize\n};\n\n```\n\nApply this change: Fi... | javascript | edit | 0 | 1 | mit | e78f92680c92e0dcde41875741ea707ad1031172 | Flexberry/ember-flexberry-offline,Flexberry/ember-flexberry-offline | addon/initializers/syncer.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar api = require('../config/api.json');\nvar appId = process.env.APPLICATION_ID;\nvar https = require('https');\nvar querystring = require('querystring');\n\nmodule.exports = function requestExports(config) {\n return request.bind(nul... | javascript | edit | 0 | 4 | isc | cac5bc79f106a67c56c00448a8b4408c0f31f6f3 | CodeMan99/wotblitz.js | lib/request.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * @class Denkmal_Component_MessageList_All\n * @extends Denkmal_Component_MessageList_Abstract\n */\nvar Denkmal_Component_MessageList_All = Denkmal_Component_MessageList_Abstract.extend({\n\n /** @type String */\n _class: 'Denk... | javascript | edit | 0 | 2 | mit | d9504ba850c26c779bceae62ea5c903c8f505126 | njam/denkmal.org,njam/denkmal.org,denkmal/denkmal.org,njam/denkmal.org,fvovan/denkmal.org,fvovan/denkmal.org,denkmal/denkmal.org,njam/denkmal.org,fvovan/denkmal.org,fvovan/denkmal.org,denkmal/denkmal.org,denkmal/denkmal.org,fvovan/denkmal.org,njam/denkmal.org,denkmal/denkmal.org | library/Denkmal/library/Denkmal/Component/MessageList/All.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar configuration = require('../../../config/configuration.json')\nvar utility = require('../../../public/method/utility')\n\nmodule.exports = {\n setCampaignSettingModel: function (redisClient, campaignHashID, payload, callback) {\n\n... | javascript | edit | 0 | 7 | mit | b1c0ed1868d8d1aabeb8d76f4fe8d6db10403516 | Flieral/Announcer-Service,Flieral/Announcer-Service | logic/setting/campaign/writeCampaignSettingModelLogic.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component, PropTypes } from 'react';\nimport { Button, ButtonGroup } from 'react-bootstrap';\n\nexport default class ActiveTags extends Component {\n removeTag(tag) {\n const { filterObject, position, setFilter } = t... | javascript | edit | 0 | 2 | mit | 8a199d43edacae40ea7c1f6395dc861f196a59ba | bgrsquared/places,bgrsquared/places,bgrsquared/places | app/GUI/Filter/activeTags.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nexport default Ember.Component.extend({\n classNames: ['error-messages'],\n didInsertElement: function () {\n this._super();\n Ember.run.next(function(){\n var errors = this.get('validationErro... | javascript | edit | 0 | 3 | mit | 979fc3418b738838ee7187a11cf28ac65371cfb6 | alexferreira/ember-cli-validations-errors | app/components/validations-errors.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = compressible\n\ncompressible.specs =\ncompressible.specifications = require('./specifications.json')\n\ncompressible.regex =\ncompressible.regexp = /json|text|javascript|dart|ecmascript|xml/\n\ncompressible.get = get\n\... | javascript | edit | 0 | 5 | mit | 26cd6df2d95a4d81968d01b06144d6aeddcf5863 | jshttp/compressible | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Bootstrap\n * Client entry point\n * @flow\n */\n\n// Polyfills\nimport 'babel/polyfill'\n\n// Modules\nimport React from 'react'\nimport ReactDOM from 'react-dom'\nimport { Router } from 'react-router'\nimport { createHistory }... | javascript | edit | 0 | 1 | apache-2.0 | 683737e2e6bc4689c26afdb573d8ca0b581fa5c6 | cesarandreu/bshed,cesarandreu/bshed | client/config/bootstrap.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport express from 'express';\nimport http from 'http';\nimport {renderFile} from 'ejs';\nimport request from 'superagent';\n\nvar app = express();\n\nvar FRIGG_API = process.env.FRIGG_API || 'https://ci.frigg.io';\n\napp.engine('html'... | javascript | edit | 0 | 2 | mit | 67aaa90ac0564920d8a65db7129a0e32804bdaea | frigg/frigg-hq-frontend,frigg/frigg-hq-frontend | index.js | rejected_duplicate | Near-duplicate of sample 81330 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, {PropTypes} from 'react'\nimport observeForPreview from './observeForPreview'\nimport shallowEquals from 'shallow-equals'\n\nexport default class PreviewMaterializer extends React.PureComponent {\n static propTypes = {\n ... | javascript | edit | 0 | 4 | mit | c39d828243e5e00b997c703e6ed41912ea7da6c5 | sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity | packages/@sanity/base/src/preview/PreviewMaterializer.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* globals self, bufferpm, chrome */\n// buffer-tpc-check.js\n// (c) 2013 Sunil Sadasivan\n// Check if third party cookies are disabled\n//\n\n;(function () {\n\n if (window !== window.top) return;\n\n ;(function check() {\n if(... | javascript | edit | 0 | 4 | mit | 8e7bfe3b0c136794de0be1802fdf9e8a90f7645d | bufferapp/buffer-extension-shared,bufferapp/buffer-extension-shared | embeds/buffer-tpc-check.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\n\nclass Response {\n constructor(messenger, msg) {\n this.messenger = messenger\n this.queue = msg.properties.replyTo\n this.corr = msg.properties.correlationId\n }\n\n send (msg) {\n if(this.queue){\n ... | javascript | edit | 0 | 2 | mit | 683ba6fcaf2072bfe7f7884b81bf04a3899c6d60 | domino-logic/domino-actor-service | Response.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nexport default Ember.Component.extend({\n});\n\n```\n\nApply this change: Add action for setting kontaktinfo by group id"
},
{
"role": "assistant",
"content": "import Ember from 'ember';\n\nexpo... | javascript | edit | 0 | 2 | mit | d01d51c6e3d8d7dcc7a72384277bee95db813474 | Turistforeningen/Hytteadmin,Turistforeningen/Hytteadmin | client/app/components/dnt-hytteadmin-editor-section-kontakt.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar DOCUMENTATION_OPTIONS = {\n URL_ROOT: '',\n VERSION: '0.1.10',\n LANGUAGE: 'None',\n COLLAPSE_INDEX: false,\n FILE_SUFFIX: '.html',\n HAS_SOURCE: true,\n SOURCELINK_SUFFIX: '.txt'\n};\n```\n\nApply this change: ... | javascript | edit | 0 | 0 | bsd-2-clause | c2765365104001dc4e2277c6a45c175cbb0750fe | scopatz/regolith-docs,scopatz/regolith-docs | _static/documentation_options.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport default {\n REQUEST_IDLE: 'REQUEST_IDLE',\n REQUEST_PENDING: 'REQUEST_PENDING',\n REQUEST_FAILED: 'REQUEST_FAILED',\n REQUEST_SUCCEEDED: 'REQUEST_SUCCEEDED',\n UPDATE_RESOURCES: 'UPDATE_RESOURCES',\n};\n\n```\n\nApply this c... | javascript | edit | 0 | 0 | mit | 9d576f6f805f5a6a72319fc1f690d9520abd215a | jmeas/resourceful-redux,jmeas/resourceful-redux | packages/redux-resource/src/action-types/action-types.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst template = ({env, format, esEdition}) => `${env}.${format}.${esEdition}.js`;\nconst formats = ['es', 'cjs'];\n\nmodule.exports = {\n template,\n formats,\n};\n\n```\n\nApply this change: Fix output filepath in non-ES2015 bundles... | javascript | edit | 0 | 1 | mit | 223b0dd3ba63184336d615150c945bb52941c17a | rtsao/create-universal-package,rtsao/create-universal-package | packages/create-universal-package/lib/config/build-shared.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar BatteryTemplateUpdater = (function () {\n 'use strict';\n\n var defaultPercentage = 20.0,\n batteryToggles = \".editable.profile\",\n batteries = [\n \"congestion_battery\",\n \"households_f... | javascript | edit | 0 | 2 | mit | a392baf961f197b8268ec0666b898f82d33b35fa | quintel/etmoses,quintel/etmoses,quintel/etmoses,quintel/etmoses,quintel/etmoses | app/assets/javascripts/les/profile_matrix_editor/template_updater/battery_template_updater.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nangular.module('app').factory('applicationService', ['$http', 'MARLINAPI_CONFIG',\n function($http, MARLINAPI_CONFIG) {\n\n var url = MARLINAPI_CONFIG.base_url;\n\n // create and expose service methods\n var expo... | javascript | edit | 0 | 1 | mit | cbb2235784307d250b6320ab8bb262da3c2fb686 | brettshollenberger/mrl001,brettshollenberger/mrl001 | client/app/scripts/services/application.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar React = require('react');\nvar Parse = require('parse');\nvar ParseReact = require('parse-react');\n\nvar RecipeList = new React.createClass({\n\tmixins: [ParseReact.Mixin],\n\t\n\tobserve: function() {\n\t\treturn {\n\t\t\trecipes:... | javascript | edit | 0 | 4 | mit | 4758be5962095ad86055cd0083fa9f8961f11fb7 | bspride/ModernCookbook,bspride/ModernCookbook,bspride/ModernCookbook | app/components/RecipeList.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar mongoose = require('mongoose');\n\nconst WAITING_FOR_PRINT = 'WAITING_FOR_PRINT';\nconst PRINTED_WAITING_FOR_SEND = 'PRINTED_WAITING_FOR_SEND';\nconst SENT = 'SENT';\n\nvar statusKeys = [\n WAITING_FOR_PRINT,\n ... | javascript | edit | 0 | 0 | mit | 4709f623b41dffe1ad227908e3f92782987bbfa9 | denisnarush/postcard,denisnarush/postcard | server/models/card/card.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar fs = require('fs');\nvar p = require('path');\nvar slug = require('slug');\nvar url = require('url');\nvar util = require('util');\n\nslug.defaults.mode ='rfc3986';\n\nvar env = process.env['FEEDPAPER_ENV'];\nvar feedsCategori... | javascript | edit | 0 | 1 | mit | a99f9dd83e0a15dfd923ab0ae873f84755f99b0e | cliffano/feedpaper,cliffano/feedpaper,cliffano/feedpaper | feedpaper-web/params.js | rejected_duplicate | Near-duplicate of sample 70017 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Window from './window'\nimport {ipcMain} from 'electron'\nimport resolveRoot from '../resolve-root'\nimport hotPath from '../hot-path'\nimport flags from '../shared/util/feature-flags'\nimport {globalResizing} from '../shared/sty... | javascript | edit | 0 | 1 | bsd-3-clause | 157db3722cc41586c41c115227be619ea62a0788 | keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client | desktop/app/main-window.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// DOM Ready\n$(function() {\n\n\t// SVG fallback\n\t// toddmotto.com/mastering-svg-use-for-a-retina-web-fallbacks-with-png-script#update\n\tif (!Modernizr.svg) {\n\t\tvar imgs = document.getElementsByTagName('img');\n\t\tfor (var i = 0... | javascript | edit | 0 | 4 | mit | c35681ea6b8a6e0a0d1c3e6f9b86f161767a1d41 | parkermaughan/meetthemaughans,solutionio/html5blank,johngibbons/creativebasis,martinleopold/prcs-website,sqmunson/xpat,Acrata/voilarts,Montana-Studio/Mediakit,LA1CH3/QuillXrpm,GuiHarrison/siteArtOuro,Acrata/voilarts,Hemisphere-Project/html5blank,dydx/html5blank,solutionio/html5blank,grischka/html5blank,jeromelachaud/S2... | js/scripts.js | rejected_duplicate | Near-duplicate of sample 93878 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst http = require(\"http\")\nconst url = require(\"url\")\nconst namor = require(\"namor\")\n\nconst server = http.createServer((req, res) => {\n\tconst { query } = url.parse(req.url, true)\n\n\tconst payload = JSON.stringify(\n\t\t{... | javascript | edit | 0 | 1 | mit | 17beb5e36f014b3cab661981b00ad65fc2ed988d | jsonmaur/namor,jsonmaur/namor | example/index.js | rejected_duplicate | Near-duplicate of sample 70558 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport {connect} from 'react-redux';\nimport Console from '../components/Console';\nimport {\n getCurrentCompiledProjectKey,\n getConsoleHistory,\n getCurrentProjectKey,\n getHiddenUIComponents,\n getRequestedFocusedLine,\n isCurr... | javascript | edit | 0 | 1 | mit | a774ca427a200270c770dd278d55119cb31de65c | outoftime/learnpad,outoftime/learnpad,jwang1919/popcode,jwang1919/popcode,popcodeorg/popcode,jwang1919/popcode,popcodeorg/popcode,jwang1919/popcode,popcodeorg/popcode,popcodeorg/popcode | src/containers/Console.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n presets: [\"es2015-node4\", \"stage-0\", \"react\"],\n plugins: [\n \"add-module-exports\",\n [\"transform-async-to-module-method\", {\n module: \"bluebird\",\n method: \"coroutine\"\n }]\n ],\... | javascript | edit | 0 | 0 | mit | 68fd319b09b021742ad309255d6a444a655a6fee | PHELiOX/poi,poooi/poi,syncsyncsynchalt/poi,yudachi/poi,syncsyncsynchalt/poi,KagamiChan/poi,poooi/poi,poooi/poi,poooi/poi,gnattu/poi,syncsyncsynchalt/poi,syncsyncsynchalt/poi,yudachi/poi,yudachi/poi,gnattu/poi,PHELiOX/poi,KagamiChan/poi,nagatoyk/poi,nagatoyk/poi | babel.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport inputData from './data.js';\nimport infiniteDivs from '../../lib/infinitedivs.js';\n\nlet rootElement = document.body;\n\nfunction divGenerator(item) {\n let div = document.createElement('div'),\n img = document.createElement... | javascript | edit | 0 | 1 | mit | 98216fdd8b2cbd8d62b2c04884939923e5719437 | supreetpal/infinite-divs,supreetpal/infinite-divs | examples/src/controller.js | rejected_duplicate | Near-duplicate of sample 79077 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\n// src/ui.js\n\nlet ui = {\n renderPosts(posts) {\n console.log(posts);\n }\n};\n\nexport { ui };\n\n```\n\nApply this change: Add articleTemplate method. Edit renderPosts"
},
{
"role": "assistant",
"... | javascript | edit | 0 | 1 | mit | 86b3ad30b978d227bd3b596d176c8d11b2a1995d | var-bin/reactjs-training,var-bin/reactjs-training,var-bin/reactjs-training | forum-web-app/src/ui.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Events.\n *\n * @mixin\n * @namespace Bolt.events\n *\n * @param {Object} bolt - The Bolt module.\n */\n(function (bolt) {\n 'use strict';\n\n /*\n * Bolt.events mixin container.\n *\n * @private\n * @type ... | javascript | edit | 0 | 1 | mit | cf0cb38ea897541e667193ca2699ecf5e3caaacc | GawainLynch/bolt,nikgo/bolt,rarila/bolt,CarsonF/bolt,lenvanessen/bolt,romulo1984/bolt,electrolinux/bolt,Intendit/bolt,bolt/bolt,rarila/bolt,lenvanessen/bolt,electrolinux/bolt,Raistlfiren/bolt,GawainLynch/bolt,romulo1984/bolt,Raistlfiren/bolt,GawainLynch/bolt,lenvanessen/bolt,Raistlfiren/bolt,HonzaMikula/masivnipostele,... | app/src/js/modules/events.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use babel';\n\nimport filesizeView from '../lib/filesize-view';\n\ndescribe('View', () => {\n // Disable tooltip, only enable on tests when needed\n atom.config.set('filesize.EnablePopupAppearance', false);\n\n const workspaceView =... | javascript | edit | 0 | 1 | mit | a1b0d42fa832c518466d4a9502dd1543ac155bfd | mkautzmann/atom-filesize | spec/filesize-view-spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\n/**\n * Small wrapper around node-pool. Establishes a pool of 5 mapnik map objects\n * per mapfile.\n * @TODO: Make pool size configurable.\n */\nmodule.exports = new function() {\n return {\n pools: {},\n acquire: fu... | javascript | edit | 0 | 4 | bsd-3-clause | 30a6393c9ea13501afbaae3cd349310645ce7c4a | topwood/tilelive,mapbox/tilelive,Norkart/tilelive.js,tomhughes/tilelive.js,kyroskoh/tilelive,paulovieira/tilelive,mapbox/tilelive.js,nyurik/tilelive.js,gravitystorm/tilelive.js | lib/tilelive/mappool.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use babel';\n\nimport filesizeView from '../lib/filesize-view';\n\ndescribe('View', () => {\n // Disable tooltip for these tests\n atom.config.set('filesize.EnablePopupAppearance', false);\n const workspaceView = atom.views.getView(... | javascript | edit | 0 | 1 | mit | 7d84aa5b1d0c2af75abf70e556470cb67b79b19a | mkautzmann/atom-filesize | spec/filesize-view-spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*global cardApp*/\n/*jslint unparam: true */\n(function () {\n\n 'use strict';\n\n // Implements custom validation for card number.\n var INTEGER_REGEXP = /^([aAkKjJQq23456789]{1}|(10){1})$/;\n cardApp.directive('integer', ... | javascript | edit | 0 | 2 | unlicense | 05b14b3f817f0cffb06ade8f1ff82bfff177c6bd | bigfont/DevTeach2013,bigfont/DevTeach2013 | starting-angular/starting-angular/cards/cards_usesStaticJSON_cleanestVersion/js/directives.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Util = require('util');\nvar Packet = require('../packet');\nvar capture = require('../capture');\n\nmodule.exports = function(options) {\n var self = this; // ZongJi instance\n var Sequence = capture(self.connection).Sequence;\n ... | javascript | edit | 0 | 3 | mit | 19a0c4401e5185b71d5ca715d54d13c31cab7559 | jmealo/zongji,jmealo/zongji | lib/sequence/binlog.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nlet GlobalEvents = () => {\n let events = {};\n\n return {\n off: (eventHandle) => {\n let index = events[eventHandle.eventName].findIndex((singleEventHandler) => {\n return singleEventHandler.id !... | javascript | edit | 0 | 2 | apache-2.0 | 85168befaaab2563b91345867087d51789a88dff | zbicin/word-game,zbicin/word-game | client/app/common/global-events/global-events.factory.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports.point = justType('Point', 'POINT');\nmodule.exports.line = justType('LineString', 'POLYLINE');\nmodule.exports.polygon = justType('Polygon', 'POLYGON');\n\nfunction justType(type, TYPE) {\n return function(gj) {\n ... | javascript | edit | 0 | 4 | bsd-3-clause | 447241fc88b42a03b9091da7066e7e58a414e3a2 | mapbox/shp-write,mapbox/shp-write | src/geojson.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar semver = require('semver');\nvar createError = require('./createError');\n\nfunction decompose(endpoint) {\n var regExp = /^(?:([\\w\\-]|(?:[\\w\\.\\-]+[\\w\\-])?)\\|)?([^\\|#]+)(?:#(.*))?$/;\n var matches = endpoint.match(reg... | javascript | edit | 0 | 8 | mit | d62ccfd234f702b66124a673e54076dbdfe693be | dreamauya/bower,jisaacks/bower,Blackbaud-EricSlater/bower,DrRataplan/bower,rlugojr/bower,grigorkh/bower,omurbilgili/bower,yinhe007/bower,XCage15/bower,gronke/bower,amilaonbitlab/bower,jodytate/bower,Teino1978-Corp/bower,prometheansacrifice/bower,adriaanthomas/bower,unilynx/bower,watilde/bower,rajzshkr/bower,jvkops/bowe... | lib/util/endpointParser.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* jshint camelcase:false */\n\nPolymer('nn-annotable', {\n ready: function(){\n this.baseapi = this.baseapi || window.location.origin;\n this.tokens = this.baseapi.split('://');\n this.wsurl = this.tokens.shift() === 'https' ... | javascript | edit | 0 | 4 | mit | efd680a34c23ec2727a3033e37517e309ba29a0c | sandropaganotti/annotate | client/webcomponents/nn-annotable.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n Keep track of\n*/\n\nimport Backbone from \"backbone\"\nimport _ from \"underscore\"\n\nexport default class DynamicCodeRegistry {\n constructor(){\n _.extend(this, Backbone.Events)\n this._content = {};\n ... | javascript | edit | 0 | 2 | mit | 2eeb2979a6d7dc1ce5f5559f7437b90b2246c72f | mattzeunert/FromJS,mattzeunert/FromJS,mattzeunert/FromJS,mattzeunert/FromJS | src/DynamicCodeRegistry.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction Metronome(tempo, beatsPerMeasure){\n this.tempo = Number(tempo);\n this.beatsPerMeasure = Number(beatsPerMeasure);\n this.interval = null;\n}\n\nMetronome.prototype.start = function(){\n var millisecondsToWait = this.tempoT... | javascript | edit | 0 | 2 | mit | 0b7ec05717cf6c89e9cbe307bec611326c19ae43 | dmilburn/beatrice,dmilburn/beatrice | js/metronome.js | rejected_duplicate | Near-duplicate of sample 89060 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * MIT LICENCE\n */\n\nvar util = require('util'),\n winston = require('winston'),\n SysLogger = require(\"ain2\");\n\nvar ain;\n\nvar SyslogAin2 = exports.SyslogAin2 = function (options) {\n winston.Transport.call(this, opti... | javascript | edit | 0 | 2 | mit | ab53bc3e982b21a24fa7a0b36d43d98213ffbb7c | lamtha/winston-syslog-ain2 | lib/winston-syslog-ain2.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar _ = require('lodash-node');\n\nvar Action = function(name, two, three, four) {\n var options, run, helpers;\n\n // Syntax .extend('action#method', function() { ... }, {})\n if ( typeof two == 'function' ) {\n options = {};\n ... | javascript | edit | 0 | 3 | mit | ec7c6848b01a3e6288b3d5326ca9df677052f7da | alexparker/actionpack | lib/action.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nenyo.depends(\n\t\"Selection.js\",\n\t\"FlyweightRepeater.js\",\n\t\"List.css\",\n\t\"List.js\",\n\t\"PulldownList.css\",\n\t\"PulldownList.js\"\n);\n```\n\nApply this change: Remove enyo.Selection from layout library, moved into enyo b... | javascript | edit | 0 | 0 | apache-2.0 | cd0341613c11d07d2c9990adb12635f4e7809dfc | enyojs/layout | list/source/package.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nPrism.languages.docker = {\n\t'keyword': {\n\t\tpattern: /(^\\s*)(?:ONBUILD|FROM|MAINTAINER|RUN|EXPOSE|ENV|ADD|COPY|VOLUME|USER|WORKDIR|CMD|LABEL|ENTRYPOINT)(?=\\s)/mi,\n\t\tlookbehind: true\n\t},\n\t'string': /(\"|')(?:(?!\\1)[^\\\\\\r... | javascript | edit | 0 | 0 | mit | f0d73e072691c7ae4ee848c7ef0868aebd6c8ce4 | PrismJS/prism,mAAdhaTTah/prism,PrismJS/prism,CupOfTea696/prism,mAAdhaTTah/prism,PrismJS/prism,byverdu/prism,PrismJS/prism,byverdu/prism,CupOfTea696/prism,mAAdhaTTah/prism,mAAdhaTTah/prism,mAAdhaTTah/prism,PrismJS/prism,CupOfTea696/prism,byverdu/prism,byverdu/prism,CupOfTea696/prism,CupOfTea696/prism,byverdu/prism | components/prism-docker.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 | 4f2ecb38e7eed9706dd4709915a532bdb5a943f2 | jarifibrahim/climate,apache/climate,Omkar20895/climate,huikyole/climate,MJJoyce/climate,lewismc/climate,MJJoyce/climate,jarifibrahim/climate,kwhitehall/climate,pwcberry/climate,riverma/climate,MJJoyce/climate,agoodm/climate,riverma/climate,agoodm/climate,MBoustani/climate,MBoustani/climate,riverma/climate,lewismc/clima... | rcmet/src/main/ui/test/unit/services/RegionSelectParamsTest.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ngoog.provide('ol.style.Fill');\n\ngoog.require('ol.color');\n\n\n\n/**\n * @constructor\n * @param {olx.style.FillOptions} options Options.\n */\nol.style.Fill = function(options) {\n\n /**\n * @type {ol.Color|string}\n */\n this.... | javascript | edit | 0 | 3 | bsd-2-clause | 465e33e170a10ad39c3948cb9bcb852bd5705f91 | das-peter/ol3,adube/ol3,mzur/ol3,xiaoqqchen/ol3,Distem/ol3,gingerik/ol3,antonio83moura/ol3,gingerik/ol3,itayod/ol3,bjornharrtell/ol3,tsauerwein/ol3,Antreasgr/ol3,klokantech/ol3raster,pmlrsg/ol3,das-peter/ol3,landonb/ol3,t27/ol3,kkuunnddaannkk/ol3,freylis/ol3,fredj/ol3,Andrey-Pavlov/ol3,kjelderg/ol3,geonux/ol3,elemoine/... | src/ol/style/fillstyle.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport lost from 'lost'\nimport postcssUrl from 'postcss-url'\nimport postcssImport from 'postcss-import'\nimport postcssCssnext from 'postcss-cssnext'\nimport resolveStyleImport from '../util/resolveStyleImport'\n\nexport default optio... | javascript | edit | 0 | 2 | mit | f5d144abff50c9044cbfeeec16c8169a361aec1c | sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity | packages/@sanity/server/src/configs/postcssPlugins.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * @module ol/geom\n */\n\nexport {default as Circle} from './geom/Circle.js';\nexport {default as Geometry} from './geom/Geometry.js';\nexport {default as GeometryCollection} from './geom/GeometryCollection';\nexport {default as L... | javascript | edit | 0 | 0 | bsd-2-clause | c6db2d07bbda721d18ebce6c3526ec393b61e5b2 | adube/ol3,tschaub/ol3,stweil/openlayers,bjornharrtell/ol3,tschaub/ol3,tschaub/ol3,openlayers/openlayers,stweil/openlayers,stweil/ol3,bjornharrtell/ol3,geekdenz/openlayers,geekdenz/openlayers,geekdenz/ol3,oterral/ol3,oterral/ol3,ahocevar/ol3,geekdenz/ol3,ahocevar/openlayers,geekdenz/ol3,adube/ol3,geekdenz/ol3,bjornharrt... | src/ol/geom.js | rejected_duplicate | Near-duplicate of sample 91083 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint-env mocha */\nconst HeapSort = require('../../../src').algorithms.Sorting.HeapSort;\nconst assert = require('assert');\n\ndescribe('HeapSort', () => {\n it('should have no data when empty initialization', () => {\n const i... | javascript | edit | 0 | 1 | mit | 27982b6392b8dcd2adc22fb0db7eb0aecab0f62a | ManrajGrover/algorithms-js | test/algorithms/sorting/testHeapSort.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nrequire(\"@babel/register\")({\n only: [\n \"src\",\n /node_modules\\/alekhine/\n ]\n})\n\nmodule.exports = {\n presets: [\n \"@babel/preset-env\"\n ],\n\n plugins: [\n \"@babel/plugin-transform-runtime\",\n \"@babel... | javascript | edit | 0 | 0 | mit | 030b97c50a57e1487b8459f91ee4a220810a8a63 | sonnym/bughouse,sonnym/bughouse | babel.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nwindow.cookieconsent.initialise({\n container: document.getElementById(\"cookie_consent\"),\n position: \"top\",\n type: \"opt-in\",\n static: false,\n theme: \"suomifi\",\n onInitialise: function (status){\n le... | javascript | edit | 0 | 5 | mit | 6a408d16822f596bedeb524912471845ced74048 | vrk-kpa/api-catalog,vrk-kpa/api-catalog,vrk-kpa/api-catalog,vrk-kpa/api-catalog | ckanext/ckanext-apicatalog_ui/ckanext/apicatalog_ui/fanstatic/cookieconsent/ckan-cookieconsent.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { connect } from 'react-redux'\nimport PlaybackCtrl from './PlaybackCtrl'\nimport { requestPlay, requestPause, requestVolume, requestPlayNext } from 'store/modules/status'\n\n// Object of action creators (can also be function th... | javascript | edit | 0 | 1 | isc | b9ed588780e616228d133b91117b80930d658140 | bhj/karaoke-forever,bhj/karaoke-forever | src/components/PlaybackCtrl/PlaybackCtrlContainer.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport {firebaseApp,firebaseAuth,firebaseDb, firebaseStorage, firebaseAuthInstance } from '../components/Firebase.js'\nimport { browserHistory } from 'react-router';\n\nexport function goToNextState() {\n\treturn function(dispatch) {\n\... | javascript | edit | 0 | 1 | mit | 771e7c0d485a6a0e45d550d555beb500e256ebde | jeremykid/FunAlgorithm,jeremykid/FunAlgorithm,jeremykid/FunAlgorithm,jeremykid/FunAlgorithm | react/react-practice/src/actions/lifeCycleActions.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// @flow\nimport React from 'react'\nimport 'normalize.css/normalize.css'\nimport Footer from 'components/Footer/Footer'\nimport Nav from '../Nav/Nav'\nimport MobileFooterToolbar from '../Nav/MobileFooterToolbar/MobileFooterToolbar'\nim... | javascript | edit | null | null | mit | d0d13e5feea4aa2c3d7f35be31dcbd0299f9a4d3 | ncrmro/reango,ncrmro/ango,ncrmro/reango,ncrmro/ango,ncrmro/ango,ncrmro/reango | client/components/App/App.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst path = require('path');\n\nconst buildNavigation = function(styleguideArray) {\n let options = this;\n\n options.navigation = {};\n\n styleguideArray.forEach((obj) => {\n let fileName = (obj.writeName || obj... | javascript | edit | 0 | 1 | mit | 66b91190f513893efbe7eef9beba1925e32a44d5 | tbremer/live-guide,tbremer/live-guide | lib/build-navigation/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n'use strict'\nprocess.title = 'ucompiler'\n\nrequire('debug').enable('UCompiler:*')\nconst UCompiler = require('..')\nconst knownCommands = ['go', 'watch']\nconst parameters = process.argv.slice(2)\n\nif (!parameter... | javascript | edit | 0 | 1 | mit | de7a0b64dcd24892e0333f9e77f56ca6117cae5a | steelbrain/UCompiler | cli/main.js | rejected_duplicate | Near-duplicate of sample 104812 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst bcrypt = require('bcrypt');\nconst GitHub = require('github-api');\nconst crypto = require('crypto');\n\nconst { User } = require('../models');\nconst { email } = require('../utils');\n\nconst GITHUB_API_TOKEN = process.env.GITHUB... | javascript | edit | 0 | 3 | mit | 3ba06c96a3181c46b2c52a1849bfc284f05e9596 | osumb/challenges,osumb/challenges,osumb/challenges,osumb/challenges | experiments/GitHubGistUserCreator.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = class Call {\n constructor(callee, args) {\n this.callee = callee;\n this.args = args;\n }\n\n analyze(context) {\n this.callee.analyze(context);\n context.assertIsFunction(this.callee.referent);\n thi... | javascript | edit | 0 | 7 | mit | 3c84d34e41b14f43b8229fadbce86312ac19f964 | rtoal/plainscript | ast/call.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport axios from \"axios\";\n\nexport const getGalaxyClientAuthentication = clientId =>\n axios\n .get(\n `${window.TL.BASE_URL}ajax/galaxy-export/authorized?clientId=${clientId}`\n )\n .then(({ data }) => data);\n\nexpo... | javascript | edit | 0 | 2 | apache-2.0 | fb0993fb10b597884fb37f819743bce9d63accb0 | phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida | src/main/webapp/resources/js/apis/galaxy/galaxy.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine([], function () {\n 'use strict';\n\n var ComponentGraphic = function (options) {\n this.color = options.color || \"#dc322f\";\n };\n\n ComponentGraphic.prototype.paint = function paint(gc) {\n gc.fillStyle = this.color... | javascript | edit | 0 | 3 | mit | 30a3ce599413db184f2ccc19ec362ea8d88f60e6 | floriico/onyx,floriico/onyx | js/component-graphic.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function(grunt) {\n\n // Project configuration.\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n \"download-electron\": {\n version: \"1.8.8\",\n outputDir: \"... | javascript | edit | 0 | 1 | mit | b24727fabb21448e8771e072f8be6ec2716e52ad | LightTable/LightTable,LightTable/LightTable,LightTable/LightTable | deploy/electron/Gruntfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport resolveNode from \"../helpers/resolveNode\";\nimport match from \"../helpers/matchRedirect\";\nimport {relative, dirname} from \"path\";\n\nexport default function (t, originalPath, {opts: {root, extensions}, file: {opts: {filena... | javascript | edit | 0 | 7 | mit | 6c8ce552cf95452c35a9e5d4a322960bfdf94572 | Velenir/babel-plugin-import-redirect | src/helpers/replacePath.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// jquery.observe_field.js\n\n\n(function( $ ){\n\n jQuery.fn.observe_field = function(frequency, callback) {\n\n frequency = frequency * 1000; // translate to milliseconds\n\n return this.each(function(){\n var $this = $(th... | javascript | edit | 0 | 4 | mit | 1d59470c25001556346e252ca344fa7f4d26c453 | splendeo/jquery.observe_field,splendeo/jquery.observe_field | jquery.observe_field.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst webpack = require('webpack');\n\nconst ExtractTextPlugin = require(\"extract-text-webpack-plugin\");\n\nconst path = require('path');\n\n// Extract CSS into a separate file\nconst extractSass = new ExtractTextPlugin({\n filename:... | javascript | edit | 0 | 0 | bsd-2-clause | 69d2d2a7450b91b3533a18ad2c51e009dd3c58f7 | rub/alessiorapini.me,rub/alessiorapini.me | frontend/webpack.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar env = process.env.NODE_ENV || 'development';\n\nvar defaults = {\n \"static\": {\n port: 3003\n },\n \"socket\": {\n options: {\n origins: '*:*',\n log: true,\n heartbeats: false,\n authorization: false,... | javascript | edit | 0 | 0 | mit | ac0c31a94428c1180ef7b309c79410bfc28ccdf0 | maritz/nohm-admin,maritz/nohm-admin | config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function(){\n \n \"use strict\";\n \n var d = document, inits = [];\n window.initializers = inits;\n \n // initializer to manipulate all hyperlinks\n inits.push(function(){\n var x, h = location.host;\n for (var xs = d.li... | javascript | edit | 0 | 6 | mit | edd29b9bcb894ed1fd6511f2e748a87a14d792f3 | tommy-carlier/www.tcx.be,tommy-carlier/www.tcx.be,tommy-carlier/www.tcx.be | assets/site.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n Copyright 2019 Google LLC\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 copy of the License at\n\n https://www.a... | javascript | edit | 0 | 4 | apache-2.0 | fd360a1315640847c249b3422790ce0bbd57d0d9 | apigee/apigeelint,apigeecs/bundle-linter | lib/package/plugins/checkConditionTruth.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar gut = require('../');\n\nif (process.argv.length > 2 && process.argv[2] === 'status') {\n console.log(\"\\n\\tGut status: %s\", gut.getStatus());\n}\n\nconsole.log('\\nI think you meant \"git\"');\n\n```\n\nApply this change: Add... | javascript | edit | 0 | 0 | mit | 110e1871555cece764e2dcbfdf3ab7c14c7c164e | itsananderson/gut-status | bin/gut-cli.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport defaults from 'defaults'\n\nconst API_GLOBAL = '_IMDIKATOR'\n\nconst env = process.env.NODE_ENV || 'development'\n\nconst DEFAULTS = {\n port: 3000,\n reduxDevTools: false\n}\n\nconst globalConfig = (typeof window !== 'undefine... | javascript | edit | 0 | 0 | mit | d1293e868ed3d7187423a56717f406e052da41a2 | bengler/imdikator,bengler/imdikator | config/index.js | rejected_duplicate | Near-duplicate of sample 70484 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\npw.component.register('content-editor-plaintext', function (view, config) {\n var self = this;\n\n var mock = document.createElement('DIV');\n mock.classList.add('console-content-plaintext-mock')\n mock.style.position = 'absolute';\... | javascript | edit | 0 | 3 | mit | 7a3062a02c2e676704ecad75def38d322c45a5d0 | metabahn/console,metabahn/console,metabahn/console | lib/resources/console/scripts/content-editor/plaintext.js | rejected_duplicate | Near-duplicate of sample 85978 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst url = require('url');\n\nconst config = {\n builders: {\n web: {\n entry: './src/index.tsx',\n stack: ['web'],\n openBrowser: true,\n dllExcludes: ['bootstrap'],\n defines: {\n __CLIENT__: true\... | javascript | edit | 0 | 0 | mit | 93bc928f2f19bba92ce178325f396c863f34c566 | sysgears/apollo-universal-starter-kit,sysgears/apollo-universal-starter-kit,sysgears/apollo-universal-starter-kit,sysgears/apollo-fullstack-starter-kit,sysgears/apollo-universal-starter-kit | packages/client/.spinrc.js | accepted | null | true |
[
{
"role": "user",
"content": "Write javascript code for the following: Fix releaf ckeditor assets copying"
},
{
"role": "assistant",
"content": "//= link_tree ../images\n//= link_tree ../javascripts/ckeditor\n//= link releaf/application.css\n//= link releaf/application.js\n"
}
] | javascript | new_file | 0 | 0 | mit | c025d9457aa000d0f23252e07ce6f2e2c3c5d971 | cubesystems/releaf,cubesystems/releaf,cubesystems/releaf | releaf-core/app/assets/config/releaf_core_manifest.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst Handlebars = require('handlebars');\n\nconst templates = {\n active: Handlebars.compile('<li class=\"active\">{{{content}}}</li>'),\n unactive: Handlebars.compile('<li><a href=\"{{link}}\">{{{content}}}</a></li>')\n};\n\nmod... | javascript | edit | 0 | 3 | mit | d94120cf7da438722c1bb60dfaa81ada4e48e724 | NealRame/CV,NealRame/Blog,NealRame/Blog,NealRame/Blog,NealRame/CV | src/helpers/menu_entry.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// see http://vuejs-templates.github.io/webpack for documentation.\nvar path = require('path')\n\nmodule.exports = {\n build: {\n env: require('./prod.env'),\n index: path.resolve(__dirname, '../dist/index.html'),\n assetsRoot... | javascript | edit | 0 | 0 | mit | 7e580f82edfbe1b3ba4e6e7a365c216b2b81cb91 | adrielpdeguzman/vuelma,adrielpdeguzman/vuelma,vuelma/vuelma,vuelma/vuelma | config/index.js | rejected_duplicate | Near-duplicate of sample 70059 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// It seems that not much documentation exists for the JQuery\n// mini-Web-app that is the Wordpress admin menu editor. However,\n// insofar as Polylang's business in that mini-Web-app is similar\n// to ours, studying the js/nav-menu.js... | javascript | edit | 0 | 3 | mit | 92e49cc8f143767b8052140d1e124cd68743e46d | epfl-idevelop/jahia2wp,epfl-idevelop/jahia2wp,epfl-idevelop/jahia2wp,epfl-idevelop/jahia2wp | data/wp/wp-content/plugins/epfl/menus/epfl-menus-admin.js | rejected_duplicate | Near-duplicate of sample 68102 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine(['itemObjectModel', 'mac/roman'], function(itemOM, macRoman) {\n\n 'use strict';\n \n function open(item) {\n function onBlock(item, byteSource) {\n return byteSource.slice(0, 12).getBytes().then(function(headerBytes) ... | javascript | edit | 0 | 3 | mit | a6d0373ea7ca897721d691089567af8e13bab61b | radishengine/drowsy,radishengine/drowsy | mac/filetypes/open_STAK.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\nexport default class NewEventCtrl {\n\n /*@ngInject*/\n constructor($scope) {\n $scope.event = {info:{}};\n $scope.stage = {\n select: true,\n create: false,\n assign: false,\n done: false\n ... | javascript | edit | 0 | 2 | mit | bc09b643a4763de17f5d6db6b926174667825ad2 | rcos/venue,rcos/venue,rcos/venue,rcos/venue | client/app/instructor/newevent/newevent.controller.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar ConsecutiveString = function(){};\n\n/*validate k and length of the array. If the array length is 0 of less than k of k is less thatn or equal to 0\nreturn an empty string.\nif k is 1, then return the longest string.\nelse, loop thr... | javascript | edit | null | null | mit | f28118fe786bf4fea5b899ff27e185df532e884d | BrianLusina/JS-Snippets | StringManipulation/ConsecutiveString/consecutivestring.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function( $ ) {\n $.fn.activeNavigation = function(selector) {\n var pathname = window.location.pathname\n var hrefs = []\n $(selector).find(\"a\").each(function(){\n if (pathname.indexOf($(this).attr... | javascript | edit | 0 | 2 | mit | 87eebeaee3d2930e29f8b9aa7e3784f7f519f444 | Vitaa/ActiveNavigation,Vitaa/ActiveNavigation | jquery.activeNavigation.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar {Worker} = require(\"ringo/worker\")\nvar {Semaphore} = require(\"ringo/concurrent\")\nvar {setInterval, clearInterval} = require(\"ringo/scheduler\");\n\nfunction main() {\n // Create a new workers from this same module. Note th... | javascript | edit | 0 | 2 | apache-2.0 | 26d0c3815f5bdcc23b25709167c1bcf96a8d14c2 | Transcordia/ringojs,ringo/ringojs,ringo/ringojs,oberhamsi/ringojs,Transcordia/ringojs,ringo/ringojs,oberhamsi/ringojs,ashwinrayaprolu1984/ringojs,Transcordia/ringojs,Transcordia/ringojs,oberhamsi/ringojs,ashwinrayaprolu1984/ringojs,ringo/ringojs,ashwinrayaprolu1984/ringojs,ashwinrayaprolu1984/ringojs | examples/worker-semaphore.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine((require) => {\n\n describe('requester_module', () => {\n beforeEach(() => {\n require('app/views/teacher/modules/assistance_request_list_module');\n });\n\n define('>RetrieveAssistanceRequests'... | javascript | edit | 0 | 1 | mit | 9bc7cfc00b0a0b96245af835995b39e8493f0a01 | samg2014/VirtualHand,samg2014/VirtualHand | test_frontend/app/views/teacher/modules/assistance_request_list_module_spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine([\n 'underscore',\n 'backbone'\n], function(_, Backbone) {\n var TaskView = Backbone.View.extend({\n tagName: 'li',\n className: 'task',\n events: {\n \"dragstart\" : \"on_dragstart\",\n \"dragover\" : \"on... | javascript | edit | 0 | 1 | mit | 1b77aa7ecddf446637e1bfd14bd92d8d588dcb6d | lorenzoplanas/tasks,lorenzoplanas/tasks | app/gui/task_view.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { Meteor } from 'meteor/meteor';\nimport { $ } from 'meteor/jquery';\n\n/* global cloudinary */\n\n/**\n * Opens the Cloudinary Upload widget and sets the value of the input field with name equal to nameAttribute to the\n * resul... | javascript | edit | 0 | 2 | apache-2.0 | 68a5a2ce778484bf94518ad3e1a2a895c76d25f4 | radgrad/radgrad,radgrad/radgrad,radgrad/radgrad | app/imports/ui/components/form-fields/open-cloudinary-widget.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// TODO: should the baseScore be stored, and updated at vote time?\n\n// This interface should change and become more OO, this'll do for now\nvar Scoring = {\n // re-run the scoring algorithm on a single object\n updateObject: functio... | javascript | edit | 0 | 2 | mit | ed4082d98d9cfeaeb4845bb21bf03fbdb76bee9b | vlipco/startupcol-telescope,vlipco/startupcol-telescope | server/vote.js | rejected_duplicate | Near-duplicate of sample 100390 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport express from 'express';\nimport bodyParser from 'body-parser';\n\nimport AppCache from 'parse-server/lib/cache';\n\nimport ParseCliController from './ParseCliController';\nimport ParseCliRouter from './ParseCliRouter';\nimport Ve... | javascript | edit | 0 | 4 | mit | 1fa073552fd0c806aae62e6b317199e46aabd085 | back4app/parse-cli-server,luisholanda/parse-cli-server | src/ParseCliServer.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function (body) {\n return `\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n <title>Minor WOT</title>\n <link rel=\"stylesheet\" href=\"/style.css\" /... | javascript | edit | 0 | 1 | mit | 4a68f3869ab9af0c3b51bff223c36d49b58e5df3 | rijkvanzanten/luaus | app/views/wrapper.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport './base.css';\nimport './application.css';\nimport 'suitcss-base';\nimport 'suitcss-utils-text';\nimport 'suitcss-components-arrange';\nimport React from 'react';\n\nmodule.exports = React.createClass({\n contextTypes: {\n ro... | javascript | edit | 0 | 1 | mit | d2d1d18134787a398511c60dccec4ee89f636edc | nathanboktae/cherrytree,QubitProducts/cherrytree,QubitProducts/cherrytree,nathanboktae/cherrytree | examples/cherry-pick/app/screens/application/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport { Panel } from 'react-bootstrap'\nimport MarkdownBlock from '../shared/MarkdownBlock'\nimport { getCreator, getContent } from '../shared/requestUtils'\n\nconst Issue = props => {\n return (\n <Panel... | javascript | edit | 0 | 2 | mit | edede8b53d19f628c566edf52d426b81d69af306 | clembou/github-requests,clembou/github-requests,clembou/github-requests | client/src/Requests/PanelIssue.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nWebFontConfig = {\n custom: { families: ['Alternate Gothic No.3', 'Clarendon FS Medium', 'Proxima Nova Light', 'Proxima Nova Semibold', 'Stub Serif FS', 'Stub Serif FS'],\n urls: [ 'http://f.fontdeck.com/s/css/tEGvGvL6JlBfPjTgf2p9URd+... | javascript | edit | 0 | 1 | mit | fe0d1ba2d55121a69791896e0f9fec3aa70f7c3c | robinwhittleton/static,kalleth/static,tadast/static,robinwhittleton/static,robinwhittleton/static,kalleth/static,robinwhittleton/static,alphagov/static,tadast/static,alphagov/static,alphagov/static,kalleth/static,kalleth/static,tadast/static,tadast/static | public/javascript/fonts.js | accepted | null | true |
[
{
"role": "user",
"content": "Write javascript code for the following: Remove extra option to absoluteUrl\n\nforce-ssl already sets this option by default"
},
{
"role": "assistant",
"content": "navigate = function (hash) {\n window.location.replace(Meteor.absoluteUrl() + hash);\n};\n"
}
] | javascript | new_file | 0 | 1 | mit | 287270fa3c7e221a42f5b3c9df86dbffde6ab044 | Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor | client/lib/navigate.js | rejected_duplicate | Near-duplicate of sample 100127 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar callable = require('./valid-callable')\n , forEach = require('./for-each')\n\n , defaultCb = function (value, key) { return [key, value]; };\n\nmodule.exports = function (obj, cb/*, thisArg*/) {\n\tvar a = [], th... | javascript | edit | 0 | 1 | isc | 1f34969f216a7333a27fbd48b97293f3a22d0ec1 | medikoo/es5-ext | lib/Object/map-to-array.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nconst {\n Component,\n get\n} = Ember;\n\nexport default Component.extend({\n tagName: 'input',\n type: 'text',\n attributeBindings: [\n 'accept',\n 'autocomplete',\n 'autosave',\n 'dir',\n... | javascript | edit | 0 | 2 | mit | 040681cfa5be9a0b095fab6f8f3c84c833245c94 | AdStage/ember-one-way-controls,dockyard/ember-one-way-input,dockyard/ember-one-way-controls,dockyard/ember-one-way-input,AdStage/ember-one-way-controls,dockyard/ember-one-way-controls | addon/components/one-way-input.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint-disable react/prop-types */\nimport React from 'react';\nimport addons from '@storybook/addons';\n\nimport StoryPanel from './StoryPanel';\nimport { ADDON_ID, PANEL_ID } from '.';\n\nexport function register() {\n addons.regi... | javascript | edit | 0 | 1 | mit | a0d7b9248e15b04725cc72834cebe1084a2e70e5 | storybooks/storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,storybooks/storybook,storybooks/react-storybook | addons/storysource/src/manager.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar router = express.Router();\nvar request = require('request');\n\nrouter.get('/', function(req, res) {\n request({\n url: 'https://status.heroku.com/api/v3/current-status',\n method: 'GET'\n ... | javascript | edit | 0 | 1 | mit | ff86c57864c82a30f9af6bea2b29b8b2ae68defd | jontewks/bc-slack-alerts | server/routes/heroku.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint-env node */\n\nconst path = require('path');\n\nmodule.exports = {\n description: 'Initialize files needed for typescript compilation',\n\n files() {\n return [\n path.join(this.path, 'files', 'tsconfig.json'),\n ... | javascript | edit | 0 | 3 | mit | 87f5054b206cac2bc48cd908a83ebdce5723da62 | emberwatch/ember-cli-typescript,emberwatch/ember-cli-typescript,emberwatch/ember-cli-typescript,emberwatch/ember-cli-typescript | blueprints/ember-cli-typescript/index.js | rejected_duplicate | Near-duplicate of sample 105079 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar cmm = require(\"__buttercup/classes/commands/command.cmm.js\");\n\nmodule.exports = {\n setUp: function(cb) {\n this.command = new cmm();\n (cb)();\n },\n\n callbackInjected: {\n callsToCallback: functi... | javascript | edit | 0 | 2 | mit | fd0db8de5cc41d704148a4b5ad64c8161754e146 | perry-mitchell/buttercup-core,buttercup-pw/buttercup-core,buttercup/buttercup-core,buttercup-pw/buttercup-core,perry-mitchell/buttercup-core,buttercup/buttercup-core,buttercup/buttercup-core | tests/commands/cmmTests.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\n/**\n * Default upload config\n *\n */\n\nmodule.exports = {\n uploadStates: [\n 'enqueued',\n 'pending',\n 'importing',\n 'uploading',\n 'guessing',\n 'unpacking',\n 'getting',\n 'creating',\n 'complete'\... | javascript | edit | 0 | 0 | bsd-3-clause | 1178d8d86a2b8774ad9636de8d29ca30d352db51 | splashblot/dronedb,CartoDB/cartodb,bloomberg/cartodb,splashblot/dronedb,CartoDB/cartodb,CartoDB/cartodb,codeandtheory/cartodb,codeandtheory/cartodb,bloomberg/cartodb,bloomberg/cartodb,CartoDB/cartodb,bloomberg/cartodb,splashblot/dronedb,CartoDB/cartodb,codeandtheory/cartodb,codeandtheory/cartodb,codeandtheory/cartodb,s... | lib/assets/javascripts/cartodb/common/background_polling/models/upload_config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst Redis = require('ioredis');\n\nmodule.exports = url => {\n const redis = new Redis(url);\n\n redis.setJSON = async (...arguments) => {\n arguments[1] = JSON.stringify(arguments[1]);\n if (typeof arguments[2] === 'object' &... | javascript | edit | 0 | 5 | mit | 767e66816b18085e0ab553eb0368b34fa94e6547 | sharaal/dnode,sharaal/dnode | packages/redis/index.js | rejected_duplicate | Near-duplicate of sample 88902 | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.