conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "human", "value": "Add test common bus register for test mod 2" }, { "from": "gpt", "value": "package info.u_team.u_team_test2.init;\n\nimport org.apache.logging.log4j.LogManager;\n\nimport info.u_team.u_team_core.api.construct.*;\nimport info.u_team.u_team_test2.TestMod2;\nimport net....
java
chosen
[ { "from": "human", "value": "[KARAF-1406,KARAF-1407] Add itest to prove fixes\n\nSigned-off-by: Andreas Pieber <anpieber@gmail.com>\n\ngit-svn-id: 71d8a689455c5fbb0f077bc40adcfc391e14cb9d@1330774 13f79535-47bb-0310-9956-ffa450edef68\n" }, { "from": "gpt", "value": "/*\n * Licensed to the Apache ...
java
chosen
[ { "from": "human", "value": "Add test for GPX data-structures.\n" }, { "from": "gpt", "value": "/*\n * Java Genetic Algorithm Library (@__identifier__@).\n * Copyright (c) @__year__@ Franz Wilhelmstötter\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not us...
java
chosen
[ { "from": "human", "value": "Add TableInfo wrapper for jOOQ Tables.\n" }, { "from": "gpt", "value": "package org.labkey.dbutils.jooq;\n\nimport org.jetbrains.annotations.Nullable;\nimport org.jooq.DataType;\nimport org.jooq.Field;\nimport org.jooq.Record;\nimport org.jooq.Table;\nimport org.labk...
java
chosen
[ { "from": "human", "value": "Add new exception type to throw when validating message body sections\n\nThe current advnaced message implementation throws illegal argument\nexception but the method should be altered to throw ClientException and\nthrow a message format violation error among other things." },...
java
chosen
[ { "from": "human", "value": "Remove unnecessary check - testing scenario may need to pass null parameter\n\nsvn path=/harmony/; revision=498542\n" }, { "from": "gpt", "value": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See th...
java
chosen
[ { "from": "human", "value": "Add I/O plugin stub for scripts\n\nIt doesn't work yet, because the ScriptService does not yet provide the\nAPI necessary to actually open the script in the script editor.\n" }, { "from": "gpt", "value": "/*\n * #%L\n * ImageJ software for multidimensional image proc...
java
chosen
[ { "from": "human", "value": "Document the main package of the library\n" }, { "from": "gpt", "value": "/*\n * Copyright (c) 2016 Spotify AB\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\n * use this file except in compliance with the License. You may obtai...
java
chosen
[ { "from": "human", "value": "Add healthcheck endpoint to service\n" }, { "from": "gpt", "value": "package com.github.onsdigital.babbage.api.endpoint;\n\nimport com.github.davidcarboni.restolino.framework.Api;\n\nimport javax.servlet.http.HttpServletRequest;\nimport javax.servlet.http.HttpServlet...
java
chosen
[ { "from": "human", "value": "Add source code to Onboarding game\n" }, { "from": "gpt", "value": "import java.util.*;\n\nclass Player {\n\n public static void main(String args[]) {\n Scanner in = new Scanner(System.in);\n\n // game loop\n while (true) {\n String...
java
chosen
[ { "from": "human", "value": "PIG-644: Duplicate column names in foreach do not throw parser error\n\ngit-svn-id: 8c49d51cc539c84b28b5042abd6e265f31af12f8@826816 13f79535-47bb-0310-9956-ffa450edef68\n" }, { "from": "gpt", "value": "package org.apache.pig.impl.logicalLayer.validators;\n\nimport or...
java
chosen
[ { "from": "human", "value": "Add java solution for 160. Intersection of Two Linked Lists\n\n160. Intersection of Two Linked Lists: https://leetcode.com/problems/intersection-of-two-linked-lists/" }, { "from": "gpt", "value": "package leetcode.intersection_of_two_linked_lists;\n\nimport common.Li...
java
chosen
[ { "from": "human", "value": "Revert \"1. moviesAfter в AddMovieTest не получает нужного значения. Wait дожидается загрузки searchbox, но фильмы могут загрузиться позже. Нужно ждать загрузки именно нужного элемента.\"\n\nThis reverts commit fa6cf3d93a25e4007901f4e218ceb5132bbfe3e7.\n" }, { "from": "g...
java
chosen
[ { "from": "human", "value": "Add missing Uncolossal Chest config\n" }, { "from": "gpt", "value": "package org.cyclops.colossalchests.block;\n\nimport net.minecraft.client.model.ModelChest;\nimport net.minecraftforge.fml.relauncher.Side;\nimport net.minecraftforge.fml.relauncher.SideOnly;\nimport...
java
chosen
[ { "from": "human", "value": "Add a game repository specifically for unit tests, that can provide a listing of all of the available test games and load rulesheet-only versions of specific games.\n\ngit-svn-id: 4739e81c2fe647bfb539b919360e2c658e6121ea@463 716a755e-b13f-cedc-210d-596dafc6fb9b\n" }, { "...
java
chosen
[ { "from": "human", "value": "Add matrix chain multiplication algorithm\n" }, { "from": "gpt", "value": "public class MatrixChainMultiplication {\n public static void main(String[] args) {\n System.out.println(solve(new int[] { 6, 4, 30, 2, 10, 5 }));\n }\n\n public static int sol...
java
chosen
[ { "from": "human", "value": "Add a listener to configure the filter" }, { "from": "gpt", "value": "package org.apache.markt;\n\nimport java.util.EnumSet;\n\nimport javax.servlet.DispatcherType;\nimport javax.servlet.Filter;\nimport javax.servlet.FilterRegistration;\nimport javax.servlet.ServletC...
java
chosen
[ { "from": "human", "value": "Add getActivePGIds and getPGIdStats commands.\n" }, { "from": "gpt", "value": "package com.exalttech.trex.core;\n\nimport com.fasterxml.jackson.core.JsonProcessingException;\nimport com.fasterxml.jackson.databind.ObjectMapper;\n\nimport java.util.ArrayList;\nimport j...
java
chosen
[ { "from": "human", "value": "Add admin manage test class.\n" }, { "from": "gpt", "value": "package me.haosdent.cgroup.manage;\n\nimport org.junit.After;\nimport org.junit.Before;\nimport org.junit.Test;\n\npublic class TestAdmin {\n\n @Before\n public void setUp() {}\n\n @After\n public void...
java
chosen
[ { "from": "human", "value": "Add group manage test class.\n" }, { "from": "gpt", "value": "package me.haosdent.cgroup.manage;\n\nimport org.junit.After;\nimport org.junit.Before;\nimport org.junit.Test;\n\npublic class TestGroup {\n\n @Before\n public void setUp() {}\n\n @After\n public void...
java
chosen
[ { "from": "human", "value": "Fix compilation error caused by missing class\n" }, { "from": "gpt", "value": "package com.netflix.suro.routing.filter;\n\nimport com.google.common.base.Predicate;\n\n/**\n * A contract for filtering events. These filters can be applied/defined both at the publisher ...
java
chosen
[ { "from": "human", "value": "Add a bundle to set the correct MetricsRegistry on the ServletContext\n" }, { "from": "gpt", "value": "package com.hubspot.singularity;\n\nimport com.codahale.metrics.servlets.MetricsServlet;\nimport io.dropwizard.Bundle;\nimport io.dropwizard.lifecycle.ServerLifecyc...
java
chosen
[ { "from": "human", "value": "Migrate Apps Script Execution Snippet" }, { "from": "gpt", "value": "// [START apps_script_execute]\n/**\n * Call the API to run an Apps Script function that returns a list\n * of folders within the user's root directory on Drive.\n *\n * @return list of String folde...
java
chosen
[ { "from": "human", "value": "Add a sensor which gives the time for when the report was generated\n" }, { "from": "gpt", "value": "package no.panopticon.client.sensor.impl;\n\nimport no.panopticon.client.model.Measurement;\nimport no.panopticon.client.sensor.Sensor;\n\nimport java.time.LocalDateT...
java
chosen
[ { "from": "human", "value": "Add test suite for option tests\n" }, { "from": "gpt", "value": "/*\n * To change this template, choose Tools | Templates\n * and open the template in the editor.\n */\npackage com.laadadra.fitools.option;\n\nimport org.junit.After;\nimport org.junit.AfterClass;\nimp...
java
chosen
[ { "from": "human", "value": "Add java solution for 99. Recover Binary Search Tree\n\n99. Recover Binary Search Tree: https://leetcode.com/problems/recover-binary-search-tree/" }, { "from": "gpt", "value": "package leetcode.recover_binary_search_tree;\n\nimport java.util.Random;\n\nimport common....
java
chosen
[ { "from": "human", "value": "Add data object for saving SubGoals\n" }, { "from": "gpt", "value": "package de.fau.amos.virtualledger.dtos;\n\npublic class SavingsAccountSubGoal {\n\n private String name;\n private String amount;\n\n public String getName() {\n return name;\n }\...
java
chosen
[ { "from": "human", "value": "Add retrofit interface for show summary.\n" }, { "from": "gpt", "value": "package com.jakewharton.trakt.services;\n\nimport com.jakewharton.trakt.entities.TvShow;\nimport retrofit.http.GET;\nimport retrofit.http.Path;\n\n/**\n * Endpoints for Show.\n */\npublic inter...
java
chosen
[ { "from": "human", "value": "Test that all parents are set\n" }, { "from": "gpt", "value": "package uk.org.taverna.scufl2.api.common;\n\nimport org.junit.Test;\n\nimport uk.org.taverna.scufl2.api.ExampleWorkflow;\nimport uk.org.taverna.scufl2.api.common.Visitor.VisitorAdapter;\nimport uk.org.tav...
java
chosen
[ { "from": "human", "value": "Use parent Directory for checking access permission.\nCache Access permission for frequently requested path and userid.\nRefactor objectification of an iRODS json message.\n" }, { "from": "gpt", "value": "/*\n * Copyright 2015 iychoi.\n *\n * Licensed under the Apach...
java
chosen
[ { "from": "human", "value": "Add an examples for distributed counters.\n" }, { "from": "gpt", "value": "package net.openhft.chronicle.map.example;\n\nimport net.openhft.chronicle.map.ChronicleMap;\nimport net.openhft.chronicle.map.ChronicleMapBuilder;\nimport net.openhft.lang.model.DataValueClas...
java
chosen
[ { "from": "human", "value": "Add convenience class for prioritized event handling.\n\nThis used to be revision r3228.\n" }, { "from": "gpt", "value": "//\n// EventHandler.java\n//\n\n/*\nImageJ software for multidimensional image processing and analysis.\n\nCopyright (c) 2010, ImageJDev.org.\nAl...
java
chosen
[ { "from": "human", "value": "Extend Number type to represent property types\n" }, { "from": "gpt", "value": "package org.mastercoin;\n\n/**\n * Number type to represent an Omni protocol property type.\n */\npublic class PropertyType extends Number {\n private final int value;\n\n public st...
java
chosen
[ { "from": "human", "value": "Add Java code used for testing JCE policy installation\n" }, { "from": "gpt", "value": "# Copyright [2014] [Kyle McGovern]\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# Yo...
java
chosen
[ { "from": "human", "value": "Add tests for receiving googleMap\n" }, { "from": "gpt", "value": "package com.sdoward.rxgooglemap;\n\nimport com.google.android.gms.maps.*;\n\nimport org.junit.*;\nimport org.junit.runner.RunWith;\nimport org.mockito.*;\nimport org.powermock.core.classloader.annotat...
java
chosen
[ { "from": "human", "value": "Add simple tests for ValidatorTypeCode\n" }, { "from": "gpt", "value": "package com.networknt.schema;\n\nimport static org.junit.Assert.assertEquals;\nimport org.junit.Test;\n\npublic class ValidatorTypeCodeTest {\n\n @Test\n public void testFromValueString() {...
java
chosen
[ { "from": "human", "value": "Add generic base list adapter\n" }, { "from": "gpt", "value": "package com.jaselogic.adamsonelearn;\n\nimport java.util.ArrayList;\n\nimport android.content.Context;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGroup;\nimpo...
java
chosen
[ { "from": "human", "value": "Use custom classloader that reads classpath entries from the file to avoid failure creating junit process.\n" }, { "from": "gpt", "value": "/*\n * Copyright 2000-2010 JetBrains s.r.o.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you m...
java
chosen
[ { "from": "human", "value": "Change copyright in Apache 2 license to 2013\ndocumented\ndocumented\nimages rest service returns one imagerecord if id requested , id removed from url\nmake ImaImageRecord queryDatabaseById(String id) method public for use in testing\nimaging java classes added\n" }, { ...
java
chosen
[ { "from": "human", "value": "Add Von Neumann neighborhood square grid to topologies.\n" }, { "from": "gpt", "value": "package cs437.som.topology;\n\nimport cs437.som.Dimension;\nimport cs437.som.GridType;\nimport cs437.som.SOMError;\n\n/**\n * A square grid strategy for SOMs, using Manhattan dis...
java
chosen
[ { "from": "human", "value": "Add a skeleton for problem 216\n" }, { "from": "gpt", "value": "package leetcode;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\n/**\n * https://leetcode.com/problems/combination-sum-iii/\n */\npublic class Problem216 {\n public List<List<Integer>> comb...
java
chosen
[ { "from": "human", "value": "Add a simple test of CheckBoxButton\n" }, { "from": "gpt", "value": "package org.gwtbootstrap3.client.ui;\n\n/*\n * #%L\n * GwtBootstrap3\n * %%\n * Copyright (C) 2013 - 2014 GwtBootstrap3\n * %%\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n...
java
chosen
[ { "from": "human", "value": "Add program to validate catalog\n" }, { "from": "gpt", "value": "package com.boundary.metrics.vmware;\n\nimport java.io.File;\n\nimport com.boundary.metrics.vmware.poller.MORCatalog;\nimport com.boundary.metrics.vmware.poller.MORCatalogFactory;\n\npublic class Catalo...
java
chosen
[ { "from": "human", "value": "Add unit test exposing a bug in validation.\n" }, { "from": "gpt", "value": "\n/*\n * Copyright (C) 2015 Archie L. Cobbs. All rights reserved.\n */\n\npackage org.jsimpledb;\n\nimport java.lang.annotation.ElementType;\nimport java.lang.annotation.Retention;\nimport j...
java
chosen
[ { "from": "human", "value": "Check non-verbose build task generation\n" }, { "from": "gpt", "value": "/*\n * Bach - Java Shell Builder\n * Copyright (C) 2020 Christian Stein\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in complian...
java
chosen
[ { "from": "human", "value": "Check the padding in the stable_id_1051 column in certain species.\n" }, { "from": "gpt", "value": "/*\n Copyright (C) 2003 EBI, GRL\n \n This library is free software; you can redistribute it and/or\n modify it under the terms of the GNU Lesser General Public\n Lice...
java
chosen
[ { "from": "human", "value": "Create : 598 Range Addition II\n" }, { "from": "gpt", "value": "public class Solution {\n\n public int maxCount(int m, int n, int[][] ops) {\n\n int row = m;\n int col = n;\n\n for (int[] op : ops) {\n row = Math.min(row, op[0]);\n ...
java
chosen
[ { "from": "human", "value": "Add a data model for the plugins displayed in the enabled plugins list.\n" }, { "from": "gpt", "value": "package org.nwapw.abacus.fx;\n\nimport javafx.beans.property.BooleanProperty;\nimport javafx.beans.property.SimpleBooleanProperty;\n\npublic class ToggleablePlugi...
java
chosen
[ { "from": "human", "value": "Fix issue-49. \nAdd a simple redeploy mojo." }, { "from": "gpt", "value": "/*\n * Copyright (C) 2009 Jayway AB\n * Copyright (C) 2007-2008 JVending Masa\n * Copyright (C) 2010 akwuinet A.G.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n *...
java
chosen
[ { "from": "human", "value": "Add a pure IJ2 version of Capture Screen plugin\n" }, { "from": "gpt", "value": "/*\n * #%L\n * ImageJ software for multidimensional image processing and analysis.\n * %%\n * Copyright (C) 2009 - 2012 Board of Regents of the University of\n * Wisconsin-Madison, Broad...
java
chosen
[ { "from": "human", "value": "Add table model for mapped elements\n" }, { "from": "gpt", "value": "/*\n * Copyright 2016 the original author or authors.\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...
java
chosen
[ { "from": "human", "value": "Add java solution for 228. Summary Ranges\n\n228. Summary Ranges: https://leetcode.com/problems/summary-ranges/" }, { "from": "gpt", "value": "package leetcode.summary_ranges;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\npublic class Solution {\n publ...
java
chosen
[ { "from": "human", "value": "Add a filter to measure number of millis a controller takes\n" }, { "from": "gpt", "value": "/**\n * \n */\npackage com.trendrr.strest.contrib.filters;\n\nimport java.util.Date;\n\nimport org.apache.commons.logging.Log;\nimport org.apache.commons.logging.LogFactory;\...
java
chosen
[ { "from": "human", "value": "Add an email validation constraint\n" }, { "from": "gpt", "value": "/*******************************************************************************\n * MIT License\n *\n * Copyright (c) 2017 Piotr Rusin <piotr.rusin88@gmail.com>\n *\n * Permission is hereby granted,...
java
chosen
[ { "from": "human", "value": "Add a performance tester for parsing\n" }, { "from": "gpt", "value": "/*\n * See LICENSE file in distribution for copyright and licensing information.\n */\npackage ioke.lang.performance;\n\nimport java.io.*;\n\nimport ioke.lang.*;\nimport ioke.lang.parser.*;\n\n/**\...
java
chosen
[ { "from": "human", "value": "Remove All Adjacent Duplicates In String\n" }, { "from": "gpt", "value": "package com.cyq7on.leetcode.stack;\n\n\nimport java.util.Stack;\n\n/**\n * @author cyq7on\n * @description Given a string S of lowercase letters, a duplicate removal consists of choosing two ad...
java
chosen
[ { "from": "human", "value": "XWIKI-608: Add a default index page redirecting to /bin/view/Main/\nImplemented using a simple servlet.\n\n\ngit-svn-id: 50c93b9c2d9041e46610830dd7836bad08be8b2e@1859 f329d543-caf0-0310-9063-dda96c69346f\n" }, { "from": "gpt", "value": "/*\n * Copyright 2007, XpertNe...
java
chosen
[ { "from": "human", "value": "Add runtime exception mapper to 500 status code.\n" }, { "from": "gpt", "value": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional informat...
java
chosen
[ { "from": "human", "value": "Test added for SwaggerRouter Rx wrapper\n" }, { "from": "gpt", "value": "package io.vertx.rxjava.ext.swagger.router;\n\nimport io.swagger.models.Swagger;\nimport io.swagger.parser.SwaggerParser;\n\nimport io.vertx.core.json.JsonArray;\nimport io.vertx.ext.unit.Async;...
java
chosen
[ { "from": "system", "value": "Make sure multicast tests pass on all os'es\n" }, { "from": "human", "value": "package io.netty.testsuite.transport.socket.nio.oio;\n\nimport java.util.concurrent.Executor;\n\nimport io.netty.channel.socket.DatagramChannelFactory;\nimport io.netty.channel.socket.nio...
java
chosen
[ { "from": "human", "value": "Move class to the correct folder\n" }, { "from": "gpt", "value": "package com.informatorio;\n\nimport java.util.ArrayList;\nimport java.util.Collections;\nimport java.util.Comparator;\nimport java.util.List;\n\n/**\n * Created by Informatorio on 05/09/2016.\n */\npub...
java
chosen
[ { "from": "human", "value": "Add definition of throttler class\n\ngit-svn-id: 1c3cc8ce44b6d2f166b170cdd93b19b2713d8895@1550265 13f79535-47bb-0310-9956-ffa450edef68\n" }, { "from": "gpt", "value": "/* $Id$ */\n\n/**\n* Licensed to the Apache Software Foundation (ASF) under one or more\n* contribu...
java
chosen
[ { "from": "human", "value": "Add code for Twist In The Tale 3.1\n" }, { "from": "gpt", "value": "/**\n * Twist in the Tale 3.1 from the OCA Java SE 7 book by Mala Gupta (Manning Publications)\n * Created by Josef on 12/24/13.\n */\nclass Phone {\n String phoneNumber = \"123456789\";\n void...
java
chosen
[ { "from": "human", "value": "Add skeleton for problem 73\n" }, { "from": "gpt", "value": "package leetcode;\n\nimport java.util.Arrays;\n\n/**\n * https://leetcode.com/problems/set-matrix-zeroes/\n */\npublic class Problem73 {\n public void setZeroes(int[][] matrix) {\n \n }\n \n...
java
chosen
[ { "from": "human", "value": "Add dht.hash pkg for various hash functions\n" }, { "from": "gpt", "value": "/*\n * Copyright (c) 2014, Colorado State University All rights reserved.\n * \n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided...
java
chosen
[ { "from": "human", "value": "Add recursived list in Java\n" }, { "from": "gpt", "value": "class List {\n public int head;\n public List tail;\n \n public List(int h, List t) {\n head = h;\n tail = t;\n } \n}\n\npublic class Main {\n public static void main(String[] args) {\n List ...
java
chosen
[ { "from": "human", "value": "Bring back an App Singleton, to house a single copy of the TaskDao.\n" }, { "from": "gpt", "value": "package todomore.android;\n\nimport android.app.Application;\n\npublic class TodoMoreApplication extends Application {\n\n\tprivate TaskDao mTaskDao;\n\t\n\t@Override...
java
chosen
[ { "from": "human", "value": "Add a test case for missing attributes in filters, which was previously\ncausing an NPE. (FELIX-2401)\n\n\ngit-svn-id: e057f57e93a604d3b43d277ae69bde5ebf332112@957239 13f79535-47bb-0310-9956-ffa450edef68\n" }, { "from": "gpt", "value": "/*\n * Licensed to the Apache ...
java
chosen
[ { "from": "human", "value": "Initialize the game layer definitions\n" }, { "from": "gpt", "value": "package xyz.juanes.atakingos.ui;\n\nimport android.util.Log;\n\npublic class AtakingosLayer\n{\n //Default width\n public static int def_width = 400;\n\n //Default height (only for landscape)\n...
java
chosen
[ { "from": "human", "value": "Add helper to get all threads in JVM\n" }, { "from": "gpt", "value": "// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.\npackage com.yahoo.concurrent;\n\nimport java.util.Arrays;\nimport java.util.Collection;\nim...
java
chosen
[ { "from": "human", "value": "Add CORS access header to configuration\n" }, { "from": "gpt", "value": "package com.pm.server;\n\nimport org.springframework.context.annotation.Bean;\nimport org.springframework.context.annotation.Configuration;\nimport org.springframework.web.servlet.config.annotat...
java
chosen
[ { "from": "human", "value": "Add utility methods for dumping binary packets to disk.\n" }, { "from": "gpt", "value": "package net.straylightlabs.hola.utils;\n\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\nimport java.io.IOException;\nimport java.nio.file.Files;\nimport java.nio.f...
java
chosen
[ { "from": "human", "value": "Add annotation to mark immutability" }, { "from": "gpt", "value": "/*\n * Copyright 2011 Bert van Brakel\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 ...
java
chosen
[ { "from": "human", "value": "Implement JsonParser to read the data\n" }, { "from": "gpt", "value": "package com.andela.webservice.parser;\n\nimport com.andela.webservice.model.Flower;\n\nimport org.json.JSONArray;\nimport org.json.JSONException;\nimport org.json.JSONObject;\n\nimport java.util.A...
java
chosen
[ { "from": "human", "value": "Add component definition for ThreadPoolProvider with custom config\n" }, { "from": "gpt", "value": "// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.\npackage com.yahoo.vespa.model.container;\n\nimport co...
java
chosen
[ { "from": "human", "value": "Add LinxView and start working with the first approximation to the library user interface\n" }, { "from": "gpt", "value": "/*\n * Copyright (C) 2015 Pedro Vicente Gomez Sanchez.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not...
java
chosen
[ { "from": "human", "value": "Add wrapper around the Command.builder() function to allow for unit testing\n" }, { "from": "gpt", "value": "package com.ericgrandt.commands;\n\nimport org.spongepowered.api.command.Command;\n\npublic class CommandBuilder {\n public Command.Builder getBuilder() {\...
java
chosen
[ { "from": "human", "value": "Add servlet to query Keywords\n" }, { "from": "gpt", "value": "\npackage com.google.sps.servlets;\n\nimport java.io.IOException;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.Collection;\nimport java.util.List;\nimport javax.servlet.annotat...
java
chosen
[ { "from": "human", "value": "Add test for list tasks REST endpoint\n\nChange-Id: Ia8d22b2c39d82e8c4e05c7800912361f43d936a3\nSigned-off-by: Edwin Kempin <b444e279ad95fdef4fbdd82c813b624595df204a@sap.com>\n" }, { "from": "gpt", "value": "// Copyright (C) 2014 The Android Open Source Project\n//\n/...
java
chosen
[ { "from": "human", "value": "Add simple temp test (POSTAGE-23)\n\ngit-svn-id: 0cbd32e9b25c4c4b053e190198f2521e2d278401@1350157 13f79535-47bb-0310-9956-ffa450edef68\n" }, { "from": "gpt", "value": "/****************************************************************\n * Licensed to the Apache Softwa...
java
chosen
[ { "from": "human", "value": "Add New View controller to serve the new diseaseTait Page\n" }, { "from": "gpt", "value": "package uk.ac.ebi.spot.goci.curation.controller;\n\nimport lombok.extern.slf4j.Slf4j;\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframewor...
java
chosen
[ { "from": "human", "value": "Add configuration for the release analytics job\n" }, { "from": "gpt", "value": "/*******************************************************************************\n * Copyright © 2015 EMBL - European Bioinformatics Institute\n * <p/>\n * Licensed under the Apache Lice...
java
chosen
[ { "from": "human", "value": "Add request denied to bots exception\n" }, { "from": "gpt", "value": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2016 Vincent Zhang/PhoenixLAB\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated...
java
chosen
[ { "from": "human", "value": "Add FX Forward generator tool\n" }, { "from": "gpt", "value": "/**\n * Copyright (C) 2013 - present by OpenGamma Inc. and the OpenGamma group of companies\n * \n * Please see distribution for license.\n */\npackage com.opengamma.examples.generator;\n\nimport com.open...
java
chosen
[ { "from": "human", "value": "Add test for WebSSO \"username\" parser\n" }, { "from": "gpt", "value": "package edu.northwestern.bioinformatics.studycalendar.security;\n\nimport edu.northwestern.bioinformatics.studycalendar.testing.StudyCalendarTestCase;\nimport edu.northwestern.bioinformatics.stu...
java
chosen
[ { "from": "human", "value": "Add assertStatisticsEqual for easier testing\n" }, { "from": "gpt", "value": "package cz.cuni.mff.d3s.spl.test;\n\nimport org.junit.Ignore;\nimport static org.junit.Assert.*;\n\nimport cz.cuni.mff.d3s.spl.core.data.Statistics;\n\n@Ignore\npublic class TestUtils {\n\t...
java
chosen
[ { "from": "human", "value": "Implement simple recursice fibonacci method\n" }, { "from": "gpt", "value": "package fibonacci;\n\npublic class Fibonacci\n{\n public static int fibonacci(int n)\n {\n if (n < 2)\n return n;\n\n return fibonacci(n - 1) + fibonacci(n - 2);\n }\n\n publi...
java
chosen
[ { "from": "human", "value": "Add Merge Sort in Java\n" }, { "from": "gpt", "value": "package com.dev.namhoai.sort;\n\npublic class MergeSort {\n\n public static void sort(int[] a) {\n int[] helper = new int[a.length];\n sort(a, 0, a.length - 1, helper);\n\n }\n\n public st...
java
chosen
[ { "from": "human", "value": "ovirt-engine: Add quota enforcement type enum.\n\nIn the next patch I added the quota enforcement type enum.\nThe quota Enforcement type enum, should indicate if the storage pool is\nenforcing the quota limitation or not.\n\nAcked by:Omer Frenkel <ofrenkel@redhat.com>\n\nChange...
java
chosen
[ { "from": "human", "value": "Add an abstract implementation for counting events.\n" }, { "from": "gpt", "value": "/*******************************************************************************\n * Copyright (C) 2017 Push Technology Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (t...
java
chosen
[ { "from": "human", "value": "Check in template for BLC Js ResourceTransformer.\n" }, { "from": "gpt", "value": "/*\n * #%L\n * BroadleafCommerce Common Libraries\n * %%\n * Copyright (C) 2009 - 2015 Broadleaf Commerce\n * %%\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n...
java
chosen
[ { "from": "human", "value": "Add illustration where Predicate.isEqual is useful\n" }, { "from": "gpt", "value": "\npackage net.restlesscoder.sandbox;\n\nimport java.util.function.Predicate;\n\npublic class EqualsPredicate {\n\n\tpublic static void main(final String... args) {\n\t\t// Why do we n...
java
chosen
[ { "from": "human", "value": "Add an annotation to mark types/methods as entry points\n" }, { "from": "gpt", "value": "package jamex.common;\n\nimport java.lang.annotation.ElementType;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java.lang.annotati...
java
chosen
[ { "from": "human", "value": "Add unit tests for list matcher parsing" }, { "from": "gpt", "value": "package org.monospark.spongematchers.parser.type;\n\nimport static org.hamcrest.CoreMatchers.not;\nimport static org.junit.Assert.assertThat;\nimport static org.monospark.spongematchers.testutil.H...
java
chosen
[ { "from": "human", "value": "Define a test for Fill and Ramp\n" }, { "from": "gpt", "value": "/*\n * Zorbage: an algebraic data hierarchy for use in numeric processing.\n *\n * Copyright (C) 2016-2018 Barry DeZonia\n * \n * Redistribution and use in source and binary forms, with or without\n * m...
java
chosen
[ { "from": "human", "value": "Add some unit tests for the GraphDBHandler\n" }, { "from": "gpt", "value": "package beaform.dao;\n\nimport static org.junit.Assert.assertNotNull;\n\nimport org.junit.Test;\n\n/**\n * Test for the GraphDbHandler.\n *\n * @author Steven Post\n *\n */\npublic class Grap...
java
chosen
[ { "from": "human", "value": "Add minimal tests to Identifiable\n" }, { "from": "gpt", "value": "package arez.component;\n\nimport javax.annotation.Nonnull;\nimport org.testng.annotations.Test;\nimport static org.testng.Assert.*;\n\npublic class IdentifiableTest\n extends AbstractArezComponentTe...
java
chosen
[ { "from": "human", "value": "Add tests for tags command\n" }, { "from": "gpt", "value": "package seedu.taskman.logic.logicmanager;\n\nimport org.junit.Test;\nimport seedu.taskman.logic.commands.CommandResult;\nimport seedu.taskman.logic.commands.TagsCommand;\nimport seedu.taskman.model.TaskMan;\...
java
chosen
[ { "from": "human", "value": "Add build action view intent in intent helper\n" }, { "from": "gpt", "value": "package io.github.droidkaigi.confsched2017.view.helper;\n\nimport android.content.Context;\nimport android.content.Intent;\nimport android.net.Uri;\nimport android.support.annotation.NonNu...
java
chosen
[ { "from": "human", "value": "Add tests for the AliasProvider\n" }, { "from": "gpt", "value": "package cz.scholz.aliaskeymanager;\n\nimport org.testng.Assert;\nimport org.testng.annotations.Test;\n\nimport java.security.Security;\n\n/**\n * Created by schojak on 31.5.16.\n */\npublic class AliasP...
java
chosen