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\nconst { get } = require('lodash')\nconst { client } = require('nightwatch-cucumber')\nconst { When } = require('cucumber')\n\nWhen(/^I (?:navigate|go|open|visit).*? `(.+)` page$/, async function (pageName) {\n try {\n const page = g... | javascript | edit | 0 | 1 | mit | b6a20c3154eee2e347fcb08d67673c98f3a56107 | uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend | test/acceptance/features/step_definitions/common.js | accepted | null | true |
[
{
"role": "user",
"content": "Write javascript code for the following: Read files with NodeJS script"
},
{
"role": "assistant",
"content": "var fs = require('fs');\nvar os = require('os');\n\nvar path = '../data/snippets';\n\nvar folders = fs.readdirSync(path);\nvar files = {};\n\nfolders.forEac... | javascript | new_file | 0 | 1 | apache-2.0 | afbbbee87cf24dfcbfb9c52928d7cfe68b7d4680 | Codeberry-Black/code-quiz,Codeberry-Black/code-quiz | node/ls.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nPackage.describe({\n summary: \"Reactive bootstrap modals for meteor\",\n version: \"1.0.4\",\n git: \"https://github.com/jchristman/reactive-modal.git\",\n name: \"jchristman:reactive-modal\"\n});\n\nPackage.on_use(function (api) {... | javascript | edit | 0 | 2 | mit | 4caea3daea0c05ac4b184daa61e4fdf11187c7b1 | jchristman/reactive-modal,jchristman/reactive-modal | package.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n// Load our requirements\nconst i18n = require('i18n'),\n path = require('path'),\n logger = require('../log');\n\n// Variables\nlet localeDir = path.resolve('./locales');\n\n// Configure the localization engi... | javascript | edit | 0 | 0 | apache-2.0 | cb9c6e73a80b833763c5d0a6bdfb2a25d358e3f9 | transmutejs/core | app/lib/lang/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n//////////////////////////////\n// Handles the Ticket model //\n//////////////////////////////\n\n'use strict';\n\nmodule.exports = function (sequelize, DataTypes) {\n var Ticket = sequelize.define('Ticket', {\n id: {\n ... | javascript | edit | 0 | 1 | mit | 12d31ec96802524deec6d3cb2b5345dd5e51a57b | buckutt/BuckUTT-pay,buckutt/BuckUTT-pay,buckutt/BuckUTT-pay | app/models/ticket.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar eslint = require('eslint')\nvar path = require('path')\nvar pkg = require('./package.json')\n\nmodule.exports = {\n bugs: pkg.bugs.url,\n cmd: 'standard',\n cwd: __dirname,\n eslint: eslint,\n eslintConfig: {\n configFile: p... | javascript | edit | 0 | 0 | mit | dd7471f84f28b222c1e085f666150b2222be6b37 | LinusU/standard,feross/standard,LinusU/standard,SimenB/standard,SimenB/standard,jasonpincin/standard,JedWatson/happiness,JedWatson/happiness,feross/standard,standard/standard,standard/standard | options.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * @copyright Copyright (c) 2012-2015 2amigOS! Consulting Group LLC\n * @link http://2amigos.us\n * @license http://www.opensource.org/licenses/bsd-license.php New BSD License\n */\nif (typeof dosamigos == \"undefined\" || !dosamig... | javascript | edit | 0 | 3 | bsd-3-clause | a0c52d88cb8836d9bc9532bbf885e91731365b8e | alexdin/yii2-ckeditor-widget,richardfan1126/yii2-ckeditor-widget,alexdin/yii2-ckeditor-widget,yangtoude/yii2-ckeditor-widget,richardfan1126/yii2-ckeditor-widget,yangtoude/yii2-ckeditor-widget,yangtoude/yii2-ckeditor-widget,richardfan1126/yii2-ckeditor-widget | src/assets/dosamigos-ckeditor.widget.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nPackage.describe({\n summary: \"meteor sql bindings for server-side calls\"\n});\n\nNpm.depends({ \"newrelic\": \"1.0.1\" });\n\nPackage.on_use(function(api) {\n if (api.export) api.export('newrelic', 'server');\t\n api.add_files('ne... | javascript | edit | 0 | 2 | mit | e1e087cd2531371c9450f6e3a079a05f6d3dc5c4 | andreioprisan/meteor-newrelic,mycartio/newrelic | package.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nPackage.describe({\n\tsummary: \"Methods to create admin role and add first admin user.\",\n version: \"0.1.0\",\n\tname: \"brylie:first-admin\",\n git: \"https://github.com/brylie/meteor-first-user-admin\"\n});\n\nPackage.on_use(func... | javascript | edit | 0 | 1 | mit | 011261eb9d8b673b6190139fa1ab8b2815c87cee | brylie/meteor-first-user-admin | package.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nthis.addEventListener('install', function(event) {\n event.waitUntil(\n caches.open('learn-memory').then(function(cache) {\n return cache.addAll([\n '/',\n '/stylesheets/styles.css',\n '/views/lessons-list.... | javascript | edit | 0 | 4 | mit | 46822d801d50990efa5892ccbe79be60884a8c3d | cedced19/learn-memory,cedced19/learn-memory | public/sw.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nclass Player {\n\n constructor({ socket }) {\n // The identifier for this player, unique on a per-room level\n this.id = Date.now();\n // The current socket assocuat\n this.socket = socket;\n // The player's total number... | javascript | edit | 0 | 1 | mit | dbd69a35dfddbe8d42f147680cb196e88c127abb | caleb531/connect-four | app/server/player.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction initSettings() {\n var globalSettings = getGlobalSettings();\n if (globalSettings['hw_accel']) {\n $('hw_accel').value = globalSettings['hw_accel'];\n }\n}\n\nfunction onForget() {\n resetSiteSchemes();\n loadSettingsDi... | javascript | edit | 0 | 2 | bsd-2-clause | 9573aa16fad08be19eb0ed138d45a20af0ea3787 | abstiles/deluminate,heyalexchoi/deluminate,heyalexchoi/deluminate,abstiles/deluminate,abstiles/deluminate | options.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nPackage.describe({\n name: 'nimblenotes:typed.js',\n version: '0.0.1',\n summary: 'Typed.js v1.1.1',\n git: 'https://github.com/NimbleNotes/nimblenotes-packages',\n documentation: 'README.md'\n});\n\nPackage.onUse(functio... | javascript | edit | 0 | 1 | mit | a3ae5d89bb4218700a898f7d3a203f06dc9c1398 | NimbleNotes/typed.js,NimbleNotes/typed.js | package.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar fs = require('fs'), files = fs.readdirSync('./lib/resources');\nvar resources = {}, resource, i = 0, l = files.length;\n\nfor(; i < l; i++) {\n resource = files[i];\n\n if(resource === 'index.js' ||\n r... | javascript | edit | 0 | 0 | mit | ced746b51521941263720a32e547a1ef69718ccc | lob/lob-node | lib/resources/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nPackage.describe({\n summary: \"Jade template language for Meteor\"\n});\n\nPackage._transitional_registerBuildPlugin({\n name: \"compileJade\",\n use: [\n \"underscore\",\n \"html-tools\",\n \"spacebars-compiler\",\n ],\n ... | javascript | edit | 0 | 1 | mit | a602da66da08edb7275a81d93ef648f7cfec3998 | waitingkuo/meteor-jade,mquandalle/meteor-jade,thr0w/meteor-jade,lawrenceAIO/meteor-jade,lawrenceAIO/meteor-jade,mquandalle/meteor-jade,thr0w/meteor-jade | package.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport localForage from 'localforage';\nimport { withClientState } from 'apollo-link-state';\nimport { DialerInfo } from './queries';\nimport { CONFERENCE_PHONE_NUMBER } from '../config';\n\nlet defaultPhoneNumber;\n(async () => {\n de... | javascript | edit | 0 | 2 | mit | 4d1308fd6783dcd71bff9f882f36a794d29d9f14 | callthemonline/simple-client-react,callthemonline/simple-client-react | src/graphql/state.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from \"react\";\nimport classes from \"./ShortSGonksRow.module.css\";\n\nconst ShortSGonksRow = (props) => {\n console.log(props);\n const getDiffIndicator = () => {\n const diff =\n props.datapoints[props.datapoi... | javascript | edit | 0 | 5 | apache-2.0 | fde93a8309639645a4964e5da178b945c0a5cf35 | googleinterns/sgonks,googleinterns/sgonks,googleinterns/sgonks,googleinterns/sgonks | project/frontend/src/components/SGonksLists/ShortSGonksList/ShortSGonksRow/ShortSGonksRow.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Note that this file is required before we install our Babel hooks in\n// ../tool-env/install-babel.js, so we can't use ES2015+ syntax here.\n\nvar win32Extensions = {\n node: \".exe\",\n npm: \".cmd\"\n};\n\n// The dev_bundle/bin c... | javascript | edit | 0 | 3 | mit | f08ea70a479182b76a14025e0daa3effaed56726 | Hansoft/meteor,mjmasn/meteor,mjmasn/meteor,chasertech/meteor,Hansoft/meteor,mjmasn/meteor,mjmasn/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,chasertech/meteor,chasertech/meteor,chasertech/meteor,Hansoft/meteor,mjmasn/meteor,chasertech/meteor,Hansoft/meteor,chasertech/meteor,mjmasn/meteor,chasertech/meteor,mjmas... | tools/cli/dev-bundle-bin-commands.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar mongoose = require('mongoose');\nvar Category = require('./category');\n\nvar productSchema = {\n name: {\n type: String,\n required: true\n },\n pictures: [{\n type: String,\n // pictures must start with http://\n ... | javascript | edit | 0 | 1 | mit | dd96f804152f475952703605e81f8d87fd41b7b1 | kevinlmh/Retail | product.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint-disable import/prefer-default-export */\nexport const getAdjustedStyle = (style, width, isLastCell) => {\n if (width && isLastCell) return { ...style, flex: width, borderRightWidth: 0 };\n if (width) return { ...style, flex:... | javascript | edit | 0 | 5 | mit | 5030ce17dc5cc74477a90aa295569ee00ea0f881 | sussol/mobile,sussol/mobile,sussol/mobile,sussol/mobile | src/widgets/DataTable/utilities.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport * as t from 'babel-types'\nimport { useMinify } from '../utils/options'\nimport { isStyled, isHelper } from '../utils/detectors'\n\nconst minify = (linebreak) => {\n const regex = new RegExp(linebreak + '\\\\s*', 'g')\n return ... | javascript | edit | 0 | 6 | mit | 24ede76ef8112b80abba942bba29295adfb0af03 | styled-components/babel-plugin-styled-components | src/visitors/minify.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar account = require('./account');\n\nexports.getInEverySystem = function (geom, callback) {\n\n var params = {\n geometry: geom,\n };\n\n $.ajax({\n url: '/api/geometry',\n method: 'POST', // get cannot have JSON body\n ... | javascript | edit | 0 | 1 | mit | e28b0f5e547b184ae82a6b9dfdd3bf1264671a73 | axelpale/tresdb,axelpale/tresdb | client/stores/geometry.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar mysql = require('mysql');\nvar connectionParams = require('../../config/connectionParams');\nfunction getConnection() {\n var connection = mysql.createConnection(connectionParams);\n return connection;\n}\n\nfunction Calibration(... | javascript | edit | 0 | 2 | mit | b1bebd76b9e2d1afaaa9d8c89c4f1711bd4eb44b | NESCent/fcdb-api,NESCent/fcdb-api | app/models/calibration.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport './App.css';\nimport './index.css';\nimport Rowbox from './components/Rowbox';\nimport IconRow from './components/IconRow';\n\nclass App extends Component {\n render() {\n return (\n... | javascript | edit | 0 | 1 | mit | 3624060ef75b1bb59563fc0f4b92f40df918fb7c | hinzed1127/fayraysite,hinzed1127/fayraysite | src/App.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function () {\n\t'use strict';\n\n\tArray.prototype.innerJoin = function (arr, outer, inner, result, comparer) {\n\t\tcomparer = comparer || linq.EqualityComparer;\n\t\tvar res = [];\n\n\t\tthis.forEach(function (t) {\n\t\t\tarr.where(... | javascript | edit | 0 | 6 | mit | 213cdf62510263c1de13cc2b400489bbd90f3676 | joaom182/linqjs,joaom182/linqjs | src/innerJoin.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar assert = require(\"assert\");\nvar {defer, promiseList} = require(\"ringo/promise\");\n\nexports.testPromiseList = function() {\n var d1 = defer(), d2 = defer(), d3 = defer();\n var l = promiseList(d1.promise, d2.promise, d3);... | javascript | edit | 0 | 1 | apache-2.0 | bf81b291c493476e9d5136b9b94b2db78e37c184 | oberhamsi/ringojs,oberhamsi/ringojs,ringo/ringojs,Transcordia/ringojs,Transcordia/ringojs,ringo/ringojs,ashwinrayaprolu1984/ringojs,ringo/ringojs,ashwinrayaprolu1984/ringojs,ashwinrayaprolu1984/ringojs,Transcordia/ringojs,ringo/ringojs,ashwinrayaprolu1984/ringojs,oberhamsi/ringojs,Transcordia/ringojs | test/ringo/promise_test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * Copyright (c) 2014-2020 Bjoern Kimminich.\n * SPDX-License-Identifier: MIT\n */\n\nconst chai = require('chai')\nconst expect = chai.expect\n\ndescribe('webhook', () => {\n const webhook = require('../../lib/webhook')\n\n const... | javascript | edit | 0 | 1 | mit | 13c11bbd78e2a71d6d8313f6d0985e20fa4091f5 | bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop | test/server/webhookSpec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine(['underscore', 'backbone.marionette', './LessonView'],\n function(_, Marionette, LessonView) {\n 'use strict';\n\n return Marionette.CollectionView.extend({\n el: $('#timetable'),\n childView: LessonView,\n childViewO... | javascript | edit | 0 | 4 | mit | a4648a1b8d1641a4e48dca50ba61378d377db855 | zhouyichen/nusmods,chunqi/nusmods,Yunheng/nusmods,nathanajah/nusmods,chunqi/nusmods,chunqi/nusmods,nathanajah/nusmods,chunqi/nusmods,nusmodifications/nusmods,zhouyichen/nusmods,Yunheng/nusmods,mauris/nusmods,Yunheng/nusmods,zhouyichen/nusmods,nusmodifications/nusmods,mauris/nusmods,nathanajah/nusmods,nusmodifications/n... | app/scripts/timetable_builder/views/TimetableView.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// scripts app\nvar app;\n(function(){\n\t\"use strict\";\n\tapp = new ElecionesApp();\n\tconsole.log(app);\n\t// load mapa\n\t$.get(\"img/mapaBA_SVG.txt\", function(mapa){\n\t\t$(\"#mapa_cont\").html(mapa);\n\t});\n\n\t$('select#opts')... | javascript | edit | 0 | 1 | mit | 44aa937a7747147218dbc06c7d12274dfc386330 | lanacioncom/elecciones_2015_caba,lanacioncom/elecciones_2015_caba,lanacioncom/elecciones_2015_caba,lanacioncom/elecciones_2015_caba | webapp/js/scripts.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar api = require(\"./webpack.config.defaults\")\n .entry(\"./src/server.js\")\n // @TODO Auto-installed deps aren't in node_modules (yet),\n // so let's see if this is a problem or not\n .externals(/^@?\\w[a-z\\-0-9\\./]+$/)\n // ... | javascript | edit | 0 | 1 | mit | d503494d18b3af9df9e27ddcc8eaa4c97914e9b8 | ericclemmons/terse-webpack | example/webpack.config.server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nangular.module('14all', ['ui.bootstrap','ngAnimate',\n 'auth',\n /* Modules */\n 'manga','movie','serie','anime','game','book',\n '14all.templates'])\n .config(['RestangularProvider',function(RestangularProvider){\n ... | javascript | edit | 0 | 3 | mit | 08a0186506afc46443f096607a861db740b89f28 | Opiskull/one4all | client/src/app/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint global-require: off, import/no-mutable-exports: off */\nimport merge from 'lodash/merge';\nimport flow from 'lodash/flow';\n\nconst environment = process.env.NODE_ENV || 'test';\n\nlet start = () => {};\n\nif (environment !== ... | javascript | edit | 0 | 4 | apache-2.0 | efccff1832c45d68b1111da230b561ece2698e54 | folio-org/stripes-core,folio-org/stripes-core,folio-org/stripes-core | test/bigtest/network/start.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar _ = require('underscore');\nvar cdb = require('cartodb.js');\nvar ChooseKeyColumnsModel = require('./choose_key_columns_model');\n\nmodule.exports = cdb.core.Model.extend({\n\n defaults: {\n illustrationIconType: 'IllustrationIc... | javascript | edit | 0 | 4 | bsd-3-clause | edc416dd7695afc273032209b7d7ea67abe9e7d9 | thorncp/cartodb,bloomberg/cartodb,CartoDB/cartodb,nyimbi/cartodb,nuxcode/cartodb,codeandtheory/cartodb,nuxcode/cartodb,dbirchak/cartodb,DigitalCoder/cartodb,future-analytics/cartodb,dbirchak/cartodb,thorncp/cartodb,UCL-ShippingGroup/cartodb-1,CartoDB/cartodb,bloomberg/cartodb,splashblot/dronedb,nyimbi/cartodb,dbirchak/... | lib/assets/javascripts/cartodb/common/dialogs/merge_datasets/column_merge/column_merge_model.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { createReducer } from 'redux-act';\n\nimport {\n queryEntities,\n queryEntitySetEntities,\n fetchEntity,\n createEntity,\n updateEntity,\n deleteEntity,\n} from 'actions';\nimport {\n objectLoadStart, object... | javascript | edit | 0 | 1 | mit | 9309f7a09c8d6af2b42946378bc3d4f87b888d62 | alephdata/aleph,alephdata/aleph,alephdata/aleph,alephdata/aleph,alephdata/aleph | ui/src/reducers/similar.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\nmodule.exports = [\n {\n name: 'auckland',\n id: 1\n },\n {\n name: 'wellington',\n id: 15\n },\n {\n name: 'waikato',\n id: 14\n }\n]\n\n```\n\nApply this change: Disable cities other than AKL fo... | javascript | edit | 0 | 0 | mit | f64fbbd2303499012ede0fdf42b6133f0bfef32d | rowanoulton/rent | config/regions.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction updateMeters()\n{\n\tx_cpu_usage(updateCPU);\n\tx_mem_usage(updateMemory);\n\tx_get_uptime(updateUptime);\n\tx_get_pfstate(updateState);\n\n\twindow.setTimeout('updateMeters()', 1500);\n}\n\nfunction updateMemory(x)\n{\n\tdocum... | javascript | edit | 0 | 1 | apache-2.0 | c15a006124e6bc5dbcbf4d1e9036391cb1b9b7d0 | NOYB/pfsense,NOYB/pfsense,dennypage/pfsense,NewEraCracker/pfsense,NewEraCracker/pfsense,NewEraCracker/pfsense,ch1c4um/pfsense,BlackstarGroup/pfsense,pfsense/pfsense,ch1c4um/pfsense,jxmx/pfsense,phil-davis/pfsense,dennypage/pfsense,BlackstarGroup/pfsense,jxmx/pfsense,BlackstarGroup/pfsense,brunostein/pfsense,ptorsten/pf... | usr/local/www/javascript/index/sajax.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar async = require(\"async\");\nvar mongoose = require(\"mongoose\");\nrequire(\"ukiyoe-models\")(mongoose);\n\nvar ExtractedImage = mongoose.model(\"ExtractedImage\");\n\nmongoose.connect('mongodb://localhost/extract');\n\nmongoose.co... | javascript | edit | 0 | 3 | mit | c83853f0d3b12bff8ad6320e4f25b475874286e8 | jeresig/ukiyoe-web | utils/upgrade-extracted.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Load environment variables\nif (process.env.NODE_ENV === 'development') {\n require('dotenv').config({ path: './env/development.env' });\n}\n\nvar express = require('express');\nvar passport = require('passport');\nvar util = requir... | javascript | edit | 0 | 1 | mit | b626bb56252291b9ebd9e41985785601c85c9aca | chkakaja/sentimize,chkakaja/sentimize,formidable-coffee/masterfully,formidable-coffee/masterfully | server/server.js | rejected_duplicate | Near-duplicate of sample 70884 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\ndescribe(\"PatchFile should\", function() {\n it(\"only parse positive or zero delta numbers\", function() {\n var file = new PatchFile();\n\n expect(file.added).toBe(0);\n expect(file.removed).toBe(0);\n\n ... | javascript | edit | 0 | 1 | bsd-3-clause | 0e94996de971e27054747df5784e1df5270b5b60 | esprehn/chromium-codereview,esprehn/chromium-codereview | ui/model/tests/patch_file_tests.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction filterF(i, el) {\n var pattern = /(From|To|Sent|Subject|Cc|Date):/i;\n return el.textContent.match(pattern);\n}\n\n// convert From...To... blocks into one-liners\nvar matches = $(document).find(\"*\").filter(filterF).get().re... | javascript | edit | 0 | 1 | mit | 018b82dae4f564b74851c73f250e2a9f13b493b8 | kubkon/email-chattifier,kubkon/email-chattifier | chattify.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Copyright (c) Martin Costello, 2017. All rights reserved.\n// Licensed under the Apache 2.0 license. See the LICENSE file in the project root for full license information.\n\n\"use strict\";\n\nconst responses = {\n noAudioPlayer: \... | javascript | edit | 0 | 0 | apache-2.0 | f138c95cfb0bd88b7e43683588be6dbb9122e329 | martincostello/alexa-london-travel | src/responses.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport ReactDom from 'react-dom';\nimport Feedy from './Components/Feedy';\n\nimport styles from './assets/styles/reset.less';\n\nmodule.exports = function({namespaceUrl, appName}={\n\tnamespaceUrl:'https://w... | javascript | edit | 0 | 1 | mit | 3f2b4bb35d616dd548352bbdf1338ab64c1a6459 | webcom-components/feedy,webcom-components/feedy | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n * @ngdoc service\n * @name wavesApp.responseredirector\n * @description\n * # responseredirector\n * Service in the wavesApp.\n */\nangular.module('wavesApp')\n .service('responseRedirector', ['$state', function ... | javascript | edit | 0 | 2 | mit | 8ea18ca05393c92f457f92cb0901ed6e5b42d761 | InflectProject/waves,InflectProject/waves | app/scripts/services/responseredirector.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport firebase from 'firebase/app';\nimport 'firebase/auth';\nimport 'firebase/database';\nimport marked from 'marked';\nimport 'normalize.css';\nimport prism from 'prismjs';\nimport React from 'react';\nimport ReactDOM from 'react-dom... | javascript | edit | 0 | 2 | mit | d87dd0f7cb14a07ebf93c75af60149bdee99337c | hoopr/codework,hoopr/codework | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nvar exec = require('child_process').exec;\nvar fs = require('fs');\n\nvar coffee_path = 'coffee/'\n\nif( !fs.existsSync(coffee_path)) {\n fs.mkdirSync(coffee_path)\n}\n\nexec(\"coffee --compile --output www/js/... | javascript | edit | 0 | 0 | mit | e4e1d2a3eadf4b322c744f57278d154321142217 | metova/coffee-script-cordova-plugin | hooks/beforePrepare.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst browsers = [\n 'last 1 Chrome versions',\n 'last 1 Firefox versions',\n 'last 1 Safari versions'\n];\n\nconst isCI = !!process.env.CI;\nconst isProduction = process.env.EMBER_ENV === 'production';\n\nif (isCI || isProduction) {... | javascript | edit | 0 | 0 | mit | f5a666047b05cbb8034aad958e0fba938769b4fb | paddle8/ember-autoresize,tim-evans/ember-autoresize,tim-evans/ember-autoresize,paddle8/ember-autoresize | tests/dummy/config/targets.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nvar Protos = require('../');\n\nProtos.bootstrap(__dirname, {\n \n // Server configuration\n server: {\n host: 'localhost',\n port: 8080,\n multiProcess: false,\n stayUp: false\n },\n \n // Application environments\n... | javascript | edit | 0 | 1 | mit | 851b16ece1303a9eae5090014eae85dd2e572ef7 | derdesign/protos | skeleton/boot.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar doc = new jsPDF({\r\n encryption: {\r\n userPassword: \"user\",\r\n ownerPassword: \"owner\",\r\n userPermissions: [\"print\", \"modify\", \"copy\", \"annot-forms\"]\r\n // try changing the user permis... | javascript | edit | 0 | 0 | mit | b0141005e616e171cf60731c9e751604e6370d33 | MrRio/jsPDF,MrRio/jsPDF,MrRio/jsPDF | examples/js/password.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nwindow.GLOBAL_ACTIONS = {\n 'play': function () {\n wavesurfer.playPause();\n },\n\n 'back': function () {\n wavesurfer.skipBackward();\n },\n\n 'forth': function () {\n wavesurfer.skipForward();\n },\n\n 'toggle-mute': ... | javascript | edit | 0 | 3 | mit | 686c874a4b2b1b9e1ff246fe8ab11f0e4a8d2c3e | shirshendu/kine_type,shirshendu/kine_type,shirshendu/kine_type,shirshendu/kine_type | app/assets/javascripts/audio_controls.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n(function() {\n angular.module('ncsaas')\n .service('paymentsService', ['baseServiceClass', 'ENV', '$http', paymentsService]);\n\n function paymentsService(baseServiceClass, ENV, $http) {\n /*jshint validthis: t... | javascript | edit | 0 | 1 | mit | a02a43f4f79ada52892eeefbc712da708eaa4ad5 | opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport | app/scripts/services/payments-service.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar mysql = require('mysql');\n\n// Create a database connection and export it from this file.\n// You will need to connect with the user \"root\", no password,\n// and to the database \"chat\".\n\nvar connection = mysql.createConnectio... | javascript | edit | 0 | 0 | mit | 254f104c213282cef4bc285473cdf39e73ed80fb | Sibilant-Siblings/sibilant-siblings,Sibilant-Siblings/sibilant-siblings | db/dbconnect.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst Eris = require(\"eris\");\nconst config = require(\"./cfg\");\n\nconst intents = [\n // PRIVILEGED INTENTS\n \"guildMembers\", // For server greetings\n\n // REGULAR INTENTS\n \"directMessages\", // For core functionality\n \... | javascript | edit | 0 | 3 | mit | 4decd4229420b8a2979ef80f20e5593b070f4a55 | Dragory/modmailbot | src/bot.js | rejected_duplicate | Near-duplicate of sample 94937 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport { Provider } from 'react-redux';\nimport ReactDOM from 'react-dom';\n\nimport configureStore from 'redux/configureStore';\nimport { newGame } from 'redux/modules/game';\nimport { DevTool... | javascript | edit | 0 | 1 | mit | 5df999836d0fdc20ec197f7ff808b6d85828a694 | inooid/react-redux-card-game,inooid/react-redux-card-game | src/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * These are all the device types defined in Johnny-Five. These\n * extend our Input objects (not elements)\n *\n * min - Minimum value for the device type\n * max - Maximum value for the device type\n * _methods - A li... | javascript | edit | 0 | 0 | mit | e4190e9584d7635fb3b4627e9f3c300b5a5b852f | dtex/NodebotUI,davatron5000/NodebotUI | client/src/deviceTypes.js | rejected_duplicate | Near-duplicate of sample 97599 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nPackage.describe({\n summary: \"JavaScript minifier\",\n version: \"2.6.1\"\n});\n\nNpm.depends({\n terser: \"4.8.0\"\n});\n\nPackage.onUse(function (api) {\n api.use('ecmascript');\n api.use('babel-compiler');\n api.mainModule('m... | javascript | edit | 0 | 1 | mit | a1c9e136b5c3566c72745fede681c528a8ccaaa9 | Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor | packages/minifier-js/package.js | rejected_duplicate | Near-duplicate of sample 79231 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport Scale from './d3-scale';\n\nconst { on, observer } = Ember;\n\nexport default Scale.extend({\n init() {\n this.set('scale', d3.scale.linear());\n },\n\n rangeRoundChanged: on('init', observer('ra... | javascript | edit | 0 | 2 | mit | 6e97d5633c676ce1865fa32b2845aa042f151dd5 | BryanHunt/ember-d3-components,BryanHunt/ember-d3-components,BryanHunt/ember-d3,BryanHunt/ember-d3 | addon/utils/scales/d3-linear-scale.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * @flow\n */\n\nimport type {Module} from '../../types/Stats';\n\nimport React from 'react';\nimport {getClassName} from '../Bootstrap/GlyphiconNames';\nimport {Link} from '../Bootstrap/Button';\n\ntype Props = {\n prefix: ?string... | javascript | edit | null | null | apache-2.0 | fd792ad7cdb9881e30fd16595df87b45ebccc78a | pinterest/bonsai,pinterest/bonsai,pinterest/bonsai | src/components/stats/ExternalModuleLink.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n//@flow\n\nimport { bindActionCreators } from \"redux\";\nimport { connect } from \"react-redux\";\nimport * as actionCreators from \"./data/actions/actionCreators\";\nimport insertGlobalStyles from \"./global/style/globalStyles\";\n\ni... | javascript | edit | null | null | mit | b4466bf9068b0d1515a646df091e447f3fa68c96 | slightly-askew/portfolio-2017,slightly-askew/portfolio-2017 | src/App.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nexports.get_config = get_config;\n\nfunction get_config() {\n var config = { };\n try {\n config = require('./config');\n } catch(exception) {\n config = require('./config-example');\n }\n return load_config(config);\n}\n\n... | javascript | edit | 0 | 3 | isc | 1fa196037e62c10a74f0d5fb1683270b201bd8a2 | ripple/ripple-lib,wilsonianb/ripple-lib,ripple/ripple-lib,darkdarkdragon/ripple-lib,ripple/ripple-lib,wilsonianb/ripple-lib,darkdarkdragon/ripple-lib,ripple/ripple-lib,wilsonianb/ripple-lib,darkdarkdragon/ripple-lib | test/testutils.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function() {\n 'use strict';\n\n angular.module('app.states')\n .run(appRun);\n\n /** @ngInject */\n function appRun(routerHelper) {\n routerHelper.configureStates(getStates());\n }\n\n function getStates() {\n return {\... | javascript | edit | 0 | 1 | apache-2.0 | 6192011404e89449132349044a3e872f90b0f075 | mafernando/api,boozallen/projectjellyfish,sonejah21/api,AllenBW/api,sreekantch/JellyFish,sreekantch/JellyFish,AllenBW/api,sonejah21/api,boozallen/projectjellyfish,sonejah21/api,AllenBW/api,mafernando/api,stackus/api,projectjellyfish/api,projectjellyfish/api,projectjellyfish/api,stackus/api,stackus/api,boozallen/project... | src/client/app/states/projects/list/list.state.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function (window) {\n\t'use strict';\n\n\tvar hearingTest = HearingTest;\n\tvar hearing = hearingTest.init();\n\n\tvar app = new Vue({\n\t\tel: '#hearing-test-app',\n\t\tdata: {\n\t\t\tisPlaySound: false,\n\t\t\tfrequency: 1000\n\t\t},... | javascript | edit | 0 | 1 | mit | 9f3653e9b0982aaada55f17f85c9a611036edcb8 | kubosho/hearing-test-app | src/app.js | rejected_duplicate | Near-duplicate of sample 93788 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n==================================================================================================\n Lowland - JavaScript low level functions\n Copyright (C) 2012 Sebatian Fastner\n=================================================... | javascript | edit | 0 | 6 | mit | 32df49502da1865eaf84ee97447137289e939a0a | fastner/lowland,fastner/lowland | src/bom/Label.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar keystone = require('../../../../');\n\nmodule.exports = function (req, res) {\n\tif (!keystone.security.csrf.validate(req)) {\n\t\treturn res.apiError(403, 'invalid csrf');\n\t}\n\tvar item = new req.list.model();\n\titem.getUpdateH... | javascript | edit | 0 | 3 | mit | cc4d6547b993fa578d714e8f29e0b76276a12eb5 | ONode/keystone,matthieugayon/keystone,matthewstyers/keystone,ONode/keystone,jstockwin/keystone,brianjd/keystone,cermati/keystone,w01fgang/keystone,Yaska/keystone,michaelerobertsjr/keystone,dvdcastro/keystone,xyzteam2016/keystone,sendyhalim/keystone,danielmahon/keystone,brianjd/keystone,xyzteam2016/keystone,naustudio/ke... | admin/server/api/list/legacyCreate.js | rejected_duplicate | Near-duplicate of sample 80692 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n src: [\n 'vendor/bower_components/bootstrap/dist/css/bootstrap.css',\n 'vendor/bower_components/open-sans/css/open-sans.css',\n 'vendor/bower_components/jquery-minicolors/jquery.minicolors.css',... | javascript | edit | 0 | 0 | apache-2.0 | a6ec8b746abad9be76218e8e5dd9948aa358a1b9 | open-orchestra/open-orchestra-cms-bundle,open-orchestra/open-orchestra-cms-bundle,open-orchestra/open-orchestra-cms-bundle | GruntTasks/Options/concat.libcss.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* global describe it */\n'use strict'\n\nconst chai = require('chai')\nconst chaiAsPromised = require('chai-as-promised')\nconst requireInject = require('require-inject')\nconst sinon = require('sinon')\nconst sinonChai = require('sino... | javascript | edit | 0 | 1 | isc | 27cbc851dc68c9326b4958cc3174265712679460 | jcollado/multitest | test/util.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport _ from 'lodash';\nimport { Graph, alg } from 'graphlib';\n\n_.memoize.Cache = WeakMap;\nlet dijkstra = _.memoize(alg.dijkstra);\n\nexport function setupGraph(pairs) {\n\tlet graph = new Graph({ directed: true });\n\t_.each(pairs,... | javascript | edit | 0 | 2 | mit | 82b91b594c41774f9ea03e2538b0615efdabcfaa | siddharthkchatterjee/graph-resolver | lib/graph.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function () {\n \"use strict\";\n\n var moduleObj = moduler('confirm', {\n defaults: {\n message: 'Are you sure you want to perform this action?',\n event: 'click'\n },\n \n init:... | javascript | edit | 0 | 2 | mit | 706abfd07626606a8c901f4643ffcfd0fd1154c5 | simplyio/moduler.js,simplyio/moduler.js | src/modules/confirm.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n*\n* CellTextField\n*\n*/\n\nimport React from 'react';\nimport TextField from 'material-ui/TextField';\n\nimport styles from './styles.css';\n\nclass CellTextField extends React.Component { // eslint-disable-line react/prefer-stat... | javascript | edit | 0 | 2 | mit | 14df8efec1598df37a7d6971cee3a4d176f48ea5 | codermango/BetCalculator,codermango/BetCalculator | app/components/CellTextField/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport bukovelAPI from './dataAccess/bukovelApi';\nimport CardNumberInput from './CardNumberInput';\n\nconst TEST_CARD_NUMBER = '01-2167-30-92545';\n\nexport default class App extends React.Component {\n con... | javascript | edit | 0 | 2 | apache-2.0 | 1fe48dd8228d78b124852389dbef4b564a124d37 | blobor/skipass.site,blobor/buka,blobor/skipass.site,blobor/buka | src/App.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * copyObject(object, [recurse]) -- for all JS Objects\n *\n * Copies all properties and the prototype to a new object\n * Optionally set recurse to array containing the properties, on wich this function should be called recursivel... | javascript | edit | 0 | 3 | mit | b3522adddaa4415c8afcd3f1f11fefd2b488d358 | marcelklehr/magnet | lib/ferrite/utility.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconsole.log(\"Running!\");\n\nvar Library = {\n name: \"Timmy\", //Library has been called Timmy\n greet: function(){\n alert(\"Hello from the \" + Library.name + \" library.\");\n }\n /*\n This library is what is ... | javascript | edit | null | null | mit | 600df5d2f48c190a948cbee6c1d668db99498096 | alaskamani15/beginner.js | src/src.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport styled from 'styled-components'\n\nimport { Intro, CheckboxTree } from './components'\nimport data from './data/data.json'\nimport github from './assets/github.svg'\n\nconst Main = styled.main`\n displ... | javascript | edit | 0 | 1 | mit | 81daf4cbd5504a15536d56058e2758505222f910 | joelgeorgev/react-checkbox-tree,joelgeorgev/react-checkbox-tree | src/App.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar generators = require('yeoman-generator');\n\nmodule.exports = generators.Base.extend({\n method1: function () {\n console.log('method 1 just ran');\n },\n method2: function () {\n console.log('method 2 just ran');\n }\n});... | javascript | edit | 0 | 1 | bsd-3-clause | 89970c235f4bae57087906c4e5346f188928ce7d | initios/initios-yeoman,initios/initios-yeoman | generators/app/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* global fetch */\nimport React from 'react';\nimport { render } from 'react-dom';\nimport { Router, Route, hashHistory } from 'react-router'\n\nimport Home from './home';\nimport CaseHandler from './caseHandler';\nimport Adjudicator f... | javascript | edit | 0 | 1 | mit | 55634a3654b1b25d636caaa548f82ce33f89acb0 | dgretho/adjudication,dgretho/adjudication | src/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar path = require('path');\nmodule.exports = function jekyllTemplate(answers) {\n return [\n '---',\n 'layout: post',\n 'date: ' + answers.date,\n 'duration: ' + answers.duration,\n 'categories: ' + answers.categories,\... | javascript | edit | 0 | 1 | mit | 8d0750fb6ca50a5e07a54c17813af6d5a724b8c5 | free-time/freetime-cli,fdaciuk/freetime-cli | lib/jekyll-template.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// see http://vuejs-templates.github.io/webpack for documentation.\nvar path = require('path')\n\nmodule.exports = {\n build: {\n env: require('./prod.env'),\n index: path.resolve(__dirname, '../dist/index.html'),\n assetsRoot... | javascript | edit | 0 | 0 | mit | 1185b3e82cd7c3f6483a604d9348f35f16f294f0 | Cubelrti/kontent,Cubelrti/kontent | config/index.js | rejected_duplicate | Near-duplicate of sample 70059 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst PORT = '6882'\nconst ROOT =\n location.href.indexOf('localhost') > 0 ? 'http://localhost:' : 'http://192.168.5.102:'\nexport const ROOT_URL = ROOT + PORT + '/'\nexport const ROOT_URL_API = ROOT_URL + 'api'\nexport const YOUTU... | javascript | edit | 0 | 0 | mit | ad65439c6f7c21aee73c797f2be02ad861a31e8d | ReuvenLiran/react-musicplayer,ReuvenLiran/react-musicplayer | src/utils/constants.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component } from \"react\";\nimport { formatTime } from \"../../common/util/date\";\n\nexport default class extends Component {\n render() {\n const { match } = this.props;\n\n if (match.fixture) {\n return m... | javascript | edit | 0 | 10 | isc | 5f104201a91614820aa8acdc6fdfe6d9dd027695 | sobstel/golazon,sobstel/golazon,sobstel/golazon | components/shared/score.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react'\nimport styled from 'styled-components'\n\nconst FooterWrapper = styled.div`\n display: flex;\n justify-content: center;\n align-items: center;\n height: 10vh;\n font-size: 0.85em;\n backgr... | javascript | edit | 0 | 1 | mit | 55e40c0504b02708f544e1d464715123570b80cd | csrf-demo/csrf-demo,csrf-demo/csrf-demo | hosting/src/components/shared/Footer.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(function() {\n $.get('/tagovi', {csrfmiddlewaretoken: $(\"input[name='csrfmiddlewaretoken']\").val()}, function(data) {\n var options = []\n for (var i = 0; i < data.length; i++) {\n options.push(data[i].fi... | javascript | edit | 0 | 2 | mit | 36150a42a04a3ce5cd6de20018d36f55a64f4311 | MislavMandaric/abs-int,MislavMandaric/abs-int | static/js/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine(function() {\n var hr = codebox.require(\"hr/hr\");\n\n var StatusBar = hr.View.extend({\n className: \"component-statusbar\"\n });\n\n return StatusBar;\n});\n```\n\nApply this change: Add simple api for loadi... | javascript | edit | 0 | 3 | apache-2.0 | b2ed3cdc9c5c12f4d93efea910e0f4f27a02eb0d | CodeboxIDE/package-statusbar,etopian/codebox-package-statusbar | src/bar.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst authentication = require('feathers-authentication');\n<% for (var i = 0; i < authentication.length; i++) { %>\nconst <%= S(authentication[i].name).capitalize().s %>Strategy = require('<%= authentication[i].strateg... | javascript | edit | null | null | mit | d8245ec2c355b0f3c2189ea26e68bcd690e6de84 | feathersjs/generator-feathers,gradealabs/generator-feathers,feathersjs/generator-feathers,feathersjs/generator-feathers | generators/app/templates/authentication.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar BLTPlugin = {\n init: function (client, imports) {\n return {\n handlers: {\n '!givemeblt': function (command) {\n client.act(command.channel, 'gives a juicy BLT to ' + command.... | javascript | edit | 0 | 1 | isc | b673fdbdac7e5523d16904920315d4ab6c79eaf8 | Tennu/BLTBot | tennu_plugins/blt.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport cx from 'classnames';\nimport theme from './theme.css';\nimport Box from '../box';\nimport Icon from '../icon';\nimport { IconTeamMediumOutline, ... | javascript | edit | 0 | 3 | mit | d77e2510a2bcef6d0713d93fc962604c6340d461 | teamleadercrm/teamleader-ui | src/components/avatar/AvatarTeam.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar gaAnalytics = require(\"ga-analytics\"),\n moment = require(\"moment\");\n\nvar googleAnalytics = {};\n\ngoogleAnalytics.load = function(args, next) {\n var outputs = [];\n\n // Setting before a fixed period of time\n if (args... | javascript | edit | 0 | 4 | mit | fbec1e1a32bdda21779187391d875d58e6bd80df | hideack/evac | lib/plugin/in/googleanalytics.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nexport default Ember.Controller.extend({\n toggleModal: false,\n\n actions: {\n testing() {\n window.swal(\"Hello World\", \"success\");\n },\n toggle() {\n this.set('toggleModal', true... | javascript | edit | 0 | 2 | mit | 5c1fa9ba4e012a25aea47d5f08302bce4a28d473 | Tonkpils/ember-sweetalert,Tonkpils/ember-sweetalert | tests/dummy/app/controllers/application.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar http = require('http');\nvar should = require('should');\nvar spawn = require('child_process').spawn;\n\nfunction run(options, callback) {\n var command, commandPath, output;\n commandPath = __dirname + '/../bin/croonga';\n comma... | javascript | edit | 0 | 1 | mit | 5127fe15793fd2a35af77f7f57a71f905ddaf2a3 | groonga/gcs,groonga/gcs | test/croonga.test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar express = require('express');\n\nmodule.exports.init = function(app) {\n\n\tapp.use('/js', express.static(__dirname + '/dist/js', {maxAge: 86400000 * 7}));\n\tapp.use('/css', express.static(__dirname + '/dist/css', {maxAge: 86400000... | javascript | edit | 0 | 1 | mit | b0d31962fc495128093e3a827ec725ecea567dfa | caktux/david-www,ecomfe/david-www,ExC0d3/david-www,caktux/david-www,wzrdtales/david-www,80xer/david-www,JoseRoman/david-www,JoseRoman/david-www,alanshaw/david-www,wzrdtales/david-www,ecomfe/david-www,80xer/david-www,ExC0d3/david-www | statics.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * This config takes some basic config from conf/webpack/<dev|prod>.js\n * and builds the appropriate webpack config from there.\n *\n * The primary difference is that dev has webpack hot reloading\n * whereas dev does not.\n *\n *... | javascript | edit | 0 | 0 | mit | 8568eec430b660caf4f1d59f1f67b2350234260a | jamie-w/es6-bootstrap,jamie-w/es6-bootstrap | webpack.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n description: 'Add bower dependencies for bootstrap and bootswatch to the project'\n\n afterInstall: function(options) {\n return this.addBowerPackagesToProject([\n {name: 'bootstrap', target: '^3.3.1'},\n ... | javascript | edit | 0 | 1 | mit | 05502c29ab3e5305fb944ed8e5ca7450638c365b | Panman8201/ember-cli-bootswatch | blueprints/ember-cli-bootswatch/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n description: 'Creates an initializer to load posts from the meta tag.'\n\n // locals: function(options) {\n // // Return custom template variables here.\n // return {\n // foo: options.entity.options.fo... | javascript | edit | 0 | 1 | mit | 13ec0b7104aeb85280b1adf8828b926d7cf5daad | yaymukund/ember-frontmatter-md,yaymukund/ember-frontmatter-md,yaymukund/ember-frontmatter-md | blueprints/ember-frontmatter-md/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst path = require('path');\nconst webpack = require('webpack');\n\nmodule.exports = {\n entry: {\n app: path.resolve(__dirname, 'app/Resources/assets/js/app.js')\n },\n output: {\n path: path.resolve(__dirname,... | javascript | edit | 0 | 0 | mit | a571ce2b1948bdf1e5c6bcb699a323dae3632b9e | alOneh/sf-live-2017-symfony-webpack,alOneh/sf-live-2017-symfony-webpack,alOneh/sf-live-2017-symfony-webpack | webpack.config.js | rejected_duplicate | Near-duplicate of sample 93537 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Utils = require(\"../../utils\")\n , sqlite3 = require('sqlite3').verbose()\n , Query = require(\"./query\")\n\nmodule.exports = (function() {\n var ConnectorManager = function(sequelize) {\n this.sequelize = sequelize\n ... | javascript | edit | 0 | 3 | mit | ee38458c93e43cdeaa4a3a7cb3541dd792755fef | IrfanBaqui/sequelize | lib/dialects/sqlite/connector-manager.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*global\n \tmodule, __dirname, require\n */\n\n/**\n * @name webpack\n * @type {Object}\n * @property NoEmitOnErrorsPlugin\n */\n\n/**\n * @name path\n * @property resolve\n */\n\nvar webpack = require('webpack'),\n\tpath = require('pa... | javascript | edit | 0 | 0 | mit | 5324f5540f3950fc0acc6ade82f6c1bb49683b13 | dashukin/react-redux-template,dashukin/react-redux-template | webpack.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar spawn = require('child_process').spawn;\nvar path = require('path');\n\nmodule.exports = function (options) {\n options = options || {};\n options.url = options.url || 'http://nodejs.org';\n options.name = options.name || '... | javascript | edit | 0 | 10 | mit | 9ea03c29ffc1dac7f04f094433c9e47c2ba1c5ad | creationix/topcube,creationix/topcube,creationix/topcube | topcube.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n\n/* TODO:\n GET client (all/specific/sortBy/pagination/search)\n POST client (ok/fail)\n PUT client\n DELETE client\n*/\n\nexports.get = function(assert, client) {\n return client.clients.get().then(func... | javascript | edit | 0 | 2 | mit | e537c60751c717e3963b4a93538b117a29b70a7c | bebraw/react-crm-backend,koodilehto/koodilehto-crm-backend | tests/test_client.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* globals require */\n\nimport resolver from './helpers/resolver';\nimport loadEmberExam from 'ember-exam/test-support/load';\n\nconst framework = require.has('ember-qunit') ? 'qunit' : 'mocha';\nconst oppositeFramework = !require.has(... | javascript | edit | 0 | 2 | mit | db7c7ff579eed7683195d4b03754655e9f7246ba | trentmwillis/ember-exam,trentmwillis/ember-exam,trentmwillis/ember-scatter,trentmwillis/ember-scatter,trentmwillis/ember-exam | tests/test-helper.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport createHistory from 'history/createBrowserHistory'\nimport * as qs from 'querystring'\n\nimport config from './config'\n\nconst history = createHistory()\n\nconst navigate = path => {\n history.push(config.basePath + path)\n}\n\n... | javascript | edit | 0 | 2 | mit | 9087e7280b21eee2af68653c3b633349098910de | daGrevis/msks,daGrevis/msks,daGrevis/msks | client/src/history.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst config = require('hjs-webpack')({\n in: 'src/index.js',\n out: 'dist',\n clearBeforeBuild: true,\n devServer: {\n stats: {\n colors: true,\n },\n },\n})\n\nmodule.exports = config\n\n```\n\nApply this change: Add m... | javascript | edit | 0 | 0 | mit | fa5739409f1007d73202b0b48b5cea0535a7b3cc | 127labs/generator-duxedo,127labs/generator-duxedo | generators/app/templates/webpack.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n migrations_directory: \"./migrations\",\n networks: {\n development: {\n host: \"localhost\",\n port: 8545,\n network_id: \"*\"\n },\n live: {\n ... | javascript | edit | 0 | 0 | mit | 08f0a1e48c86d2878b6ea548f3b9090b0e17bc8f | TripleSpeeder/StandingOrderDapp,TripleSpeeder/StandingOrderDapp | truffle.js | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.