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\nvar path = require('path');\nconst UglifyJsPlugin = require('uglifyjs-webpack-plugin');\n\nmodule.exports = {\n entry: {\n \"zinc\": \"./src/zinc.js\",\n \"zinc.min\": \"./src/zinc.js\",\n },\n output: {\n path: path.resolve... | javascript | edit | 0 | 0 | mit | 5d165a56eb1ea5c6b6344e2cc81a6272ec190774 | alan-wu/Web-based-Zinc-Visualisation,alan-wu/Web-based-Zinc-Visualisation,alan-wu/Web-based-Zinc-Visualisation | webpack.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, {Component, PropTypes} from 'react'\n\nimport BreadcrumbBar from '../components/breadcrumb-bar'\nimport Footer from './footer'\nimport Navigation from '../containers/navigation'\n\nexport default class Application extends ... | javascript | edit | 0 | 4 | mit | aa5612bd009b29fa9c77f5c0c67f174d51f3cb71 | conveyal/commute | client/components/application.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Created by ivan on 8/10/16.\n */\n\nvar MessageContarinerComponent = React.createClass({\n render: function () {\n return (\n <div id=\"message-container\">\n \n </div>\n )\n }\... | javascript | edit | 0 | 1 | mit | fbb4e947e83baed2497fbe72167d9e75e947d5bb | vavimayor159/EjemploChatReact,vavimayor159/EjemploChatReact | public/app/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function(config) {\n\n // If prod or stage, minify the html\n if (process.env.NODE_ENV !== 'development') {\n config.addTransform('minifyHtml', require('./eleventy/utilities/minifyHtml.js'));\n }\n\n // Add heade... | javascript | edit | 0 | 2 | mit | b2d3fdeccdf83ea4e585bca4ef2c86a8ccbd69d2 | bymattlee/bymattlee-web-starter-files,bymattlee/bymattlee-web-starter-files | .eleventy.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst fs = require('fs')\nconst util = require('util')\nconst path = require('path')\n\nclass FsUtils {\n static get chmod() {\n return util.promisify(fs.chmod)\n }\n\n static get readFile() {\n return util.promisify(fs.readFil... | javascript | edit | 0 | 3 | apache-2.0 | 58b1aeb6a7bd43580e2b277319909094c0c4c96d | Mindsers/configfile | src/shared/utils/fs.utils.js | rejected_duplicate | Near-duplicate of sample 79896 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n \"env\": {\n \"browser\": true\n },\n \"extends\": \"eslint:recommended\",\n \"rules\": {\n \"indent\": [\n \"error\",\n 4\n ],\n \"linebreak-style\": [\... | javascript | edit | 0 | 0 | mit | 5c6a8fc05763f9df5cc3cb96c3e0afad2ea288b9 | albertyw/gentle-alerts,albertyw/gentle-alerts | .eslintrc.js | rejected_duplicate | Near-duplicate of sample 83558 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction AppRun(AppConstants, $rootScope, $timeout, Wallet) {\n 'ngInject';\n\n // change page title based on state\n $rootScope.$on('$stateChangeSuccess', (event, toState) => {\n $rootScope.setPageTitle(toState.title);\... | javascript | edit | 0 | 3 | mit | f150d300fd852b4eb659cccf426db43331d5715d | mizunashi/NanoWallet,mizunashi/NanoWallet | src/app/config/app.run.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar _ = require('lodash')\nvar fs = require('fs')\nvar gzip = require('gzip-size')\nvar filesize = require('filesize')\nvar postcss = require('postcss')\nvar cssstats = require('cssstats')\n\nvar display = require('tachyons-display/pack... | javascript | edit | 0 | 0 | mit | 31443406c2ebd7e2fb3b0d2f5f40de52288ca497 | matyikriszta/moonlit-landing-page,topherauyeung/portfolio,topherauyeung/portfolio,cwonrails/tachyons,tachyons-css/tachyons,fenderdigital/css-utilities,fenderdigital/css-utilities,getfrank/tachyons,pietgeursen/pietgeursen.github.io,topherauyeung/portfolio | lib/display.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\nconst BinBuild = require('bin-build');\nconst log = require('logalot');\nconst bin = require('.');\n\nbin.run(['--help'], err => {\n\tif (err) {\n\t\tlog.warn(err.message);\n\t\tlog.warn('zopflipng pre-build test failed')... | javascript | edit | 0 | 3 | mit | 3334184abea8178e89c249c50cbef2716dc529c6 | imagemin/zopflipng-bin | lib/install.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Gray Matter\n * Copyright (c) 2014 Jon Schlinkert, Brian Woodward, contributors.\n * Licensed under the MIT license.\n */\n\n'use strict';\n\n// node_modules\nvar YAML = require('js-yaml');\nvar coffee = require('coffee-script')... | javascript | edit | 0 | 4 | mit | c2115bcf3c476ed13c39a28f5be4c1079e4b0dee | snowyu/gray-matter,Ajedi32/gray-matter,jonschlinkert/gray-matter | lib/parsers.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// For output.filename configuration:\n//\n// Change \"component-name\" in this file to your real component name!\n// DO NOT CHANGE \"[name]\", which denotes the entry property names that webpack automatically inserts for you!\n\nmodule... | javascript | edit | 0 | 0 | mit | cc8d60067f9181a5065baeebf3b8dd0026e309c3 | Pearson-Higher-Ed/component-archetype,Pearson-Higher-Ed/pagination,Pearson-Higher-Ed/component-archetype | webpack.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Inspired from https://github.com/markokajzer/discord-soundbot\n// MIT License - Copyright (c) 2020 Marko Kajzer\nconst path = require('path');\nconst replace = require('replace-in-file');\nconst tsconfig = require('../tsconfig.json')... | javascript | edit | 0 | 2 | apache-2.0 | e2c519e2fa7fb17ab423dddfc3d73e70d6eca969 | utarwyn/discord-tictactoe,utarwyn/discord-tictactoe | lib/replacePaths.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint-env node */\n\nconst webpack = require('webpack');\nconst debug = require('debug')('app:webpack');\nconst CopyWebpackPlugin = require('copy-webpack-plugin');\nconst CleanWebpackPlugin = require('clean-webpack-plugin');\n\ncons... | javascript | edit | 0 | 0 | mit | 71d72dfafc5ae26360826ea7441dc3f92dca4a7a | frosas/lag,frosas/lag,frosas/lag | webpack.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component } from \"react\";\nimport NewNoteForm from \"./NewNoteForm\";\n\nclass NewNote extends Component {\n submit = values => {\n console.log(\"submitting new note\", values);\n };\n\n render() {\n return (\... | javascript | edit | 0 | 1 | mit | 84ce7a7b8399df6267ce7b3f7f37303183b98347 | cernanb/personal-chef-react-app,cernanb/personal-chef-react-app | src/components/NewNote.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar exports = {};\n\nexports.simplePrint = function(video) {\n return `**${video.title}**`;\n};\n\nexports.prettyPrint = function(video) {\n try {\n viewCount = video.view_count.replace(/\\B(?=(\\d{3})+(?!\\d))/g, ',');\n } catch ... | javascript | edit | 0 | 2 | mit | 369c32045310e96bd9ebb34f9f83ef6d06570422 | meew0/Lethe | lib/video-format.js | rejected_duplicate | Near-duplicate of sample 96498 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport {bindActionCreators} from 'redux';\nimport {connect} from 'react-redux';\nimport Transaction from '../transaction';\nimport * as transactionsActionCreators from '../../../redux/transactions/action-crea... | javascript | edit | 0 | 3 | mit | 653758dfa98f66e5880b40ff34772ba86d716a6c | jmeas/finance-app,jmeas/moolah,jmeas/finance-app,jmeas/moolah | client-src/transactions/components/transactions/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n\nmodule.exports = {\n 'properties': {\n 'id': require('./id'),\n 'name': {\n 'type': 'string',\n 'description': 'Name of the client'\n },\n 'address': {\n ... | javascript | edit | 0 | 0 | mit | cb7c55c1822e4311adfb61ff7aaf6d93a9f3f360 | koodilehto/koodilehto-crm-backend,bebraw/swagger-todo,bebraw/react-crm-backend | spec/definitions/client.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Listens for the app launching then creates the window.\n * Ignores the provided window size.\n *\n * @see http://developer.chrome.com/trunk/apps/app.window.html\n */\n\nfunction initPage() {\n addActionButton('Attach onSuspend'... | javascript | edit | 0 | 1 | bsd-3-clause | 2831655d7b56cea5380a7f9ce7062ad054b5a207 | hgl888/mobile-chrome-apps,MobileChromeApps/mobile-chrome-apps,chirilo/mobile-chrome-apps,guozanhua/mobile-chrome-apps,guozanhua/mobile-chrome-apps,chirilo/mobile-chrome-apps,liqingzhu/mobile-chrome-apps,xiaoyanit/mobile-chrome-apps,hgl888/mobile-chrome-apps,wudkj/mobile-chrome-apps,hgl888/mobile-chrome-apps,liqingzhu/m... | spec/runtime/background.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst gulp = require(\"gulp\");\nconst lkpm = require('lkpm');\n\nvar taskExporter = new lkpm.TaskExporter({\n moduleBase: __dirname\n}, gulp);\n\ntaskExporter.exportTasks();\n```\n\nApply this change: Add a precompile step for WebUt... | javascript | edit | 0 | 1 | apache-2.0 | b5abf07970c9fb8ec2c6cbbb7fe1db747d4225b1 | WNPRC-EHR-Services/wnprc-modules,WNPRC-EHR-Services/wnprc-modules,WNPRC-EHR-Services/wnprc-modules,WNPRC-EHR-Services/wnprc-modules,WNPRC-EHR-Services/wnprc-modules,WNPRC-EHR-Services/wnprc-modules,WNPRC-EHR-Services/wnprc-modules | WebUtils/gulpfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport $ from 'jquery';\n\nexport default Ember.Mixin.create({\n queryParams: {\n page: { refreshModel: true },\n sort: { refreshModel: true },\n size: { refreshModel: true }\n },\n mergedQueryOpt... | javascript | edit | 0 | 1 | mit | c9b902ff67511adc1a0ca657e481cf57e044c217 | erikap/ember-data-table,mu-semtech/ember-data-table,mu-semtech/ember-data-table,erikap/ember-data-table | addon/mixins/route.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport default {\n name: 'base',\n configure ({ projectPath }) {\n return {\n basePath: projectPath,\n\n files: [\n 'src/**/*.spec.*',\n { pattern: 'src/**/*', watched: true, included: false }\n ],\n\n ... | javascript | edit | 0 | 1 | mit | 6a05298c0ec57993c19773fb1fa958ca6bd3e35a | saguijs/sagui,saguijs/sagui | src/karma/presets/base.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(function () {\n\t// General-purpose code for showing and hiding modals\n\tvar activeClass = 'modal-active';\n\tvar $overlays = $('.modal-foreground, .modal-background');\n\t$('.modal').each(function () {\n\t\tvar $this = $(this);\t\n\... | javascript | edit | 0 | 3 | mit | 19b98b94b182c7a39ae20c4f5d3fd777770652aa | opendatacity/zeitungssterben,opendatacity/zeitungssterben | app/scripts/modal.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { createStore, applyMiddleware, compose } from 'redux'\nimport createSagaMiddleware from 'redux-saga'\nimport rootReducer from 'rootReducer'\nimport rootSaga from 'sagas'\nimport { extend } from 'lodash'\n\nconst middlewares = []... | javascript | edit | 0 | 1 | mit | eade07d9450246024cb4a78fe1767100de85e734 | andreiconstantinescu/project-viper,andreiconstantinescu/project-viper | client/redux/store.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport urlSlug from './urlSlug';\n\nfunction getPosts() {\n const req = require.context(\"../posts\", true, /^\\.\\/.*\\.md$/);\n const dirtyFileNames = req.keys();\n\n return dirtyFileNames.map(f => {\n const spl = f.sp... | javascript | edit | 0 | 1 | mit | 60a4c234dcc45032d0550876890cb3ad163f548f | jumasheff/jumasheff.github.io,jumasheff/jumasheff.github.io | helpers/getPosts.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst fs = require('fs-extra');\nconst express = require('express');\nconst pathModule = require('path');\n\nconst getDistDir = (src, distDir) => {\n const srcRelative = pathModule.relative(process.cwd(), src);\n return pathModule.res... | javascript | edit | 0 | 3 | mit | bd58f4b42841d9f0e1d417620025a05c8fc03681 | keystonejs/keystone,keystonejs/keystone,keystonejs/keystone | packages/app-static/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\n\nimport refractToComponentsMap from 'refractToComponentMap';\n\nimport './attribute.styl'\n\nclass AttributeComponent extends React.Component {\n constructor(props) {\n super(props);\n }\n\n render() {... | javascript | edit | 0 | 3 | mit | fc8f79efc839261f9b07524726b6b94477649337 | apiaryio/attributes-kit,apiaryio/attributes-kit,apiaryio/attributes-kit | src/Attribute/Attribute.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Copyright (c) 2014-present, Facebook, Inc. All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of... | javascript | edit | 0 | 1 | mit | 7eef6ab65f0fe7a3d480faa90592a5b98b425666 | mindhivenz/packages,mindhivenz/packages | packages/styles/src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*global $:true, casper:true, document:true */\n'use strict';\n\ncasper.test.comment('Face Value - Fonts')\n\ncasper.start('http://localhost:3001/', function () {\n casper.test.info('Testing for Bitter fonts')\n})\n\ncasper.waitForReso... | javascript | edit | 0 | 1 | mit | 4c5cc03050ed85dff89bbc98a25ad79ff6850908 | tofumatt/face-value,tofumatt/face-value,tofumatt/face-value,tofumatt/face-value,tofumatt/face-value,tofumatt/face-value | test/front-end/test.fonts.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Organizational classes\ndefine(function() {\n return function(id, name) {\n this.id = id;\n this.name = ko.observable(name);\n }\n});\n\n```\n\nApply this change: Fix an insidious dependency bug"
},
{
"rol... | javascript | edit | 0 | 1 | mit | a02e901833c1147029120105ede3834317d66478 | gaoce/TimeVis,gaoce/TimeVis,gaoce/TimeVis | timevis/static/js/Channel.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component, PropTypes } from 'react';\nimport styles from '../chat.scss';\nimport Message from './message/Message';\n\nexport default class ChatArea extends Component {\n render() {\n const { messages, ...rest } = thi... | javascript | edit | 0 | 2 | mit | 0ede605d1e39e25be7c70bb186c283244a785b3a | zalmoxisus/react-chat | src/components/ChatArea.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst docHelper = {\n checkDocDetails: (req) => {\n const document = req.body;\n if (!(document.title && document.content && document.access)) {\n return false;\n }\n return true;\n },\n queryBuilder: (reqQuery) => {... | javascript | edit | 0 | 7 | mit | 3b18435d311fcf22a3833f716375fe1b9b7d88f4 | andela-oolutola/document-management-system-api | controllers/helpers/docHelper.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\nlet fetch = require('node-fetch');\nmodule.exports = function searchDeclaration(link) {\n return fetch(link)\n .then(response => response.text())\n .then(data => JSON.parse(data))\n};\n\n```\n\nApply th... | javascript | edit | 0 | 2 | mit | 8f9f007fcc3fa133e18b715c6c030012910e5a94 | automaidan/judges,automaidan/judges,automaidan/judges,automaidan/judges | scraper/helpers/fetch-json.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar util = require(\"util\"),\n express = require(\"express\"),\n seneca = require(\"seneca\"),\n routes = require(\"./routes\");\n\n\nvar app = express(),\n port = routes.config.port,\n staticFiles = e... | javascript | edit | 0 | 1 | mit | 472f9b86b20ffbf5fe937527fd88095b035749fc | albertosantini/argo,albertosantini/argo | src/server/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst hash = {};\nconst cache = [];\n\nconst add = url => {\n if (!hash[url]) {\n hash[url] = new Image();\n hash[url].src = url;\n\n cache.push(hash[url]);\n }\n return hash[url];\n};\n\nconst get = url =>... | javascript | edit | 0 | 2 | mit | 5c80e8f319999f1c771407036e4f6aa66a315c2f | sambernard/react-preload,sambernard/react-preload | modules/ImageCache.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// ------------------------------------\n// Constants\n// ------------------------------------\nconst MAKE_SCREENSHOT = 'MAKE_SCREENSHOT'\nconst MAKE_SCREENSHOT_RESULT = 'MAKE_SCREENSHOT_RESULT'\n\n// -----------------------------------... | javascript | edit | 0 | 2 | mit | 222fe700c7923df5507cffa3dafc7a4a3b1412cc | salvocanna/shotio,salvocanna/shotio | src/store/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport default function quicksort(list) {\n if (list.length < 2) {\n return list;\n }\n\n const pivot = list[0]; // TODO: random\n const less = list.filter(i => i < pivot);\n const greater = list.filter(i => i > pivot);\n\n ret... | javascript | edit | 0 | 2 | mit | b9a6a3409d7ca37515bada13b55bb3e26642c8ae | skidding/illustrated-algorithms | algorithms/quicksort.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { moduleForComponent, test } from 'ember-qunit';\nimport hbs from 'htmlbars-inline-precompile';\n\nmoduleForComponent('trix-editor', 'Integration | Component | trix editor', {\n integration: true\n});\n\ntest('it renders', funct... | javascript | edit | 0 | 1 | mit | c0363036adbf7310d24eb758f266aaf5fd3a1e52 | lynnetye/ember-trix-editor,lynnetye/ember-trix-editor | tests/integration/components/trix-editor-test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(document).ready(function () {\n let zone;\n let district;\n\n let getZone = $.get('/inputs/geojson/zone', function (data) {\n zone = data;\n });\n\n let getDistrict = $.get('/inputs/geojson/district', function (d... | javascript | edit | 0 | 1 | mit | e3f4faf1580eb6b5709d60839ec9532f7b4f84ef | architecture-building-systems/CityEnergyAnalyst,architecture-building-systems/CityEnergyAnalyst,architecture-building-systems/CityEnergyAnalyst | cea/interfaces/dashboard/plots/static/js/map_layout.js | rejected_duplicate | Near-duplicate of sample 94485 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// import necesary module\nimport express from 'express';\nimport verifyToken from '../middlewares/verifyToken.js';\nimport users from '../controllers/users';\n\nconst router = express.Router();\n\n// API index endpoint\nrouter.get('/',... | javascript | edit | 0 | 1 | mit | 176ee86e8d9a6d400459b4dc9ecdcfcf5513cc70 | amarachukwu-agbo/hello-books,amarachukwu-agbo/hello-books | server/routes/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function (options) {\n options = options || {};\n var unexpected = (options.unexpected || require('unexpected')).clone();\n unexpected.output.preferredWidth = options.preferredWidth || 80;\n if (typeof optio... | javascript | edit | 0 | 2 | mit | ab6c91f7c2d5d6891a4ad7bb711a37988da73329 | unexpectedjs/unexpected-markdown | lib/createExpect.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function (grunt) {\n grunt.loadNpmTasks('grunt-contrib-csslint');\n grunt.loadNpmTasks('grunt-contrib-jshint');\n grunt.loadNpmTasks('grunt-docco');\n\n grunt.initConfig({\n jshint: {\n files: 'js/*.js',\n ... | javascript | edit | 0 | 1 | mit | 883632841c82e674d2fe5debe4d738cf0881f907 | nicolasmccurdy/randomize | Gruntfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function() {\n\n// Determine which window is active.\nwindow.SC_isActive = false;\nvar handleFocusEvent = function(e) {\n window.SC_isActive = true;\n};\nvar handleBlurEvent = function(e) {\n window.SC_isActive = false;\n};\nwind... | javascript | edit | 0 | 11 | bsd-3-clause | 04e6a64a579c16c1aac877061c62f47ce4fd1c9a | scelis/KingdomOfSafari | KingdomOfSafari.safariextension/kol_start.js | rejected_complexity | Cyclomatic complexity too high: 11 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function () {\n \"use strict\";\n\n var configureGrunt = function (grunt) {\n\n var cfg = {\n // JSLint all the things!\n jslint: {\n directives: {\n nomen: true,\n ... | javascript | edit | 0 | 1 | mit | 8ecb8a7d671539419a9a28519aa8b2cb56afdfa6 | AnthonyCorrado/Ghost,liftup/ghost,blankmaker/Ghost,sceltoas/Ghost,alecho/Ghost,dai-shi/Ghost,sergeylukin/Ghost,PeterCxy/Ghost,UnbounDev/Ghost,letsjustfixit/Ghost,rito/Ghost,eduardojmatos/eduardomatos.me,ManRueda/manrueda-blog,influitive/crafters,jamesyothers/Ghost,wangjun/Ghost,lukw00/Ghost,aschmoe/jesse-ghost-app,klin... | Gruntfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\n\nclass FileLoader extends Component {\n render() {\n return (\n <div className='flex justify-center mt4 b'>\n Loading file : {this.props.fileLoadStatus}%\n </div>\n );\... | javascript | edit | 0 | 1 | mit | 35524e9979dbabd957cfbb36485e57b72722c22b | joelgeorgev/file-hash-verifier,joelgeorgev/file-hash-verifier | src/components/file-loader.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar TrieNode = require('../app/trie-node');\n\ndescribe('TrieNode', function() {\n var trienode;\n\n beforeEach(function() {\n trienode = new TrieNode();\n });\n\n it('should be an object', function() {\n expect(trienode).to.b... | javascript | edit | 0 | 1 | mit | a6c7f674543b15eaee197e1d3be1dc38bf426b9d | mgarbacz/nordrassil,mgarbacz/nordrassil | test/trie-node.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nConnector.playerSelector = '#player-controller';\n\nConnector.trackArtSelector = '.imgEl > img';\n\nConnector.artistTrackSelector = '.currentSong';\n\nConnector.isPlaying = () => $('.progressBg').width() > 0;\n\n```\n\n... | javascript | edit | 0 | 1 | mit | 05f3bd066881ee99722be58f2fd24894a8188e07 | galeksandrp/web-scrobbler,david-sabata/web-scrobbler,galeksandrp/web-scrobbler,alexesprit/web-scrobbler,fakelbst/Chrome-Last.fm-Scrobbler,carpet-berlin/web-scrobbler,david-sabata/web-scrobbler,alexesprit/web-scrobbler,inverse/web-scrobbler,fakelbst/Chrome-Last.fm-Scrobbler,inverse/web-scrobbler,carpet-berlin/web-scrobb... | src/connectors/dubtrack.fm.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function() {\n'use strict';\n\nangular\n .module('semantic.ui.elements.button', [])\n\n .directive('smButton', smButton);\n\n function smButton() {\n return {\n restrict:'E',\n replace: true,\n transclude: true,\n ... | javascript | edit | 0 | 3 | mit | 982a2c0891ba6efde5a8c805e3913ed0490ea295 | joseym/Semantic-UI-Angular,giftstarter/Semantic-UI-Angular,mxth/Semantic-UI-Angular,meisterpeeps/Semantic-UI-Angular,Semantic-Org/Semantic-UI-Angular,matheuspoleza/Semantic-UI-Angular,joseym/Semantic-UI-Angular,christiannwamba/Semantic-UI-Angular,marcoT89/Semantic-UI-Angular,giftstarter/Semantic-UI-Angular,codedogfish/... | src/elements/button/button.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* @flow */\nimport React from 'react';\nimport Box from 'grommet/components/Box';\nimport Heading from 'grommet/components/Heading';\nimport { BlockParagraph } from '../BlockParagraph';\nimport Swatch from './swatch';\n\nexport default... | javascript | edit | null | null | apache-2.0 | 82509218cab40c5766cb331a7e9602cab3dfed32 | grommet/grommet-cms-content-blocks,grommet/grommet-cms-content-blocks | src/ContentBlocks/BlockColorSwatch/BlockColorSwatch.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Promise = require('promise');\n\nvar Deferred = function Deferred() {\n\t\"use strict\";\n\n\tif (!(this instanceof Deferred)) { return new Deferred(); }\n\n\tvar self = this;\n\tself.promise = new Promise(function (resolve, reject)... | javascript | edit | 0 | 2 | mit | 8e460da1ec638b07b5f8209f5551ad217fefdbd6 | ljharb/promise-deferred | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function(grunt){\n 'use strict';\n require('load-grunt-tasks')(grunt);\n grunt.loadNpmTasks('grunt-contrib-jshint');\n var jsFiles = ['npactweb/static/js/**/*.js'];\n\n grunt.initConfig({\n jshint: {\n opti... | javascript | edit | 0 | 1 | bsd-3-clause | ac7e05d085fd3b736c8c28cc5bed491ba33c97f6 | NProfileAnalysisComputationalTool/npact,NProfileAnalysisComputationalTool/npact,NProfileAnalysisComputationalTool/npact,victor-lin/npact,NProfileAnalysisComputationalTool/npact,victor-lin/npact,victor-lin/npact,victor-lin/npact,victor-lin/npact,NProfileAnalysisComputationalTool/npact | npactweb/Gruntfile.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 this.treeElement = $('#file-picker-tree');\n \n var courseId = gon.course;\n var that = this;\n $.ajax({\n url: '/course... | javascript | edit | 0 | 2 | mit | 3b89ceb9fd02799e5899f80fe1d4af9ac0ca0793 | Coursemology/coursemology.org,nusedutech/coursemology.org,allenwq/coursemology.org,allenwq/coursemology.org,Coursemology/coursemology.org,allenwq/coursemology.org,Coursemology/coursemology.org,nusedutech/coursemology.org,dariusf/coursemology.org,nnamon/coursemology.org,nusedutech/coursemology.org,Coursemology/coursemol... | app/assets/javascripts/materials_file_picker.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport PropTypes from 'prop-types';\n\nimport optionShape from './optionShape';\n\nexport default PropTypes.arrayOf(\n PropTypes.oneOfType([\n optionShape,\n PropTypes.shape({\n label: PropTypes.node.isRequir... | javascript | edit | 0 | 0 | mit | 90a21094529cb1b1932fe1bff947aebb2fba8705 | jakezatecky/react-dual-listbox,jakezatecky/react-dual-listbox | src/js/shapes/optionsShape.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst Dotenv = require('dotenv-webpack');\nconst WebpackShellPlugin = require('webpack-shell-plugin');\n\nmodule.exports = {\n plugins: [\n new Dotenv(),\n new WebpackShellPlugin({onBuildExit:['./scripts/package.js']})\... | javascript | edit | 0 | 0 | isc | d0d78233b466afa3e6896f849b86a0716fbd932a | oliverswitzer/wwltw-for-pivotal-tracker,oliverswitzer/wwltw-for-pivotal-tracker | webpack.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\ndefine('<%= main_module_name %>',\n [\n // Add your dependencies here\n 'jquery',\n 'jquery-ujs'\n ],\n\n function($){\n\n function initialize(){\n // Add your initialization code here\n }\n\n ... | javascript | edit | 0 | 1 | mit | c2c04648982bc07aa8b48a04bb4018104ea62c47 | half-pipe/half-pipe,half-pipe/half-pipe | lib/generators/half_pipe/templates/app/scripts/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport Tabs from 'react-toolbox/lib/tabs/Tabs'\nimport Tab from 'react-toolbox/lib/tabs/Tab'\nimport ClickPath from './ClickPath'\nimport JSONTree from 'react-json-tree'\n\nclass DetailsTabs extends React.Comp... | javascript | edit | 0 | 3 | mit | 61d69b53c6cef35bbb2fb16705f67961faec572a | gomezhyuuga/stevens-summer,gomezhyuuga/stevens-summer,gomezhyuuga/stevens-summer | src/components/DetailsTabs.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, {Component} from 'react';\nimport $ from 'jquery';\nimport CurrentWeatherCard from './CurrentWeatherCard';\n\nexport default class App extends Component {\n constructor(){\n super()\n this.state = {\n location:... | javascript | edit | 0 | 1 | mit | a921aad3d4f08384670b36bda3b21661df942b24 | thatPamIAm/weathrly,thatPamIAm/weathrly | lib/components/App.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#! /usr/bin/env node\n\"use strict\";\n\nrequire('babel-polyfill');\n\nfunction showHelpAndExit() {\n console.log(\"Usage: extract-messages [-m EXISTING] [-o OUTPUT] ...FILES/DIRECTORIES\");\n console.log(\"Prints a JSON document ... | javascript | edit | 0 | 1 | mit | 9b1ef95887e821da8be2a11e599c804124fd88c7 | drd/jsxlate,stevenp/jsxlate,stevenp/jsxlate,drd/jsxlate | bin/extract-messages.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*jslint browser: true, undef: true *//*global Ext*/\nExt.define('SlateAdmin.store.people.People', {\n extend: 'Ext.data.Store',\n\n model: 'SlateAdmin.model.person.Person',\n proxy: {\n type: 'slaterecords',\n ur... | javascript | edit | 0 | 0 | mit | 1f4feacb0dbc32c1385df3a29cfda5ad1614ebc4 | SlateFoundation/slate,SlateFoundation/slate,SlateFoundation/slate,SlateFoundation/slate-admin,SlateFoundation/slate-admin,SlateFoundation/slate,SlateFoundation/slate,SlateFoundation/slate-admin,SlateFoundation/slate-admin,SlateFoundation/slate-admin | sencha-workspace/SlateAdmin/app/store/people/People.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Botkit = require('botkit');\n\nvar controller = Botkit.slackbot({\n debug: false\n});\n\ncontroller.spawn({\n token: process.env.token || ''\n}).startRTM(function(err) {\n if (err) {\n throw new Error(err);\n }\n}... | javascript | edit | 0 | 2 | mit | 24cd0843fbbec6bb105523afe69ac39b9149844c | solairerove/slackbot-vitalka | app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { LOCATION_CHANGE } from 'react-router-redux';\n\nexport function patchObjectByKey(object, key, patcher) {\n return key in object ? { ...object, [key]: patcher(object[key]) } : object;\n}\n\nexport function setOnLocationChange(t... | javascript | edit | 0 | 3 | mit | 1d3b79e73cf0a3636e22c71ac6f63f27900a070f | davidmz/freefeed-react-client,davidmz/freefeed-react-client,davidmz/freefeed-react-client | src/redux/reducers/helpers.js | rejected_duplicate | Near-duplicate of sample 90185 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport function translate(load) {\n console.log('compiling template:', load.name);\n load.source = 'module.exports = require(\\'handlebars\\').compile(\\'' + load.source\n .replace(/'/g, '\\\\\\'')\n .replace(/[\\f]/g, '\\\\f')\n .... | javascript | edit | 0 | 1 | mit | f86674686862eee96dd1e62ea1135a69d6fe1d93 | davis/plugin-hbs,davis/plugin-hbs | hbs.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { render } from 'react-dom';\nimport { Provider } from 'react-redux';\nimport configureStore from './store/configureStore';\nimport App from './containers/App';\nimport Replacer from './components/Repl... | javascript | edit | 0 | 4 | bsd-3-clause | 093004224edc97bf1a322756bb40597565618ed9 | Mobelux/docdown-editor,Mobelux/docdown-editor | app/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst kspecial = {\n 32 : 'Spacebar',\n 97 : 'Numpad 1',\n 98 : 'Numpad 2',\n 99 : 'Numpad 3',\n 100 : 'Numpad 4',\n 101 : 'Numpad 5',\n 102 : 'Numpad 6',\n 103 : 'Numpad 7',\n 104 : 'Numpad 8',\n 105 : 'Numpad 9'\n}\n\nco... | javascript | edit | 0 | 6 | mit | d487f5c68e0d9c883977d1d8de6ecf487668c1e9 | hmatalonga/kcodejs,hmatalonga/kcodejs | app/scripts/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport * as Builder from 'src/server/modules/build';\nimport * as Queries from 'src/server/modules/queries';\n\nexport const publish = async (req, res, next) => {\n const post = await Queries.post(req.params.id);\n post.lastPublished ... | javascript | edit | 0 | 3 | mit | f199892de932d4f09c2e0721ffa870b195637e92 | tuelsch/bolg,tuelsch/bolg | src/server/api/publish-api.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nchrome.extension.onMessage.addListener(\n function(request, sender, sendResponse) {\n console.log(request);\n console.log(sender);\n getOtherBookmarksChildren(function(other){\n if (other == null) {\n ... | javascript | edit | 0 | 3 | mit | 3be62e32fea11eefc06bd9436d45e94ab19a0e16 | jeffmax/bettermark | eventPage.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport {render} from 'react-dom';\n\nimport { Router, Route, applyRouterMiddleware} from 'react-router';\n\nlet history;\nif(typeof process !== \"undefined\" && process.env.NODE_ENV === \"production\") {\n\th... | javascript | edit | 0 | 0 | mit | 8b740b0926b0e73cb57a10582ad0e73b6efd52cf | Velenir/workers-journey,Velenir/workers-journey | app/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\n'use strict'\n\nvar meow = require('meow')\nvar extend = require('xtend')\nvar degree = require('./')\n\nvar cli = meow({\n help: [\n 'Usage',\n ' degree [entries...]'\n ]\n})\n\nvar entries = cli.input\n... | javascript | edit | 0 | 0 | mit | bd7f2f07f3ad6f53246428ea150354ab41325f7e | bendrucker/degree | bin.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * Logo\n * ====\n *\n * A sample prefab (extended game object class), for displaying the Phaser\n * logo.\n */\n\n\nexport default class BgLayer extends Phaser.TileSprite {\n\n constructor (game, x, y, width, height, key, moveMult... | javascript | edit | 0 | 1 | mit | 35686682dc83ddffc46c1c28e4c1812e38628c47 | aethr/superbite,aethr/superbite | src/objects/BgLayer.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Utilities for interacting with the Router and getting location data\n * @module routeUtils\n */\nimport Rx from 'rxjs';\nimport match from 'react-router/lib/match';\n\n// Create observable from callback-based `match`\nconst matc... | javascript | edit | 0 | 2 | mit | d03e41ac5a36efec5cf37e29cc734147f181703d | meetup/meetup-web-platform | src/util/routeUtils.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar concat = require('concat-stream');\n\nvar spawn = require('child_process').spawn;\n\n\nmodule.exports = function (filename, argv, cb) {\n var app = spawn('node', [filename].concat(argv),\n { stdio:... | javascript | edit | 0 | 2 | mit | fc0d7a0e0dea54c563d2c79ffd70e9f475874539 | eush77/help-version | test/lib/get_output.js | accepted | null | true |
[
{
"role": "user",
"content": "Write javascript code for the following: Add `change prop of piece that is moved` test\n\n* fail this test now."
},
{
"role": "assistant",
"content": "import Board from '../../frontend/src/shogi/board';\nimport Piece from '../../frontend/src/shogi/piece';\nimport si... | javascript | new_file | 0 | 2 | mit | 84c186be115bdfc06a286c70af538a1c44a98e57 | mgi166/usi-front,mgi166/usi-front | test/src/board_test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint-disable react/forbid-prop-types */\n/**\n * mSupply Mobile\n * Sustainable Solutions (NZ) Ltd. 2019\n */\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\n\nimport { Wi... | javascript | edit | 0 | 1 | mit | a16ef242c0999dcadcc071fe525195d909bdcbba | sussol/mobile,sussol/mobile,sussol/mobile,sussol/mobile | src/pages/PrescriptionPage.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nmodule.exports.submitUrl = function (req, res) {\n // since the form should be handled with client-side Javascript,\n // if they POST to this route, we can assume Javascript is off...\n\n if (req.body.url) {\n res.redi... | javascript | edit | 0 | 2 | mit | 294aaa1853105fa54e4e02edb71dc35efb5cb824 | mlms13/cropsicle | app/routes/crop.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* global module */\nmodule.exports = function(grunt) {\n grunt.initConfig({\n jshint: {\n all: ['app.js', 'blanket.js', 'gruntfile.js', 'src/**/*.js'],\n options: {\n bitwise: true,\n ... | javascript | edit | 0 | 1 | bsd-2-clause | b1332a54fe5a51abeb0fbf41d9408e6c8a7c61f8 | jeffcharles/poleland,jeffcharles/poleland,jeffcharles/poleland | gruntfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nfunction buildTopicElement(topic){\n let title = \"<h2>\" + topic.title + \"</h2>\";\n let author = \"<small>\" + topic.author + \"</small>\";\n let body = \"<p>\" + topic.body + \"</p>\";\n\n return { title: titl... | javascript | edit | 0 | 1 | mit | 46cc4b1c05a0b5da1a0e3b7c5eda871680410100 | var-bin/reactjs-training,var-bin/reactjs-training,var-bin/reactjs-training | es2015/build-topic-element.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar ssr = require(\"../../../lib\");\n\nvar render = ssr({\n\tconfig: __dirname + \"/package.json!npm\"\n});\n\nrender(\"/\").then(function(result){\n\tconsole.log(result.html);\n});\n\n```\n\nApply this change: Make the React example p... | javascript | edit | 0 | 1 | mit | b3da510e645f8a99f33a1b039d7f76cdc292e381 | donejs/done-ssr,donejs/done-ssr | test/tests/react/render.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar std = require('std'),\n\tcompiler = require('../../lib/compiler'),\n\ta = require('../astMocks')\n \ntest('compiles something', a.static(1), function(output, assert) {\n\tassert.ok(!!std.strip(output))\n})\n\n/* UTIL */\nvar nameCou... | javascript | edit | 0 | 1 | mit | 22fb9cf88a3e1780310770b30304451707bb7e44 | marcuswestin/fun | test/testCases/compiler.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport const approveStorage = () => {\n return cy.get('#dialog_buttons > input[type=button][data-ok]')\n .click();\n};\n\nexport const visitAndApproveStorage = () => {\n cy.visit('/instrumented/svg-editor-es.html');\n approveStora... | javascript | edit | 0 | 1 | mit | f03cdc98a4d8441b613c41c373e518bc7efe07c0 | SVG-Edit/svgedit,SVG-Edit/svgedit,SVG-Edit/svgedit | cypress/support/ui-test-helper.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar test = require('tape');\nvar BEST = require('../lib/index');\n\ntest('Control Flow', function(t) {\n t.plan(1);\n BEST.deploy('famous-demos:if-repeat', 'body', function(app){\n t.ok(app.DOMNode, 'Root D... | javascript | edit | 0 | 1 | mit | 2e1a6440196148acde185e934d7ae99c96daea36 | SvitlanaShepitsena/framework,ildarsamit/framework,ildarsamit/framework,SvitlanaShepitsena/framework-1,KraigWalker/framework,infamous/framework,tbossert/framework,Famous/framework,SvitlanaShepitsena/remax-banner,colllin/famous-framework,SvitlanaShepitsena/shakou,infamous/framework,colllin/famous-framework,tbossert/frame... | tests/control-flow.spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// 在 Cloud code 里初始化 Express 框架\nvar express = require('express');\nvar app = express();\n\n// App 全局配置\napp.set('views','cloud/views'); // 设置模板目录\napp.set('view engine', 'ejs'); // 设置 template 引擎\napp.use(express.bodyParser()); ... | javascript | edit | 0 | 1 | mit | 72c3a84615cfa8abe57a3074df95d41b45ec9b9a | hjiang/issue_stats,hjiang/issue_stats | cloud/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function (grunt) {\n grunt.initConfig({\n pkgFile: 'package.json',\n simplemocha: {\n options: {\n ui: 'bdd',\n reporter: 'dot'\n },\n unit: {\n src: [\n 'test/mocha-g... | javascript | edit | 0 | 2 | mit | a43812256ecb3cb7ec3883f3a0e8c34b6bba16d8 | tswaters/karma-coverage,whitneyit/karma-coverage,karma-runner/karma-coverage,nmalaguti/karma-coverage,yourowndisaster09/karma-coverage,jamestalmage/karma-coverage,Dignifiedquire/karma-coverage | gruntfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = function(grunt) {\n\n\tvar config = {\n\n\t\tjscs: {\n\t\t\tsrc: [\n\t\t\t\t'lib/*.js',\n\t\t\t\t'test/**/*.js',\n\t\t\t\t'gruntFile.js',\n\t\t\t\t'index.js'\n\t\t\t],\n\t\t\toptions: {\n\t\t\t\tconfig:... | javascript | edit | 0 | 1 | mit | c099c00eb273a5686d19a088f4f26d0747d85211 | chill117/mysql-connection-manager | gruntFile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nangular.module('jslab', [\n 'jslab.router',\n 'jslab.templates',\n 'jslab.components',\n 'jslab.home',\n 'jslab.objects',\n 'jslab.functions',\n 'jslab.angular'\n]);\n\n```\n\nApply this change: Include the gotch... | javascript | edit | 0 | 0 | mit | 20a16e24caeef7dd18cfe84bfb9084a5c518a17d | bti360/jslab,bti360/jslab | app/_app-module.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport { Button, Col, Container, Row } from 'reactstrap';\nimport { connect } from 'react-redux';\nimport L from 'utils/Labels'\nimport RouterUtils from 'utils/RouterUtils'\n\nimport SurveyImpo... | javascript | edit | 0 | 2 | mit | 14321ef4c142726432a48e392e6f43748fe3a67b | openforis/collect,openforis/collect,openforis/collect,openforis/collect | collect-web/collect-webapp/frontend/src/containers/surveydesigner/SurveyImportPage.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar express = require('express');\n\nvar app = module.exports = express.createServer(function(req, res) {\n res.send({ip: req.header('x-forwarded-for') || req.connection.remoteAddress});\n});\n\napp.enable('jsonp callback');\n\nif (!mo... | javascript | edit | 0 | 2 | mit | 47a6a3642acf0dbd15b542d27293ad9d370d048b | chrismytton/ipserver,chrismytton/ipserver | app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nangular.module('arethusa.core').directive('arethusaNavbar', function(configurator) {\n return {\n restrict: 'AE',\n scope: true,\n link: function(scope, element, attrs) {\n var conf = configurator.confi... | javascript | edit | 0 | 1 | mit | 37907cc70f02e68a49c26cc8a69e7fc305138ebd | PonteIneptique/arethusa,Masoumeh/arethusa,fbaumgardt/arethusa,fbaumgardt/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa,Masoumeh/arethusa,latin-language-toolkit/arethusa,PonteIneptique/arethusa,alpheios-project/arethusa,alpheios-project/arethusa,latin-language-toolkit/arethusa | app/js/arethusa.core/directives/arethusa_navbar.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n//var http = require('http');\nvar express = require('express');\n\nvar app = module.exports = express.createServer();\n\n/*http.createServer(function (req, res) {\n res.writeHead(200, {'Content-Type': 'text/plain; charset=utf-8'});\... | javascript | edit | 0 | 1 | mit | 8f478346715f83dc83013cb78c851ff62d947ef5 | pieszynski/test | app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(document).ready(function(){\n var $ribbon = $('.ribbon');\n if ($ribbon) {\n var faded = sessionStorage.getItem('fade-test-banner', true);\n if (! faded) {\n $('.ribbon-box').removeClass('fade');\n ... | javascript | edit | 0 | 3 | apache-2.0 | 14f0aca71c19c4448df76b6daf76853d31a4945c | Princeton-CDH/derrida-django,Princeton-CDH/derrida-django,Princeton-CDH/derrida-django,Princeton-CDH/derrida-django | sitemedia/js/local.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint-disable consistent-return */\n/* eslint-disable no-console */\n/* eslint-disable import/no-extraneous-dependencies */\nconst compression = require('compression');\nconst express = require('express');\n\nconst port = process.en... | javascript | edit | 0 | 1 | bsd-3-clause | e91687599c87989a0293f3cc337b1c087bd9f21b | salesforce/design-system-react,salesforce/design-system-react,salesforce/design-system-react | app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar pg = require('pg');\n\nvar dbuser = \"nodeapp\";\nvar dbpass = \"password\";\nvar dbhost = \"localhost\";\nvar dbport = \"5432\";\nvar dbname = \"nodeapp\";\nvar conString = \"postgres://\" + dbuse... | javascript | edit | 0 | 2 | mit | 218ae8280148596753c7774db1a57b11f7b658ed | halvards/node-docker-example,halvards/node-docker-example,halvards/node-docker-example | app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar http = require(\"http\");\nvar url = require(\"url\");\nvar MongoClient = require(\"mongodb\").MongoClient;\nvar url = \"mongodb://admin:<EMAIL>:45355/gcmt_dev\";\n\nMongoClient.connect(url, function(err, db) {\n\tif (err) throw err... | javascript | edit | 0 | 2 | cc0-1.0 | 6407d1588a71ed896a9f11fe49f7d1ac07f8780c | cossatot/gcmt_viewer,Seg-Faults/gcmt_viewer,cossatot/gcmt_viewer,Seg-Faults/gcmt_viewer,Seg-Faults/gcmt_viewer,cossatot/gcmt_viewer | app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar nouns = [\n 'cat',\n 'dog',\n 'mouse',\n 'house'\n];\nvar firstNoun = '';\nvar secondNoun = '';\nvar metaphor = '';\n\nvar numberOfNouns = nouns.length;\nvar nounIndex1 = 0;\nvar nounIndex2 = 0;\n\n// Returns a ... | javascript | edit | 0 | 1 | mit | ab35a27698dcd47524ba84497fba066ad6483703 | epan/thisisathat | app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\n\nconst config = require.resolve('react-component-template/package-scripts');\nconst ps = require.resolve('p-s/dist/bin/p-s');\n\n\nrequire('child_process')\n .spawn('node', [ps, '--config', config].concat(proces... | javascript | edit | 0 | 0 | mit | 53e54695e303a9a79109d8231cde20a1831d0860 | nkbt/react-component-template | cli.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n'use strict';\nvar meow = require('meow');\nvar ghGistOwner = require('./');\n\nvar cli = meow({\n\thelp: [\n\t\t'Usage',\n\t\t' $ gh-gist-owner [input]',\n\t\t'',\n\t\t'Examples',\n\t\t' $ gh-gist-owner',\n\t\t' ... | javascript | edit | 0 | 0 | mit | 8859a1b3ca47b55b95f117533c946c3d5636ad43 | icyflame/gh-gist-owner | cli.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar sessionStart = new Date().getTime();\n\nfunction zeroPad(num, places) {\n places = places || 2;\n var str = num+'';\n while (str.length < 2) {\n str = '0'+str;\n }\n return str;\n}\n\nfunction log(str) {\n var milliseconds ... | javascript | edit | 0 | 3 | bsd-2-clause | d39a1cb3634e56e0aea9672f58ef0d1ca8ebcf51 | lazd/dilBot-rc | server/logger.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport {\n REQUEST_TO_PUBLISH_LIVE,\n READY_FOR_COPYEDITING,\n COURSE_INFORMATION_SYNCED\n} from '@cardstack/workflow/services/cardstack-workflow';\n\nexport default Ember.Route.extend({\n model() {\n ... | javascript | edit | 0 | 0 | mit | b97ae91ec5c92eec7d16dc2dbeb7138acf8ad14c | cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack | packages/workflow/tests/dummy/app/routes/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function() {\n const events = new Map();\n const stopped = new WeakMap();\n\n function before(subject, verb, fn) {\n const source = subject[verb];\n subject[verb] = function() {\n fn.apply(subject, arguments);\n retu... | javascript | edit | 0 | 3 | mit | 67643c6139cfc50da8c0cee60460320f55c22f91 | dgraham/delegated-events,dgraham/delegated-events,dgraham/delegated-events | delegated.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// This test assumes there's a default profile\ndescribe('AWS SDK', function() {\n beforeEach(function() {\n QT.stubConfig('quadro.aws.region', 'us-west-2')\n })\n\n async function getStacks(aws) {\n let cfn = new aws.CloudForm... | javascript | edit | 0 | 2 | mit | 00919cc0b99b4f2bdfc5a2d297af9edb060abd3d | WisePricer/quadro,WisePricer/quadro | examples/app/test/aws_test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar webpack = require('webpack');\nvar webpackConfig = require('./webpack').options;\n\n\nwebpackConfig.plugins.push(new webpack.DefinePlugin({\n 'process.env': {\n 'NODE_ENV': '\"development\"'\n }\n}));\n\nmodule.exports ... | javascript | edit | 0 | 0 | mit | 7044741ecdd35214b39b2db1f2de48920336ec03 | EnzoMartin/Minesweeper-React,EnzoMartin/Minesweeper-React | tasks/options/webpack-dev-server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ncryptotracky.run(function ($transitions, cognitoService, $rootScope) {\n var vipRestriction = true;\n $rootScope.vip = false;\n var restrictedStates = [\"overview-long-binance\", \"realtime-multi\"];\n if (vipRestriction) {\n res... | javascript | edit | 0 | 2 | mit | 782d6a45fac3470dae8b04e6626269aed6c18a5d | Speedy765/crypto-helper-tools,Speedy765/crypto-helper-tools | app/security/security-service.js | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.