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 { observable, toJS } from 'mobx';\nimport { pathExistsSync, outputJsonSync, readJsonSync } from 'fs-extra';\n\nimport { SETTINGS_PATH, DEFAULT_APP_SETTINGS } from '../config';\n\nconst debug = require('debug')('Settings');\n\nexp... | javascript | edit | 0 | 2 | apache-2.0 | 334c908b5f29617b24df14c9c1c11b76a2648d5a | meetfranz/franz,GustavoKatel/franz,meetfranz/franz,GustavoKatel/franz,meetfranz/franz | src/electron/Settings.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar MBTilesPlugin = function()\n{\n};\n\nMBTilesPlugin.prototype.open = function(params, onSuccess, onError)\n{\n\treturn cordova.exec(onSuccess, onError, \"MBTilesPlugin\", \"open\", [params]);\n};\n\nMBTilesPlugin.prototype.getMetadat... | javascript | edit | 0 | 1 | apache-2.0 | a489e41da4a5efe8e6770bdaaa4f5bcc66d94bfd | andreacimino/cordova-plugin-mbtiles,ffournier/cordova-plugin-mbtiles,andreacimino/cordova-plugin-mbtiles,ffournier/cordova-plugin-mbtiles,andreacimino/cordova-plugin-mbtiles,ffournier/cordova-plugin-mbtiles,andreacimino/cordova-plugin-mbtiles,ffournier/cordova-plugin-mbtiles,ffournier/cordova-plugin-mbtiles,andreacimin... | www/MBTilesPlugin.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\nvar assign = require('object-assign')\nvar EventEmitter = require('eventemitter3')\nvar objEql = require('obj-eql')\n\nfunction createStore(obj) {\n return assign(Object.create(EventEmitter.prototype), {\n state: {},... | javascript | edit | 0 | 2 | mit | 1190e7bd1dcbe1c943aa7ea3c7617291acc07f71 | uniflow/uniflow | lib/create-store.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * @license\n * Copyright 2015 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 | 4 | apache-2.0 | 073dafd5af2af77e303981066b2e1339b5358948 | mdittmer/foam,osric-the-knight/foam,jacksonic/foam,foam-framework/foam,osric-the-knight/foam,osric-the-knight/foam,jlhughes/foam,foam-framework/foam,foam-framework/foam,jacksonic/foam,foam-framework/foam,jlhughes/foam,mdittmer/foam,mdittmer/foam,foam-framework/foam,jlhughes/foam,jlhughes/foam,mdittmer/foam,jacksonic/fo... | core/ModelDAO.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nangular.module('app', []).controller('AppCtrl', function ($scope, $http) {\n\t$scope.results = [];\n\n\t$scope.loadUsers = function() {\n\t\t$http.get('/elements')\n\t\t\t.success(function(data) {\n\t\t\t\t$scope.results = data;\n\t\t\t... | javascript | edit | 0 | 1 | mit | 02fc833bded2184b57625150307bd7740f5b4f61 | dajvido/NAJ-homework,dajvido/NAJ-homework | Lesson9/http/js/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst getModel = require( './model.js' );\n\nmodule.exports = function ( modelName, item, cb ) {\n\n return new Promise( ( resolve ) => {\n\n getModel( modelName )\n .then( ( model, b ) => {\n\n if ( ... | javascript | edit | 0 | 3 | mit | ec59c2f8017985005c1d36e1d857276a231ea220 | Appliary/Poetry | lib/methods/save.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { isArray } from '@ember/array';\n\nexport default function(options, response) {\n let modelName = this.constructor.modelName || this.constructor.typeKey;\n let modelClass = this.store.modelFor(modelName);\n let serializer = t... | javascript | edit | 0 | 2 | mit | 266fcfdb6cd3f9815c44edfc9f9c79b43b486f84 | truenorth/ember-api-actions,mike-north/ember-api-actions,mike-north/ember-api-actions,mike-north/ember-api-actions,truenorth/ember-api-actions,mike-north/ember-api-actions | addon/utils/serialize-and-push.js | rejected_duplicate | Near-duplicate of sample 71041 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports =\n class Contractor {\n constructor(firstName, lastName, isResident, privateEmail) {\n this.firstName = firstName;\n this.lastName = lastName;\n this.isResident = isResident;\n this.privateEmail = privateEm... | javascript | edit | 0 | 1 | mit | 3507f961cd6921cbb54fa34589686074334064b1 | 7hci/surfboard,7hci/surfboard,7hci/surfboard | model/contractor.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 userSettings: Ember.inject.service('user-settings'),\n\n didReceiveAttrs () {\n const currency = this.get('userSettings').currency();\n this.set('currency',... | javascript | edit | 0 | 1 | mit | 5ef3a7e995eb33eeee53b2fbb05f9e3836c52196 | pe1te3son/spendings-tracker,pe1te3son/spendings-tracker | app/components/spendings-meter.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { generateGame } from \"./\";\nimport PlayerModel from \"../../model/player_model\";\n\ndescribe(`generator:: Game`, () => {\n describe(`::generate`, () => {\n [0, 1, 2, 10].forEach((v) => {\n it(`expected ${... | javascript | edit | 0 | 2 | mit | c19d5ed608e558674f8e304c53dfac83487e7554 | eugene-matvejev/battleship-game-gui-react-js,eugene-matvejev/battleship-game-gui-react-js | src/service/generator/game_generator.test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport LazyLoad from 'react-lazyload';\n\nimport './index.scss';\n\nconst Sidebar = ({ post = false }) => (\n <header className={`\n intro-header\n col-lg-2\n col-xs-12\n order-lg-1\n ${post =... | javascript | edit | 0 | 1 | mit | dcccf28a67c44c4b864fbda6360b382a190f180f | calpa/blog | src/components/Sidebar/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*---------------------------------------------------------------------------------------------\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------... | javascript | edit | 0 | 0 | mit | 812facbc2e46837896c4e6064f9d57eec358662c | joaompinto/asciidoctor-vscode,joaompinto/asciidoctor-vscode,joaompinto/asciidoctor-vscode | webpack.config.app.js | rejected_duplicate | Near-duplicate of sample 81311 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst express = require('express'),\n app = express(),\n bodyParser = require('body-parser'),\n methodOverride = require('method-override'),\n mongoose = require('mongoose');\n\nmongoose.connect('mongodb://localhost/... | javascript | edit | 0 | 2 | mit | def2531e1413f9efbd482e67df024abcae0848db | tymeart/mojibox,tymeart/mojibox | app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Vanilla Javascript please\ndocument.addEventListener('DOMContentLoaded', function (event) {\n var canvas = document.querySelector('#canvas')\n\n // Canvas size\n var canvasHeight = 300\n canvas.width = window.innerWidth\n canvas... | javascript | edit | 0 | 2 | mit | a28398835f182b28f44e811a15cf25d28c7a316e | SkullMasher/skullmasher.io-canvas,SkullMasher/skullmasher.io-canvas | app/js/script.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nvar Mocha = require('mocha'),\n_ = require('underscore');\n\nmodule.exports = function (browser, dashboard, suite /*, config*/) {\n\n var tests = {\n\n 'has a breadcrumb': function () {\n return browser\n .$('#global-b... | javascript | edit | 0 | 3 | mit | 12eca6c52d32c42276be8b7ee6d4240e44d1a35c | alphagov/cheapseats | lib/tests/dashboards/content.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Interaction for the faq module\n *\n * @author\tAnnelies Van Extergem <<EMAIL>>\n * @author\tJelmer Snoeck <<EMAIL>>\n * @author\tThomas Deceuninck <<EMAIL>>\n */\njsFrontend.faq =\n{\n\t// init, something like a constructor\n\t... | javascript | edit | 0 | 2 | mit | b01940ff00cb9eec5e5e7da9caecba8940b851ec | bartdc/forkcms,jacob-v-dam/forkcms,matthiasmullie/forkcms,sumocoders/forkcms,vytenizs/forkcms,jessedobbelaere/forkcms,ocpyosep78/forkcms,jonasdekeukelaere/forkcms,jeroendesloovere/forkcms,sumocoders/forkcms,Thijzer/forkcms,vytsci/forkcms,ikoene/forkcms,Katrienvh/forkcms,WouterSioen/forkcms,jonasgoderis/jonaz,jeroendesl... | frontend/modules/faq/js/faq.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction listProcessor(input) {\n let string = input.shift();\n console.log(string);\n\n for (let command of input) {\n let tokens = command.split(/\\s+/g);\n let commandProperties = tokens.slice(1);\n\n pr... | javascript | edit | 0 | 13 | mit | c394eb191cd889cf96a0367cecfe02c7a2db2146 | TeamWorkProject-ManagementBoards/List-Processing | listProcessing/listProcessor.js | rejected_complexity | Cyclomatic complexity too high: 13 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst express = require('express');\nconst app = express();\n\nconst path = require('path');\nconst routes = require('./myRoutes.js');\n\napp.get('/', function(req, res) {\n res.send('something');\n});\n\napp.get(routes.login, function... | javascript | edit | 0 | 1 | mit | 6a46bdc932c69f90f5f2580d5ddda224d62a0bfa | geekskool/taskMaster,geekskool/taskMaster | app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function(Config, XIBLE, EXPRESS_APP) {\n\n\tEXPRESS_APP.get('/api/config', (req, res) => {\n\t\tres.json(Config.getAll());\n\t});\n\n\tEXPRESS_APP.put('/api/config/value', (req, res) => {\n\n\t\tlet path = req.body.path... | javascript | edit | 0 | 3 | mit | c3a3930a8a5efb073521063209ba8b5d9e6fb415 | SpectrumBroad/xible,SpectrumBroad/xible | app/Config/routes.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\nvar JSONStream = require('JSONStream')\nvar sra = require('./')\n\nvar args = process.argv.slice(2)\n\nvar command = args[0]\nvar srcFile = args[1]\nvar destDir = args[2]\n\n\nvar sraStream = sra(command)\n\nsraStre... | javascript | edit | 0 | 0 | mit | 78226c94a839fc351010cff197763634695c2f0b | bionode/bionode-sra | cli.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 | 2a351a8ea174e50448c6ea39cb1674a33710b08e | 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\nmodule.exports = function (config) {\n 'use strict'\n\n config.set({\n frameworks: ['mocha', 'chai', 'sinon'],\n files: [\n {pattern: 'bower_components/jquery/dist/jquery.js', instrument: false},\n {pattern: 'bower_com... | javascript | edit | 0 | 1 | mit | 1e69df3472ec6536599f0ee00b2cc3d2a0853efc | jp7677/hellocoreclr,jp7677/hellocoreclr,jp7677/hellocoreclr,jp7677/hellocoreclr | HelloCoreClrApp.Ui/karma.conf.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nvar LoginHelper = {\n loggedIn : function() {\n var cookie = Ti.App.Properties.getString('auth_cookie');\n if (!cookie)\n return false;\n return true;\n },\n\n logout : function() {\n var createConfirmDialog = func... | javascript | edit | 0 | 3 | mit | fd9b688d1e416b53fb0a20b322d485f39c744d86 | nilenso/ashoka-survey-mobile,nilenso/ashoka-survey-mobile | Resources/helpers/LoginHelper.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nrequire.config({\n paths: {\n 'd3': '../node_modules/d3/d3',\n 'nishe': '../node_modules/nishe/nishe',\n 'nisheviz': '../nisheviz'\n }\n});\nrequire(['d3', 'nishe', 'nisheviz'], function(d3, nishe, nisheviz) {\n 'use strict'... | javascript | edit | 0 | 2 | mit | 68a8ab008a00a3dd062ae89d1b9aeef699686608 | b0ri5/nisheviz,b0ri5/nisheviz,b0ri5/nisheviz | sb/partition_nisheviz.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nrequire('babelify/polyfill');\n\nconst config = require('./config');\n\nconst SculptureApp = require('./app');\n\nconst DEFAULT_CLIENT_CONNECTION_OPTIONS = {\n protocol: \"ws\",\n username: \"anyware\",\n password: \"anyware\",\n ho... | javascript | edit | 0 | 0 | mit | e8081ee5d7ecafeb9ca34560fc0129bbf55efa6a | anyWareSculpture/sculpture-client,anyWareSculpture/sculpture-client,anyWareSculpture/sculpture-client | app/src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst fs = require('fs');\nconst escape = require('pg-escape');\n\nconst hasDBAvailable = Boolean(process.env.DB);\n\nif (!hasDBAvailable) {\n module.exports = {};\n return;\n}\n\nconst pgConfig = {\n host: 'localhos... | javascript | edit | 0 | 1 | mit | d37dda981abad79d255c7d0584a1dd0cbbc374e9 | vampiman/Hold-My-Beer,vampiman/Hold-My-Beer | database/queries.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar React = require('react-native');\nvar {\n Component,\n SegmentedControlIOS\n} = React;\n\nclass SegmentedControl extends Component {\n render() {\n return (\n <SegmentedControlIOS\n values={this.pr... | javascript | edit | 0 | 1 | mit | f37d79f6a9a90901a8cdfc11e5044750c3e0565d | richeterre/jumu-nordost-react-native,richeterre/jumu-nordost-react-native,richeterre/jumu-nordost-react-native,richeterre/jumu-nordost-react-native | SegmentedControl.ios.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nangular.module('confRegistrationWebApp')\n .directive('block', function () {\n return {\n templateUrl: 'views/blockDirective.html',\n restrict: 'E',\n scope: {\n 'block': '=',\n 'prefill... | javascript | edit | 0 | 2 | mit | 4fc5d2be8b17245533a250e370300174ba9f11f9 | CruGlobal/conf-registration-web,CruGlobal/conf-registration-web,CruGlobal/conf-registration-web,CruGlobal/conf-registration-web | app/scripts/directives/block.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// ==UserScript==\n// @name Add AWS region to title\n// @namespace curipha\n// @description Help to know where I am now\n// @include https://console.aws.amazon.com/*\n// @include https://*.console.aws.amazon.com/*\n// @... | javascript | edit | 0 | 2 | unlicense | 0e04a1cf050e6f34d5f19f489c7d0695b66d614c | curipha/userscripts,curipha/userscripts | add_aws_region_to_title.user.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport { test } from 'qunit';\nimport moduleForAcceptance from '../../tests/helpers/module-for-acceptance';\n\nimport DocsController from 'dummy/docs/controller';\n\nmoduleForAcceptance('Acceptance | root');\... | javascript | edit | 0 | 2 | mit | 9dd5048cb1a681ac3aab0b803a2e7a9b86703944 | machty/ember-concurrency,machty/ember-concurrency,jeradg/ember-concurrency,jeradg/ember-concurrency,jeradg/ember-concurrency,machty/ember-concurrency,jeradg/ember-concurrency,machty/ember-concurrency | tests/acceptance/root-test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nimport * as types from '../actions/actionTypes';\nimport config from '../config';\n\nwindow.navigator.userAgent = \"react-native\";\n\nconst initialState = {\n isFetching: true,\n question: '',\n latest: ''\n};... | javascript | edit | 0 | 5 | mit | 10b0407de96ef5d40e97ec2db1a0a4ae6a9b72ba | benox3/react-native-socket,benox3/react-native-socket | src/app/reducers/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst Reducer = (state = {\n\n}, action) => {\n switch(action.type) {\n // case 'ADD_TODO':\n // return { ...state, nextId: state.nextId + 1,\n // todoItems: [ ...state.todoItems,\n // ... | javascript | edit | 0 | 2 | mit | e97435408a8fa349ec68e82c1b1e53d1299e47f2 | yusong-shen/comp531-web-development,yusong-shen/comp531-web-development,yusong-shen/comp531-web-development,yusong-shen/comp531-web-development | hw5/src/reducers.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nconst vscode = require(\"vscode\");\nconst analyser = require(\"./complexity-analyzer\");\nconst reporter = require(\"./report-builder.js\");\nconst config = require(\"./config\");\nconst Output = require(\"./ou... | javascript | edit | 0 | 2 | mit | d59317c34ac8bb10c8d8d760089d68c01ebdeca4 | tomi/vscode-js-complexity-analysis | src/analyse-file.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n * Module dependencies.\n */\nvar mongoose = require('mongoose'),\n\tSchema = mongoose.Schema;\n\n/**\n * Eye Schema\n */\nvar EyeSchema = new Schema({\n cylinder: {\n type: Number\n },\n sphere: {\... | javascript | edit | 0 | 0 | mit | dca82948f4cea4dc38d0f5da8ba75f062800ab4f | CodeHubGit/HopeSearch,CodeHubGit/HopeSearch | app/models/prescription.server.model.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Oasis from \"oasis\";\nimport webworkerAdapter from \"oasis/webworker_adapter\";\n\nmodule('Webworker Sandboxes', {\n setup: function() {\n Oasis.reset();\n }\n});\n\ntest(\"throws an error if the sandbox type is html\", fun... | javascript | edit | 0 | 1 | mit | f36fee125c86937281bddd1dc9ee239160742e74 | ef4/oasis.js,ef4/oasis.js,yapplabs/oasis.js,tildeio/oasis.js | test/webworker_sandbox_tests.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * This file needs to be renamed as app.js when we want to run unit tests\n * in order this to get loaded by the jxcore ready event.\n * This effectively acts as main entry point to the unit test app\n */\n\n\"use strict\";\n\nvar t... | javascript | edit | 0 | 0 | mit | c526ecb88ff5b0f545b13f4baa4d67a1b6eb580f | thaliproject/Thali_CordovaPlugin,thaliproject/Thali_CordovaPlugin,thaliproject/Thali_CordovaPlugin,thaliproject/Thali_CordovaPlugin,thaliproject/Thali_CordovaPlugin | test/www/jxcore/UnitTest_app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nwindow.onload = function () {\n \"use strict\";\n\n var undoManager,\n circleDrawer,\n btnUndo,\n btnRedo,\n btnClear;\n\n undoManager = new UndoManager(); \n circleDrawer = new CircleDrawer(\"... | javascript | edit | 0 | 2 | mit | 9bc79f3e6d50cf80b683864d3b86f812fda4904a | squallyan/Javascript-Undo-Manager,ArthurClemens/Javascript-Undo-Manager,ArthurClemens/Javascript-Undo-Manager,squallyan/Javascript-Undo-Manager | demo/js/demo.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst electron = require('electron');\nconst { app } = electron;\nconst { ipcMain: ipc } = electron;\nconst { dialog } = electron;\nconst { BrowserWindow } = electron;\n// const sass = require('node-sass')\nconst fs = require('fs');\n\n... | javascript | edit | 0 | 1 | mit | c52e8110adda71f5bc4e45a3fa671c56971f8ab8 | mkermani144/wanna,mkermani144/wanna | desktop/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n// workflows/createDeployment\nvar Joi = require('joi');\n\nmodule.exports = {\n schema: Joi.object({\n deployerId: Joi.string().required(),\n name: Joi.string().min(1).required(),\n }).required().unknown(... | javascript | edit | 0 | 1 | mit | 556f8e7b7a81d25a5787ddc5d0e766876162e5da | f5itc/swf-graph,f5itc/swf-graph,f5itc/swf-graph | workflows/createDeployment.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\n/*\n * broccoli-replace\n * http://gruntjs.com/\n *\n * Copyright (c) 2014 outaTiME\n * Licensed under the MIT license.\n * https://github.com/outaTiME/broccoli-replace/blob/master/LICENSE-MIT\n */\n\nvar fs = require('fs');\nvar file... | javascript | edit | 0 | 2 | mit | 6817d548fcc4c24196560fc478860d0383156908 | outaTiME/broccoli-replace,outaTiME/broccoli-replace,alexeagle/broccoli-replace,alexeagle/broccoli-replace | scripts/generate.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar chai = require('chai'),\n sinon = require('sinon'),\n sinonChai = require('sinon-chai'),\n path = require('path'),\n React = require('react');\n\n\nglobal.expect = chai.expect;\n\n\nchai.use(sinonChai);\n\n\nbeforeEach(f... | javascript | edit | 0 | 1 | mit | c9ef14a1d3346ac6d4db00cbab09df0d6a5a97c4 | NiGhTTraX/react-test-buffet,NiGhTTraX/react-test-buffet,NiGhTTraX/react-test-buffet | tests/setup/globals.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nangular.module('ui.knob', [])\n .directive('knob', function () {\n return {\n restrict: 'EACM',\n template: function(elem, attrs){\n\n return '<input value=\"{{ knob }}\">';\n\n },\n replace: true,\n ... | javascript | edit | 0 | 4 | mit | 86fc28a1acd2bea5d731ac76311960422092749a | Bunni/angular-knob,Bunni/angular-knob | src/angular-knob.js | rejected_duplicate | Near-duplicate of sample 72838 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndescribe(\"Map\", function () {\n\tdescribe(\"#whenReady\", function () {\n\t\tdescribe(\"when the map has not yet been loaded\", function () {\n\t\t\tit(\"calls the callback when the map is loaded\", function () {\n\t\t\t\tvar map = L.... | javascript | edit | 0 | 1 | bsd-2-clause | e475c04eaa956c3a5910de4a332c113135c8b8c1 | Neorth/Leaflet,iOffice/Leaflet,Neorth/Leaflet,Fil/Leaflet,scaddenp/Leaflet,AP-whitehat/Leaflet,hyperknot/Leaflet,prashen/Leaflet,jasonoverland/Leaflet,Jakobud/Leaflet,twoubt/Leaflet,Andrey-Pavlov/Leaflet,hyperknot/Leaflet,gabrielpconceicao/frontend-asset-leaflet,srdavis/leaflet-template,pzdz/Leaflet,sisou/Leaflet,twoub... | spec/suites/map/MapSpec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\nvar assign = require('object-assign')\nvar EventEmitter = require('eventemitter3')\nvar objEql = require('obj-eql')\n\nfunction createStore(obj) {\n var store = assign(Object.create(EventEmitter.prototype), {\n state... | javascript | edit | 0 | 2 | mit | a2ccd51b855487c5ea8bbee8a99e15668a715926 | uniflow/uniflow | lib/create-store.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { takeEvery } from 'redux-saga';\nimport { call, put } from 'redux-saga/effects';\n\n\nexport default function sagasBuilder(request, REQUEST, actions) {\n function* makeRequest({ payload, meta }) {\n let data;\n let error;... | javascript | edit | 0 | 3 | mit | 579bf2cb2d6f894fed689b6ac87b7d8a9b00b162 | rockingskier/redux-request-utils | src/sagasBuilder.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst fs = require('fs');\nconst flat = require('flat');\n\nfunction fixParagraphStructure(originalJSONPath, translatedJSONPath) {\n const originalJSONFile = fs.readFileSync(originalJSONPath);\n const originalJSON = flat.flatten(JSON.... | javascript | edit | 0 | 5 | mit | 2470a97cc8458fb2c0ff7dca17a7447299c28633 | processing/p5.js-website,processing/p5.js-website | fixParagraphStructure.js | rejected_duplicate | Near-duplicate of sample 77438 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Returns array with group states\nexport default function expandGroup(groupState, entityMap) {\n return groupState.attributes.entity_id.map(\n entityId => entityMap.get(entityId));\n}\n\n```\n\nApply this change: Expand group filt... | javascript | edit | 0 | 1 | mit | d02264b0f96c31288ca3d2c1884f833986cee298 | balloob/home-assistant-js | src/util/expand-group.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport path from 'path';\nimport dotenv from 'dotenv';\nimport popura from '../src';\nimport generateAuthToken from '../src/utils/generate-auth-token';\n\ndotenv.config({\n\tsilent: false,\n\tpath: path.join(__dirname, '../.env'),\n});\... | javascript | edit | 0 | 0 | mit | 94fe2e82ebae76a7a7066b973cfc40ba473b82dc | lubien/popura | test/mock.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar expect = require('chai').expect;\nvar sinon = require('sinon');\n\nvar prepare = require('../../lib/prepare');\nvar fs = require('fs');\n\ndescribe('lib/prepare', function () {\n it('removes data.textPath and place the content of i... | javascript | edit | 0 | 1 | mit | 766034fec7d671d4901b1258269e97ae3358d265 | arrowrowe/mailgun-util | test/lib/prepare-spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* @flow */\nimport { createSelector } from 'reselect';\nimport { getRawRealmEmoji } from '../directSelectors';\nimport { getAuth } from '../account/accountSelectors';\nimport { getFullUrl } from '../utils/url';\n\nexport const getAllRe... | javascript | edit | null | null | apache-2.0 | 5825573d2d6f907df67ca44698cb5eecc689d4f6 | vishwesh3/zulip-mobile,vishwesh3/zulip-mobile,vishwesh3/zulip-mobile,vishwesh3/zulip-mobile | src/emoji/emojiSelectors.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Copyright (c) 2015 Narwhal Software s.r.l. \n// Use of this source code is governed by a MIT-style license that can be\n// found in the LICENSE file.\n\n// Global accessor that the popup uses.\nvar pattern = /^(https?:\\/\\/)((doc-sn... | javascript | edit | 0 | 1 | mit | 3fd62d301884be561d47019ca8841af86093aedc | narwhal/QtLatestDocs-chrome | background.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { Link } from 'react-router';\n\nclass App extends React.Component {\n render() {\n return (\n <div className=\"app\">\n <h1>Welcome to KIM!</h1>\n <ul className=\"navbar\">\n ... | javascript | edit | 0 | 1 | mit | c00c0347e6e795ecddc439eee4b3f20b8508d18b | jfanderson/KIM,jfanderson/KIM | client/app/components/App.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react'\n\nclass Observable extends React.Component {\n\n constructor (props) {\n super(props)\n this.state = {value: null}\n }\n\n componentWillMount () {\n this.unsubscribe = this.props.stream(value => th... | javascript | edit | 0 | 3 | mit | 6ef08643c91f18dc92bed0b1d8c99b410c730add | juhohei/slope | src/lift.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\nconst cozy = require('./cozyclient')\nconst fs = require('fs')\nconst path = require('path')\n\n// account id path is mandatory in the cli\nlet accountIdPath = process.argv[2]\nif (accountIdPath) {\n accountIdPath = pat... | javascript | edit | 0 | 1 | mit | 38793f2f444d22a40bd844ac59d42b7634b3ada0 | doubleface/cozy-konnector-libs | init-dev-account.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst { ipcRenderer, remote } = require(\"electron\");\nconst { app, BrowserWindow } = require(\"electron\");\nconst fs = require(\"fs\");\n\nwindow.onload = () => {\n\n}\n\n```\n\nApply this change: Allow window to be resized"
},
... | javascript | edit | 0 | 1 | apache-2.0 | 4dbb3dc59e525598972bab51c6b44ab61cb673cc | EpticMC/Commander-IDE,EpticMC/Commander-IDE | src/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar classes = require(\"./classes\");\nvar gRex = require(\"./grex\");\n\nvar grex = function(options, callback){\n try {\n if(typeof options === 'function'){\n callback = options;\n options = undefined;\... | javascript | edit | 0 | 3 | mit | 9b31abb8533ccf889a8a2356808375a794938af3 | jbmusso/grex | src/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport connection from '../../config/database';\n\nmodule.exports.register = (server, options, next) => {\n async function getStats(next) {\n try {\n const divisions = await connection\n .table('employees')\n .fil... | javascript | edit | 0 | 2 | mit | f9066c99c2a52c5807c0f3f1491c69ce1afc21b5 | ocean/higgins,ocean/higgins | src/methods/statistics/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function() {\n global.expect = global.chai.expect;\n\n global.THREE = require('three');\n\n // Mock 'document.createElement()' to return a fake canvas.\n // This is a bit more convenient rather than requiring both t... | javascript | edit | 0 | 3 | mit | c326be92e077ae1d5f94227e4039b1590c012d91 | Leeft/three-sprite-texture-atlas-manager,Leeft/three-sprite-texture-atlas-manager | test/setup/setup.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n\nvar assert = require('assert');\nvar yaml = require('../../');\n\n\ntest('RegExps should be properly closed', function () {\n assert.throws(function () { yaml.load('!!js/regexp /fo'); });\n assert.throws(function ... | javascript | edit | 0 | 2 | mit | ee72d9510414cef2decd3f0db5e36ec4eab70127 | denji/js-yaml,isaacs/js-yaml,bjlxj2008/js-yaml,jonnor/js-yaml,joshball/js-yaml,isaacs/js-yaml,isaacs/js-yaml,minj/js-yaml,doowb/js-yaml,jonnor/js-yaml,crissdev/js-yaml,vogelsgesang/js-yaml,deltreey/js-yaml,deltreey/js-yaml,pombredanne/js-yaml,vogelsgesang/js-yaml,bjlxj2008/js-yaml,joshball/js-yaml,pombredanne/js-yaml,j... | test/issues/0123.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport {moduleForComponent, skip} from 'ember-qunit';\nimport hbs from 'htmlbars-inline-precompile';\nimport Ember from 'ember';\n\nmoduleForComponent('provider-carousel', 'Integration | Component | provider carousel', {\n integratio... | javascript | edit | 0 | 1 | apache-2.0 | ea92f597db06879e471e9d76cae85b822d3cf976 | CenterForOpenScience/ember-preprints,baylee-d/ember-preprints,CenterForOpenScience/ember-preprints,baylee-d/ember-preprints | tests/integration/components/provider-carousel-test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// This is a karma config file. For more details see\n// http://karma-runner.github.io/0.13/config/configuration-file.html\n// we are also using it with karma-webpack\n// https://github.com/webpack/karma-webpack\n\nvar webpackConfig... | javascript | edit | 0 | 1 | mit | 435462ea2d0f0545ddd930a73d0168fff0fa6c1c | AlbinoDrought/cachios,AlbinoDrought/cachios | tests/karma.conf.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst matchPublic = /^\\s*public\\s*(\\S*)$/;\n\nclass Controller {\n\tconstructor() {\n\t\tthis.commands = [];\n\t}\n\n\taddCommand( name ) {\n\t\tconst Command = require( './command/' + name );\n\t\tconst instance = ... | javascript | edit | 0 | 5 | mit | 226ad96842c45597f33dc0f9c4d341caa3ffa90b | pjasiun/fuma,pjasiun/fuma | app/controller.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst { defaults } = require(\"jest-config\");\n\nmodule.exports = {\n testEnvironment: \"node\",\n setupFiles: [\n \"<rootDir>/../apollo-server-env/dist/index.js\"\n ],\n preset: \"ts-jest\",\n testMatch: null,\n t... | javascript | edit | 0 | 0 | mit | 85c70a441e044c8ae0256c8ba7f1fb5ffb7affc8 | apollostack/apollo-server | jest.config.base.js | rejected_duplicate | Near-duplicate of sample 87995 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function( $ ) {\n\tvar requests = {};\n\tvar zipValid = {\n\t\tus: /[0-9]{5}(-[0-9]{4})?/\n\t};\n\n\t$.ziptastic = function(zip, callback){\n\t\t// Only make unique requests\n\t\tif(!requests[zip]) {\n\t\t\trequests[zip] = $.getJSON('h... | javascript | edit | 0 | 2 | mit | d7e63e83c3c8f9979d72358d445ae661e6e006f5 | daspecster/ziptastic-jquery-plugin,daspecster/ziptastic-jquery-plugin,Ziptastic/ziptastic-jquery-plugin,Ziptastic/ziptastic-jquery-plugin | jquery.ziptastic.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*!\n * unit asserts to ensure delivery of payload within\n * HTTP POST/PUT requests works\n *\n * @author pfleidi\n */\n\n\nvar assert = require('assert');\nvar Helper = require('./test_helper');\nvar HttpClient = require('../index');\... | javascript | edit | 0 | 1 | mit | e8621452fbd78722b480d59fd840fa9f6cd58d7e | pfleidi/node-wwwdude | test/wwwdude-contentdelivery.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst http = require('http');\n\nlet request = {};\n\nrequest.get = function(url) {\n return new Promise((resolve, reject) => {\n let req = http.get(url, (res) => {\n if ([400, 401, 03, 404].includes(res.status... | javascript | edit | 0 | 2 | mit | a62d7ba04262f803afc281e77b938a370fc3964a | FTLam11/Audio-Station-Scrobbler,FTLam11/Audio-Station-Scrobbler | src/util/request.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Widget Header Directive\n */\n\nangular\n .module('RDash')\n .directive('rdWidgetHeader', rdWidgetTitle);\n\nfunction rdWidgetTitle() {\n var directive = {\n requires: '^rdWidget',\n scope: {\n ... | javascript | edit | 0 | 1 | mit | ede3d9243edf048a887d0a26472c6b0584fdb45c | jasonmelgoza/Responsive-Dashboard,RickyDan/rdash-angular,Shim2k/rdash-angular,saulosaires/fitcook-site,armand1m/wizard-finder-client,jkarpilo/Responsive-Dashboard,zidom/rdash-angular,PsyGik/rdash-angular,cesarmarinhorj/rdash-angular,jvkops/rdash-angular,tbaker0815/upwork_project,boyofgreen/BankOfContoso,ctuwuzida/rdash... | src/js/directives/widget-header.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar hoverZoomPlugins = hoverZoomPlugins || [];\nhoverZoomPlugins.push({\n name:'Flipkart',\n prepareImgLinks:function (callback) {\n var res = [];\n hoverZoom.urlReplace(res,\n 'img[src*=\"rukminim1.flixca... | javascript | edit | 0 | 7 | mit | c0237299ffd8ffc3e2b9f7291bf5a490c8bbdf13 | extesy/hoverzoom,extesy/hoverzoom | plugins/flipkart.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(document).ready(function() {\n $('.print-link a').attr('target', '_blank');\n\n var $searchFocus = $('.js-search-focus');\n $searchFocus.each(function(i, el){\n if($(el).val() !== ''){\n $(el).addClass('focus');\n }\n }... | javascript | edit | 0 | 6 | mit | 758b309a525dbe6952ed7966bd7f8b1af0ba29e0 | tadast/static,robinwhittleton/static,robinwhittleton/static,kalleth/static,alphagov/static,tadast/static,robinwhittleton/static,kalleth/static,kalleth/static,tadast/static,tadast/static,alphagov/static,alphagov/static,kalleth/static,robinwhittleton/static | app/assets/javascripts/core.js | rejected_duplicate | Near-duplicate of sample 77490 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n * Attempt to create a template containing an ec2 and elasticache instance.\n **/\nvar Template = require('../lib/Template.js');\nvar Validator = require('../lib/Validator.js');\n\nexports.testJustEC2 = function(te... | javascript | edit | 0 | 1 | apache-2.0 | 351d0c628b12356f741db48de27d3e9a5909c638 | owap/scenery,OpenWhere/scenery,OpenWhere/scenery | test/ec2_elasticache_test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport * as ActionTypes from '../actions/ActionTypes'\n\nfunction UserReducer(state = [], action) {\n switch (action.type) {\n case ActionTypes.CREATE_USER_SUCCESS:\n return [\n ...state,\n Object.assign({}, actio... | javascript | edit | 0 | 2 | mit | 01ea92a0f0bfc53c3fd840ef74e3936442f115be | RailsRoading/wissle,RailsRoading/wissle,RailsRoading/wissle | web/src/reducers/UserReducer.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { get } from 'lodash';\nimport Raven from 'raven-js';\n\nexport default function createMessageMiddleware(actionToDispatch) {\n return store => next => action => {\n const success = action.success && get(action, ['meta', 'succ... | javascript | edit | 0 | 7 | mit | 0e86b9ddde0847b61c9d308eb2eff767954ba646 | webkom/lego-webapp,webkom/lego-webapp,webkom/lego-webapp | app/utils/messageMiddleware.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport default (shower) => {\n const { container } = shower;\n const { fullModeClass, listModeClass } = shower.options;\n\n if (container.classList.contains(fullModeClass)) {\n shower.enterFullMode();\n } else {\n ... | javascript | edit | 0 | 4 | mit | 85ba445f607735859b4d229ddd4894fe0493d84b | shower/core | lib/modules/view.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Replace the normal jQuery getScript function with one that supports\n// debugging and which references the script files as external resources\n// rather than inline.\njQuery.extend({\n getScript: function(url, callback) {\n var h... | javascript | edit | 0 | 6 | mit | 909b301ab3ba677210ed6cc0dfc030abad4ecda7 | matematikk-mooc/frontend,matematikk-mooc/frontend | rootaccountfwd.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar router = express.Router();\n\nvar ratings = [\n {text: 'Good UI! Many alert choices.', stars: 5},\n {text: 'Running Great! No crashes', stars: 5}\n];\n\n/* GET ratings listing. */\nrouter.get('/'... | javascript | edit | 0 | 1 | mit | a6aa91b0c13bc1c08d0d25224cccddc149dcb677 | mbuechmann/brownbag-reactjs,mbuechmann/brownbag-reactjs | routes/ratings.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = function(grunt) {\n\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n jshint: {\n allFiles: ['Gruntfile.js', 'lib/**/*.js', 'test/**/*.js', 'index.js'],\n ... | javascript | edit | 0 | 2 | apache-2.0 | 18590218bc4096b10bb5aade82e5c83af41768ea | xmpp-ftw/xmpp-ftw-wtf | Gruntfile.js | rejected_duplicate | Near-duplicate of sample 72000 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar chakram = require('chakram'),\n expect = chakram.expect;\n\ndescribe(\"mPayroll API\", function() {\n const empRec = {\n \"name\": 'Harry Hourly',\n \"type\": 'H',\n \"rate\": '10.00'\n };\n\n it(\"s... | javascript | edit | 0 | 1 | mit | 8c7e9ea3b0871989f9b7592cabf7b57b9e9f5bf6 | Bill-A/Correctness-DrivenDevelopment | test/mpayrollAPI.js | rejected_duplicate | Near-duplicate of sample 91191 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\n\nimport { storiesOf } from '@storybook/react';\nimport { action } from '@storybook/addon-actions';\nimport { linkTo } from '@storybook/addon-links';\n\nimport { Button, Welcome } from '@storybook/react/demo'... | javascript | edit | 0 | 1 | mit | e04b74c6201a02b09ee2cfc86fe3cbb2bad500bb | oblador/loki,oblador/loki,oblador/loki | examples/react/stories/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst Bot = require('./bot');\n\nclass SmoochApiBot extends Bot {\n constructor(options) {\n super(options);\n\n this.name = options.name;\n this.avatarUrl = options.avatarUrl;\n }\n\n say(... | javascript | edit | 0 | 1 | mit | 5967a6e22ec524e477fb8c47463fab64e3a67f0c | alavers/smooch-bot | lib/smoochApiBot.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n{\n\t\"stable\": {\n\t\t\"CSIDE_version\": \"1.2.1\",\n \"nw_version\": \"0.21.4\",\n \"desc\": \"v1.2.1 - (1.2.0) Feature release: Custom themes, code folding and more.\",\n\t\t\"target\": \"https://choicescriptide.github.io/down... | javascript | edit | 0 | 0 | mit | a252c7d19a9149b8c1d9bc0ec4788ae1bb3c6b22 | ChoicescriptIDE/choicescriptide.github.io,ChoicescriptIDE/choicescriptide.github.io,ChoicescriptIDE/choicescriptide.github.io,ChoicescriptIDE/choicescriptide.github.io | downloads/updates/version.js | rejected_duplicate | Near-duplicate of sample 86993 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Pet = {\n init: function (options) {\n this.name = options.name\n this.born = options.born\n this.died = options.died\n }\n}\n\nvar Dog = {\n init: function (breed, options) {\n Pet.init.call(this, options)\n this.... | javascript | edit | 0 | 2 | mit | 721b8290dec1c57c64eed67a9bc7b7a59121fbd3 | jsstrn/kata,jsstrn/HackerRank,jsstrn/HackerRank,jsstrn/kata,jsstrn/kata,jsstrn/kata | JavaScript/object-literals.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$( document ).ready( function() {\n function showUploadedImage( source ) {\n $( \"#userImage\" ).attr( \"src\", source );\n }\n $( \"#image-form\" ).submit( function() {\n var image = document.getElementById( \"im... | javascript | edit | 0 | 2 | mit | 999027f424c8ad4c51b5f648fa3f1128f41220dd | VitSalis/endofcodes,dionyziz/endofcodes,dionyziz/endofcodes,VitSalis/endofcodes,VitSalis/endofcodes,dionyziz/endofcodes,VitSalis/endofcodes | static/script/user/view.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Imports the Google Cloud client library\nconst Datastore = require('@google-cloud/datastore')\n\n// Your Google Cloud Platform project ID\nconst projectId = 'pirula-time'\n\n// Instantiates a client\nconst datastore = Datastore({\n ... | javascript | edit | 0 | 2 | mit | 7294b89a6bb296bf35f338c12fe5b8cc82504cb6 | firefueled/pirula-time,firefueled/pirula-time,firefueled/pirula-time,firefueled/pirula-time,firefueled/pirula-time | scrapper/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nKpcc.Article = DS.Model.extend({\n title : DS.attr(),\n short_title : DS.attr(),\n published_at : DS.attr(),\n byline : DS.attr(),\n teaser : DS.attr(),\n body : DS.attr(),... | javascript | edit | 0 | 0 | mit | 43dddfa13f3738d4436b25972b8c22ee8a0ae165 | SCPR/kpcc-reader,SCPR/kpcc-reader,SCPR/kpcc-reader | js/models/article.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Gets character limit and allows no more\n$(function() {\n // Creates the character count elements\n $(\".js-char-count\").wrap(\"<div class='char-count'></div>\")\n $(\".js-char-count\").after(\"<div class='char-text'>Character co... | javascript | edit | 0 | 3 | mit | acb8969398c27fd29dd849e9b5072ac5df1997fc | bitzesty/qae,bitzesty/qae,bitzesty/qae,bitzesty/qae | app/assets/javascripts/frontend/text-character-count.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar isNode = require('is-node');\n\nmodule.exports = (function () {\n if (typeof Deno !== 'undefined') {\n var env = Deno.permissions().env ? Deno.env() : {};\n\n return {\n argv: Deno.args,\n colo... | javascript | edit | 0 | 5 | mit | 1750b24540c65f4a0a29c2f5905aa885039db602 | sunesimonsen/magicpen | lib/platform.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar utils = require(\"radiodan-client\").utils,\n logger = utils.logger(__filename);\n\nmodule.exports = function(radiodan){\n return function() {\n clearPlayers(radiodan.cache.players).then(\n function() {\n process.... | javascript | edit | 0 | 3 | apache-2.0 | 768db2ae414700b751dafd2e159ec40251d4beed | radiodan/magic-button,radiodan/magic-button | lib/graceful-exit.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { registerComponent } from 'react-native-playground';\nimport {\n StyleSheet,\n Text,\n View,\n} from 'react-native';\n\nclass App extends React.Component {\n render() {\n return (\n <View ... | javascript | edit | 0 | 1 | mit | 5bdf8dd75843b06b72c3bee3dbe4dbefc7def43c | rnplay/rnplay-web,rnplay/rnplay-web,rnplay/rnplay-web,rnplay/rnplay-web | apps/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * Copyright 2015 Mark Eschbach\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 * ... | javascript | edit | 0 | 5 | apache-2.0 | 9975351407a528dad840fda8309acfa132b9b431 | meschbach/onomate,meschbach/onomate,meschbach/onomate | service/security.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar router = express.Router();\n\nrouter.get('/checkouts/new', function(req, res, next) {\n res.render('index', { title: 'Express' });\n});\n\nmodule.exports = router;\n\n```\n\nApply this change: Upd... | javascript | edit | 0 | 1 | mit | bb7eb52313831da6a8c12324d220875fd25f68bf | braintree/braintree_express_example,braintree/braintree_express_example,ashutosh37/nodejs-braintree-firebase,ashutosh37/nodejs-braintree-firebase | routes/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { reducer as formReducer } from 'redux-form';\nimport { combineReducers } from 'redux';\nimport { routerReducer } from 'react-router-redux';\n\nimport { \n\torganization,\n\tstarredBoard,\n\tnotification,\n\tmodals,\n\tboard,\n\t... | javascript | edit | 0 | 0 | mit | 5c31bef28451412a09bcc100fb08c2b41709d0ce | Madmous/madClones,Madmous/Trello-Clone,Madmous/Trello-Clone,Madmous/madClones,Madmous/Trello-Clone,Madmous/madClones,Madmous/madClones | client/src/store/rootReducer.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function (config, next) {\n\n require('../db')(config, function (err, client) {\n\n if (err) { return next(err); }\n\n var messaging = require('../db/messaging')(config);\n var keyspace = config.keyspace || 's... | javascript | edit | 0 | 2 | mit | fc51b12766d2be8fef8889bca13a2459f8f63d24 | gajjargaurav/seguir,cliftonc/seguir,tes/seguir | api/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndescribe('Support module', function () {\n var S = GameOfLife.Support;\n\n describe('For parsing canvas', function () {\n it('throws InvalidArgument if given other than canvas element', function () {\n expect(function () {\n ... | javascript | edit | 0 | 1 | mit | a970aad03a6e0730e08caf98982caf4fe5eb5e29 | tkareine/game_of_life,tkareine/game_of_life,tkareine/game_of_life | test/unit/game_of_life.support.spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Create the application and define middleware.\n\n'use strict';\n\nvar express = require('express');\nvar bodyParser = require('body-parser');\n\nvar router = require('./../app/routes')();\n\nmodule.exports = function () {\n\n var ap... | javascript | edit | 0 | 1 | mit | a51ddfe38c359c4127c19d1096966f5090ca73e4 | andela-ioraelosi/hackshub-file-service | config/express.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* @flow */\n\nimport matchRoutePattern from 'match-route-pattern'\n\nimport type {\n Screen,\n Transition,\n TransitionHandler,\n Location,\n QueryParameters\n} from '../types'\n\nexport default function createTransition(pattern: ... | javascript | edit | null | null | mit | 30f4b78c463b42973eef5779dfabea760232f22d | vslinko/vstack-router | lib/util/createTransition.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst webpackConfig = require('../webpack/webpack.test.config');\nconst path = require('path');\n\nmodule.exports = (config) => {\n\tconfig.set({\n\t\tframeworks: ['mocha', 'sinon-chai'],\n\t\treporters: ['coverage', 'mocha'],\n\t\tbrow... | javascript | edit | 0 | 2 | mit | 654d58e164240d3ef35f5b2b3e3903f9eb554fa8 | reauv/persgroep-app,reauv/persgroep-app | internals/testing/karma.conf.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nwindow.respokeTestConfig = {\n baseURL: 'http://testing.digiumlabs.com:3001'\n};\nrespoke.log.setLevel('silent');\nwindow.doneOnceBuilder = function (done) {\n var called = false;\n return function (err) {\n if (!called)... | javascript | edit | 0 | 4 | mit | 89da8456cb272201d66ba059b8d6e63af6c13a97 | respoke/respoke,respoke/respoke,respoke/respoke | spec/util/config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function(scope, argv) {\n return {\n install: function (done) {\n scope.applyConfig({\n create: {\n Image: \"niallo/strider:latest\",\n },\n start: {\n PublishAllPorts: !!... | javascript | edit | 0 | 2 | isc | 4f0f14323f546e72e1d58c86710fc80b8c6129a3 | keyvanfatehi/ydm,kfatehi/ydm | drops/strider/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst { reduceAsync, identity } = require('../utilities');\nconst { rpcHandlers } = require('../rpc');\n\n// Returns a reducer function that takes the schema as input and output,\n// and iterate over rpc-specific reduce... | javascript | edit | 0 | 1 | apache-2.0 | 0b273ace2c3681814c9ca799f12482d99c27c015 | autoserver-org/autoserver,autoserver-org/autoserver | src/schema/rpc.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n'use strict';\n\n// foreign modules\n\nconst meow = require('meow');\n\n// local modules\n\nconst error = require('../lib/error.js');\nconst logger = require('../lib/utils/logger.js');\nconst main = require('../inde... | javascript | edit | 0 | 1 | bsd-3-clause | ec886703ac80b1a5fef912123dd3a64411aab320 | blinkmobile/bmp-cli | bin/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.