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\nexport default function({\n renderedXAxis,\n renderedYAxis,\n xLabel,\n yLabel,\n width\n}) {\n let _y = this.axis == 'y'\n let axis = _y ? renderedYAxis : renderedXAxis\n\n if (axis) {\n let label = _y ? yLabel : xLabel\n ...
javascript
edit
0
5
mit
d08c1787c718d78fd5d806df139fe7d2d8657663
simonwoerpel/d3-playbooks,correctiv/d3-riot-charts,correctiv/d3-riot-charts,simonwoerpel/d3-playbooks,simonwoerpel/d3-playbooks
src/utils/d3/render_axis_label.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nvar\n\textend = req('/lib/utilities/extend'),\n\tBaseError = req('/lib/errors/base'),\n\tErrorCodes = req('/lib/constants/error-codes'),\n\tErrorReasons = req('/lib/constants/error-reasons'),\n\tcreateMessage = req('/li...
javascript
edit
0
4
isc
697891dcbd2cacf1af72a166ddb29a7afdd73832
burninggarden/pirc,burninggarden/pirc
lib/errors/invalid-channel-name.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar fs = require('fs');\nvar path = require('path');\n\nmodule.exports = function () {\n var output = [require('../../package.json').version];\n var gitPath = path.join(__dirname, '..','..','.git');\n...
javascript
edit
0
4
mit
997b979d1bd1367e783fbe0b60ce4d13865509c6
alefteris/ember-cli,taras/ember-cli,raytiley/ember-cli,typeoneerror/ember-cli,Turbo87/ember-cli,thoov/ember-cli,jonathanKingston/ember-cli,yaymukund/ember-cli,samselikoff/ember-cli,johnotander/ember-cli,Turbo87/ember-cli,tobymarsden/ember-cli,twokul/ember-cli,sivakumar-kailasam/ember-cli,coderly/ember-cli,gmurphey/embe...
lib/utilities/ember-cli-version.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* jslint browser: true */\n/* global $ */\n(function(){\n var makeCloneable = function(selector) {\n var scope = $(selector);\n\n var update_remove_one_visibility = function() {\n var hidden = scope.find('.cloneable').lengt...
javascript
edit
0
1
mit
36dfba6a30405b584b1e0a1de2d6dcf0285aef4d
ministryofjustice/scs_appraisals,ministryofjustice/scs_appraisals,ministryofjustice/scs_appraisals
app/assets/javascripts/agreement.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nangular.module('createPageController.controller', [])\n .controller('createPageController', function($scope, $http, $routeParams, $location, pageService) {\n $scope.message = \"first\";\n $scope.name = $routeParams.name;\n\n $...
javascript
edit
0
1
mit
1e0e180c569366def74863d95a98bd147d7bc4d9
coffee-cup/pintical,coffee-cup/pintical,coffee-cup/pintical
public/js/controllers/createpage.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar path = require('path');\nvar rootPath = path.join(__dirname, '..')\n\nmodule.exports = { \n '~': path.join(rootPath, 'src', 'client'),\n '~server': path.join(rootPath, 'src', 'server'),\n '~root': rootPath,\n 'react': 'p...
javascript
edit
0
0
mit
7911d5b49fe8068c248ab8db98484bfca6e4ef2a
AdamSalma/Lurka,AdamSalma/Lurka
config/webpack.alias.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nmodule.exports = function readBoundingBox (buffer, offset) {\n const Xmin = buffer.readDoubleLE(offset, true)\n const Ymin = buffer.readDoubleLE(offset + 8, true)\n const Xmax = buffer.readDoubleLE(offset + 16, true)\...
javascript
edit
0
1
isc
3e958fa5d4764fcb9babce9f0892e92ec44e5be8
emilbayes/shapefile-reader
parsers/utils/read-bounding-box.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(function(){\n\n\treadFileIntoBuffer(batotoJSONFile, function(buffer){\n\n\t\tif (buffer){\n\t\t\tbatotoJSON = JSON.parse(buffer);\n\t\t\tif ('chapters' in batotoJSON){\n\t\t\t\t$.each(batotoJSON.chapters, function(index, val) {\n\t\t\...
javascript
edit
0
4
mit
60bb8cc0d566e0e16a8c0df321647a532a553303
koroshiya/batoto-downloader-node,koroshiya/batoto-downloader-node
js/init.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nexport class Timer {\n\tconstructor() {\n\t\tthis.reset();\n\t}\n\n\t/**\n\t * Start the timer\n\t*/\n\tstart() {\n\t\tif(this._ran) throw new Error('timer already ran. use reset() first');\n\t\tif(this._running) throw ...
javascript
edit
0
3
mit
2d7fd5806d088578ac94b8a520ca315821933dd0
MichielvdVelde/yet-another-timer
src/Timer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n;(function($) {\n\n // initalize Editable\n Editable.init({\n log: false\n });\n\n\n $(document).ready(function() {\n var tooltip = $('<div class=\"selection-tip\" style=\"display:none;\">How may I help?</div>')\n $(documen...
javascript
edit
0
2
mit
4b0dba9f6f2998d8f41e302b7775d7db1088eebf
nickbalestra/editable.js,upfrontIO/editable.js
test/js/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndocument\r\n .querySelectorAll('pre')\r\n .forEach(node => {\r\n node.title = 'Copy to clipboard';\r\n node.classList.add('copy');\r\n node.onclick = function (event) {\r\n navigator.clipboard.writeText(event.target.inne...
javascript
edit
0
4
mit
a9692fdee6f63e4891b419fa9fa6cfafbe932df9
CurtisLusmore/curtislusmore.github.io,CurtisLusmore/curtislusmore.github.io
js/main.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Write some of the code for loading blog posts" }, { "role": "assistant", "content": "// TODO: don't just assume this is the homepage, account for the fact that the user might be visiting #blog/something\n// And don't forget t...
javascript
new_file
0
2
isc
e32b9ccef5f15115650112b723eaa4e4346ae9c5
jamescostian/jamescostian.com,jamescostian/jamescostian.com,jamescostian/jamescostian.github.io,jamescostian/jamescostian.com,jamescostian/jamescostian.github.io
js/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-env node */\n'use strict';\n\nvar defaultAllowedBaseStrings = ['(', ')', ',', '.', '&', '+', '-', '=', '*', '/', '#', '%', '!', '?', ':', '[', ']', '{', '}', '<', '>', '•', '—', ' ', '|'];\n\nmodule.exports = {\n extends: 're...
javascript
edit
0
0
mit
13023a53e718d2b46b83bde5277c19dae31d3f1a
stopfstedt/frontend,thecoolestguy/frontend,gabycampagna/frontend,djvoa12/frontend,dartajax/frontend,jrjohnson/frontend,gboushey/frontend,ilios/frontend,gabycampagna/frontend,ilios/frontend,thecoolestguy/frontend,stopfstedt/frontend,jrjohnson/frontend,gboushey/frontend,dartajax/frontend,djvoa12/frontend
.template-lintrc.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nimport AppDispatcher from '../dispatchers/dispatcher';\nimport AppConstants from '../constants/constants';\n\nexport default {\n\tswitchView: viewType => {\n\t\tAppDispatcher.dispatch({\n\t\t\tactionType: AppConstants.SWITCH_VIEW,\n\t...
javascript
edit
0
1
mit
dbeda452160fac9be0157de82a91a8db44b09e49
dashukin/StyleMe,dashukin/StyleMe
src/js/actions/actions.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { PureComponent, PropTypes } from 'react';\nimport DailyPricesTable from './DailyPricesTable';\n\nexport default class DailyPricesCard extends PureComponent {\n\n static propTypes = {\n dailyPrices: PropTypes.arr...
javascript
edit
0
2
mit
2b90b97ccf3ac38efcdb756d6cceda88eb153779
nuruddeensalihu/binary-next-gen,nuruddeensalihu/binary-next-gen,nazaninreihani/binary-next-gen,binary-com/binary-next-gen,nuruddeensalihu/binary-next-gen,nazaninreihani/binary-next-gen,nazaninreihani/binary-next-gen,binary-com/binary-next-gen,binary-com/binary-next-gen
src/daily-prices/DailyPricesCard.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst dateFormat = require('dateformat');\nconst { defineSupportCode } = require('cucumber');\n\ndefineSupportCode(function ({ Before, After }) {\n\n Before(function () {\n browser.deleteCookie();\n faker.locale ...
javascript
edit
0
2
mit
f01a19cab57161665f147619251a1a7c671063ef
nespresso/ntaf,nespresso/ntaf,nespresso/ntaf
template/src/support/hooks.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport axios from 'Axios'\n\nexport default {\n getSeries () {\n return axios.get('http://api.tvmaze.com/search/shows?q=bad')\n }\n}\n```\n\nApply this change: Use fetch instead of axios as http client" }, { "role":...
javascript
edit
0
1
apache-2.0
060575102436e6bf62cf9d66ac702cbfee754d52
GregoryBevan/devfest-vuejs,GregoryBevan/devfest-vuejs
src/services/series.service.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst options = [\n { label: 'Chocolate', value: 'chocolate' },\n { label: 'Vanilla', value: 'vanilla' },\n { label: 'Strawberry', value: 'strawberry' },\n { label: 'Caramel', value: 'caramel', disabled: true },\n { label: 'Cookies...
javascript
edit
0
0
mit
fe83e7fd3c4891600761524509f201fe5f512d77
teamleadercrm/teamleader-ui
static/data/select.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport _ from 'lodash'\nimport calculateSize from 'calculate-size'\n\nexport const minDropdownWidth = 146\nexport const maxDropdownWidth = 300\nexport const dropdownPadding = 30\n\nconst valueLength = a => _.size(a.value)\n\nexport cons...
javascript
edit
0
3
mit
123a6d0455f38a72a102e9f12db33ae6f44bd7e4
li-ang/influxdb,mark-rushakoff/influxdb,influxdb/influxdb,nooproblem/influxdb,influxdata/influxdb,nooproblem/influxdb,mark-rushakoff/influxdb,nooproblem/influxdb,influxdb/influxdb,nooproblem/influxdb,mark-rushakoff/influxdb,mark-rushakoff/influxdb,influxdb/influxdb,influxdb/influxdb,mark-rushakoff/influxdb,influxdb/inf...
ui/src/dashboards/constants/templateControlBar.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// general helpers, not related to the DOM and usable in different contexts\n\n// turn a list of key=value pairs (like tuples) into data that can be sent via AJAX\n// taken from https://developer.mozilla.org/en-US/docs/Learn/HTML/Forms/...
javascript
edit
0
1
mit
47781cc92922512b03003b132796f71aaced7226
alphagov/notifications-admin,alphagov/notifications-admin,alphagov/notifications-admin,alphagov/notifications-admin
tests/javascripts/support/helpers/utilities.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n module(\"R.curry\");\n\n var curry = require('eigensheep/curry')['default'];\n var adder = function(a, b, c, d) {\n return a + b + c + d;\n };\n var curriedAdder = curry(adder);\n\n test(\"the function can be in...
javascript
edit
0
1
mit
c474931ac1086fd95590e83a514624c4af4d70f1
markprzepiora/eigensheep,markprzepiora/eigensheep,markprzepiora/eigensheep
test/eigensheep/curry_test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nfunction makeString(foods) {\n return foods.toString();\n}\n\nfunction update () {\n var labelSprite = _.find(this.sprite.children, function(child) {\n return child instanceof Phaser.Text;\n });\n\n if (labelSpri...
javascript
edit
0
2
mit
f63cf7de2b9aac613121f8af8e56002bd9b48af1
sirugh/not-chef-gamejam2015,sirugh/not-chef-gamejam2015,smcclellan/not-chef-gamejam2015,smcclellan/not-chef-gamejam2015
app/model/Plate.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar karyo;\nvar links;\n\ndescribe(\"link_to_coords\", function(){\n\t\n\tbeforeEach(function(done){\n\t\tloadKaryoFile(karyoFile, function(data){\n\t\t\tkaryo_to_coords(data);\n\t\t\tkaryo=data;\n\t\t\t\n\t\t\tloadLinkFile(linkFile, fu...
javascript
edit
0
1
mit
717f3b9c6ab18ae8916f90bd69d66dd48b8c5834
BioInf-Wuerzburg/AliTV,BioInf-Wuerzburg/AliTV,BioInf-Wuerzburg/AliTV,BioInf-Wuerzburg/AliTV,AliTVTeam/AliTV,BioInf-Wuerzburg/AliTV,AliTVTeam/AliTV,BioInf-Wuerzburg/AliTV
wgaPipeline_jasmine/spec/testing_LinksToCoords.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Single certificate submitted view\n\n'use strict';\n\nvar db = require('mano').db\n , endsWith = require('es5-ext/string/#/ends-with')\n , documentView = require('./components/business-proce...
javascript
edit
0
2
mit
f64a9adb9b1d5e1aa942a4f7eee5b434fd6a3b98
egovernment/eregistrations,egovernment/eregistrations,egovernment/eregistrations
view/business-process-submitted-certificate.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport PropTypes from 'prop-types';\n\nimport OperationContainer from './operation-container';\n\nconst ConnectedOperationContainer = connect(\n (stat...
javascript
edit
0
5
mit
1f4bdfcd158b55740cbd7cda3deb96d01705affd
klis87/redux-saga-requests,klis87/redux-saga-requests
packages/redux-saga-requests-react/src/connected-operation-container.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * grunt-load-options\n * https://github.com/chriszarate/grunt-load-options\n *\n * Copyright (c) 2013-2014 Chris Zarate\n * Licensed under the MIT license.\n */\n\n'use strict';\n\nvar requireDirectory = require('require-directory'...
javascript
edit
0
6
mit
aef0d296c9820e6d0552cd8211ef8e6336687158
chriszarate/grunt-load-options
tasks/load-options.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar $ = require(\"jquery\");\n\n\n// Initialize player and register event handler\nvar Player = new MidiPlayer.Player();\n\nvar playTrack = function (filename, pk) {\n // Load a MIDI file\n MIDIjs.stop();\n MIDIjs.play(filename);\n ...
javascript
edit
0
1
mit
05f7622f3f57493e9ecf86be08e951c8f5390765
adrienbrunet/fanfare_cuc,adrienbrunet/fanfare_cuc,adrienbrunet/fanfare_cuc
assets/js/index.js
rejected_duplicate
Near-duplicate of sample 76296
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nlet Benchmark = require('benchmark')\nlet memoize1 = require('./1')\nlet underscore = require('underscore').memoize\n\n//\n// Fibonacci suite\n//\n\nlet fibonacci = (n) => {\n return n < 2 ? n: fibonacci(n - 1) + fibona...
javascript
edit
0
2
mit
af57e195b84651e372645260e663e631beddf441
caiogondim/fast-memoize.js,caiogondim/fast-memoize.js,caiogondim/fast-memoize,caiogondim/fast-memoize.js
benchmark/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function (RED) {\n\tfunction LgtvRequestNode(n) {\n\t\tRED.nodes.createNode(this, n);\n\t\tvar node = this;\n\t\tthis.tv = n.tv;\n\n\t\tthis.tvConn = RED.nodes.getNode(this.tv);\n\n\t\tif (this.tvConn) {\n\t\t\tthis.tvC...
javascript
edit
0
2
apache-2.0
ddbc5ef3b3de89ad2427f23b4a36dcaad21c39eb
azureru/node-red-contrib-homereru,azureru/node-red-contrib-homereru
devices/lg-request.js
rejected_duplicate
Near-duplicate of sample 90096
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(function() {\n\n // Export\n return function(Prism) {\n\n Prism.languages.c = Prism.languages.extend('clike', {\n \t'keyword': /\\b(asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|...
javascript
edit
0
11
mit
e95cafa6f6e690adc823cc97c556ece7152b171a
apiaryio/prism
src/languages/c.js
rejected_complexity
Cyclomatic complexity too high: 11
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default class HttpApi {\n constructor (prefix = '') {\n this.prefix = prefix\n this.opts = {\n credentials: 'same-origin',\n headers: new Headers({\n 'Content-Type': 'application/json',\n })\n }\n\...
javascript
edit
0
4
isc
b97d5db5d27749b1ae20e3fd45192c9997450597
bhj/karaoke-forever,bhj/karaoke-forever
src/lib/HttpApi.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar api = require(\"./api\");\n\nmodule.exports = function(app) {\n\n // View endpoints\n app.get(\"/\", function(req, res) {\n res.sendFile(__dirname + \"/views/index.html\");\n });\n\n // API endpoints\n app.get(...
javascript
edit
null
null
mit
0bb02cf1a8ce93baf95460d7b80c9b8b5ea5886d
james9909/github-stupidity,james9909/github-stupidity
router.js
rejected_code_smell
Internal duplication: ~32% of the file is inside repeated 12+ line blocks
null
[ { "role": "user", "content": "Here is the current file:\n```javascript\nFrontendCore.define('on-off-table', ['devicePackage' ], function () {\r\n return {\r\n onStart: function () {\r\n\r\n FrontendCore.requireAndStart('notification');\r\n\r\n $('.switch input').each( functio...
javascript
edit
0
3
mit
d0f56db2d7688b07a8b592a5c95e31a100048250
sottosviluppo/bamboo,deliberryeng/bamboo,corretgecom/bamboo,elcodi/bamboo,atresmediahf/bamboo,isigoogling/bamboo,atresmediahf/bamboo,deliberryeng/bamboo,atresmediahf/bamboo,corretgecom/bamboo,atresmediahf/bamboo,deliberryeng/bamboo,corretgecom/bamboo,isigoogling/bamboo,corretgecom/bamboo,elcodi/bamboo,sottosviluppo/bam...
src/Elcodi/Admin/CoreBundle/Resources/public/js/modules/on-off-table.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*global browser:true, protractor:true, httpBackend:true, By:true, expect:true, Promise:true */\r\n'use strict';\r\n\r\nvar CustomWorld = (function () {\r\n var chai = require('chai');\r\n var chaiAsPromised = require('chai-as-pro...
javascript
edit
0
1
mit
8f3f7e876b5f214cdf5924eaf4d6c391ead8a1ba
TradeMe/tractor,Galileo1/tractor,Galileo1/tractor,yemo/tractor,TradeMe/tractor,TradeMe/tractor,yemo/tractor
server/cli/init/base_file_sources/world.js
rejected_duplicate
Near-duplicate of sample 91378
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be fo...
javascript
edit
0
4
bsd-3-clause
72e95f22f4d2ac09c0a05712320fee5fb68e94cb
webcomponents/polyfills,webcomponents/polyfills,webcomponents/polyfills
src/native-shim.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst Promise = require('promise');\nconst azure = require('azure-sb'); \nconst asyncEachLimit = require('async/eachLimit');\nconst trackDependency = require('../appinsights/AppInsightsClient').trackDependency;\nconst S...
javascript
edit
0
6
mit
57ca5764aff77fe57edc493da9dd00793f27d6c6
CatalystCode/project-fortis-services,CatalystCode/project-fortis-services
src/clients/servicebus/ServiceBusClient.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar format = require(\"util\").format;\n\nvar TennuEval = {\n requires: [\"admin\"],\n init: function(client, imports) {\n\n function handleEval(IRCMessage) {\n return imports.admin.isAdmin(IRCMessage.hostmask)\n...
javascript
edit
0
2
isc
1c1e682bb062912c0b5d76115cd726d359029706
Tennu/tennu-eval
plugin.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\ndefine(['jquery'], function ($) {\n return {\n init: function () {\n var inIframe = window !== window.top && typeof window.top.dnn !== \"undefined\";\n\n var tabId = inIframe ? window.top.d...
javascript
edit
0
6
mit
e67b8a59b85259ee8a1bedeb09ea773c78c2f546
dnnsoftware/Dnn.Platform,bdukes/Dnn.Platform,dnnsoftware/Dnn.Platform,mitchelsellers/Dnn.Platform,valadas/Dnn.Platform,mitchelsellers/Dnn.Platform,dnnsoftware/Dnn.Platform,bdukes/Dnn.Platform,bdukes/Dnn.Platform,valadas/Dnn.Platform,nvisionative/Dnn.Platform,dnnsoftware/Dnn.Platform,mitchelsellers/Dnn.Platform,nvisiona...
Dnn.AdminExperience/Library/Dnn.PersonaBar.UI/admin/personaBar/scripts/config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar replaceAll = function( oldToken ) {\n var configs = this;\n return {\n from: function( string ) {\n return {\n to: function( newToken ) {\n var _token;\n var index = -1;\n if ( configs.ign...
javascript
edit
0
4
mit
298ad6c11d5d13b0b1e7bc4ce5a4739d1e95c471
FagnerMartinsBrack/str-replace
src/str-replace.js
rejected_duplicate
Near-duplicate of sample 94310
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n @module ember-flexberry\n*/\n\nimport Ember from 'ember';\n\n/**\n Injects 'after' method into 'Ember.run' namespace.\n\n @for ApplicationInitializer\n @method emberRunAfter.initialize\n @param {<a href=\"http://emberjs.com/a...
javascript
edit
0
2
mit
50b1d41ab3e2f2bb44a66ba9620ec164d119a5ea
Flexberry/ember-flexberry,Flexberry/ember-flexberry,Flexberry/ember-flexberry,Flexberry/ember-flexberry
addon/initializers/ember-run-after.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Parse task and return task info if\n * the task is valid, otherwise throw\n * error.\n * @param {string} query Enetered task\n * @return {object} Task info containing\n * task text, start time\n ...
javascript
edit
0
5
mit
2e72a48b0b0f20b3ded8ed85381369c1cd7864f9
mkermani144/wanna,mkermani144/wanna
desktop/app/shared/database/parse.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @ngInject\nexport function quotaName($filter) {\n var names = {\n floating_ip_count: gettext('Floating IP count'),\n vcpu: gettext('vCPU count'),\n ram: gettext('RAM'),\n storage: gettext('Storage'),\n vm_count: gette...
javascript
edit
0
3
mit
32480a30114ed967058490d19f081080e3609ece
opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport
app/scripts/components/quotas/filters.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// We save the user language preference in the user profile, and use that to set\n// the language reactively. If the user is not connected we use the language\n// information provided by the browser, and default to english.\n\nMeteor.st...
javascript
edit
0
7
mit
5752383d3cf7fa1d26c6b4815d07443bed7df4b3
jtickle/wekan,johnleeming/wekan,oliver4u/sap-wekan,ddanssaert/wekan,libreboard/libreboard,ddanssaert/wekan,johnleeming/wekan,wekan/wekan,johnleeming/wekan,nztqa/wekan,oliver4u/sap-wekan,GhassenRjab/wekan,wekan/wekan,ddanssaert/wekan,wekan/wekan,jtickle/wekan,GhassenRjab/wekan,mario-orlicky/wekan,jtickle/wekan,GhassenRj...
client/lib/i18n.js
rejected_duplicate
Near-duplicate of sample 69804
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n *\n * LimitSelect\n *\n */\n\nimport React from 'react';\n// import PropTypes from 'prop-types';\nimport { FormattedMessage } from 'react-intl';\nimport { map } from 'lodash';\nimport styles from './styles.scss';\n\nclass LimitSel...
javascript
edit
0
1
mit
1c331377c5b3ea958ea514c0b9c0a71b598fba19
wistityhq/strapi,wistityhq/strapi
packages/strapi-plugin-content-manager/admin/src/components/LimitSelect/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst core = require('./core.js');\nconst fd = require('./field.js');\nconst service = require('./../services/services.js');\n\n/*\n* Fonction qui traite les réponses de type bonjour\n*/\nfunction processingGrettings(...
javascript
edit
0
6
apache-2.0
a7500bc515c0d5fe0b7d9c6f0286423385385f24
ArnaudFavier/Chatbot-GrandLyon,ArnaudFavier/Chatbot-GrandLyon,ArnaudFavier/Chatbot-GrandLyon,ArnaudFavier/Chatbot-GrandLyon
core/processing.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar BaseView = require('../base-view');\n\nfunction BasePickerView() {\n BaseView.apply(this, arguments);\n\n this._initialize();\n}\n\nBasePickerView.prototype = Object.create(BaseView.prototype);\nBasePickerView.pro...
javascript
edit
0
2
mit
e7e43e75e1278a2ecec4c58daea7332e455f690c
braintree/braintree-web-drop-in,braintree/braintree-web-drop-in,braintree/braintree-web-drop-in
src/views/picker-views/base-picker-view.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport fs from 'fs';\nimport path from 'path';\nimport promisify from 'es6-promisify';\nimport {\n InvalidFile,\n InvalidJsonString\n} from './errors';\n\nexport function convertOneFile(fileName, destFileName) {\n const fileReadPromi...
javascript
edit
0
4
mit
942fdb3a8fe2c59570b2311cd272d73be83da2dc
cosmowiki/cosmowiki,cosmowiki/cosmowiki,cosmowiki/cosmowiki,cosmowiki/cosmowiki
src/scripts/minify-json/one-file.js
rejected_duplicate
Near-duplicate of sample 73804
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// DEPENDENCIES\nvar express = require('express');\nvar app = express();\n\nvar port = process.env.PORT || process.argv[2] || 8080;\n\napp.use(express.static('public'));\n\napp.listen(port);\nconsole.log(`I can hear you on port ${port}!...
javascript
edit
0
0
mit
716fbbcb0ef4792724bd42acec44abf11343b46e
Mctalian/HydroZone,Mctalian/HydroZone
server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar http = require('http');\nvar url = require('url');\nvar restify = require('express-restify-mongoose');\nvar mongoose = require('mongoose');\n\nvar Artist = require('./api/models/artist');\nvar Faq ...
javascript
edit
0
1
mit
9a3ca9a92f43d339f0c4c26444681b2033d48d8b
futurice/sec-conference-server,futurice/festapp-server,0is1/festapp-server,futurice/sec-conference-server
server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// The port for communicating back to the extension.\nvar benchmarkExtensionPort = chrome.extension.connect();\n\n// The url is what this page is known to the benchmark as.\n// The benchmark uses this id to differentiate the benchmark's...
javascript
edit
0
3
bsd-3-clause
e079f6bc95496920f7c70cd95adf734203430f47
wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser
chrome/common/extensions/docs/examples/extensions/benchmark/script.js
rejected_duplicate
Near-duplicate of sample 81651
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nexport default Ember.Service.extend({\n store: Ember.inject.service(),\n feedModel: null,\n createOrFindFeedModel: function() {\n if (this.get('feedModel') == null) {\n var newFeedModel = this.ge...
javascript
edit
0
2
mit
3b26c3787bc7d5c560565c5c9c36cf2c02934617
transitland/feed-registry,transitland/feed-registry
app/create-feed-from-gtfs/service.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function(grunt) {\n\n grunt.registerTask('default', function(text) {\n var done = this.async();\n grunt.util.spawn({\n grunt: true,\n args: ['--gruntfile', 'Gruntfile-execArgv-child.js'],\n }, functi...
javascript
edit
0
2
mit
32d179e240ee52163820580ef6278be919cc4510
gruntjs/grunt-legacy-util
test/fixtures/Gruntfile-execArgv.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar config = require('./mup.js');\n\nconfig.meteor.path = '../helloapp-old';\ndelete config.meteor.docker.image;\n\nmodule.exports = config;\n\n```\n\nApply this change: Fix test for deploying Meteor 1.2" }, { "role": "assistant...
javascript
edit
0
0
mit
8acb433305414b07bff24dd4fa8a7fd229f52d78
zodern/meteor-up,zodern/meteor-up
tests/fixtures/project-1/mup.old.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * This script will automaticly look at the closest entity.\n * It checks for a near entity every tick.\n */\nconst mineflayer = require('mineflayer')\n\nif (process.argv.length < 4 || process.argv.length > 6) {\n console.log('Usag...
javascript
edit
0
7
mit
2dbcb4a41a72dbab74bf1089dec40de4e3db9c8c
andrewrk/mineflayer,PrismarineJS/mineflayer
examples/looker.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nimport { Constants as AssessmentMetaConstants } from '../actions/assessment_meta';\n\nconst initialState = {};\n\nexport default (state = initialState, action) => {\n\n switch(action.type){\n case AssessmentCons...
javascript
edit
0
2
mit
fc14cd735390731314586aac48e16eaf6b6bf907
atomicjolt/open_assessments,atomicjolt/open_assessments,atomicjolt/OpenAssessmentsClient,atomicjolt/OpenAssessmentsClient,atomicjolt/open_assessments,atomicjolt/OpenAssessmentsClient
client/js/reducers/assessment_meta.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar mdns = require('../');\r\n\r\nvar TIMEOUT = 5000; //5 seconds\r\n\r\n\r\nvar browser = new mdns.createBrowser(); //defaults to mdns.ServiceType.wildcard\r\n//var browser = new mdns.Mdns(mdns.tcp(\"googlecast\"));\r\n//var browser = ...
javascript
edit
0
1
apache-2.0
31d8a90ac3898920dd34827a3705c211f10aad7a
simphax/node-mdns-js,kmpm/node-mdns-js,guerrerocarlos/node-mdns-js,LinusU/node-mdns-js,winkapp/node-mdns-js,mdns-js/node-mdns-js,mrose17/node-mdns-js
examples/simple.js
rejected_duplicate
Near-duplicate of sample 92275
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { moduleFor, test } from 'ember-qunit';\nimport Ember from 'ember';\n\nmoduleFor('controller:nodes.detail.files.provider.file', 'Unit | Controller | file', {\n // Specify the other units that are required for this test.\n needs...
javascript
edit
0
1
apache-2.0
74fa1b6458ab5097cae05541a9de411f0ea3d4d3
CenterForOpenScience/ember-osf,hmoco/ember-osf,baylee-d/ember-osf,crcresearch/ember-osf,jamescdavis/ember-osf,baylee-d/ember-osf,cwilli34/ember-osf,chrisseto/ember-osf,pattisdr/ember-osf,jamescdavis/ember-osf,pattisdr/ember-osf,cwilli34/ember-osf,binoculars/ember-osf,crcresearch/ember-osf,CenterForOpenScience/ember-osf...
tests/unit/controllers/node-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine([\n\t\"dojo/_base/declare\",\n\t'JBrowse/View/TrackList/Hierarchical'\n],\nfunction(declare,Hierarchical) {\n\treturn declare('WebApollo.View.TrackList.Hierarchical',Hierarchical,\n\t{\n\t\taddTracks: function( tracks, inStartup ...
javascript
edit
0
4
bsd-3-clause
6bb7f608cde0494ed1d2bd4d328164d0d309b012
erasche/Apollo,erasche/Apollo,erasche/Apollo,erasche/Apollo,erasche/Apollo
client/apollo/js/View/TrackList/Hierarchical.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmarked.setOptions({\n langPrefix: 'language-',\n highlight: function(code, lang) {\n if (!Prism.languages[lang]) {\n return code;\n }\n return Prism.highlight(code, Prism.languages[lang]);\n },\n renderer: (function(){...
javascript
edit
0
2
bsd-3-clause
ae747854cd84ba4de204c8d040a43e1c7634da02
tummychow/goose,tummychow/goose
js/markext.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function(config) {\n config.set({\n frameworks: [ \n 'jasmine', \n 'karma-typescript'\n ],\n plugins: [\n 'karma-typescript',\n 'karma-jasmine',\n 'karma-edge-launcher',\n 'karma-...
javascript
edit
0
1
mit
1c5cf901d3b25dbfb913d665754662afe1802ca7
arogozine/LinqToTypeScript,arogozine/LinqToTypeScript
karma.conf.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar expect = require('chai').expect,\n fs = require('fs'),\n path = require('path'),\n rulesDir = path.join(__dirname, '../lib/rules/'),\n plugin = require('..');\n\ndescribe('eslint-plugin-mocha', function ...
javascript
edit
0
1
mit
952209625838f57d5977b1117c5a2ce461832ca1
lo1tuma/eslint-plugin-mocha,alecxe/eslint-plugin-mocha
test/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// This file makes all join table relationships\nvar Sequelize = require('sequelize');\nvar sequelize = new Sequelize('escape', 'escape', 'escapeacft', {\n dialect: 'mariadb',\n host: 'localhost'\n});\n\n// Any vairable that starts wi...
javascript
edit
0
0
mit
917ac4d1e0dadd7bdde9e92320c61cf881680aca
lowtalkers/escape-reality,lowtalkers/escape-reality,francoabaroa/escape-reality,francoabaroa/escape-reality
db/models/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport GraphQLJSClient from '../src/graphql-client';\n\nfunction recordTypes() {\n const types = GraphQLJSClient.trackedTypes();\n\n if (typeof require === 'function') {\n const body = JSON.stringify({'profiled-types': types}, null...
javascript
edit
0
2
mit
aa109d9e6f3055273dbf14a3b848d087a1929443
Shopify/js-buy-sdk,Shopify/js-buy-sdk
test/setup.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar React = require('react');\nvar api = require('./protocols/api');\nvar config = require('./config');\nvar getFactory = require('./factories').getFactory;\nvar getReport = require('./util/getReport');\n\nfunction crea...
javascript
edit
0
3
mit
53fd1667b7db63ecc4d8508000467361650fe008
ieugen/tcomb-form,ashwinrayaprolu1984/tcomb-form,CBIConsulting/tcomb-form,geminiyellow/tcomb-form,gcanti/tcomb-form,ashwinrayaprolu1984/tcomb-form,CBIConsulting/tcomb-form,mvlach/tcomb-form,johnraz/tcomb-form,geminiyellow/tcomb-form
lib/create.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar gulp = require('gulp');\nvar $ = require('gulp-load-plugins')();\nvar config = require('../config');\n\ngulp.task('watch', ['browserify:build', 'scripts:watch', 'sass:watch', 'templates:watch', 'views:watch']);\ngulp.task('build', [...
javascript
edit
0
0
mit
391d8d28ef5dfd066b2995150bd45a1ba0857282
Dramloc/angular-material-boilerplate,Dramloc/angular-material-boilerplate
gulp/tasks/helpers.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport const defaultRuleConfigs = {\n deadman: {\n period: '10m',\n },\n relative: {\n change: 'change',\n period: '1m',\n shift: '1m',\n operator: 'greater than',\n value: '90',\n },\n threshold: {\n operator:...
javascript
edit
0
0
mit
122bd75b6485218799923b25700a985fe6d78dba
nooproblem/influxdb,mark-rushakoff/influxdb,influxdb/influxdb,influxdata/influxdb,li-ang/influxdb,mark-rushakoff/influxdb,mark-rushakoff/influxdb,influxdb/influxdb,li-ang/influxdb,nooproblem/influxdb,influxdb/influxdb,nooproblem/influxdb,nooproblem/influxdb,mark-rushakoff/influxdb,mark-rushakoff/influxdb,mark-rushakoff...
ui/src/kapacitor/constants/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* Copyright 2015 The TensorFlow Authors. All Rights Reserved.\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 ...
javascript
edit
0
1
apache-2.0
22d95533e25ffd66fd007cca7dbf2935fbfaadf4
Intel-tensorflow/tensorflow,eerwitt/tensorflow,jhseu/tensorflow,jhaux/tensorflow,abhitopia/tensorflow,ZhangXinNan/tensorflow,eerwitt/tensorflow,tornadozou/tensorflow,kevin-coder/tensorflow-fork,JingJunYin/tensorflow,tensorflow/tensorflow-pywrap_saved_model,Kongsea/tensorflow,ibmsoe/tensorflow,sandeepgupta2k4/tensorflow...
tensorflow/tensorboard/gulp_tasks/compile.js
rejected_duplicate
Near-duplicate of sample 92030
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar Ajv = require(typeof window == 'object' ? 'ajv' : '../lib/ajv')\n , should = require('chai').should()\n , stableStringify = require('json-stable-stringify');\n\ndescribe('Ajv Options', function () {\n\n describe(...
javascript
edit
0
1
mit
65ccf49edfb0ebdeb06990b51a8c6cab57e35a1c
marbemac/ajv,epoberezkin/ajv,YChebotaev/ajv,marbemac/ajv,MailOnline/ajv,YChebotaev/ajv,epoberezkin/ajv,MailOnline/ajv,epoberezkin/ajv
spec/options.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nangular.module('nameApp', [])\n .factory('PersonsService', personsService)\n .directive('name', nameDirective)\n .controller('ExampleCtrl', ExampleCtrl);\n\nExampleCtrl.$inject = ['PersonsService'];\n\nfunction ExampleCtrl(Pers...
javascript
edit
0
2
mit
ccda02ea5da45204e0e6a5789b7242dbbcba1fee
bjoernricks/angular-tutorial
angular_tutorial/examples/29/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// ==UserScript==\n// @name VLC Remote\n// @namespace fatmonkeys\n// @include http://[IP address of VLC Remote server]:8080/\n// @version 1\n// @grant none\n// ==/UserScript==\n\ndocument.onkeypress = checkKey;\n\...
javascript
edit
0
7
mit
c37db776f177d3377bdea22a314f6f560880974f
pchaigno/fatmonkeys
vlc_remote.user.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport './paging-buttons.scss';\n\nclass PagingButtons extends React.Component {\n render() {\n const prev = this.props.prev;\n const next = this.props.next;\n\n return (\n <div className=\"con...
javascript
edit
0
3
mit
9c89b403737203104685e63a4d39f716a2a6eb0e
DoSomething/rogue,DoSomething/rogue,DoSomething/rogue
resources/assets/components/PagingButtons/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use babel'\n\nSoftWrapIndicator = require('../lib/soft-wrap-indicator')\n\ndescribe('SoftWrapIndicatorPackage', () => {\n let atomEnv, indicator\n\n beforeEach(async () => {\n atomEnv = global.buildAtomEnvironment()\n let works...
javascript
edit
0
1
mit
fe8740d58fd78c210a51626508794c2d19a9d685
lee-dohm/soft-wrap-indicator
test/soft-wrap-indicator.test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport css from './FilterPaneSearch.css';\nimport Icon from '@folio/stripes-components/lib/Icon';\nimport Button from '@folio/stripes-components/lib/Button';\n\nclass FilterPaneSearch extends React.Component{...
javascript
edit
0
1
apache-2.0
fa244c9b5c6e7a1d3e157e98a6a1081469ca2c54
folio-org/ui-users,folio-org/ui-users
lib/FilterPaneSearch/FilterPaneSearch.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar invariant = require('react/lib/invariant');\n\ninvariant(\n window.google || window.google.maps,\n '`google.maps` global object not found, make sure ' +\n 'Google maps in included before react-googlemaps is d...
javascript
edit
0
0
mit
499f6ab748b7ca1ea5f28dcb535b018fef595f71
pieterv/react-googlemaps,adalgleish/react-googlemaps,soundswarm/react-googlemaps,shipstar/react-googlemaps,shipstar/react-googlemaps,soundswarm/react-googlemaps,ssangireddy-nisum-com/react-googlemaps,cgarvis/react-googlemaps,cgarvis/react-googlemaps,adalgleish/react-googlemaps,Amirus/react-googlemaps,petehunt/react-goo...
src/GoogleMapsAPI.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\n\ndefine(function(require, exports, mod) {\n\n var test = require('../../../test')\n\n test.assert(seajs.config() === seajs, 'sea.config is chainable')\n test.assert(seajs.emit() === seajs, 'sea.emit is chainable')\n test.assert(s...
javascript
edit
0
1
mit
b5efe1cde9795ac00c7345ec62b097f6dffd0aa7
judastree/seajs,moccen/seajs,seajs/seajs,AlvinWei1024/seajs,evilemon/seajs,kuier/seajs,JeffLi1993/seajs,zwh6611/seajs,lianggaolin/seajs,LzhElite/seajs,mosoft521/seajs,jishichang/seajs,yern/seajs,jishichang/seajs,liupeng110112/seajs,judastree/seajs,liupeng110112/seajs,miusuncle/seajs,evilemon/seajs,Gatsbyy/seajs,uestcNa...
tests/specs/module/chain/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconsole.log(\"Create app module\");\nvar learnApp = angular.module('LearnApp', []);\n\nvar LearnController = function($scope) {\n\tvar _this = this;\n\twindow.castReceiverManager = cast.receiver.CastReceiverManager.getInstance();\n\tbus...
javascript
edit
0
3
mit
4fd504569b7847aa6fe1964866419ec2032de9b6
KevinGaudin/learncast
js/LearnController.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nvar repl = require('repl');\nvar protocol = require('../lib/protocol.json');\nvar Chrome = require('../');\n\nChrome(function (chrome) {\n var chromeRepl = repl.start({\n 'prompt': 'chrome> '\n });\n\...
javascript
edit
0
2
mit
f603d70311214b39e5e6b82b89f38639f828ad24
valaxy/chrome-remote-interface,cyrus-and/chrome-remote-interface,cyrus-and/chrome-remote-interface,washtubs/chrome-remote-interface
bin/repl.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function (context) {\n return {\n $: function (expression) {\n return expression\n },\n\n extend: {\n extendables: {},\n add: function (selector, cssString) {\n this.extendables[selector]...
javascript
edit
0
2
mit
0eb999eeadd6b4014242d7f709e1767864d4f59b
Kriegslustig/jsheets
helpers/helpers.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport getFeed from './rss-feed-poller';\nimport loadFile from './config-parser.js';\n\nexport default async function rssPoller(robot) {\n try {\n const config = await loadFile(process.env.HUBOT_RSS_CONFIG_FILE || 'hubotrssconfig.js...
javascript
edit
0
4
mit
fb84dc7e9af4ab38dc70135cc800be6648cd99ef
KanoYugoro/hubot-rss-poller
src/poller-script.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\n// Mixins\nlet i18nMixin =require('../../../../common/i18n').mixin;\nlet searchBehaviour = require('../../common/search-mixin').mixin;\nvar searchWrappedAction = require('../action-wrapper');\n\nmodule.exports = {\n mixins: [i18nMi...
javascript
edit
0
1
mit
725db3347d6a03e918706933c9c62502da0656e7
get-focus/focus-components,asimsir/focus-components,Bernardstanislas/focus-components,Jerom138/focus-components,Ephrame/focus-components,anisgh/focus-components,KleeGroup/focus-components,KleeGroup/focus-components,Jerom138/focus-components,Jerom138/focus-components,JRLK/focus-components,JabX/focus-components,Bernardst...
page/search/search-header/mixin/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport Close from './Close';\nimport Minimize from './Minimize';\nimport Resize from './Resize';\n\nvar styles = {\n controls: {\n WebkitUserSelect: 'no...
javascript
edit
0
1
mit
6736f1c48f21d1cbcebedcc2f62647fac0f8cc17
gabrielbull/react-desktop
src/TitleBar/macOs/Controls/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* global require, module */\nvar EmberAddon = require('ember-cli/lib/broccoli/ember-addon')\n\nmodule.exports = function (defaults) {\n var app = new EmberAddon(defaults, {\n\n babel: {\n optional: ['es7.decorators']\n },\n...
javascript
edit
0
1
mit
eb570519ff5e97a243bb616b0a4c30f80ad9dc56
ciena-frost/ember-frost-bunsen,sandersky/ember-frost-bunsen,sandersky/ember-frost-bunsen,sophypal/ember-frost-bunsen,sandersky/ember-frost-bunsen,ciena-frost/ember-frost-bunsen,sophypal/ember-frost-bunsen,ciena-frost/ember-frost-bunsen,sophypal/ember-frost-bunsen
ember-cli-build.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport * as types from '../../../constants/ActionTypes'\nimport { logout } from '../../../actions/login';\nimport { connect } from 'react-redux';\n\nclass Logout extends Component {\n\n rend...
javascript
edit
0
1
mit
5094d5a54ef765bf3ee4c251ebae879eb978bac3
fredmarques/petshop,fredmarques/petshop
src/components/routes/user/logout.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * main.js\n *\n * Only runs in modern browsers via feature detection\n */\n\nif('querySelector' in document && 'localStorage' in window && 'addEventListener' in window) {\n \n \n \n}\n```\n\nApply this change: Add class \"js\" ...
javascript
edit
0
0
isc
3d6b3f3a2568c64e8d75f8cdd7c73138d17df618
frippz/blog-prototype,frippz/blog-prototype
gui/js/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nTemplate.postsList.helpers({\n posts: function() {\n return Posts.find();\n }\n});\n```\n\nApply this change: Sort posts by submitted timestamp.\n\nchapter7-8" }, { "role": "assistant", "content": "Template.postsList.he...
javascript
edit
0
1
mit
d1d813bf161eb28dc95852d519cf8fe274b3d12a
scimusmn/sd-waw,scimusmn/sd-waw
client/views/posts/posts_list.js
rejected_duplicate
Near-duplicate of sample 71801
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar React = require('react');\nvar ReactDOM = require('react-dom');\nvar GraphPanel = require('./GraphPanel.js');\nvar SearchPanel = require('./SearchPanel.js');\nvar NodeInfoPanel = require('./NodeInfoPanel.js');\n\nva...
javascript
edit
0
2
apache-2.0
de96e5017395d83dbdc5d51a1b01dfb99f1f4ad5
rwhite226/Graphalyzer,rwhite226/Graphalyzer,rwhite226/Graphalyzer,rwhite226/Graphalyzer
graph_ui/js/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport path from 'path';\nimport merge from 'webpack-merge';\nimport CleanWebpackPlugin from 'clean-webpack-plugin';\n\nimport CommonConfig from './webpack.common';\n\nlet config = {\n entry: ['./src/main.js'],\n output: {\n filena...
javascript
edit
0
0
mit
b9d8733a034de457e3e9c8810ec22e6bb6a43870
psychobolt/electron-boilerplate,psychobolt/electron-boilerplate
webpack.main.babel.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfs = require('fs');\n\nmodule.exports = {\n publicClasses: function(context, options) {\n 'use strict';\n var ret = \"\";\n\n for(var i=0; i < context.length; i++) {\n if(!context[i].itemtype && contex...
javascript
edit
0
7
mit
76019487cc2f5a845df07e24d8780a978e36352b
staceymoore/yuidoc-bootstrap
helpers/helpers.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/** @babel */\n\nimport { CompositeDisposable, Disposable } from 'atom'\n\nexport default class MarkerManager extends Disposable {\n disposables = new CompositeDisposable()\n\n constructor (editor) {\n super(() => this.disposables....
javascript
edit
0
4
mit
4dbf707da01342a3e1762fcc2422562852d2d6c8
thomasjo/atom-latex,thomasjo/atom-latex,thomasjo/atom-latex
lib/marker-manager.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nvar apiKeys = {\n newsApiKey: '',\n twitter_consumer_key: '',\n twitter_consumer_secret: '',\n twitter_bearer_token: ''\n}\n\nmodule.exports = apiKeys\n\n```\n\nApply this change: Add Twitter user API keys" }, { ...
javascript
edit
0
0
mit
76f095b954e93abb865d12591a2efa6d684584be
SentiSocial/sentisocial-backend,SentiSocial/backend
js/api-keys.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport statusIcon from '../mr_widget_status_icon';\n\nexport default {\n name: 'MRWidgetConflicts',\n props: {\n mr: { type: Object, required: true },\n },\n components: {\n statusIcon,\n },\n template: `\n <div class=\"m...
javascript
edit
0
0
mit
c8596aa9152169c761faaa69f7d85ee5edb829f2
jirutka/gitlabhq,jirutka/gitlabhq,stoplightio/gitlabhq,iiet/iiet-git,axilleas/gitlabhq,jirutka/gitlabhq,iiet/iiet-git,stoplightio/gitlabhq,axilleas/gitlabhq,dreampet/gitlab,jirutka/gitlabhq,dreampet/gitlab,mmkassem/gitlabhq,dreampet/gitlab,axilleas/gitlabhq,stoplightio/gitlabhq,iiet/iiet-git,mmkassem/gitlabhq,stoplight...
app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_conflicts.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\r\n Toast notification popup jQuery plugin\r\n (c) 2016 Nupin Mathew <<EMAIL>>\r\n License: MIT\r\n*/\r\n$(function () {\r\n /*Method to show a toast notification like popup with a message which will be closed after a fixed time*/...
javascript
edit
0
5
mit
5ad5fb949dd9c0edf3380f09a3e70bad95fc0ff3
npnm/Toast-Notification-Popup,npnm/Toast-Notification-Popup
js/toast-notification-popup.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function (module) {\n module.controller(\"SamplesController\", SamplesController);\n SamplesController.$inject = [\"$state\", \"project\", \"$filter\", \"samples\", \"processTemplates\"];\n\n function SamplesController($state,...
javascript
edit
0
2
mit
224f8c9fc079ef36ce37d91d66d25b8fbb1cd373
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/samples/samples-controller.js
rejected_duplicate
Near-duplicate of sample 99230
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar fs = require('fs');\nvar path = require('path');\nvar css = require('css');\n\nmodule.exports = CssFile;\n\nfunction CssFile(dir) {\n this.path = path.resolve(dir);\n\n var content = fs.readFileSync(this.path).toString();\n var s...
javascript
edit
0
2
mit
0b335a1ac8571914794e0174f7d744812a51ac70
sinsoku/clairvoyance,sinsoku/clairvoyance
lib/cssfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst router = require('express').Router()\n\nconst { getProjectDetails } = require('./shared.middleware')\n\nconst {\n populateDetailsFormMiddleware,\n investmentDetailsFormPostMiddleware,\n} = require('./form.middleware')\n\nfunctio...
javascript
edit
0
2
mit
654a281ca7191adc4dfa1d471f84ea9dd189414b
uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend
src/controllers/investment/create.controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* jshint ignore:start */\n\ntry {\n var metaName = prefix + '/config/environment';\n var rawConfig = Ember['default'].$('meta[name=\"' + metaName + '\"]').attr('content');\n var config = JSON.parse(unescape(rawConfig));\n\n var exp...
javascript
edit
0
0
mit
2e71a1a63bcedd24b74f1958c81e150f93ea97a8
twokul/ember-cli,jasonmit/ember-cli,nathanhammond/ember-cli,fpauser/ember-cli,gfvcastro/ember-cli,romulomachado/ember-cli,BrianSipple/ember-cli,fpauser/ember-cli,romulomachado/ember-cli,BrianSipple/ember-cli,seawatts/ember-cli,jrjohnson/ember-cli,jgwhite/ember-cli,sivakumar-kailasam/ember-cli,nathanhammond/ember-cli,Tu...
lib/broccoli/app-config-from-meta.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Check mobile platform\n\n$(document).ready(function () {\n if (Framework7.prototype.device.ios) {\n // Redirect to iOS page\n var iosPaneUrl = new URI('MobilePane-ios.html').absoluteTo(window.location).toString();\n ...
javascript
edit
0
4
mit
7a8058293651b8ac4765a311508fde64e9d36060
stephenegriffin/MHA,stephenegriffin/MHA,stephenegriffin/MHA
Scripts/MobilePane.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nexport default Ember.Component.extend({\n aviaryApiClient: null, // injected\n classNames: ['edit-icon'],\n image: null,\n url: null,\n imageSelector: null,\n closeOnSave: false,\n\n imageToEdit: fun...
javascript
edit
0
3
mit
f034c3ea5c710faf82bb5785d712b0cb0fb75db2
plyfe/ember-aviary,plyfe/ember-aviary
addon/components/aviary-editor.js
rejected_duplicate
Near-duplicate of sample 99535
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport const colors = {\n NEUTRAL_LIGHTEST: '#fff',\n NEUTRAL_LIGHT: '#f7f7fa',\n NEUTRAL: '#e4e4e6',\n NEUTRAL_DARK: '#c0c0c4',\n NEUTRAL_DARKEST: '#82828c',\n TEAL_LIGHTEST: '#e1ecfa',\n TEAL_LIGHT: '#c1cede',\n TEAL: '#64788f...
javascript
edit
0
0
mit
711090e1569bbde571c868d699edb835e6da4fc3
teamleadercrm/teamleader-ui
components/select/constants.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require('path')\n\nmodule.exports = function nuxtBootstrapVue (moduleOtions) {\n // Conditionally require bootstrap original css too if not explicitly disabled\n if (moduleOtions.css !== false) {\n this.options.css.uns...
javascript
edit
0
2
mit
1d09801c962f06aec7c97b6e46b40e0c984a108b
nuxt-community/modules
modules/bootstrap-vue/index.js
accepted
null
true