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\nimport { Application } from \"@hotwired/stimulus\"\n\n// Stimulus controllers. This should ultimately be moved to koi/admin.js\nimport \"@hotwired/turbo-rails\"\nimport \"trix\";\nimport \"@rails/actiontext\";\n\nconst application = App... | javascript | edit | 0 | 0 | mit | 9fc6057d0c29a21ea40284a13ad4af79251cde10 | katalyst/koi,katalyst/koi,katalyst/koi | app/assets/javascripts/koi/controllers/application.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(document).ready(function () {\n attachResizeVideo();\n switchAd();\n});\n\nfunction attachResizeVideo() {\n\n $(window).resize(function () {\n resizeVideo();\n });\n\n resizeVideo();\n}\n\nfunction resizeVideo() ... | javascript | edit | 0 | 2 | unlicense | ca78cd4901e2322a5f63fcd4c0f555b5c553dde9 | LiteracyFanatic/TruckAdvertisements,LiteracyFanatic/TruckAdvertisements | assets/js/functions.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nangular.module('myApp.operation', ['ngRoute'])\n\n.config(['$routeProvider', function($routeProvider) {\n $routeProvider.when('/operation', {\n templateUrl: 'operation/operation.html',\n controller: 'OperationCon... | javascript | edit | 0 | 1 | mit | 9b53d4814b4170dd3e502e459e2a145ff3eec779 | AitorRodriguez990/angular-testing-examples,AitorRodriguez990/angular-testing-examples | app/operation/operation.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport hbs from 'htmlbars-inline-precompile';\nimport { moduleForComponent, test } from 'ember-qunit';\n\nmoduleForComponent('my-component', {\n integration: true\n});\n\ntest('precompile enabled flags', function(assert) {\n this.rend... | javascript | edit | 0 | 1 | mit | 10d041569a0b19dee2024001f7aae310ddd89dca | minichate/ember-cli-conditional-compile,minichate/ember-cli-conditional-compile | tests/unit/components/compiler-test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar Settings = require('./settings.js');\nvar ChromeStorage = require('./chrome-storage.js');\n\nfunction Request() {};\n\nRequest._send = function _send(options, accessToken) {\n var xhr = new XMLHttpRequest();\n\n x... | javascript | edit | 0 | 3 | mit | e45662e92bee7e48ef2df981d0b6322f7522b463 | tegon/traktflix,MrMamen/traktflix,MrMamen/traktflix,tegon/traktflix | app/scripts/src/request.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n \"env\": {\n \"browser\": true,\n \"node\": true\n },\n\n \"globals\": {\n \"app\": true,\n \"angular\": true,\n \"_\": true\n },\n\n \"extends\": \"eslint:recommend... | javascript | edit | 0 | 0 | mit | e5773320c3bd1b47c00388f9fda6d3ece8f0fb1c | FreaKzero/gzdoom-launcher,FreaKzero/gzdoom-launcher | .eslintrc.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst package = require('./package.json')\n\nmodule.exports = {\n parser: 'babel-eslint',\n env: {\n browser: true,\n commonjs: true,\n es6: true,\n jest: true,\n node: true\n },\n extends: [\n 'eslint:recommended'... | javascript | edit | 0 | 0 | mit | 3febb3230f340f61103a3a93b8ca0623b57613d9 | keik/gh,keik/gh,keik/gh | .eslintrc.js | accepted | null | 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 | 7551cdf761228536485caaa838b106092050d300 | 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\nvar LogStream = require('./LogStream');\nvar lodash = require('lodash');\n\n/**\n * The LogFactory constructor.\n * @constructor\n */\nvar LogFactory = function () {\n\tvar self = this;\n\tself._streams = {};\n\tself._filters = [];\n};\... | javascript | edit | 0 | 1 | mit | a588182dfe07bee8c74ccf9c3ae9e3e6e572652a | ericrini/node-streamlogger | lib/logFactory.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n// socket.io-client requires the window object, and navigator.userAgent to be present.\n\nvar window = {},\n navigator = {userAgent: 'tvos'};\n\nvar io = require('socket.io-client');\n\n/*\n import * as router from 'lib/... | javascript | edit | 0 | 4 | mit | 508f54ba5774bc2a3a6597cb709fa67ad0632a8b | hypery2k/tvml-kit-livereload | lib/livereload.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Brunch automatically concatenates all files in your\n// watched paths. Those paths can be configured at\n// config.paths.watched in \"brunch-config.js\".\n//\n// However, those files will only be executed if\n// explicitly imported. ... | javascript | edit | 0 | 0 | apache-2.0 | f5bc7da306376fb34171ad2eb9f2869dbf68a35f | alfert/baumeister,alfert/baumeister,alfert/baumeister | apps/baumeister_web/web/static/js/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar localforage = require('localforage');\n\nvar $body = $('body');\n['theme', 'mode'].forEach(function (property) {\n localforage.getItem(property, function (value) {\n if (!value) {\n value = 'default';\n ... | javascript | edit | 0 | 6 | mit | 39d265f663f47793ad4ac91216b848ec4da9a73a | zhouyichen/nusmods,Yunheng/nusmods,nusmodifications/nusmods,nusmodifications/nusmods,nathanajah/nusmods,chunqi/nusmods,chunqi/nusmods,chunqi/nusmods,nathanajah/nusmods,mauris/nusmods,chunqi/nusmods,nathanajah/nusmods,nathanajah/nusmods,nusmodifications/nusmods,zhouyichen/nusmods,Yunheng/nusmods,Yunheng/nusmods,nusmodif... | app/scripts/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport RaisedButton from 'material-ui/RaisedButton';\nimport ContentSave from 'material-ui/svg-icons/content/save';\n\nconst SaveButton = () => <RaisedButton\n type=\"submit\"\n label=\"Save\"\n icon... | javascript | edit | 0 | 2 | mit | 1dd9f0bc886a501ce015dfcf3bcbc947566641b4 | marmelab/admin-on-rest,matteolc/admin-on-rest,matteolc/admin-on-rest,marmelab/admin-on-rest | src/mui/button/SaveButton.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint-env node */\n\nconst path = require('path');\n\nmodule.exports = {\n description: 'Initialize files needed for typescript compilation',\n\n files() {\n return [\n path.join(this.path, 'files', 'tsconfig.json'),\n ... | javascript | edit | 0 | 3 | mit | 22ab2c05c83dc0855a878a34e45b08ebfe3c9f77 | emberwatch/ember-cli-typescript,emberwatch/ember-cli-typescript,emberwatch/ember-cli-typescript,emberwatch/ember-cli-typescript | blueprints/ember-cli-typescript/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Step 5\n * Where you write the generator specific files (routes, controllers, etc)\n */\n\nconst SOURCE_CONFIG = name => `${name}Config.js`;\n\nconst DESTINATION_CONFIG = `config/log.js`;\n\nexport default function () {\n let l... | javascript | edit | 0 | 1 | mit | 907620ba91313e95cabcc7104b0d52225cb77e28 | ghaiklor/generator-sails-rest-api,konstantinzolotarev/generator-trails,italoag/generator-sails-rest-api,jaumard/generator-trails,ghaiklor/generator-sails-rest-api,tnunes/generator-trails,italoag/generator-sails-rest-api | src/logger/steps/writing.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar data = '';\nprocess.stdin.on('data', function(chunk) { data += chunk; });\nprocess.stdin.on('end', function() {\n var regExp = /[0-9]+([.][0-9]+)?%/g;\n var match;\n do {\n match = regExp.exec(data);\n if (match) {\n v... | javascript | edit | 0 | 5 | apache-2.0 | 1c8c0e06f8b6f89c1a06958a58f5b5e55be63b2b | foam-framework/foam2,jacksonic/vjlofvhjfgm,jacksonic/vjlofvhjfgm,TanayParikh/foam2,foam-framework/foam2,TanayParikh/foam2,jacksonic/vjlofvhjfgm,foam-framework/foam2,foam-framework/foam2,foam-framework/foam2,TanayParikh/foam2,TanayParikh/foam2 | checkCoverage.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction NavController($scope, Auth) {\n $scope.signedIn = Auth.isAuthenticated;\n $scope.logout = Auth.logout;\n\n Auth.currentUser().then(function (user) {\n $scope.user = user;\n });\n\n $scope.$on('devise:new-registration', ... | javascript | edit | 0 | 1 | mit | 41c4683e6b4c967aaeaa6a676dd252b6182dea52 | davdkm/whats-good,davdkm/whats-good,davdkm/whats-good | app/assets/javascripts/controllers/NavController.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst config = require(\"config\");\nlet basePath;\nif (config.basePath) {\n if (typeof config.basePath === \"string\") {\n basePath = {\n test: config.basePath\n };\n }\n basePath = config.basePath;\n}\nconfig.assetPrefix... | javascript | edit | 0 | 0 | mit | 7691964f1a2afd88154514548145d760778b71c4 | traveloka/soya-next | packages/soya-next/config/default.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * @flow\n */\n\nimport type {RawStats, Module} from '../types/Stats';\n\nimport type {Child} from './getEntryHeirarchy';\n\nimport getModulesByChunk from './getModulesByChunk';\n\nexport default function getChunkModules(\n stats: ... | javascript | edit | null | null | apache-2.0 | cc9217416427e9418c698ae61ff5366f148babc7 | pinterest/bonsai,pinterest/bonsai,pinterest/bonsai | src/stats/getChunkModules.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar test = require('tape');\nvar tm = require('../lib/tm');\nvar style = require('../lib/style');\nvar source = require('../lib/source');\nvar mockOauth = require('../lib/mapbox-mock')(require('express')());\nvar tmppath = tm.join(requi... | javascript | edit | 0 | 1 | bsd-3-clause | f283ed1c9df5b8daee0fe32d9670d23100733d33 | wakermahmud/mapbox-studio,tizzybec/mapbox-studio,wakermahmud/mapbox-studio,tizzybec/mapbox-studio,adozenlines/mapbox-studio,mapbox/mapbox-studio-classic,wakermahmud/mapbox-studio,crowdcover/mapbox-studio,danieljoppi/mapbox-studio,Zhao-Qi/mapbox-studio-classic,AbelSu131/mapbox-studio,Zhao-Qi/mapbox-studio-classic,ali/ma... | test/style-examples.test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport {Route, RouteHandler, Link, Button} from 'react-router'\n\nclass Profile extends React.Component {\n constructor(props){\n super(props);\n this.state = {\n teacherData: {\n name: 'Tea... | javascript | edit | 0 | 1 | mit | 68b3c1b5a93b20ffcbeffb051b3c4fdf6c1eab23 | absurdSquid/thumbroll,Jakeyrob/thumbroll,Jakeyrob/thumbroll,shanemcgraw/thumbroll,Jakeyrob/thumbroll,shanemcgraw/thumbroll,shanemcgraw/thumbroll,absurdSquid/thumbroll | client/desktop/app/components/Profile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport { Card } from 'native-base';\n\nimport CardImageHeader from '../../common/card-image-header/cardImageHeader';\nimport SimpleCardBody from '../../common/simple-card-body/simpleCardBody';\... | javascript | edit | 0 | 1 | mit | 2ddea6322f9f3a1522899c19903e49476346bac9 | justarrived/p2p-client,justarrived/p2p-client,justarrived/p2p-client,justarrived/p2p-client | js/components/developer/job-preview-screen/jobTypeCardPreview.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar assert = require(\"assert\");\nvar Q = require(\"q\");\n\nvar api = require(\"../../lib/dummy/api\");\nvar DummyApi = api.DummyApi;\n\nvar resources = require(\"../../lib/dummy/resources\");\nvar DummyResource = resources.DummyResou... | javascript | edit | 0 | 1 | bsd-3-clause | 459775e9dd3d8b0c0119315615d6a4583de43503 | GeekFreaker/vumi-jssandbox-toolkit,GeekFreaker/vumi-jssandbox-toolkit | test/test_dummy/test_api.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\ndescribe('lang-specific directive', function() {\n var element;\n var documentStore;\n function createDocumentStore() {\n return {\n store: {\n treebank: {\n json: {\n treebank: {... | javascript | edit | 0 | 1 | mit | ed29712fac2ec580c3e0030f96a5c77bf1e1ece2 | alpheios-project/arethusa,PonteIneptique/arethusa,latin-language-toolkit/arethusa,Masoumeh/arethusa,fbaumgardt/arethusa,latin-language-toolkit/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa,fbaumgardt/arethusa,alpheios-project/arethusa,Masoumeh/arethusa,PonteIneptique/arethusa | spec/arethusa.core/directives/lang_specific_spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst path = require('path');\n\nconst webpackConfig = {\n entry: path.join(__dirname, 'index.js'),\n output: {\n path: path.join(__dirname, '../server/static'),\n filename: 'bundle.js'\n },\n devtool: 'source-map',\n module:... | javascript | edit | 0 | 0 | mit | d095feef61adc341ec526414997031849517928e | hkal/timeworthy,hkal/timeworthy | src/client/webpack.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\n\nexport default class SearchBar extends Component {\n render() {\n return (\n <form className='input-group'>\n <input />\n <span className='input-group-btn'>\n ... | javascript | edit | 0 | 1 | mit | 53ad668e0393db9f9aff42c86756a4dc8c5d21f4 | StephanYu/modern_redux_weather_forecast,StephanYu/modern_redux_weather_forecast | src/containers/search_bar.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar sepItems = require('es5-ext/array/#/sep-items')\n , d = require('d/d')\n , DOMInput = require('./_observable')\n , resolveTriggers = require('dbjs/_setup/utils/resolve-static-triggers'... | javascript | edit | 0 | 3 | mit | 44f0851bc77e3469da2bd00dbe8fcd5ac2341691 | medikoo/dbjs-dom | input/composites/line.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar scroll_lock = false;\nvar last_page = false;\nvar current_page = 1;\n\nfunction checkScroll()\n{\n if(!last_page && !scroll_lock && nearBottomOfPage())\n {\n scroll_lock = true;\n\n current_page++;\n\n var qs = $H(locatio... | javascript | edit | 0 | 4 | mit | 650881eeb7df87e5405fc964c17eea59f0d052af | bloopletech/mangar,bloopletech/pictures,bloopletech/mangar,bloopletech/pictures,bloopletech/mangar,bloopletech/mangar | public/javascripts/endless_scroll.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * In development we assume that the code generated is going to be consumed by\n * webpack dev server and we are bundling into a single js file.\n */\n\nimport webpack from 'webpack';\nimport webpackConfigBase from './webpack.base.... | javascript | edit | 0 | 0 | mit | 71b03e948d5b28dd6f3b6fe5704682087e43d843 | adamweeks/react-ciscospark-1,bzang/react-ciscospark,bzang/react-ciscospark,ciscospark/react-ciscospark,adamweeks/react-ciscospark-1,Altocloud/alto-react-ciscospark,ciscospark/react-ciscospark,ciscospark/react-ciscospark,bzang/react-ciscospark,adamweeks/react-ciscospark-1,Altocloud/alto-react-ciscospark,Altocloud/alto-r... | scripts/webpack/webpack.dev.babel.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Widgets layout constants.\n *\n * Site Kit by Google, Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * Y... | javascript | edit | 0 | 0 | apache-2.0 | 0739d7571aa85c9173486a4746579b660565c17e | google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp | assets/js/googlesitekit/widgets/util/constants.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar ChartsController = function($scope, $rootScope) {\n $scope.drawChart = function() {\n if ($scope.geoAggData && $scope.geoAggData.length > 0) {\n console.log('$scope.geoAggData', $scope.geoAggData, 'length',... | javascript | edit | 0 | 5 | apache-2.0 | bee8d8033cd299ab8dea04168739bc09ee1bc17e | gogeolbs/police-uk,gogeolbs/police-uk | assets/javascript/controllers/chartsController.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = isAngularProject => ({\n test: /\\.tsx?$/,\n exclude: /(node_modules)/,\n loaders: [...isAngularProject ? ['ng-annotate'] : [], 'ts'],\n query: {\n logInfoToStdOut: true\n }\n});\n\n```\n\nApply... | javascript | edit | 0 | 2 | mit | 302e046fc864e88380efb390521bc1ed0dbe98d7 | kupriyanenko/wix-node-build,kupriyanenko/wix-node-build | lib/loaders/typescript.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nchorus.views.Sidebar = chorus.views.Base.extend({\n constructorName: \"SidebarView\",\n preRender:function () {\n this._super(\"preRender\", arguments);\n\n // We don't want to deal with having multiple declarations ... | javascript | edit | 0 | 2 | apache-2.0 | 7438f9092bff0b6098a27c67f8af33dee8e61d30 | hewtest/chorus,hewtest/chorus,prakash-alpine/chorus,atul-alpine/chorus,jamesblunt/chorus,prakash-alpine/chorus,jamesblunt/chorus,atul-alpine/chorus,mpushpav/chorus,jamesblunt/chorus,atul-alpine/chorus,atul-alpine/chorus,mpushpav/chorus,atul-alpine/chorus,jamesblunt/chorus,mpushpav/chorus,hewtest/chorus,mpushpav/chorus,... | public/js/views/sidebar_view.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use babel'\n\nexport default {\n eslintrc: {\n config: {\n description: '.eslint',\n icons: [ 'ESLint' ],\n title: 'ESLint',\n },\n match: [ '.eslint' ],\n },\n git: {\n config: {\n description: '.git... | javascript | edit | 0 | 0 | mit | 6810534719c1d413d132c1bef1ec90d94db9f48e | wyze/atom-flexicons | lib/config/type/starts.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* @flow */\n\nimport React, {Component} from 'react'\nimport {connect} from 'react-redux'\nimport HiddenString from '../../../util/hidden-string'\nimport {sawPaperKey} from '../../../actions/signup'\n\nimport Render from './index.rende... | javascript | edit | 0 | 1 | bsd-3-clause | bb75be39c8b74229f40d39c9a3c3ddf27dadc34e | keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client | shared/login/signup/success/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component, PropTypes } from 'react';\n\nexport default class BoardgameListItem extends Component {\n static propTypes = {\n name: PropTypes.string.isRequired,\n year: PropTypes.string\n }\n\n render() {\n con... | javascript | edit | 0 | 2 | mit | 393c8b0632b71ed8f034f2f5bbc3e2d424eaf0e7 | fuczak/pipsy | src/components/BoardgameListItem/BoardgameListItem.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar mysql = require('mysql');\n\nvar app = express();\napp.use(express.static('public'));\n\nvar connection = mysql.createConnection({\n host : process.env.MYSQL_HOST,\n user : process.env.MY... | javascript | edit | null | null | mit | 359b2349389e48bac826c37594ef13ae9eba0c64 | ProjectMOA/noTeRayesCo,ProjectMOA/noTeRayesCo | app.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nbasePath = '../';\n\nfiles = [\n JASMINE,\n JASMINE_ADAPTER,\n 'app/js/jquery-1.9.1.min.js',\n 'app/js/bootstrap.js',\n 'app/lib/angular/angular.js',\n 'app/lib/angular/angular-*.js',\n 'test/lib/angular/angular-mocks.js',\n 'ap... | javascript | edit | 0 | 0 | apache-2.0 | 670b7abfd5edeea6359f4ff3f66adc0b91648e06 | MBoustani/climate,kwhitehall/climate,apache/climate,lewismc/climate,pwcberry/climate,agoodm/climate,riverma/climate,huikyole/climate,MBoustani/climate,jarifibrahim/climate,huikyole/climate,jarifibrahim/climate,pwcberry/climate,kwhitehall/climate,apache/climate,kwhitehall/climate,riverma/climate,pwcberry/climate,agoodm/... | rcmet/src/main/ui/config/karma.conf.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Command from './Command'\n\nclass EditInlineNodeCommand extends Command {\n constructor(...args) {\n super(...args)\n if (!this.config.nodeType) {\n throw new Error('Every AnnotationCommand must have a nodeType')\n ... | javascript | edit | 0 | 3 | mit | 8d0020a666b26cbc577a19d82d3ae16153602f6f | michael/substance-1,substance/substance,michael/substance-1,substance/substance | ui/EditInlineNodeCommand.js | rejected_duplicate | Near-duplicate of sample 81934 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport debug from 'debug';\n\nconst log = debug('app:enhance');\n\n// ServiceWorker is a progressive technology. Ignore unsupported browsers\nif ('serviceWorker' in navigator) {\n navigator.serviceWorker.getRegistrations().then((regist... | javascript | edit | 0 | 3 | mit | 27054c88376e37c69ef385346705f409adb5346b | rossta/rossta.github.com,rossta/rossta.github.com,rossta/rossta.github.com | source/assets/javascripts/enhance.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst fs = require('fs');\nconst path = require('path');\nconst filePath = path.join(__dirname, '../dist/devpanel.tmpl.html');\nconst distPath = path.join(__dirname, '../dist/devpanel.html');\nconst startRemoteDev = require('remotedev-s... | javascript | edit | 0 | 6 | mit | 4194e00f48567d7f4928e6d645ed2382791fad73 | jhen0409/remotedev-extension,jhen0409/remotedev-extension | bin/extension.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Created by Omnius on 6/15/16.\n */\n'use strict';\n\nconst Boom = require('boom');\n\nexports.register = (server, options, next) => {\n\n server.auth.strategy('hawk-login-auth-strategy', 'hawk', {\n getCredentialsFunc:... | javascript | edit | 0 | 3 | mit | 91ece4ef4118eb2dc9dee0986bc046b73b86636e | identityclash/hapi-login-test,identityclash/hapi-login-test | server/auth/hawk/hawkAuth.js | rejected_duplicate | Near-duplicate of sample 96298 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar path = require('path'),\n assert = require('yeoman-generator').assert,\n helpers = require('yeoman-generator').test,\n os = require('os');\n\ndescribe('sails-rest-api:app', function () {\n before(function (done) {\n ... | javascript | edit | 0 | 1 | mit | 6db20c4e950083fc9a91027f5d01e87b86d0a607 | ghaiklor/generator-sails-rest-api,italoag/generator-sails-rest-api,eithewliter5518/generator-sails-rest-api,mhipo1364/generator-sails-rest-api,jaumard/generator-trails,italoag/generator-sails-rest-api,synergycns/generator-sails-rest-api,ghaiklor/generator-sails-rest-api,konstantinzolotarev/generator-trails,tnunes/gener... | test/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst crypto = require('crypto')\nconst fs = require('fs')\nconst path = require('path')\n\nconst CONFIG = require('../config')\nconst FINGERPRINT_PATH = path.join(CONFIG.repositoryRootPath, 'node_modules', '.dependencies-fingerprint')\... | javascript | edit | 0 | 3 | mit | 80bb4337e39162c72ad6bbd00493d24dc9381588 | liuderchi/atom,me-benni/atom,sotayamashita/atom,stinsonga/atom,liuderchi/atom,stinsonga/atom,bsmr-x-script/atom,t9md/atom,andrewleverette/atom,atom/atom,bsmr-x-script/atom,Mokolea/atom,brettle/atom,brettle/atom,Mokolea/atom,bsmr-x-script/atom,decaffeinate-examples/atom,PKRoma/atom,AdrianVovk/substance-ide,xream/atom,ke... | script/lib/dependencies-fingerprint.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar isArray = require('./');\nvar test = require('tape');\n\ntest('is array', function(t){\n t.ok(isArray([]));\n t.notOk(isArray({}));\n t.notOk(isArray(null));\n t.notOk(isArray(false));\n t.notOk(isArray(\"\"));\n\n var obj = {... | javascript | edit | null | null | mit | 6fe802feb9386289c62f13f1aef64bd5d5d866ad | juliangruber/isarray | test.js | rejected_code_smell | Internal duplication: ~73% of the file is inside repeated 12+ line blocks | null |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Joi = require(\"joi\");\nvar DB = require(\"../db\");\n\nexports.list = {\n handler: function(request, reply) {\n DB.smembers(\"subscribers\", function(err, members) {\n reply({\n subscribers: members\n });\n ... | javascript | edit | 0 | 2 | mit | b560a5710ca240a499c1bcfaf643dfab458fe59c | borwahs/natalieandrob.com,borwahs/natalieandrob.com | server/routes/subscribers.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Event = require('../models/Event.js');\n\nexports.sync = function(events) {\n events.map(function(evt) {\n var query = {\n 'title': evt.title,\n 'startAt': evt.startAt\n };\n Event.findO... | javascript | edit | 0 | 2 | apache-2.0 | 8667d03442552cc21eff51529d8d9860f3428ee8 | Studentmediene/Barteguiden,Studentmediene/Barteguiden | server/import/server_sync.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nvar program = require('commander'),\n\tcjs = require(__dirname + '/../lib/');\n\nprogram\n\t.version(require(__dirname + '/../package.json').version)\n\t.option('-i, --input <file>', 'input file (required)')\n\t.o... | javascript | edit | 0 | 3 | mit | 97f57d91c2ee46e31dafe33eb4955261bb68fce3 | RReverser/pure-cjs | bin/pure-cjs.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst accounts = {};\n\n$('#go').click(function () {\n const networkId = $('#networkId').val();\n const accessToken = $('#accessToken').val();\n const filter = '!0S2A5ipm(pczxWJLGNzYzyy4l';\n const key = 'c8aSGAR0rp5RUK)dVriyCA((';\... | javascript | edit | 0 | 3 | mit | d30cb455eb066c5711b903b682f00dd752bedaf7 | shu8/SE-PostUrlDump,shu8/SE-PostUrlDump | main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar handleRequest = loadModule('helma.simpleweb').handleRequest;\nvar render = loadModule('helma.skin').render;\nvar webapp = loadModule('helma.webapp');\n// db model\nvar model = loadModule('model');\n\n\n// the main action is invoked ... | javascript | edit | 0 | 3 | apache-2.0 | eba8df01c6ed74e1be4a1e03bf1160b1c8a2bcd3 | ringo/ringojs,ringo/ringojs,ringo/ringojs,oberhamsi/ringojs,Transcordia/ringojs,oberhamsi/ringojs,Transcordia/ringojs,Transcordia/ringojs,ashwinrayaprolu1984/ringojs,oberhamsi/ringojs,ashwinrayaprolu1984/ringojs,ringo/ringojs,ashwinrayaprolu1984/ringojs,ashwinrayaprolu1984/ringojs,Transcordia/ringojs | apps/storage/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { startCase } from \"lodash\";\n\nexport default schema => {\n let schemaToUse = schema;\n if (!schemaToUse.fields && Array.isArray(schema)) {\n schemaToUse = {\n fields: schema\n };\n }\n schemaToUse = {\n ...s... | javascript | edit | 0 | 5 | mit | 074e9ebddbd392ee68c117c1d69fdecb7730dddb | TeselaGen/teselagen-react-components,TeselaGen/teselagen-react-components | src/DataTable/utils/convertSchema.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Default model configuration\n * (sails.config.models)\n *\n * Unless you override them, the following properties will be included\n * in each of your models.\n *\n * For more info on Sails models, see:\n * http://sailsjs.org/#!/... | javascript | edit | 0 | 0 | mit | eb6c818767f671f02732267d7493c36749d5edf4 | joschaefer/online-shop-api | config/models.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(() => {\n\n 'use strict';\n\n angular\n .module('app')\n .controller('LoginController', LoginController);\n\n LoginController.$inject = ['growl', '$window', '$http', '$routeSegment', 'TokenService', 'Endpoints'];... | javascript | edit | 0 | 3 | mit | 350cf06afe2d841fa309bf60155cb831235ae757 | royalrangers-ck/rr-web-app,royalrangers-ck/rr-web-app,royalrangers-ck/rr-web-app,royalrangers-ck/rr-web-app | landing/utils/auth/login/login.controller.js | rejected_duplicate | Near-duplicate of sample 102701 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine([\n 'service/serviceBase'\n], function(ServiceBase) {\n 'use strict';\n\n // Override in configuration.properties with `web.ui` prefix\n var DEFAULTS = {\n 'vertex.loadRelatedMaxBeforePrompt': 50,\n 'ver... | javascript | edit | 0 | 3 | apache-2.0 | acc5692d93fb34fcb134165e966f0e18ab9d436b | lumifyio/lumify,RavenB/lumify,bings/lumify,RavenB/lumify,dvdnglnd/lumify,dvdnglnd/lumify,Steimel/lumify,Steimel/lumify,lumifyio/lumify,Steimel/lumify,RavenB/lumify,RavenB/lumify,dvdnglnd/lumify,TeamUDS/lumify,bings/lumify,j-bernardo/lumify,bings/lumify,Steimel/lumify,j-bernardo/lumify,RavenB/lumify,lumifyio/lumify,bing... | lumify-web-war/src/main/webapp/js/service/config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n whoshiring: {\n title: \"Who's Hiring?\",\n subtitle: \"These companies are looking for JavaScript and Node.js developers\",\n addCompany: \"To add your company to this list, email <a href='mailto:<EMAIL>'... | javascript | edit | 0 | 0 | isc | 17d1f4b4fed07f5a0025041d68e9bfaf661aa495 | kemitchell/newww,DanielBarnes/newww,marcellodesales/newww,AgtLucas/newww,tiandavis/newww,Constructor-io/newww,jonathanmarvens/npm-newww,AgtLucas/newww,rutaihwa/newww,rutaihwa/newww,Constructor-io/newww,imshivs/newww,nexdrew/newww,nexdrew/newww,whitneyit/newww,ChALkeR/newww,psalaets/newww,jonathanmarvens/npm-newww,zeusd... | locales/en_US/company.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nApplication.Directives.directive(\"navbar\", navbarDirective);\n\nfunction navbarDirective() {\n return {\n scope: true,\n restrict: \"AE\",\n replace: true,\n templateUrl: \"index/navbar.html\",\n ... | javascript | edit | 0 | 1 | mit | 24bdffab0162136f186af7fd99ede4d665666a87 | materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org | website/app/index/navbar.js | rejected_duplicate | Near-duplicate of sample 86046 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n assets: {\n files: [\n {expand: true, src: [\"images/**\"], dest: \"dist/\"},\n {expand: true, src: [\"bower_components/**\"], dest: \"dist/\"},\n ]\n }\n}\n\n```\n\nApply this change: Copy assets ... | javascript | edit | 0 | 0 | mit | af9ed6b7826b218d353b216517294f98549d5e0f | chloealee/dosomething,jonuy/dosomething,DoSomething/dosomething,chloealee/dosomething,sergii-tkachenko/phoenix,chloealee/dosomething,angaither/dosomething,deadlybutter/phoenix,DoSomething/phoenix,jonuy/dosomething,DoSomething/phoenix,chloealee/dosomething,jonuy/dosomething,angaither/dosomething,sergii-tkachenko/phoenix... | lib/themes/dosomething/paraneue_dosomething/tasks/options/copy.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction LevelController(onComplete, level) {\n this.onComplete = onComplete;\n this.level = level;\n};\n\nLevelController.prototype.left = function() {\n if( this.index === 0 ) {\n return;\n }\n this.level.index -= 1;\n};\n\nLe... | javascript | edit | 0 | 4 | mit | 1b076fbce5ef391fcbbe813c7cde0906cc3278fd | mnito/factors-game,mnito/factors-game | src/Input/LevelController.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\n// Requires\nvar _ = require('underscore');\n\nvar fs = require('fs');\n\n// Comannder\nvar prog = require('commander');\n\n// etcd-dump's package.json file\nvar pkg = require('../package.json');\n\n// Dumper clas... | javascript | edit | 0 | 1 | apache-2.0 | 759c0af7d313740b52da4e0fedf200b542e5b905 | AaronO/iterm-colors,AaronO/iterm-colors | bin/iterm-colors.js | rejected_duplicate | Near-duplicate of sample 86320 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function (root, $) {\n var $button = $('button.nav'),\n $nav = $('.side ul');\n\n $('.js').show();\n $('.no-js').hide();\n\n $button.on('click', function () {\n $nav.slideToggle();\n });\n}(window, jQuery))... | javascript | edit | 0 | 1 | mit | cca155e68433c146291343511d32e2002d7ef72b | jdavis/jdavis.github.com,jdavis/jdavis.github.com,jdavis/jdavis.github.com | js/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nlet fs = require('fs')\nlet mkdirp = require('mkdirp')\nlet untildify = require('untildify')\nlet spawn = require('./spawn')\n\nlet dir = untildify('~\\\\AppData\\\\Roaming\\\\Microsoft\\\\Windows\\\\Start Menu\\\\Programs\\\\Startup')\... | javascript | edit | 0 | 2 | mit | 2f07ce896e1d3d8d20ddd627c10b3e42ba0bac1a | typicode/hotel,jhliberty/hotel,typicode/hotel,jhliberty/hotel,typicode/hotel | src/actions/startup/win32.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar args = require('yargs').argv;\n\nmodule.exports = {\n extraScripts: args.dom === 'shadow' ? ['test/enable-shadow-dom.js'] : [],\n registerHooks: function(context) {\n // The Good\n var crossPlatforms = [\n 'Windows 10/c... | javascript | edit | 0 | 4 | apache-2.0 | b2b541fa931fb6571ea939ad06108a9ba50c0383 | vaadin/vaadin-date-picker,vaadin/vaadin-date-picker | wct.conf.js | rejected_duplicate | Near-duplicate of sample 90088 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst rewrite = require('connect-modrewrite');\nconst serveIndex = require('serve-index');\nconst serveStatic = require('serve-static');\n\nmodule.exports = function (grunt) {\n return {\n livereload: {\n optio... | javascript | edit | 0 | 3 | apache-2.0 | 9bd3040d14d5be10b9d32d017fb93b6ee31b5af1 | 4p00rv/binary-static,negar-binary/binary-static,binary-com/binary-static,binary-static-deployed/binary-static,ashkanx/binary-static,ashkanx/binary-static,raunakkathuria/binary-static,negar-binary/binary-static,binary-com/binary-static,4p00rv/binary-static,raunakkathuria/binary-static,kellybinary/binary-static,binary-co... | build/connect.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport default {\n oauths: {\n oauthReturnedTempCode: \"\",\n oauthReturnedToken: \"\",\n authenticatedUser: {}\n },\n commitStatuses: [],\n repos: null\n};\n\n```\n\nApply this change: Modify initial state for commitStatus... | javascript | edit | 0 | 0 | mit | 9b7b848544f84c19169098e503ae0f4779887d7d | compumike08/GitHub_Status_API_GUI,compumike08/GitHub_Status_API_GUI | src/reducers/initialState.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar SearchBox = React.createClass({\n getInitialState: function() {\n return {\n user: this.props.user\n };\n },\n\n render: function() {\n return (\n <form className=\"ui\">\n ... | javascript | edit | 0 | 2 | apache-2.0 | c1fa71a64f4a14bb918c3e21aee32877f917f138 | ssut/namuhub,ssut/namuhub,ssut/namuhub | namuhub/static/namuhub.js | rejected_duplicate | Near-duplicate of sample 93295 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint-disable camelcase, global-require */\n\n'use strict';\n\nmodule.exports = function(grunt) {\n require('jit-grunt')(grunt);\n\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n\n jsonlint: {\n all: ... | javascript | edit | 0 | 2 | mit | bdb66b3483aaaffefa61eaa1a52c886a08dc28ef | woollybogger/string-natural-compare,nwoltman/string-natural-compare | Gruntfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// HubBub client code\n// From: https://github.com/almost/hubbub/\n\n(function () {\n // Just a very rough demo, needs a lot more work\n\n var form = document.querySelector('form[data-hubbub]');\n form.addEventListener('submit', func... | javascript | edit | 0 | 5 | mit | 5d09ecba94778245f2f59514786c58fbf4e406e1 | milessabin/hubbub,almost/hubbub | client/hubub.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// see http://vuejs-templates.github.io/webpack for documentation.\nvar path = require('path')\n\nmodule.exports = {\n build: {\n env: require('./prod.env'),\n index: path.resolve(__dirname, '../dist/index.html'),\n assetsRoot... | javascript | edit | 0 | 0 | mit | b1cd0b8560f5a64e806d6ae7bdc0d1c5f278b5dd | kimuraz/vue-rest | config/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n;(function(windowReference, documentReference) {\n 'use strict';\n\n //\n})(window, document);\n\n```\n\nApply this change: Add testing code for the local player evaluation method"
},
{
"role": "assistant",
"content": ... | javascript | edit | 0 | 1 | mit | 6b14d5f10c1550c43530484a73508ea87691d47e | doubtingreality/dicebluff,doubtingreality/dicebluff | src/dicebluff-client/app/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport BaseWorker from '../base'\nimport utils from 'async'\nimport uuid from 'uuid'\nimport redis from 'redis'\n\nexport class IngressWorker extends BaseWorker {\n constructor (rsmq) {\n super('ingress', rsmq)\n this.rsmq = rsmq... | javascript | edit | 0 | 2 | mit | 6e277b764fffcdbe17867409e6b3efded6e94662 | craftship/phonebox,craftship/phonebox,craftship/phonebox | src/workers/ingress/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n \"env\": {\n \"browser\": true,\n \"es6\": true,\n \"node\": true\n },\n \"extends\": \"eslint:recommended\",\n \"parserOptions\": {\n \"ecmaVersion\": 2017,\n \"sourceType\": \"module\"\n },\n ... | javascript | edit | 0 | 0 | mit | a67b9d72030639923820c9a74636e360d27fe778 | albertyw/base-flask,albertyw/base-flask,albertyw/base-flask,albertyw/base-flask | .eslintrc.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nangular.module('mementoMovieApp')\n .config(function ($stateProvider) {\n $stateProvider\n .state('movies', {\n url: '/?year&director&actor',\n templateUrl: 'app/movies/movies.html',\n cont... | javascript | edit | 0 | 1 | mit | bfceb2acdfc101fbf0f6448ffced75a36ae0ecab | ssidorchick/mementomovie | client/app/movies/movies.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * Helper to check if a number is internally represented as a fastint:\n *\n * if (Duktape.isFastint(x)) {\n * print('fastint');\n * } else {\n * print('not a fastint (or not a number)');\n * }\n *\n * NOTE:... | javascript | edit | 0 | 2 | mit | e2c2efc7d38e4de0b9af7dfc87ff4deedab42cd8 | markand/duktape,markand/duktape,markand/duktape,harold-b/duktape,harold-b/duktape,markand/duktape,harold-b/duktape,markand/duktape,harold-b/duktape,svaarala/duktape,svaarala/duktape,svaarala/duktape,harold-b/duktape,harold-b/duktape,markand/duktape,svaarala/duktape,svaarala/duktape,harold-b/duktape,markand/duktape,svaa... | polyfills/duktape-isfastint.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport plugins from '../main/plugins/'\nimport { send } from 'lib/rpc/events'\n\nexport default () => {\n // Run plugin initializers only when main window is loaded\n Object.keys(plugins).forEach(name => {\n const { initializeAsync... | javascript | edit | 0 | 2 | mit | cfb399ab88b5201984e138f89602dc2f96bfbba2 | KELiON/cerebro,KELiON/cerebro | app/lib/initializePlugins.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport * as changeCase from 'change-case'\nimport pluralize from 'pluralize'\n\nexport default {\n\t...changeCase,\n\tpluralize,\n\tresourceize: function(string) {\n\t\treturn pluralize(changeCase.camel(string))\n\t}\n}\n\nObject.map = ... | javascript | edit | 0 | 3 | mit | 808cabc32999237e3f278c8c0b56d7bfec43886d | NCI-Agency/anet,NCI-Agency/anet,NCI-Agency/anet,NCI-Agency/anet,NCI-Agency/anet | client/src/utils.js | rejected_duplicate | Near-duplicate of sample 82485 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { ThemeProvider } from 'styled-components';\nimport { Switch, Route } from 'react-router-dom';\nimport defaultTheme from 'app/themes/store/default';\n\nimport HomeRoute from 'app/components/Store/Route... | javascript | edit | 0 | 1 | mit | 96f1f5c0f0485f9e21ffd3de26e6e23937643de0 | VineRelay/VineRelayStore,VineRelay/VineRelayStore | app/routes/StoreRouter.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*eslint-env node */\n/*eslint no-var: 0 */\n\nmodule.exports = function(config) {\n\tconfig.set({\n\t\tframeworks: ['mocha', 'chai-sinon'],\n\n\t\treporters: ['mocha', 'coverage'],\n\t\tcoverageReporter: {\n\t\t\treporters: [\n\t\t\t\t... | javascript | edit | 0 | 3 | mit | 2f9b997f7138be1f6ab4243210ee039239e8bea6 | neeharv/preact,developit/preact,neeharv/preact,developit/preact,gogoyqj/preact | karma.conf.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport sharedStyles from 'components/shared/styles.scss';\n\nexport default ({ children }) => (\n <div className={sharedStyles.fullSize}>\n { children }\n </div>\n);\n\n```\n\nApply this change: Fix esli... | javascript | edit | 0 | 1 | mit | 0ae469f1f501af8e2eaacef91973988594601dcf | inooid/react-redux-card-game,inooid/react-redux-card-game | src/containers/App/App.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { StyleSheet, Text, View, TextInput, Button } from 'react-native';\nimport Login from './components/Login/Login.js';\n\n// TODO Use prod server in prod mode \n// const server = 'https://satoshi-api.her... | javascript | edit | 0 | 2 | mit | b5f81886a919cd45206295ecc81f7f231d6ca8aa | ripper234/satoshi | Home.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport uuid from 'uuid';\nimport flatten from 'ramda/src/flatten';\nimport times from 'ramda/src/times';\n\nimport createDBConnectionPool from '../server/db';\n\nconst db = createDBConnectionPool();\n\nconst generateValueBetween = (min,... | javascript | edit | 0 | 2 | mit | 01f8ab9dcc4cce24b401691a770ec42f973f5de2 | noms-digital-studio/csra-app,noms-digital-studio/csra-app,noms-digital-studio/csra-app | db/seedUtils.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar StrongSocket = require('./StrongSocket');\nvar session = require('./session');\nvar i18n = require('./i18n');\n\nvar socketInstance;\n\nfunction createGameSocket(url, version, receiveHandler) {\n socketInstance = new StrongSocket(u... | javascript | edit | 0 | 2 | mit | 6b9efcf61bb32e89e6b5eddfda7aa410caa46254 | garawaa/lichobile,btrent/lichobile,garawaa/lichobile,garawaa/lichobile,btrent/lichobile,btrent/lichobile,btrent/lichobile | project/src/js/socket.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport DS from 'ember-data';\nconst { <%= importedModules %> } = DS;\n\nexport default Model.extend({\n<%= attrs.length ? ' ' + attrs : '' %>\n});\n\n```\n\nApply this change: Fix wrong indentation on Model Blueprint for Classic apps"
... | javascript | edit | null | null | mit | 9318dc748e011c3ff07a8f2e6d23e9f797484e9f | HeroicEric/data,arenoir/data,HeroicEric/data,HeroicEric/data,arenoir/data,HeroicEric/data,arenoir/data,arenoir/data | blueprints/model/files/__root__/__path__/__name__.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Write javascript code for the following: Switch to getCanvas to load canvases lazily."
},
{
"role": "assistant",
"content": "function getCanvas() {\n // TODO: Read the project settings use the right ID\n var canvas = window.document.getElementById('gesso-target');... | javascript | new_file | 0 | 4 | mit | 2f7dcc7770ceeffc419c0650bbb9ae1e9b88cf62 | gessojs/gessojs,gessojs/gessojs | client/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#! /usr/bin/env node\n\nconst path = require('path');\nconst fs = require('fs');\n\nconst program = require('commander');\n\nconst pkg = require('../package.json');\nconst server = require('../lib/server.js');\n\nfunction failWithHelp(m... | javascript | edit | 0 | 2 | mit | 4f6bc241aee80e1784c651c917964dadd1f853bf | vocksel/studio-bridge-cli | server/bin/studio-bridge.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n var solr = require('./../lib/solr');\n \n\nvar client = solr.createClient();\n\nvar callback = function(err,res){\n if(err) console.log('Error:' + err);\n if(res) console.log('res:' + res);\n}\nclient.autoCommit = true;\nclient.upd... | javascript | edit | 0 | 2 | mit | 7b87547701d24660b9d6c9895a10e17eaced5a62 | kfitzgerald/solr-node-client,Bangsheng/solr-node-client,nicolasembleton/solr-node-client,chhams/solr-node-client,luketaverne/solr-node-client,godong9/solr-node-client,tpphu/solr-node-client,yanxi-com/solr-node-client,lbdremy/solr-node-client,lbdremy/solr-node-client,CondeNast/solr-node-client | examples/add.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function() {\n 'use strict';\n\n angular\n .module('lecturer')\n .factory('lecturerFactory', lecturerFactory);\n\n /* @ngInject */\n function lecturerFactory(lecturerService, $location) {\n var username... | javascript | edit | 0 | 2 | mit | 8fdea24745ba5a9fa62fd955d15b2de837f8abf6 | MACSIFS/IFS,MACSIFS/IFS,MACSIFS/IFS,MACSIFS/IFS | client/lecturer/app/lecturer.factory.js | rejected_duplicate | Near-duplicate of sample 81877 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst about = module.exports = {\n init,\n win: null\n}\n\nconst config = require('../../config')\nconst electron = require('electron')\n\nfunction init () {\n if (about.win) {\n return about.win.show()\n }\n\n const win = about... | javascript | edit | 0 | 2 | mit | a881668b389ab2ef8c830f3ef6200270004b96d4 | feross/webtorrent-app,webtorrent/webtorrent-desktop,feross/webtorrent-app,webtorrent/webtorrent-desktop,feross/webtorrent-app,webtorrent/webtorrent-desktop | src/main/windows/about.js | rejected_duplicate | Near-duplicate of sample 85593 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* global describe, it */\ndefine([\n\n 'chai'\n ,'underscore'\n ,'backbone'\n ,'lateralus'\n ,'../utils'\n\n], function (\n\n chai\n ,_\n ,Backbone\n ,Lateralus\n ,utils\n\n) {\n 'use strict';\n\n var assert = chai.assert;\... | javascript | edit | 0 | 1 | mit | 564216319c53b88f835c415ea81a744f0bab552a | Jellyvision/lateralus,Jellyvision/lateralus | test/spec/lateralus.component.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * Base View. Defines the basic methods every view is expected to have so\n * we can attach hooks to them.\n */\n\nvar hooks = require('hooks');\n\nfunction ViewBase() {\n this.data = function() {};\n this.mode = function() {};\n ... | javascript | edit | 0 | 5 | mit | 704c3b1e773f3c807c45d1bbd234746f268b7ef0 | jay-depot/turnpike,jay-depot/turnpike | lib/ViewBase.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nif (typeof buster == \"undefined\") {\n var buster = {};\n}\n\nbuster.util = (function () {\n var toString = Object.prototype.toString;\n var div = typeof document != \"undefined\" && document.createElement(\"div\");\n\n ret... | javascript | edit | 0 | 6 | bsd-3-clause | 606afcb84b7c85f941d6b39c6a8cec96072e795f | busterjs/buster-core,busterjs/buster-core,geddski/buster-core | lib/buster-util.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n// To make id smaller we get microgseconds count from more recent date\nvar start = Date.UTC(2011, 8, 21) * 1000\n\n// Prefix with number, it reduces chances of collision with variable names\n// (helpful if used as prop... | javascript | edit | 0 | 1 | mit | 479fea5b3c0d971e2eebac0857f361264139f37a | medikoo/time-uuid | lib/get-by-time.js | rejected_duplicate | Near-duplicate of sample 96223 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar mongoose = require('mongoose');\nvar log = require('lib/logger')(module);\nvar config = require('../config');\n\n// Установим соединение с базой\nlog.info('Connecting to MongoDB uri: ' + config.get('mongoose:uri'));\n\nmongoose.conn... | javascript | edit | 0 | 1 | apache-2.0 | c1a80c6b9dab389a88f06bd99c58762e0bc3d92c | koof90/srengine,ostinru/srengine,koof90/srengine,ostinru/srengine | lib/mongoose.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * @license\n * Copyright 2019 The FOAM Authors. All Rights Reserved.\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\nfoam.CLASS({\n package: 'foam.foamlink',\n name: 'FoamlinkNodeModelFileFetcher',\n properties: [\n '... | javascript | edit | 0 | 0 | apache-2.0 | 411bd57a7b1f0f82cf17f18b214d003601676359 | jacksonic/vjlofvhjfgm,foam-framework/foam2,jacksonic/vjlofvhjfgm,foam-framework/foam2,foam-framework/foam2,foam-framework/foam2,foam-framework/foam2,jacksonic/vjlofvhjfgm | src/foam/foamlink/FoamlinkNodeModelFileFetcher.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { Meteor } from 'meteor/meteor';\n\nMeteor.startup(() => {\n // code to run on server at startup\n\n // Creating comment schema\n CommentSchema = new SimpleSchema({\n email: {\n type: String,\n ... | javascript | edit | 0 | 2 | mit | ae55f65c2d2822ad9f77e47fcbd2becd98dfbeda | ArunMichaelDsouza/meteor-discussion-board,ArunMichaelDsouza/meteor-discussion-board | server/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(document).ready(function() {\n %('#led_on').click(function() {\n console.log('LED on!');\n });\n %('#led_off').click(function() {\n console.log('LED off!');\n });\n});\n\n```\n\nApply this change: Fix syntax ... | javascript | edit | 0 | 1 | mit | e758f14827b54a9ea7cf17190eca35b64c498170 | beepscore/pi_thing,beepscore/pi_thing,beepscore/pi_thing | webapp/templates/thing.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\nconst Controller = require('trails-controller')\n\n/**\n * @module <%= name %>Controller\n * @description Generated Trails.js Controller.\n */\nmodule.exports = class <%= name %>Controller extends Controller {\n\n}\n\n\n... | javascript | edit | null | null | mit | f567d423ca0b94f236a38c45e51958d203582fd1 | jaumard/generator-trails,tnunes/generator-trails,konstantinzolotarev/generator-trails | src/controller/templates/Controller.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(\"#search-field\").ghostHunter({\n results : \"#search-results\",\n onKeyUp : true,\n info_template : \"<p>Found {{amount}} posts</p>\",\n result_template : \"<a href='{{link}}'><p><h2>{{title}}</h2><h4>{{pubDate}}</h4>{... | javascript | edit | 0 | 0 | mit | f019469201eebdbb85880f871101da65599557e0 | dlecina/StayPuft,dlecina/StayPuft | assets/js/jquery.ghostHunter-init.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function(model) {\n 'use strict';\n\n let validateProjectAccess = require('./project-access')(model.access);\n let schema = require('.././schema')(model);\n let router = require('koa-router')();\n let pro... | javascript | edit | 0 | 1 | mit | ac1ce2e19868df6c0d96a626aeee83b70bf503dd | materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org | backend/server/resources/projects-routes.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*!\n Copyright (C) 2016 Google Inc., authors, and contributors <see AUTHORS file>\n Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>\n Created By: <EMAIL>\n Maintained By: <EMAIL>\n*/\n\n(function (can, ... | javascript | edit | 0 | 1 | apache-2.0 | b670c79377c6a4dc7cbfbf0a73418992f2bf09a7 | prasannav7/ggrc-core,josthkko/ggrc-core,prasannav7/ggrc-core,selahssea/ggrc-core,andrei-karalionak/ggrc-core,andrei-karalionak/ggrc-core,NejcZupec/ggrc-core,kr41/ggrc-core,plamut/ggrc-core,AleksNeStu/ggrc-core,selahssea/ggrc-core,VinnieJohns/ggrc-core,j0gurt/ggrc-core,selahssea/ggrc-core,josthkko/ggrc-core,kr41/ggrc-co... | src/ggrc/assets/javascripts/components/lazy_open_close.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction confirmReboot () {\n\tif (confirm('Are you sure you want to reboot the system?')) {\n\t\twindow.location.href = 'shellscripts/reboot.php?system=y';\n\t}\n\telse {\n\t\t// Do nothing\n\t}\n}\n\nfunction checkUpdate () {\n\tdocum... | javascript | edit | 0 | 2 | mit | 4fbd03a93149df18f10610214926284a39447d22 | virajchitnis/linux-webui,virajchitnis/linux-webui,virajchitnis/linux-webui | services.js | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.