messages listlengths 2 2 | language stringclasses 8
values | prompt_type stringclasses 2
values | lint_errors int64 0 129 ⌀ | cyclomatic_complexity int64 0 32 ⌀ | license stringclasses 7
values | commit stringlengths 40 40 | repos stringlengths 5 116k | new_file stringlengths 4 220 | status stringclasses 6
values | error stringlengths 26 74 ⌀ | is_valid_syntax bool 2
classes |
|---|---|---|---|---|---|---|---|---|---|---|---|
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(document).ready(function () {\n\n /*Navigation initialization*/\n var navigation = $('#navigation');\n var navShown = false;\n $('#nav-controller').on('click', function () {\n if (navShown) {\n navigation... | javascript | edit | 0 | 3 | mit | cb192f3b98bcfc5d8363924c5be1f2be37a2dbb5 | UoG-Libraries/Adshow,UoG-Libraries/Adshow,UoG-Libraries/Adshow | admin/scripts/default.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\nconst assert = require('assert');\nconst Event = require('../db/models/Event');\n\n\ndescribe('Validation of User records', () => {\n\n it('should require a name for every event', () => {\n const validationEvt = new E... | javascript | edit | 0 | 2 | mit | 28aed7e4779ad302b0b25b2d321a975179a24602 | IsenrichO/react-timeline,IsenrichO/react-timeline | test/validation_test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n/* global describe, it */\nlet assert = require('assert');\nlet Cycle = require('../../src/cycle');\n\ndescribe('Cycle', function () {\n describe('API', function () {\n it('should have `applyToDOM`', function () {\n ... | javascript | edit | 0 | 1 | mit | 8ee2dab5ff47ef580ef770fb795d3ad3bf590385 | ntilwalli/cyclejs,ntilwalli/cyclejs,cyclejs/cycle-core,cyclejs/cyclejs,staltz/cycle,ntilwalli/cyclejs,cyclejs/cycle-core,maskinoshita/cyclejs,usm4n/cyclejs,maskinoshita/cyclejs,cyclejs/cyclejs,feliciousx-open-source/cyclejs,feliciousx-open-source/cyclejs,usm4n/cyclejs,ntilwalli/cyclejs,usm4n/cyclejs,feliciousx-open-sou... | rx-run/test/common/cycle.js | rejected_duplicate | Near-duplicate of sample 68431 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst protractor = require('protractor')\nconst phantomjs = require('phantomjs-prebuilt')\n\nexports.config = {\n framework: 'mocha',\n plugins: [{\n package: 'aurelia-protractor-plugin'\n }, {\n package: 'protractor-console',\... | javascript | edit | 0 | 0 | mit | 78f8be18c8042305c401f1ac47e4ba5a3c2105f8 | jp7677/hellocoreclr,jp7677/hellocoreclr,jp7677/hellocoreclr,jp7677/hellocoreclr | ui/protractor.conf.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// TODO: To decide and adopt to some logging utility like winston\nvar util = require('util');\n\nmodule.exports = {\n info: function(message,context) {\n if(context) {\n console.log(message, util.format('%j', context));\n }... | javascript | edit | 0 | 2 | apache-2.0 | 880c178a446d61d77ba512e027e2cd076d412df8 | cloudfoundry-incubator/app-autoscaler,pradyutsarma/app-autoscaler,qibobo/app-autoscaler,pradyutsarma/app-autoscaler,qibobo/app-autoscaler,pradyutsarma/app-autoscaler,cloudfoundry-incubator/app-autoscaler,cloudfoundry-incubator/app-autoscaler,qibobo/app-autoscaler,qibobo/app-autoscaler,cloudfoundry-incubator/app-autosca... | api/lib/log/logger.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport shell from 'shelljs';\nimport chalk from 'chalk';\nimport ora from 'ora';\nimport spawn from 'cross-spawn-promise';\n\nconst tic = chalk.green('✓');\nconst tac = chalk.red('✗');\n\nconst installYeoman = async () => {\n const spi... | javascript | edit | 0 | 2 | mit | d76797c3ac220189e303670312bb6571ef096b22 | graphql-community/create-graphql,lucasbento/create-graphql | packages/create-graphql/src/utils.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine([\n 'flight/lib/component',\n 'director'\n], function(defineComponent, Router) {\n 'use strict';\n\n function RouterService() {\n\n this.gotoPost = function(id) {\n this.trigger(document, 'service.fe... | javascript | edit | 0 | 2 | mit | 10be5cde2d00aee7a8aaf248f978476d92f73581 | unitedstackfront/ued,unitedstackfront/ued | app/js/service/router.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nclass CommandSource {\n constructor(messageSource,botUsername){\n this.botUsername = botUsername;\n this.bindings = {};\n messageSource.on(\"text\",this.handle.bind(this));\n }\n\n addCommand(name,command){\n if(name in t... | javascript | edit | 0 | 5 | mit | eb530d7da6d372703d54f6648cdf5000949d71a9 | severnbronies/Sail | Ship/CommandSource.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * `modules/idea-hub` base data store\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 Licen... | javascript | edit | 0 | 0 | apache-2.0 | cd0c283d607b5ac4af377d9a05a99218c5ae7091 | google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp | assets/js/modules/idea-hub/datastore/base.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar records = [\n { id: 1, username: 'jack', password: 'secret', displayName: 'Jack', emails: [ { value: 'jack@example.com' } ] }\n , { id: 2, username: 'jill', password: 'birthday', displayName: 'Jill', emails: [ { value: 'jill@exa... | javascript | edit | 0 | 6 | unlicense | 7c014584f848d9f7df9470ee796aaa32317a82de | community-lands/community-lands-monitoring-station,rfc2616/community-lands-monitoring-station,rfc2616/community-lands-monitoring-station,community-lands/community-lands-monitoring-station,community-lands/community-lands-monitoring-station,rfc2616/community-lands-monitoring-station | db/users.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { useRef, useEffect, useState } from 'react';\nimport uuid from 'uuid/v4';\nimport { attempt } from 'lodash-es';\nimport useModifiedProps from '../UseModifiedProps';\nimport useAxis from '../UseAxis';\n\nexport default fun... | javascript | edit | 0 | 6 | mit | 8df9abb705e05391a592a379b9ddbc6d27b3d1cf | whawker/react-jsx-highcharts,whawker/react-jsx-highcharts | packages/react-jsx-highcharts/src/components/PlotBandLine/usePlotBandLineLifecycle.js | accepted | null | true |
[
{
"role": "user",
"content": "Write javascript code for the following: Implement some constructors and animation loop\n\nImplement Game, Screen and Item constructors. Implement DrawableEntity\nand InteractiveEntity prototypes. Implement the animation loop."
},
{
"role": "assistant",
"content": "... | javascript | new_file | 0 | 5 | mit | 7c4fb497c6ce67bc80b989e9ce386563d2809ac8 | jghinestrosa/diogenes | diogenes.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar ActivatingListItem = Ember.Component.extend({\n tagName: 'li',\n classNameBindings: ['active'],\n active: false\n});\n\nexport default ActivatingListItem;\n\n```\n\nApply this change: Fix active menu state on settings navig... | javascript | edit | 0 | 1 | mit | a0300bfafe572f2f1e1512c1ed0dbf8be2207c7f | kevinansfield/Ghost-Admin,dbalders/Ghost-Admin,airycanon/Ghost-Admin,acburdine/Ghost-Admin,TryGhost/Ghost-Admin,acburdine/Ghost-Admin,airycanon/Ghost-Admin,kevinansfield/Ghost-Admin,TryGhost/Ghost-Admin,JohnONolan/Ghost-Admin,dbalders/Ghost-Admin,JohnONolan/Ghost-Admin | components/gh-activating-list-item.js | rejected_duplicate | Near-duplicate of sample 81654 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport ModalDialog from 'ghost/components/gh-modal-dialog';\nimport upload from 'ghost/assets/lib/uploader';\n\nvar UploadModal = ModalDialog.extend({\n layoutName: 'components/gh-modal-dialog',\n\n didInsertElement: function () {... | javascript | edit | 0 | 2 | mit | e31c5e39f3775e2278f7bdb1b8e4de919c97266e | TryGhost/Ghost,TryGhost/Ghost,TryGhost/Ghost | ghost/admin/components/gh-upload-modal.js | rejected_duplicate | Near-duplicate of sample 102368 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nexport {default as OCLE} from 'https://www.lactame.com/lib/openchemlib-extended/1.13.0/openchemlib-extended.js';\nexport {default as SD} from 'https://www.lactame.com/lib/spectra-data/3.1.0/spectra-data.min.js';\nexport {default as CC... | javascript | edit | 0 | 0 | mit | 7162d926443cc62dd0f4a93691de5f7a08d47d11 | cheminfo-js/visualizer-helper,cheminfo-js/visualizer-helper | eln/libs.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nrequire(\"./server\")\n\nexports.config = {\n directConnect: true,\n specs: 'tests/e2e/*.js',\n baseUrl: 'http://localhost:1234',\n framework: 'jasmine2',\n jasmineNodeOpts: {\n showColors: true,\n defaultTimeoutInterval: 300... | javascript | edit | 0 | 0 | mit | 69420c72b6f9adabc6bbe027c24d4313efea534c | XVincentX/pollsApiClient,XVincentX/pollsApiClient | protractor.conf.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine([\"app/app\"], function(App) {\n \"use strict\";\n\n App.CreateAttachmentView = Ember.View.extend({\n tagName: 'input',\n type: 'file',\n attributeBindings: ['type'],\n\n change: function(event) {\n if (event.t... | javascript | edit | 0 | 3 | mit | 258e9170038e3c55481447c1460413af710c21a8 | davidmz/pepyatka-html,SiTLar/pepyatka-html,pepyatka/pepyatka-html,dsumin/freefeed-html,FreeFeed/freefeed-html,dsumin/freefeed-html,davidmz/pepyatka-html,FreeFeed/freefeed-html,epicmonkey/pepyatka-html,SiTLar/pepyatka-html,pepyatka/pepyatka-html,epicmonkey/pepyatka-html | public/js/app/fields/CreateAttachmentView.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar settings = {\n \"endpoints\": [\n {\n \"name\": \"World Cup\",\n \"url\": \"https://worldcup-graphql.now.sh/\",\n \"auth\": '',\n \"verb\": 'POST',\n \"accept\": '*/*'... | javascript | edit | 0 | 0 | mit | b56c5ecd849d23519a063bc2396f8e7811d0f2ad | Brbb/graphql-rover,Brbb/graphql-rover | data/settings.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nisic.Model = girder.Model.extend({\n urlRoot: function () {\n return this.resourceName;\n }\n});\n\n```\n\nApply this change: Use Backbone destroy, instead of Girder's method"
},
{
"role": "assistant",
"content"... | javascript | edit | 0 | 1 | apache-2.0 | 9ff4d5ee986e9a821d910c13e78e39623b2fe7b1 | ImageMarkup/isic-archive,ImageMarkup/isic-archive,ImageMarkup/isic-archive,ImageMarkup/isic-archive | web_external/model.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(\"#search-form\").submit(function (event) {\n var query = $(\"#search-box\").val();\n var path = window.location.pathname;\n //Split path, removing empty entries\n var splitPath = path.split('/');\n splitPath = splitPa... | javascript | edit | 0 | 3 | mit | 26a1d68fe2dec24e18f4cad4db176ab0d849fb2a | AmadeusW/SourceBrowser,AmadeusW/SourceBrowser,AmadeusW/SourceBrowser,CodeConnect/SourceBrowser,CodeConnect/SourceBrowser | src/SourceBrowser.Site/Scripts/search.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\n/**\n * Sample API controller. Can safely be removed.\n */\n\nconst Sample = require('../models').sample.Sample\nconst co = require('co')\n\nmodule.exports = {\n getData: co.wrap(getData),\n postData: co.wrap(postData)... | javascript | edit | 0 | 4 | mit | 3e9c692ef04e33826b4ed31d63651aa6f6aa6516 | KTH/lms-export-results | server/controllers/sampleCtrl.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar fs = require('fs')\n , path = require('path')\n , expect = require('chai').expect\n , shell = require('shelljs')\n , glob = require('glob')\n , _ = require('lodash')\n\nfunction read(filename) {\n return fs.readFileSync(filena... | javascript | edit | 0 | 1 | mit | 2848d099199c841f64c7c66ce33775e0bc25bc59 | philipwalton/ingen | test/torpedo-build-test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nexports.config = {\n seleniumServerJar: './node_modules/protractor/selenium/selenium-server-standalone-2.45.0.jar',\n capabilities: {\n 'browserName': 'phantomjs'\n },\n framework: 'jasmine2',\n onPrepare: funct... | javascript | edit | 0 | 1 | mit | 05300b58009a287abd2e30747d43b052da2c0695 | solarnz/ec2pric.es,solarnz/ec2pric.es,solarnz/ec2pric.es | e2e/conf.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar gulp = require('gulp');\nvar sass = require('gulp-sass');\n\ngulp.task('default', ['sass'], function () {\n //gulp.src('./node_modules/font-awesome/fonts/**/*.{eot,svg,ttf,woff,woff2}')\n // .pipe(gulp.dest... | javascript | edit | 0 | 1 | mit | be3aac36283d562d94f358e81de722e1854f56b7 | WarriorMachines/warriormachines-phpbb,WarriorMachines/warriormachines-phpbb,WarriorMachines/warriormachines-phpbb | gulpfile.js | rejected_duplicate | Near-duplicate of sample 76589 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction numberToString(number) {\n var r = Math.round(number * 1000) / 1000;\n return \"\"+r;\n}\n\nfunction addCommas(nStr)\n{\n\tnStr += '';\n\tx = nStr.split('.');\n\tx1 = x[0];\n\tx2 = x.length > 1 ? '.' + x[1] : '';\n\tvar r... | javascript | edit | 0 | 3 | mit | 20d900a89125cf0141e31b14f43ff65265aab505 | Beskhue/ClickerHeroesCalculator,Beskhue/ClickerHeroesCalculator | js/utils.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* See license.txt for terms of usage */\n\n\"use strict\";\n\nconst { Cu, Ci } = require(\"chrome\");\nconst { Firebug } = require(\"./firebug.js\");\nconst { Trace } = require(\"./trace.js\");\nconst { gDevTools } = Cu.import(\"resour... | javascript | edit | 0 | 1 | bsd-3-clause | 2664f207be053a02a4c9866c8794b95901fe4aaa | firebug/firebug.next,bmdeveloper/firebug.next,bmdeveloper/firebug.next,vlajos/firebug.next,vlajos/firebug.next,firebug/firebug.next | lib/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component, PropTypes } from 'react';\nimport { Table, TableBody, TableHeader, TableHeaderColumn, TableRow } from 'material-ui/Table';\n\nimport { getRepositories } from '../../installer/github';\n\nimport Repository from... | javascript | edit | 0 | 2 | mit | 7513968732441a2bd3ecd720d821e12a1311a38b | marmelab/sedbot.js | installer/js/setup/repositories/RepositoryList.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use babel\";\n\nexport default {\n config: {\n executable: {\n type: \"string\",\n default: \"gfortran\"\n },\n gfortran_flags: {\n type: \"string\",\n default: \"-Wa... | javascript | edit | 0 | 1 | mit | 7930c5a16744f6464a126ebe739704dadeca9382 | Luthaf/linter-gfortran | lib/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar gulp = require('gulp');\nvar gutil = require('gulp-util');\nvar webpack = require('webpack');\nvar WebpackDevServer = require('webpack-dev-server');\nvar webpackConfig = require('./webpack.config.js');\nvar open = require('gulp-open... | javascript | edit | 0 | 2 | mit | e1be3b7fdd59ba71c3e2d5ffd626fd7877431401 | hnakamur/solve-quadratic-equation.js,hnakamur/solve-quadratic-equation.js | gulpfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\"\n\n/**\n * Inverts the data from the deepstream structure to reduce nesting.\n *\n * { _v: 1, _d: { name: 'elasticsearch' } } -> { name: 'elasticsearch', __ds = { _v: 1 } }\n *\n * @param {String} value The data to save\... | javascript | edit | 0 | 1 | mit | 27ad5450c62de6fee222e6298901b3101a097930 | hoxton-one/deepstream.io-storage-rethinkdb | src/transform-data.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst fs = require(\"fs\");\nconst path = require(\"path\");\n\nfunction getValue(obj, pathArr, def) {\n let nextPath = pathArr.shift();\n if (nextPath) {\n return (pathArr.length > 0) ?\n (obj.hasOwnProperty(nex... | javascript | edit | 0 | 6 | mit | 1242956b0fc4ef7300c78c50c087d30a60b963d4 | buttercup-pw/buttercup-server | source/configuration.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport 'intl';\nimport 'intl/locale-data/jsonp/en.js';\nimport * as Aphrodite from 'aphrodite';\nimport * as AphroditeNoImportant from 'aphrodite/no-important';\n\nimport Vue from 'vue';\nimport VueMeta from 'vue-meta';\nimport VueRoute... | javascript | edit | 0 | 1 | mit | 0b8d55b196164dc7dfdef644ee95806f2d5dac59 | indirectlylit/kolibri,learningequality/kolibri,indirectlylit/kolibri,indirectlylit/kolibri,mrpau/kolibri,mrpau/kolibri,learningequality/kolibri,mrpau/kolibri,learningequality/kolibri,mrpau/kolibri,indirectlylit/kolibri,learningequality/kolibri | packages/kolibri-tools/jest.conf/setup.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Rx from 'rx';\nimport glob from 'glob';\n\nvar rxGlobArray = Rx.Observable.fromNodeCallback(glob);\n\nexport\ndefault\n\nfunction rxGlob(...args) {\n console.log(...args);\n return rxGlobArray(...args).flatMap(Rx.Observable... | javascript | edit | null | null | mit | 1e0ef500de5b3bdaa857b091176b8cae3e2a330f | motiz88/sqin | src/rx-glob.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint-env node */\n'use strict';\n\nmodule.exports = function(environment) {\n let ENV = {\n modulePrefix: 'dummy',\n environment,\n rootURL: '/',\n locationType: 'auto',\n EmberENV: {\n FEATURES: {\n // ... | javascript | edit | 0 | 3 | mit | 1da816b0cbe307f3cb8ea74dc368e460d7eb16c2 | cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack | packages/workflow/tests/dummy/config/environment.js | rejected_duplicate | Near-duplicate of sample 70403 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport EmberObject from '../../lib/system/object';\nimport { AbstractTestCase } from 'internal-test-helpers';\nimport { runArrayTests } from '../helpers/array';\n\nclass InvokeTests extends AbstractTestCase {\n '@test invoke should cal... | javascript | edit | 0 | 2 | mit | ad45bd67ba40b86954e5649f04ef5c42258bf6d4 | bekzod/ember.js,knownasilya/ember.js,GavinJoyce/ember.js,kellyselden/ember.js,Turbo87/ember.js,elwayman02/ember.js,jaswilli/ember.js,cibernox/ember.js,kellyselden/ember.js,qaiken/ember.js,twokul/ember.js,qaiken/ember.js,mike-north/ember.js,stefanpenner/ember.js,asakusuma/ember.js,emberjs/ember.js,xiujunma/ember.js,twok... | packages/ember-runtime/tests/array/invoke-test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar card = require('creditcards').card;\n\nmodule.exports = function ($parse) {\n return {\n restrict: 'A',\n require: ['ngModel', 'ccNumber'],\n controller: function () {\n var expectedType;\n this.... | javascript | edit | 0 | 1 | mit | ccfc6e5850fa6de5b821a292eab02c9755bd2062 | SimeonC/angular-credit-cards,matiasarayac/angular-credit-cards,Noxwille/angular-credit-cards,bendrucker/angular-credit-cards,antoinepairet/angular-credit-cards,dingels35/angular-credit-cards,dribehance/angular-credit-cards,aspone/angular-credit-cards,robertbaker/angular-credit-cards | src/number.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\n// Bind event listeners to target.\nexport function on (target, eventName, listener, capture = false) {\n return target.addEventListener(eventName, listener, capture);\n}\n\n// Unbind event listeners\nexport function... | javascript | edit | 0 | 5 | mit | ade9f35525d169ada126e66ced7be3e51ba5a4ef | Andreyco/react-video,Andreyco/react-video | src/helpers.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nrequire('../css/style.css');\n\n(function(window, document, requirejs, define){\n 'use strict';\n\n // config\n try {\n var config = JSON.parse(\n document.getElementById('data-config').getAttribute('data-conf... | javascript | edit | 0 | 2 | mit | 8ea3fe598997e04b102d50bc31c6c579b5591679 | remarkablemark/react-engine-template,remarkablemark/react-engine-template | src/js/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function (grunt) {\n var semver = require('semver');\n var version = grunt.option('version');\n\n function bump () {\n //console.log(arguments[0][0]);\n }\n\n function file (path) {\n return {\n dest: pa... | javascript | edit | 0 | 2 | mit | 9c90a3a6e2f4e5e6e8028e63936daa28ef51f294 | skatejs/skatejs,chrisdarroch/skatejs,skatejs/skatejs,antitoxic/skatejs,chrisdarroch/skatejs,skatejs/skatejs | build/configs/replace.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefaultFeedIds = [];\n\ndefaultFeeds = [{\n\tname: 'Sneakers',\n\ticon: 'money'\n}, {\n\tname: 'Electronics',\n\ticon: 'laptop'\n}, {\n\tname: 'Clothing (Men)',\n\ticon: 'male'\n}, {\n\tname: 'Clothing (Women)',\n\ticon: 'female'\n}, {\... | javascript | edit | 0 | 2 | mit | 948dd454a231de83b3f7ef522f99588dbcb109de | BaseNY/base,BaseNY/base,BaseNY/base | server/fixtures.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function (angular) {\n \"use strict\";\n\n angular.module(\"mfl.gis.interceptor\", [])\n\n .factory(\"mfl.gis.interceptor.headers\", [function () {\n var etag_header = null;\n var last_modified_header = null;\n\n... | javascript | edit | 0 | 4 | mit | 68312d1d3e9a2f4f3211c0ba91105e11270b6f3d | MasterFacilityList/mfl_web,urandu/mfl_web,MasterFacilityList/mfl_web,urandu/mfl_web,MasterFacilityList/mfl_web,MasterFacilityList/mfl_web | src/app/common/interceptors.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport express from \"express\"\nimport graphqlHTTP from \"express-graphql\"\nimport { graphqlExpress, graphiqlExpress } from \"graphql-server-express\"\nimport bodyParser from \"body-parser\"\nimport mongoose, { Schema } from \"mongoos... | javascript | edit | 0 | 1 | mit | 5ae3053a5eee1c0e2f8b214fc4174d7dacaf91f6 | DevNebulae/ads-pt-api | src/server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar gulp = require( 'gulp' );\nvar browserify = require( 'browserify' );\nvar source = require( 'vinyl-source-stream' );\nvar uglify = require( 'gulp-uglify' );\nvar streamify = require( 'gulp-streamify' );\n\ngulp.t... | javascript | edit | 0 | 1 | mit | 23a2c12b26d128c6b9cda4764d5b0487eba8671b | Automattic/vip-js-sdk | gulpfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nclass SocketHandler {\n constructor(socket) {\n this.socket = socket;\n socket.on(this.eventName, this.preEvent);\n }\n\n preEvent() {\n if (this.requiresAuthentication) {\n // TODO\n return fals... | javascript | edit | 0 | 2 | mit | 5c63c358a2aa8ea74aa13088f18dfe0e786ef6f4 | Sxw1212/ReDash,Sxw1212/ReDash | lib/socket/handler.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport passport from 'koa-passport';\nimport User from '../src/models/users'\nimport { Strategy } from 'passport-local'\n\npassport.serializeUser((user, done) => {\n done(null, user.id)\n})\n\npassport.deserializeUser(async (id, done) ... | javascript | edit | 0 | 5 | mit | 989073056f890097c74d78634f75b360a8fbf715 | adrianObel/koa2-api-boilerplate | config/passport.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar gulp = require('gulp');\nvar concat = require('gulp-concat');\nvar uglify = require('gulp-uglify');\nvar shell = require('gulp-shell');\n\ngulp.task('js', function() {\n\treturn gulp.src(['js/*.js', 'gen/*.js'])\n\t\t.pipe(concat('r... | javascript | edit | 0 | 1 | mit | bfcc3af922c0cf0fba0a5614be4d400d79a6eaee | carlmartus/rapidframe.js,carlmartus/rapidframe.js | gulpfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nconst expect = require('chai').expect\nconst packageSettings = require('./package.json')\n\nconst Up = require('./' + packageSettings.main)\n\n\ndescribe('The `main` field in package.json', () => {\n it('points to th... | javascript | edit | 0 | 1 | mit | db48e742bdea3a3b9b0de459019f74f632b6ceef | start/up,start/up | verify-package-settings.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'; // eslint-disable-line\n\nconst { default: ImageminPlugin } = require('imagemin-webpack-plugin');\nconst imageminMozjpeg = require('imagemin-mozjpeg');\nconst UglifyJsPlugin = require('uglifyjs-webpack-plugin');\n\nconst c... | javascript | edit | 0 | 0 | mit | 6280fc97dba8773a6833014f0cd5f6ae71012c7d | c50/c50_roots,ptrckvzn/sage,roots/sage,NicBeltramelli/sage,NicBeltramelli/sage,ptrckvzn/sage,c50/c50_roots,roots/sage,c50/c50_roots,NicBeltramelli/sage,ptrckvzn/sage | resources/assets/build/webpack.config.optimize.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\"\nvar gulp = require(\"gulp\");\nvar eslint = require(\"gulp-eslint\");\nvar babel = require(\"gulp-babel\");\nvar SOURCE_PATH = [\"./src/**/*.js\", \"./src/**/*.jsx\"];\n\n\ngulp.task(\"build\", function () {\n return gu... | javascript | edit | 0 | 1 | mit | 44676a86b28fdee89ccc2ced929a68f0f9c86329 | philcockfield/ui-harness,philcockfield/ui-harness,philcockfield/ui-harness | gulpfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar fs = require('fs'),\n words = require('./data/buzzwords.json');\n\nfs.writeFileSync('Supported-buzzwords.md',\n 'Supported Buzzwords\\n' +\n '=================\\n' +\n '\\n' +\n\n words.map(function (word) {\n ... | javascript | edit | 0 | 1 | mit | f545a0e2137b4864a242416b1af5d429faad405d | wooorm/buzzwords | build-supported-words.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\nvar gulp = require('gulp'),\n\tjshint = require('gulp-jshint'),\n\tfilter = require('gulp-filter'),\n\tmocha = require('gulp-mocha');\n\ngulp.task('default', ['test']);\n\ngulp.task('watch', function () {\n\tgulp.wat... | javascript | edit | 0 | 1 | mit | 601ea6b5155bd81e007bd8bad583e50e9f1ba42c | keithmorris/gulp-nunit-runner | gulpfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar OS = require(\"os\");\nvar Config = require(\"truffle-config\");\nvar Contracts = require(\"../contracts\");\nvar Resolver = require(\"truffle-resolver\");\nvar Artifactor = require(\"truffle-artifactor\");\nvar Migrate = require(\"... | javascript | edit | 0 | 3 | mit | 9bd1c51b1313e9b5ddd7a37f903df3e4155755d3 | ConsenSys/truffle | packages/truffle-core/lib/commands/migrate.js | rejected_duplicate | Near-duplicate of sample 81668 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nimport Login from '../src/Login';\n\ndescribe('Login', function() {\n\tit('should be tested', function() {\n\t\tassert.fail('No tests for this module yet.');\n\t});\n});\n\n```\n\nApply this change: Add test for login c... | javascript | edit | 0 | 1 | bsd-3-clause | 4d476004060dfdd7c6c124fe53d077f4e9bdd859 | nhpatt/metal-login,nhpatt/metal-login | test/Login.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Module dependencies.\nvar debug = require('debug')('ruche:error');\n\n/**\n * Handle errors\n * @param {Error} error\n * @return {Error}\n */\nvar handle = function (err) {\n debug(err);\n process.exit(1)\n return err;\n};\n\nvar... | javascript | edit | 0 | 1 | mit | 577baf7c652130a0677c74419c736ddc304d735c | quentinrossetti/ruche,quentinrossetti/ruche,quentinrossetti/ruche | lib/ruche/util/error.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar gulp = require('gulp');\nvar ts = require('gulp-typescript');\nvar tslint = require('gulp-tslint');\nvar jade = require('gulp-jade');\n\ngulp.task('jade', function() {\n gulp.src('./src/views/*.jade')\n .pipe(jade())\n ... | javascript | edit | 0 | 1 | mit | e53946933a575fa13682b538186828a90e4d9101 | kubosho/simple-music-player | gulpfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n//\n// Copyright 2012 Shared Learning Collaborative, 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// You may obtain a copy of the Lic... | javascript | edit | 0 | 0 | apache-2.0 | 856cc359223a4acc2c8ba9ccebe965fa37a86e04 | inbloom/secure-data-service,inbloom/secure-data-service,inbloom/secure-data-service,inbloom/secure-data-service,inbloom/secure-data-service | sli/config/indexes/ingestion_batch_job_indexes.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar gulp = require('gulp');\nvar mocha = require('gulp-mocha');\nvar istanbul = require('gulp-istanbul');\nvar eslint = require('gulp-eslint');\nvar coveralls = require('gulp-coveralls');\n\ngulp.task('pre-test', function () {\n return... | javascript | edit | 0 | 1 | mit | 37704ec24635ab7f256706e6c929733ab2b64e7d | czerwonkabartosz/Micro-Whalla | gulpfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Command from './Command.js';\n\n/**\n * Table Command\n */\nexport default class TableCommand extends Command {\n /**\n * @inheritDoc\n */\n execute() {\n const figure = this.editor.document.createElement('fi... | javascript | edit | 0 | 3 | mit | 864f02426a0fceca05a597d46a7e61210497b9a3 | akilli/cms,akilli/cms,akilli/cms | gui/editor/src/command/TableCommand.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar elixir = require('laravel-elixir');\n\n/*\n |--------------------------------------------------------------------------\n | Elixir Asset Management\n |--------------------------------------------------------------------------\n |\n ... | javascript | edit | 0 | 1 | mit | 5deca95ccf4351038cb84eae9b6223d60f3f68cb | kerick-jeff/iPub,lcp0578/Wiki,superdol/Wiki,superdol/Wiki,remxcode/laravel-base,thosakwe/rGuard,tkc/laravel-unit-test-sample,farwish/laravel-pro,kerick-jeff/istore,hackel/laravel,Stolz/Wiki,farwish/laravel-pro,orckid-lab/dashboard,superdol/Wiki,slimkit/thinksns-plus,hackel/laravel,tkc/laravel-unit-test-sample,hackel/la... | gulpfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Generated by CoffeeScript 1.6.2\n(function() {\n var coffee, concat, gulp, gutil, mocha, uglify, wrap;\n\n gulp = require('gulp');\n\n coffee = require('gulp-coffee');\n\n concat = require('gulp-concat');\n\n gutil = require('gu... | javascript | edit | 0 | 0 | mit | 7cb6aab651c603f0d0d3a2159193b3cb8e62a97d | resin-io/validateSSHjs | gulpfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(document).ready(function() {\n\n $(\".welcome\").on(\"click\", function() {\n console.log(\"YES\");\n $(this).slideUp(1500);\n // $(this).parent().slideUp(1500);\n $(this).parent().animate({ height: 'toggle', opacity: 0.5... | javascript | edit | 0 | 1 | mit | 4ceb847fa6340bb869d9c8cb3e55701124d0b92b | chi-bobolinks-2015/TheGoldenRecord,chi-bobolinks-2015/TheGoldenRecord,chi-bobolinks-2015/TheGoldenRecord | app/assets/javascripts/views/navbar.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * @file Etherscan API client.\n * @module client/etherscan\n */\n\n'use strict'\n\n/**\n * Etherscan API client.\n * @static\n */\nclass Client {\n\n}\n\n// Expose\nmodule.exports = Client\n\n```\n\nApply this change: Add private ... | javascript | edit | 0 | 1 | unlicense | 5ade2739a47f3fb2a3a8ee5bc5c62619f1c78e74 | jestcrows/ethtaint,jestcrows/ethtaint | src/client/etherscan.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n// @ngInject\nvar authorsDirective = function() {\n return {\n scope: {\n authors: '='\n },\n template: require('./authorstemplate.html'),\n //@ngInject\n controller: function($scope) {\n $scop... | javascript | edit | 0 | 3 | mit | 1836576ba5045392f9af0473f48cbfac27ccd8ef | npolar/npdc-common,npolar/npdc-common | src/components/document/authors/authorsDirective.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\r\n\r\nconst log = require('./log.js')\r\nconst mm = require('micromatch')\r\nconst chalk = require('chalk')\r\nconst watcher = require('simple-watcher')\r\n\r\nclass Watcher {\r\n watch ({workingDir, exclude, callback}) {... | javascript | edit | 0 | 3 | mit | 52ee49be8d61da1b6accf3b05967e961ab240b77 | gavoja/aemsync | src/watcher.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar gulp = require('gulp')\nvar shell = require('./')\n\nvar paths = {\n js: ['*.js', 'test/*.js']\n}\n\ngulp.task('test', shell.task('mocha -R spec -r should'))\n\ngulp.task('coverage', ['test'], shell.task('istanbul cover _mocha -- ... | javascript | edit | 0 | 1 | mit | c5f14f2cbb577a8b0fbb7bb727cbf78a49233b2a | sun-zheng-an/gulp-shell,sun-zheng-an/gulp-shell | gulpfile.js | rejected_duplicate | Near-duplicate of sample 69292 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Minionette = (function(global, _, $, Backbone) {\n 'use strict';\n\n // Define and export the Minionette namespace\n var Minionette = {};\n Backbone.Minionette = Minionette;\n\n // @include ../jquery.cleanData.js\n\n ... | javascript | edit | 0 | 1 | mit | 28d94abe7b927ddb8edfe50e1641d0614cc5c01b | thejameskyle/minionette,jridgewell/minionette | src/build/minionette.js | rejected_duplicate | Near-duplicate of sample 96288 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar gulp = require('gulp')\nvar sass = require('gulp-sass')\nvar browserSync = require('browser-sync').create()\n\ngulp.task('sass', function () {\n return gulp.src('./scss/**/*.scss')\n .pipe(sass().on('error', sass.logError))\n ... | javascript | edit | 0 | 1 | mit | 3c7218c4e42017c4c602fb4fe86dd5641ff93cde | ellsclytn/AirCalc,ellsclytn/AirCalc | gulpfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport StoriesItemType from '../types/StoriesItemType'\nimport RankingInputItemType from '../types/RankingInputItemType'\nimport {Story, User, Ranking} from '../models'\n\nconst addRanking = {\n name: 'addRanking',\n type: StoriesItem... | javascript | edit | 0 | 3 | mit | 9cffc665772326208a446bc203ff127f877aa318 | DominikePessoa/rateissuesfront,DominikePessoa/rateissuesfront,cassioscabral/rateissuesfront,cassioscabral/rateissuesfront | src/data/mutations/addRanking.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar gulp = require('gulp');\nvar $ = require('gulp-load-plugins')({\n camelize: true\n});\n\nvar config = {\n source: {\n scripts: {\n path: 'app/',\n files: './app/**/*.js'\n }\n },\n build: {\n scripts: 'build/s... | javascript | edit | 0 | 1 | mit | a635b7b9f5b6b49ce079f3ea15e62df089f39452 | letanure/gulp-demo,letanure/gulp-demo | gulpfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar gulp = require('gulp');\nvar nodemon = require('nodemon');\nvar webpack = require('webpack');\nvar clientConfig = require('./webpack.config');\nvar path = require('path');\n\nfunction onBuild(cb) {\n return function(err, stats) {\n... | javascript | edit | 0 | 3 | mit | 3748b6e2d9d97238a3ee9580a3d62dd60380edb7 | bragin/ublog,bragin/ublog | gulpfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\nCopyright 2014 Spotify AB\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/l... | javascript | edit | 0 | 1 | apache-2.0 | d2652f66c5cd09730a789373fe1cc0f51d357b7d | spotify/threaddump-analyzer,rprabhat/threaddump-analyzer,rprabhat/threaddump-analyzer,spotify/threaddump-analyzer | gulpfile.js | rejected_duplicate | Near-duplicate of sample 95432 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar md5= require('./md5');\n\n/*\n * Hide the password. Uses the password to form authorization strings,\n * but provides no interface for exporting it.\n */\nfunction user_credentials(username,password) {\n if (username.is_user_creden... | javascript | edit | 0 | 6 | mit | 4017470f2f16cb62ab89ad2b181e9338188c3fdb | randymized/www-authenticate | lib/user-credentials.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst fs = require(\"fs\");\nconst path = require(\"path\");\nconst { src, dest, task, watch, series } = require('gulp');\nconst Gitdown = require('@gnd/gitdown');\nconst rename = require(\"gulp-rename\");\nconst debug = require(\"gulp-... | javascript | edit | 0 | 2 | mit | 533cee40b8fa8d6ec9066b13f2b094881dee9b9c | ConsenSys/truffle | gulpfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Created by jonathan on 3/7/15.\n */\n\nvar CameraApp = function() {};\n\nCameraApp.prototype = {\n framesPerSecond: 1,\n\n setup: function() {\n this.image = document.getElementById('CameraImage');\n this.ima... | javascript | edit | 0 | 5 | mit | 0dab4acbf0b8c8c14bce3518cf47fb566a7e839d | bytedreamer/LollypopCatToy,bytedreamer/LollypopCatToy,bytedreamer/LollypopCatToy | static/js/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst Redis = require('ioredis');\n\nmodule.exports = url => {\n const redis = new Redis(url);\n\n redis.setJSON = async (...arguments) => {\n arguments[1] = JSON.stringify(arguments[1]);\n if (typeof arguments[2] === 'object' &... | javascript | edit | 0 | 5 | mit | 767e66816b18085e0ab553eb0368b34fa94e6547 | sharaal/dnode,sharaal/dnode | packages/redis/index.js | rejected_duplicate | Near-duplicate of sample 88902 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar gulp = require(\"gulp\");\nvar sass = require(\"gulp-sass\");\n\ngulp.task('sass', function () {\n gulp.src('src/hipster-grid-system.scss')\n .pipe(sass())\n .pipe(gulp.dest('dist'));\n});\n\n```\n\nApply this chang... | javascript | edit | 0 | 1 | mit | 4fcee02539bddc4c2b0079fa6f4e5707a6f887c6 | erdoganbulut/hipster-grid-system | gulpfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport DS from 'ember-data';\nimport OsfModel from 'ember-osf/models/osf-model';\n\n/**\n * @module ember-preprints\n * @submodule models\n */\n\n/**\n * Model for OSF APIv2 preprints. This model may be used with one of several API endp... | javascript | edit | 0 | 0 | apache-2.0 | be788cdbacab391543739cf651f2c5562cc04a85 | pattisdr/ember-preprints,baylee-d/ember-preprints,caneruguz/ember-preprints,CenterForOpenScience/ember-preprints,CenterForOpenScience/ember-preprints,laurenrevere/ember-preprints,baylee-d/ember-preprints,pattisdr/ember-preprints,laurenrevere/ember-preprints,caneruguz/ember-preprints,hmoco/ember-preprints,hmoco/ember-pr... | app/models/taxonomy.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst Command = require('../structures/command.js');\nconst request = require('request');\n\nmodule.exports = class TogetherTube extends Command {\n\n constructor(client) {\n super(client);\n this.name = \"togethertube\";\n th... | javascript | edit | 0 | 2 | mit | b361f2ca2d51038f00b64fba0cb96d1cf635dd55 | pedrofracassi/deku | commands/togethertube.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar url = require(\"url\");\nvar qs = require(\"qs\");\n\n/**\n * getNextLink\n * @function\n * @param {Object} response A response object returned from calling 'client.makeRequest'\n * @returns A parsed version of the link to the subse... | javascript | edit | 0 | 4 | mit | 5bf7329fdb2f67aceafc0f0b3e7265f0082d76e1 | bandwidthcom/node-bandwidth,bandwidthcom/node-bandwidth | lib/util.js | rejected_duplicate | Near-duplicate of sample 73343 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport patchNode from '../node/patch';\nimport Transaction from '../transaction';\nimport { CreateNodeHookCache, VTree } from '../util/types';\nimport globalThis from '../util/global';\n\n/**\n * Processes a set of patches onto a tracke... | javascript | edit | 0 | 5 | mit | 0688a80f86e0fcc36d861ccc53e347e5822f119c | tbranyen/diffhtml,tbranyen/diffhtml,tbranyen/diffhtml,tbranyen/diffhtml | packages/diffhtml/lib/tasks/patch-node.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Remove duplicate elements from array\n\nfunction removeDups(arr){\n var dupes ={},\n returnArray = [], \n el;\n\n for(var i =0; i<arr.length; i++){\n el = arr[i];\n if(!dupes[el]){\n returnArray.push(el);\n ... | javascript | edit | 0 | 3 | mit | a6509c1044bc53b22234ee3f935084989c59ea73 | dedurus/js-algos | src/remove-duplicate-elements.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport webpack from 'webpack';\nimport {BundleAnalyzerPlugin} from 'webpack-bundle-analyzer';\nimport config from '../webpack.config.prod';\n\nconfig.plugins.push(new BundleAnalyzerPlugin());\n\nconst compiler = webpack(config);\n\ncomp... | javascript | edit | 0 | 2 | mit | bd13289c96e95952696b392ff232c5e27333750c | coryhouse/react-slingshot,flibertigibet/react-redux-starter-kit-custom,flibertigibet/react-redux-starter-kit-custom,danpersa/remindmetolive-react,coryhouse/react-slingshot,danpersa/remindmetolive-react,danpersa/remindmetolive-react | tools/analyzeBundle.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport $ from 'jquery';\nimport Router from './util/router';\nimport common from './routes/Common';\nimport home from './routes/Home';\nimport about_us from './routes/About';\n\n// Import Bootstrap\nimport 'bootstrap/dist/js/umd/util.js... | javascript | edit | 0 | 1 | mit | 91363795e88b13f13bd15842039e2cf94e1e357f | agusgarcia/sage9,JulienMelissas/sage,mckelvey/sage,levito/kleineweile-wp-theme,ChrisLTD/sage,ChrisLTD/sage,skemantix/sage,PCHC/pharmacyresidency2017,generoi/sage,teaguecnelson/tn-tellis-bds,gkmurray/sage,NicBeltramelli/sage,skemantix/sage,ptrckvzn/sage,agusgarcia/sage9,sacredwebsite/sage,sacredwebsite/sage,c50/c50_root... | assets/scripts/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar geocoder = require('node-geocoder') (\"google\", \"https\", {\n\tapiKey: '<YOUR-KEY>'\n});\nvar csv = require('csv');\n\nprocess.stdin\n\t.pipe(csv.parse())\n\t.pipe(csv.transform(function(data, callback){\n\t\tsetImmediate(function... | javascript | edit | 0 | 2 | mit | 4f0e80b7dc2744c9527cebc5b9c99605f1f92f0a | jpenninkhof/geocoder | geocoder.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar parse = require('./parse');\nvar clean = require('./clean');\n\nmodule.exports = Engine = {};\n\nvar pythons = [];\nvar outputs = [];\nvar pythonNum = 0;\n\nEngine.runPython = function(operation, a, b, cb) {\n if (operation === 'lo... | javascript | edit | 0 | 5 | mit | 4ded0d94d560d9793af9b9d1e2cb17495aa5c111 | acjones617/scipy-node,acjones617/scipy-node | optimize/node/engine.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar gulp = require('gulp');\nvar shell = require('gulp-shell');\nvar tsc = require('gulp-tsc');\n\ngulp.task('build', function () {\n return gulp.src([\n './**/*.ts',\n '!./node_modules/**/*.ts'\n ])\n .pipe(tsc({\n ... | javascript | edit | 0 | 1 | apache-2.0 | 46d0b833d4bce66dd7f4a717cab9968bf113551c | SollmoStudio/beyond.ts,sgkim126/beyond.ts,SollmoStudio/beyond.ts,murmur76/beyond.js,noraesae/beyond.ts,sgkim126/beyond.ts,murmur76/beyond.ts,murmur76/beyond.js,murmur76/beyond.ts,noraesae/beyond.ts | gulpfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar config = {\n /** app mode **/\n mode: 'DEV',\n\n /** db name **/\n db: 'tiapp-exercise',\n\n /** android tablet minimum form factor **/\n tablet: {\n width: 899,\n height: 899\n },\n\n /** Actio... | javascript | edit | 0 | 0 | apache-2.0 | c395a70e473936bb0a4719d0b5d1cc03b8acf218 | geekzy/tiapp-como | Resources/app/config/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar grunt = require('grunt');\n\n/*\n ======== A Handy Little Nodeunit Reference ========\n https://github.com/caolan/nodeunit\n\n Test methods:\n test.expect(numAssertions)\n test.done()\n Test assertions:\n test.ok(va... | javascript | edit | 0 | 1 | mit | 912dcf904aac4e8730e3c45b2282d39e1c75170b | yuhualingfeng/grunt-autoprefixer,nqdy666/grunt-autoprefixer,nDmitry/grunt-autoprefixer | test/autoprefixer_test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { Mongo } from 'meteor/mongo';\nimport { SimpleSchema } from 'meteor/aldeed:simple-schema';\n\nclass ModuleFulfilmentCollection extends Mongo.Collection {\n insert(fulfilmentData, callBack){\n const fulfilmentDoc = fulfilment... | javascript | edit | 0 | 1 | mit | 39e7bfe0a481f598d9405081e6a7db0a375ba8ca | nus-mtp/nus-oracle,nus-mtp/nus-oracle | imports/api/database-controller/module-fulfilment/moduleFulfilment.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar gulp = require('gulp');\n\nvar options = {\n name: 'ec2prices',\n dependantFiles: ['node_modules/babel/browser-polyfill.js'],\n mainFiles: [\n 'app/scripts/app.es6',\n 'app/scripts/**/!(*.spec|*.mock).{js,e... | javascript | edit | 0 | 0 | mit | e6233ddf0d44b1d1086790e084ba2937e31b7480 | solarnz/ec2pric.es,solarnz/ec2pric.es,solarnz/ec2pric.es | gulpfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* jshint node: true */\n\nmodule.exports = function(environment) {\n return {};\n};\n```\n\nApply this change: Add usage instructions to config blueprint"
},
{
"role": "assistant",
"content": "/* jshint node: true */\n\n/*... | javascript | edit | 0 | 1 | mit | af9adbb32651ae83dba7522211e540a20d0fe01b | asakusuma/ember-local-config,asakusuma/ember-local-config | blueprints/local-config/files/__config__/__name__.local.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport normalizeArgs, { __RewireAPI__ as rewireAPI } from '../../../src/server/process/normalizeArgs';\n\ndescribe('normalizeArgs', () => {\n afterEach(() => {\n rewireAPI.__ResetDependency__('process');\n });\n\n it('sh... | javascript | edit | 0 | 1 | mit | 72db9a234093081be4b48fb9a1af73a5c2c4f5c0 | danistefanovic/hooka | test/server/process/normalizeArgs.spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport App from './app';\nimport 'babel-polyfill';\ncommon.app = new App(common);\ncommon.app.start();\n\n```\n\nApply this change: Remove babel-polyfill import in man.js"
},
{
"role": "assistant",
"content": "import App fro... | javascript | edit | 0 | 0 | mit | 6bba09d9f9946d3498d6b31112074cd07bc6fc86 | snphq/generator-sp,i-suhar/generator-sp,snphq/generator-sp,snphq/generator-sp,i-suhar/generator-sp,i-suhar/generator-sp | generators/app/templates/app/scripts/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Basic idea from Bojan Mihelac -\n// http://source.mihelac.org/2010/02/19/django-time-widget-custom-time-shortcuts/\n\n// Django imports jQuery into the admin site using noConflict(True)\n// We wrap this in an anonymous function to st... | javascript | edit | 0 | 4 | isc | 04a10e43de71a1f8ff19bf840ffc48dcf9e4e266 | CTPUG/wafer,CTPUG/wafer,CTPUG/wafer,CTPUG/wafer | wafer/static/js/scheduledatetime.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nformsAngular.filter('titleCase',[function() {\n return function(str, stripSpaces) {\n var value = str.replace(/(_|\\.)/g, ' ').replace(/[A-Z]/g, ' $&').replace(/\\w\\S*/g, function (txt) {\n return txt.charAt(0).toU... | javascript | edit | 0 | 2 | mit | 68a4152d6042284aed8db18f5f0403023d7938a0 | forms-angular/forms-angular,forms-angular/forms-angular,DerekDomino/forms-angular,DerekDomino/forms-angular,behzad88/forms-angular,forms-angular/forms-angular,b12consulting/forms-angular,b12consulting/forms-angular,DerekDomino/forms-angular,behzad88/forms-angular | app/js/filters/titlecase.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Em from 'ember';\nimport LlamaBodyCell from 'llama-table/components/llama-body-cell/component';\nimport layout from 'dummy/templates/components/button-cell';\nvar computed = Em.computed;\nvar gt = computed.gt;\nvar not = computed... | javascript | edit | 0 | 1 | mit | 6a26cf39c0ee32e58c73a1e8b5b62422e802e2e6 | luxbet/ember-cli-llama-table,j-/ember-cli-llama-table,luxbet/ember-cli-llama-table,j-/ember-cli-llama-table | tests/dummy/app/components/button-cell.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function (grunt) {\n\n grunt.initConfig({\n nodewebkit: {\n options: {\n platforms: ['win', 'osx'],\n buildDir: './build',\n version: '0.12.1'\n ... | javascript | edit | 0 | 1 | mit | 4c6048b04acc62d35502739d4bf1938fd92f7240 | tnilles/basalt,tnilles/basalt | 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 grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n jshint: {\n files: ['Gruntfile.js', 'lib/**/*.js'],\n options: {\n globalstrict: true,\n ... | javascript | edit | 0 | 1 | mit | 31da6e2c375d4eec9b4056b05939ebe496915a67 | imdone/imdone-core,imdone/imdone-core | Gruntfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nconst apiRequest = require( \"../../src/token/api-request\" );\nconst storeToken = require( \"../../src/token/store-token\" );\nconst Promise = require( \"bluebird\" );\nconst expect = require( \"expect.js\" );\nconst... | javascript | edit | 0 | 1 | mit | 7dffff7f5706c4816855a638a33dca5d271915f2 | FagnerMartinsBrack/talk-mocking-and-false-positives,FagnerMartinsBrack/talk-mocking-and-false-positives | app/test/token/store-token-generative.spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = function(grunt) {\n\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n jshint: {\n allFiles: ['Gruntfile.js', 'lib/**/*.js', 'test/**/*.js', 'index.js'],\n ... | javascript | edit | 0 | 2 | apache-2.0 | 18590218bc4096b10bb5aade82e5c83af41768ea | xmpp-ftw/xmpp-ftw-wtf | Gruntfile.js | rejected_duplicate | Near-duplicate of sample 72000 | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.