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\n'use strict';\n\nimport models from '../../models';\nimport { GENERIC } from '../../utils/errorTypes.js';\n\nlet User = models.User;\n\nexport default function resolveUser(req, res, next) {\n let jwtUserId = req.user.id;\n\n ... | javascript | edit | 0 | 2 | mit | 957af4e6d108bf6d4ca6a583aff3cbf98af72784 | learning-layers/sardroid-server,learning-layers/sardroid-server | app/middleware/relations/resolveUser.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\n'use strict';\n\nconst graphql = require('graphql');\n\nconst MoistureType = new graphql.GraphQLObjectType({\n name: 'Moisture',\n fields: {\n date: { type: graphql.GraphQLString },\n moisture: { type: graphql.GraphQLFloat },\... | javascript | edit | 0 | 2 | mit | fe9bfb669f003cee44dadda08d84f13a9c1fd826 | garden-aid/web-bff,garden-aid/web-bff | src/query/day.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nclass MetaData {\n constructor(data, extra_key) {\n this.data = data;\n this.extra_key = extra_key;\n }\n\n get(keys) {\n if (!this.data)\n return [];\n\n if (this.extra_key)\n return this.slice_with_extra_key(k... | javascript | edit | 0 | 3 | mit | 7bcc74486d0a8245614f2a3ca5559c2b1f87748d | codeout/inet-henge,codeout/inet-henge,codeout/inet-henge | src/meta_data.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * @class Admin_Form_Song\n * @extends CM_Form_Abstract\n */\nvar Admin_Form_Song = CM_Form_Abstract.extend({\n\t_class: 'Admin_Form_Song'\n});\n\n```\n\nApply this change: Set default label on song upload from filename"
},
{
... | javascript | edit | 0 | 1 | mit | 18959857d9e576dc641ddf884676d955d1312854 | njam/denkmal.org,njam/denkmal.org,njam/denkmal.org,fvovan/denkmal.org,njam/denkmal.org,denkmal/denkmal.org,denkmal/denkmal.org,denkmal/denkmal.org,fvovan/denkmal.org,denkmal/denkmal.org,fvovan/denkmal.org,njam/denkmal.org,fvovan/denkmal.org,fvovan/denkmal.org,denkmal/denkmal.org | library/Admin/library/Admin/Form/Song.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine([\n 'backbone',\n 'modules/boilerplate/module',\n 'modules/boilerplate/views/home',\n], function (Backbone, BoilerplateModule, HomeView) {\n\n var Router = Backbone.SubRoute.extend({\n\n routes: {\n ... | javascript | edit | 0 | 1 | mit | 21bd7f3970f461895a3ba64496378d510a45b3e7 | jesstelford/longdistance | app/modules/boilerplate/router.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport EditorControllerMixin from 'ghost/mixins/editor-base-controller';\n\nvar EditorNewController = Ember.ObjectController.extend(EditorControllerMixin, {\n actions: {\n /**\n * Redirect to editor after the first sa... | javascript | edit | 0 | 2 | mit | 89cd1e41b42ea4b98cc831b345d495642ed70319 | TryGhost/Ghost-Admin,airycanon/Ghost-Admin,JohnONolan/Ghost-Admin,acburdine/Ghost-Admin,TryGhost/Ghost-Admin,JohnONolan/Ghost-Admin,airycanon/Ghost-Admin,kevinansfield/Ghost-Admin,dbalders/Ghost-Admin,dbalders/Ghost-Admin,kevinansfield/Ghost-Admin,acburdine/Ghost-Admin | controllers/editor/new.js | rejected_duplicate | Near-duplicate of sample 76717 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * util-lang.js - The minimal language enhancement\n */\n\nfunction isType(type) {\n return function(obj) {\n return Object.prototype.toString.call(obj) === \"[object \" + type + \"]\"\n }\n}\n\nvar isObject = isType(\"Object\... | javascript | edit | 0 | 1 | mit | 3c5395db6bf159d53f9b701f5f48c21c54d6ece5 | LzhElite/seajs,kuier/seajs,longze/seajs,ysxlinux/seajs,miusuncle/seajs,treejames/seajs,moccen/seajs,chinakids/seajs,wenber/seajs,Gatsbyy/seajs,zwh6611/seajs,Lyfme/seajs,JeffLi1993/seajs,AlvinWei1024/seajs,hbdrawn/seajs,lovelykobe/seajs,kaijiemo/seajs,miusuncle/seajs,uestcNaldo/seajs,lianggaolin/seajs,Lyfme/seajs,MrZhen... | src/util-lang.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n normalizeEntityName: function() {\n // this prevents an error when the entityName is\n // not specified (since that doesn't actually matter\n // to us\n },\n\n afterInstall: function() {\n return this... | javascript | edit | 0 | 1 | mit | 92e08232403d7afbf0d7f1e2672d02e72bfb5958 | nathanhammond/ember-cli-qunit,zenefits/ember-cli-qunit,blimmer/ember-cli-qunit,ember-cli/ember-cli-qunit,zenefits/ember-cli-qunit,nathanhammond/ember-cli-qunit,ember-cli/ember-cli-qunit,blimmer/ember-cli-qunit | blueprints/ember-cli-qunit/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nprocess.traceDeprecation = true;\nconst path = require(\"path\");\nconst patternslib_config = require(\"@patternslib/patternslib/webpack/webpack.config\");\nconst svelte_config = require(\"@patternslib/pat-content-browser/webpack.svelte... | javascript | edit | 0 | 4 | bsd-3-clause | 12c8b42e97da478109aec131992601b559daa00d | plone/mockup,plone/mockup,plone/mockup | webpack.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar jss = require('jss');\nvar extend = require('jss-extend');\nvar nested = require('jss-nested');\nvar camelCase = require('jss-camel-case');\nvar defaultUnit = require('jss-default-unit');\n\nvar perdido = require('perdido');\n\njss.... | javascript | edit | 0 | 0 | mit | 96a95e118eb86e06b6e37d2085d12306fed720ec | wldcordeiro/perdido,wldcordeiro/perdido | tonic-example.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar React = require('react');\nvar urllite = require('urllite');\nvar renderDocumentString = require('../utils/renderDocumentString');\n\n\nvar connectMiddleware = function(router) {\n return function(req, res, next) {\n // Get the ... | javascript | edit | 0 | 4 | mit | 039dbe18bd1e4429f688c7549722ab72a3a85d21 | matthewwithanm/monorouter | lib/contrib/connectMiddleware.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nEmber.Validations.Errors = Ember.Object.extend({\n add: function(property, value) {\n this.set(property, (this.get(property) || []).concat(value));\n },\n clear: function() {\n var keys = Object.keys(this);\n for(var i = 0; ... | javascript | edit | 0 | 2 | mit | e563cd39f8eacfcc7aa1e5571cc654b7e032afe1 | davewasmer/ember-validations,Patsy-issa/ember-validations,aaronmcouture/ember-validations,aaronmcouture/ember-validations,spruce/ember-validations,indirect/ember-validations,irma-abh/ember-validations,xymbol/ember-validations,dockyard/ember-validations,Patsy-issa/ember-validations,yonjah/ember-validations,atsjj/ember-v... | packages/ember-validations/lib/errors.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n({\n mainConfigFile: './require.conf.js',\n dir: '../dist',\n modules: [\n {\n name: 'app',\n exclude: [\n /*\n * https://groups.google.com/forum/#!msg/requirejs/jiaDogbA1EQ/jKrHL0gs21UJ\n * text p... | javascript | edit | 0 | 0 | mit | e9b2ffd94cbcd7b5f7ddd497707a3f02032d4520 | glepretre/angular-requirejs-ready,glepretre/angular-requirejs-ready | config/build.conf.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { Geometry } from './three.js';\nimport { validatePropString } from './utils.js';\nimport { geometries } from './object-stores.js';\n\nexport default {\n inject: ['vglGeometries'],\n props: {\n name: validatePropString,\n }... | javascript | edit | 0 | 2 | mit | c1fa8f164c452d83915f6d63c2fe61f67861061d | vue-gl/vue-gl | src/vgl-geometry.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { createServer } from 'http'\nimport { Plugin } from 'munar-core'\nimport micro, { createError } from 'micro'\n\nexport default class Serve extends Plugin {\n static defaultOptions = {\n port: 3000\n }\n\n enable () {\n ... | javascript | edit | 0 | 3 | isc | 635e58b6ccae199cb519ecce90fb9fd2af81213d | welovekpop/munar | packages/munar-plugin-serve/src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * ReadmePage\n *\n * This is the page users see when they click the \"Setup\" button on the HomePage\n */\n\nimport React, { Component} from 'react';\nimport { Link } from 'react-router';\n\nexport default class AboutPage extends C... | javascript | edit | 0 | 2 | mit | 14989d5c0dd5f173900c37c36e04b24540824b97 | chexee/karaoke-night,w01fgang/react-boilerplate,w01fgang/react-boilerplate,chexee/karaoke-night | js/components/pages/ReadmePage.react.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar PIXI = window.PIXI,\n Point = require('../data/point'),\n Rect = require('../data/rect');\n\nfunction Frame(position, url, options) {\n this.pos = position;\n this.dir = options.direction || new Point(1, 1);... | javascript | edit | 0 | 4 | mit | 88ec6dc5bfa4c6c6e66f0034b4860fda021cb391 | reissbaker/gamekernel,reissbaker/gamekernel | demo/graphics/frame.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nvar async = require('async')\nvar rb = require('./rubygems')\n\n\nexports.run = (root, step, done) => {\n var gems = {}\n var error = false\n\n getGem({name: root}, (err) => {\n if (err) {\n done(err)\n return\n }\n... | javascript | edit | 0 | 5 | mit | 48f34ddfcfaf52c7b526ceb54637af97de19752d | simov/rubinho,simov/rubinho | server/discovery.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n description: 'Adds i18next dependency to the app.',\n\n normalizeEntityName: function () {},\n\n afterInstall: function(options) {\n return this.addBowerPackageToProject('i18next');\n }\n};\n\n```\n\nApply th... | javascript | edit | 0 | 1 | mit | 66e23fb4a54084ef13cfb1964134d9d009d6363b | OCTRI/ember-i18next,OCTRI/ember-i18next | blueprints/ember-i18next/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react'\n\nimport {iconify} from '../lib/str'\nimport styles from './styles'\n\nexport const Link = ({name, href, title}) => (\n <a className={styles.link} href={href} title={title} target={'_blank'}>\n <span class... | javascript | edit | 0 | 1 | mit | 19cd561f5a82561d1df560bf7201c414fffa49c2 | langri-sha/langri-sha.github.io,langri-sha/langri-sha.github.io | src/header/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n tabWidth: 4,\n printWidth: 100,\n singleQuote: true,\n arrowParens: \"always\",\n trailingComma: \"all\",\n\n overrides: [\n {\n files: [\"*.json\"],\n options: {\n ... | javascript | edit | 0 | 0 | mit | d176026894f7d190fd58cec08c9d23688e52006f | prezly/code-style,prezly/code-style | lib/prettier.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar util = require('util'),\n Pipeline = require('pipeline'),\n SerializationPlugin = require('./plugins/serialization');\n\n\n//Modifier\nvar Modifier = module.exports = function (availablePlugins) {\n Pipeline.call(this);\n\n... | javascript | edit | 0 | 2 | mit | 47caddefce106e70cf24163f597cf5f4f40ec436 | inikulin/ineed,inikulin/ineed | lib/modifier.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nwindow._ = require('lodash');\n\n/**\n * We'll load jQuery and the Bootstrap jQuery plugin which provides support\n * for JavaScript based Bootstrap features such as modals and tabs. This\n * code may be modified to fit the specific n... | javascript | edit | 0 | 0 | apache-2.0 | 0cdcc779bfe4d2aedf15de26b14e1ff940202334 | zhiyicx/thinksns-plus,remxcode/laravel-base,zeropingheroes/lanyard,hackel/laravel,cbnuke/FilesCollection,remxcode/laravel-base,beautifultable/phpwind,slimkit/thinksns-plus,hackel/laravel,zeropingheroes/lanyard,cbnuke/FilesCollection,orckid-lab/dashboard,orckid-lab/dashboard,slimkit/thinksns-plus,hackel/laravel,zhiyicx/... | resources/assets/js/bootstrap.js | rejected_duplicate | Near-duplicate of sample 95830 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// import polyfills. Done as an export to make sure polyfills are imported first\nexport * from './polyfill';\n\n// export core\nexport * from './core';\n\n// export libs\nimport * as accessibility from './accessibility';\nimport * as e... | javascript | edit | 0 | 4 | mit | c9b3876e1707c702da98ed68695353c30548af43 | pixelpicosean/voltar,pixelpicosean/voltar | src/engine/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar config = require('/opt/cocorico/api-web/config.json');\n\nvar keystone = require('keystone');\nvar transform = require('model-transform');\nvar bcrypt = require('bcrypt');\n\nvar Types = keystone.Field.Types;\n\nvar Ballot = new key... | javascript | edit | 0 | 0 | mit | ca50925fb48d9bb01b80a3ec6bb2d726abf919ae | promethe42/cocorico,promethe42/cocorico,promethe42/cocorico,promethe42/cocorico,promethe42/cocorico | api/src/models/Ballot.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n/* Services */\n\n\n// Demonstrate how to register services\n// In this case it is a simple value service.\nangular.module('myApp.services', []).\n value('version', '0.1')\n .factory(\"moviesService\", function($http)... | javascript | edit | 0 | 1 | mit | 74ff9b6416a1225f2051ff7dde7f6e5b16b5f847 | compufreakjosh/add-delete-routing,compufreakjosh/add-delete-routing,compufreakjosh/add-delete-routing,compufreakjosh/add-delete-routing | app/js/services.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport ApplicationAdapter from 'ember-jsonapi-resources/adapters/application';\n\nexport default ApplicationAdapter.extend({\n type: 'proposal',\n\n url: /*config.APP.API_PATH + */ '/proposals',\n\n /*fetchUrl: function(url) {\n c... | javascript | edit | 0 | 4 | mit | 63b013ea4549750faa1835cd21df1a8602bbc201 | pixelhandler/participate,pixelhandler/participate | app/adapters/proposal.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n;var conpigurator = {\n\tactive:false,\n\thandleChange:function(event){\n\t\tif($(event.target).hasClass('conpiguratorInput')){\n\t\t\tif(event.target.value && event.target.value !== '' && typeof event.target.value === 'string'){\n\t\t\... | javascript | edit | 0 | 7 | mit | 99390623b0c13313965c7fcb718c98397c4312c7 | nathanielwiley/conpigurator | conpigurator.jquery.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar expect = require('chai').expect;\nvar VariableCollection = require('../app/scripts/variable-collection');\nvar Variable = require('../app/scripts/variable');\n\ndescribe('variable collection', function () {\n\n it(... | javascript | edit | 0 | 1 | mit | 02708161a50ac518372c60c396dcfc3d964ade9b | caleb531/truthy,caleb531/truthy | test/variable-collection.spec.js | rejected_duplicate | Near-duplicate of sample 73942 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar router = express.Router();\n\nvar models = require('../../models/index');\nvar ZiviService = require('../../services/zivi.service');\n\nrouter.get('/', function (req, res) {\n models.Zivi.find({})... | javascript | edit | 0 | 2 | mit | 7bb4d3264abbc8c03d541a5dcd30b5f90adc5a2a | realzimon/backzimon-node,realzimon/backzimon-node | routes/v1/zivis.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { connect } from 'react-redux';\nimport Grid from 'react-bootstrap/lib/Grid';\nimport Errors from '../../constants/Errors';\nimport { removeError } from '../../actions/errorActions';\n\nlet ErrorList =... | javascript | edit | 0 | 5 | mit | 8d09481893114d9d38f7bbf3c263988e76bbcada | gocreating/express-react-hmr-boilerplate,gocreating/express-react-hmr-boilerplate,gocreating/express-react-hmr-boilerplate | src/common/components/utils/ErrorList.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar mongoose = require('mongoose');\n\nvar dbURI = 'mongodb://localhost/Loc8r';\nmongoose.connect(dbURI);\n\nmongoose.connection.on('connected', function() {\n console.log('Mongoose connected to ' + dbURI);\n});\n\nmongoose.connectio... | javascript | edit | 0 | 1 | mit | 66ce552d3e6658a703eceacbdab1502f8764ae45 | jonatasleon/getting-mean,jonatasleon/getting-mean | app_api/models/db.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst { EventEmitter } = require('events');\nconst { Browser, Devices } = require('../lib/discovery');\n\nfunction asFilter(filter) {\n\tif(typeof filter === 'string') {\n\t\treturn reg => reg.id === filter || reg.addre... | javascript | edit | 0 | 5 | mit | 06410c343ae4d726242b907d7109fbaea84135cf | aholstenson/miio | cli/device-finder.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Copyright 2020 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.... | javascript | edit | 0 | 2 | apache-2.0 | 87b0d1a335d308a0e110616ed0de874856272ba5 | googleinterns/step-2020-recipe-finder,googleinterns/step-2020-recipe-finder,googleinterns/step-2020-recipe-finder | frontend/src/components/Login.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst exec = require('shell-utils').exec;\nconst _ = require('lodash');\n\nconst fix = _.includes(process.argv, '--fix') ? '--fix' : '';\n\nconst dirs = [\n 'lib/src',\n 'integration',\n 'e2e',\n 'scripts',\n 'playground/src'\n];\n... | javascript | edit | 0 | 2 | mit | 4b86b42945e86f5d7f4c5dd7743c4b03b8d0cb03 | guyca/react-native-navigation,chicojasl/react-native-navigation,ceyhuno/react-native-navigation,Jpoliachik/react-native-navigation,Jpoliachik/react-native-navigation,Jpoliachik/react-native-navigation,ceyhuno/react-native-navigation,thanhzusu/react-native-navigation,guyca/react-native-navigation,guyca/react-native-navi... | scripts/test-js.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine([], function () {\n return {\n hasLoggedInUser: function() {\n return !!(this.profile && this.profile.get('username'));\n },\n profile: null\n }\n});\n\n```\n\nApply this change: Use selected_identity for logged... | javascript | edit | 0 | 2 | apache-2.0 | 9061475dcf4f2e0c0d5a00a6eb655d21396aa51c | CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend | troposphere/static/js/context.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nError.stackTraceLimit = Infinity; // And beyond\n\nrequire('babel-core/register')(require('./babel-defaults'));\n\n// Must be after babel so our fork overrides the one installed by babel.\n// Aren't unresponsive OSS projects fun!.\nre... | javascript | edit | 0 | 0 | mit | eeee845d7a576a257a8f34d7d2b5fc15ac6e41f8 | kpdecker/linoleum | runtime-init.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst express = require('express');\nconst path = require('path');\nconst PORT = process.env.PORT || 4000;\nconst app = express();\n\n\n// API endpoints\napp.get('/api/hello', (req, res) => {\n res.set('Content-Type', 'application/json... | javascript | edit | 0 | 3 | mit | 3bcfe2e095583932296e04e0f9acc27128ecabaa | mit-teaching-systems-lab/swipe-right-for-cs,mit-teaching-systems-lab/swipe-right-for-cs | server/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nAccountsTemplates.addFields([\n {\n _id: \"username\",\n type: \"text\",\n displayName: \"username\",\n required: true,\n minLength: 3,\n },\n]);\n\n```\n\nApply this change: Fix order of fields in registrat... | javascript | edit | 0 | 0 | mit | 3ced1a1655308df281184d57938ec65a2e692a7f | 4minitz/4minitz,RobNeXX/4minitz,Huggle77/4minitz,4minitz/4minitz,RobNeXX/4minitz,Huggle77/4minitz,4minitz/4minitz,Huggle77/4minitz,RobNeXX/4minitz | lib/config/accounts.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\nvar React = require('react');\n\nvar paths = require('../paths');\n\n\nmodule.exports = {\n contextTypes: function() {\n return {\n getCurrentPathname: React.PropTypes.func.isRequired,\n getCurrentParams: R... | javascript | edit | 0 | 4 | mit | 1b15e8d52f2445dec0af737fe5dce22669fd817f | RamonGebben/antwar,antwarjs/antwar,RamonGebben/antwar | elements/PathsMixin.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport * as Types from './types'\r\n\r\nconst initialState = {\r\n server: {}\r\n}\r\n\r\nconst mapServerState = (serverState, state) => {\r\n return {\r\n ...state,\r\n server: serverState\r\n }\r\n}\r\n\r\nexport default (sta... | javascript | edit | 0 | 5 | apache-2.0 | d5b783795c6aafc05962a821f05bf2d27659e45c | openstardrive/flight-director | lib/station/reducer.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport default class TranscodeError extends Error {\n constructor(message, file, additional = '') {\n super();\n this.message = message;\n this.file = file;\n this.additional = additional;\n }\n\n toString() {\n return... | javascript | edit | 0 | 1 | mit | 5275ad48ffbec47195b85db30ea1ca7dae8f0dd1 | nwronski/batch-transcode-video | lib/transcode-error.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst firebase = require(\"firebase\");\n\nasync function deleteInstallation() {\n try {\n // [START delete_installation]\n await firebase.installations().delete();\n // [END delete_installation]\n } catch (err) {\n consol... | javascript | edit | 0 | 2 | apache-2.0 | 72feb40f9756bf53b4ab6a7151bc452c2aa87956 | firebase/snippets-web,firebase/snippets-web,firebase/snippets-web,firebase/snippets-web | installations/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst _ = require('lodash');\nconst imageConfig = require('../config/tmdb.json').images;\nconst formatApiResponse = require('../utils/formatApiResponse');\nconst { createTransformMany } = require('./utils');\n\nconst ORIGINAL_IMAGE_SIZE... | javascript | edit | 0 | 3 | mit | 5ebc832fee00e16867678e2f22a26a3ae5f16206 | nathanhood/mmdb,nathanhood/mmdb | server/transformers/movieTransformer.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*jslint node:true, sloppy:true*/\n/*globals define*/\n\nif (!global.evaluated) {\n require('../util/adapter.js');\n}\n\nvar path = '../dist/amd/strict';\nglobal.modules = [path + '/Class.js', path + '/AbstractClass', path + '/Interf... | javascript | edit | 0 | 1 | mit | 713b769f7d45092df124b7c5170d9f6d5c2e7c59 | IndigoUnited/js-dejavu,IndigoUnited/js-dejavu | test/amd/strict.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine(['jquery', 'underscore', 'backbone', 'model_want', 'utils'], function($, _, Backbone, Models, Utils) {\n\tModels.Wants = Backbone.Collection.extend({\n\t\tmodel: Models.Want,\n\t\tinitialize: function() {\n\t\t\tthis.fetch({\n\t\... | javascript | edit | 0 | 3 | mit | 4ccd4b566f9dacb128914f136b6d652aea3832af | burnflare/CrowdBuy,burnflare/CrowdBuy | js/app/models/wants.js | rejected_duplicate | Near-duplicate of sample 83827 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.path.unshift('js');\n\n(function(){\n\tmodule('import class ui.TabContainer');\n\tmodule('import class marcuswestin.Layout');\n\tmodule('import class lib.navigationManager');\n\tmodule('import class marcuswestin.views.factory');\... | javascript | edit | 0 | 2 | mit | 5c7a9212ae97adec9af1f737e9cf862b35b8331b | marcuswestin/marcuswestin.com,marcuswestin/marcuswestin.com | js/marcuswestin/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { Command } from 'substance'\n\n/*\n This command intended to switch view and scroll to the selected node.\n Command state becoming active only for certain type of custom selection,\n e.g. if you want to use it, provide config... | javascript | edit | 0 | 3 | mit | 7124186c630cae16e4faec3b4205db75eaefb5c7 | substance/texture,substance/texture | src/article/shared/EditEntityCommand.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport {spawn} from 'child_process';\n\nconst requiresHarmonyFlag = parseInt(/^v(\\d+)\\./.exec(process.version)[1], 10) < 7;\nconst harmonyProxies = requiresHarmonyFlag ? ['--harmony_proxies'] : [];\nconst args = [\n ...harmonyProxies... | javascript | edit | 0 | 1 | mit | 06c4909dd0bd8178547991fb99c0825567eff41b | oshalygin/react-slingshot,flibertigibet/react-redux-starter-kit-custom,danpersa/remindmetolive-react,garusis/up-designer,danpersa/remindmetolive-react,oshalygin/react-slingshot,lisavogtsf/canned-react-slingshot-app,MouseZero/nightlife-frontend,git-okuzenko/react-redux,coryhouse/react-slingshot,garusis/up-designer,flibe... | tools/testCi.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n[ \"https://${test.server.name}/oxauth-rp/home.seam\",\n \"https://client.example.org/callback\",\n \"https://client.example.org/callback2\",\n \"https://client.other_company.example.net/callback\",\n \"https://client.exampl... | javascript | edit | 0 | 0 | mit | 7206d486166786c27862f373a90d942bddbff935 | madumlao/oxAuth,madumlao/oxAuth,madumlao/oxAuth,madumlao/oxAuth,GluuFederation/oxAuth,GluuFederation/oxAuth,GluuFederation/oxAuth,madumlao/oxAuth,GluuFederation/oxAuth,GluuFederation/oxAuth | Server/src/test/resources/client/sector_identifier.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nTC.control = TC.control || {};\r\n\r\nif (!TC.Control) {\r\n TC.syncLoadJS(TC.apiLocation + 'TC/Control');\r\n}\r\n\r\nTC.control.Click = function () {\r\n var self = this;\r\n\r\n TC.Control.apply(self, arguments);\r\n\r\n ... | javascript | edit | 0 | 3 | bsd-2-clause | d78ebdbc5b1a4ff59ae67b492fc3550698231279 | sitna/api-sitna,sitna/api-sitna | TC/control/Click.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar log = {\n add: function(eventType, payload) {\n var timestamp = new Date();\n var event = {\n type: eventType,\n instanceID: Florence.instanceID,\n created: timestamp.toISOString(),\... | javascript | edit | 0 | 3 | mit | 540929f6edb033823c76d69bd6fdff5129978870 | ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence | src/legacy/js/classes/log.js | rejected_duplicate | Near-duplicate of sample 92679 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// If you try printing the below you would see \"[object Object]\"\" which is not that useful.\n\n// Instead, you can click \"Inspect it\" to see the result in the JavaScript console where you can look inside the object.\n// That result... | javascript | edit | 0 | 0 | mit | 359c0084212dd2f824e3f34f5f3f1a1c27eac35c | pdfernhout/Twirlip7,pdfernhout/Twirlip7,pdfernhout/Twirlip7 | src/ui/examples/inspecting-an-object.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nangular\n .module('search', ['angucomplete-alt'])\n .controller('SearchController', ['SEARCH_DATA', '$window', function (searchData, $window) {\n var me = this;\n\n me.docs = searchData.data;\n me.src = searchData.src;\... | javascript | edit | 0 | 3 | mit | 087c7bdb215baa4f1f6369dcfb7d0e19fe010bf2 | haochi/jsdoc-search | statics/scripts/angular.jsdoc.search.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * `server` task\n * =============\n *\n * Creates a Browsersync Web server instance for live development. Makes use of\n * some Webpack middlewares to enable live reloading features.\n */\n\nimport browsersync from 'browser-sync';\... | javascript | edit | 0 | 1 | mit | 373d991ce474bb74fe51053d80c33c92abb1685b | rblopes/phaser-3-snake-game,rblopes/phaser-3-snake-game | gulpfile.babel.js/tasks/serve.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction setup(){\n // Defining Initial Configuration\n var DIFF_INIT = 4;\n createCanvas(windowWidth - DIFF_INIT, windowHeight - DIFF_INIT);\n}\n\nfunction draw(){\n background(0);\n}\n\n```\n\nApply this change: Create ship struct... | javascript | edit | 0 | 1 | mit | c4343b696f36d188fed5e3a3a82c44b38042ef02 | mora200217/Projects-Young-Engineers-,mora200217/Projects-Young-Engineers- | Proyectos/Atari/Asteroids/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\n\nmodule.exports = {\n __module: {\n provides: {\n use_scripts: {},\n use_stylesheets: {},\n register_assets_dir: {after: ['assetManager/bootstrap', 'assetManager/hadron', 'assetManager/hadron-theme-nodus']},\n ... | javascript | edit | 0 | 1 | mit | fb370cf64b78a8438128ba6a6e40ee155049570c | hadronjs/hadron-seed,VenturaStudios/Blog | themes/mytheme/assetManager/mytheme.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar FESTAPP_REALM = 'Basic realm=\"festapp-server\"';\n\nfunction validateBasicAuth(accounts, req, res, next) {\n if (req.headers.authorization && req.headers.authorization.search('Basic ') === 0) {\n if (accounts.indexOf(new Buffer... | javascript | edit | 0 | 5 | mit | c769a19905f31c28bf51024030f8b59fe3ec2682 | futurice/sec-conference-server,futurice/sec-conference-server | lib/access_filter.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nmodule.exports = {\n loadUninitialized: \"You must first call store.load\",\n undefinedValue: \"Value must not be undefined.\",\n invalidNamespace: \"namespace can not contain a hash character (#)\",\n non... | javascript | edit | 0 | 0 | mit | 54bc7736bc5d3381a48eebba476f0933884899c6 | YuzuJS/storeit | lib/errorMessages.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar browserify = require('browserify');\nvar gulp = require('gulp');\nvar source = require('vinyl-source-stream');\nvar buffer = require('vinyl-buffer');\nvar uglify = require('gulp-uglify');\n//var sourcemaps = require... | javascript | edit | 0 | 1 | bsd-2-clause | d05779f3239db1964d19cf9daf393b0addc4d722 | OpenTreeOfLife/tree-illustrator,OpenTreeOfLife/tree-illustrator | stylist/gulpfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * config.js: Configuration information for your Loggly account.\n * This information is only used for require('loggly')./\\.+/ methods\n *\n * (C) 2010 Nodejitsu Inc.\n * MIT LICENSE\n *\n */\n\n//\n// function createCon... | javascript | edit | 0 | 4 | mit | 09f77b61290b4a2010ba94fcf9c23ef7ba877291 | rosskukulinski/node-loggly,dtudury/node-loggly,freeall/node-loggly,nodejitsu/node-loggly,moonshadowmobile/node-loggly,mafintosh/node-loggly,mavrick/node-loggly | lib/loggly/config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Copyright 2015, EMC, Inc.\n\n'use strict';\n\nmodule.exports = {\n friendlyName: 'Bootstrap Ubuntu',\n injectableName: 'Task.Linux.Bootstrap.Ubuntu',\n implementsTask: 'Task.Base.Linux.Bootstrap',\n options: {\n ke... | javascript | edit | 0 | 0 | apache-2.0 | 2a4df7ed0c50ee9dcef75ad4c2862bceb57ae68d | nortonluo/on-tasks,AlaricChan/on-tasks,nortonluo/on-tasks,AlaricChan/on-tasks,bbcyyb/on-tasks,bbcyyb/on-tasks | lib/task-data/tasks/bootstrap-ubuntu.js | rejected_duplicate | Near-duplicate of sample 88082 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar ResponseCache = function() {\n\tthis.cache = {};\n};\n\nResponseCache.prototype.buildCacheKey = function(request) {\n return request.files.join(',') + (request.minify ? '|min' : '');\n};\n\nResponseCache.prototype.get = function(... | javascript | edit | 0 | 3 | mit | dd361a06ea0f02173559b96ba96ec5d05ce1ac09 | dmcquay/gracie | lib/responseCache.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\nconst tap = require('tap')\nconst nock = require('nock')\nconst Bot = require('../')\n\ntap.test('bot.getProfile() - successful request', (t) => {\n let bot = new Bot({\n token: 'foo'\n })\n\n let response = {\n f... | javascript | edit | 0 | 1 | mit | 3684fa4da12fe4f08f5242a0dc9b6f7a63e90aa9 | remixz/messenger-bot | test/get-profile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nenyo.kind({\n\tname: \"CurrentLocation\",\n\tkind: \"Component\",\n\tevents: {\n\t\tonSuccess: \"\",\n\t\tonFailure: \"\"\n\t},\n\tdestroy: function() {\n\t\tthis.stopTracking();\n\t\tthis.inherited(arguments);\n\t},\n\tstopTracking: fu... | javascript | edit | 0 | 2 | apache-2.0 | c09dc7c800e6930f6d1ed6ca8fcaf3dce0b89ae8 | onecrayon/onyx,mcanthony/onyx,enyojs/onyx,onecrayon/onyx,enyojs/onyx,mcanthony/onyx | examples/Maps/source/CurrentLocation.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*global Promise:true*/\n'use strict';\n\nvar EventSource = global.EventSource || require('eventsource')\n , Promise = require('rsvp').Promise\n ;\n\nvar _source;\n\nvar Streamable = {\n listen: {\n value: function () {\n ret... | javascript | edit | 0 | 6 | apache-2.0 | 595d211f6c2f6bbb2d95b1a54083c3aa36f0e275 | StackStorm/st2client.js,StackStorm/st2client.js | lib/mixins/streamable.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component, PropTypes } from 'react';\nimport {connect} from 'react-redux';\nimport {Link} from 'react-router';\n\n@connect(state => ({ routerState: state.router }))\nexport const App = class App extends Component {\n st... | javascript | edit | 0 | 2 | mit | 864404605affba4e647fdf016080c4685aa56604 | mjrussell/redux-router,acdlite/redux-router,rackt/redux-router | examples/server-rendering/components.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// https://gist.github.com/adamalbrecht/7226278\n\n// Returns a function, that, as long as it continues to be invoked, will not\n// be triggered. The function will be called after it stops being called for\n// N milliseconds. If `immedi... | javascript | edit | 0 | 4 | mit | 08910bf1f8afe84e481b6b04599af55306ec22a8 | Lullabot/fivefifteen,Lullabot/fivefifteen | app/scripts/factories/debounce.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Module dependencies.\n */\n\nvar _ = require('lodash');\nvar async = require('async');\n\n\n/**\n * exposeGlobals()\n *\n * Expose certain global variables\n * (if config says so)\n *\n * @api private\n */\n\nmodule.exports = fu... | javascript | edit | 0 | 6 | mit | f49bba2ba6a6eedf7679af1bfd5936572a4a147c | corbanb/sails,tjwebb/sails,konstantinzolotarev/sails,harrissoerja/sails,taogb/sails,shaunstanislaus/sails,sunnycmf/sails,krishnaglick/sails,janladaking/sails,dylannnn/sails,ctartist621/sails,hellowin/sails,Karnith/sails-for-gulp,yinhe007/sails,rlugojr/sails,saronwei/sails,Benew/sails,alexferreira/sails,tempbottle/sails... | lib/app/private/exposeGlobals.js | rejected_duplicate | Near-duplicate of sample 95100 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function($) {\n $(document).ready(function() {\n $('.datepicker').datepicker();\n });\n})(jQuery);\n\n```\n\nApply this change: Use correct date format for datepicker"
},
{
"role": "assistant",
"content": "(fun... | javascript | edit | 0 | 1 | mit | 9863d3e7462c4cc6fff020f2da1fe414e849f104 | saltastro/salt-data-quality-site,saltastro/salt-data-quality-site,saltastro/salt-data-quality-site,saltastro/salt-data-quality-site | app/static/js/ui.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport Helmet from 'react-helmet';\nimport { prefixLink } from 'gatsby-helpers';\n\nconst BUILD_TIME = new Date().getTime();\n\nmodule.exports = React.createClass({\n displayName: 'HTML',\n propTypes: {\n ... | javascript | edit | null | null | mit | c443f63cab871f1758a8c2cbc06cd5aca5966e5e | lilac/lilac.github.io,lilac/lilac.github.io | html.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\n/* DistrictBuilder Javascript Utilities */\n\n/* DistrictBuilder Javascript Utilities used in multiple\n * Javascript files in the DistrictBuilder codebase.\n * \n * Instantiate db_util object to protect global namespace\n */\n\nvar d... | javascript | edit | 0 | 1 | apache-2.0 | 4a396a8db07f41e98a674c8d02221bcb5fac53b5 | JimCallahanOrlando/DistrictBuilder,JimCallahanOrlando/DistrictBuilder,JimCallahanOrlando/DistrictBuilder,JimCallahanOrlando/DistrictBuilder | django/publicmapping/redistricting/static/js/utils.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport classnames from 'classnames';\n\nfunction Thumbnail({ src, label, circle }) {\n const className = classnames('ui-thumbnail', {\n 'ui-thumbnail-circle': circle,\n });\n\n return (\n <div classN... | javascript | edit | 0 | 3 | mit | de0a8438a9389a8e12ad7c825db8e0565c5a7afe | wundery/wundery-ui-react,wundery/wundery-ui-react | src/components/Thumbnail/Thumbnail.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\nvar exec = require('child_process').exec;\n\nexports.buildProduction = function (buildTool, err) {\n var buildCmd = 'mvn package -Pprod -DskipTests=true';\n\n if (buildTool === 'gradle') {\n buildCmd = './gra... | javascript | edit | 0 | 2 | apache-2.0 | ed09d3518d437dbb8ad67d6078ea2300c4dcd9a2 | mraible/generator-jhipster,liseri/generator-jhipster,ruddell/generator-jhipster,gmarziou/generator-jhipster,JulienMrgrd/generator-jhipster,liseri/generator-jhipster,gmarziou/generator-jhipster,gzsombor/generator-jhipster,dalbelap/generator-jhipster,ramzimaalej/generator-jhipster,vivekmore/generator-jhipster,erikkemperm... | aws/lib/build.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport moment from \"moment\";\n\n\nexport const dateFormat = 'MMM D, YYYY';\nexport const datetimeFormat = 'MMM D, YYYY HH:MM';\n\nfunction getDateParamsFromString(dateString) {\n return {\n year: dateString.substring(0, 4),\n m... | javascript | edit | 0 | 1 | mit | 81ed365961411c9f39ef189e29a486f3fd4aa329 | davidmz/freefeed-react-client,kadmil/freefeed-react-client,davidmz/freefeed-react-client,FreeFeed/freefeed-react-client,kadmil/freefeed-react-client,davidmz/freefeed-react-client,FreeFeed/freefeed-react-client,FreeFeed/freefeed-react-client,kadmil/freefeed-react-client | src/utils/get-date-from-short-string.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * GET home page\n */\n\nmodule.exports = function (app, options) {\n \"use strict\";\n\n var underscore = require('underscore');\n var userGroupsFetcher = options.userGroupsFetcher;\n var restProxy = options.restProxy;... | javascript | edit | 0 | 2 | mit | d02a4ae2d6f09530e7e5767591e5ef34a984f787 | Turistforeningen/Turadmin,Turistforeningen/Turadmin,Turistforeningen/Turadmin,Turistforeningen/Turadmin | routes/routes-index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nclass DbConst {\n // no support for static contants, declare then after the class definition\n}\nDbConst.DB_NAME = \"FormHistoryControl\";\nDbConst.DB_VERSION = 1;\nDbConst.DB_STORE_TEXT = 'text_history';\nDbConst.DB_STORE_ELEM = 'el... | javascript | edit | 0 | 0 | mit | f750efdc3b088b8748d6ba3ff1d8e6e8a0510139 | stephanmahieu/formhistorycontrol-2,stephanmahieu/formhistorycontrol-2,stephanmahieu/formhistorycontrol-2 | common/DbConst.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport async function up(knex) {\n await knex.schema.table('users', (table) => {\n table.jsonb('preferences').defaultTo('{}').notNullable();\n });\n // Migrate from the 'frontend_preferences'\n await knex.raw(`\n update users ... | javascript | edit | 0 | 1 | mit | 42b2e8cf63c303d6b96e5d75d90ac77dc0897419 | FreeFeed/freefeed-server,FreeFeed/freefeed-server | migrations/20170806154824_user_prefs.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\nvar cp = require('child_process');\nvar child = cp.fork(__dirname + '/child.js');\nvar passport = require('passport');\nvar DropboxOAuth2Strategy = require('passport-dropbox-oauth2').Strategy;\nvar active = false;\n\nmodu... | javascript | edit | 0 | 2 | mit | e72fb558b41b009fd2d8ec124ef2a0a06d1f0f5c | peterblazejewicz/jsbin,dhval/jsbin,fgrillo21/NPA-Exam,digideskio/jsbin,saikota/jsbin,peterblazejewicz/jsbin,pandoraui/jsbin,svacha/jsbin,francoisp/jsbin,juliankrispel/jsbin,filamentgroup/jsbin,IveWong/jsbin,dedalik/jsbin,ilyes14/jsbin,kirjs/jsbin,mdo/jsbin,jamez14/jsbin,Hamcha/jsbin,KenPowers/jsbin,yize/jsbin,mcanthony... | lib/dropbox/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexports.conf = {\n nick: 'treslek',\n host: 'irc.freenode.net',\n ircOptions: {\n port: 6667,\n channels: ['##bullpeen'],\n userName: 'treslek',\n realName: 'treslek',\n autoConnect: false,\n floodProtection: true,\... | javascript | edit | 0 | 0 | mit | d6be547b7c92809ce123e41aba590def54c1a5af | jirwin/treslek,rackerlabs/treslek | conf.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\n(function(){\n var app = angular.module('runnersNotes',[]);\n\n app.controller('NoteController',['$http',function($http){\n var rn = this;\n rn.success = false;\n rn.errors = [];\n rn.notes = [];\n ... | javascript | edit | 0 | 2 | mit | 6ddb8f21ade3d9b18ab8979a9d74aa1bb36ad43c | marsojm/runnersnotes.rest-api,marsojm/runnersnotes.rest-api,marsojm/runnersnotes.rest-api | src/main/resources/public/js/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar app = require('app'); // Module controlling application life cyle.\nvar BrowserWindow = require('browser-window'); // Creating native browser windows.\n\n// Report crashes to the server (local node process?).\nrequire('crash-reporte... | javascript | edit | 0 | 2 | mit | 0848fe3d6e413c379f24e0a1d865e1794bf3a3a3 | mrwizard82d1/electron-qs,mrwizard82d1/electron-qs | main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport fetch from 'utils/fetch';\n\nimport { getSettings } from 'models/settings';\nimport parseResponse from 'utils/parseResponse';\nimport { updateHeaders } from 'actions/headers';\n\nexport const SIGN_OUT = ... | javascript | edit | 0 | 3 | mit | db18ad92def8726c909d3767e71173c0dd67f1ff | yury-dymov/redux-oauth | src/actions/signOut.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { getWrapper } from '../shared';\nimport NavigationBar from '../../src/components/NavigationBar';\nimport SettingsPanel from '../../src/components/SettingsPanel';\nimport CallingSettings from '../../src/components/CallingSettings... | javascript | edit | 0 | 1 | mit | 20029c6e5908db6e57be103211e7de8b066dac34 | u9520107/ringcentral-js-widget,ringcentral/ringcentral-js-widget,ringcentral/ringcentral-js-widget,ringcentral/ringcentral-js-widget,u9520107/ringcentral-js-widget,u9520107/ringcentral-js-widget | test/settings/CallingSettings.spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar ClocketteApp = require('./ClocketteApp');\nvar React = require('react');\nvar Router = require('react-router');\nvar Route = Router.Route;\n\nvar Routes = (\n <Route handler={ClocketteApp}>\n <Route name=\"/\" h... | javascript | edit | 0 | 1 | mit | 2623a35dd844d9c25710aacb450319027e7af4fd | rhumlover/clockette,rhumlover/clockette | src/components/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar browserify = require('browserify');\nvar brfs = require('brfs');\nvar through = require('through');\n\nrequire('browserify/lib/builtins').fs = 'create-webfs.js'; // TODO: find a better way to replace this module\n\nvar b = browserif... | javascript | edit | 0 | 1 | mit | 2e2bee985bae458848a6991676b5b5ef7d4f2207 | deathcap/webnpm,deathcap/webnpm | demo.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { Mongo } from 'meteor/mongo';\nimport { SimpleSchema } from 'meteor/aldeed:simple-schema';\n\nclass AcadCohortCollection extends Mongo.Collection{\n insert(acadCohortData, callBack){\n const cohortDocument = acadCohortData;\... | javascript | edit | 0 | 1 | mit | 512577195ba539cf8e59dd27caa50018be2e4bc9 | nus-mtp/nus-oracle,nus-mtp/nus-oracle | imports/api/database-controller/AcademicCohort/acadCohort.js | rejected_duplicate | Near-duplicate of sample 91766 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar $soloModal = null // Used when allowMultiple = false.\n\n// The public API.\nModal = {\n\t\n\tallowMultiple: false,\n\t\n\tshow: function(templateName, data, options){\n\t\t\n\t\tif($soloModal == null || this.allowMultiple){\n\t\t\t... | javascript | edit | 0 | 5 | mit | 9dca9597770da3651c9cd08c8c226ca58a3c3d8e | Opstarts/bootstrap-3-modal,Opstarts/bootstrap-3-modal | main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport styled from 'styled-components';\n\nconst ANIMATION_PERIOD = 500;\n\nconst AnimatedPageWrapper = styled.div`\n align-items: center;\n bottom: 0;\n display: flex;\n justify-content: center;\n left:... | javascript | edit | 0 | 2 | mit | afabab21096eadd035e475ff224023e2244ec89e | aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell | react/components/Onboarding/components/AnimatedPage/index.js | rejected_duplicate | Near-duplicate of sample 82270 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport chalk from 'chalk'\nimport WDIOReporter from 'wdio-reporter'\n\n/**\n * Initialize a new `Dot` matrix test reporter.\n */\nexport default class DotReporter extends WDIOReporter {\n constructor (options) {\n /**\n ... | javascript | edit | 0 | 1 | mit | 36e046833f631fc8070ebf0c4ef2a186a2c1f7b0 | webdriverio/webdriverio,klamping/webdriverio,klamping/webdriverio,webdriverio/webdriverio,klamping/webdriverio,webdriverio/webdriverio | packages/wdio-dot-reporter/src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst assert = require('assert')\nconst { Before, Given, When, Then } = require('@cucumber/cucumber')\nconst Shouty = require('../../lib/shouty')\nconst Coordinate = require('../../lib/coordinate')\n\nconst ARBITARY_MESSAGE = 'Hello, wo... | javascript | edit | 0 | 1 | mit | bf6285ecfa0994dd08c89d4791a2981b32a4e188 | cucumber-ltd/shouty.js,cucumber-ltd/shouty.js | features/step_definitions/shout_steps.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { MeetingSeries } from '/imports/meetingseries'\n\nRouter.configure({\n // set default application template for all routes\n layoutTemplate: 'appLayout'\n});\n\n\nRouter.route('/', {name: 'home'});\n\nRouter.route('/meeting... | javascript | edit | 0 | 2 | mit | 7f53b117e55cb03f2d1befd04bff1ff4dbbbf2b8 | 4minitz/4minitz,RobNeXX/4minitz,4minitz/4minitz,RobNeXX/4minitz,RobNeXX/4minitz,Huggle77/4minitz,4minitz/4minitz,Huggle77/4minitz,Huggle77/4minitz | client/router.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(function() {\n $('#applicant_character_server').change(populateArmory);\n $('#applicant_character_name').change(populateArmory);\n});\n\nfunction populateArmory() {\n // if ($('#applicant_armory_link').val() != '') {\n // ... | javascript | edit | 0 | 1 | mit | 276f822879fa36e3e39c51e59022784522a9e945 | tsigo/juggapp,tsigo/juggapp | public/javascripts/application.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nangular.module('ng.lodash', []).\n factory('_', function($window){\n $window._.templateSettings.interpolate = /{{([\\s\\S]+?)}}/g;\n return $window._;\n });\n```\n\nApply this change: Change lodash to use guid genera... | javascript | edit | 0 | 2 | mit | 519a9e6b98846750c2ced4557f61a5a93b597645 | dustyrockpyle/ipyng,dustyrockpyle/ipyng,dustyrockpyle/ipyng | client/ng-lodash/ng-lodash.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Created by ar on 7/16/15.\n */\n\nvar dbuser = \"root\";\nvar dbpass = \"root\";\nvar dbName=\"idservice\";\nvar host=\"localhost\";\n\nprocess.argv.forEach(function (val, index, array) {\n var parts = val.split(\"=\");\n ... | javascript | edit | 0 | 5 | apache-2.0 | 4be2f161407679850c0f6fd25ccb91dc9698aa87 | IHTSDO/component-identifier-service,IHTSDO/component-identifier-service,IHTSDO/component-identifier-service | config/params.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction format_money(currency, amount) {\n var symbol = format_money.map[currency];\n if (symbol === undefined) {\n return currency + ' ' + amount;\n }\n return symbol + amount;\n}\n\n// Taken with modifications from... | javascript | edit | 0 | 3 | apache-2.0 | 6c8f21c21315e70b17532916b1b78e72bdf0e4b9 | ashkanx/binary-static,teo-binary/binary-static,kellybinary/binary-static,binary-static-deployed/binary-static,kellybinary/binary-static,raunakkathuria/binary-static,negar-binary/binary-static,4p00rv/binary-static,binary-com/binary-static,teo-binary/binary-static,binary-com/binary-static,ashkanx/binary-static,binary-sta... | src/javascript/binary/common_functions/currency_to_symbol.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n 'palette is generated when random-palette button is clicked': function test(browser) {\n const devServer = browser.globals.devServerURL;\n\n browser\n .url(devServer)\n .waitForElementVisible('#rand... | javascript | edit | 0 | 1 | isc | 6ceaee707f65af5d44520ccdfcedae6c8c5b409d | eddyerburgh/palette-generator,eddyerburgh/palette-generator | test/e2e/specs/generate-palette.spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n//= require jquery.prevent_scroll_propagation\n//= require bubble\n//= require_tree ./frontend\n//= require factlink.backbone\n//= require tour\n\n```\n\nApply this change: Remove useless require, as bubble also requires this lib"
},
... | javascript | edit | 0 | 0 | mit | ecacaa22b13d4fc69c6230b845d6c42a6b9cd7cb | Factlink/factlink-core,daukantas/factlink-core,daukantas/factlink-core,daukantas/factlink-core,Factlink/factlink-core,Factlink/factlink-core,daukantas/factlink-core,Factlink/factlink-core | core/app/assets/javascripts/frontend.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component, PropTypes } from 'react'\nimport { COLS } from '../constants/Board'\n\nconst TILE_SIZE = 60\nconst basicStyles = {\n position: 'absolute',\n //flexGrow: 1,\n border: '1px solid',\n width: TILE_SIZE... | javascript | edit | 0 | 1 | mit | ae772ec9a87f9f151b4bb8204692cafd09b1c7ed | okonet/fifteens-trix,okonet/fifteens-trix | src/components/Tile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { assert } from 'chai';\nimport cloneDeep from 'lodash/cloneDeep';\n\nimport Attributes from '../Attributes';\nimport defaultTheme from '../../theme';\n\ndescribe('Attributes', () => {\n describe('#processProps', () => {\n de... | javascript | edit | 0 | 1 | mit | 1efaaf78b7c405506b0a0bbcc335487bfc666fc3 | apiaryio/attributes-kit,apiaryio/attributes-kit,apiaryio/attributes-kit | src/Attributes/test/Attributes.js | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.