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(function() {\n\tconst linkedImages = document.querySelectorAll('a[href$=\".gif\"], a[href$=\".jpeg\"], a[href$=\".jpg\"], a[href$=\".png\"], a[href$=\".apng\"], a[href$=\".webp\"]');\n\tlinkedImages.forEach(function(a) {\n\t\ta.insertA... | javascript | edit | 0 | 1 | mit | 1d5624ce7d0915973996ce760fe7afc3076d1d38 | alanhogan/bookmarklets,alanhogan/bookmarklets | show-linked-media-in-page.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst requestQueue = (state = [], action) => {\n switch (action.type) {\n case 'SET_REQUEST_QUEUE':\n console.warn(`REQUEST QUEUE ${action.payload}`); // eslint-disable-line\n if (Array.isArray(action.pay... | javascript | edit | 0 | 3 | mit | 5e70dd977d246c7e7237a12ba739df20e10d577c | plotly/dash,plotly/dash,plotly/dash,plotly/dash,plotly/dash | renderer/src/reducers/requestQueue.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n pluginOptions: {\n i18n: {\n locale: 'en',\n fallbackLocale: 'en',\n localeDir: 'locales',\n enableInSFC: false\n }\n }\n}\n\n```\n\nApply this change: Set publicPath for production build... | javascript | edit | 0 | 0 | apache-2.0 | d92b54d2451bf838e141cf771120ee8ae6674913 | Wikidata/WikidataClassBrowser,Wikidata/WikidataClassBrowser,Wikidata/SQID,Wikidata/SQID,Wikidata/WikidataClassBrowser,Wikidata/SQID,Wikidata/SQID,Wikidata/SQID,Wikidata/SQID,Wikidata/SQID | vue.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport AppBar from 'material-ui/lib/app-bar'\nimport Paper from 'material-ui/lib/paper'\n\nimport Theme from '../theme'\n\nclass App extends React.Component {\n\n getChildContext () {\n return {\n mui... | javascript | edit | 0 | 1 | mit | 46009b57e88f1c00e0a424630bd296848b00e7e0 | rxlabs/tasty-todos,rxlabs/tasty-todos,rxlabs/tasty-todos | app/components/App.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport * as p from 'path';\nimport * as fs from 'fs';\nimport {rollup} from 'rollup';\nimport babel from 'rollup-plugin-babel';\n\nconst copyright = (\n`/*\n * Copyright ${new Date().getFullYear()}, Yahoo Inc.\n * Copyrights licensed un... | javascript | edit | 0 | 2 | bsd-3-clause | d28fe196b962b27c3a48e09220638a6f2b6e1291 | ericf/react-intl | scripts/build-lib.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction SoftKeyboard() {}\n\nSoftKeyboard.prototype.show = function(win, fail) {\n return cordova.exec(\n function (args) { if(win) { win(args); } },\n function (args) { if(fail) { fail(args); } },\n \"SoftKeyboard\", \... | javascript | edit | 0 | 3 | mit | 4cedab2937d5499ec51f66f57373feace2a9daa8 | wagzee/PhoneGap-SoftKeyboard,wagzee/PhoneGap-SoftKeyboard | www/softkeyboard.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * @file Centrally configured web client.\n * @module net/request\n */\n\n'use strict'\n\n// Imports\nconst requestStandard = require('request-promise-native')\n\n// Configure\nconst request = requestStandard.defaults()\n\n// Expos... | javascript | edit | 0 | 0 | unlicense | 7d4ec88e34dc37cb4d7a87fa81de39983f37a6e2 | jestcrows/ethtaint,jestcrows/ethtaint | src/net/request.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport PostList from '../components/PostList';\nimport H1 from '../components/H1';\nimport { FormattedMessage } from 'react-intl';\n\nconst Blog = (props) => {\n return (... | javascript | edit | 0 | 1 | mit | 844fdfc5a66ec88f0e573d53e099f2944068ad84 | angeloocana/angeloocana,angeloocana/angeloocana | src/pages/_blog.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n *\n * @type {{}}\n */\nvar Router = {};\n\n\n/**\n *\n * @type {{}}\n */\nvar Model = {};\n\n/**\n *\n * @type {{}}\n */\nvar view = {};\n\n```\n\nApply this change: Add docs to js code"
},
{
"role": "assistant",
"cont... | javascript | edit | 0 | 0 | mit | 6de68733589b6ad9e986c7a9fe872a6eee04fb55 | easy-deep-learning/mvc-pure-js,easy-deep-learning/mvc-pure-js | js/common.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from \"ember\";\r\nimport ResetScroll from '../mixins/reset-scroll';\r\n\r\nexport default Ember.Route.extend(ResetScroll, {\r\n\tmodel: function() {\r\n\t\tthis.store.unloadAll(\"user\");\r\n\t\treturn this.store.findQuery... | javascript | edit | 0 | 1 | mit | 2ea83a3b5bf7ef906e1fc82e3a4a7ef81b31403e | fi-ksi/web-frontend,fi-ksi/web-frontend,fi-ksi/web-frontend | app/routes/results.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport InventoryContainer from '../containers/InventoryContainer'\nimport ShadowBox from '../Components/ShadowBox'\nimport FlexDiv from '../Components/FlexDiv'\n\nconst InventoryBox = ShadowBox.extend`\n widt... | javascript | edit | 0 | 1 | mit | 08fb751ba5f6b9c63f4a630f18a473e90f708440 | severnsc/brewing-app,severnsc/brewing-app | src/Scenes/InventoryScene.js | rejected_duplicate | Near-duplicate of sample 74255 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\nconst {ipcRenderer} = require('electron')\n\nfunction navigate(url) {\n history.replaceState(null, null, url)\n const e = new Event('popstate')\n window.dispatchEvent(e)\n}\n\nipcRenderer.on('isPlaying', (event) => {\... | javascript | edit | 0 | 3 | mit | 40ac2db3f43ffad6dd4f3a15075501174bfbbe03 | salomvary/soundcleod,fr34k8/soundcleod,salomvary/soundcleod,fr34k8/soundcleod,salomvary/soundcleod,fr34k8/soundcleod,fr34k8/soundcleod,salomvary/soundcleod | app/preload.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Try to make loopable any kind of javascript primitive\n * @param {array|number|string|object|Map|Set} collection - hopefully something that we can loop\n * @returns {Array} it will return always an array\n */\nexport default f... | javascript | edit | 0 | 4 | mit | 88ec9bc093677807e411f867c6440e995928cab2 | dreipol/looppa | index.next.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { app, Menu, Tray } from 'electron';\nimport path from 'path';\n\nfunction setTrayMenu() {\n let iconPath = path.join(__dirname, '../../../resources/tray.png');\n let tray = new Tray(iconPath);\n\n const contextMenu = Menu.bui... | javascript | edit | 0 | 1 | mit | 9f6685cc818cd1158ba72179a831c7695a456576 | LightshedHealth/clockwise-app,LightshedHealth/clockwise-app | src/browser/tray/app-tray.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n\t######################################\n\t# Authentication Components #\n\t######################################\n*/\n\n/*\n\tRegister component\n*/\n\n\n\n/*\n\tLogin component\n*/\n\n\n\n/*\n\t#########################... | javascript | edit | null | null | mit | b26f0e00a67c3242198232ec05e0cd50ddbea28f | Squarific/SmartHome,Squarific/SmartHome,Squarific/SmartHome | client/main.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar replaceAll = function( occurrences ) {\n var configs = this;\n return {\n from: function( target ) {\n return {\n to: function( replacement ) {\n var template;\n var index = -1;\n if ( con... | javascript | edit | 0 | 4 | mit | ccaed5a04306a6bdf94279a38638de66c3bf188d | FagnerMartinsBrack/str-replace | src/str-replace.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst bootstrap = require('hof-bootstrap');\n\nconst settings = require('./hof.settings.json');\n\nsettings.routes = settings.routes.map(route => require(route));\nsettings.start = false;\n\nmodule.exports = bootstrap(s... | javascript | edit | 0 | 1 | mit | 6b4bed7a0dd552ceffec8e26d483aadc730fae0a | UKHomeOfficeForms/hof-generator,UKHomeOfficeForms/hof-generator | lib/cli/init/template/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nrequire('babel-register')({ extensions: ['.jsx'] });\n\nconst app = require('hadron-app');\nconst React = require('react');\nconst ReactDOM = require('react-dom');\nconst AppRegistry = require('hadron-app-registry');\n\nconst DataServic... | javascript | edit | null | null | apache-2.0 | f66b406ff0fc60794885d3a998394775f7f8f892 | mongodb-js/compass-plugin,mongodb-js/compass-plugin | template/electron/renderer/index.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*!\n * express-sanitized\n * MIT Licensed\n */\n\n/**\n * Module dependencies.\n */\n\nvar _ = require('lodash');\nvar sanitizer = require('sanitizer');\nvar htmlencode = require('htmlencode');\n\n\n/**\n * Simple middleware that wraps... | javascript | edit | 0 | 3 | mit | 8e530a6504d8fb1e749cb85397df729eed1b87ee | fingerfoodstudios/express-sanitize-escape | lib/express-sanitize-escape.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport jsonToQueryString from 'utils/jsonToQueryString'\n\nexport default function fbapi (path, queryParams, callback) {\n return fetch(\n `https://graph.facebook.com/v2.8/${ path }?${ jsonToQueryString(queryParams) }&access_token=$... | javascript | edit | 0 | 1 | mit | d6352974af87586d45ce5bece8a868aec20c23c7 | sunyang713/sabor-website,sunyang713/sabor-website | src/utils/fbapi.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Delegator = require('dom-delegator')\n\nmodule.exports = BaseEvent\n\nfunction BaseEvent(lambda) {\n return EventHandler;\n\n function EventHandler(fn, data, opts) {\n var handler = {\n fn: fn,\n d... | javascript | edit | 0 | 5 | mit | 36d1926ca047721a3b86c7798e398f078d7dccc0 | bendrucker/value-event,eightyeight/value-event,malthejorgensen/value-event,tommymessbauer/value-event,Raynos/value-event | base-event.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\n// asmjsunpack-worker.js: this file is concatenated at the end of unpack.js.\n\n// This file implements a worker that responds to a single initial message containing a url to\n// fetch and unpack and the name of the callback to pass i... | javascript | edit | 0 | 3 | apache-2.0 | 20c7b83bf005c4abfe2280c130a3e018f3767a75 | lukewagner/asm.js-pack,lukewagner/asm.js-pack | asmjsunpack-worker.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * Pattern matching the prefix of at least one stripped query string\n * parameter. We'll search the query string portion of the URL for this\n * pattern to determine if there's any stripping work to do.\n */\nvar searchPattern = ne... | javascript | edit | 0 | 4 | mit | a16584df15f0e30a19c538b30440a8d7814724f5 | jparise/chrome-utm-stripper | background.js | rejected_duplicate | Near-duplicate of sample 75706 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar helpers = require('../helpers');\n\nmodule.exports = {\n 'name': 'space-after-comma',\n 'defaults': {\n 'include': true\n },\n 'detect': function (ast, parser) {\n var result = [];\n\n ast.traverseByTyp... | javascript | edit | 0 | 14 | mit | 22f41b9cfcf10af245b9bb185d9eb04c2fa82da6 | sasstools/sass-lint,flacerdk/sass-lint,bgriffith/sass-lint,sktt/sass-lint,srowhani/sass-lint,DanPurdy/sass-lint,sasstools/sass-lint,srowhani/sass-lint | lib/rules/space-after-comma.js | rejected_complexity | Cyclomatic complexity too high: 14 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nhqDefine(\"accounting/js/enterprise_settings\", [\n 'jquery',\n 'knockout',\n 'underscore',\n 'hqwebapp/js/assert_properties',\n 'hqwebapp/js/initial_page_data',\n], function(\n $,\n ko,\n _,\n assertPropertie... | javascript | edit | 0 | 1 | bsd-3-clause | b642058de0f2acaea96d593aa3163a40f898c532 | dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq | corehq/apps/accounting/static/accounting/js/enterprise_settings.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function() {\n Discourse.Dialect.inlineBetween({\n start: \"[color=\",\n stop: \"[/color]\",\n rawContents: true,\n emitter: function(contents) {\n var matches = contents.match(/(.+)](.*)/);\n if (matches) {\n ... | javascript | edit | 0 | 2 | mit | c0398e1654be8d9ee2b29a8388f5228dd853d7d9 | dandv/discourse-bbcode-color,dandv/discourse-bbcode-color,discourse/discourse-bbcode-color,discourse/discourse-bbcode-color | assets/javascripts/bbcode_color_dialect.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Matrix = function(rowLength) {\n this.matrix = new Array;\n if(rowLength) {\n for(var i = 0; i < rowLength; i++) {\n this.matrix.push(new Array);\n }\n }\n}\n\n```\n\nApply this change: Add find function for Matrix"
... | javascript | edit | 0 | 3 | mit | 1521921c93bbd2ef6cf3b05a0fd391c99ced851a | peternatewood/pac-man-replica,peternatewood/pac-man-replica | matrix.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*****************************************************************************/\n/* Client and Server Routes */\n/*****************************************************************************/\nRouter.configure({\n layoutTemplate: 'Mas... | javascript | edit | 0 | 3 | mit | 9b807c4be024214bba8684ed9343eecc06c83010 | bojicas/letterhead,bojicas/letterhead | both/router/routes.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar fs = require('fs');\nvar mdTarget = 'styleguide.md';\n\nfs.readFile(mdTarget, function(err, data) {\n if (err) throw err;\n\n var reg = /#{1,6}\\s[^\\r\\n|\\r|\\n]+/g;\n var headersArr = data.toString().match(reg);\n var... | javascript | edit | 0 | 0 | mit | 97e729591adb5d3be842c4a164493cf2f607bcf1 | jesprider/md-menu | mdMenu.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport AuthenticatedRouteMixin from 'ui/mixins/authenticated-route';\nimport Ember from 'ember';\nimport C from 'ui/utils/constants';\n\nexport default Ember.Route.extend(AuthenticatedRouteMixin,{\n model: function() {\n\n var heade... | javascript | edit | 0 | 2 | apache-2.0 | 9d772f89559eae69bd5c43266435565b0e770ce9 | vincent99/ui,kaos/ui,jjperezaguinaga/ui,rancher/ui,lvuch/ui,westlywright/ui,rancherio/ui,ubiquityhosting/rancher_ui,nrvale0/ui,jjperezaguinaga/ui,westlywright/ui,kaos/ui,nrvale0/ui,rancher/ui,pengjiang80/ui,lvuch/ui,westlywright/ui,jjperezaguinaga/ui,rancher/ui,ubiquityhosting/rancher_ui,pengjiang80/ui,pengjiang80/ui,n... | app/settings/auth/route.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*!\n* gulpfile\n*/\n\n// Load plugins\nvar gulp = require('gulp');\nvar stylus = require('gulp-stylus');\nvar rename = require('gulp-rename');\nvar jade = require('gulp-jade');\nvar inline = require('g... | javascript | edit | 0 | 1 | mit | 60671a4e9d366d81f67b2d13d75b7eef1e49317e | Guirec/HTML-Email-Generator,Guirec/HTML-Email-Generator | gulpfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nrequire([\"UserMedia\", \"VideoWrapper\"], function(UserMedia, VideoWrapper) {\n \"use strict\";\n\n var startButton = document.getElementById(\"startButton\");\n startButton.onclick = startLocalVideo;\n\n var videoWrapper =... | javascript | edit | 0 | 2 | mit | 9e7ce5bc9c67ac3fbb3bff58f203b6a02c22468c | tomas2387/webrtcApp | scripts/src/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Stirrup = function(library) {\n if(typeof library !== 'object' && typeof library !== 'function') {\n throw 'You must provide Stirrup with a promise library';\n }\n this.library = library;\n this.isNative = (typeof Promise ===... | javascript | edit | 0 | 4 | mit | 9e0d1d10ed22c6ba865d962b7549402aeb593659 | asakusuma/stirrup | source/core.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexports.config = {\n allScriptsTimeout: 11000,\n\n specs: [\n '*.js'\n ],\n\n capabilities: {\n 'browserName': 'chrome'\n },\n\n baseUrl: 'http://localhost:8000/app/',\n\n framework: 'jasmine',\n\n jasmineNodeOpts: {\n ... | javascript | edit | 0 | 0 | mit | f00ede75066310ae68220e84b9a0fb351c7f5459 | webplatformz/confion,webplatformz/confion | e2e-tests/protractor.conf.js | rejected_duplicate | Near-duplicate of sample 86998 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* global window, uw */\nimport bugsnag from 'bugsnag-js';\nimport { version } from '../../package.json';\n\nconst client = bugsnag({\n apiKey: 'a3246545081c8decaf0185c7a7f8d402',\n appVersion: version,\n /**\n * Add current user i... | javascript | edit | 0 | 3 | mit | 4bc603aa8135011cf717ea7645b6eb18bb80d869 | welovekpop/uwave-web-welovekpop.club,welovekpop/uwave-web-welovekpop.club | src/_wlk/bugsnag.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\napp.factory('Product', function($http) {\n\n function getUrl(id = '') {\n return 'http://127.0.0.1:8000/api/products/' + id + '?format=json';\n }\n\n return {\n get: function(id, callback) {\n return $http... | javascript | edit | 0 | 2 | mit | d2a9dc303a745d4fc2a23d700a1439794ed167d4 | matachi/product-gallery,matachi/product-gallery,matachi/product-gallery | products/static/products/app/js/services.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport queryString from \"query-string\";\n\nclass Api {\n static get(url, data = {}) {\n return this.request(url + (Object.keys(data).length > 0 ? ('?' + queryString.stringify(data)) : '' ), undefined, \"GET\");\n }\n\n ... | javascript | edit | 0 | 3 | mit | aa3d6ad4d2d4ef7742df07d9f8c63c5f0a2ac440 | gilfillan9/spotify-jukebox-v2,gilfillan9/spotify-jukebox-v2 | src/app/libs/Api.js | rejected_duplicate | Near-duplicate of sample 77331 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nPrototype._original_property = window.NW;\n//= require \"repository/src/nwmatcher\"\n\nPrototype.Selector = (function(engine) {\n function select(selector, scope) {\n return engine.select(selector, scope || document, Element.extend)... | javascript | edit | 0 | 2 | mit | 2f9bde3ad5a2e3dd104c812b6c81f4077fe0aa1e | 292388900/prototype,erpframework/prototype,sdumitriu/prototype,lamsieuquay/prototype,ridixcr/prototype,lamsieuquay/prototype,erpframework/prototype,baiyanghese/prototype,lamsieuquay/prototype,Jiasm/prototype,Gargaj/prototype,erpframework/prototype,fashionsun/prototype,sstephenson/prototype,ridixcr/prototype,Gargaj/prot... | vendor/nwmatcher/selector_engine.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// a simple web app/module\nimportFromModule('helma.skin', 'render');\n\nfunction main_action() {\n var context = {\n title: 'Module Demo',\n href: href\n };\n render('skins/modules.html', context);\n}\n\n// modul... | javascript | edit | 0 | 1 | apache-2.0 | fe71390baca97c018af1b47174d6459600971de4 | ringo/ringojs,Transcordia/ringojs,ringo/ringojs,ringo/ringojs,oberhamsi/ringojs,ringo/ringojs,ashwinrayaprolu1984/ringojs,oberhamsi/ringojs,Transcordia/ringojs,ashwinrayaprolu1984/ringojs,oberhamsi/ringojs,Transcordia/ringojs,Transcordia/ringojs,ashwinrayaprolu1984/ringojs,ashwinrayaprolu1984/ringojs | demo/webmodule.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { Mongo } from 'meteor/mongo';\nimport { ValidatedMethod } from 'meteor/mdg:validated-method';\nimport { SimpleSchema } from 'meteor/aldeed:simple-schema';\n\nexport const Messages = new Mongo.Collection('messages');\n\nMessages.... | javascript | edit | 0 | 2 | mit | 01ce1bde07bfe675ad2cfd1e32f5cbd76dd53922 | f-martinez11/ActiveU,f-martinez11/ActiveU | imports/api/messages.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { test , moduleForComponent } from 'appkit/tests/helpers/module-for';\nimport DashboardWidgetComponent from 'appkit/components/dashboard-widget';\n\nmoduleForComponent('dashboard-widget', 'Unit - Dashboard widget component', {\n ... | javascript | edit | 0 | 1 | mit | 3cfc6e9d2234ec8b60c748888a88f2fe675ec872 | substantial/substantial-dash-client | tests/unit/components/dashboard-widget-test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport NavMenu from './NavMenu';\n\nexport default class Header extends React.Component {\n constructor(props) {\n super(props);\n }\n\n render() {\n let navMenu;\n\n if (this.props.config.hea... | javascript | edit | 0 | 2 | apache-2.0 | 9acb51cda733751729fbe33c29c666c40cbdae35 | naltaki/naltaki-front,naltaki/naltaki-front | src/Header/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Plugin from \"./Plugin\";\n\nexport default class MasterPlugin extends Plugin {\n\n static get plugin() {\n return {\n name: \"MasterPlugin\",\n description: \"\",\n help: \"This plugin ... | javascript | edit | 0 | 4 | mit | 7441c6d4f8648391f556de91382a066bf6971da4 | crisbal/Telegram-Bot-Node,crisbal/Node-Telegram-Bot,crisbal/Node-Telegram-Bot,crisbal/Telegram-Bot-Node | src/MasterPlugin.js | rejected_duplicate | Near-duplicate of sample 75764 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar slice = [].slice;\n\nmodule.exports = {\n on: function on(ev, handler) {\n var events = this._events,\n eventsArray = events[ev];\n\n if (!eventsArray) {\n eventsArray = events[ev] = [];\n ... | javascript | edit | 0 | 2 | mit | fecd31dd46b4f790f9c0cfe28eff3909fd0945b5 | Raynos/eventemitter-light | lib/ee.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function(grunt) {\n\t\"use strict\";\n\n\t// Display the execution time of grunt tasks\n\trequire(\"time-grunt\")(grunt);\n\n\t// Load all grunt-tasks in 'Build/Grunt-Options'.\n\tvar gruntOptionsObj = require(\"load-gr... | javascript | edit | 0 | 1 | mit | 36335b37034025d76f8c758f9617292d9889fb73 | t3b/t3b_template,t3b/t3b_template,t3b/t3b_template,t3b/t3b_template,t3b/t3b_template | Gruntfile.js | rejected_duplicate | Near-duplicate of sample 87055 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Game = function(boardString){\n var board = '';\n this.board = '';\n if (arguments.length === 1) {\n this.board = this.toArray(boardString);\n } else {\n function random() {\n return Math.floor(Math.random() * 10 + 6)... | javascript | edit | 0 | 5 | mit | 9d7031b6dcf8c8ce6a36cdfc73c9d467a44517b5 | suprfrye/galaxy-256,suprfrye/galaxy-256 | js/game.js | rejected_duplicate | Near-duplicate of sample 109495 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport Link from '../components/Link';\nimport { StyleSheet, css } from 'glamor/aphrodite';\n\nexport default () => {\n return (\n <footer className={css(styles.footer)}>\n <div className={css(styles... | javascript | edit | 0 | 1 | mit | cadc230be233de7ac0f0a809b2b0a078950b1416 | react-community/native-directory | components/Footer.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar server = require('./server');\n\nvar port = process.env.port || 3000;\nserver.listen(port, function() {\n console.log('Listening on port ' + port);\n});\n\n```\n\nApply this change: Use correct port env variable"
},
{
"role... | javascript | edit | 0 | 1 | mit | 61766f5cd277420d68299c78c43bec051a23be4d | jeffcharles/number-switcher-3000,jeffcharles/number-switcher-3000,jeffcharles/number-switcher-3000 | api/run-server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react'\n\nexport default class Prefs extends React.Component {\n static propTypes = {\n prefs: React.PropTypes.object.isRequired,\n setPrefs: React.PropTypes.func.isRequired,\n providerRefresh: React.PropTyp... | javascript | edit | 0 | 3 | isc | 09c78c2316fdb2a1cb72b7bf5694404d4125927d | bhj/karaoke-forever,bhj/karaoke-forever | src/components/providers/cdg/Prefs/Prefs.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar BlueprintClient = require('xively-blueprint-client-js');\n\nvar client = new BlueprintClient({\n authorization: process.env.BLUEPRINT_AUTHORIZATION\n});\n\nmodule.exports = client;\n\n```\n\nApply this change: Add logging with Blue... | javascript | edit | 0 | 0 | mit | e8c621a87d93590901e128ab8e2fb8b649b63270 | Altoros/refill-them-api | modules/blueprint.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Head from 'next/head';\n\nexport default () =>\n <header>\n <Head>\n <style>{`\n body {\n font-family: \"Helvetica Neue\", Arial, sans-serif;\n }\n `}</style>\n </Head>\n </header>;\n\n```... | javascript | edit | 0 | 1 | mit | d6cff2ae3baf9de7f8156545fda5bb67361c36c2 | pmdarrow/react-todo | components/Header.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst io = require('socket.io'),\n winston = require('winston');\n\nwinston.remove(winston.transports.Console);\nwinston.add(winston.transports.Console, {'timestamp': true});\n\nconst PORT = 3031;\n\nwinston.info('Rupture real-time... | javascript | edit | 0 | 1 | mit | eaf2461432f490fee0e8812889c90bd88eb7a0fe | dimkarakostas/rupture,dimriou/rupture,dimriou/rupture,esarafianou/rupture,dionyziz/rupture,esarafianou/rupture,esarafianou/rupture,dimkarakostas/rupture,dimkarakostas/rupture,esarafianou/rupture,dionyziz/rupture,dionyziz/rupture,dimriou/rupture,dimriou/rupture,dimriou/rupture,dionyziz/rupture,dimkarakostas/rupture,dimk... | realtime/index.js | rejected_duplicate | Near-duplicate of sample 75067 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nPackage.describe({\n name: \"babel-compiler\",\n summary: \"Parser/transpiler for ECMAScript 2015+ syntax\",\n // Tracks the npm version below. Use wrap numbers to increment\n // without incrementing the npm version. Hmm-- Apparen... | javascript | edit | 0 | 1 | mit | b491985b4a59f368633a225905f582933fa47f0e | Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor | packages/babel-compiler/package.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function(document){\n\n function setStyle(style, param) {\n var range, sel;\n\n if (window.getSelection) {\n sel = window.getSelection();\n if (sel.getRangeAt) {\n range = sel.getRangeAt(0);\n }\n docu... | javascript | edit | 0 | 4 | mit | e7bcd073726ab546c41883e68648aadbe7cdeed2 | guilhermecomum/minimal-editor | assets/js/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport $ from \"jquery\";\nimport Sugar from \"../../sugar\";\n\n/**\n * Handlers for scripted embed (social) quirks\n */\n$(Sugar).bind(\"ready\", function(){\n\n // Initialize twitter embeds when new posts load or previewed\n $(Suga... | javascript | edit | 0 | 4 | mit | 1b4be05beb4d717c13796e404e019ee6d4a543ce | elektronaut/sugar,elektronaut/sugar,elektronaut/sugar,elektronaut/sugar | app/javascript/sugar/posts/embeds.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine([], function () {\n\n var caches = {};\n\n function Cache(method) {\n this.method = method;\n this._store = {};\n }\n\n /** xml -> Promise<Result> **/\n Cache.prototype.submit = function submit (query) {\n var xml =... | javascript | edit | 0 | 4 | apache-2.0 | f8d22f8ded7ea448a643f248c346d46e85a929ea | yochannah/show-list-tool,alexkalderimis/show-list-tool,yochannah/show-list-tool,intermine-tools/show-list-tool,intermine-tools/show-list-tool,intermine-tools/show-list-tool,yochannah/show-list-tool | js/query-cache.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nPackage.describe({\n name: 'pntbr:youtube',\n version: '0.0.1',\n summary: 'Manage Youtube\\'s videos',\n git: 'https://github.com/goacademie/fanhui',\n documentation: 'README.md'\n})\n\nPackage.onUse(function(api) {\n api.version... | javascript | edit | 0 | 1 | mit | 7d8217e5404375885c14539d5a3cdd6799755154 | goacademie/fanhui,goacademie/fanhui | packages/youtube/package.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*!\n{\n \"name\": \"Unicode characters\",\n \"property\": \"unicode\",\n \"tags\": [\"encoding\"],\n \"warnings\": [\n \"positive Unicode support doesn't mean you can use it inside <title>, this seems more related to OS & Langua... | javascript | edit | 0 | 4 | mit | 1b4db6e15bf268d9e46e36d6538b31469afba482 | Modernizr/Modernizr,Modernizr/Modernizr | feature-detects/unicode.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar robohydra = require('robohydra'),\n RoboHydraHead = robohydra.heads.RoboHydraHead;\n\nfunction getBodyParts(config) {\n \"use strict\";\n\n var noCachingPath = config.nocachingpath || '/.*';\n\n return {h... | javascript | edit | 0 | 2 | apache-2.0 | 9a97f6929af78c0bfffeca2f96a9c47f7fa1e943 | mlev/robohydra,robohydra/robohydra,robohydra/robohydra,mlev/robohydra,mlev/robohydra | plugins/no-caching/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n\n public_host_name: 'http://watchmen.letsnode.com/', // required for OAuth dance\n\n auth: {\n GOOGLE_CLIENT_ID: process.env.WATCHMEN_GOOGLE_CLIENT_ID || '<Create credentials from Google Dev Console>',\... | javascript | edit | 0 | 0 | mit | deadb3b799e40640be486ec5c6f7f39f54eae162 | corinis/watchmen,labianchin/WatchMen,plyo/watchmen,corinis/watchmen,NotyIm/WatchMen,iloire/WatchMen,Cellington1/Status,NotyIm/WatchMen,labianchin/WatchMen,plyo/watchmen,labianchin/WatchMen,NotyIm/WatchMen,plyo/watchmen,ravi/watchmen,ravi/watchmen,Cellington1/Status,iloire/WatchMen,Cellington1/Status,corinis/watchmen,il... | config/web.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar path = require('path');\nvar nightwatch = require('nightwatch');\nvar originalArgv = JSON.parse(process.argv[2]);\n\nnightwatch.cli(function(argv) {\n for (var key in originalArgv) {\n if (key === 'env' && argv['parallel-mode'] ... | javascript | edit | 0 | 6 | mit | 084fd3d7bc7c227c313d2f23bce1413af02f935a | tatsuyafw/gulp-nightwatch,StoneCypher/gulp-nightwatch | lib/background.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n app_host_port: 'streetmix-staging.herokuapp.com',\n restapi_baseuri: \"http://streetmix-api-staging.herokuapp.com\",\n facebook_app_id: '175861739245183'\n}\n\n```\n\nApply this change: Revert \"Tryign double quo... | javascript | edit | 0 | 0 | bsd-3-clause | e4802320d96c78afb3b69b18b69cb71f605c9977 | codeforamerica/streetmix,magul/streetmix,codeforamerica/streetmix,codeforamerica/streetmix,macGRID-SRN/streetmix,magul/streetmix,kodujdlapolski/streetmix,magul/streetmix,CodeForBrazil/streetmix,CodeForBrazil/streetmix,kodujdlapolski/streetmix,kodujdlapolski/streetmix,macGRID-SRN/streetmix,macGRID-SRN/streetmix,CodeForB... | config/staging.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * i18n plugin\n * register handlebars handler which looks up translations in a dictionary\n */\n\nvar path = require(\"path\");\nvar fs = require(\"fs\");\nvar handlebars = require(\"handlebars\");\n\nmodule.exports = function mak... | javascript | edit | 0 | 5 | mit | 2fbe38df3bba8886de9295ef637b65ea8ac664af | playcanvas/developer.playcanvas.com,playcanvas/developer.playcanvas.com | lib/i18n/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar fs = require('fs');\nvar JSONStream = require('JSONStream');\n\nvar jsonReader = {};\njsonReader.read = function (fileName, callback) {\n return fs.readFile(fileName, function(err, data) {\n if (err) throw err;\n return callb... | javascript | edit | 0 | 2 | mit | 6721766466e5cf2231fcc81fa9cdee2972835a93 | superhansa/bikesluts,superhansa/bikesluts | lib/jsonReader.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * @class nodelinux\n * This is a standalone module, originally designed for internal use in [NGN](http://github.com/thinkfirst/NGN).\n * However; it is capable of providing the same features for Node.JS scripts\n * independently o... | javascript | edit | 0 | 0 | mit | 1170229827ef0e2e4dc78bd65bf71ab6ce7875fc | zonetti/node-linux,zonetti/node-linux | lib/node-linux.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nrequire('js-yaml');\n\nmodule.exports = function (grunt) {\n grunt.loadNpmTasks('grunt-contrib-jst');\n grunt.loadNpmTasks('grunt-mocha-test');\n grunt.loadNpmTasks('grunt-karma');\n\n grunt.initConfig({\n paths: require('js_path... | javascript | edit | 0 | 1 | bsd-3-clause | 5162a6d35a605c13d32dadf8a821e569248db98e | praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go | Gruntfile.js | rejected_duplicate | Near-duplicate of sample 75094 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function(grunt) { \n\n grunt.initConfig({\n\n nodewebkit: {\n options: {\n platforms: ['osx'],\n buildDir: './build', \n macIcns: './app/icon/logo.icns'\... | javascript | edit | 0 | 1 | mit | 43f48c6fbe4d43d7f288d6169c612e8b6402e3b3 | ParinVachhani/chrome-devtools-app,ahmadassaf/Chrome-devtools-app,ParinVachhani/chrome-devtools-app,ahmadassaf/Chrome-devtools-app,ahmadassaf/Chrome-devtools-app,auchenberg/chrome-devtools-app,modulexcite/chrome-devtools-app,modulexcite/chrome-devtools-app,cjpearson/chrome-devtools-app,ahmadassaf/Chrome-devtools-app,mod... | Gruntfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nrequire('js-yaml');\n\nmodule.exports = function (grunt) {\n grunt.loadNpmTasks('grunt-mocha-test');\n\n grunt.initConfig({\n paths: require('paths.yml'),\n mochaTest: {\n jsbox_apps: {\n src: ['<%= paths.jsbox_apps.... | javascript | edit | 0 | 1 | bsd-3-clause | f27626a82f7c2228182fca3b3d84171cf49b0ecb | praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go | Gruntfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// load social sharing scripts if the page includes a Twitter \"share\" button\nvar _jsLoader = _jsLoader || {};\n\n// callback pattern\n_jsLoader.initTwitter = (function() {\n if (typeof (twttr) != 'undefined') {\n twttr.widget... | javascript | edit | 0 | 2 | mit | 20c080c8f356f257d9c57dc761dd904280fabd4e | bf4/bf4.github.com,bf4/bf4.github.com,bf4/bf4.github.com,bf4/bf4.github.com | js/application.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nangular.module('sgApp')\n .directive('shadowDom', function(Styleguide, $templateCache) {\n\n var USER_STYLES_TEMPLATE = 'userStyles.html';\n\n return {\n restrict: 'E',\n transclude: true,\n link: ... | javascript | edit | 0 | 5 | mit | 67fc5a6d4365cc87ef7a07766594cae9431f1086 | hence-io/sc5-styleguide,junaidrsd/sc5-styleguide,kraftner/sc5-styleguide,patriziosotgiu/sc5-styleguide,lewiscowper/sc5-styleguide,varya/sc5-styleguide,kraftner/sc5-styleguide,hence-io/sc5-styleguide,jkarttunen/sc5-styleguide,lewiscowper/sc5-styleguide,ifeelgoods/sc5-styleguide,jkarttunen/sc5-styleguide,SC5/sc5-stylegui... | lib/app/js/directives/shadowDom.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport PropTypes from 'prop-types'\nimport { Menu, Icon, Popover } from 'antd'\nimport { Link } from 'dva/router'\nimport uri from 'utils/uri'\nimport { l } from 'utils/localization'\nimport styles from './Hea... | javascript | edit | 0 | 2 | mit | 403e11554bdd11ec3e521d4de244f22bdae437d0 | steem/qwp-antd,steem/qwp-antd | src/components/Layout/HeaderNav.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine(['streamhub-sdk/collection'], function (Collection) {\n 'use strict';\n\n\n var HotCollectionToCollection = function () {};\n\n\n /**\n * Transform an Object from StreamHub's Hot Collection endpoint into a\n * st... | javascript | edit | 0 | 2 | mit | 8566a1dedb86a6941ef32822a424dbae327e646d | gobengo/streamhub-hot-collections | src/streams/hot-collection-to-collection.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar mongo = require('mongoskin');\nvar job = require('./job');\nvar Queue = require('./queue');\nvar Worker = require('./worker');\n\nmodule.exports = Connection;\n\nfunction Connection(uri, options) {\n this.db = mongo.db(uri, optio... | javascript | edit | 0 | 2 | mit | 3f8a720bce6ea792be37fbf7a52ba7ea62d89c9f | dioscouri/nodejs-monq | lib/connection.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, {Component} from 'react'\nimport {StyleSheet, View} from 'react-native'\nimport TabButton from './TabButton'\n\nexport default class extends Component {\n\tstate = {activeTab: 0}\n\n\trender = () => (\n\t\t<View style={{fl... | javascript | edit | 0 | 2 | mit | 9b491e8b0792917404e6a8af09b1f6bd367274d1 | Digitova/reactova-framework | src/components/SubTabView/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { Field, reduxForm } from 'redux-form';\n\nclass PostsNew extends React.Component {\n renderField(field) {\n return (\n <div className='form-group'>\n <label>{field.label}</label>\n ... | javascript | edit | null | null | mit | 30716f7acac0bf738d32b9c69aca84b59872a821 | monsteronfire/redux-learning-blog,monsteronfire/redux-learning-blog | src/components/posts_new.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// convert current notebook to html by calling \"ipython nbconvert\" and open static html file in new tab\n\ndefine([\n 'base/js/namespace',\n 'jquery',\n], function(IPython, $) {\n \"use strict\";\n if (IPython.version[0] <... | javascript | edit | 0 | 2 | bsd-3-clause | 78aa6e0fb40c58376105c801c1204b194bc926de | Konubinix/IPython-notebook-extensions,Konubinix/IPython-notebook-extensions,Konubinix/IPython-notebook-extensions | publishing/printview/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst fs = require(`fs`);\nconst glob = require(`glob`);\nconst path = require(`path`);\n\nconst buildHtml = require(`./_build-html.js`);\n\nconst pages = glob.sync(path.join(process.cwd(), `pages`, `**`, `*.hbs`));\n\nmodule.exports = ... | javascript | edit | 0 | 2 | mit | 7aeca984f56841396a3d26120decc7b1b161f92a | avalanchesass/avalanche-website,avalanchesass/avalanche-website | scripts/_build-base-html.js | accepted | null | true |
[
{
"role": "user",
"content": "Write javascript code for the following: Create app entry main file"
},
{
"role": "assistant",
"content": "import './css/app';\nconsole.log('Initiated');\nimport {postMessage, getMessage} from './js/worker';\n\ndocument.addEventListener('DOMContentLoaded', init);\n\... | javascript | new_file | 0 | 2 | mit | 1519fa8c1a2d92b5ab2f515f920bea3a691eca4f | abhisekp/WebWorker-demo,abhisekp/WebWorker-demo | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nrequire('./env');\n\nmodule.exports = function(config) {\n config = Object.assign({}, config, {\n BUGS_TOKEN: process.env.BUGSNAG_TOKEN,\n LOGS_TOKEN: process.env.LOGENTRIES_TOKEN\n });\n\n require('./bugsnag')(config.BUGS_TOKE... | javascript | edit | 0 | 1 | mit | 071ebfc41f71078432ad061488cb0b2175ab5668 | dial-once/node-microservice-boot | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nenabled(){\n this.isDebugging = false;\n \n this.onKeyDown = (e) => {\n // ==========================\n // F4 key - toggle debug mode\n // ==========================\n \n if (e.keyCode === 115){\n this.isDebugging... | javascript | edit | null | null | mit | 561c08e0ccf70290b5c6c098b4a4b77fd5756b51 | chylex/TweetDuck,chylex/TweetDuck,chylex/TweetDuck,chylex/TweetDuck | Resources/Plugins/.debug/browser.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst { Router } = require('express')\nconst authRoutes = require('./authentication')\nconst usersRoutes = require('./users')\nconst authMiddleware = require('./../middlewares/authentication')\n\nconst api = (app) => {\n let... | javascript | edit | 0 | 1 | mit | bc7f78fa11cfd51a4bcf28a3d1bc5aa384772224 | lucasrcdias/customer-mgmt | api/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ncontext(\"Sage top bar UI\", () => {\n beforeEach(() => {\n cy.visit(\"/\")\n })\n\n context(\"new node icon\", () => {\n it(\"lets you drag a node onto canvas\", () => {\n cy.getSageIframe().find('.proto-node')\n .... | javascript | edit | 0 | 1 | mit | 04035fb612629d88a73b04cdca02efc20833e819 | concord-consortium/building-models,concord-consortium/building-models,concord-consortium/building-models,concord-consortium/building-models,concord-consortium/building-models | cypress/integration/top-bar.spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nimport React, { Component } from 'react';\nimport Pic from '../lib/index.js';\n\nexport default class Playground extends Component {\n render() {\n return (\n <html>\n <head>\n <meta charSet='UT... | javascript | edit | 0 | 2 | mit | d23efb0cd3380ea5a6b3384f4f2fa5ff72466f0b | benox3/react-pic | playground/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport 'normalize.css';\nimport React from 'react';\nimport { render } from 'react-dom';\nimport ButtonDemo from './components/ButtonDemo';\nimport './index.css';\n\nrender(\n <main>\n <ButtonDemo />\n </main>,\n document.getEleme... | javascript | edit | 0 | 0 | mit | 012db48868f1770b85925e52dce7628883f6867a | kripod/material-components-react,kripod/material-components-react | demo/src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst parse = require(\"./parser\");\nconst { getClass } = require(\"./objects\");\nconst interpret = require(\"./virtualMachine\");\n\nfunction main({ runtime, data, system, log }) {\n const program = parse(data);\n\n // Set the Syst... | javascript | edit | 0 | 4 | mit | d52129c5d915e260d4d86914326606f305ad4ed0 | captbaritone/winamp2-js,captbaritone/winamp2-js,captbaritone/winamp2-js | experiments/modern/src/maki-interpreter/interpreter.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/1.0/config/configuration-file.html\n\nmodule.exports = function (config) {\n config.set({\n basePath: '',\n frameworks: ['jasmine', '@a... | javascript | edit | 0 | 1 | mit | dd80f254f407429aeaf5ca5c4fb414363836c267 | dzonatan/angular2-linky,dzonatan/angular2-linky | src/karma.conf.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\nlet mongoose = require('mongoose')\n\nmongoose.Promise = global.Promise\n\nlet Schema = mongoose.Schema\n\nlet UserSchema = new Schema({\n email: String,\n password: String,\n CMDRs: {\n default: [],\n type: [{\n ... | javascript | edit | 0 | 1 | bsd-3-clause | f24a110d489a35705477ec1332fb9a148a26b609 | FuelRats/api.fuelrats.com,FuelRats/api.fuelrats.com,FuelRats/api.fuelrats.com | api/models/user.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Bcrypt = require('bcryptjs')\nvar Mongoose = require('../../database').Mongoose\n\nvar ObjectId = Mongoose.Schema.Types.ObjectId;\n\nvar userSchema = new Mongoose.Schema({\n username: {\n type : String,\n required: true\n },... | javascript | edit | 0 | 3 | mit | 6143f9ef9701b92ec38aa12f4be2b1c94e4394cd | fitraditya/Obrel | app/models/user.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst WMASGSpider = require('../wmasg-spider');\n\nclass SearchItems {\n constructor(concurrency = 5) {\n this.title = 'search items';\n this.concurrency = concurrency;\n }\n\n process(job, done) {\n const spider = new WMASG... | javascript | edit | 0 | 4 | mit | f0b03d64e8e43781fe3fe97f6f6de4f4a1da1705 | adrianrutkowski/wmasg-crawler | jobs/search-items.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nnew Vue({\n el: '#app',\n delimiters: ['[[', ']]'],\n data: {\n search: '',\n activeNote: window.location.href.split('#')[1]\n },\n methods: {\n seeNote: function (note) {\n this.activeNote = note\n }\n },\n upda... | javascript | edit | 0 | 6 | mit | f345e428c9d7766ee5945f1d1d2cbb6e64c24ce4 | Yutsuten/Yutsuten.github.io,Yutsuten/Yutsuten.github.io,Yutsuten/Yutsuten.github.io | assets/js/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine(['mac/roman'], function(macRoman) {\n\n 'use strict';\n \n function open(item) {\n return item.getBytes().then(function(bytes) {\n item.setDataObject(new TextView(bytes.buffer, bytes.byteOffset, bytes.byteLength));\n ... | javascript | edit | 0 | 1 | mit | 20589a3fbfb61328a93a71eda4a90f07d6d0aa23 | radishengine/drowsy,radishengine/drowsy | mac/resources/open_ATXT.js | rejected_duplicate | Near-duplicate of sample 69113 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar utils = require('utils')\n , env = utils.bootstrapEnv()\n , moduleLdr = env.moduleLoader\n , injector = require('injector')\n , ncp = require('ncp')\n , path = require('path')\n , async ... | javascript | edit | 0 | 3 | mit | 7249234061e8791ccbee5d0e3b8578d8595e43f8 | CleverStack/node-seed | tests/unit/classes/ModuleLoader.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\nconst canUseDOM = !!(\n\ttypeof window !== 'undefined' &&\n\twindow.document &&\n\... | javascript | edit | 0 | 0 | bsd-3-clause | 021c5e27be8e909bd7a56fc794e9a9d6c15cef9a | salesforce/design-system-react,salesforce/design-system-react,salesforce/design-system-react | utilities/execution-environment.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// @flow\n\nimport * as React from 'react';\nimport { SafeAreaView } from 'react-navigation';\n\nconst forceInset = { top: 'always', bottom: 'never' };\n\ntype Props = {|\n style?: $PropertyType<React.ElementConfig<typeof SafeAreaView>... | javascript | edit | null | null | bsd-3-clause | f49ab42589462d519c4304f9c3014a8d5f04e1b3 | Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal | native/components/safe-area-view.react.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar Semvish = require('semvish');\n\n\nmodule.exports = function(arr) {\n if(!arr) {\n return;\n }\n\n return arr.slice().sort(Semvish.compare).reverse();\n};\n\n```\n\nApply this change: Use rcomp inste... | javascript | edit | 0 | 2 | mit | 2d3838b5391f65fd7abc4975eb0eb153f54386db | MartinKolarik/api-sync,jsdelivr/api-sync,MartinKolarik/api-sync,jsdelivr/api-sync | lib/sort_versions.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nrequire.config({\n paths: {\n jquery: \"/static/js/libs/jquery-min\",\n underscore: \"/static/js/libs/underscore-min\",\n backbone: \"/static/js/libs/backbone-min\",\n mustache: \"/static/js/libs/mustache\... | javascript | edit | 0 | 1 | mit | 4d04ef3b914405a29f42a07e8652967146fbefe6 | jasontbradshaw/multivid,jasontbradshaw/multivid | static/js/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n//var Teachers = require('../models/teachers');\n//var TeacherClasses = require('../models/Teacher_classes');\n//var Classes = require('../models/classes');\n//var ClassLessons = require('../models/class_lessons');\n// var Lessons = req... | javascript | edit | 0 | 1 | mit | de03d876a5ddd7e82627441219d446e9f0d64275 | shanemcgraw/thumbroll,Jakeyrob/thumbroll,absurdSquid/thumbroll,absurdSquid/thumbroll,Jakeyrob/thumbroll,Jakeyrob/thumbroll,shanemcgraw/thumbroll,shanemcgraw/thumbroll | server/controllers/students.js | rejected_duplicate | Near-duplicate of sample 110393 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar m = angular.module(\"routeUrls\", []);\n\nm.factory(\"urls\", function($route) {\n\n var pathsByName = {};\n angular.forEach($route.routes, function (route, path) {\n if (route.name) {\n pathsByName[route.nam... | javascript | edit | 0 | 3 | mit | 55b2c19f6abe49e242a87853250d7da3dec26762 | emgee/angular-route-urls,emgee/angular-route-urls | route-urls.js | rejected_duplicate | Near-duplicate of sample 101354 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* @flow */\nimport React, { PureComponent } from 'react';\nimport type { ChildrenArray } from 'react';\nimport { View, Dimensions, StyleSheet } from 'react-native';\n\nconst styles = StyleSheet.create({\n popup: {\n marginRight: 20... | javascript | edit | null | null | apache-2.0 | b4cd7c829a7d17888902f5468d4ea0a0f1084c42 | vishwesh3/zulip-mobile,vishwesh3/zulip-mobile,vishwesh3/zulip-mobile,vishwesh3/zulip-mobile | src/common/Popup.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow strict-local\n * @format\n */\n\n... | javascript | edit | null | null | mit | c6d77a8570bbd3592acc1430672e57219f418072 | facebook/react-native,myntra/react-native,facebook/react-native,pandiaraj44/react-native,myntra/react-native,janicduplessis/react-native,javache/react-native,myntra/react-native,javache/react-native,pandiaraj44/react-native,javache/react-native,javache/react-native,janicduplessis/react-native,janicduplessis/react-nativ... | Libraries/Utilities/PerformanceLoggerContext.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.