conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "human",
"value": "Add missing delete permanently action"
},
{
"from": "gpt",
"value": "package de.darwinspl.feature.graphical.editor.actions.feature;\n\nimport org.eclipse.gef.EditPart;\nimport org.eclipse.gef.Request;\nimport org.eclipse.gef.commands.Command;\nimport org.eclipse.jfac... | java | chosen |
[
{
"from": "human",
"value": "Add java8 parallel merge sort perf test. It's about 15% faster than the fork join merge sort implementation\n"
},
{
"from": "gpt",
"value": "package org.bui.algorithms;\n\nimport org.openjdk.jmh.annotations.*;\n\nimport java.util.Arrays;\nimport java.util.concurrent.... | java | chosen |
[
{
"from": "human",
"value": "Add a servlet to confirm Tenant table."
},
{
"from": "gpt",
"value": "package net.seannos.example.multitenant.util.debug;\n\nimport java.io.IOException;\nimport java.io.PrintWriter;\nimport java.util.List;\n\nimport javax.persistence.EntityManager;\nimport javax.pers... | java | chosen |
[
{
"from": "human",
"value": "Add an additional interop/deployment test scenario to check the enhancement\nto use digest password type for UsernameToken signature.\n\ngit-svn-id: 10bc45916fe30ae642aa5037c9a4b05727bba413@567000 13f79535-47bb-0310-9956-ffa450edef68\n"
},
{
"from": "gpt",
"value": "... | java | chosen |
[
{
"from": "human",
"value": "Add dim selection widget interface\n\nMigrated from imagej-ui-swing.\n"
},
{
"from": "gpt",
"value": "/*\n * #%L\n * ImageJ software for multidimensional image processing and analysis.\n * %%\n * Copyright (C) 2009 - 2014 Board of Regents of the University of\n * Wis... | java | chosen |
[
{
"from": "human",
"value": "Add a pH Sensor Form for setting up a pH Sensor\n"
},
{
"from": "gpt",
"value": "package com.sb.elsinore.html;\n\nimport static org.rendersnake.HtmlAttributesFactory.class_;\nimport static org.rendersnake.HtmlAttributesFactory.id;\nimport static org.rendersnake.HtmlA... | java | chosen |
[
{
"from": "human",
"value": "Add simple user API to stack-allocate NIO buffers\n\nI wanted to play a bit with a user API in the form of a Stack class,\nwhose static method implementations immediately throw an exception if\nthe JVM is not started with a Java Agent to give the user feedback."
},
{
"fr... | java | chosen |
[
{
"from": "human",
"value": "Fix build (add missing class)\n"
},
{
"from": "gpt",
"value": "/* ==========================================\r\n * Laverca Project\r\n * https://sourceforge.net/projects/laverca/\r\n * ==========================================\r\n * Copyright 2015 Laverca Project\r\... | java | chosen |
[
{
"from": "human",
"value": "Add unit tests for Value class\n\nIs this class used anywhere?\n"
},
{
"from": "gpt",
"value": "package edu.colorado.csdms.wmt;\n\nimport static org.junit.Assert.*;\n\nimport org.junit.After;\nimport org.junit.Before;\nimport org.junit.Test;\n\nimport edu.colorado.cs... | java | chosen |
[
{
"from": "human",
"value": "BOOKKEEPER-332: Add SubscriptionPreferences to record all preferences for a subscription (sijie via ivank) [missing files]\n\ngit-svn-id: 5a2ad27615d45e22b19cf6d1944dba824abfe66e@1374327 13f79535-47bb-0310-9956-ffa450edef68\n"
},
{
"from": "gpt",
"value": "/**\n * Li... | java | chosen |
[
{
"from": "human",
"value": "Add test helper to retrieve entity and association cache\n"
},
{
"from": "gpt",
"value": "/*\n * Hibernate, Relational Persistence for Idiomatic Java\n *\n * JBoss, Home of Professional Open Source\n * Copyright 2011 Red Hat Inc. and/or its affiliates and other contr... | java | chosen |
[
{
"from": "human",
"value": "[Scenario] Add skeleton class for CSV Export action\n\nAdd skeleton ExportCSVAction to begin work\non nasa/MCT-Plugins#111\n"
},
{
"from": "gpt",
"value": "/*******************************************************************************\n * Mission Control Technologi... | java | chosen |
[
{
"from": "human",
"value": "Create the class which will be used as the base for all the GATK programs used\nin the pipeline.\n"
},
{
"from": "gpt",
"value": "package com.github.sparkcaller;\n\nimport org.broadinstitute.gatk.engine.CommandLineGATK;\n\nimport java.io.Serializable;\nimport java.ut... | java | chosen |
[
{
"from": "human",
"value": "Create cache class to store/process heavy computation Tag trees\n"
},
{
"from": "gpt",
"value": "package org.jcodegen.html.cache;\n\nimport org.jcodegen.html.Tag;\n\nimport java.util.concurrent.ExecutorService;\n\npublic abstract class TagTreeFragmentCache {\n\n p... | java | chosen |
[
{
"from": "human",
"value": "Add unit tests for formatting.\n\n\ngit-svn-id: 293778eaa97c8c94097d610b1bd5133a8f478f36@15599 4f837ed2-42f5-46e7-a7a5-fa17313484d4\n"
},
{
"from": "gpt",
"value": "/*\n * $Id: TestArchivalUnitStatus.java,v 1.1 2012-03-12 21:32:25 barry409 Exp $\n */\n\n/*\n\nCopyrig... | java | chosen |
[
{
"from": "human",
"value": "Add test to show issues with different JPF configurations\n\nThis test shows that we can't run JPF multiple times with different\nconfigurations in the same JVM and get reliable results. In this case\nJPF should detect the concurrency bug when run for the second time\nwith chan... | java | chosen |
[
{
"from": "human",
"value": "Add test for Tokens in gremlin-driver.\n"
},
{
"from": "gpt",
"value": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * re... | java | chosen |
[
{
"from": "human",
"value": "Create realm config class in example project\n"
},
{
"from": "gpt",
"value": "package br.com.bloder.better_migrations.realm.internal;\n\nimport android.content.Context;\n\nimport br.com.bloder.better_migrations.migrations.VersionOne;\nimport br.com.bloder.migration.c... | java | chosen |
[
{
"from": "human",
"value": "Add solution for caesar cipher\n"
},
{
"from": "gpt",
"value": "/**\n * \n */\npackage algorithms.strings;\n\nimport java.util.Scanner;\n\n/**\n * Challenge: https://www.hackerrank.com/challenges/caesar-cipher-1\n * \n * @author Sudharsanan Muralidharan\n */\npublic ... | java | chosen |
[
{
"from": "human",
"value": "Patch for TIKA-1096 CompressorParser: Add support for handling concatenated InputStreams contributed by Gregory Canan.\n\ngit-svn-id: de575e320ab8ef6bd6941acfb783cdb8d8307cc1@1460100 13f79535-47bb-0310-9956-ffa450edef68\n"
},
{
"from": "gpt",
"value": "/*\n * License... | java | chosen |
[
{
"from": "human",
"value": "Add in a CDI producer for Logger\n"
},
{
"from": "gpt",
"value": "package org.realityforge.tarrabah;\n\nimport java.util.logging.Logger;\nimport javax.enterprise.inject.Produces;\nimport javax.enterprise.inject.spi.InjectionPoint;\n\n/**\n * Logging producer for inje... | java | chosen |
[
{
"from": "human",
"value": "Add The Sieve Of Eratosthenes example\n"
},
{
"from": "gpt",
"value": "/**\n */\npublic class TheSieveOfEratosthenes {\n\n public static final int CONCURRENCY = 20;\n public static final int SIZE = 16 * 1024 * 1024;\n public static final int SQRT_SIZE = (int... | java | chosen |
[
{
"from": "human",
"value": "Add random player for Ataxx game\n"
},
{
"from": "gpt",
"value": "package es.ucm.fdi.tp.ataxx;\n\nimport java.util.List;\n\nimport es.ucm.fdi.tp.basecode.bgame.Utils;\nimport es.ucm.fdi.tp.basecode.bgame.control.Player;\nimport es.ucm.fdi.tp.basecode.bgame.model.Boar... | java | chosen |
[
{
"from": "human",
"value": "Add basic tests for EConv.\n"
},
{
"from": "gpt",
"value": "package org.jcodings.specific;\n\nimport org.jcodings.Ptr;\nimport org.jcodings.transcode.EConv;\nimport org.jcodings.transcode.TranscoderDB;\nimport org.jcodings.transcode.Transcoding;\nimport org.junit.Ass... | java | chosen |
[
{
"from": "human",
"value": "Add object location identity class.\n"
},
{
"from": "gpt",
"value": "/*\n * Copyright (c) 2013, 2013, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.\n *\n * This code is free software; you can redi... | java | chosen |
[
{
"from": "human",
"value": "Write code for REBXOR (40 points)\n"
},
{
"from": "gpt",
"value": "// SUBXOR, for practicing tries\nimport java.util.Scanner;\nclass Trie {\n private class Node {\n int val;\n Node children[] = new Node[2];\n Node() {\n val = -1;\n ... | java | chosen |
[
{
"from": "human",
"value": "Add test for find command\n"
},
{
"from": "gpt",
"value": "package guitests;\n\nimport org.junit.Test;\n\nimport seedu.task.commons.core.Messages;\nimport seedu.task.testutil.TestTask;\n\nimport static org.junit.Assert.assertTrue;\n\npublic class FindTagCommandTest e... | java | chosen |
[
{
"from": "human",
"value": "Add util class for lerp\n"
},
{
"from": "gpt",
"value": "package com.nucleus.vecmath;\n\n/**\n * Static utilities for linear interpolation\n */\npublic class Lerp {\n\n /**\n * Linear interpolation on a vec3 stored as float[]\n * result goes from a when w ... | java | chosen |
[
{
"from": "system",
"value": "Change path to end with separator if it refers to a group"
},
{
"from": "human",
"value": "/*-\n * Copyright 2015 Diamond Light Source Ltd.\n *\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse... | java | chosen |
[
{
"from": "human",
"value": "Verify validation of types in summary fields\n"
},
{
"from": "gpt",
"value": "package com.yahoo.searchdefinition.processing;\n\nimport com.yahoo.config.model.test.MockApplicationPackage;\nimport com.yahoo.document.DataType;\nimport com.yahoo.document.Field;\nimport c... | java | chosen |
[
{
"from": "human",
"value": "Add a pseudo-field to collection class to allow flagging of topical areas\n"
},
{
"from": "gpt",
"value": "/* **********************************************************************\n Copyright 2005 Rensselaer Polytechnic Institute. All worldwide rights reserved.\n... | java | chosen |
[
{
"from": "human",
"value": "Check that the number of entries in the seq_region_attrib table specifying that the MT chromosome should use codon table 2 matches the number of MT chromosomes (may be several different assemblies)\n"
},
{
"from": "gpt",
"value": "/*\n * Copyright (C) 2004 EBI, GRL\n... | java | chosen |
[
{
"from": "human",
"value": "Handle player plot button/lever interactions\n"
},
{
"from": "gpt",
"value": "package com.simplyian.superplots;\n\nimport org.bukkit.Material;\nimport org.bukkit.entity.Player;\nimport org.bukkit.event.EventHandler;\nimport org.bukkit.event.Listener;\n\nimport com.si... | java | chosen |
[
{
"from": "human",
"value": "Add java solution for 2. Add Two Numbers\n\n2. Add Two Numbers: https://leetcode.com/problems/add-two-numbers/"
},
{
"from": "gpt",
"value": "package leetcode.add_two_numbers;\n\nimport common.ListNode;\n\npublic class Solution {\n public ListNode addTwoNumbers(Li... | java | chosen |
[
{
"from": "human",
"value": "Add file which was accidentally missed during commit of HDFS-4346.\n\n\ngit-svn-id: 18f68cb356f2bf53a217c39a7af1470588d83bce@1428560 13f79535-47bb-0310-9956-ffa450edef68\n"
},
{
"from": "gpt",
"value": "/**\n * Licensed to the Apache Software Foundation (ASF) under o... | java | chosen |
[
{
"from": "human",
"value": "Add java solution for 152. Maximum Product Subarray\n\n152. Maximum Product Subarray: https://leetcode.com/problems/maximum-product-subarray/"
},
{
"from": "gpt",
"value": "package leetcode.maximum_product_subarray;\n\npublic class Solution {\n public int maxProdu... | java | chosen |
[
{
"from": "human",
"value": "Make copy of old AbstractDetailsPane\n\nOPEN - task 64: Create CRUD functionality for Brand entity \nhttp://github.com/DevOpsDistilled/OpERP/issues/issue/64"
},
{
"from": "gpt",
"value": "package devopsdistilled.operp.client.abstracts;\n\nimport javax.swing.JComponen... | java | chosen |
[
{
"from": "human",
"value": "Handle error gracefully and continue\n\nhttp://ideone.com/JOIAfB"
},
{
"from": "gpt",
"value": "// Handle error gracefully and continue.\nclass ExcDemo3 {\n public static void main(String args[]) {\n int numer[] = { 4, 8, 16, 32, 64, 128 };\n int denom[] = { 2... | java | chosen |
[
{
"from": "human",
"value": "Create test configuration for experiments\n"
},
{
"from": "gpt",
"value": "package io.sigpipe.sing.util;\n\nimport java.util.HashMap;\nimport java.util.Map;\n\nimport io.sigpipe.sing.dataset.Quantizer;\nimport io.sigpipe.sing.dataset.feature.Feature;\n\npublic class ... | java | chosen |
[
{
"from": "human",
"value": "Add devices subsystem test class.\n"
},
{
"from": "gpt",
"value": "package me.haosdent.cgroup.subsystem;\n\nimport org.junit.After;\nimport org.junit.Before;\nimport org.junit.Test;\n\npublic class TestDevices {\n\n @Before\n public void setUp() {}\n\n @After\n p... | java | chosen |
[
{
"from": "human",
"value": "Add test class for SaltProjectCompiler"
},
{
"from": "gpt",
"value": "/*******************************************************************************\n * Copyright 2016 Friedrich-Schiller-Universität Jena\n *\n * Licensed under the Apache License, Version 2.0 (the \... | java | chosen |
[
{
"from": "human",
"value": "Add a reverse view ListIterator\n"
},
{
"from": "gpt",
"value": "package co.phoenixlab.common.lang;\n\nimport java.util.ListIterator;\n\n/**\n * Provides a reversed view of a ListIterator, starting from the last element.\n * @param <E>\n */\npublic class ReverseListI... | java | chosen |
[
{
"from": "human",
"value": "Test to ensure webapp starts up.\n"
},
{
"from": "gpt",
"value": "package com.sentibrand;\n\nimport org.junit.Test;\nimport org.springframework.http.HttpStatus;\nimport org.springframework.web.client.RestTemplate;\n\nimport static org.hamcrest.MatcherAssert.assertTha... | java | chosen |
[
{
"from": "human",
"value": "[lang] Add unit test for ambiguous function calls.\n\nsee #295\n\nSigned-off-by: Stéphane Galland <23860b554af9116d4237121086bd6767cdd4ff4b@arakhne.org>\n"
},
{
"from": "gpt",
"value": "/*\n * Copyright (C) 2014-2015 the original authors or authors.\n *\n * Licensed ... | java | chosen |
[
{
"from": "system",
"value": "Convert line separators in test.\n"
},
{
"from": "human",
"value": "package com.jetbrains.python;\n\nimport com.intellij.openapi.util.io.FileUtil;\nimport com.intellij.testFramework.UsefulTestCase;\nimport com.jetbrains.python.console.PyConsoleIndentUtil;\n\nimport ... | java | chosen |
[
{
"from": "human",
"value": "PURE-8: Create zoom to rectangle controller\n"
},
{
"from": "gpt",
"value": "/*\n * This is part of Geomajas, a GIS framework, http://www.geomajas.org/.\n *\n * Copyright 2008-2011 Geosparc nv, http://www.geosparc.com/, Belgium.\n *\n * The program is available in op... | java | chosen |
[
{
"from": "human",
"value": "Add new auton command for fast vomit\n"
},
{
"from": "gpt",
"value": "/*\n * To change this template, choose Tools | Templates\n * and open the template in the editor.\n */\npackage edu.stuy.commands;\n\nimport edu.wpi.first.wpilibj.command.CommandGroup;\n\n/**\n *\n... | java | chosen |
[
{
"from": "human",
"value": "Test of using hashmap of country to polygon for geospatial queries\n\nTrying to speed up queries in GEOUtil for the Georeference Validation actor\n"
},
{
"from": "gpt",
"value": "package org.filteredpush.qc.georeference;\n\nimport com.vividsolutions.jts.geom.Coordina... | java | chosen |
[
{
"from": "human",
"value": "Add simple test for FailureLogger.\n"
},
{
"from": "gpt",
"value": "/**\n * Copyright 2011 Matthias Nuessler <m.nuessler@web.de>\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the Lice... | java | chosen |
[
{
"from": "human",
"value": "Add Hamcrest matchers for model\n"
},
{
"from": "gpt",
"value": "package fi.evident.apina.model;\n\nimport fi.evident.apina.model.type.ApiType;\nimport org.hamcrest.Description;\nimport org.hamcrest.Matcher;\nimport org.hamcrest.TypeSafeMatcher;\n\nimport java.util.C... | java | chosen |
[
{
"from": "human",
"value": "Add executor that will continue to run tasks in a loop\n"
},
{
"from": "gpt",
"value": "package io.undertow.util;\n\nimport io.undertow.UndertowLogger;\n\nimport java.util.LinkedList;\nimport java.util.List;\nimport java.util.concurrent.Executor;\n\n/**\n * Executor ... | java | chosen |
[
{
"from": "human",
"value": "Add suite to ensure tests are run with single broker instance\n"
},
{
"from": "gpt",
"value": "package jamex.link;\n\nimport org.junit.AfterClass;\nimport org.junit.BeforeClass;\nimport org.junit.runner.RunWith;\nimport org.junit.runners.Suite;\n\n@RunWith( Suite.cla... | java | chosen |
[
{
"from": "human",
"value": "Add a Command to change a tag\n"
},
{
"from": "gpt",
"value": "package xml.commands;\n\nimport utility.Command;\nimport xml.Element;\n\npublic class ChangeTagCommand implements Command {\n\tprivate Element element;\n\tprivate String tag;\n\tprivate String oldTag;\n\t... | java | chosen |
[
{
"from": "human",
"value": "Add lazily initialized value (single threaded)\n"
},
{
"from": "gpt",
"value": "package openmods.utils;\n\npublic abstract class LazyValue<T> {\n\n\tprivate boolean initialized;\n\n\tprivate T value;\n\n\tprotected abstract T initialize();\n\n\tpublic T get() {\n\t\t... | java | chosen |
[
{
"from": "human",
"value": "Add skeleton test for the DoubleInterval class\n"
},
{
"from": "gpt",
"value": "package ch.eiafr.cojac.unit.interval;\n\nimport ch.eiafr.cojac.interval.DoubleInterval;\nimport org.junit.Test;\n\nimport static org.junit.Assert.assertTrue;\n\npublic class DoubleInterva... | java | chosen |
[
{
"from": "human",
"value": "Add a thread safe cache class.\n"
},
{
"from": "gpt",
"value": "package google.finder;\n\nimport java.util.ArrayList;\nimport java.util.Collections;\nimport java.util.List;\n\nimport google.model.Result;\n\nclass ConcurrentCache {\n\n\t// Possibly shared between thre... | java | chosen |
[
{
"from": "human",
"value": "Add script which uses a simple loop of fetching stars of repositories\n\nThis stops after a few thousand results as Github starts to throttle\nAPI requests, so should probably done with some search sorted by stars\ninstead...\n"
},
{
"from": "gpt",
"value": "package ... | java | chosen |
[
{
"from": "human",
"value": "TEST\n - added test for NoSuchFieldException"
},
{
"from": "gpt",
"value": "package com.orm.andorm.test.implementation;\n\nimport android.test.AndroidTestCase;\n\nimport com.orm.androrm.Filter;\nimport com.orm.androrm.NoSuchFieldException;\nimport com.orm.androrm.imp... | java | chosen |
[
{
"from": "human",
"value": "Add a example mapreduce job using stackoverflow class\n"
},
{
"from": "gpt",
"value": "package ch.hesso.master;\n\nimport org.apache.hadoop.conf.Configuration;\nimport org.apache.hadoop.conf.Configured;\nimport org.apache.hadoop.fs.Path;\nimport org.apache.hadoop.io.... | java | chosen |
[
{
"from": "human",
"value": "Add interface for per project management of local files\n"
},
{
"from": "gpt",
"value": "package org.beanmaker.util;\n\nimport org.dbbeans.sql.DBTransaction;\n\npublic interface LocalFileManager {\n\n DbBeanFile get(final long id);\n\n DbBeanFile getOrCreate(fi... | java | chosen |
[
{
"from": "human",
"value": "Create a skeleton for problem 233\n"
},
{
"from": "gpt",
"value": "package leetcode;\n\n/**\n * https://leetcode.com/problems/number-of-digit-one/\n */\npublic class Problem233 {\n public int countDigitOne(int n) {\n int result = 0;\n for (int i = 1;... | java | chosen |
[
{
"from": "human",
"value": "Add a skeleton for problem 274\n"
},
{
"from": "gpt",
"value": "package leetcode;\n\n/**\n * https://leetcode.com/problems/h-index/\n */\npublic class Problem274 {\n public int hIndex(int[] citations) {\n // TODO\n return 0;\n }\n\n public stat... | java | chosen |
[
{
"from": "human",
"value": "Add in simple abstraction for scheduling\n"
},
{
"from": "gpt",
"value": "package replicant;\n\nimport java.util.concurrent.Executors;\nimport java.util.concurrent.ScheduledExecutorService;\nimport java.util.concurrent.ScheduledFuture;\nimport java.util.concurrent.Ti... | java | chosen |
[
{
"from": "human",
"value": "Add new test case for OctetString validation"
},
{
"from": "gpt",
"value": "/*\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 *... | java | chosen |
[
{
"from": "human",
"value": "Add helper for building selection clauses for sqlite database\n"
},
{
"from": "gpt",
"value": "package eu.nerro.wolappla.util;\n\nimport android.database.Cursor;\nimport android.database.sqlite.SQLiteDatabase;\nimport android.text.TextUtils;\n\nimport java.util.Array... | java | chosen |
[
{
"from": "human",
"value": "Add a quick test of exception type narrowing\n"
},
{
"from": "gpt",
"value": "\npackage net.restlesscoder.sandbox;\n\n/** Can you narrow the types of exceptions thrown in a subclass? Yes. */\npublic class ThrowException {\n\n\tpublic static class FooBase {\n\t\tpubli... | java | chosen |
[
{
"from": "human",
"value": "Add an example to show how to dump the label from the edges of a STEP file\n\ngit-svn-id: f93d4e6abee5d08e50288ddf8295609b3b37a1b6@2264 9c4724a3-da1e-0410-bc68-88f18da35cd4\n"
},
{
"from": "gpt",
"value": "/*\n * Project Info: http://jcae.sourceforge.net\n * \n * Th... | java | chosen |
[
{
"from": "human",
"value": "Add unit test for ConfigurationRule\n"
},
{
"from": "gpt",
"value": "/*\n * The Alluxio Open Foundation licenses this work under the Apache License, version 2.0\n * (the \"License\"). You may not use this work except in compliance with the License, which is\n * avail... | java | chosen |
[
{
"from": "human",
"value": "Add a plugin type to intercept ImageJ 1.x' opening images\n\nThis plugin type will need to be implemented by all plugins wanting\nto have a say how an image is opened.\n\nIt is our design to improve on HandleExtraFileTypes; Now developers\ncan extend ImageJ 1.x' image opening wi... | java | chosen |
[
{
"from": "human",
"value": "Convert Help to a class"
},
{
"from": "gpt",
"value": "/*\n\tProject 4-1\n\t\n\tConvert the help system from Project 3-3 into a Help class.\n*/\nclass Help {\n\tvoid helpon(int what) {\n\t\tswitch(what) {\n\t\t\tcase '1':\n\t\t\t\tSystem.out.println(\"The if:\\n\");\... | java | chosen |
[
{
"from": "human",
"value": "Add a test demonstrating a stateful proxy\n"
},
{
"from": "gpt",
"value": "package net.fushizen.invokedynamic.proxy;\n\nimport org.junit.Test;\n\nimport java.lang.invoke.ConstantCallSite;\nimport java.lang.invoke.MethodHandle;\nimport java.lang.invoke.MethodType;\n\n... | java | chosen |
[
{
"from": "human",
"value": "Add unit test for HideIgnoredFilesAction\n"
},
{
"from": "gpt",
"value": "/*\n * The MIT License (MIT)\n *\n * Copyright (c) 2016 hsz Jakub Chrzanowski <jakub@hsz.mobi>\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this s... | java | chosen |
[
{
"from": "human",
"value": "Create test class for 'PropertyOperator'\n"
},
{
"from": "gpt",
"value": "/* *\\\n** SICU Stress Measurement System **\n** Project P04 | ... | java | chosen |
[
{
"from": "system",
"value": "Use information from stub for finding decorator in decorators list\n"
},
{
"from": "human",
"value": "package com.jetbrains.python.psi.impl;\n\nimport com.intellij.lang.ASTNode;\nimport com.jetbrains.python.PyElementTypes;\nimport com.jetbrains.python.psi.PyDecorato... | java | chosen |
[
{
"from": "human",
"value": "Test cvs email message log.\n\n\ngit-svn-id: 9146c88ff6d39b48099bf954d15d68f687b3fa69@1991 28e8926c-6b08-0410-baaa-805c5e19b8d6\n"
},
{
"from": "gpt",
"value": "/*\n * ################################################################\n *\n * ProActive: The Java(TM) li... | java | chosen |
[
{
"from": "system",
"value": "Test for API url's without path parameters.\n\nSigned-off-by: joelso <18eaca8d2012d90d448985477d4cb18b3fab3fa4@gmail.com>\n"
},
{
"from": "human",
"value": "package org.trello4j;\n\nimport static org.junit.Assert.assertEquals;\n\nimport org.junit.Test;\nimport org.t... | java | chosen |
[
{
"from": "human",
"value": "Add replacement facility of enum values"
},
{
"from": "gpt",
"value": "package ml.alternet.util;\n\nimport java.lang.reflect.Field;\nimport java.security.AccessController;\nimport java.security.PrivilegedAction;\nimport java.util.function.UnaryOperator;\nimport java.... | java | chosen |
[
{
"from": "human",
"value": "Add a class for doing serial arithmetic.\n"
},
{
"from": "gpt",
"value": "// Copyright (c) 2003 Brian Wellington (bwelling@xbill.org)\n\npackage org.xbill.DNS;\n\n/**\n * Helper functions for doing serial arithmetic. These should be used when\n * setting/checking SO... | java | chosen |
[
{
"from": "human",
"value": "Add test to ensure correct creation of EventType\n"
},
{
"from": "gpt",
"value": "package com.alexstyl.specialdates.events;\n\nimport org.junit.Test;\nimport org.junit.runner.RunWith;\nimport org.mockito.runners.MockitoJUnitRunner;\n\nimport static org.fest.assertion... | java | chosen |
[
{
"from": "human",
"value": "Implement Youthful Brewmaster. No tests necessary since it has the same functionality as Ancient Brewmaster.\n"
},
{
"from": "gpt",
"value": "package com.hearthsim.card.minion.concrete;\n\nimport com.hearthsim.card.Card;\nimport com.hearthsim.card.minion.Minion;\nimp... | java | chosen |
[
{
"from": "human",
"value": "Introduce integration tests for the EventService\n"
},
{
"from": "gpt",
"value": "/*\n * Copyright 2010-2017 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 w... | java | chosen |
[
{
"from": "human",
"value": "Add a timeout retry class\n"
},
{
"from": "gpt",
"value": "/*\n * The Alluxio Open Foundation licenses this work under the Apache License, version 2.0\n * (the \"License\"). You may not use this work except in compliance with the License, which is\n * available at ww... | java | chosen |
[
{
"from": "human",
"value": "Add skeleton for problem 24\n"
},
{
"from": "gpt",
"value": "package coding4fun;\n\nimport java.util.Arrays;\n\n/**\n * Write an algorithm to perform a Tetris rotation.\n */\npublic class Problem24 {\n public static void rotate(char[][] block) {\n char[][] ... | java | chosen |
[
{
"from": "human",
"value": "Copy of RelayDemo using RPCs instead of messages\n"
},
{
"from": "gpt",
"value": "package org.jgroups.demos;\n\nimport org.jgroups.*;\nimport org.jgroups.blocks.MethodCall;\nimport org.jgroups.blocks.Request;\nimport org.jgroups.blocks.RequestOptions;\nimport org.jgr... | java | chosen |
[
{
"from": "human",
"value": "Add crude nop logging system component\n"
},
{
"from": "gpt",
"value": "/*\n * Copyright (C) 2010 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 Lic... | java | chosen |
[
{
"from": "human",
"value": "Add boot strap for custom code\n"
},
{
"from": "gpt",
"value": "package com.backendless.servercode;\n\n/**\n * Created with IntelliJ IDEA.\n * User: Eugene Chipachenko\n * Date: 05.06.14\n * Time: 11:53\n */\npublic interface IBackendlessBootstrap\n{\n /**\n * Rec... | java | chosen |
[
{
"from": "human",
"value": "Add PCM format descriptor object\n"
},
{
"from": "gpt",
"value": "package com.vaadin.addon.audio.shared;\n\nimport java.io.Serializable;\n\n/**\n * Format parameters for PCM data\n */\n@SuppressWarnings(\"serial\")\npublic class PCMFormat implements Serializable {\n\... | java | chosen |
[
{
"from": "human",
"value": "Add MWE that shows bug in TraceEquivalent as unit test.\n"
},
{
"from": "gpt",
"value": "/*\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... | java | chosen |
[
{
"from": "human",
"value": "Move this sample code into the official samples directory\n"
},
{
"from": "gpt",
"value": "package org.jets3t.samples;\n\nimport javax.crypto.Mac;\nimport javax.crypto.spec.SecretKeySpec;\nimport sun.misc.BASE64Encoder;\n\npublic class S3PostFormBuilder {\n\n publ... | java | chosen |
[
{
"from": "human",
"value": "Define a multidim dataset allocator class\n"
},
{
"from": "gpt",
"value": "/*\n * Zorbage: an algebraic data hierarchy for use in numeric processing.\n *\n * Copyright (C) 2016-2019 Barry DeZonia\n * \n * Redistribution and use in source and binary forms, with or wit... | java | chosen |
[
{
"from": "human",
"value": "Add solution for Ice cream parlor problem.\n"
},
{
"from": "gpt",
"value": "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.*;\n\n// https://www.hackerrank.com/challenges/ctci-ice-cream-parlor/problem\n... | java | chosen |
[
{
"from": "human",
"value": "Test case for exit command\n"
},
{
"from": "gpt",
"value": "package fc.lang;\n\nimport org.junit.Test;\nimport org.junit.runner.RunWith;\nimport org.mockito.Mock;\nimport org.mockito.runners.MockitoJUnitRunner;\n\nimport fc.lang.EvaluationException;\nimport fc.lang.E... | java | chosen |
[
{
"from": "human",
"value": "Add sha1 hash to passwords\n"
},
{
"from": "gpt",
"value": "package com.continuuity.passport.core.utils;\n\nimport com.google.common.hash.HashCode;\nimport com.google.common.hash.HashFunction;\nimport com.google.common.hash.Hashing;\n\n/**\n *\n */\npublic class Pass... | java | chosen |
[
{
"from": "human",
"value": "Increase mutation coverage in ApiProvider\n"
},
{
"from": "gpt",
"value": "/*\n * Copyright 2016 Lukáš Petrovický\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 ma... | java | chosen |
[
{
"from": "human",
"value": "Add a way to run a test only with a certain Java version\n\nCloses gh-9530\n"
},
{
"from": "gpt",
"value": "/*\n * Copyright 2012-2017 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this f... | java | chosen |
[
{
"from": "human",
"value": "Create close tab menu item.\n"
},
{
"from": "gpt",
"value": "package com.github.aureliano.edocs.app.gui.menu;\n\nimport javax.swing.JMenuItem;\n\npublic class CloseTabMenuItem extends JMenuItem {\n\n\tprivate static final long serialVersionUID = -3834903211976535165L... | java | chosen |
[
{
"from": "human",
"value": "Add the stocked out facility model\n"
},
{
"from": "gpt",
"value": "package org.openlmis.report.model.report;\n\nimport lombok.AllArgsConstructor;\nimport lombok.Data;\nimport lombok.NoArgsConstructor;\nimport org.openlmis.report.model.ReportData;\n\n@Data\n@NoArgsCo... | java | chosen |
[
{
"from": "human",
"value": "Add a utility to run anything (used in debug logging initially) on a periodic basis.\n"
},
{
"from": "gpt",
"value": "package net.dempsy.util;\n\n/**\n * This class will execute the Runnable provided to the constructor\n * once every so many calls to {@code run()}. I... | java | chosen |
[
{
"from": "human",
"value": "Move mutable property map into jcr2pojo module\n"
},
{
"from": "gpt",
"value": "package org.om.core.impl.mapping;\n\nimport java.util.Collection;\nimport java.util.HashMap;\nimport java.util.Map;\n\nimport org.om.core.api.mapping.ItemMap;\nimport org.om.core.api.mapp... | java | chosen |
[
{
"from": "human",
"value": "Test serdes and fuzz different put/remove/replace/putIfAbsent methods\n"
},
{
"from": "gpt",
"value": "package com.nyeggen.lash.test;\n\nimport java.io.File;\nimport java.util.Random;\nimport java.util.concurrent.ConcurrentHashMap;\n\nimport static org.junit.Assert.a... | java | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.