conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "human",
"value": "Revert \"remove fail reference collection\"\n\nThis reverts commit db4fb9a0f2a5012ed0fc2c40ba9faf93093dc3e8.\n"
},
{
"from": "gpt",
"value": "/*\n * Copyright 2016 EPAM Systems\n * \n * \n * This file is part of EPAM Report Portal.\n * https://github.com/reportportal... | java | chosen |
[
{
"from": "human",
"value": "Add file left out of previous commit\n"
},
{
"from": "gpt",
"value": "/*\n * Copyright 2014 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.\... | java | chosen |
[
{
"from": "human",
"value": "Add new information dialog (Dialog)\n"
},
{
"from": "gpt",
"value": "package net.somethingdreadful.MAL.dialog;\n\nimport android.app.AlertDialog;\nimport android.app.DialogFragment;\nimport android.content.DialogInterface;\nimport android.os.Bundle;\n\npublic class I... | java | chosen |
[
{
"from": "human",
"value": "Add JUnit for HitRatio raw computation logic.\n"
},
{
"from": "gpt",
"value": "package hex;\n\nimport static hex.ModelMetricsMultinomial.updateHits;\nimport org.junit.Assert;\nimport org.junit.BeforeClass;\nimport org.junit.Test;\nimport static water.TestUtil.stall_t... | java | chosen |
[
{
"from": "human",
"value": "Add helper class to manage context passing from servlets to ejbs\n"
},
{
"from": "gpt",
"value": "package org.realityforge.replicant.server.ee;\n\nimport java.io.Serializable;\nimport java.util.HashMap;\nimport java.util.Map;\n\npublic final class ReplicantContextHol... | java | chosen |
[
{
"from": "human",
"value": "Throw an exception if the user tries to get an optional parameter which has not been set.\n"
},
{
"from": "gpt",
"value": "/*\n * $Id$\n */\npackage org.xins.server;\n\n/**\n * Exception that indicates that you are trying to get the value of a parameter\n * that has ... | java | chosen |
[
{
"from": "human",
"value": "Add best time to buy and sell stock\n"
},
{
"from": "gpt",
"value": "public class BestTimeToBuyAndSellStockII {\n public int maxProfit(int[] prices) {\n int total = 0;\n\n for (int i = 0; i < prices.length - 1; i++) {\n if (prices[i+1] > prices[i]) {\n ... | java | chosen |
[
{
"from": "human",
"value": "Add NIO delete file visitor\n"
},
{
"from": "gpt",
"value": "/*\n * This file is part of SpongeAPI, licensed under the MIT License (MIT).\n *\n * Copyright (c) SpongePowered <https://www.spongepowered.org>\n * Copyright (c) contributors\n *\n * Permission is hereby g... | java | chosen |
[
{
"from": "human",
"value": "Add java solution for 52. N-Queens II\n\n52. N-Queens II: https://leetcode.com/problems/n-queens-ii/"
},
{
"from": "gpt",
"value": "package leetcode.n_queens_ii;\n\npublic class Solution {\n\tpublic int dfs(boolean[] row, boolean[] col, boolean[] diag, boolean[] rdia... | java | chosen |
[
{
"from": "human",
"value": "test(auth): Add test for converting username and password to IAM\n"
},
{
"from": "gpt",
"value": "package com.ibm.watson.developer_cloud.service;\n\nimport org.junit.Test;\n\nimport static org.junit.Assert.assertTrue;\n\npublic class AuthenticationTest {\n private s... | java | chosen |
[
{
"from": "human",
"value": "Revert \"disable custom pod template mode\"\n\nThis reverts commit 7a29498\n"
},
{
"from": "gpt",
"value": "package ekoshkin.teamcity.clouds.kubernetes.podSpec;\n\nimport ekoshkin.teamcity.clouds.kubernetes.KubeCloudException;\nimport ekoshkin.teamcity.clouds.kuberne... | java | chosen |
[
{
"from": "human",
"value": "Create a content categories enum"
},
{
"from": "gpt",
"value": "/*\n * Copyright 2015 Quality and Usability Lab, Telekom Innvation Laboratories, TU Berlin..\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except... | java | chosen |
[
{
"from": "human",
"value": "Add JUnit test for WadlElementName class in wadl modeling module.\n"
},
{
"from": "gpt",
"value": "/*\n * Copyright 2012 Shared Learning Collaborative, LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except ... | java | chosen |
[
{
"from": "human",
"value": "Add algorithm to find if a number is prime in java.\n"
},
{
"from": "gpt",
"value": "import java.math.BigInteger;\nimport java.util.Scanner;\n\npublic class prime {\n\n\tpublic static void main(String[] args) {\n\t\tBigInteger a = new BigInteger(\"1299827\");\n\t\t//... | java | chosen |
[
{
"from": "human",
"value": "Create basic main to demonstrate the flow\n"
},
{
"from": "gpt",
"value": "package com.mattbachmann.nlpexperiments.apps;\n\nimport com.google.inject.Guice;\nimport com.google.inject.Injector;\nimport com.mattbachmann.nlpexperiments.detectors.Detector;\nimport com.mat... | java | chosen |
[
{
"from": "human",
"value": "Include test for interactive mode (from the shell)\n"
},
{
"from": "gpt",
"value": "/*\n * (C) Copyright 2018 Boni Garcia (http://bonigarcia.github.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in ... | java | chosen |
[
{
"from": "human",
"value": "Add unit tests for the SSH spawnable.\n"
},
{
"from": "gpt",
"value": "package expectj;\n\nimport java.io.InputStream;\nimport java.io.OutputStream;\n\nimport org.mockito.Mockito;\n\nimport com.jcraft.jsch.Channel;\n\nimport junit.framework.TestCase;\n\n/**\n * Verif... | java | chosen |
[
{
"from": "human",
"value": "Introduce a base class for elements that want to include a \"lazy\" clientId property\n"
},
{
"from": "gpt",
"value": "// Copyright 2012 The Apache Software Foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this ... | java | chosen |
[
{
"from": "human",
"value": "Add string extension java placeholder\n"
},
{
"from": "gpt",
"value": "package org.bson;\n\nimport java.nio.ByteBuffer;\nimport java.nio.ByteOrder;\n\nimport org.jruby.Ruby;\nimport org.jruby.RubyModule;\nimport org.jruby.RubyString;\nimport org.jruby.anno.JRubyMetho... | java | chosen |
[
{
"from": "human",
"value": "Add helper file for dealing with semantic highlighting tokens in tests\n\nSigned-off-by: Stefan Marr <46f1a0bd5592a2f9244ca321b129902a06b53e03@stefan-marr.de>\n"
},
{
"from": "gpt",
"value": "package som.langserv;\n\nimport static org.junit.Assert.assertTrue;\n\nimpo... | java | chosen |
[
{
"from": "human",
"value": "Add smithing recipe serializer that can apply a font to the item.\n"
},
{
"from": "gpt",
"value": "package net.darkhax.bookshelf.crafting.recipes.smithing;\n\nimport com.google.gson.JsonObject;\n\nimport net.darkhax.bookshelf.util.TextUtils;\nimport net.minecraft.inv... | java | chosen |
[
{
"from": "human",
"value": "Tweak retry timing. Also retry non-fatal URLs.\n"
},
{
"from": "gpt",
"value": "/*\n\nCopyright (c) 2000-2022, Board of Trustees of Leland Stanford Jr. University\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provi... | java | chosen |
[
{
"from": "human",
"value": "Add partition table creator test\n\n"
},
{
"from": "gpt",
"value": "package com.github.mjdev.libaums.partition;\n\nimport com.github.mjdev.libaums.driver.BlockDeviceDriver;\nimport com.github.mjdev.libaums.driver.ByteBlockDevice;\nimport com.github.mjdev.libaums.driv... | java | chosen |
[
{
"from": "human",
"value": "Create a skeleton for problem 332\n"
},
{
"from": "gpt",
"value": "package leetcode;\n\nimport java.util.ArrayList;\nimport java.util.HashMap;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Objects;\nimport java.util.TreeSet;\n\n/**\n * https://leet... | java | chosen |
[
{
"from": "human",
"value": "Add a very simple client in order to test data loading functionality\n"
},
{
"from": "gpt",
"value": "package node.client;\n\nimport node.data.ClientDataLoader;\nimport data.system.RouteToNodeMap;\nimport data.trainnetwork.Network;\n\n/**\n * The main class, managing... | java | chosen |
[
{
"from": "human",
"value": "Add unit tests for NewsCrawlerVerticle\n"
},
{
"from": "gpt",
"value": "package com.gofish.sentiment.newscrawler;\n\nimport io.vertx.core.DeploymentOptions;\nimport io.vertx.core.Vertx;\nimport io.vertx.core.json.JsonObject;\nimport io.vertx.ext.unit.TestContext;\nim... | java | chosen |
[
{
"from": "human",
"value": "Add a basic test for ParameterTokenFormatter\n\n--HG--\nbranch : replace\n"
},
{
"from": "gpt",
"value": "package net.customware.gwt.presenter.client.place;\n\nimport static org.junit.Assert.assertEquals;\n\nimport org.junit.Test;\n\npublic class ParameterTokenFormat... | java | chosen |
[
{
"from": "human",
"value": "Use opencsv library for CSV parsing rather than just splitting on the delimiter. This handles delimiters quoted in the data.\n"
},
{
"from": "gpt",
"value": "package com.splicemachine.derby.impl.load;\n\nimport org.junit.Assert;\nimport org.junit.Test;\n\npublic clas... | java | chosen |
[
{
"from": "human",
"value": "Add unit test for BufferUtils"
},
{
"from": "gpt",
"value": "/*\n * Copyright (C) 2013 Klaus Reimer <k@ailis.de>\n * See LICENSE.md for licensing information.\n */\n\npackage org.usb4java;\n\nimport static org.junit.Assert.assertEquals;\n\nimport java.lang.reflect.Co... | java | chosen |
[
{
"from": "human",
"value": "Add sample Database Settings file\n"
},
{
"from": "gpt",
"value": "package com.aemreunal.config;\n\nimport org.springframework.orm.jpa.vendor.Database;\n\npublic class DatabaseSettings {\n // The address of the database you want to use\n // It can be a local or... | java | chosen |
[
{
"from": "human",
"value": "Add class for easy access to different TypeReferences.\n"
},
{
"from": "gpt",
"value": "package com.orbekk.same;\n\nimport org.codehaus.jackson.type.TypeReference;\n\npublic class Types {\n public final static TypeReference<String> STRING =\n new TypeRe... | java | chosen |
[
{
"from": "human",
"value": "Add proper command line options to store builder.\n"
},
{
"from": "gpt",
"value": "package voldemort.utils;\n\nimport java.util.HashSet;\nimport java.util.Set;\n\nimport joptsimple.OptionSet;\nimport joptsimple.OptionSpec;\n\n/**\n * Helper functions for command line... | java | chosen |
[
{
"from": "human",
"value": ":star: Add helper class to retrive real uri path from picked image\n"
},
{
"from": "gpt",
"value": "package colector.co.com.collector.utils;\n\nimport android.annotation.SuppressLint;\nimport android.content.Context;\nimport android.database.Cursor;\nimport android.n... | java | chosen |
[
{
"from": "human",
"value": "Fix json release-group secondary type output\n"
},
{
"from": "gpt",
"value": "/* Copyright (c) 2018 Sambhav Kothari\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the f... | java | chosen |
[
{
"from": "human",
"value": "[ARIES-1599] Add add-resource-dir goal to blueprint maven plugin\n\ngit-svn-id: f3027bd689517dd712b868b0d3f5f59c3162b83d@1758096 13f79535-47bb-0310-9956-ffa450edef68\n"
},
{
"from": "gpt",
"value": "package org.apache.aries.blueprint.plugin;\n\nimport org.apache.mave... | java | chosen |
[
{
"from": "human",
"value": "Add http interceptor for unit testing.\n\nThis class intercepts requests passing through the OkHttpClient\nand returns mocks responses for offline unit testing.\n"
},
{
"from": "gpt",
"value": "package util;\n\n\nimport okhttp3.*;\n\nimport java.io.IOException;\nimpo... | java | chosen |
[
{
"from": "system",
"value": "Make extend Spring Security's exception, for consistency with all other Spring Security exceptions.\n"
},
{
"from": "human",
"value": "package org.springframework.security.config;\n\n\n/**\n * @author Luke Taylor\n * @version $Id$\n */\npublic class SecurityConfigur... | java | chosen |
[
{
"from": "human",
"value": "Test for TwinColSelect (commented out left and right caption for now)\n\nsvn changeset:16271/svn branch:6.5\n"
},
{
"from": "gpt",
"value": "package com.vaadin.tests.components.select;\r\n\r\nimport java.util.LinkedHashMap;\r\n\r\nimport com.vaadin.terminal.Resource;... | java | chosen |
[
{
"from": "human",
"value": "Add further test runner Java DSL method unit tests\n"
},
{
"from": "gpt",
"value": "/*\n * Copyright 2006-2015 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... | java | chosen |
[
{
"from": "human",
"value": "Add java solution for 190. Reverse Bits\n\n190. Reverse Bits: https://leetcode.com/problems/reverse-bits/"
},
{
"from": "gpt",
"value": "package leetcode.reverse_bits;\n\npublic class Solution {\n // you need treat n as an unsigned value\n public int reverseBit... | java | chosen |
[
{
"from": "human",
"value": "blockstore: Add block store base interface\n\nAdd BlockStore interface, starting with a default creation method that uses the\nunderlying configuration.\n"
},
{
"from": "gpt",
"value": "/**\n * Copyright © 2014\n * Hrfs Block Store API\n *\n * Defines what a block st... | java | chosen |
[
{
"from": "human",
"value": "Add the command factory test back.\n\nIt was removed in previous merge. It's name was CommandMapTest in that commit.\n"
},
{
"from": "gpt",
"value": "package fi.helsinki.cs.tmc.cli.command;\n\nimport static org.junit.Assert.assertNotNull;\nimport static org.junit.Ass... | java | chosen |
[
{
"from": "human",
"value": "Add test of invalid email\n"
},
{
"from": "gpt",
"value": "package hudson.plugins.git;\n\nimport java.util.ArrayList;\n\nimport hudson.model.User;\n\nimport org.junit.Test;\nimport org.junit.Rule;\nimport static org.junit.Assert.*;\n\nimport org.jvnet.hudson.test.Jen... | java | chosen |
[
{
"from": "human",
"value": "Add filter for card removed event"
},
{
"from": "gpt",
"value": "/****************************************************************************\n * Copyright (C) 2018 ecsec GmbH.\n * All rights reserved.\n * Contact: ecsec GmbH (info@ecsec.de)\n * \n * This file is pa... | java | chosen |
[
{
"from": "human",
"value": "Solve a problem that deletion of LinkedList.\n"
},
{
"from": "gpt",
"value": "package study.hard.javalib.hackerrank;\n\nimport java.util.Scanner;\nimport java.util.Set;\nimport java.util.HashSet;\n\n/**\n * Created by iandmyhand on 10/16/16.\n */\n\nclass Node {\n ... | java | chosen |
[
{
"from": "human",
"value": "Add statement for problem 17\n"
},
{
"from": "gpt",
"value": "/*\n * Copyright (C) 2014 Pedro Vicente Gómez Sánchez.\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... | java | chosen |
[
{
"from": "human",
"value": "Implement ResponseManager, the client's equiv. to Server's ConnMgr.\n"
},
{
"from": "gpt",
"value": "package me.jesensky.dan.playertracker;\n\nimport me.jesensky.dan.playertracker.exceptions.InvalidPacketException;\nimport me.jesensky.dan.playertracker.net.Connection... | java | chosen |
[
{
"from": "human",
"value": "Add Bitstamp stream depth test case\n"
},
{
"from": "gpt",
"value": "/**\n * Copyright (C) 2012 - 2014 Xeiam LLC http://xeiam.com\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of\n * this software and associated documentation fi... | java | chosen |
[
{
"from": "system",
"value": "Fix problem with the proxy activator when using the blueprint bundle\n\ngit-svn-id: 212869a37fe990abe2323f86150f3c4d5a6279c2@1033177 13f79535-47bb-0310-9956-ffa450edef68\n"
},
{
"from": "human",
"value": "/*\n * Licensed to the Apache Software Foundation (ASF) under... | java | chosen |
[
{
"from": "human",
"value": "Camel-Nats: Add test for consuming also on Auth configuration\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 addit... | java | chosen |
[
{
"from": "human",
"value": "Add ReplicantSystemListener usefulk for debugging\n"
},
{
"from": "gpt",
"value": "package org.realityforge.replicant.client.runtime;\n\nimport java.util.logging.Logger;\nimport javax.annotation.Nonnull;\n\npublic class DebugReplicantSystemListener\n implements Repl... | java | chosen |
[
{
"from": "human",
"value": "Add new composition algorithm: fair distribution with priority.\n"
},
{
"from": "gpt",
"value": "package at.ac.tuwien.dsg.salam.composer.algorithm;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\nimport org.apache.commons.math3.distribution.UniformRealDistr... | java | chosen |
[
{
"from": "human",
"value": "Add priority-aware mailbox for use by matchers"
},
{
"from": "gpt",
"value": "package won.matcher.service.common.mailbox;\n\nimport com.typesafe.config.Config;\n\nimport akka.actor.ActorSystem;\nimport akka.dispatch.PriorityGenerator;\nimport akka.dispatch.UnboundedS... | java | chosen |
[
{
"from": "human",
"value": "Allow to use multiple candidate selection evaluations.\n"
},
{
"from": "gpt",
"value": "package am.extension.userfeedback.evaluation;\n\nimport am.extension.userfeedback.common.PrecisionRecallPlot;\nimport am.extension.userfeedback.experiments.UFLExperiment;\n\n/**\n... | java | chosen |
[
{
"from": "human",
"value": "Add simple helper function to encode AMQP types\n"
},
{
"from": "gpt",
"value": "/**\n * Copyright (C) 2010-2011, FuseSource Corp. All rights reserved.\n *\n * http://fusesource.com\n *\n * The software in this package is published under the terms of the\n * CDD... | java | chosen |
[
{
"from": "human",
"value": "Add common fluid tags provider"
},
{
"from": "gpt",
"value": "package info.u_team.u_team_core.data;\n\nimport java.nio.file.Path;\n\nimport net.minecraft.fluid.Fluid;\nimport net.minecraft.tags.*;\nimport net.minecraft.util.ResourceLocation;\nimport net.minecraftforg... | java | chosen |
[
{
"from": "human",
"value": "Include Opera test using w3c experimental option for OperaDriver\n"
},
{
"from": "gpt",
"value": "/*\n * (C) Copyright 2022 Boni Garcia (https://bonigarcia.github.io/)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this ... | java | chosen |
[
{
"from": "human",
"value": "Check in xtend generated files\n"
},
{
"from": "gpt",
"value": "package de.uni_paderborn.fujaba.muml.allocation.algorithm.ilp.lpsolve.tests;\n\nimport de.uni_paderborn.fujaba.muml.allocation.algorithm.tests.qvto.QVToBasedAlgorithmTest;\nimport java.util.Collection;\n... | java | chosen |
[
{
"from": "human",
"value": "Add a class to iterates plays until the game reachs its end\n"
},
{
"from": "gpt",
"value": "package wumpus;\n\nimport java.util.ArrayList;\nimport java.util.Iterator;\nimport java.util.NoSuchElementException;\n\nimport wumpus.Environment.*;\n\n/**\n * The iteration ... | java | chosen |
[
{
"from": "human",
"value": "Elasticsearch: Add tests for project queries against version 5\n\nBug: Issue 6094\nChange-Id: I0be93b1597bf2f682a23a900e22bdf513cb888d9\n"
},
{
"from": "gpt",
"value": "// Copyright (C) 2018 The Android Open Source Project\n//\n// Licensed under the Apache License, V... | java | chosen |
[
{
"from": "human",
"value": "Add java solution for 78. Subsets\n\n78. Subsets: https://leetcode.com/problems/subsets/"
},
{
"from": "gpt",
"value": "package leetcode.subsets;\n\nimport java.util.ArrayList;\nimport java.util.Arrays;\n\npublic class Solution {\n\tpublic void dfs(ArrayList<ArrayLis... | java | chosen |
[
{
"from": "human",
"value": "Add the confirmation servlet which is responsible for getting the scheduled sessions for a given tutor and returning them when a session is confirmed.\n"
},
{
"from": "gpt",
"value": "// Copyright 2019 Google LLC\n//\n// Licensed under the Apache License, Version 2.0... | java | chosen |
[
{
"from": "human",
"value": "Add collection of elements that should only be detected\n\n\nFormer-commit-id: dbd2ce0422e2942b3c5265d3b0867dd9deae7b99"
},
{
"from": "gpt",
"value": "package pete.metrics.adaptability.elements;\n\nimport java.util.ArrayList;\nimport java.util.Collection;\nimport jav... | java | chosen |
[
{
"from": "human",
"value": "Use bitmap sub-sampling to avoid out-of-memory\n"
},
{
"from": "gpt",
"value": "package se.embargo.core.graphics;\r\n\r\nimport java.io.File;\r\nimport java.io.FileInputStream;\r\nimport java.io.IOException;\r\nimport java.io.InputStream;\r\n\r\nimport android.graphi... | java | chosen |
[
{
"from": "human",
"value": "Create isCompleted class for task status\n"
},
{
"from": "gpt",
"value": "package utask.model.task;\n\nimport utask.commons.exceptions.IllegalValueException;\n\n/**\n * Represents the boolean value of the isCompleted attribute in the uTask.\n * Guarantees: immutable;... | java | chosen |
[
{
"from": "human",
"value": "Add utils for debug info.\n"
},
{
"from": "gpt",
"value": "package net.katsuster.strview.util;\n\n/**\n * <p>\n * デバッグ用ユーティリティ関数群を定義するためのクラスです。\n * </p>\n *\n * @author katsuhiro\n */\npublic class DebugInfo {\n protected DebugInfo() {\n //do nothing\n }... | java | chosen |
[
{
"from": "human",
"value": "Add file containing protocol constant values\n"
},
{
"from": "gpt",
"value": "package nearenough.protocol;\n\n/**\n * Constants and magic numbers of the Roughtime protocol\n */\npublic final class RtConstants {\n\n /** Minimum size of a client request */\n public s... | java | chosen |
[
{
"from": "human",
"value": "Add a required test case.\n"
},
{
"from": "gpt",
"value": "/*\n * Copyright 2017, TeamDev Ltd. All rights reserved.\n *\n * Redistribution and use in source and/or binary forms, with or without\n * modification, must retain the above copyright notice and the followin... | java | chosen |
[
{
"from": "human",
"value": "Add basic energy acceptor delegate"
},
{
"from": "gpt",
"value": "package info.u_team.u_team_core.energy;\n\nimport net.minecraftforge.energy.IEnergyStorage;\n\npublic class BasicEnergyAcceptorDelegate implements IEnergyStorage {\n\t\n\tprivate final IEnergyStorage d... | java | chosen |
[
{
"from": "human",
"value": "Add test to calculate the length and correctness of byte array payloads.\n"
},
{
"from": "gpt",
"value": "package org.codehaus.httpcache4j.payload;\n\nimport com.google.common.base.Charsets;\nimport com.google.common.io.ByteStreams;\nimport org.codehaus.httpcache4j.M... | java | chosen |
[
{
"from": "human",
"value": "Use project builder walker directly\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 compliance w... | java | chosen |
[
{
"from": "human",
"value": "Add Junit test for GetServiceLocationsResponse\n"
},
{
"from": "gpt",
"value": "package com.github.fluxw42.smappee.api.impl;\n\nimport org.junit.Test;\n\nimport java.util.ArrayList;\n\nimport static org.junit.Assert.assertEquals;\nimport static org.junit.Assert.asser... | java | chosen |
[
{
"from": "human",
"value": "Add Recovery Binary Search Tree\n"
},
{
"from": "gpt",
"value": "package problems;\n\npublic class RecoverBinarySearchTree {\n\n public class TreeNode {\n int val;\n TreeNode left, right;\n\n TreeNode(int x) {\n val = x;\n }\... | java | chosen |
[
{
"from": "system",
"value": "Remove spurious comments, rename variable for clarity.\n"
},
{
"from": "human",
"value": "/**\n * \n */\npackage com.humbughq.android;\n\n/**\n * @author lfaraone\n * \n */\npublic enum MessageType {\n STREAM_MESSAGE(\"stream\"), PRIVATE_MESSAGE(\"private\");\n\n... | java | chosen |
[
{
"from": "human",
"value": "Introduce abstract test class so can modify global settings as part of testing\n"
},
{
"from": "gpt",
"value": "package org.realityforge.arez;\n\nimport javax.annotation.Nonnull;\nimport org.realityforge.braincheck.BrainCheckTestUtil;\nimport org.testng.annotations.A... | java | chosen |
[
{
"from": "human",
"value": "Add superclass for grpc tasks\n"
},
{
"from": "gpt",
"value": "package ch.sheremet.dasfoo.rover.android.client.grpc.task;\n\nimport dasfoo.grpc.roverserver.nano.RoverServiceGrpc;\n\n/**\n * Created by Katarina Sheremet on 5/23/16 11:12 AM.\n */\npublic abstract class... | java | chosen |
[
{
"from": "human",
"value": "Add Shape2Dtest, the test related to the class Shape2D.\n"
},
{
"from": "gpt",
"value": "import org.testng.annotations.Test;\n\nimport static org.testng.Assert.*;\n\n/**\n * Created by hajarboulhdir on 03/10/2016.\n */\npublic class Shape2DTest {\n @Test\n pub... | java | chosen |
[
{
"from": "human",
"value": "Add test class specifically for attribute tests.\n\nSigned-off-by: Erik de Bruin <c195b508e6f0c57aeafdb5e96947e2b79e6a4b40@ixsoftware.nl>\n"
},
{
"from": "gpt",
"value": "/*\n *\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor ... | java | chosen |
[
{
"from": "human",
"value": "Add class to put default credentials-principal resolver into resolver chain.\n"
},
{
"from": "gpt",
"value": "package net.unicon.cas.mfa.authentication.defaultResolver;\n\nimport java.util.List;\nimport java.util.logging.Logger;\n\nimport javax.annotation.PostConstru... | java | chosen |
[
{
"from": "human",
"value": "Add map size counter example\n"
},
{
"from": "gpt",
"value": "package examples;\n\nimport org.mapdb.*;\n\nimport java.util.Map;\n\n/**\n * Keep tracks of number of items in map.\n * <p/>\n * Note: {@code Collections.size()} typically requires traversing entire collec... | java | chosen |
[
{
"from": "human",
"value": "Test JDBC Dev services on a named datasource with an explicit username/password\n"
},
{
"from": "gpt",
"value": "package io.quarkus.jdbc.postgresql.deployment;\n\nimport static org.junit.jupiter.api.Assertions.assertEquals;\nimport static org.junit.jupiter.api.Assert... | java | chosen |
[
{
"from": "system",
"value": "Update example settings file for LOCATION_DEBUG\n"
},
{
"from": "human",
"value": "/**\n * Copyright 2009 Joe LaPenna\n */\n\npackage com.joelapenna.foursquared;\n\n/**\n * @author Joe LaPenna (joe@joelapenna.com)\n */\npublic class FoursquaredSettings {\n\n publ... | java | chosen |
[
{
"from": "human",
"value": "Add a superclass for working with namespaces\n"
},
{
"from": "gpt",
"value": "/*\n * #%L\n * ImageJ software for multidimensional image processing and analysis.\n * %%\n * Copyright (C) 2014 - 2015 Board of Regents of the University of\n * Wisconsin-Madison, Universi... | java | chosen |
[
{
"from": "human",
"value": "Add basic tests to some CliXXX classes\n"
},
{
"from": "gpt",
"value": "/*\n * Licensed to Metamarkets Group Inc. (Metamarkets) 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": "Add unit test for Permutation\n"
},
{
"from": "gpt",
"value": "/*\n * Copyright (c) 2018. Real Time Genomics Limited.\n *\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that... | java | chosen |
[
{
"from": "human",
"value": "Put the skeleton for problem 93\n"
},
{
"from": "gpt",
"value": "package leetcode;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\n/**\n * https://oj.leetcode.com/problems/restore-ip-addresses/\n */\npublic class Problem93 {\n public List<String> restore... | java | chosen |
[
{
"from": "human",
"value": "Add Zigzag Level Order Traversal\n"
},
{
"from": "gpt",
"value": "package problems;\n\nimport java.util.ArrayList;\nimport java.util.LinkedList;\nimport java.util.List;\n\n/* \n Given a binary tree, return the zigzag level order traversal of its nodes' values. \n (ie... | java | chosen |
[
{
"from": "human",
"value": "Add implementation for Data Access Object."
},
{
"from": "gpt",
"value": "/**\n * Project Distributed Transactions.\n * Copyright Michał Szczygieł, 2013.\n * Created at Jan 2, 2014.\n */\npackage com.m4gik.business.dao;\n\nimport javax.persistence.EntityManager;\nimp... | java | chosen |
[
{
"from": "human",
"value": "Add test for Node compile\n"
},
{
"from": "gpt",
"value": "package org.twig.syntax.parser.node;\n\nimport org.junit.Test;\nimport org.twig.Environment;\nimport org.twig.compiler.ClassCompiler;\n\nimport static org.mockito.Mockito.*;\n\npublic class NodeTests {\n @... | java | chosen |
[
{
"from": "human",
"value": "Add Junit tests for Redo command\n"
},
{
"from": "gpt",
"value": "package guitests;\n\nimport org.junit.Test;\n\nimport seedu.address.logic.commands.RedoCommand;\nimport seedu.address.testutil.TestTask;\n\npublic class RedoCommandTest extends AddressBookGuiTest {\n\n... | java | chosen |
[
{
"from": "human",
"value": "Add a logger to the program\n"
},
{
"from": "gpt",
"value": "package jfdi.common.utilities;\n\nimport java.util.logging.FileHandler;\nimport java.util.logging.Level;\nimport java.util.logging.Logger;\nimport java.util.logging.SimpleFormatter;\n\nimport jfdi.storage.C... | java | chosen |
[
{
"from": "human",
"value": "Add java solution for 53. Maximum Subarray\n\n53. Maximum Subarray: https://leetcode.com/problems/maximum-subarray/"
},
{
"from": "gpt",
"value": "package leetcode.maximum_subarray;\n\npublic class Solution {\n public int maxSubArray(int[] A) {\n if(A == nu... | java | chosen |
[
{
"from": "human",
"value": "Add experimental annotation Hamcrest matcher.\n"
},
{
"from": "gpt",
"value": "package atg.tools.dynunit.hamcrest;\n\nimport org.hamcrest.Factory;\nimport org.hamcrest.FeatureMatcher;\nimport org.hamcrest.Matcher;\n\nimport java.lang.annotation.Annotation;\n\nimport ... | java | chosen |
[
{
"from": "human",
"value": "Add wrapper class for JavaFX\n"
},
{
"from": "gpt",
"value": "package com.metacodestudio.hotsuploader;\n\nimport javafx.application.Application;\nimport javafx.stage.Stage;\n\n\npublic class Client extends Application {\n\n public static void main(String[] args) {... | java | chosen |
[
{
"from": "human",
"value": "Add a rough cut of a service activator\n"
},
{
"from": "gpt",
"value": "/*\n * JBoss, Home of Professional Open Source.\n * Copyright 2010, Red Hat Middleware LLC, and individual contributors\n * as indicated by the @author tags. See the copyright.txt file in the\n *... | java | chosen |
[
{
"from": "human",
"value": "Add server mojo for Maven\n"
},
{
"from": "gpt",
"value": "/*\n * See the file LICENSE in distribution for licensing and copyright\n */\npackage org.jtestr.maven;\n\nimport org.apache.maven.plugin.AbstractMojo;\nimport org.apache.maven.plugin.MojoExecutionException;\... | java | chosen |
[
{
"from": "system",
"value": "Use a Deque instead of Stack.\n\njava.util.Stack is synchronized which is not necessary here.\n"
},
{
"from": "human",
"value": "package io.bit3.jsass.context;\n\nimport io.bit3.jsass.importer.Import;\n\nimport java.util.HashMap;\nimport java.util.Map;\nimport java.... | java | chosen |
[
{
"from": "human",
"value": "Create an output image for testing.\n"
},
{
"from": "gpt",
"value": "package com.nullprogram.noise;\n\nimport java.awt.Color;\nimport java.awt.image.BufferedImage;\nimport java.io.File;\nimport java.io.IOException;\nimport javax.imageio.ImageIO;\nimport lombok.val;\n... | java | chosen |
[
{
"from": "human",
"value": "Add package docs to o.l.api\n"
},
{
"from": "gpt",
"value": "/*\n * LensKit, an open source recommender systems toolkit.\n * Copyright 2010-2014 LensKit Contributors. See CONTRIBUTORS.md.\n * Work on LensKit has been funded by the National Science Foundation under\n... | java | chosen |
[
{
"from": "human",
"value": "Create method DO, define Judge's return format.\n"
},
{
"from": "gpt",
"value": "package src;\n\nimport java.io.IOException;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\nimport java.nio.file.Paths;\n\npublic class Game {\n\n String _player;\n DataB... | java | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.