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'use strict';\n\n$(document).ready(() => {\n\t$('.new').click((event) => {\n\t\tevent.preventDefault();\n\t\t\n\n\n});\n\n// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed be... | javascript | edit | 0 | 1 | mit | 4f8eee87a64f675a4f33ff006cf2f059a47d6267 | dshaps10/snippet,dshaps10/snippet,dshaps10/snippet | app/assets/javascripts/application.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport gulp from 'gulp';\nimport requireDir from 'require-dir';\nimport runSequence from 'run-sequence';\n\n// Require individual tasks\nrequireDir('./gulp/tasks', { recurse: true });\n\ngulp.task('default', ['dev']);\n\ngulp.task('dev'... | javascript | edit | 0 | 1 | mit | 248f547f7fe9c9cfab0d76088fb188ac379ab2fb | MusikAnimal/WikiEduDashboard,Wowu/WikiEduDashboard,MusikAnimal/WikiEduDashboard,KarmaHater/WikiEduDashboard,KarmaHater/WikiEduDashboard,alpha721/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,majakomel/WikiEduDashboard,Wowu/WikiEduDashboard,majakomel/WikiEduDashboard,Wowu/WikiEduDashboard,WikiEducationFounda... | gulpfile.babel.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport md5 from 'md5';\n\nexport default class GravatarImageRetriever {\n constructor(picturePxSize) {\n this.picturePxSize = picturePxSize;\n }\n\n getImageUrl(email) {\n // https://en.gravatar.com/site/implement/hash/\n if... | javascript | edit | 0 | 2 | mit | 21e4abd8902165863e0d9acd49b4402f5341ed15 | ritterim/star-orgs,ritterim/star-orgs | src/client/gravatar-image-retriever.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { Col, Row } from \"react-bootstrap\";\n\nimport { byteSize } from \"../../utils\";\nimport { Icon, ListGroupItem, RelativeTime } from \"../../base\";\n\nexport... | javascript | edit | 0 | 2 | mit | 5f56c522c4d3b2981e6d10b99bbe065e85d37ac4 | virtool/virtool,igboyes/virtool,virtool/virtool,igboyes/virtool | client/src/js/files/components/File.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport gql from 'graphql-tag';\nimport { graphql } from 'react-apollo';\nimport { getFragment } from 'meteor/vulcan:core';\n\nexport const withContinueReading = component => {\n // FIXME: For some unclear reason, using a ...fragment in... | javascript | edit | 0 | 1 | mit | a0aa49e9d906a644f8eae3ae85bb83a1d7bbcdde | Discordius/Telescope,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Telescope | packages/lesswrong/components/recommendations/withContinueReading.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { PropTypes, Component } from 'react'\nimport moment from 'moment'\n\nimport eventActions from '../actions/eventActionCreators'\n\nconst TIME_INIT = moment('2190-07-02').utc()\nconst DELAY = 250\n\nclass Time extends Compo... | javascript | edit | 0 | 2 | mit | 5da4c6e6ad78987f74a073ba5316a299071c0006 | albertoblaz/lord-commander,albertoblaz/lord-commander | src/components/Time.js | rejected_duplicate | Near-duplicate of sample 95834 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function(grunt) {\n grunt.loadNpmTasks(\"grunt-mocha-test\");\n grunt.loadNpmTasks(\"grunt-mocha-istanbul\");\n\n var testOutputLocation = process.env.CIRCLE_TEST_REPORTS || \"test_output\";\n var artifactsL... | javascript | edit | 0 | 3 | mit | 831a03abb4e72f2e8fee2dcb1d33c41c6f4e29f6 | thullSL/todo-angular-grad,seanworkcode/todo-grad-impl,thullSL/todo-grad-project,jdhodges431/todo-grad-project,jamiemorris1991/todo-grad-project,thullSL/todo-angular-grad,jdhodges431/todo-grad-project,WPFerg/todo-grad-project,jamiemorris1991/todo-grad-project,stevenjob/todo-grad-project,JMVHill/todo-grad-project,RMcNeil... | Gruntfile.js | rejected_duplicate | Near-duplicate of sample 76600 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport {\n setupTokenEditor,\n setTokenEditorValue,\n useDefaultToken\n} from '../editor';\nimport { getParameterByName } from '../utils.js';\nimport { publicKeyTextArea } from './dom-elements.js';\n\n/* For initialization, look at t... | javascript | edit | 0 | 3 | mit | c343c6ee7fb3c2f545b082c06c21f3fbb93a4585 | nov/jsonwebtoken.github.io,simo5/jsonwebtoken.github.io,simo5/jsonwebtoken.github.io,nov/jsonwebtoken.github.io | src/extension/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport angular from 'angular';\nimport Dogs from './dogs/dogs';\nimport DogProfile from './dog-profile/dog-profile';\nimport Users from './users/users';\nimport DogPost from './dog-post/dog-post';\nimport UserPost from './user-post/user... | javascript | edit | 0 | 0 | apache-2.0 | d48742aa5a3002b347cf284ea28777a91d300f1b | nickpeleh/dogs-book,nickpeleh/dogs-book | client/app/components/components.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(document).ready(function() {\n $(\"[data-autocomplete-source]\").each(function() {\n var url = $(this).data(\"autocomplete-source\");\n var target = $(this).data(\"autocomplete-rel\");\n $(this).autocomplete({\n minLeng... | javascript | edit | 0 | 1 | mit | 65bfe55ca0448dc941739deea117347798807fc9 | airslie/renalware-core,airslie/renalware-core,airslie/renalware-core,airslie/renalware-core | app/assets/javascripts/patient_auto_complete.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function(grunt) {\n grunt.registerTask(\"default\", [\"test-server\", \"test-client\"]);\n grunt.registerTask(\"test-client\", function() {\n var done = this.async();\n grunt.util.spawn({cmd: \"node\... | javascript | edit | 0 | 1 | apache-2.0 | 8afb86988829ead1404efdfa4bccf77fb983a08e | vibe-project/vibe-protocol | Gruntfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nchrome.tabs.onCreated.addListener(function(tab) {\n\tconsole.log(\"Tab Created\", tab);\n});\n\nchrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) {\n\tconsole.log(\"Tab changed: #\" + tabId, changeInfo, tab );\n});\n\nc... | javascript | edit | 0 | 1 | bsd-3-clause | a8dc6903bbeb207b63fcde2f318501d27052ec07 | rex/BANTP | js/background.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'],\n opt... | javascript | edit | 0 | 2 | apache-2.0 | d8a2c541823fad0a5d1458a08e991ca4cc7fd216 | xmpp-ftw/xmpp-ftw | Gruntfile.js | rejected_duplicate | Near-duplicate of sample 89974 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport isOffsetContainer from './isOffsetContainer';\n\nexport default function findCommonOffsetParent(element1, element2) {\n const range = document.createRange();\n if (element1.compareDocumentPosition(element2) & Node.DOCUMENT_... | javascript | edit | 0 | 7 | mit | 26e8ca7ae9a2e4123886c5cbbb549c76219473d0 | imkremen/popper.js,imkremen/popper.js | src/popper/utils/findCommonOffsetParent.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function(grunt) {\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'), // the package file to use\n\n qunit: { // internal task or name of a plugin (like \"qunit\")\n all: ['js/te... | javascript | edit | 0 | 1 | bsd-2-clause | b3138e99e44b96027ed4d1d3ffdc146d49bb52d2 | rtfb/rtfblog,rtfb/rtfblog,rtfb/rtfblog,rtfb/rtfblog,rtfb/rtfblog | Gruntfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function (grunt) {\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n clean: ['.tmp'],\n babel: {\n options: {\n sourceMap: true\n },\n dist: {\n file... | javascript | edit | 0 | 1 | mit | 2c001cfd50d80bae25de6adce09a11926de9a991 | khornberg/simplenote | Gruntfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * generator-init\n * https://github.com/use-init/generator-init\n *\n */\n\n'use strict';\n\nmodule.exports = function (grunt) {\n // Load all grunt tasks matching the `grunt-*` pattern.\n require('load-grunt-tasks')(grunt);\n\n ... | javascript | edit | 0 | 1 | mit | c8656f406dcefc83c8eec14a6607c7f334f37607 | use-init/generator-init,use-init/generator-init | Gruntfile.js | rejected_duplicate | Near-duplicate of sample 80756 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function(grunt) {\n 'use strict';\n grunt.initConfig({\n benchmark: {\n all: {\n src: ['benchmarks/*.js'],\n options: { times: 10 }\n }\n },\n nodeunit: {\n files: ['test/*_test.j... | javascript | edit | 0 | 2 | mit | f0299893c99537b1d23c54fbdbd04b463a6eed26 | modulexcite/gaze,prodatakey/gaze,prodatakey/gaze,shama/gaze,modulexcite/gaze,chebum/gaze,bevacqua/gaze,bevacqua/gaze,modulexcite/gaze,bevacqua/gaze,prodatakey/gaze | Gruntfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport intelLogger from 'intel'\nimport joi from 'joi'\nimport { validateObject } from '../../core'\n\n/**\n * Returns config data and its schema\n * @param {Object} env\n * @returns {SchemedData}\n */\nfunction getConfig(env) {\n\n ... | javascript | edit | 0 | 1 | apache-2.0 | 34080a9b4d3835b0cde39503ab2c1ab48e7c06ab | labs42/appi | src/components/logger/logger.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nOccasion.Modules.push(function(library) {\n library.TimeSlot = class TimeSlot extends library.Base {};\n\n library.TimeSlot.className = 'TimeSlot';\n library.TimeSlot.queryName = 'time_slots';\n\n library.TimeSlot.belongsTo('product... | javascript | edit | 0 | 2 | mit | 9ba3095bdc0a81a1546634160f2a20c3a0196d51 | nicklandgrebe/occasion-sdk-js | src/time_slot.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Copyright (c) Martin Costello, 2017. All rights reserved.\n// Licensed under the Apache 2.0 license. See the LICENSE file in the project root for full license information.\n\n\"use strict\";\n\nvar appInsights = require(\"application... | javascript | edit | 0 | 2 | apache-2.0 | 1f71f06920d43c2c8ff3b670e9355033eaed7f11 | martincostello/alexa-london-travel | src/telemetry.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst mongoose = require('mongoose');\n\nconst reminderSchema = new mongoose.Schema({\n user_address: { type: Object, required: true, index: true },\n value: { type: String, required: true },\n expiration: { type: Date, require... | javascript | edit | 0 | 0 | mit | b447e585b0c77739315677deb367140184d24a17 | sebsylvester/reminder-bot | src/models/reminder.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Copyright 2015 Fabian Dietenberger\n\n'use-strict'\n\nvar q = require('q'),\n request = require('request');\n\nvar hypemResolver = {};\n\nhypemResolver.getUrl = function (hypemUrl) {\n var resultUrl = \"\";\n return resultU... | javascript | edit | 0 | 1 | mit | 795bdb81899bff86df89174ceeaa5173999a7de2 | feedm3/hypem-resolver | hypem-resolver.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst io = require('socket.io'),\n winston = require('winston');\n\nwinston.remove(winston.transports.Console);\nwinston.add(winston.transports.Console, {'timestamp': true});\n\nconst PORT = 3031;\n\nwinston.info('Rupture real-time... | javascript | edit | 0 | 1 | mit | 9fad0a8e69069226f4d7efeec98410e453044ba8 | dimriou/rupture,esarafianou/rupture,dionyziz/rupture,dimriou/rupture,dionyziz/rupture,dimriou/rupture,esarafianou/rupture,esarafianou/rupture,dimkarakostas/rupture,dionyziz/rupture,esarafianou/rupture,dionyziz/rupture,dimriou/rupture,dimkarakostas/rupture,dimkarakostas/rupture,dimkarakostas/rupture,dimkarakostas/ruptur... | realtime/index.js | rejected_duplicate | Near-duplicate of sample 75067 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar util = require('util');\nvar yeoman = require('yeoman-generator');\n\nvar Generator = module.exports = function () {\n\tvar cb = this.async();\n\tvar ignores = [\n\t\t'.git',\n\t\t'CHANGELOG.md',\n\t\t'CONTRIBUTING.... | javascript | edit | 0 | 2 | mit | 5620dd2921b534e1328c9305c66c254d04131797 | h5bp/generator-h5bp | app/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(document).ready(function() {\n if (window.taskData) {\n var taskInstructionsHtml = $('#taskIntro').html();\n\n var hints = $('#taskHints > div').toArray().map(elm => {\n return {\n content: elm.innerHTML.trim()\n ... | javascript | edit | 0 | 7 | mit | bf8c61e6c9b6206fc496488cd6faced7f12dd5c5 | France-ioi/bebras-modules,France-ioi/bebras-modules | ext/codecast/7.1/codecast-loader.js | rejected_duplicate | Near-duplicate of sample 75801 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar util = require('util');\n\nvar log = require('minilog')('http');\n\nmodule.exports = function requestLogger(req, res, next) {\n\n //\n // Pretty much copypasta from\n // https://github.com/senchalabs/connect/blob/master/lib/middl... | javascript | edit | 0 | 3 | mit | 09bff03f5f74939ef6551625f2c453419f845c61 | chrismoulton/wzrd.in,rstr74/wzrd.in,jfhbrook/wzrd.in,jfhbrook/browserify-cdn,rstr74/wzrd.in,jfhbrook/wzrd.in,jfhbrook/browserify-cdn,tsatse/browserify-cdn,wraithgar/wzrd.in,tsatse/browserify-cdn,chrismoulton/wzrd.in,wraithgar/wzrd.in | request-logger.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n// MODULES //\n\nvar isInteger = require( '@stdlib/assert/is-integer' ).isPrimitive;\n\n\n// FUNCTIONS //\n\n/**\n* Returns an array element.\n*\n* @private\n* @param {integer} i - index for first dimension\n* @param {i... | javascript | edit | 0 | 3 | apache-2.0 | f3f2ed4622828fdce9ca809e32939548267cf406 | stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib | lib/node_modules/@stdlib/types/ndarray/ctor/lib/get2d.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function(){\n\n function close() {\n $('.md-show .md-close').click();\n }\n\n function clean() {\n $('.md-show input[name=\"name\"]').val(''),\n $('.md-show input[name=\"email\"]').val(''),\n $('.md-show input[name=\"pho... | javascript | edit | 0 | 4 | apache-2.0 | 2eb63b132d4ecd0c78998c716139298862319460 | arthurbailao/gama-demo,arthurbailao/gama-demo | public/js/identify.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { createReducer } from 'redux-starter-kit';\nimport {\n UPDATE,\n} from '../actiontypes';\n\nconst passwordReducer = createReducer(null, {\n [UPDATE]: (state, action) => {\n if (!(action.payload && action.payload.pas... | javascript | edit | 0 | 3 | apache-2.0 | cf73385957d54ef0c808aa69e261fe57b87cb7f9 | steinarb/ukelonn,steinarb/ukelonn,steinarb/ukelonn | ukelonn.web.frontend/src/main/frontend/reducers/passwordReducer.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction Person(name)\n{\n\tthis.name = name;\n\tthis.parent = null;\n\tthis.children = [];\n\tthis.siblings = [];\n\t\n\tthis.getChildren = function () \n\t{\n\t\treturn this.children;\t\n\t}\n};\n\nvar Nancy = new Person(\"Nancy\")\nv... | javascript | edit | 0 | 1 | mit | 7df02298180fcd94019506f363392c48e0fe21cf | Nilaco/Family-Tree,Nilaco/Family-Tree | app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar autoprefixer = require('autoprefixer-core');\n\nmodule.exports = function(less) {\n function AutoprefixProcessor(options) {\n this.options = options || {};\n };\n\n AutoprefixProcessor.prototype = {\n process:... | javascript | edit | 0 | 5 | apache-2.0 | 7aee442d3b12698bb027c747a11719a075d9c586 | less/less-plugin-autoprefix,PixnBits/less-plugin-autoprefix | lib/autoprefix-processor.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nlet pgp = require('pg-promise')({ssl: true});\n// let databaseUrl = process.env.DATABASE_URL || require('./config');\n\n// module.exports = pgp(databaseUrl);\n\n\n```\n\nApply this change: Delete initialization options and change variab... | javascript | edit | 0 | 0 | mit | ea015fcb266ab4287e583bed76bf5fbbb62205e5 | SentinelsOfMagic/SentinelsOfMagic | database/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nconst {media_breakpoints} = require(\"./static/js/css_variables\");\n\nmodule.exports = {\n plugins: {\n // Warning: despite appearances, order is significant\n \"postcss-nested\": {},\n \"post... | javascript | edit | 0 | 0 | apache-2.0 | 62188e803684cb8b7cf965a895da23bc583b83a5 | eeshangarg/zulip,kou/zulip,kou/zulip,kou/zulip,andersk/zulip,zulip/zulip,rht/zulip,kou/zulip,andersk/zulip,eeshangarg/zulip,rht/zulip,rht/zulip,rht/zulip,zulip/zulip,zulip/zulip,eeshangarg/zulip,eeshangarg/zulip,rht/zulip,zulip/zulip,andersk/zulip,rht/zulip,andersk/zulip,zulip/zulip,rht/zulip,zulip/zulip,zulip/zulip,ko... | postcss.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nvar imgWidth = new Array();\n\nfunction imageWidth()\n{\n var width = $(window).width() - fixedPadding;\n $(\".img_flex\").each(function(index)\n {\n if (width != $(this).width())\n {\n if (width < im... | javascript | edit | 0 | 3 | mit | 55a531708dfcf895433ce9abaf2c11fe9635df14 | hernantas/MangaReader,hernantas/MangaReader,hernantas/MangaReader | public/js/read.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { storiesOf } from '@storybook/react';\nimport Autocomplete from '../src/Autocomplete';\n\nconst stories = storiesOf('javascript/Autocomplete', module);\n\nstories.addParameters({\n info: {\n text:... | javascript | edit | 0 | 1 | mit | 8be4bc9543ba1f23019d619c822bc7e4769e22da | react-materialize/react-materialize,react-materialize/react-materialize,react-materialize/react-materialize | stories/Autocomplete.stories.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\nThis Angular module provide interface to VNDIRECT API, include:\n- Auth API\n- Trade API\n*/\n\nangular.module('myApp.tradeapi', [])\n\n.factory('tradeapi', ['$http', function($http) {\n var AUTH_URL = 'https://auth-api.vndirect... | javascript | edit | 0 | 2 | mit | ef090c4c1b819b2df89ec50a855260decdf5ace0 | VNDIRECT/SmartP,VNDIRECT/SmartP | app/tradeapi/tradeapi.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * Copyright 2011 Rackspace\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 License at\n *\n * ... | javascript | edit | 0 | 1 | apache-2.0 | d299ceac7d3d115266a8f45a14f1fd9f42cea883 | racker/node-elementtree | tests/test-simple.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport SockJS from 'sockjs-client'\nimport Stomp from 'webstomp-client'\nconst wsURL = 'http://localhost:8080/seven-wonders-websocket'\n\nconst createConnection = (headers = {}) => new Promise((resolve, reject) => {\n let socket = St... | javascript | edit | 0 | 1 | mit | b5a460ecc35dc5609339317337d467368d7593bb | luxons/seven-wonders,luxons/seven-wonders,luxons/seven-wonders | frontend/src/utils/createWebSocketConnection.js | rejected_duplicate | Near-duplicate of sample 78397 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nimport React from \"react\";\nimport { Route } from \"react-router\";\nimport {\n View as TAView\n} from \"ui-components/type_admin\";\nimport Item from \"./Item\";\nimport List from \"./List\";\n\nconst routes = [\n <Route\n ... | javascript | edit | 0 | 0 | mit | f8c3893888e1cd5d8b31e4621fe6c04b3343bfce | Combitech/codefarm,Combitech/codefarm,Combitech/codefarm | src/app/UI/lib/managers/statistics/client/components/routes.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { c } from 'ttag';\nimport { Loader, Alert, PrimaryButton, useFolders, useModals } from 'react-components';\n\nimport FolderTreeViewList from './FolderTreeViewList';\nimport EditLabelModal from './moda... | javascript | edit | 0 | 3 | mit | 2162a6463b14f8cf4f78c964aca248828bed5faf | ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient | packages/components/containers/labels/FoldersSection.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport moment from 'moment';\nclass NavbarController {\n constructor() {\n this.name = 'navbar';\n }\n\n $onInit(){\n this.moment = moment().format('dddd HH:mm');\n\n this.updateDate();\n\n this.user =\n {\n n... | javascript | edit | 0 | 1 | apache-2.0 | 6e72bc8a412b0ba8dc648d80a6d433c282496f16 | ctwhome/studylist,ctwhome/studylist | client/app/common/navbar/navbar.controller.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nconst path = require('path');\nconst Sails = require('sails');\nconst _ = require('lodash');\n\nmodule.exports = function (grunt) {\n grunt.registerTask('cron', async function (...args) {\n const done = this... | javascript | edit | 0 | 6 | mit | be284e8f6e0a72ae58d861a26f8bd748dfbad156 | scientilla/scientilla,scientilla/scientilla,scientilla/scientilla | tasks/register/cron.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport M_Gizmo from './M_Gizmo';\nimport Arrow from '../../../low_level/primitives/Arrow';\nimport ClassicMaterial from '../../../low_level/materials/ClassicMaterial';\nimport M_Mesh from '../meshes/M_Mesh';\nimport Vector4 from '../../... | javascript | edit | 0 | 1 | mit | 16ae1fcedba350a023ed866413cea05d2a3cd8c5 | emadurandal/GLBoost,emadurandal/GLBoost,cx20/GLBoost,cx20/GLBoost,emadurandal/GLBoost,cx20/GLBoost | src/js/middle_level/elements/gizmos/M_DirectionalLightGizmo.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\npo.d3TopoJson = function(fetch) {\n if (!arguments.length) fetch = po.queue.json;\n\n var topoToGeo = function(url, callback) {\n function convert(topology, object, layer, features) {\n if (object.type == \"GeometryCollection\... | javascript | edit | 0 | 4 | bsd-3-clause | d6ab81e3e201e08004aee6ec30d4cf0d85678886 | dillan/mapsense.js,RavishankarDuMCA10/mapsense.js,sfchronicle/mapsense.js,manueltimita/mapsense.js,cksachdev/mapsense.js,mapsense/mapsense.js,shkfnly/mapsense.js,Laurian/mapsense.js,gimlids/mapsense.js | src/D3TopoJson.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nwindow.addEventListener('load', function(){\n\n // touchstart\n\n module('touchstart', environment);\n\n test('should respond to touchstart', 1, function() {\n listen('touchstart').trigger('mousedown');\n });\n\n /... | javascript | edit | 0 | 1 | mit | 97e1d783d9a09dca204dff19bf046fc0af198643 | mwbrooks/thumbs.js,pyrinelaw/thumbs.js,pyrinelaw/thumbs.js | test/js/thumbs_test.js | rejected_duplicate | Near-duplicate of sample 82998 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst Promise = require('bluebird');\n\nconst glob = Promise.promisify(require('glob'));\nconst mkdirp = Promise.promisify(require('mkdirp'));\nconst path = require('path');\nconst fs = require('fs');\nconst mu = requir... | javascript | edit | 0 | 2 | mit | fbc38523508db2201e6f1c136640f560a77b7282 | UKHomeOfficeForms/hof-generator,UKHomeOfficeForms/hof-generator | lib/utils/copy.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar _ = require('underscore');\nvar UserContainer = require('../lib/authentication/user-container');\nvar assert = require('chai').assert;\n\ndescribe('tests of garbage collecting of outdated cookies', function() {\n\n var responseMock... | javascript | edit | 0 | 1 | mit | 670a5e6d50f69def9444b179dc62c18689463f6e | cargomedia/pulsar-rest-api,njam/pulsar-rest-api,cargomedia/pulsar-rest-api,vogdb/pulsar-rest-api,njam/pulsar-rest-api,njam/pulsar-rest-api,vogdb/pulsar-rest-api,cargomedia/pulsar-rest-api,njam/pulsar-rest-api,vogdb/pulsar-rest-api,cargomedia/pulsar-rest-api | test/user-container.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar R = require('ramda');\n\n/**\n * Output a block (or its inverse) based on whether or not both of the suppied\n * arguments are truthy.\n *\n * @since v0.0.1\n * @param {*} left\n * @param {*} right\n * @param {Objec... | javascript | edit | 0 | 3 | mit | 5f3d0240de0f8dcc5abfc8962e4a1ce9ab629b83 | cloudfour/core-hbs-helpers | lib/and.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar game = new Phaser.Game(600, 800, Phaser.AUTO, '', {preload: preload, create: create, update: update});\r\n\r\nfunction preload() {\r\n game.load.image('player', 'assets/player.png');\r\n}\r\n\r\nvar player;\r\nfunction create() {\r... | javascript | edit | 0 | 5 | mit | 49adc111cd02ea1d1d22281f172fda0819876970 | Acaki/WWW_project,Acaki/WWW_project,Acaki/WWW_project | main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint no-console: 0 */\n'use strict';\n\nconst irc = require('irc');\n\nconst server = process.env.IRC_SERVER;\nconst user = process.env.IRC_USER;\nconst channel = process.env.IRC_CHANNEL;\n\nconst client = module.exports.client = n... | javascript | edit | 0 | 2 | mit | cb840a02a3485054642364742bc157b0c02d5c59 | Starefossen/jenkins-monitor | lib/irc.js | rejected_duplicate | Near-duplicate of sample 76745 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst program = require('commander');\n\nprogram\n .version('1.0.0')\n .option('-p, --port <port>', 'specify the websocket port to listen to [9870]', 9870)\n .parse(process.argv);\n\n\nconst io = require('socket.io'),\n wi... | javascript | edit | 0 | 1 | mit | b344ff88babd7ef982d54e46c969b2420026621d | dimkarakostas/unimeet,dimkarakostas/unimeet,dimkarakostas/unimeet,dimkarakostas/unimeet | hall/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar React = require(\"react\");\n\nmodule.exports = {\n propTypes: {\n flux: React.PropTypes.object\n },\n\n childContextTypes: {\n flux: React.PropTypes.object\n },\n\n contextTypes: {\n flux: React.PropTypes.object\n },... | javascript | edit | 0 | 1 | mit | 11ec2067d683564efe69793ee2345e05d8264e94 | alcedo/fluxxor,dantman/fluxxor,chimpinano/fluxxor,nagyistoce/fluxxor,VincentHoang/fluxxor,vsakaria/fluxxor,dantman/fluxxor,nagyistoce/fluxxor,davesag/fluxxor,hoanglamhuynh/fluxxor,demiazz/fluxxor,davesag/fluxxor,BinaryMuse/fluxxor,dantman/fluxxor,davesag/fluxxor,VincentHoang/fluxxor,hoanglamhuynh/fluxxor,STRML/fluxxor,... | lib/flux_mixin.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n Contains core methods and classes for Orbit.js\n\n @module orbit\n @main orbit\n */\n\n// Prototype extensions\nif (!Array.prototype.forEach) {\n Array.prototype.forEach = function (fn, scope) {\n var i, len;\n for (i = 0, ... | javascript | edit | 0 | 0 | mit | 7d566b878a58ec91c2f88e3bd58ff5d7ec9b41df | greyhwndz/orbit.js,orbitjs/orbit.js,orbitjs/orbit-core,lytbulb/orbit.js,opsb/orbit.js,opsb/orbit.js,rollokb/orbit.js,lytbulb/orbit.js,ProlificLab/orbit.js,SmuliS/orbit.js,orbitjs/orbit.js,rollokb/orbit.js,jpvanhal/orbit.js,greyhwndz/orbit.js,beni55/orbit.js,jpvanhal/orbit.js,ProlificLab/orbit.js,SmuliS/orbit.js,beni55/... | lib/orbit/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Router = require('express').Router;\n\nvar keyed = ['get', 'read', 'put', 'patch', 'update', 'del', 'delete'],\n\tmap = { index:'get', list:'get', read:'get', create:'post', update:'put', modify:'patch' };\n\nmodule.exports = functi... | javascript | edit | 0 | 8 | bsd-3-clause | 929e85200848bb9974eb480efa9945c6af3250f4 | developit/resource-router-middleware | resource-router-middleware.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar WebSocket = require('faye-websocket'),\n http = require('http'),\n reject = require('lodash/collection/reject'),\n without = require('lodash/array/without');\n\nmodule.exports = function (config) {\n var server =... | javascript | edit | 0 | 2 | apache-2.0 | bf53c204ee379a7e4d2c289f6db4848d23a79aca | mediascape/euromeme,mediascape/euromeme,mediascape/euromeme,mediascape/euromeme,mediascape/euromeme,mediascape/euromeme | tv-bridge/lib/relay.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nvar contentType = require('../middleware/contentType'),\n config = require('../config');\n\nfunction apiRoot(req, res) {\n var root = config.get('apiEndpoint');\n var answer = {\n motd: 'Welcome to the NGP VAN OSDI Service!',\... | javascript | edit | 0 | 1 | apache-2.0 | 3f32dd2bede0cb23f5453891d7b92a83e90c2d71 | NGPVAN/osdi-service,joshco/osdi-service | routes/apiRoot.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar es = require('event-stream'),\n\tpath = require('path'),\n\tzlib = require('zlib');\n\nvar compressibles = [\n\t'.js',\n\t'.json',\n\t'.css',\n\t'.html'\n];\n\nfunction isCompressibleFile( file ) {\n\tvar ext = path... | javascript | edit | 0 | 2 | apache-2.0 | 2d01b049d395b634a41d22360a12f83ed6d41bda | j3parker/frau-publisher,j3parker/frau-publisher | src/compressor.js | rejected_duplicate | Near-duplicate of sample 93915 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport NodePatcher from './../../../patchers/NodePatcher.js';\n\nexport default class SoakedMemberAccessOpPatcher extends NodePatcher {\n patchAsExpression() {\n\n }\n\n patchAsStatement() {\n this.patchAsExpression();\n }\n}\n\n... | javascript | edit | 0 | 1 | mit | fbf98e6125a702a63857688cfa07fefa6791a909 | decaffeinate/decaffeinate,alangpierce/decaffeinate,decaffeinate/decaffeinate,eventualbuddha/decaffeinate,alangpierce/decaffeinate,eventualbuddha/decaffeinate,alangpierce/decaffeinate | src/stages/main/patchers/SoakedMemberAccessOpPatcher.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports.movePlugins = function (src, dest) {\n var exec = require('child_process').exec\n console.log(`Copying ${src} to ${dest}`)\n exec(`rm -rf ${dest}${src}`, function (error) {\n if (error) {\n console.error(`exec ... | javascript | edit | 0 | 2 | mit | 666e5e1efa16941ac7ded51444b566a0d5faedd1 | Lamassau/PiTrol,Lamassau/PiTrol,AlhasanIQ/PiTrol,fadeenk/PiTrol,fadeenk/PiTrol,AlhasanIQ/PiTrol | move-plugins/moveplugins.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\ndefine(['ChoPidoTurnos'], function(ChoPidoTurnos) {\n function DoctorProfileCtrl(doctorsService) {\n return {\n '$onInit': function () {\n var _this = this;\n\n doctorsService\n .getUserR... | javascript | edit | 0 | 2 | mit | 2a7e347e4f2f08faf84ce745ae8e611ced216421 | jsuarezb/paw-2016-4,jsuarezb/paw-2016-4,jsuarezb/paw-2016-4,jsuarezb/paw-2016-4 | webapp/src/main/frontend/app/scripts/components/doctorProfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nangular.module(\"Prometheus.services\").factory('AnnotationRefresher', [\"$http\", function($http) {\n return function(graph, scope) {\n var tags = graph.tags.map(function(e) {\n if (e.name) {\n return e.name.split(\",\"... | javascript | edit | 0 | 3 | apache-2.0 | f0d2f99dbdd764915efd138361f815e86a3d2210 | alonpeer/promdash,lborguetti/promdash,jonnenauha/promdash,lborguetti/promdash,lborguetti/promdash,jonnenauha/promdash,jmptrader/promdash,alonpeer/promdash,thooams/promdash,jonnenauha/promdash,prometheus/promdash,prometheus/promdash,juliusv/promdash,juliusv/promdash,jmptrader/promdash,juliusv/promdash,jmptrader/promdash... | app/assets/javascripts/angular/services/annotation_refresher.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport ClipboardJS from 'clipboard';\n\nexport default class CopyButton extends React.PureComponent {\n constructor(props) {\n super(props);\n this.btnRef = React.createRef();\n this.clipboardRef = ... | javascript | edit | 0 | 1 | mit | eaf69c1a63c41db025a65d87e104390deb6db591 | cofacts/rumors-site,cofacts/rumors-site | components/CopyButton.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nangular.module(\"Prometheus.services\").factory('AnnotationRefresher', [\"$http\", function($http) {\n return function(graph, scope) {\n var tags = graph.tags.map(function(e) {\n if (e.name) {\n return e.name.split(\",\"... | javascript | edit | 0 | 3 | apache-2.0 | 1896a56db306f7cadfc004373839887ce6b3c5cd | prometheus/promdash,prometheus/promdash,thooams/promdash,lborguetti/promdash,jmptrader/promdash,juliusv/promdash,jonnenauha/promdash,lborguetti/promdash,lborguetti/promdash,jmptrader/promdash,prometheus/promdash,jmptrader/promdash,juliusv/promdash,juliusv/promdash,thooams/promdash,jonnenauha/promdash,lborguetti/promdas... | app/assets/javascripts/angular/services/annotation_refresher.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexports.onClientEntry = () => {\n (() => {\n function OptanonWrapper() { } // eslint-disable-line no-unused-vars\n })();\n};\n\n```\n\nApply this change: [MARKENG-156] Add function to start at top of new page unless window.location... | javascript | edit | 0 | 2 | apache-2.0 | efda627489ccfa3bc6e3f64a40623da2d62ee316 | postmanlabs/postman-docs,postmanlabs/postman-docs | gatsby-browser.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nexports.register = function (callback) {\n var commands = [{\n name : 'hello',\n desc : 'print Hello, John',\n options : {\n wizard : false,\n params : {\n required: 'name',\n opt... | javascript | edit | 0 | 2 | mit | ce79d7a652564fed3b86000e9c295f00f28e5223 | Xcraft-Inc/shellcraft.js | examples/myShellExtension.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { Base } from 'yeoman-generator';\nimport generatorArguments from './arguments';\nimport generatorOptions from './options';\nimport generatorSteps from './steps';\n\nexport default class HookGenerator extends Base {\n constructo... | javascript | edit | 0 | 1 | mit | ced84f283761f38156960f2d8e001ba6f3cd2b08 | tnunes/generator-trails,IncoCode/generator-sails-rest-api,ghaiklor/generator-sails-rest-api,jaumard/generator-trails,konstantinzolotarev/generator-trails,italoag/generator-sails-rest-api,italoag/generator-sails-rest-api,ghaiklor/generator-sails-rest-api | src/hook/index.js | rejected_duplicate | Near-duplicate of sample 108243 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar PropagatorMethods = {\n attach: function(component) {\n var target = component;\n for (var i = 0, len = this._.components.length; i < len; i++) {\n if (this._.components[i] === component) return;\n }\... | javascript | edit | 0 | 3 | mit | 65a50b9a92299366e37a412d99b1b31a4f15b3d9 | capejs/capejs,capejs/capejs | lib/cape/mixins/propagator_methods.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * You can customize the initial state of the module from the editor initialization\n * ```js\n * const editor = grapesjs.init({\n * i18n: {\n * locale: 'en',\n * messages: {\n * en: {\n * hello: 'Hello',\n * ... | javascript | edit | 0 | 3 | bsd-3-clause | 88135630eeee214e6a6777b325970084305a3028 | artf/grapesjs,QuorumDMS/grapesjs,artf/grapesjs,artf/grapesjs,QuorumDMS/grapesjs | src/i18n/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar path = Npm.require(\"path\");\n\nPackage.describe({\n summary: \"JavaScript.next-to-JavaScript-of-today compiler\",\n version: \"1.0.3+0.0.42\"\n});\n\nPackage._transitional_registerBuildPlugin({\n name: \"compileHarmony\",\n us... | javascript | edit | 0 | 1 | mit | 9963a7f7e6f161fa6b9b0085ae3f48df33c2fb20 | mquandalle/meteor-harmony | package.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint-env node */\n\nconst Canvas = require('canvas');\nconst fs = require('fs');\n\nconst { Image } = Canvas;\n\n/**\n * Create a new canvas object with height and width\n * set to the given values.\n *\n * @param width {number} Th... | javascript | edit | 0 | 2 | mit | 92e4e867c02ab0d55ad54539568ac29692f01733 | bschlenk/canvas-everywhere | src/index.node.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * Copyright (c) 1997-2013, SalesLogix, NA., LLC. All rights reserved.\n */\n\n/**\n * @class Mobile.SalesLogix.Views.PickList\n *\n *\n * @extends Sage.Platform.Mobile.List\n *\n */\ndefine('Mobile/SalesLogix/Views/PickList', [\n ... | javascript | edit | 0 | 5 | apache-2.0 | 053ce99dec181fa886818c69fe80507257dffd56 | Saleslogix/argos-saleslogix,Saleslogix/argos-saleslogix,Saleslogix/argos-saleslogix,Saleslogix/argos-saleslogix | src/Views/PickList.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport express from 'express';\nimport path from 'path';\nimport bodyParser from 'body-parser';\nimport api from './api';\n\nlet server = null;\n\nfunction start(port) {\n return new Promise((resolve, reject) => {\n if (server... | javascript | edit | 0 | 2 | unlicense | c1cb190583772790ad3a217bb359670ce6b7a680 | TheFourFifths/consus,TheFourFifths/consus | src/lib/server.js | rejected_duplicate | Near-duplicate of sample 74504 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport h from 'hyperscript';\nimport fetch from 'unfetch';\nimport audio from './audio';\nimport aboutSrc from './content/about.md';\n\nlet visible = false;\nlet fetched = false;\n\nconst toggle = () => {\n visible = !visible;\n docum... | javascript | edit | 0 | 5 | apache-2.0 | 433541eee8c71f67265240dcd35323cfb0790e2b | puckey/dance-tonite,puckey/dance-tonite | src/about.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar http = require('http');\n\n/*\n* Convert from coursera sample format to javascript array.\n* e.g :\n*\n* a.txt :\n*\n* 111\n* 222\n* 333\n* 444\n*\n* converts to\n*\n* [111,222,333,444]\n* */\nvar strToArray = function(str) {\n r... | javascript | edit | 0 | 1 | apache-2.0 | a7eef3262e571e51f2f8a0403dbfbd7b51b1946a | lzhoucs/cs-algorithms | src/tools/courseraSampleToArray.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = (config) => {\n config.set({\n frameworks: ['mocha', 'karma-typescript'],\n browsers: ['ChromeHeadless'],\n singleRun: true,\n concurrency: Infinity,\n reporters: ['mocha'],\n port: 9876,\n colors:... | javascript | edit | 0 | 1 | mit | 6dbe686652f6e642000b183a4063d68f27c8b6e0 | marcoms/make-element,marcoms/make-element,marcoms/make-element | karma.conf.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Queue = require('./queue');\nvar Job = require('./job');\nvar Worker = require('./worker');\nvar redis = require('./redis');\n\nexports.redis = redis;\n\nexports.createQueue = function(name){\n var q = new Queue(name);\n q.client ... | javascript | edit | 0 | 3 | mit | 48c94504fce5b6ccbdd84dec3e676a6867c0125f | gosquared/convoy,intertwine/convoy | lib/convoy.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * @provides javelin-behavior-repository-crossreference\n * @requires javelin-behavior\n * javelin-dom\n * javelin-uri\n */\n\nJX.behavior('repository-crossreference', function(config) {\n\n // NOTE: Pretty muc... | javascript | edit | 0 | 5 | apache-2.0 | b43e6f2a5fdbb355369d82a2c5ff65f5b0e42a23 | parksangkil/phabricator,hach-que/unearth-phabricator,freebsd/phabricator,phacility/phabricator,dannysu/phabricator,wxstars/phabricator,schlaile/phabricator,apexstudios/phabricator,optimizely/phabricator,Soluis/phabricator,MicroWorldwide/phabricator,Drooids/phabricator,devurandom/phabricator,wikimedia/phabricator-phabri... | webroot/rsrc/js/application/repository/repository-crossreference.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nangular.module('arethusa.artificialToken').directive('artificialTokenList', [\n 'artificialToken',\n 'idHandler',\n function(artificialToken, idHandler) {\n return {\n restrict: 'A',\n scope: true,\n ... | javascript | edit | 0 | 1 | mit | 35631043b65738731b8dc51dcf6df818b454acfd | latin-language-toolkit/arethusa,PonteIneptique/arethusa,fbaumgardt/arethusa,Masoumeh/arethusa,Masoumeh/arethusa,PonteIneptique/arethusa,fbaumgardt/arethusa,alpheios-project/arethusa,latin-language-toolkit/arethusa,fbaumgardt/arethusa,alpheios-project/arethusa,alpheios-project/arethusa | app/js/arethusa.artificial_token/directives/artificial_token_list.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nangular.module('confRegistrationWebApp')\n .directive('radioQuestion', function () {\n return {\n templateUrl: 'views/radioQuestion.html',\n restrict: 'E',\n controller: function ($scope) {\n $... | javascript | edit | 0 | 1 | mit | 3650f297790e9c53fe609e72c65771b70e1af6ab | CruGlobal/conf-registration-web,CruGlobal/conf-registration-web,CruGlobal/conf-registration-web,CruGlobal/conf-registration-web | app/scripts/directives/radioQuestion.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar JSLINT = require(\"../lib/nodelint\");\n\nfunction addDefaults(options) {\n 'use strict';\n ['node', 'es5'].forEach(function (opt) {\n if (!options.hasOwnProperty(opt)) {\n options[opt] = true;\n }\n ... | javascript | edit | 0 | 2 | bsd-3-clause | 67ffd189c4717ff78dc04fdc7268d60e4840eebf | BenoitZugmeyer/node-jslint-extractor,BenoitZugmeyer/node-jslint-extractor | lib/linter.js | rejected_duplicate | Near-duplicate of sample 91443 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar escape = require('./util/escape')\nvar format = require('string-template');\nvar hljs = require('highlight.js');\nvar heading = require('./util/writeHeading');\nvar marked = require('marked');\nvar multiline = requir... | javascript | edit | 0 | 4 | mit | 201376a144a28953616f6412d544ee7585808b53 | zurb/foundation-docs,zurb/foundation-docs | lib/marked.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport function search(select, queryString, callback) {\n select.find('input').simulate('change', { target: { value: queryString } });\n setTimeout(() => { callback(); }, 0);\n}\n\nexport function chooseOption(select, optionText) {\n ... | javascript | edit | 0 | 3 | mit | a1e8fb35145d772c9766b0e279b75969a2192491 | patientslikeme/react-select-test-utils | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nRouter.configure({\n layoutTemplate: 'layout',\n loadingTemplate: 'loading',\n notFoundTemplate: 'notFound',\n waitOn: function() {\n return [Meteor.subscribe('posts'), Meteor.subscribe('notifications')];\n }\n});\n\nRouter.rout... | javascript | edit | 0 | 3 | mit | ec8a6e644a68f05da723bf5f463bda662ad0dde1 | Bennyz/microscope,Bennyz/microscope | lib/router.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport {StreamTransformer} from './stream.transformer';\nimport {TracebackTransformer} from './traceback.transformer';\nimport {LaTeXTransformer} from './latex.transformer';\nimport {MarkdownTransformer} from 'transformime-commonmark';\... | javascript | edit | 0 | 0 | bsd-3-clause | 903a944fd035f558f862dc7e8fa86d45625a6a9d | rgbkrk/transformime-jupyter-transformers,jdfreder/transformime-jupyter-transformers,nteract/transformime-jupyter-transformers,nteract/transformime-jupyter-renderers | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport BarChart from './BarChart';\nimport BoxPlot from './BoxPlot';\nimport BulletChart from './BulletChart';\nimport GanttChart from './GanttChart';\nimport Geo from './Geo';\nimport Heatmap from './Heatmap';\nimport Histogram from '.... | javascript | edit | 0 | 0 | apache-2.0 | c11be7a5d0e635699f079e4d4151a0ffaeec4603 | Kitware/candela,Kitware/candela,Kitware/candela,Kitware/candela,Kitware/candela | src/candela/components/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Transmitter = function (config) {\n\n var router = require('./router.js');\n router(config);\n\n var io = require('socket.io')(router.server);\n // Socket.io connection handling \n io.on('connection', function(socket){\n con... | javascript | edit | 0 | 1 | mit | 637339c263e278e99b4bec3eb1b48d3c721ab57b | Dermah/pulsar-transmitter | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\n(function () {\n angular\n .module(\"argo\")\n .controller(\"Trades\", Trades);\n\n Trades.$inject = [\"toastService\", \"tradesService\"];\n function Trades(toastService, tradesService) {\n ... | javascript | edit | 0 | 1 | mit | f9ea9934ee9cfc21d9b1642452977c4f30474491 | albertosantini/argo,albertosantini/argo | src/client/app/trades/trades.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nconst http = require('http');\nconst mongoose = require('mongoose');\nconst requireAll = require('require-all');\nconst TelegramBot = require('node-telegram-bot-api');\nconst GitHubNotifications = require('./common/Gi... | javascript | edit | 0 | 2 | mit | 0ee8baa8d70d20502f8c3134f6feea475646fbca | ghaiklor/telegram-bot-github | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nrequire('foundation-sites/scss/foundation.scss')\nrequire('./styles.scss');\nrequire('font-awesome/css/font-awesome.css');\n\n// Require index.html so it gets copied to dist\nrequire('./index.html');\n\nvar Elm = requir... | javascript | edit | 0 | 0 | mit | d8e2ceeb05de3c2fda22ef00486d50ef7fe9379c | Snorremd/builds-dashboard-gitlab,Snorremd/builds-dashboard-gitlab | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* global legacyConvert, module, project */\n\nmodule.exports = function(grunt) {\n\tgrunt.registerTask('convertLegacy', function(task) {\n\t\tvar dest = legacyConvert[task],\n\t\t\tcontent = grunt.file.read(dest),\n\t\t\trootSize = pro... | javascript | edit | 0 | 4 | apache-2.0 | 8b9af7220cc36962794a953525505bb57d8f426e | weepower/wee,janusnic/wee,weepower/wee,janusnic/wee | public/assets/wee/build/tasks/legacy-convert.js | rejected_duplicate | Near-duplicate of sample 101837 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport default function enhancer() {\n return (next) => (reducer, preloadedState) => {\n const initialState = Object.assign({}, preloadedState, loadState(restoreState));\n const store = next(reducer, initialState);\n ... | javascript | edit | 0 | 2 | mit | bb40f82aaa28cfef7b362f97bbc0ef332b925fe0 | ohtomi/sandbox,ohtomi/sandbox,ohtomi/sandbox,ohtomi/sandbox,ohtomi/sandbox,ohtomi/sandbox,ohtomi/sandbox,ohtomi/sandbox,ohtomi/sandbox | sandbox-react-redux/src/enhancer.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint-disable import/no-named-as-default */\n/* eslint-disable react/forbid-prop-types */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\n\nimport { Stepper } from './Stepper... | javascript | edit | 0 | 1 | mit | 729fb1c904ca57b39110894b85e8439a11cab554 | sussol/mobile,sussol/mobile,sussol/mobile,sussol/mobile | src/widgets/Wizard.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function (module) {\n module.controller('projectListProcess', projectListProcess);\n projectListProcess.$inject = [\"processes\", \"project\", \"$state\", \"mcmodal\", \"$filter\"];\n\n function projectListProcess(processes, p... | javascript | edit | 0 | 2 | mit | f10d798a6a997e944f0dcf07ee0074666b2ecb35 | materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org | website/app/application/core/projects/project/processes/process-list-controller.js | rejected_duplicate | Near-duplicate of sample 83267 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n 'ar': require('../../i18n/ar.json'),\n 'da': require('../../i18n/da.json'),\n 'de': require('../../i18n/de.json'),\n 'en': require('../../i18n/en.json'),\n 'es': require('../../i18n/es.json'),\n 'fr': require(... | javascript | edit | 0 | 0 | mit | 04b32b2c6f6bc92f9fbe6cc994c137968f4b522c | cwilgenhoff/lock,cwilgenhoff/lock,adam2314/lock,cwilgenhoff/lock,adam2314/lock,adam2314/lock | lib/i18n/dicts.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { PropTypes } from 'react';\n\nimport './index.css';\n\nconst Pit = React.createClass({\n propTypes: {\n pit: PropTypes.object.isRequired,\n },\n\n render() {\n const { pit } = this.props;\n\n return (\n <... | javascript | edit | 0 | 1 | mit | e022dd7bd62f4f088a9d943adfc5258fbfc91006 | transparantnederland/browser,waagsociety/tnl-relationizer,transparantnederland/browser,transparantnederland/relationizer,waagsociety/tnl-relationizer,transparantnederland/relationizer | app/components/Pit/index.js | rejected_duplicate | Near-duplicate of sample 96520 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* NewsFeedContainer.js\n * Container for our NewsFeed as a view \n * Dependencies: ActionTypes\n * Modules: NewsActions, and NewsFeed\n * Author: Tiffany Tse\n * Created: July 29, 2017\n */\n//import dependencie\nimport { connect } fro... | javascript | edit | null | null | mit | e3389659239731bb5bb367061cc0dd113998097f | titse/NYTimes-Clone,titse/NYTimes-Clone,titse/NYTimes-Clone | src/containers/NewsFeedContainer.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst moment = require('moment')\nconst _ = require('lodash')\nconst lastBusinessDay = require('../../businessDays').last\n\nmodule.exports = ({ getChatUsers, getWorkEntries }) => {\n return async function warnAboutMis... | javascript | edit | 0 | 2 | mit | d3c58065a12e493e0a30bcdb9d19dcfebebff83e | ideatosrl/mister-t | src/misterT/skills/warnAboutMissingTimesheet.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport {\n SOCKET_SET_OPENING, SOCKET_SET_CLOSING, SOCKET_SEND_MESSAGE\n} from \"../constants/ActionTypes\";\n\nexport default (socketClient) => ({\n open: url => {\n const action = { type: SOCKET_SET_OPENING };\n tr... | javascript | edit | 0 | 2 | mit | 885f50a52c41cbc50f8de0d46ef57fc62fce1c17 | letitz/solstice-web,letitz/solstice-web | src/actions/socketActionsFactory.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nif (!waitlist) {\n\tvar waitlist = {};\n}\n\nwaitlist.base = (function(){\n\tfunction getMetaData (name) {\n\t\treturn $('meta[name=\"'+name+'\"]').attr('content');\n\t}\n\t\n\tfunction displayMessage(message, type, htm... | javascript | edit | 0 | 3 | mit | fe0a75812fd1e26ad45cf2457230641ed12af605 | SpeedProg/eve-inc-waitlist,SpeedProg/eve-inc-waitlist,SpeedProg/eve-inc-waitlist,SpeedProg/eve-inc-waitlist | static/js/base.js | rejected_duplicate | Near-duplicate of sample 99599 | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.