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": "Write javascript code for the following: Add stderr option to hello-world command"
},
{
"role": "assistant",
"content": "CLI.registerCommand('hello-world', function(options) {\n if(options.stderr)\n console.error(options.prefix + string);\n else\n console.in... | javascript | new_file | 0 | 2 | mit | 1ad904dfeb6d3502bee0ff8df455554d676f1735 | practicalmeteor/meteor-mcli,practicalmeteor/meteor-mcli,practicalmeteor/meteor-mcli | starter-cli-app/server/HelloWorldCommand.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst WAIT = 1000;\nconst NODE_PORT = process.env.NODE_PORT || 3000;\n\nmodule.exports = {\n 'Smoketest' (browser) {\n browser\n .url(`http://localhost:${NODE_PORT}/`)\n .waitForElementVisible('body', WAIT)\n .assert.... | javascript | edit | 0 | 1 | mit | 1f1203d39db523c9c5743f69691fb9a80c21c5ff | keystonejs/react-easy-universal,ericelliott/react-easy-universal,ericelliott/react-easy-universal,keystonejs/react-easy-universal | source/test/functional/browser/smoketest.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport class WebsocketService {\n\tconstructor($log, _) {\n\t\t'ngInject';\n\n\t\tthis._ = _;\n\t\tthis.$log = $log;\n\n\t\tthis.$log.info('constructor()', this);\n\n\t\tthis.host = 'localhost:1337';\n\n\t\t// if user is running mozilla... | javascript | edit | 0 | 5 | unlicense | cb5c4fa746844eef4304601a0ca9c98fca7b4277 | ejwaibel/squarrels,ejwaibel/squarrels | src/app/shared/websocket/websocket.service.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { StyleSheet } from 'react-native';\n\nexport default StyleSheet.create({\n container: {\n backgroundColor: '#808080',\n flex: 1,\n flexDirection: 'row',\n },\n\n mainSection: {\n flex: 3,\n },\n\n inspectorSecti... | javascript | edit | 0 | 0 | mit | 4e5c0817767ddd1608f04f1dce2a852c3811732b | danscan/fractal,danscan/fractal | app/InterfaceEditor/components/Editor/styles.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$('form').submit(function(event) {\n\n event.preventDefault();\n\n if ($(this).hasClass('shake')) {\n return;\n }\n\n $.post('/api/login', $(this).serialize(), function(response) {\n location.reload();\n }).error(function() {... | javascript | edit | 0 | 3 | mit | 4761e6505a3243245c8010c91c677b4bbf229457 | kunni80/server,muffin/server | public/scripts/login.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(function () {\n $(document).ready(function () {\n\n if($('.button--confession-edit').length) {\n $('.button--confession-edit').each(function() {\n var el = $(this);\n var time = el.attr('data-remaining-time');\n... | javascript | edit | 0 | 2 | mit | 442af43e7a07f0fcf816a584f1589a7407b14e8c | kollegorna/badrumsbekannelser,kollegorna/badrumsbekannelser,kollegorna/badrumsbekannelser,kollegorna/badrumsbekannelser | app/assets/javascripts/app/init.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport const LINEAR = '(linear)'\nexport const NONE = '(none)'\nexport const NULL = '(null)'\nexport const NUMBER = '(number)'\nexport const PREVIOUS = '(previous)'\n\nexport const QUERY_FILL_OPTIONS = [NULL, PREVIOUS, NUMBER, NONE, LIN... | javascript | edit | 0 | 0 | mit | 4b3dd53010a4f13647bc1b7af977081d2b439a24 | influxdata/influxdb,nooproblem/influxdb,influxdb/influxdb,mark-rushakoff/influxdb,mark-rushakoff/influxdb,nooproblem/influxdb,influxdb/influxdb,influxdb/influxdb,nooproblem/influxdb,influxdb/influxdb,li-ang/influxdb,nooproblem/influxdb,mark-rushakoff/influxdb,mark-rushakoff/influxdb,influxdb/influxdb,nooproblem/influxd... | ui/src/shared/constants/queryFillOptions.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nclass UpdatingPopover extends React.Component {\n componentDidUpdate(prevProps) {\n if (prevProps.children !== this.props.children) {\n console.log('updating!');\n this.props.scheduleUpdate();\n }\n }\n\n render() {\n... | javascript | edit | 0 | 2 | mit | 0ab5f1cd3911755db5a12330cc67266db22491bc | react-bootstrap/react-bootstrap,react-bootstrap/react-bootstrap,react-bootstrap/react-bootstrap | www/src/examples/Overlays/ScheduleUpdate.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nangular.\n\tmodule('characterDetail').\n\tcomponent('characterDetail', {\n\t\ttemplateUrl: '/character-detail/character-detail.template.html',\n\t\tcontroller: ['IceFire', '$routeParams',\n\t\t\tfunction CharacterDetailController(IceFir... | javascript | edit | 0 | 0 | mit | c22c0ee2762bc7bfbeae977c90bbdd97704738eb | cperezortiz/wiki_got,cperezortiz/wiki_got | app/character-detail/character-detail.component.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Validate if a property is a valid CSS one.\n *\n * @param {string} prop\n * @return {boolean} Whether or not the property is valid (true = valid)\n */\n\nconst RE_VALID_CSS_PROPERTY = /^[a-z-]+$/\n\nexport default function (prop... | javascript | edit | 0 | 2 | mit | 5713ab8cec407a5c6b1a651339994b29a1515d5e | gucong3000/stylelint,stylelint/stylelint,hudochenkov/stylelint,heatwaveo8/stylelint,gucong3000/stylelint,heatwaveo8/stylelint,stylelint/stylelint,gaidarenko/stylelint,hudochenkov/stylelint,evilebottnawi/stylelint,hudochenkov/stylelint,stylelint/stylelint,gaidarenko/stylelint,gaidarenko/stylelint,m-allanson/stylelint,st... | src/utils/validateCssProperty.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar wsUri = \"ws://localhost:8000/ws/\";\n\nfunction setupWebSocket() {\n var websocket = new WebSocket(wsUri);\n websocket.onopen = function(evt) { onOpen(evt) };\n websocket.onmessage = function(evt) { onMessage(evt) };\n}\n\nfunct... | javascript | edit | 0 | 3 | mit | 7c2a9288cd3fbe56cc0698296fce927fb52f3c3c | alessandroHenrique/coinpricemonitor,alessandroHenrique/coinpricemonitor,alessandroHenrique/coinpricemonitor | dashboard/static/js/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\nvar _ = require('lodash');\n\n\nfunction process(result){\n\n\tlet result = {\n\t\tnbCacheServers: 1,\n\t\tcacheServers: [\n\t\t\t{\n\t\t\t\tid: 0,\n\t\t\t\tvideoIds:[]\n\t\t\t}\n\t\t]\n\t};\n\n\twriteOutput(result);\n}\... | javascript | edit | 0 | 1 | mit | 78e076693c42010d90372de983d465255a6f55b9 | bebelz/JsParser | Pizza/modules/processor.js | rejected_duplicate | Near-duplicate of sample 74174 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * Mach-84: The Virtual Machinery Playpen\n * Inspired by the Vintage Computer Club\n *\n * Copyright (c) 2014 blackchip.org\n *\n * Permission is hereby granted, free of charge, to any person obtaining a\n * copy of this software a... | javascript | edit | 0 | 0 | mit | 4b110e58810e6728d8881234b3f8a429a19fc167 | blackchip-org/mach84,blackchip-org/mach84 | buster.js | accepted | null | true |
[
{
"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 | 655d4cacb0cdb133c322abe57c7f36d1b77bcd2e | kassens/relay,kassens/relay,voideanvalue/relay,voideanvalue/relay,wincent/relay,yungsters/relay,freiksenet/relay,josephsavona/relay,atxwebs/relay,josephsavona/relay,facebook/relay,yungsters/relay,freiksenet/relay,yungsters/relay,wincent/relay,xuorig/relay,zpao/relay,facebook/relay,cpojer/relay,atxwebs/relay,xuorig/rela... | packages/react-relay/modern/readContext.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport { intlShape } from './shape';\n\nconst FormattedMessage = ({ id, values, defaultMessage = '', html = false }, { intl }) => {\n const message = intl.formatMessage({ id, defaultMessage },... | javascript | edit | 0 | 2 | mit | ad9f94f213d301d79d28b9197122fd661765166f | Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Telescope,VulcanJS/Vulcan,VulcanJS/Vulcan,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Telescope | packages/vulcan-i18n/lib/modules/message.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* jshint node: true, browser: false */\n'use strict';\n\n// CREATE HTTP SERVER AND PROXY\n\nvar app = require('express')();\napp.set('views', __dirname + '/app');\napp.set('view engine', 'ejs');\n\napp.use(require('morgan')('dev'));\n\... | javascript | edit | 0 | 2 | mit | 0b8daecd20e370b525ae1d0bc3272af26b85a5e6 | scbd/undb.cbd.int,scbd/undb-portal,scbd/undb.cbd.int,scbd/undb-portal,scbd/undb.cbd.int | server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// This is the entrypoint for the Rails asset pipeline, and is new\n// as part of Sprockets 4.0. See https://github.com/rails/sprockets/blob/master/UPGRADING.md#manifestjs\n\n\n// Most JS is built separately, and most styles are define... | javascript | edit | 0 | 0 | mit | 67a83444d5cd20a4557a42d99e0137cac515613f | studentinsights/studentinsights,studentinsights/studentinsights,studentinsights/studentinsights,studentinsights/studentinsights | app/assets/config/manifest.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use babel';\n\nimport { CompositeDisposable, File } from 'atom';\n\nexport default {\n subscriptions: null,\n\n activate() {\n // Events subscribed to in atom's system can be easily cleaned up with a CompositeDisposable\n this.... | javascript | edit | 0 | 2 | mit | 706d0c8b5c15aa0d772756e4981c031c41c46353 | chriscasola/atom-jump-to-spec | lib/atom-jump-to-spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\npipe.once('package:initialize', function (pagelet) {\n 'use strict';\n\n //\n // We don't need to have any other information from the pagelet then the\n // placeholders/elements that contain our packages-pagelet placeholders.\n //\... | javascript | edit | 0 | 3 | mit | 4833fed025c1d99ba70a0de0f3c6563105e81853 | warehouseai/packages-pagelet,nodejitsu/packages-pagelet | client.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*global define */\ndefine(['jquery'], function($) {\n 'use strict';\n // Loads the specified JSON config file and returns a promise\n // to tell you when it's done.\n return function(url) {\n var loaded = $.Deferred(... | javascript | edit | 0 | 2 | mit | 536b462079ee9db1be030ca94015ddfcd9bc4452 | ceph/calamari-clients,ceph/calamari-clients,ceph/romana,SUSE/romana,SUSE/romana,ceph/romana,ceph/romana,ceph/romana,ceph/calamari-clients,SUSE/calamari-clients,SUSE/calamari-clients,ceph/calamari-clients,SUSE/calamari-clients,SUSE/calamari-clients,SUSE/romana,GregMeno/test,ceph/romana,GregMeno/test,GregMeno/test,GregMe... | dashboard/app/scripts/helpers/config-loader.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// DecentCMS (c) 2014 Bertrand Le Roy, under MIT. See LICENSE.txt for licensing details.\n'use strict';\n\nmodule.exports = function searchResultsTemplate(searchResultsPart, renderer, done) {\n var result = searchResultsPart.result;\n ... | javascript | edit | 0 | 2 | mit | 22142f28d1ba77d881b2df18b3cd73c23b68e521 | DecentCMS/DecentCMS | modules/core/search/views/search-results.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar YAHOO = require('../../../../src/geo/geocoder/yahoo-geocoder');\n\ndescribe('geo/geocoder/yahoo-geocoder', function () {\n it(\"we shouldn't get a direction that doesn't exist\", function (done) {\n YAHOO.geocode('68461092610314... | javascript | edit | 0 | 1 | bsd-3-clause | 5a6b778f82ee02b25d400fb9eca9f129cc4f46a6 | splashblot/cartodb.js,splashblot/cartodb.js,splashblot/cartodb.js,splashblot/cartodb.js | test/spec/geo/geocoder/yahoo-geocoder.spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar app = require('app');\nvar BrowserWindow = require('browser-window');\nvar Menu = require('menu');\n\nvar mainWindow = null;\n\nvar menu = Menu.buildFromTemplate([\n {\n label: 'er',\n submenu: [\n {\n ... | javascript | edit | 0 | 2 | apache-2.0 | f40f200f0713fdc261a88076a71ae6faaa78cc4d | ksoichiro/er,ksoichiro/er | main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function () {\n app.collections.Packages = Backbone.Collection.extend({\n model : app.models.Package,\n\n url : '/packages',\n\n initialize: function () {\n\n }\n\n });\n})();\n\n```\n\nApply this change: Update resource ... | javascript | edit | 0 | 1 | mit | 14c2d82f0ad5156fd2719c6f76fb5d03abf817ad | web-audio-components/component.fm-old | client/app/collections/packages.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst Sequelize = require('sequelize');\n\nconst db = new Sequelize('postgres', 'postgres', ' ', {\n dialect: 'postgres',\n port: 5432,\n});\n\ndb.authenticate()\n .then((err) => {\n if (err) {\n console.log('Unable to connec... | javascript | edit | 0 | 2 | mit | 1edbe978ddc5ccaf8de0f081d7d6c1762a0603ed | Darkrender/raptor-ads,bwuphan/raptor-ads,Darkrender/raptor-ads,wolnewitz/raptor-ads,wolnewitz/raptor-ads,Velocies/raptor-ads,Velocies/raptor-ads,bwuphan/raptor-ads | database/database.js | accepted | null | true |
[
{
"role": "user",
"content": "Write javascript code for the following: Fix a legit broken import"
},
{
"role": "assistant",
"content": "import '../components/comments/CommentsItem/_comments-unit-tests.js';\nimport '../components/posts/timeframeUtils.tests.js';\nimport './moderation/moderation.fr... | javascript | new_file | 0 | 0 | mit | 0479b7efbbb7ffcf33825e4f6b9d0bf499e4f9d1 | Discordius/Lesswrong2,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Telescope | packages/lesswrong/testing/client.tests.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nimport React, { Component } from 'react';\nimport ReactCSS from 'reactcss';\n\nimport colors from '../styles/variables/colors';\nimport 'normalize.css';\nimport '../fonts/work-sans/WorkSans.css!';\nimport '../styles/fel... | javascript | edit | 0 | 1 | mit | cb522cce8dc251bd0c3f9b8a5236b951dc49d152 | henryboldi/felony,tobycyanide/felony,henryboldi/felony,tobycyanide/felony | src/components/Felony.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar Compiler = require('traceur').NodeCompiler\n , xtend = require('xtend')\n ;\n\nvar traceurOptions = {\n modules : 'commonjs',\n sourceMaps : true\n};\n\nexports = module.exports = function compileFile(fil... | javascript | edit | 0 | 4 | mit | cdebf5d266d9d3569abe165ee6b4b64628ce813c | beni55/es6ify,kkoehler/es6ify,beni55/es6ify,cymen/es6ify-with-subarg,thlorenz/es6ify,kkoehler/es6ify | compile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst intialState = ['hotels', 'points of interest', 'museums', 'nightlife', 'restaurants'];\n\nconst branchTitles = (state = intialState, action) => {\n switch (action.type) {\n case 'UPDATE_BRANCH_TITLES':\n return Object.ass... | javascript | edit | 0 | 2 | mit | 6fe434c4a6e627f25a0f1dd50d5299e9258c4dcc | Tropical-Raptor/trip-raptor,theredspoon/trip-raptor | src/client/scripts/reducers/branchTitles_reducer.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = {\n modify(defaultConfig, { target, dev }, webpack) {\n const config = defaultConfig; // stay immutable here\n\n // Change the name of the server output file in production\n if (target === 'we... | javascript | edit | 0 | 0 | mit | 0e535e0b865f91e4120b3e2ac46dc971a83b423b | jaredpalmer/razzle,jaredpalmer/react-production-starter,jaredpalmer/razzle | examples/with-vendor-bundle/razzle.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst fs = require('fs'), os = require('os');\nconst sqlite = require('sqlite3');\n\nvar out = fs.createWriteStream('tweets.csv');\nout.write('ID\\tUser\\tTimestamp' + os.EOL);\n\nvar db = new sqlite.Database('tweets.db', function(err) ... | javascript | edit | 0 | 2 | mit | 8d246397cc33b6f7c2ee58cdf78fb0f48b04ad10 | mdekstrand/claptrap | export.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Created by eurides on 25/04/16.\n */\n\n(function ($) {\n\n $.fn.serverStatus = function () {\n $.ajax({\n type: 'GET',\n dataType: 'json',\n url: 'serviceStatus',\n success:... | javascript | edit | 0 | 4 | unlicense | 3f203ca00d6a5919ad0675f4e711c316b5c06613 | ebaptistella/integrator0800,ebaptistella/integrator0800,ebaptistella/integrator0800 | assets/javascripts/plugin.integrator0800.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine([\n 'views/editor_collection_base',\n 'underscore',\n 'jquidrag',\n 'text!templates/groups.tpl',\n 'views/group_row',\n 'views/group_editor',\n 'models/group',\n 'models/game',\n 'vent',\n],\nfunction(\n EditorCollectio... | javascript | edit | 0 | 1 | mit | 72e2a7fe0fd63acd2477e1d94c116c7a6173c762 | ARISGames/jsEditor,ARISGames/jsEditor,ARISGames/jsEditor,ARISGames/jsEditor | scripts/views/groups.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport assert from 'assert';\nimport { parse } from 'graphql';\nimport { visit, visitInParallel } from 'graphql/language/visitor';\nimport { validate } from 'graphql/validation';\nimport { buildASTSchema } from 'graphql/utilities/buildA... | javascript | edit | 0 | 1 | mit | 0895048d0582881fe1ba4b976c88dce231808de0 | cjoudrey/graphql-schema-linter | test/rules/enum_values_have_descriptions.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { UPDATE_ROOT } from '../actions/update_root_action';\n\n\nconst intialState = {\n currentRoot: '',\n};\n\nconst root = (state = intialState, action) => {\n switch (action.type) {\n case UPDATE_ROOT:\n return {\n ... | javascript | edit | 0 | 2 | mit | 5b83a8e1c027297ebfc9ddcd311675841cd36be2 | theredspoon/trip-raptor,Tropical-Raptor/trip-raptor | src/client/scripts/reducers/root_reducer.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar parse = require('dox').parseComments;\nvar extractModuleMeta = require('./utils/extract-module-meta');\n\n/**\n * @param {string} content\n * @param {Object} context\n * @param {Object} context.loader Loader context\n * @param {Obje... | javascript | edit | 0 | 2 | mit | 8922c0df0aec702de461c097df59577f59372bcb | kisenka/webpack-docs-plugin,kisenka/docpack | lib/default-extractor.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\nconst symbol = require('../utilities/symbol');\n\nlet experiments = {\n BUILD_INSTRUMENTATION: symbol('build-instrumentation'),\n INSTRUMENTATION: 'instrumentation',\n NPM_BLUEPRINTS: symbol('npm-blueprints'),\n BROWS... | javascript | edit | 0 | 1 | mit | eed32aa4f96f8b00bc4467b9cc57f2c83935addd | elwayman02/ember-cli,mike-north/ember-cli,seawatts/ember-cli,asakusuma/ember-cli,mike-north/ember-cli,raycohen/ember-cli,jrjohnson/ember-cli,balinterdi/ember-cli,HeroicEric/ember-cli,seawatts/ember-cli,kanongil/ember-cli,jgwhite/ember-cli,buschtoens/ember-cli,cibernox/ember-cli,ember-cli/ember-cli,ef4/ember-cli,kategen... | lib/experiments/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// qgr-cntrl-pills\n\ndefine(function (require) {\n var $ = require('jquery');\n var _ = require('underscore');\n var Backbone = require('backbone');\n var Handlebars = require('handlebars');\n var pills_tmpl = require('text!tmpl/p... | javascript | edit | null | null | mit | d89d9b2bc6d759b630ec5607ea67d3733b3cae26 | qgr/qgr-cntrl-pills | src/qgr-cntrl-pills.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport TextFieldWithButton from '../text-field-with-button';\nimport NotificationHandler from '../../mixins/notification-handler';\n\nexport default TextFieldWithButton.extend(NotificationHandler, {\n classNames: ['regex-textfield'],... | javascript | edit | 0 | 6 | bsd-3-clause | dd89222218b9fc2d0b88601bb981c620ca55e4ad | Youwotma/portia,Youwotma/portia,Youwotma/portia,Youwotma/portia | slyd/app/components/regex-text-field-with-button/component.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst url2Domain = require('./ext/url2domain');\nconst credibleSources = require('./data/credible');\nconst notCredibleSources = require('./data/notCredible');\n\nmodule.exports.check = (event, context, callback) => {\n... | javascript | edit | 0 | 1 | apache-2.0 | 37a4a3a9df1dc75b967748e3457bf51f51e008e1 | factcheckthenews/prototype,factcheckthenews/prototype | handler.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nPackage.describe({\n name: \"ecmascript-containers\",\n version: \"0.1.2\",\n summary: \"Polyfills for ECMAScript 2015 Map and Set\",\n git: \"https://github.com/meteor/ecmascript-containers\",\n documentation: \"README.md\"\n});\n... | javascript | edit | 0 | 1 | mit | 78a3707f66a54be6630d6cd46471f13f2985c8e7 | mauricionr/meteor,hristaki/meteor,alexbeletsky/meteor,codingang/meteor,papimomi/meteor,guazipi/meteor,emmerge/meteor,alexbeletsky/meteor,mirstan/meteor,SeanOceanHu/meteor,sitexa/meteor,whip112/meteor,codingang/meteor,mjmasn/meteor,AlexR1712/meteor,yiliaofan/meteor,luohuazju/meteor,udhayam/meteor,Ken-Liu/meteor,deanius/... | packages/ecmascript-containers/package.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\n\nimport {\n FieldContainer,\n FieldLabel,\n FieldInput,\n} from '@keystonejs/ui/src/primitives/fields';\n// TODO: Upload component?\nimport { Input } from '@keystonejs/ui/src/primitives/for... | javascript | edit | 0 | 2 | mit | 257d3c1e69999e96ce93c8f9313459be3902844f | keystonejs/keystone,keystonejs/keystone,keystonejs/keystone | packages/fields/types/File/views/Field.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { connect } from 'react-redux';\n// Components\nimport { Route, Redirect } from 'react-router';\nimport DashNav from '../components/dashboard/DashNav';\n// Styles\nimport '../styles/dashboard/index.css... | javascript | edit | 0 | 2 | mit | 7c5173337bd2146bdaa10bcbc78f8297b10d7231 | PCGeekBrain/TruckTrack,PCGeekBrain/TruckTrack,PCGeekBrain/TruckTrack | client/src/containers/DashboardContainer.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport * as React from \"react\";\n\n/**\n * Component used as an indicator for build status.\n * Statuses are differentiated by alternative\n * styling rules.\n * @param props.status the build status. Partially determines\n * the styli... | javascript | edit | 0 | 1 | apache-2.0 | 790f5cf9d2e126eab46caef178b4c2aa735fe684 | googleinterns/step240-2020,googleinterns/step240-2020,googleinterns/step240-2020,googleinterns/step240-2020 | src/main/webapp/components/BuilderGrid.js | rejected_duplicate | Near-duplicate of sample 70955 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n!function(seine, exports) {\n 'use strict';\n\n var Component = seine.Component,\n keyboard = demo.keyboard;\n\n var PositionLogger = Component.extend();\n\n PositionLogger.prototype.update = function(delta, x, y, z) {\n if(... | javascript | edit | 0 | 3 | mit | d5e7d66ea740aa65a05875d64893b41e61a43f3f | reissbaker/gamekernel,reissbaker/gamekernel | demo/components/position-logger.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n/** @method score\n * @description Calculate credibility score\n * @param {Object} criteria - Object containing score criteria\n */\nfunction score(criteria) {\n\tconst https = (criteria.https) ? 10 : 0;\n\tconst capita... | javascript | edit | 0 | 1 | apache-2.0 | 9d5f050022f8b84b511809fade6466aa0b376e09 | factcheckthenews/prototype,factcheckthenews/prototype | ext/credibility.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { storiesOf } from '@kadira/storybook';\nimport moment from 'moment';\nimport {\n withKnobs,\n number,\n object,\n boolean,\n text,\n select,\n date\n} from '../../src';\n\nstoriesOf('Example of... | javascript | edit | 0 | 1 | mit | 758b37c29f65e0865c178fbe23e7729b389d0ffd | storybooks/storybook,rhalff/storybook,shilman/storybook,bigassdragon/storybook,bigassdragon/storybook,jribeiro/storybook,kadirahq/react-storybook,rhalff/storybook,rhalff/storybook,enjoylife/storybook,storybooks/storybook,storybooks/react-storybook,nfl/react-storybook,bigassdragon/storybook,kadirahq/react-storybook,stor... | example/stories/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport DS from 'ember-data';\n\nexport default DS.RESTAdapter.extend({\n host: window.HexoPluginSite.APP.apiHost,\n namespace: '/v1'\n});\n\n```\n\nApply this change: Change the way the configuration is accessed"
},
{
"role": ... | javascript | edit | 0 | 0 | mit | 551a418e72d12953932a6bff651190c27e57e16f | sergiolepore/hexo-plugin-site,sergiolepore/hexo-plugin-site | app/adapters/application.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint no-process-exit:0 */\nimport fsp from 'fs-promise';\nimport _ from 'lodash';\nimport * as issueHandler from './issue-handler';\nimport {findProjectKey} from './jira-operations';\nimport {getJiraAPI} from './jira-connection';\n... | javascript | edit | 0 | 2 | mit | dfafa84faf28f401990946bb6e22b4e4981bddeb | DarriusWrightGD/jira-precommit-hook,TWExchangeSolutions/jira-precommit-hook | src/precommit-entry.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst React = require('react');\nconst { ScrollView, Text, Image } = require('react-native');\n\nconst gStyles = require('styles'); // global styles\nconst lStyles = require('./styles'); // local styles\n\nclass HomeView extends React.C... | javascript | edit | 0 | 1 | mit | d039a54d8e98e1981ed97a64ccd6d6df9fe7cdca | wswoodruff/strangeluv-native | src/screens/home/components/HomeView.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* global google Gabra $ */\n// $(document).ready(function () {\n google.load('visualization', '1.0', {'packages': ['corechart']})\n google.setOnLoadCallback(function () {\n $.ajax({\n method: 'GET',\n url: Gabra.api_url ... | javascript | edit | 0 | 4 | mit | 95eededf2236434958c5a973bdf49ad2bba19a3f | johnjcamilleri/gabra-web,johnjcamilleri/gabra-web,johnjcamilleri/gabra-web,johnjcamilleri/gabra-web | app/webroot/js/log-chart.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport * as React from \"react\";\nimport {getFields} from \"./utils/getFields.js\";\n\n/**\n * Component used to render Build Information.\n *\n * @param {*} props input properties containing build information\n */\nexport const BuildS... | javascript | edit | 0 | 1 | apache-2.0 | bf39941ab315db60d0c6e7db5d4b24d00ac62d7f | googleinterns/step240-2020,googleinterns/step240-2020,googleinterns/step240-2020,googleinterns/step240-2020 | src/main/webapp/components/BuildSnapshot.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// @todo adapt this to a file checker on an adapter folder.\nvar builtIn = ['S3'];\n\nvar AdapterInjector = function(config) {\n this.config = config;\n};\n\nAdapterInjector.prototype.inject = function() {\n var adapter = this.con... | javascript | edit | 0 | 5 | mit | dbdc60dd505672f206a5a806286e17f025efce08 | bitbinio/bitbin | src/adapter_injector.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport AsyncQueue from '../utils/asyncQueueStructures';\n\nlet asyncQueue = new AsyncQueue();\n\nconst endAsync = () => {\n return { type: 'ASYNC_INACTIVE' };\n};\n\nconst callAsync = (dispatchFn, delay = 500, dispatchEnd, newState) =>... | javascript | edit | 0 | 2 | mit | 8a82e6c26f62f4e575c0ca521e29eeba2d8f08f3 | ivtpz/brancher,ivtpz/brancher | app/actions/asyncActions.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n *\n * App\n *\n * This component is the skeleton around the actual pages, and should only\n * contain code that should be seen on all pages. (e.g. navigation bar)\n */\n\nimport React from 'react';\nimport Helmet from 'react-helme... | javascript | edit | 0 | 1 | mit | 8fdf86729557e600d92befc9144d2587e6cdeabd | FlorianVoct/monPropreMix,FlorianVoct/monPropreMix | app/containers/App/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport DS from 'ember-data';\nimport Score from 'code-test-bot-app/models/score';\nimport Submission from 'code-test-bot-app/models/submission';\n\nexport default Submission.extend({\n\n});\n\n```\n\nApply th... | javascript | edit | 0 | 0 | mit | 22f6567fbe5b8dbf12b309886f8824b06f373920 | cyrusinnovation/CodeTestBotApp,cyrusinnovation/CodeTestBotApp,cyrusinnovation/CodeTestBotApp | app/models/extsubmission.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nrequire('json-schema-ref-parser').bundle(\n require('./schema.json'),\n function(error, schema) {\n if (error) {\n console.error(error)\n process.exit(1) }\n else {\n console.log('%j', schema) } })\n\n```\n\nApply... | javascript | edit | 0 | 2 | mit | 4f3a0315b91f65c9a8bd9e2b55c10d31ddb6ab4f | kemitchell/decision-tree-schema.json | build.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 .directive('actionListResource', ['actionUtilsService', actionListResource]);\n\n function actionListResource(actionUtilsService) {\n return {\n restrict: 'E',\n ... | javascript | edit | 0 | 2 | mit | fa86993c5b521c620d1b160cb1b21918a5743697 | opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport | app/scripts/directives/action-list-resource.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types'; \nimport AppBar from '@material-ui/core/AppBar';\nimport Toolbar from '@material-ui/core/Toolbar';\nimport Typography from '@material-ui/core/Typography';\n\... | javascript | edit | 0 | 1 | mit | f0ef934e42844086b8d8c6edb605d97972d46c24 | SokichiFujita/starter-react-flux,SokichiFujita/starter-react-flux,SokichiFujita/starter-react-flux | bin/app/components/Navi.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*global TodoMVC */\n'use strict';\n\nTodoMVC.module('Todos', function (Todos, App, Backbone) {\n\t// Todo Model\n\t// ----------\n\tTodos.Todo = Backbone.Model.extend({\n\t\tdefaults: {\n\t\t\ttitle: '',\n\t\t\tcompleted: false,\n\t\t\... | javascript | edit | 0 | 3 | mit | 34351b5fec9d64270144c7711282f145e146526c | MariaSimion/todomvc,tweinfeld/todomvc,edueo/todomvc,edwardpark/todomvc,lingjuan/todomvc,smasala/todomvc,lorgiorepo/todomvc,sergeirybalko/todomvc,amy-chiu/todomvc,altmind/todomvc,Qwenbo/todomvc,Garbar/todomvc,yisbug/todomvc,makelivedotnet/todomvc,cbolton97/todomvc,kidbai/todomvc,fszlin/todomvc,ksteigerwald/todomvc,natal... | examples/backbone_marionette/js/TodoMVC.Todos.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(document).ready(function() {\n \t\n \t$(\".login_btn\").on(\"click\", function(event){\n \t\t\tevent.preventDefault();\n \t\t\tconsole.log(\"YOU CLICKED\")\n \t});\n\n \t$(\".signup_btn\").on(\"click\", function(event){\n \t\t\tevent.... | javascript | edit | 0 | 1 | mit | 62c9adefd4fe04079e8ead518e7b2cd01d8974d0 | nyc-squirrels-2015/SkateLyfe,nyc-squirrels-2015/SkateLyfe,nyc-squirrels-2015/SkateLyfe | public/js/application.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n;(function(){\n\n var __filename = (function(){\n var scripts = document.getElementsByTagName('script');\n var a = document.createElement('a');\n a.href = scripts[scripts.length-1].src;\n return a.pathname;\n }());\n\n va... | javascript | edit | 0 | 1 | bsd-3-clause | a447f53b00930029bb383b2877f89d58eea66e1f | pze/react,howtolearntocode/react,microlv/react,yisbug/react,react-china/react-docs,shergin/react,apaatsio/react,jmptrader/react,shripadk/react,restlessdesign/react,jorrit/react,nathanmarks/react,psibi/react,bruderstein/server-react,iamdoron/react,chenglou/react,lastjune/react,jonhester/react,staltz/react,savelichalex/r... | test/browser-runner.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar PubSub = require('pubsub-js');\n\nvar events = {\n fonts: false,\n leaflet: false\n};\n\n\n// Wait for webfonts to load\nPubSub.subscribe('webfonts.active', function() {\n events.fonts = true;\n});\n\n\n// Poll to see if Leaflet ... | javascript | edit | 0 | 4 | mit | 324e67fd315af5ab24bb2094aa0e7a0692b323d4 | LandRegistry/land-registry-elements,LandRegistry/land-registry-elements,LandRegistry/land-registry-elements,LandRegistry/land-registry-elements,LandRegistry/land-registry-elements | src/elements/utils/phantomjs/controller.js | rejected_duplicate | Near-duplicate of sample 93381 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar columnify = require('columnify')\nvar columnsOptins = {\n showHeaders: false,\n minWidth: 35,\n columnSplitter: ' | '\n}\n\nfunction reportDisabledMethod(model, methods) {\n const joinedMethods = methods.join(', ')\n const m... | javascript | edit | 0 | 4 | mit | bf6479ffc2207d090421d944a34de905b5055c12 | Flieral/Publisher-Service,Flieral/Publisher-Service | public/methodDisabler.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Basic presets: swiss direct matchings, round similar to chess, and ko\n * with a matched cadrage. Simple rankings\n *\n * @return Presets\n * @author Erik E. Lorenz <<EMAIL>>\n * @license MIT License\n * @see LICENSE\n */\n\ndef... | javascript | edit | 0 | 1 | mit | caeea091ec1a126bc1869595391c6003aba54b18 | elor/tuvero | basic/scripts/presets.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nL.ColorPicker = L.ToolbarHandler.extend({\n\toptions: {\n\t\ttoolbarIcon: { className: 'leaflet-color-swatch' }\n\t},\n\n\tinitialize: function(map, shape, options) {\n\t\tthis._shape = shape;\n\n\t\tL.setOptions(this, options);\n\t\tL.... | javascript | edit | 0 | 1 | mit | c617c728c373ccf53c7dea9ca71282df5b00149c | yohanboniface/Leaflet.toolbar,Leaflet/Leaflet.toolbar,nateemerson/Leaflet.toolbar,yohanboniface/Leaflet.toolbar | examples/ColorPicker.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst path = require(\"path\");\nconst webpack = require(\"webpack\");\nconst merge = require(\"webpack-merge\");\nconst WriteFilePlugin = require(\"write-file-webpack-plugin\");\n\nconst commonConfig = require(\"./webpack.config-common... | javascript | edit | 0 | 0 | mit | 39949b413ee5c2f6eea8348e4589fd013f2efa58 | ConsenSys/truffle | packages/debugger/webpack/webpack.config-test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, {Component} from 'react';\nimport {Table} from 'react-bootstrap';\nimport {connect} from 'react-redux';\nimport _ from 'lodash';\n\nclass UsersTable extends Component {\n\n render() {\n return (\n <div className=\... | javascript | edit | 0 | 1 | mit | 46e0e37ddaeb350c6c565181f761f80b235616d6 | richashworth/planningpoker,richashworth/planningpoker,richashworth/planningpoker,richashworth/planningpoker | planningpoker-web/src/containers/UsersTable.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react'\n\nconst WelcomeMessage = () => (\n <div className=\"welcome-message-container\">\n <div className=\"logo\">\n <img src=\"images/logo.svg\" />\n </div>\n <div className=\"welcome-message-text tex... | javascript | edit | 0 | 4 | mit | 9b762b912294da4624f0f522c8013753d75ad847 | SirWinn3r/gauche-ou-droite-client,SirWinn3r/gauche-ou-droite-client,SirWinn3r/gauche-ou-droite-client | src/components/Quiz/WelcomeMessage.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nvar MyTitle = React.createClass({\n render: function () {\n return (\n React.DOM.div(null,\n React.DOM.h1(null, 'check out this component!'))\n )\n }\n})\n\nvar MyFirstComponent = React.createClass({\n render: fun... | javascript | edit | 0 | 1 | mit | 9415283001e1fbc83db096b9a9b6b1169f6ce39a | dianafisher/FEM-complete-intro-to-react,dianafisher/FEM-complete-intro-to-react | js/ClientApp.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nManageIQ.angular.app.component('miqButton', {\n bindings: {\n name: '@',\n enabled: '<',\n enabledTitle: '@?',\n disabledTitle: '@?',\n primary: '<?',\n onClick: '&',\n },\n controllerAs: 'vm',\n controller: functi... | javascript | edit | 0 | 4 | apache-2.0 | 00aa83cedeaa3d78e0aab991aef0f5d1435772dd | ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic,ManageIQ/manageiq-ui-classic | app/assets/javascripts/components/miq-button.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction MaterialsFilePicker(callback) {\n this.doneCallback = callback;\n this.selectedMaterials = [];\n \n var courseId = gon.course;\n var that = this;\n $.ajax({\n url: '/courses/' + courseId + '/materials.json',\n succe... | javascript | edit | 0 | 1 | mit | 4862030f70f734809ccb09c49381fd16aad9461b | dariusf/coursemology.org,nusedutech/coursemology.org,Coursemology/coursemology.org,nnamon/coursemology.org,allenwq/coursemology.org,allenwq/coursemology.org,dariusf/coursemology.org,nnamon/coursemology.org,nusedutech/coursemology.org,dariusf/coursemology.org,allenwq/coursemology.org,nnamon/coursemology.org,nusedutech/c... | app/assets/javascripts/materials_file_picker.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst express = require('express');\nconst logger = require('./logging');\n\nconst app = express();\n\nconst server = require('http').Server(app);\nconst routes = require('./routes/index');\n\nrequire('./channels/index').listen(server);... | javascript | edit | 0 | 1 | mit | b17624ce2f4845e4c952b14656efe87e5f4504e0 | dotkom/super-duper-fiesta,dotkom/super-duper-fiesta,dotkom/super-duper-fiesta | server/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Server startup script\n// =====================\n// Responsible for configuring the server,\n// inserting middleware, and starting the\n// app up. \n//\n// Note: this was written on my iPhone, please excuse typos\n\nvar express = req... | javascript | edit | 0 | 0 | mit | 083abfaf788862efdf1c77166969ae010fdf89e2 | billpatrianakos/coverage-web,billpatrianakos/coverage-web,billpatrianakos/coverage-web | server/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* globals module */\nmodule.exports = function(grunt) {\n return {\n options: {\n configFile: 'test/karma.conf.js',\n hostname: 'localhost',\n singleRun: true\n },\n local: {\n browsers: ['Chrome'],\n ... | javascript | edit | 0 | 1 | mit | 428b1b6b61233c16606fb0665ff521135c96684a | dactylographsy/grunt-dactylographsy,tdeekens/grunt-dactylographsy | grunt/tasks/karma.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Backbone = require('backbone');\nvar $ = require(\"jquery\");\nvar Router = require('./router');\nvar PlayerView = require('./views/playerView');\nvar NavView = require('./views/navView');\n\nwindow.app = {\n\tairtimeURL: \"http://a... | javascript | edit | 0 | 1 | mit | 50265c4a04822319ed3b54516a13a0ef1f23c49a | frequencyasia/website,frequencyasia/website | js/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport {\n ADD_VOTE_COMMENT,\n CREATE_COMMENT,\n REMOVE_COMMENT,\n REMOVE_VOTE_COMMENT,\n SET_COMMENTS,\n UPDATE_COMMENT\n} from \"../actions/Comment\";\nimport {REMOVE_POST} from \"../actions/Post\";\n\nconst initialS... | javascript | edit | 0 | 8 | mit | 6fdf94766588df3e520f694fb6fbdaa47e14c22e | faridsaud/udacity-readable-project,faridsaud/udacity-readable-project | src/reducers/Comment.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nJSONEditor.defaults.templates[\"default\"] = function() {\n return {\n compile: function(template) {\n var matches = template.match(/{{\\s*([a-zA-Z0-9\\-_\\.]+)\\s*}}/g);\n var l = matches.length;\n\n // Shortcut if t... | javascript | edit | 0 | 3 | mit | 1f96a066e20a9ae222d4e894d4ae1a385885d712 | Tmeister/json-editor,abe1001/json-editor,YousefED/json-editor,abop/json-editor,flibbertigibbet/json-editor,jdorn/json-editor,abe1001/json-editor,dbirchak/json-editor,ashwinrayaprolu1984/json-editor,ZECTBynmo/json-editor,cunneen/json-editor,YousefED/json-editor,LACabeza/json-editor,dbirchak/json-editor,ivan4th/json-edit... | src/templates/default.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst LOCALIZED_FIELDS = [\n 'text',\n 'string',\n 'richtext',\n 'email',\n 'password',\n 'media',\n 'number',\n 'date',\n 'json',\n 'uid',\n 'component',\n 'dynamiczone',\n 'enumeration',\n];\n\nexport default LOCALIZED_FI... | javascript | edit | 0 | 0 | mit | 3f52933f6a8a5bac24275b5f1a540cab98d0529f | wistityhq/strapi,wistityhq/strapi | packages/strapi-plugin-i18n/admin/src/utils/localizedFields.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { expect, json, stub } from '../../spec_helper'\nimport { parsePost } from '../../../src/components/parsers/PostParser'\n\ndescribe('PostParser', () => {\n it('#render', () => {\n const post = stub('post', { authorId: '42' })... | javascript | edit | 0 | 1 | mit | 19f4a1d553091e887a15afe5cc84d9f31179334c | ello/webapp,ello/webapp,ello/webapp | test/components/parsers/PostParser_test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint-env mocha */\nimport Vue from 'vue-test';\nimport assert from 'assert';\nimport progressBar from '../src/views/progress-bar';\n\nconst ProgressBarComponent = Vue.extend(progressBar);\n\ndescribe('progressBar Component', () => ... | javascript | edit | 0 | 1 | mit | 926cb1003a043663d29b6faa27f9ffe38ffda359 | indirectlylit/kolibri,learningequality/kolibri,jonboiser/kolibri,DXCanas/kolibri,christianmemije/kolibri,mrpau/kolibri,christianmemije/kolibri,benjaoming/kolibri,lyw07/kolibri,learningequality/kolibri,benjaoming/kolibri,DXCanas/kolibri,lyw07/kolibri,mrpau/kolibri,christianmemije/kolibri,jonboiser/kolibri,mrpau/kolibri,... | kolibri/core/assets/test/vue.progress-bar.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar App = Em.Application.create();\n\n// Create the data store.\n//\nApp.store = DS.Store.create();\n\n```\n\nApply this change: Add some code to initialize all of the models recursively."
},
{
"role": "assistant",
"content"... | javascript | edit | 0 | 1 | mit | b5bb8d15320b6f1a1426cda03476ab01a7e00ea4 | cmeiklejohn/overriak-ui | js/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint-disable no-console */\nimport configuration from './configuration'\n\nconst logger = {\n debug(...args) {\n if (['debug'].includes(configuration.logLevel)) {\n console.debug(...args)\n }\n },\n log(...args) {\n ... | javascript | edit | 0 | 2 | mit | 87ad586a01d76585eba492d27f235a66650acb2b | gaearon/react-hot-loader,gaearon/react-hot-loader | src/logger.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport Mimic from 'ui/components/Mimic';\n\nconst root = document.createElement('mimic-div');\nroot.style.width = '100%';\nroot.style.top = 0;\nroot.style.left = 0;\nroot.st... | javascript | edit | 0 | 1 | mit | bce25b55d360e44dfe860ae523a713042ff00814 | 500tech/bdsm,500tech/bdsm,500tech/mimic,500tech/mimic | lib/ui/index.js | rejected_duplicate | Near-duplicate of sample 85606 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nComments.ui = (function () {\n Avatar.options = {\n defaultImageUrl: 'http://s3.amazonaws.com/37assets/svn/765-default-avatar.png'\n };\n\n Tracker.autorun(function () {\n var userId = Meteor.userId();\n\n if (userId) {\n ... | javascript | edit | 0 | 2 | mit | ade5d9ad25931e66ea34f16f860080de83b36279 | komentify/meteor-comments-ui,ARKHAM-Enterprises/meteor-comments-ui,ARKHAM-Enterprises/meteor-comments-ui,komentify/meteor-comments-ui | lib/ui.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nangular.module('arachne.controllers')\n\n\n/**\n * @author: Daniel M. de Oliveira\n * @author: Sebastian Cuy\n */\n.controller('ProjectsController', ['$scope', '$http',\n function ($scope, $http ) {\n\n $scope... | javascript | edit | 0 | 3 | apache-2.0 | f52203e5249eaa591d07941931b04923fc183dd2 | codarchlab/arachnefrontend,codarchlab/arachnefrontend,dainst/arachnefrontend,dainst/arachnefrontend | js/controllers_projects.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Sequelize Initialization\nvar fs = require('fs');\nvar path = require('path');\nvar Sequelize = require('sequelize');\nvar lodash = require('lodash');\nvar config = require('../config');\nvar sequelize = new Sequeli... | javascript | edit | 0 | 3 | mit | 0c6a9d68a464cdb06fcaae25fb6193d1dce96659 | kocsenc/nodejs-tutorme,kocsenc/nodejs-tutorme | models/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmichishiki.api = {};\nmichishiki.api.uri = 'http://amateras.wsd.kutc.kansai-u.ac.jp/~otsuka/michishiki_api_server/';\n\nmichishiki.api.getPost = function(options) {\n var dfd = $.Deferred();\n\n var api_uri = michishiki.api.uri + ... | javascript | edit | 0 | 2 | mit | 3cb7e7d8add46a87345908486459887a5547230b | otknoy/michishiki | js/michishiki_api.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport a11y from './a11y';\nimport keys from './keys';\nimport location from './location';\nimport next from './next';\nimport progress from './progress';\nimport scale from './scale';\nimport timer from './timer';\nimport title from '.... | javascript | edit | 0 | 3 | mit | 9173061630e1e7608ca3f7f322f2979a96ba767c | shower/core | lib/modules/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// ==UserScript==\n// @name Kill nrcQ restrictions\n// @namespace http://use.i.E.your.homepage/\n// @version 0.1\n// @description When browsing nrcq with more than 10 views you need to sign in to view the content, this plugin... | javascript | edit | 0 | 2 | mit | b300580d3db77f0290036110c6cb41d45d676ef6 | DieBauer/userscript-nrcq | killnrcqpaywall.user.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport program from 'commander';\nimport pkg from '../package.json';\nimport initiate from '../lib/initiate';\n\nprogram\n .command('init')\n .description('Initialize Storybook into your project.')\n .option('-f --force', 'Forcely ad... | javascript | edit | 0 | 1 | mit | 01d7080267b189d57745c79476b256dbb408a6b2 | storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,storybooks/react-storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/react-storybook,storybooks/react-storybook,kadirahq/react-storybook | lib/cli/bin/generate.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*!\n * node-minify\n * Copyright(c) 2011-2016 Rodolphe Stoclin\n * MIT Licensed\n */\n\n'use strict';\n\n/**\n * Module dependencies.\n */\n\nvar Promise = require('bluebird');\nvar csso = require('csso');\nvar utils = require('../util... | javascript | edit | 0 | 1 | mit | 215b96d2914d95093c3349c8b83798fa9fd74649 | srod/node-minify | lib/compressors/csso.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { default as React, Component } from 'react';\nimport { render } from 'react-dom';\nvar helper = require('./helper.js');\n\nexport class ReactiveMap extends Component {\n\n constructor(props) {\n super(props);\n this.appba... | javascript | edit | 0 | 1 | apache-2.0 | 0bc4b35e1ceda5e3c833b20c2a584f13c07def65 | appbaseio/reactive-maps,appbaseio/reactive-maps | app/ReactiveMap.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function () {\n function config($stateProvider, $locationProvider) {\n $locationProvider\n .html5Mode({\n enabled: true,\n requireBase: false\n });\n\n $stateProvider... | javascript | edit | 0 | 1 | apache-2.0 | bc2d71d0794d13a492297b0d9fb35b1711d6c62b | jeffminnear/bloc-jams-angular,jeffminnear/bloc-jams-angular | app/scripts/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport { getContext } from 'ember-test-helpers';\n\nfunction resetViews() {\n Ember.View.views = {};\n}\n\nexport default function test(testName, callback) {\n function wrapper() {\n var context = getCon... | javascript | edit | 0 | 2 | mit | 0336e0ccfca30c7f9b2fed47c237cad801e6aadb | MattNguyen/ember-qunit,tsing80/ember-qunit,rwjblue/ember-qunit,OrKoN/ember-qunit,UmangSardesai/ember-qunit,MattNguyen/ember-qunit,tsing80/ember-qunit,emberjs/ember-qunit,tsing80/ember-qunit,UmangSardesai/ember-qunit,aceofspades/ember-qunit,OrKoN/ember-qunit,emberjs/ember-qunit,rwjblue/ember-qunit,OrKoN/ember-qunit,aceo... | lib/ember-qunit/test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Route from '@ember/routing/route';\nimport {inject as service} from '@ember/service';\n\nRoute.reopen({\n config: service(),\n billing: service(),\n router: service(),\n\n actions: {\n willTransition(transition... | javascript | edit | 0 | 4 | mit | d2a5d59cbb252c070599b25ee7329b52643ac7a3 | TryGhost/Ghost-Admin,TryGhost/Ghost-Admin | app/utils/route.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * Validator for AST nodes\n * @lastmodifiedBy ChengFuLin(<EMAIL>)\n * @lastmodifiedDate 2015-08-03\n */\nfunction ASTValidator() {\n}\n\n/**\n * Check for the node is a valid AST node or not\n * @param {Object} node AST nod... | javascript | edit | 0 | 6 | mit | 607bb5feda4b1f51396bd0a7b4c8ff8bf95dfd41 | chengfulin/dujs,chengfulin/dujs | lib/dujs/astvalidator.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport {\n event as d3_event,\n select as d3_select\n} from 'd3-selection';\n\nimport { t } from '../util/locale';\nimport { modeBrowse } from '../modes';\n\n\nexport function uiSourceSwitch(context) {\n var keys;\n\n\n func... | javascript | edit | 0 | 6 | isc | 7586f7e08650590e800942037a343d32157d2577 | digidem/iD,bagage/iD,1ec5/iD,kartta-labs/iD,bagage/iD,ngageoint/hootenanny-ui,AndreasHae/iD,mapmeld/iD,ngageoint/hootenanny-ui,1ec5/iD,digidem/iD,openstreetmap/iD,mapmeld/iD,openstreetmap/iD,morray/iD,AndreasHae/iD,kartta-labs/iD,openstreetmap/iD,AndreasHae/iD,bagage/iD,mapmeld/iD,kartta-labs/iD,ngageoint/hootenanny-ui... | modules/ui/source_switch.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ntest('User visits the admin page.', function() {\n visit('/');\n andThen(function() {\n // List of posts\n equal(find('.posts-list .post').length, 2, 'The index page should have 2 posts.');\n equal(find('.posts-list .post:fir... | javascript | edit | 0 | 1 | mit | f100327053dd9cf8a328418c030f6ceb5d3e4b4e | codelation/blogelator,codelation/blogelator,codelation/blogelator | spec/dummy/app/assets/javascripts/features/user_visits_admin_page_spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nmodule.exports = new function() {\n\n var webdriver = require(\"selenium-webdriver\");\n\n webdriver.WebDriver.prototype.waitJqueryReady = function() {\n var self = this;\n\n return self.flow_.execute(function() {\n self.... | javascript | edit | 0 | 4 | apache-2.0 | b41ee3a21a96c11d2d471a6c1f7e42ac2e362ff9 | andruandru/extended-webdriver | lib/webdriver/webdriver.js | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.