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// @flow\n\nimport path from 'path'\nimport { createFileTransformer, loadLocalFromContext } from 'pundle-api'\n\nimport manifest from '../package.json'\n\nfunction createComponent({ extensions = ['.less'], options = {} }: { extensions?:... | javascript | edit | null | null | mit | c59b53ffa3d47f2cbbd3763d55aa473112cba250 | motion/pundle,steelbrain/pundle,steelbrain/pundle,steelbrain/pundle | packages/pundle-transformer-less/src/index.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nsquidRoot = _currentPluginPath;\nsquidShared = squidRoot + \"/shared\";\n\ndevstep.on('configLoaded', function(config) {\n config\n .addLink('squid3:squid3.dev')\n .setEnv('http_proxy', 'http://squid3.dev:3128')\n .setEnv('h... | javascript | edit | 0 | 1 | mit | 16c11e33df29501c8341804e4dd0a0ad97b34d2a | fgrehm/devstep-squid3-ssl,fgrehm/devstep-squid3-ssl | plugin.js | rejected_duplicate | Near-duplicate of sample 70834 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport fs from 'fs'\nimport * as babel from 'babel-core'\nimport _eval from 'eval'\nimport babelConfig from './babelConfig'\nimport log from './log'\n\nconst configFile = 'bastion.conf.js'\n\nexport default function configPassthrough (n... | javascript | edit | 0 | 2 | unlicense | cf93d0eb073a184ee06c2aa56d16386e2e074947 | Olical/bastion | src/configPassthrough.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\nclass Titlebar {\n\tconstructor(title) {\n\t\tthis.element = document.createElement(\"div\");\n\t\tthis.element.classList.add(\"titlebar\");\n\t\tthis.setTitle(title);\n\t}\n\n\tgetElement() {\n\t\treturn this.element;\... | javascript | edit | 0 | 1 | mit | b840bd3ce8ba96f89ce5749ee6c9832033d09ec3 | sbruchmann/huxley,sbruchmann/huxley | Titlebar.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * No CSS Framework\n */\nexport const noneClassMap = {\n defaultButton: 'button default'\n};\n\n/**\n * Bootstrap\n */\nexport const bootstrapClassMap = {\n // Grid\n row: 'row',\n col4: 'col-sm-4',\n fluidContainer: 'contain... | javascript | edit | 0 | 0 | mit | 48da7675764392864c53c8b3d56f775555547943 | sahat/megaboilerplate,sahat/megaboilerplate,sahat/boilerplate,sahat/boilerplate,sahat/megaboilerplate | generators/css-framework/modules/class-maps.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport {run} from '@cycle/core';\nimport Rx from 'rx';\nimport restartable from './restartable';\n\nfunction restart (main, drivers, {sources, sinks}, isolate = {}, timeToTravelTo = null) {\n sources.dispose();\n sinks && sinks.dispos... | javascript | edit | 0 | 6 | mit | 2c343f896e7734e8fbc493a8072786d0414f9b28 | Widdershin/cycle-restart,Widdershin/cycle-restart | src/restart.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction parse_user_agent(agent) {\n \"use strict\";\n var fields = [];\n\n fields[0] = agent;\n fields[1] = \"Mozilla-compatible\";\n fields[2] = \"Unix-derived\";\n return (fields);\n}\n\n```\n\nApply this change: Ha... | javascript | edit | 0 | 2 | cc0-1.0 | cc6501a48a8116ea33234300a37af70002071bda | cxd4/user-agent,cxd4/user-agent | usragent.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n// convert an experiment, an array of spectra, to a chart\n\nvar types=require('./types.js');\n\n\n\nmodule.exports=function (experiments, channels, index) {\n var channels = channels || 'RGBWZE'\n\n if (! Array.i... | javascript | edit | 0 | 8 | mit | e5110938e6ccf52c42d9c5c057ca01435e3a7aa9 | open-spectro/javascript-helper | src/getChart.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport domify from 'domify';\n\n\nexport default class View {\n constructor({app, model}) {\n this.app = app;\n this.model = model;\n }\n\n render() {\n const html = this.getHTML();\n const element = domify(html);\n th... | javascript | edit | 0 | 1 | mit | 92b51edcfe1d1be3f7e5c5b0ce3b6bad51363edd | despawnerer/theatrics,despawnerer/theatrics,despawnerer/theatrics | web/src/js/base/view.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// SidebarView\ndefine(function (require) {\n var _ = require('underscore'),\n $ = require('jquery'),\n Backbone = require('backbone'),\n Handlebars = require('handlebars'),\n SimpleSearchListItemView = require('./simple_se... | javascript | edit | 0 | 3 | mit | 1060ee1db3dd5b0b587d6834ed122dffe7ad8990 | searchthedocs/searchthedocs | src/sidebar.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { PureComponent } from 'react'\n\n\nimport '../../css/activity-feedback.less'\n\nexport default class ActivityFeedbackForStudent extends PureComponent {\n\n render() {\n const student = this.props.student\n const fe... | javascript | edit | 0 | 5 | mit | ab2b4ed242de1f9e6de6ab3618d00d52a364679c | concord-consortium/portal-report,concord-consortium/portal-report,concord-consortium/portal-report,concord-consortium/portal-report | js/components/activity-feedback-for-student.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nclass ConditionalPromise {\n /**\n * Create a conditional promise - like a promise, but cancelable!\n */\n constructor(...args) {\n if ([...args].length) {\n this._promise = new Promise(...args);\n }\n }\n\n catch(...... | javascript | edit | 0 | 3 | mit | e0cf6c755e7f3fbdff5a63d1ce233146da2d67a7 | MingDai/kolibri,indirectlylit/kolibri,jayoshih/kolibri,jamalex/kolibri,jamalex/kolibri,benjaoming/kolibri,christianmemije/kolibri,jtamiace/kolibri,indirectlylit/kolibri,jamalex/kolibri,indirectlylit/kolibri,66eli77/kolibri,benjaoming/kolibri,DXCanas/kolibri,indirectlylit/kolibri,DXCanas/kolibri,rtibbles/kolibri,aronaso... | kolibri/core/assets/src/conditionalPromise.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar _ = require('lodash');\nvar fs = require('fs');\n\n// Assists in generating documentation for A2\n\nmodule.exports = {\n enabled: false,\n construct: function(self, options) {\n if (!options.enabled) {\n return;\n }\n ... | javascript | edit | 0 | 2 | mit | 09e97ddb319bb99fc099f197743e0d9606379402 | punkave/apostrophe,punkave/apostrophe | lib/modules/apostrophe-documentation/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { map } from 'mobx';\n\nexport const server = {\n credentials: map(),\n application: {\n secure: true,\n host: 'live.zoomdata.com',\n path: '/zoomdata',\n port: 8443\n },\n oauthOptions: {\... | javascript | edit | 0 | 0 | mit | 890183cc91b7c1bb426413071ffc00cb82f76b73 | Zoomdata/nhtsa-dashboard,Zoomdata/nhtsa-dashboard | src/config/zoomdata-connections/production.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\n/**\n * Order Types Schema\n */\nCore.Schemas.PayGroup = new SimpleSchema({\n _id: {\n type: String,\n optional: true\n },\n code: {\n type: String\n },\n name: {\n type: String\n },\n ... | javascript | edit | 0 | 3 | mit | 34580932cb5e18b4e8df4aec85d8470e3114a1b2 | c2gconsulting/bp-core,c2gconsulting/bp-core,c2gconsulting/bp-core,c2gconsulting/bp-core,c2gconsulting/bp-core | main/app/lib/collections/schemas/paygroups.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from \"ember\";\n\nconst {\n Component,\n computed,\n String: { htmlSafe },\n computed: { alias },\n inject: { service },\n get,\n} = Ember;\n\nexport default Component.extend({\n sideMenu: service(),\n... | javascript | edit | 0 | 4 | mit | cd57d7971068eccabe7bbd5eccbc54f16e538302 | tsubik/ember-side-menu,tsubik/ember-side-menu | addon/components/content-backdrop.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport { attributeMungingMethod } from './link-to-utils';\n\nconst {\n LinkComponent,\n getOwner,\n get,\n set\n} = Ember;\n\nexport default LinkComponent.extend({\n [attributeMungingMethod]() {\n thi... | javascript | edit | 0 | 3 | mit | 0c857c8611bb5dd4507bc81c2bae453164289da5 | ember-engines/ember-engines,ember-engines/ember-engines,dgeb/ember-engines,dgeb/ember-engines | addon/-private/link-to-component.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function() {\n $('.assignment_invitations.identifier, .group_assignment_invitations.identifier').ready(function() {\n return $('form').on('change keyup', function() {\n return $('.js-form-submit').prop('disabled', $('#student_... | javascript | edit | 0 | 2 | mit | 98c568cd129356889dd0431c75055d506a02ccea | BelieveC/classroom,BelieveC/classroom,BelieveC/classroom,BelieveC/classroom | app/assets/javascripts/identifier-form.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport default (filename, blob) => {\n const downloadLink = document.createElement('a');\n document.body.appendChild(downloadLink);\n\n // Use special ms version if available to get it working on Edge.\n if (navigator.msSave... | javascript | edit | 0 | 3 | bsd-3-clause | 28cda95346a1f5c8071feb9ed50b8255c6120c51 | LLK/scratch-gui,LLK/scratch-gui | src/lib/download-blob.js | accepted | null | true |
[
{
"role": "user",
"content": "Write javascript code for the following: Add LICENSE in the javascript source"
},
{
"role": "assistant",
"content": "/*\nCopyright (c) 2012 Chris Pettitt\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated... | javascript | new_file | null | null | mit | 6378f2926622488449c839ce9de38916b4fbfb8d | cpettitt/dig.js | src/pre.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nrequire('./testdom')('<html><body></body></html>');\nimport { assert } from 'chai';\nimport React from 'react';\nimport TestUtils from 'react-addons-test-utils';\nimport Score from '../src/components/score.jsx';\n\ndescribe('<Score />',... | javascript | edit | 0 | 1 | mit | 2a8be28cdaf3f3deaa9868c191b864573a93ab1a | jkrayer/summoner,jkrayer/summoner | test/scoreTest.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst { randomId } = require('./utils');\n\n// https://docs.aws.amazon.com/lambda/latest/dg/limits.html\n// default function timeout in seconds\nconst DEFAULT_TIMEOUT = 900; // 15 min\n\n/*\n Mimicks the lambda context object\n http:/... | javascript | edit | 0 | 2 | mit | 71dd3cbb35dffac4edcb662369f433fa693a0125 | dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline | src/createLambdaContext.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Prop from 'props/prop';\nimport canvas from 'canvas';\n\nimport collision from 'lib/collision';\nimport events from 'lib/events';\n\n// Maybe make these coords an array so we can easily multiply without lodash _.mapValues for spe... | javascript | edit | 0 | 2 | mit | 781c7951b19a9f5464c87737eee99969222d2b41 | oliverbenns/pong,oliverbenns/pong | app/props/ball.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\tif ( typeof define === \"function\" && define.amd ) {\n\t\tdefine(this.sn = sn);\n\t} else if ( typeof module === \"object\" && module.exports ) {\n\t\tmodule.exports = sn;\n\t}\n\telse this.sn = sn;\n}();\n\n```\n\nApply this change:... | javascript | edit | null | null | apache-2.0 | 83617243dd5d4c0156ba4cee3c43a6f03369fe7d | SolarNetwork/solarnetwork-d3,SolarNetwork/solarnetwork-d3 | src/end.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { notEmpty } from '@ember/object/computed';\nimport { assert } from '@ember/debug';\nimport RSVP from 'rsvp';\nimport BsForm from 'ember-bootstrap/components/bs-form';\n\nexport default BsForm.extend({\n '__ember-bootstrap_subcl... | javascript | edit | 0 | 3 | mit | 8095a72bbc30af252080843bcd4c99d4321ad760 | kaliber5/ember-bootstrap-changeset-validations,kaliber5/ember-bootstrap-changeset-validations | addon/components/bs-form.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine([\n 'require',\n '../../lib/jquery.validate',\n '../logging'\n], function(require) {\n var log = require('../logging').getLogger('validate');\n\n var init = function($el, opts) {\n var rules = $el.find('[dat... | javascript | edit | 0 | 2 | bsd-3-clause | a212dba8bb07f8bfe516ba6b53c9e02ba12b8f1f | Patternslib/require-experimental-build,Patternslib/Patterns-archive,Patternslib/Patterns-archive,Patternslib/Patterns-archive | src/patterns/validate.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport {compose, branch, renderComponent} from 'recompose';\nimport {BrowserRouter, withRouter} from 'react-router-dom';\n\nimport {IntlProvider} from 'react-intl';\n\nimport Prepare from './pages/Prepare';\n... | javascript | edit | 0 | 1 | mit | 818448baebf2c8ddb7dddf38136af7f036042bcb | Dermah/spooky-timer,Dermah/spooky-timer | src/App.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst gulp = require('gulp');\nconst runSequence = require('run-sequence');\nconst {spawn} = require('child_process');\n\ngulp.task('push', (callback) => {\n spawn('cf', ['push'], {stdio: 'inherit', env: process.env}).once('close', cal... | javascript | edit | 0 | 1 | mit | 99e4e616cec2a57e5a3c7fb57801dc83cb625f13 | mfine30/terminalboard-display | tasks/deploy.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar navMenu = navMenu || {};\n\nnavMenu = function() {\n\n this.init = function() {\n \n $('html').addClass('menu_mobile');\n \n $('.menu-btn').on('click', function() {\n $('body').hasClass('menu--acti... | javascript | edit | 0 | 3 | mit | 6027d67ee66a3daa164111853fe8486f38fe1565 | juliaelman/juliaelman.github.io,juliaelman/juliaelman.github.io,juliaelman/juliaelman.github.io | assets/js/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(document).ready(function () {\n\n /* Add the current year to the footer */\n function getYear() {\n var d = new Date();\n var n = d.getFullYear();\n return n.toString();\n }\n $('#year').html(getYear()... | javascript | edit | 0 | 3 | mit | 2b71556bc6b95624f91a883745258b8cd69801a1 | MasterRoot24/masterroot24.github.io,MasterRoot24/masterroot24.github.io,MasterRoot24/masterroot24.github.io | assets/js/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport layout from './template';\n\n/**\n * Modal that provides examples and explanation of Lucene Search syntax\n *\n * ```handlebars\n * {{search-help-modal\n * isOpen=isOpen\n * }}\n * ```\n * @class ... | javascript | edit | 0 | 1 | apache-2.0 | d28f7b13bdc449a8b2ab39e8aa41a5be0c63a692 | jamescdavis/ember-osf,baylee-d/ember-osf,binoculars/ember-osf,binoculars/ember-osf,baylee-d/ember-osf,jamescdavis/ember-osf,crcresearch/ember-osf,chrisseto/ember-osf,CenterForOpenScience/ember-osf,chrisseto/ember-osf,crcresearch/ember-osf,CenterForOpenScience/ember-osf | addon/components/search-help-modal/component.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\nimport { TOGGLE_EVENT_MODAL } from '../actions/index';\n\n\nexport default function eventEditingModal(state = false, action) {\n switch (action.type) {\n case TOGGLE_EVENT_MODAL:\n console.log(`Action ${action.ty... | javascript | edit | 0 | 2 | mit | 17ed9829d5042340f67eeca7b8231a08fa35f941 | IsenrichO/react-timeline,IsenrichO/react-timeline | app/reducers/editEventModal.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { takeLatest } from 'redux-saga/effects';\n\nimport {\n ME_FROM_TOKEN,\n} from './constants';\n\nfunction* getMeFromToken() {\n\n}\n\nfunction* meData() {\n yield takeLatest(ME_FROM_TOKEN, getMeFromToken);\n}\n\nexport default ... | javascript | edit | 0 | 2 | mit | 87374dd5e6e48b3a4a96bac9e845664ce0c330c7 | tinysoft-ph/baiji-ui,tinysoft-ph/baiji-ui | app/containers/App/sagas.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport logo from './logo.svg';\nimport './App.css';\n\nclass App extends Component {\n render() {\n return (\n <div className=\"App\">\n <div className=\"App-header\">\n ... | javascript | edit | 0 | 1 | mit | d6a7f211850f9b1b6c6a3a0ab17d72dfce38568a | ldimitrov/todo_react,ldimitrov/todo_react | src/App.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\n/*!\n * thoughtful-release <https://github.com/nknapp/thoughtful-release>\n *\n * Copyright (c) 2015 Nils Knappmeier.\n * Released under the MIT license.\n */\n\n'use strict'\n\nvar program = require('commander')\... | javascript | edit | 0 | 1 | mit | 6f70f049f5e5e4a98eb38352d8f278fa8d77132f | nknapp/thoughtful-release,nknapp/thoughtful-release,nknapp/thoughtful-release | bin/thoughtful.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { mount } from 'enzyme';\nimport { createStore } from 'redux';\n\nimport Phone from '../dev-server/Phone';\nimport App from '../dev-server/containers/App';\nimport brandConfig from '../dev-server/brand... | javascript | edit | 0 | 2 | mit | 3edaf73ce8b9eddb926be3ca50c57097a587410e | u9520107/ringcentral-js-widget,u9520107/ringcentral-js-widget,ringcentral/ringcentral-js-widget,ringcentral/ringcentral-js-widget,ringcentral/ringcentral-js-widget,u9520107/ringcentral-js-widget | test/shared.js | rejected_duplicate | Near-duplicate of sample 87812 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport update from 'lodash/fp/update'\n\nimport db from '../pouchdb'\nimport { keyRangeForPrefix } from '../pouchdb'\nimport { pageKeyPrefix } from '../activity-logger'\nimport { searchableTextFields, revisePageFields } from '../page-an... | javascript | edit | 0 | 2 | mit | 956b553dac919df4cb90421aeeb094a9a3842eaf | WorldBrain/WebMemex,WorldBrain/WebMemex | src/search/find-pages.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// DOM Ready\n$(function() {\n\n\t// SVG fallback\n\t// toddmotto.com/mastering-svg-use-for-a-retina-web-fallbacks-with-png-script#update\n\tif (!Modernizr.svg) {\n\t\tvar imgs = document.getElementsByTagName('img');\n\t\tfor (var i = 0... | javascript | edit | 0 | 4 | mit | c35681ea6b8a6e0a0d1c3e6f9b86f161767a1d41 | parkermaughan/meetthemaughans,solutionio/html5blank,johngibbons/creativebasis,martinleopold/prcs-website,sqmunson/xpat,Acrata/voilarts,Montana-Studio/Mediakit,LA1CH3/QuillXrpm,GuiHarrison/siteArtOuro,Acrata/voilarts,Hemisphere-Project/html5blank,dydx/html5blank,solutionio/html5blank,grischka/html5blank,jeromelachaud/S2... | js/scripts.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar config = require('config');\nvar express = require('express');\nvar bodyParser = require('body-parser');\nvar ircdispatcher = require('./lib/ircdispatcher');\nvar messageparser = require('./lib/messageparser');\nvar l = require('./l... | javascript | edit | 0 | 3 | mit | 9e104db2e1eea685f0f50e8a46b2a91c3b5b2755 | torarvid/slackirc | server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function() {\n\n // Creates an iframe with an embedded HipChat conversation window.\n //\n // Options:\n // url - The url to the room to embed; required\n // el - The container in which to insert the HipChat pane... | javascript | edit | 0 | 10 | bsd-2-clause | 0ec5383ea4506399be04713c0809f948dd053e38 | chop-dbhi/harvest-site | js/hipchat.js | rejected_duplicate | Near-duplicate of sample 83751 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { BrowserRouter } from 'react-router-dom';\nimport { Provider } from 'react-redux';\nimport 'bootstrap/dist/css/bootstrap.css';\nimport registerServiceWorker from './... | javascript | edit | 0 | 1 | mit | 62c3bc3da6743ce2d69c6b9ec4835f18a416dc14 | ivosh/jcm2018,ivosh/jcm2018,ivosh/jcm2018 | ui/src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nconst path = require(\"path\");\nconst env = process.env.NODE_ENV || \"development\";\nconst config = require(path.join(__dirname, \"config/config\"))(env);\n\nif (env === \"test\" || process.env.PMX) {\n\trequire(\"p... | javascript | edit | 0 | 2 | mit | da0af6773f05d808cbf7f8d5b6a9d94bff44885e | cblanc/postcodes.io,ideal-postcodes/postcodes.io,cblanc/postcodes.io,ideal-postcodes/postcodes.io,ideal-postcodes/postcodes.io,cblanc/postcodes.io | server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\nconst MongoClient = require('mongodb').MongoClient;\nconst ObjectId = require('mongodb').ObjectID;\n\nmodule.exports = (mongodbUrl) => {\n\n async function getQuestionnaires() {\n // TODO: Mongodb-kutsu\n return n... | javascript | edit | 0 | 2 | mit | b60bd6709441fc75c14aa90669aefe4dc443d15a | filosofianakatemia/questionnaire-core | src/bl.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar express = require('express'),\n pages = require('./routes/pages.js'),\n signup = require('./routes/signup.js'),\n flash = require('connect-flash'),\n auth = require('./modules/auth.js');\n\nvar app = express();\n\n// Configurati... | javascript | edit | 0 | 0 | apache-2.0 | 0358d01f230707e64f9c7298d8a8d34593fb8943 | with-regard/regard-website | server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function(config) {\n\tconfig.set({\n\t\tbasePath: '',\n\t\tframeworks: ['jasmine'],\n\t\tfiles: [\n\t\t\t'https://ajax.googleapis.com/ajax/libs/angularjs/1.2.17/angular.min.js',\n\t\t\t'https://code.angularjs.org/1.2.17... | javascript | edit | 0 | 2 | bsd-2-clause | b452560bcaf90ea6e6b01e10797b4991980081e5 | SonicHedgehog/angular-progress-button,SonicHedgehog/angular-progress-button | karma.conf.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Copyright 2017 TODO Group. All rights reserved.\n// Licensed under the Apache License, Version 2.0.\n\nconst isWindows = require('is-windows')\nconst spawnSync = require('child_process').spawnSync\n\nmodule.exports = function (target... | javascript | edit | 0 | 4 | apache-2.0 | 042aa373b77f40b6b49e60b96eb36fdb6034e257 | todogroup/repolinter,trevmex/repolinter,todogroup/repolinter,trevmex/repolinter | rules/license-detectable-by-licensee.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport actionTypes from '../constants';\n\nconst initialState = {\n canManageLessonPlan: false,\n milestonesExpanded: 'all',\n};\n\nexport default function (state = initialState, action) {\n const { type } = action;\n\n switch (type... | javascript | edit | 0 | 3 | mit | 92b505ae8dc9d0e94c961248f53e72604aaf54d8 | cysjonathan/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2,cysjonathan/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2,Coursemology/coursemology2,cysjonathan/coursemology2 | client/app/bundles/course/lesson-plan/reducers/flags.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Copyright 2017 TODO Group. All rights reserved.\n// Licensed under the Apache License, Version 2.0.\n\nconst spawnSync = require('child_process').spawnSync\n\nmodule.exports = function (targetDir, options) {\n const expected = '\\nL... | javascript | edit | 0 | 4 | apache-2.0 | f511803a3d2dc360c3795e1a5c80931bf7759d68 | todogroup/repolinter,trevmex/repolinter,trevmex/repolinter,todogroup/repolinter | rules/license-detectable-by-licensee.js | rejected_duplicate | Near-duplicate of sample 93885 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Request = require('./request'),\n _ = require('lodash');\n\nmodule.exports = Heroku;\n\nfunction Heroku (options) {\n this.options = options;\n}\n\nHeroku.configure = function (config) {\n if (config.cache) {\n Request... | javascript | edit | 0 | 2 | mit | 4e572e318494cef8cefe45a64d5420be65abd3e6 | jclem/node-heroku-client,jclem/node-heroku-client,heroku/node-heroku-client | lib/heroku.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nRouter.configure({\n layoutTemplate: 'layout'\n});\n\nRouter.map(function(){\n this.route('home', {\n path: '/',\n template: 'home'\n });\n\n // Other routes\n this.route('about');\n this.route('work');\n this.route('contac... | javascript | edit | 0 | 1 | mit | b155f48fcbcba8df5de3a96a373cbf4f5dcd2013 | pH-7/pH7Ortfolio,pH-7/pH7Ortfolio | lib/router.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar mod = require('module');\n\nmodule.exports = function (path, mocks) {\n // Reference to the original require function\n var require = mod.prototype.require;\n\n // Overwrite the require function\n mod.prototype.require = functio... | javascript | edit | 0 | 2 | mit | 74417176676690b677895a7fef5adc722e753139 | mlmorg/mockit | lib/mockit.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar r = require('rethinkdb');\nvar redditBot = require('../reddit/contexts/bot.js');\n\nmodule.exports = function authBotCtor(cfg, env) {\n var botAuthReddit = redditBot(cfg);\n\n return function authBot(req, res, next) {\n botAuth... | javascript | edit | 0 | 1 | mit | 4ac850b7bfbda143572942ec8f962632fd48f22b | stuartpb/QIKlaxonBot,stuartpb/QIKlaxonBot | lib/middleware/authBot.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nif (!global.requestAnimationFrame) {\n global.requestAnimationFrame = function(callback) {\n setTimeout(callback, 0);\n };\n}\n\n```\n\nApply this change: Fix unnamed function ESLint warning"
},
{
"role": "assistant",
"... | javascript | edit | 0 | 1 | mit | d113834c865f6ef9a5e94c9824d09e4e1742b983 | wojtekmaj/react-calendar,wojtekmaj/react-calendar,wojtekmaj/react-calendar | jest.shim.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n \"env\": {\n \"browser\": true,\n \"es6\": true,\n \"node\": true\n },\n \"globals\": {\n \"describe\": false,\n \"it\": false\n },\n \"extends\": [\"eslint:recommended\", \"plugin:react/recommen... | javascript | edit | 0 | 0 | mit | d242ac2952f575fb846f6677aa9cdba6b0b061fa | tnewell5/remote_retro,samdec11/remote_retro,stride-nyc/remote_retro,stride-nyc/remote_retro,tnewell5/remote_retro,stride-nyc/remote_retro | .eslintrc.js | rejected_duplicate | Near-duplicate of sample 82712 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { ProductsCollection } from 'meteor/moreplease:common';\n\nconst productIndexes = [\n { productId: 1 },\n { variationId: 1 },\n { storeId: 1 },\n];\n\nproductIndexes.forEach((index) => {\n ProductsCollection.rawCollection().c... | javascript | edit | 0 | 1 | mit | c5046367ab151ddb012041c584f26bcf034edd19 | hwillson/moreplease-open,hwillson/moreplease-open | apps/admin/imports/startup/server/mongo-config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar text = \"'I'm the cook,' he said, 'it's my job.'\";\n\nconsole.log(\n text.replace(/([a-z])'([a-z])/gi, \"$1~~$2\")\n .replace(/'/g, \"\\\"\")\n .replace(/~~/g, \"'\"));\n\n```\n\nApply this change: Add Chapter ... | javascript | edit | 0 | 0 | mit | 6a7dc4f4e3e1e0ac0bd3922f022ce08b12ffd535 | bewuethr/ctci | eloquent_js_exercises/chapter09/chapter09_ex02.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Avoid recursive frame insertion...\nvar extensionOrigin = 'chrome-extension://' + chrome.runtime.id;\nif (!location.ancestorOrigins.contains(extensionOrigin)) {\n var links = document.getElementsByTagName('a');\n var pdfLinks = [];... | javascript | edit | 0 | 2 | mit | e68462264402c61ab3802657a6dce054e40d9ec0 | Wiredcraft/gdocs-preview,Wiredcraft/gdocs-preview | contentscript.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar sga = require(\"__buttercup/classes/commands/command.sga.js\");\n\nmodule.exports = {\n setUp: function(cb) {\n this.command = new sga();\n (cb)();\n },\n\n errors: {\n groupNotFoundForId: function(test) {\n var fak... | javascript | edit | 0 | 3 | mit | ea76a4b3f63f0d6ddddca7c428ea497ed7da0f6a | perry-mitchell/buttercup-core,buttercup/buttercup-core,buttercup/buttercup-core,perry-mitchell/buttercup-core,buttercup/buttercup-core,buttercup-pw/buttercup-core,buttercup-pw/buttercup-core | tests/commands/sgaTests.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\n\nclass Response {\n constructor(messenger, msg) {\n this.messenger = messenger\n this.queue = msg.properties.replyTo\n this.corr = msg.properties.corr\n }\n\n send (msg) {\n if(this.queue){\n this.me... | javascript | edit | 0 | 2 | mit | 96258a4d3e3b592d11de3a2edfceb874129be270 | domino-logic/domino-actor-service | Response.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar fs = require(\"fs\");\nvar path = require(\"path\");\nvar spawn = require(\"cross-spawn\");\nvar glob = require(\"glob\");\nvar path = require(\"path\");\n\n// get packages paths\nvar packages = glob.sync(path.join(__dirname, \"../p... | javascript | edit | 0 | 3 | mit | 9739dd717a7a284f15814ec0fe52a77efb1f2856 | DigitalRiver/react-atlas,Magneticmagnum/react-atlas | scripts/buildPackages.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport {List, Map} from 'immutable';\n\nexport function setEntries(state, entries) {\n return state.set('entries', List(entries));\n}\n\nexport function next(state) {\n const entries = state.get('entries');\n return state.merge... | javascript | edit | 0 | 4 | mit | 78789e7b62e11c1e242037481b03dc03185eca93 | captainsafia/dusclops,captainsafia/dusclops | voting-server/src/core.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n //description: '',\n normalizeEntityName: function() {}, // no-op since we're just adding dependencies\n\n // locals: function(options) {\n // // Return custom template variables here.\n // return {\n // ... | javascript | edit | 0 | 1 | mit | fac54d5ba2296bd891dc60da065f7503af984f4e | 74monkeys/ember-cli-latex-maths,74monkeys/ember-cli-latex-maths | blueprints/ember-cli-latex-maths/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function(){\n var message = 'Ya been pwned by an XSS from an unsanitized script tag injection.';\n if(alertify){\n alertify.error(message);\n } else {\n document.body.innerHTML = '<h1>' + message + '</h1>';\n };\n})();\n\n```... | javascript | edit | 0 | 2 | apache-2.0 | d2a2e43c5e5561ab1601e64fcfbfe8be864eda5e | CDCgov/MicrobeTRACE,CDCgov/MicrobeTRACE | test/security/pwn.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { DragDropContext } from 'react-dnd';\nimport DraggableContext from './draggable-context';\n\nfdescribe('DraggableContext', () => {\n\n it('is wrapped in a DragDropContextContainer', () => {\n expe... | javascript | edit | 0 | 1 | apache-2.0 | c4b6024abd81b33562c78c343ecb99e0210ecfb5 | Sage/carbon,Sage/carbon,Sage/carbon | src/components/with-drag-and-drop/draggable-context/__spec__.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar autoprefix = require(\"gulp-autoprefixer\"),\n connect = require(\"gulp-connect\"),\n gulp = require(\"gulp\"),\n sass = require(\"gulp-sass\");\n\nvar paths = {\n scss: [\n \"./core/**/*.scss\",\n \".... | javascript | edit | 0 | 1 | mit | 0c0c53589a54fb7f91f8100c5a3d4929bd00f1ff | thoughtbot/neat,thoughtbot/neat,thoughtbot/neat | Gulpfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(function() {\n var markdownTable = $('.markdown-table-wrap');\n\n if (markdownTable.length) {\n $('<button class=\"btn btn--mobile-table-show\">View table</button>').insertAfter(markdownTable);\n $('<button class=\... | javascript | edit | 0 | 2 | mit | 66d067a35ed2fcaf9decaad683ebeb2f563b2117 | ONSdigital/babbage,ONSdigital/babbage,ONSdigital/babbage,ONSdigital/babbage | src/main/web/js/app/mobile-table.js | rejected_duplicate | Near-duplicate of sample 93030 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\n'use strict';\n\nvar throbber = require('../../lib/throbber')\n , interval = require('clock/lib/interval')\n , format = require('../../lib/index').red;\n\nvar i = interval(100, true);\n\nthrobber(i, format);\n... | javascript | edit | 0 | 0 | isc | 5f9703e389ba0ab7471ef4d3f41b9f07b9198f71 | medikoo/cli-color,ralphtheninja/cli-color | test/__playground/throbber.formatted.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Requires\nvar _ = require('underscore');\nvar DeploymentSolution = require(\"./solution\").DeploymentSolution;\n\n// List of all deployment solution\nvar SUPPORTED = [];\n\nfunction setup(options, imports, register) {\n // Import\... | javascript | edit | 0 | 2 | apache-2.0 | 7a8f39067376f44c30b688e960d980b1cafe2337 | blubrackets/codebox,fly19890211/codebox,rajthilakmca/codebox,CodeboxIDE/codebox,LogeshEswar/codebox,blubrackets/codebox,CodeboxIDE/codebox,quietdog/codebox,smallbal/codebox,rajthilakmca/codebox,Ckai1991/codebox,ahmadassaf/Codebox,Ckai1991/codebox,code-box/codebox,ronoaldo/codebox,quietdog/codebox,listepo/codebox,rodrig... | core/cb.project.deploy/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar argscheck = require ('cordova/argscheck')\nvar exec = require ('cordova/exec')\n\nmodule.exports = function () {\n var exports = {}\n \n exports.getPlayerId = function (init) {\n var success = (typeof init.success != \"undefin... | javascript | edit | 0 | 1 | mit | 95fb0e2af62acc4b3ea4d88e1832325807467143 | agamemnus/googleplayservices,agamemnus/googleplayservices | www/googleplayservices.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction CodeBlockDefinition() {\r\n window.wagtailStreamField.blocks.StructBlockDefinition.apply(this, arguments);\r\n}\r\n\r\nCodeBlockDefinition.prototype.render = function(placeholder, prefix, initialState, initialError) {\r\n ... | javascript | edit | 0 | 1 | bsd-3-clause | 906ef441890ad31529db727b06d133318e0c4dec | FlipperPA/wagtailcodeblock,FlipperPA/wagtailcodeblock,FlipperPA/wagtailcodeblock | wagtailcodeblock/static/wagtailcodeblock/js/wagtailcodeblock.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst path = require('path');\nconst nodeExternals = require('webpack-node-externals');\n\nmodule.exports = {\n entry: './src/handler.js',\n target: 'node',\n externals: [nodeExternals()],\n module: {\n loaders: [{\n test: /... | javascript | edit | 0 | 0 | mit | 89ab12e6324f4d6fc32280f244bb91cea81482dd | serverless-heaven/serverless-webpack,elastic-coders/serverless-webpack | examples/serverless-offline/webpack.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n detail: require('./detail'),\n search: require('./search')\n};\n\n```\n\nApply this change: [detail] Add a function to ease page creation."
},
{
"role": "assistant",
"content": "//Dependency\nvar React... | javascript | edit | 0 | 3 | mit | 462fa68d7ea0c6eb1bf5e4230c519a1e0be3cf95 | JRLK/focus-components,Ephrame/focus-components,asimsir/focus-components,Jerom138/focus-components,Ephrame/focus-components,JRLK/focus-components,sebez/focus-components,KleeGroup/focus-components,JabX/focus-components,Bernardstanislas/focus-components,KleeGroup/focus-components,anisgh/focus-components,Jerom138/focus-com... | page/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst express = require('express');\n\nmodule.exports = init => {\n const app = express();\n app.disable('x-powered-by');\n\n init(app, express);\n\n const port = process.env.PORT;\n if (!port) {\n throw new Error('missing port'... | javascript | edit | 0 | 2 | mit | c867172e874a73de564c6900c8fbf04b25970f26 | sharaal/dnode,sharaal/dnode | packages/express/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar EventEmitter = require('events').EventEmitter;\n\nfunction ClientPool(){\n\tvar list = {};\n\tvar client_pool = this;\n\tthis.list = list;\n\tthis.count = 0;\n\t\n\t//called in the context of the client (this = client)\n\tthis._on_c... | javascript | edit | 0 | 8 | mit | 78b6190949440e1b6fbf855780d7374af125218d | iFixit/wompt.com,iFixit/wompt.com,Wompt/wompt.com,Wompt/wompt.com,iFixit/wompt.com,Wompt/wompt.com,iFixit/wompt.com | nodejs/lib/client_pool.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar pg = require('pg');\n\nvar query = function(connectionString, query, params, callback) {\n // handle case where params are omitted\n if (arguments.length === 3) {\n callback = params;\n params = [];\n }\n\n pg.connect(conn... | javascript | edit | 0 | 2 | apache-2.0 | 73b5491320293ab800c181188fa99f01a2a741fd | andreineculau/atlasboard | lib/job-dependencies/postgreSQL/dependency.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nLizard.collections.Layer = Backbone.Collection.extend({\n\tparse: function(response){\n\t\treturn response.results\n\t},\n\n\turl: local_settings.layers_url,\n\tmodel: Lizard.models.Layer\n});\n\n```\n\nApply this change: Fix way to spe... | javascript | edit | 0 | 1 | mit | 2a104695e7aaf1d2155c0fded2dfff6b7cf46bab | ddsc/webclient,ddsc/webclient,ddsc/webclient | app/scripts/lizard/collections/Layer.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function (config) {\n config.set({\n basePath: './',\n frameworks: ['jasmine'],\n browsers: ['Chrome', 'Firefox', 'PhantomJS'],\n files: [\n 'bower_components/angular/angular.js',\n 'bower_compone... | javascript | edit | 0 | 1 | mit | 8f562deaadd565ff764f12d943abf5d80ffd085d | onumossn/ng-restful-collection | karma.conf.js | rejected_duplicate | Near-duplicate of sample 72563 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nHandlebars.registerHelper('isActive', function (siteName) {\n var current = Router.current();\n\n if ('undefined' !== typeof current && current !== null) {\n return current.route.name == siteName ? 'active' : 'not-active';\... | javascript | edit | 0 | 5 | mit | e34ba27ed58cfcfffe2042b2a2638603875b6b59 | josephdburdick/meteor-boilerplate,PankajJatav/meteor-boilerplate,harinanda/groupcart,PankajJatav/meteor-boilerplate,matteodem/starthacking,Karl-PeterNos/fps02,matteodem/meteor-boilerplate,harinanda/groupcart,cbranch101/meteor-boilerplate,RolandTa/vital,josephdburdick/meteor-boilerplate,meteorologist0/meteor-boilerplate... | client/lib/handlebar_helpers.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Karma configuration file, see link for more information\n// https://karma-runner.github.io/0.13/config/configuration-file.html\n\nmodule.exports = function (config) {\n var configuration = {\n basePath: '',\n frameworks: ['jas... | javascript | edit | 0 | 2 | mit | e3cadadfaeade137af5189346dc502a6c3bf9630 | gund/ng-http-interceptor,gund/ng2-http-interceptor,gund/ng2-http-interceptor,gund/ng2-http-interceptor,gund/ng-http-interceptor,gund/ng-http-interceptor | karma.conf.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar es = require('event-stream'),\n\tpath = require('path'),\n\tzlib = require('zlib');\n\nvar compressibles = [\n\t'.js',\n\t'.json',\n\t'.css',\n\t'.html'\n];\n\nfunction isCompressibleFile( file ) {\n\tvar ext = path... | javascript | edit | 0 | 2 | apache-2.0 | 2d01b049d395b634a41d22360a12f83ed6d41bda | j3parker/frau-publisher,j3parker/frau-publisher | src/compressor.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// start the web server. (we'll soon write a dedicated script to do this.)\nif (module.id === require.main) {\n require('ringo/httpserver').start();\n}\n\n```\n\nApply this change: Make jsgi demo app run again"
},
{
"role": "... | javascript | edit | 0 | 0 | apache-2.0 | 160ea44513d40317bc94135d123a9c11f8bb4503 | ashwinrayaprolu1984/ringojs,ringo/ringojs,Transcordia/ringojs,ashwinrayaprolu1984/ringojs,ashwinrayaprolu1984/ringojs,ashwinrayaprolu1984/ringojs,Transcordia/ringojs,ringo/ringojs,ringo/ringojs,oberhamsi/ringojs,ringo/ringojs,Transcordia/ringojs,oberhamsi/ringojs,oberhamsi/ringojs,Transcordia/ringojs | apps/jsgi/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*!\n * node-sass: lib/errors.js\n */\n\nvar sass = require('./extensions'),\n pkg = require('../package.json');\n\nfunction humanEnvironment() {\n return sass.getHumanEnvironment(sass.getBinaryName());\n}\n\nfunction foundBinaries() ... | javascript | edit | 0 | 1 | mit | 57c8b590fef43a6ac815b56ddce91ceb318c9818 | xzyfer/node-sass,nschonni/node-sass,saper/node-sass,sass/node-sass,xzyfer/node-sass,sass/node-sass,saper/node-sass,nschonni/node-sass,xzyfer/node-sass,nschonni/node-sass,nschonni/node-sass,sass/node-sass,sass/node-sass,nschonni/node-sass,saper/node-sass,nschonni/node-sass,saper/node-sass,xzyfer/node-sass,saper/node-sas... | lib/errors.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * @typedef {object} ConfigFieldBaseType\n */\nclass ConfigFieldBaseType {\n /**\n * Array of validators for this type\n * @type {function.<boolean>[]}\n */\n validators = [];\n\n /**\n * @type {{pre: function[], post: f... | javascript | edit | 0 | 1 | mit | 7ba516c78b641acd525f560b4806c5a3243b1a17 | TeslaCtroitel/twconf | src/types/base.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport moment from 'moment'\n\nconst LastHarvesting = ({harvest}) => {\n const color = harvest.status === \"successful\" ? \"green\" : \"red\"\n const date = new Date(harvest.finishedAt).getTime()\n const h... | javascript | edit | 0 | 2 | mit | 5366e6ed2cac6714071751286b90e026c62a2848 | sgmap/inspire,sgmap/inspire | src/LastHarvesting/LastHarvesting.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#pragma strict\n\nvar skin : GUISkin;\n\nfunction Start() {\n#if UNITY_IPHONE\n Social.localUser.Authenticate(function(result : boolean){});\n#endif\n\n // Set the fintering mode of the GUI font to point-sampling.\n // (I kno... | javascript | edit | null | null | mit | cc255b2e9927457a43d6e844d693e1b607111d60 | keijiro/yamada | Assets/Scripts/System/Startup.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst path = require('path')\n\n// commonjs module\nmodule.exports = {\n context: __dirname,\n entry: './js/ClientApp.js',\n devtool: 'eval',\n output: {\n path: path.join(__dirname, '/public'),\n filename: 'bundle.js'\n },\n... | javascript | edit | 0 | 0 | mit | c3577b8616c3f7f551c370d8ba7733de84b3385b | dianafisher/FEM-complete-intro-to-react,dianafisher/FEM-complete-intro-to-react | webpack.config.js | rejected_duplicate | Near-duplicate of sample 90425 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n/* Controllers */\nvar demoControllers = angular.module('demoControllers', []);\n\ndemoControllers.controller('NodeCtrl', ['$scope', '$routeParams', 'DemoSession',\n function ($scope, $routeParams, DemoSession) {\n ... | javascript | edit | 0 | 3 | mit | dcd6867c7823c5855f03db09fdcc52f30b8dd116 | metacosm/jcrestapi-angular-demo | app/js/controllers.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar VarsApp = {\n baseUrl : '/delibouquet-git/delibouquet/app',\n autor : \"Biellcon Digital\"\n};\n\nrequire.config({\n baseUrl: VarsApp.baseUrl,\n urlArgs: 'v=1.0'\n});\n\nrequire(\n [\n 'app',\n 'services... | javascript | edit | 0 | 1 | mit | e4729b0194d7c48de0f2a9b66c747caa44f618b9 | BiellconDigital/delib-frontend,BiellconDigital/delib-frontend,BiellconDigital/delib-frontend | app/js/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\nconst webpack = require('webpack')\nconst path = require('path')\n\nconst configuration = {\n entry: [\n 'webpack-dev-server/client?http://localhost:8080',\n 'webpack/hot/only-dev-server',\n path.resolve(__dirn... | javascript | edit | 0 | 0 | mit | 49f22aa4b39419e0a4bc841992f56f0e1a4900b5 | rhberro/the-react-client,rhberro/the-react-client | webpack.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport lbry from '../lbry.js';\nimport {BusyMessage, Icon} from './common.js';\n\nvar LoadScreen = React.createClass({\n propTypes: {\n message: React.PropTypes.string.isRequired,\n details: React.Prop... | javascript | edit | 0 | 3 | mit | 810b94fa77b65f0d5dc49fa354c60c2b96146b4f | lbryio/lbry-electron,lbryio/lbry-electron,lbryio/lbry-electron,MaxiBoether/lbry-app,akinwale/lbry-app,jsigwart/lbry-app,akinwale/lbry-app,jsigwart/lbry-app,lbryio/lbry-app,lbryio/lbry-app,MaxiBoether/lbry-app,MaxiBoether/lbry-app,MaxiBoether/lbry-app,akinwale/lbry-app,jsigwart/lbry-app,akinwale/lbry-app,jsigwart/lbry-a... | js/component/load_screen.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nconst webpack = require('webpack');\n\nmodule.exports = {\n entry: './app.js',\n\n output: {\n filename: 'bundle.js'\n },\n\n devtool: \"source-map\",\n\n module: {\n loaders: [{\n test: /\\.js$... | javascript | edit | 0 | 0 | mit | 858da06acc3fa4dd29275faf583cc1eb19f623c1 | vladimirgamalian/TheTurkBot,vladimirgamalian/TheTurkBot | webpack.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * skip-link-focus-fix.js\n *\n * Helps with accessibility for keyboard only users.\n *\n * Learn more: https://github.com/Automattic/_s/pull/136\n */\n( function() {\n\tvar is_webkit = navigator.userAgent.toLowerCase().indexOf( 'w... | javascript | edit | 0 | 6 | mit | 1703c44679f6f9e14369c56e7bc75dae0e48ee3c | vaishaliagola27/_s,vaishaliagola27/_s,andbaz/launchbaz,carl-alberto/business-portfolio,vaishaliagola27/_s,carl-alberto/business-portfolio,andbaz/launchbaz | js/skip-link-focus-fix.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*jslint node: true */\n/*global ZeroClipboard */\n'use strict';\n\nangular.module('ngClipboard', []).\n provider('ngClip', function() {\n var self = this;\n this.path = '//cdnjs.cloudflare.com/ajax/libs/zeroclipboard/1.3.2/ZeroC... | javascript | edit | 0 | 2 | mit | 52484676a4afbae70869184d9330c5a3f06604b1 | huayun321/ng-clip,asafdav/ng-clip,dtagdev1/ng-clip,ptheofan/ng-clip,Falci/ng-clip,asafdav/ng-clip,Falci/ng-clip,ptheofan/ng-clip,dtagdev1/ng-clip,robinpowered/ng-clip,huayun321/ng-clip | src/ngClip.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// @flow\nimport net from 'net';\n\nimport config from './config/server';\n\nconst server = net.createServer();\n\nserver.on('connection', socket => {\n socket.on('data', data => {\n console.log(data.toString('utf-8'));\n });\n});\... | javascript | edit | 0 | 1 | mit | 158488fae9245db4fd44afcc2c48c0c141b99f92 | IvanKuzyshyn/essential-http-server,IvanKuzyshyn/essential-http-server | src/server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n* Find elements in an array-like object that satisfy a test condition.\n*\n* @module @stdlib/utils/find\n*\n* @example\n* var find = require( '@stdlib/utils/find' );\n*\n* var data = [ 30, 20, 50, 60, 10 ];\n*\n* f... | javascript | edit | 0 | 0 | apache-2.0 | 79a8dbcddb7b0065541eaabaf7c8ee718be26e80 | stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib | lib/node_modules/@stdlib/utils/find/lib/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Created by ChengFuLin on 2015/5/11.\n */\nvar VarDef = require('./vardef'),\n Def = require('./def'),\n varFactory = require('./varfactory'),\n defFactory = require('./deffactory');\n\n/**\n * Factory of VarDef object\n... | javascript | edit | 0 | 4 | mit | 0b2fc1f301f96a9f8d2d92381e015b5d62135a0c | chengfulin/dujs,chengfulin/dujs | lib/dujs/vardeffactory.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar assert = require('assert');\nvar Metalsmith = require('metalsmith');\nvar frontmatter = require('../lib');\n\ndescribe('metalsmith-matters', function(){\n it('should add add metadata based on the frontmatter in the file', function(... | javascript | edit | 0 | 2 | mit | 6ceb946af0955c61e7701ced55f7d0f9d2182fcd | Ajedi32/metalsmith-matters | test/index.js | rejected_duplicate | Near-duplicate of sample 73870 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar select = require('cheerio-soupselect').select;\nvar coerce = require('../tools/coerce');\nvar debug = require('debug')('liftie:resort:saddleback');\n\nfunction parse(dom) {\n var liftStatus = {};\n\n var table = select(dom, '.repo... | javascript | edit | 0 | 2 | bsd-3-clause | 4961dc8f49f20b3f06d56777b7395d23c75bda2d | code42day/liftie,pirxpilot/liftie,code42day/liftie,pirxpilot/liftie,code42day/liftie,pirxpilot/liftie | lib/resorts/saddleback.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$('form').submit(function(event) {\n\tevent.preventDefault();\n\n\tvar movie = $('#movie'),\n\t\tid = $('#search-id').val();\n\n\tmovie.html('<img src=\"/static/img/loading.gif\">');\n\n\tvar request = $.getJSON('/movie/' + id + '/0/150... | javascript | edit | 0 | 2 | mit | d2dabb9ea8fde9497fc97160746a5ec66bc0f951 | renstrom/imdb-api,renstrom/imdb-api | static/js/main.js | rejected_duplicate | Near-duplicate of sample 69118 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// @flow\nimport { Map, Record } from 'immutable';\n\nexport type PlayerShape = {\n username: string,\n displayName: string,\n index: number,\n ready: boolean\n};\nexport type PlayerType = Record<PlayerShape>;\n\nconst PlayerRecord:... | javascript | edit | null | null | mit | 43c4c1dd418295f36f97cac2225a5190a83e85de | luxons/seven-wonders,luxons/seven-wonders,luxons/seven-wonders | frontend/src/models/players.js | rejected_syntax | Syntax error detected by tree-sitter | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.