conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "human",
"value": "Implement first JS method (not yet tested)\n"
},
{
"from": "gpt",
"value": "/*\n* Copyright (C) 2012 onwards University of Deusto\n* All rights reserved.\n*\n* This software is licensed as described in the file COPYING, which\n* you should have received as part of th... | java | chosen |
[
{
"from": "human",
"value": "Create an enum for the request execution mode"
},
{
"from": "gpt",
"value": "package com.codenvy.ide.ext.datasource.shared;\n\npublic enum MultipleRequestExecutionMode {\n\n /** All SQL requests are executed, continue after error. */\n ONE_BY_ONE,\n /** All ... | java | chosen |
[
{
"from": "system",
"value": "Add alwaysRun=true to the TestNG example's AfterClass method\n"
},
{
"from": "human",
"value": "package cucumber.examples.java.calculator;\n\nimport cucumber.api.CucumberOptions;\nimport cucumber.api.testng.TestNGCucumberRunner;\nimport cucumber.api.testng.CucumberF... | java | chosen |
[
{
"from": "human",
"value": "Add extra circuit (testing only)\n"
},
{
"from": "gpt",
"value": "/**\n * @author Wei Xie\n * @description Sub-circuit inside the loop of estimating n in 2^n (to approximate value x)\n */\n\npackage YaoGC;\n\npublic class SampleCircuit extends CompositeCircuit {\n ... | java | chosen |
[
{
"from": "human",
"value": "Create a skeleton for problem 204\n"
},
{
"from": "gpt",
"value": "package leetcode;\n\n/**\n * https://leetcode.com/problems/count-primes/\n */\npublic class Problem204 {\n public int countPrimes(int n) {\n // TODO:\n return 0;\n }\n \n pub... | java | chosen |
[
{
"from": "human",
"value": "Create a skeleton for problem 278\n"
},
{
"from": "gpt",
"value": "package leetcode;\n\n/**\n * https://leetcode.com/problems/first-bad-version/\n */\npublic class Problem278 {\n public static class VersionControl {\n public boolean isBadVersion(int version... | java | chosen |
[
{
"from": "human",
"value": "Allow PIX/PDQ search on PID + other identifiers (e.g. SSN).\n"
},
{
"from": "gpt",
"value": "/*\n * This code is subject to the HIEOS License, Version 1.0\n *\n * Copyright(c) 2011 Vangent, Inc. All rights reserved.\n *\n * Unless required by applicable law or agree... | java | chosen |
[
{
"from": "human",
"value": "Add test for the `ValidatorHelper` class.\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 ... | java | chosen |
[
{
"from": "human",
"value": "Make regex optional and add a key to each schema\n"
},
{
"from": "gpt",
"value": "package org.apache.curator.framework.schema;\n\nimport com.google.common.base.Preconditions;\nimport java.util.UUID;\n\npublic class SchemaKey\n{\n private final String key;\n\n p... | java | chosen |
[
{
"from": "human",
"value": "Add UI constants reference interface"
},
{
"from": "gpt",
"value": "/**\r\n * Copyright 2015 S-CASE Consortium\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * Y... | java | chosen |
[
{
"from": "system",
"value": "Add empty constructor to the sample app used for testing\n"
},
{
"from": "human",
"value": "package brooklyn.cli;\n\nimport brooklyn.entity.Entity;\nimport brooklyn.entity.basic.AbstractApplication;\n\nimport java.util.Map;\n\n/**\n * Simple brooklyn app used for te... | java | chosen |
[
{
"from": "system",
"value": "Add newline at end of file\n"
},
{
"from": "human",
"value": "/*\n * Copyright (c) 2013 DataTorrent, Inc. ALL Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the Licen... | java | chosen |
[
{
"from": "human",
"value": "Print all paths that add up to a number k.\n"
},
{
"from": "gpt",
"value": "package com.sunny.grokkingalgorithms.ctci.c4;\n\nimport com.sunny.grokkingalgorithms.ctci.c4.util.BinaryTreeNode;\nimport com.sunny.grokkingalgorithms.ctci.c4.util.TreeUtils;\n\nimport java.u... | java | chosen |
[
{
"from": "human",
"value": "Introduce wrapper around a list of storage requirement rules.\n"
},
{
"from": "gpt",
"value": "package com.novoda.downloadmanager;\n\nimport java.io.File;\nimport java.util.List;\n\nclass StorageRequirementRules implements StorageRequirementRule {\n\n private List... | java | chosen |
[
{
"from": "human",
"value": "Add cancellation token that checks only once every n invocations.\n"
},
{
"from": "gpt",
"value": "package org.metaborg.util.task;\n\npublic class RateLimitedCancel implements ICancel {\n\n private final ICancel cancel;\n private final int rate;\n\n private ... | java | chosen |
[
{
"from": "human",
"value": "Check in the test case - oops.\n\n\ngit-svn-id: 227c23bb629cf7bef445105b977924772e49ae4f@1112833 13f79535-47bb-0310-9956-ffa450edef68\n"
},
{
"from": "gpt",
"value": "/*\n \t(c) Copyright 2006 Hewlett-Packard Development Company, LP\n \tAll rights reserved - see end ... | java | chosen |
[
{
"from": "human",
"value": "Add unit test for AsyncCallbackAdapter\n"
},
{
"from": "gpt",
"value": "package com.github.vbauer.caesar.callback;\n\nimport com.github.vbauer.caesar.basic.BasicTest;\nimport org.junit.Assert;\nimport org.junit.Test;\n\nimport java.util.concurrent.atomic.AtomicBoolea... | java | chosen |
[
{
"from": "human",
"value": "Add class for holding short uuid\n"
},
{
"from": "gpt",
"value": "package com.hsingh.shortuuid;\n\n/**\n * A short, unambiguous and URL-safe UUID\n *\n * @author Harpreet Singh\n */\npublic final class ShortUuid {\n\n private final String uuid;\n\n private Shor... | java | chosen |
[
{
"from": "human",
"value": "Add basic tests for FavoriteApp*\n\nTest: ./gradlew test\n\nSigned-off-by: utzcoz <bf4fcb59289e9979ebf7a02b1609ee526a91bd2d@outlook.com>\n"
},
{
"from": "gpt",
"value": "package com.farmerbb.taskbar.service;\n\nimport android.content.SharedPreferences;\n\nimport com.... | java | chosen |
[
{
"from": "human",
"value": "Add test for Java examples\n"
},
{
"from": "gpt",
"value": "import java.util.ArrayList;\nimport java.util.List;\n\nimport junit.framework.Assert;\n\nimport org.junit.Test;\n\nimport com.amazonaws.services.ec2.model.Instance;\nimport com.tlswe.awsmock.common.util.Prop... | java | chosen |
[
{
"from": "human",
"value": "Add new capability to send log4j messages over 0MQ\n"
},
{
"from": "gpt",
"value": "package com.xrtb.tools;\n\nimport java.text.SimpleDateFormat;\n\n\nimport java.util.Date;\nimport java.util.Deque;\n\nimport org.apache.log4j.AppenderSkeleton;\nimport org.apache.log4... | java | chosen |
[
{
"from": "human",
"value": "Add unittests for elements of Model which are neither inherited nor\ninjected.\nIgnoring artifactId and modelVersion, these are required elements."
},
{
"from": "gpt",
"value": "package org.apache.maven.model.merge;\n\n\n/*\n * Licensed to the Apache Software Foundat... | java | chosen |
[
{
"from": "system",
"value": "Add apache headers to interceptor\n\ngit-svn-id: 2c5eef89e506a7ff64d405e714ba3c778b83051b@1506125 13f79535-47bb-0310-9956-ffa450edef68\n"
},
{
"from": "human",
"value": "package org.apache.rave.rest.interceptor;\n\nimport org.apache.cxf.interceptor.Fault;\nimport or... | java | chosen |
[
{
"from": "human",
"value": "Add M2M relationship between PAT and scope\n\nOSF implements many-to-many relationshp by using a third \"joining\" or\n\"bridging\" table that maps PAT and scope.\n"
},
{
"from": "gpt",
"value": "/*\n * Licensed to Jasig under one or more contributor license\n * agre... | java | chosen |
[
{
"from": "human",
"value": "Add marker interface for policy objects.\n"
},
{
"from": "gpt",
"value": "/**\n * Part of the CCNx Java Library.\n *\n * Copyright (C) 2010 Palo Alto Research Center, Inc.\n *\n * This library is free software; you can redistribute it and/or modify it\n * under the t... | java | chosen |
[
{
"from": "system",
"value": "Revert \"Revert \"not bad revert revert\"\"\n\nThis reverts commit 0d5023f5d858378bf559a2f21f2d05a27bd9d209.\n"
},
{
"from": "human",
"value": "package kr.ac.kookmin.cs.myhello;\n\npublic class HelloWorld {\n\n\t/**\n\t * @param args\n\t */\n\tpublic static void mai... | java | chosen |
[
{
"from": "human",
"value": "Add a reusable adapter to listen for project deletions in workspace"
},
{
"from": "gpt",
"value": "/*******************************************************************************\n * Copyright (c) 2015 Pivotal, Inc.\n * All rights reserved. This program and the acco... | java | chosen |
[
{
"from": "human",
"value": "Test class to test the id mapping.\n\n\nSVN-Revision: 3808\n"
},
{
"from": "gpt",
"value": "package gov.nih.nci.ispy.test;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\nimport gov.nih.nci.ispy.service.annotation.IdMapperEntry;\nimport gov.nih.nci.ispy.ser... | java | chosen |
[
{
"from": "human",
"value": "Add path that generates nothing\n"
},
{
"from": "gpt",
"value": "package org.zwobble.mammoth.internal.styles;\n\nimport org.zwobble.mammoth.internal.html.HtmlNode;\n\nimport java.util.List;\nimport java.util.function.Supplier;\n\nimport static org.zwobble.mammoth.int... | java | chosen |
[
{
"from": "human",
"value": "Create a enum for the field types.\n"
},
{
"from": "gpt",
"value": "package ryhma57.backend;\n\n/* Every possible field of a reference.\n *\n * These are directly from the bibtex documentation.\n * http://get-software.net/biblio/bibtex/base/btxdoc.pdf\n */\npublic en... | java | chosen |
[
{
"from": "human",
"value": "Add non null API annotation to credentials provider factory implementation package\n"
},
{
"from": "gpt",
"value": "/*\n * Copyright 2020 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use thi... | java | chosen |
[
{
"from": "human",
"value": "Add workspaceFile class which will reconstruct files from their history.\n"
},
{
"from": "gpt",
"value": "package com.google.sps.workspace;\n\nimport java.util.List;\nimport java.util.concurrent.CompletableFuture;\nimport java.util.concurrent.Future;\n\nimport com.go... | java | chosen |
[
{
"from": "human",
"value": "Add a SciJava command that uses Java 8 syntax\n"
},
{
"from": "gpt",
"value": "\npackage net.restlesscoder.sandbox;\n\nimport java.util.function.Function;\n\nimport org.scijava.command.Command;\nimport org.scijava.plugin.Parameter;\nimport org.scijava.plugin.Plugin;\... | java | chosen |
[
{
"from": "human",
"value": "Add Pololu Maestro set target test\n"
},
{
"from": "gpt",
"value": "package com.easternedgerobotics.rov.integration;\n\nimport com.easternedgerobotics.rov.io.pololu.PololuMaestro;\n\nimport com.pi4j.io.serial.Serial;\nimport com.pi4j.io.serial.SerialFactory;\n\nimpor... | java | chosen |
[
{
"from": "human",
"value": "Add class to read parameters from model config file\n"
},
{
"from": "gpt",
"value": "package edu.colorado.csdms.heat;\n\nimport java.io.File;\nimport java.util.HashMap;\n\nimport javax.xml.parsers.DocumentBuilder;\nimport javax.xml.parsers.DocumentBuilderFactory;\n\n... | java | chosen |
[
{
"from": "human",
"value": "Add model combining LargeNGramModel and KeywordOptimizerModel\n\ngit-svn-id: a8b04003a33e1d3e001b9d20391fa392a9f62d91@10748 94700074-3cef-4d97-a70e-9c8c206c02f5\n"
},
{
"from": "gpt",
"value": "package edu.cmu.sphinx.linguist.language.ngram.large;\r\n\r\nimport edu.c... | java | chosen |
[
{
"from": "human",
"value": "Add provider for Android PackageManager\n\nEncapsulates Androids PackageManager to make\nit injectable into classes.\n"
},
{
"from": "gpt",
"value": "package de.philipphager.disclosure.feature.device;\n\nimport android.content.pm.PackageInfo;\nimport android.content.... | java | chosen |
[
{
"from": "human",
"value": "Write binary stream to the client for download file\n\n\nSVN-Revision: 758\n"
},
{
"from": "gpt",
"value": "package gov.nih.nci.calab.service.util;\n\nimport java.io.BufferedInputStream;\nimport java.io.File;\nimport java.io.FileInputStream;\n\nimport javax.servlet.S... | java | chosen |
[
{
"from": "human",
"value": "Add sound resource based on MusicResource\n"
},
{
"from": "gpt",
"value": "package starpunk.services;\n\nimport javax.annotation.Nonnull;\n\npublic final class SoundResource\n{\n @Nonnull\n private final String _filename;\n\n public SoundResource( @Nonnull final S... | java | chosen |
[
{
"from": "human",
"value": "Add prototype annotation-based event mapper\n"
},
{
"from": "gpt",
"value": "\npackage forager.server;\n\nimport java.lang.annotation.Annotation;\nimport java.lang.reflect.Method;\n\nimport java.util.Arrays;\nimport java.util.HashMap;\nimport java.util.List;\nimport ... | java | chosen |
[
{
"from": "human",
"value": "Add test showing that Spring JdbiPlugin install works\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 Licen... | java | chosen |
[
{
"from": "human",
"value": "Solve CHEFLCM for April 2015.\n"
},
{
"from": "gpt",
"value": "import java.util.Scanner;\nclass PrimeFac\n{\n public static void main(String[] args)\n {\n Scanner in = new Scanner( System.in );\n int terms = in.nextInt();\n for(int q = 0; q... | java | chosen |
[
{
"from": "human",
"value": "Create Retrofit interface for AccuWeather APIs\n"
},
{
"from": "gpt",
"value": "package io.github.tobyhs.weatherweight.api.accuweather;\n\nimport java.util.List;\n\nimport io.reactivex.Single;\nimport retrofit2.Response;\nimport retrofit2.http.GET;\nimport retrofit2.... | java | chosen |
[
{
"from": "human",
"value": "Create : 7 Reverse Integer\n"
},
{
"from": "gpt",
"value": "public class Solution {\n\n public int reverse(int x) {\n\n long reversedNum = 0;\n\n while (x != 0) {\n\n reversedNum = (reversedNum * 10) + (x % 10);\n x /= 10;\n\n ... | java | chosen |
[
{
"from": "human",
"value": "Test that fields come out in same order they are defined.\n\n"
},
{
"from": "gpt",
"value": "package com.thoughtworks.xstream.converters.reflection;\n\nimport junit.framework.TestCase;\n\nimport java.util.Iterator;\nimport java.lang.reflect.Field;\n\npublic class Fie... | java | chosen |
[
{
"from": "human",
"value": "Create : 14 Longest Common Prefix\n"
},
{
"from": "gpt",
"value": "public class Solution {\n\n public String longestCommonPrefix(String[] strs) {\n\n if (strs == null || strs.length == 0) {\n return \"\";\n }\n\n String prefix = str... | java | chosen |
[
{
"from": "human",
"value": "Add an event bus hook example.\n"
},
{
"from": "gpt",
"value": "/*\n * Copyright 2013 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 * Yo... | java | chosen |
[
{
"from": "human",
"value": "Create : 643 Maximum Average Subarray I\n"
},
{
"from": "gpt",
"value": "public class Solution {\n\n public double findMaxAverage(int[] nums, int k) {\n\n int sum = 0;\n\n for (int i = 0; i < k; i++) {\n sum += nums[i];\n }\n\n ... | java | chosen |
[
{
"from": "human",
"value": "[Bitmex] Add test for order book\n"
},
{
"from": "gpt",
"value": "package org.knowm.xchange.bitmex.service.marketdata;\n\nimport org.junit.Before;\nimport org.junit.Test;\nimport org.knowm.xchange.ExchangeFactory;\nimport org.knowm.xchange.bitmex.BitmexExchange;\nimp... | java | chosen |
[
{
"from": "human",
"value": "Add unit test for event translator\n"
},
{
"from": "gpt",
"value": "package com.semation.jstatsd.server.messaging.disruptor;\n\nimport com.semation.jstatsd.StatsMessage;\nimport com.semation.jstatsd.server.messaging.StatsMessageParser;\nimport org.junit.Before;\nimpo... | java | chosen |
[
{
"from": "human",
"value": "Add smoke integration test for ignoring certain test methods\n"
},
{
"from": "gpt",
"value": "package fi.vincit.multiusertest;\r\n\r\nimport fi.vincit.multiusertest.annotation.TestUsers;\r\nimport fi.vincit.multiusertest.configuration.ConfiguredTest;\r\nimport fi.vin... | java | chosen |
[
{
"from": "human",
"value": "notification: Add metadata object for Payment events\n"
},
{
"from": "gpt",
"value": "/*\n * Copyright 2016 Groupon, Inc\n * Copyright 2016 The Billing Project, LLC\n *\n * The Billing Project licenses this file to you under the Apache License, version 2.0\n * (the \... | java | chosen |
[
{
"from": "human",
"value": "Add simple capability provider for multiple capabilities at once\n"
},
{
"from": "gpt",
"value": "package org.cyclops.cyclopscore.modcompat.capabilities;\n\nimport net.minecraft.util.EnumFacing;\nimport net.minecraftforge.common.capabilities.Capability;\nimport net.m... | java | chosen |
[
{
"from": "human",
"value": "Create a skeleton for problem 220\n"
},
{
"from": "gpt",
"value": "package leetcode;\n\n/**\n * https://leetcode.com/problems/contains-duplicate-iii/\n */\npublic class Problem220 {\n public boolean containsNearbyAlmostDuplicate(int[] nums, int k, int t) {\n ... | java | chosen |
[
{
"from": "human",
"value": "Add some jdbc annotation magic testing\n\n"
},
{
"from": "gpt",
"value": "package org.skife.jdbi.v2;\n\nimport junit.framework.TestCase;\n\nimport java.lang.reflect.Method;\nimport java.lang.reflect.ParameterizedType;\nimport java.lang.reflect.Type;\nimport java.util... | java | chosen |
[
{
"from": "human",
"value": "Add correspondence model view factory for Reactions"
},
{
"from": "gpt",
"value": "package tools.vitruv.extensions.dslsruntime.reactions;\n\nimport tools.vitruv.dsls.reactions.meta.correspondence.reactions.ReactionsCorrespondence;\nimport tools.vitruv.framework.corre... | java | chosen |
[
{
"from": "human",
"value": "Add annotation for plugin builder factory methods.\n\n - Similar to the @PluginFactory annotation, this one will be used \n by PluginBuilder to do field-level injection of configuration \n settings and such.\n\ngit-svn-id: de5ce936019686f47409c93bcc5e202a9739563b@1597491 13f7... | java | chosen |
[
{
"from": "human",
"value": "XWIKI-6871: Make XWiki Repository protocol more restfull\n"
},
{
"from": "gpt",
"value": "package org.xwiki.extension.repository.xwiki;\n\npublic class Paths\n{\n public final static String EXTENSIONS = \"/extensions/\";\n\n public final static String EXTENSION... | java | chosen |
[
{
"from": "human",
"value": "Test that delegation in PartitionsAwareAccessControl is complete\n\n`PartitionsAwareAccessControl` must explicitly implement all interface\nmethods. This adds a test for that.\n"
},
{
"from": "gpt",
"value": "/*\n * Licensed under the Apache License, Version 2.0 (th... | java | chosen |
[
{
"from": "human",
"value": "Add recording a conversation example.\n"
},
{
"from": "gpt",
"value": "/*\n * Copyright (c) 2011-2017 Nexmo Inc\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Softwar... | java | chosen |
[
{
"from": "human",
"value": "Create basis for person look up (for tye ahead)"
},
{
"from": "gpt",
"value": "/*\n * To change this template, choose Tools | Templates\n * and open the template in the editor.\n */\npackage uk.org.rbc1b.roms.controller.person;\n\nimport java.util.List;\nimport uk.or... | java | chosen |
[
{
"from": "human",
"value": "engine: Add host poller for setup network actions\n\nThe poller will monitor the connectivity to vdsm for the liveness\nof the engine-host communication.\n\nChange-Id: Ic11e71f0ee4e4ed4d6ae9a1d8fe4e5613da7a48f\nSigned-off-by: Moti Asayag <da1debb83a8e12b6e8822edf2c275f55cc51b720... | java | chosen |
[
{
"from": "human",
"value": "Add failing test: origins sometimes include surrounding literals when using the tokenized recursive imploder\n"
},
{
"from": "gpt",
"value": "package org.spoofax.jsglr2.integrationtest.features;\n\nimport java.util.Arrays;\nimport java.util.stream.Stream;\n\nimport o... | java | chosen |
[
{
"from": "human",
"value": "Add java solution for 202. Happy Number\n\n202. Happy Number: https://leetcode.com/problems/happy-number/"
},
{
"from": "gpt",
"value": "package leetcode.happy_number;\n\nimport java.util.HashSet;\nimport java.util.Set;\n\npublic class Solution {\n public boolean ... | java | chosen |
[
{
"from": "human",
"value": "Test for ucp replacing view strategy\n"
},
{
"from": "gpt",
"value": "/*\n * Copyright (C) 2016 the original author or authors.\n *\n * This file is part of jBB Application Project.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * You m... | java | chosen |
[
{
"from": "human",
"value": "XCOMMONS-1459: Add support for Maven <exclusions>\nXCOMMONS-1458: A constraint coming from a dependency management might not be taken into account if one of the dependencies is already installed\n"
},
{
"from": "gpt",
"value": "/*\n * See the NOTICE file distributed ... | java | chosen |
[
{
"from": "human",
"value": "Create failing test for openInMemory resource leak\n\nSee https://github.com/Unidata/netcdf-java/issues/166 for details.\n"
},
{
"from": "gpt",
"value": "package ucar.nc2;\n\nimport java.io.IOException;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\nimport... | java | chosen |
[
{
"from": "human",
"value": "Add test case for bad things to do with signed bytes\n\n\ngit-svn-id: e7d6bde23f017c9ff4efd468d79d66def666766b@6318 eae3c2d3-9b19-0410-a86e-396b6ccb6ab3\n"
},
{
"from": "gpt",
"value": "public class BadThingsToDoWithSignedBytes {\n\tpublic byte[] buf;\n\n\tboolean is... | java | chosen |
[
{
"from": "human",
"value": "Add integration tests for image tagging\n"
},
{
"from": "gpt",
"value": "package com.filestack;\n\nimport java.io.File;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport org.junit.AfterClass;\nimport org.junit.Assert;\nimport org.junit.Test;\n\npublic class... | java | chosen |
[
{
"from": "human",
"value": "Add Hadoop LZO codec shim\n\nCertain file formats store codec class name within file header section\n(e.g. sequence file) and provide no clean way for providing custom codec\nfactory.\n"
},
{
"from": "gpt",
"value": "/*\n * Licensed to the Apache Software Foundation ... | java | chosen |
[
{
"from": "human",
"value": "Add test for home (root) page\n"
},
{
"from": "gpt",
"value": "package test.unit.haushaltsbuch;\n\nimport static org.mockito.Matchers.anyString;\nimport static org.mockito.Matchers.eq;\nimport static org.mockito.Mockito.mock;\nimport static org.mockito.Mockito.verify... | java | chosen |
[
{
"from": "human",
"value": "Add a serialiser so values from JSONScheme can make it through\n"
},
{
"from": "gpt",
"value": "package uk.co.samstokes.storm.serializer;\n\nimport java.io.DataInputStream;\nimport java.io.DataOutputStream;\nimport java.io.InputStreamReader;\nimport java.io.IOExcepti... | java | chosen |
[
{
"from": "human",
"value": "Add a demo implementing Proxy on top of invokedynamic-proxy\n"
},
{
"from": "gpt",
"value": "package net.fushizen.invokedynamic.proxy;\n\nimport org.junit.Test;\n\nimport java.lang.invoke.*;\nimport java.lang.reflect.InvocationHandler;\nimport java.lang.reflect.Metho... | java | chosen |
[
{
"from": "human",
"value": "Add importer class to extract pdf file comments\n"
},
{
"from": "gpt",
"value": "package net.sf.jabref.logic.pdf;\n\nimport java.io.File;\nimport java.io.IOException;\nimport java.net.URI;\nimport java.util.HashMap;\nimport java.util.List;\n\nimport org.apache.pdfbox... | java | chosen |
[
{
"from": "human",
"value": "Create : 278 First Bad Version\n"
},
{
"from": "gpt",
"value": "/* The isBadVersion API is defined in the parent class VersionControl.\n boolean isBadVersion(int version); */\n\npublic class Solution extends VersionControl {\n\n public int firstBadVersion(int... | java | chosen |
[
{
"from": "human",
"value": "Add a microbenchmark for branching in a loop\n"
},
{
"from": "gpt",
"value": "\npackage net.restlesscoder.sandbox;\n\n/**\n * A stupid micro-benchmark for branching performance.\n * <p>\n * It's not shocking that branching in a loop can have a performance impact.\n *... | java | chosen |
[
{
"from": "human",
"value": "Add algo to compute string permutations\n"
},
{
"from": "gpt",
"value": "package com.anuragkapur.pie.recursion;\n\nimport org.junit.Test;\n\nimport static org.junit.Assert.*;\n\n/**\n * @author anuragkapur\n */\npublic class PermutationsTest {\n\n Permutations per... | java | chosen |
[
{
"from": "human",
"value": "Add new class for commandline usage. See JSPF-13\n\ngit-svn-id: 00f83033766efed07e2b0af284f6d6b8c92b3c53@409155 13f79535-47bb-0310-9956-ffa450edef68\n"
},
{
"from": "gpt",
"value": "/***********************************************************************\n * Copyrigh... | java | chosen |
[
{
"from": "human",
"value": "Create AsyncTask class to insert students\n"
},
{
"from": "gpt",
"value": "package br.com.alura.agenda.tasks;\n\nimport android.os.AsyncTask;\n\nimport br.com.alura.agenda.converter.AlunoConverter;\nimport br.com.alura.agenda.modelo.Aluno;\nimport br.com.alura.agenda... | java | chosen |
[
{
"from": "human",
"value": "Create initial unit test for Task\n"
},
{
"from": "gpt",
"value": "package seedu.address.model.task;\n\nimport static org.junit.Assert.assertFalse;\nimport static org.junit.Assert.assertTrue;\n\nimport java.time.ZonedDateTime;\nimport java.util.Optional;\n\nimport or... | java | chosen |
[
{
"from": "human",
"value": "Verify some format string issues relating to changings in jFormatString\n\n\ngit-svn-id: e7d6bde23f017c9ff4efd468d79d66def666766b@14990 eae3c2d3-9b19-0410-a86e-396b6ccb6ab3\n"
},
{
"from": "gpt",
"value": "package bugIdeas;\n\nimport java.math.BigDecimal;\nimport jav... | java | chosen |
[
{
"from": "human",
"value": "Add common interface for versioned objects\n"
},
{
"from": "gpt",
"value": "/*\n * #%L\n * SciJava Common shared library for SciJava software.\n * %%\n * Copyright (C) 2009 - 2014 Board of Regents of the University of\n * Wisconsin-Madison, Broad Institute of MIT and... | java | chosen |
[
{
"from": "human",
"value": "Add task that copies one file to another, replacing non printing characters with ?\n"
},
{
"from": "gpt",
"value": "package org.realityforge.antix;\n\nimport java.io.File;\nimport java.io.FileInputStream;\nimport java.io.FileOutputStream;\nimport java.io.IOException;... | java | chosen |
[
{
"from": "human",
"value": "Add Java implementation for ddi2odt transformation\n"
},
{
"from": "gpt",
"value": "package fr.insee.eno.main;\n\nimport java.io.File;\n\nimport fr.insee.eno.GenerationService;\nimport fr.insee.eno.generation.DDI2ODTGenerator;\nimport fr.insee.eno.postprocessing.Noop... | java | chosen |
[
{
"from": "human",
"value": "Remove invalid block from jei display (should fix some rendering issues)\n"
},
{
"from": "gpt",
"value": "package com.creativemd.littletiles.common.jei;\n\nimport com.creativemd.littletiles.LittleTiles;\n\nimport mezz.jei.api.IJeiRuntime;\nimport mezz.jei.api.IModPlu... | java | chosen |
[
{
"from": "human",
"value": "Add test class to generate regression files\n\ngit-svn-id: f5921e6c9a61b6015ffa18fe349c03fb73f2cf99@1757 998562b1-c221-4fe5-b3d3-2fd2107a5f19\n"
},
{
"from": "gpt",
"value": "package edu.mssm.pharm.maayanlab.Enrichr;\r\n\r\nimport edu.mssm.pharm.maayanlab.FileUtils;\... | java | chosen |
[
{
"from": "human",
"value": "Create skeleton for problem 60\n"
},
{
"from": "gpt",
"value": "package leetcode;\n\n/**\n * https://leetcode.com/problems/permutation-sequence/\n */\npublic class Problem60 {\n public String getPermutation(int n, int k) {\n getPermutation(n, \"\");\n ... | java | chosen |
[
{
"from": "human",
"value": "Create system status monitor thread\n\nDecides when to run new tasks\n"
},
{
"from": "gpt",
"value": "package forager.client;\n\nimport java.io.IOException;\n\npublic class StatusMonitor implements Runnable {\n\n int maxActive = 4;\n\n boolean online;\n\n pr... | java | chosen |
[
{
"from": "human",
"value": "Add tests for SearchByCategoryAction class.\n"
},
{
"from": "gpt",
"value": "/**\n * This source file is subject to the license that is bundled with this package in the file LICENSE.\n */\npackage com.codeup.application.actions;\n\nimport com.codeup.application.Movie... | java | chosen |
[
{
"from": "human",
"value": "Add plugin that tests handling of invalid params\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, Broa... | java | chosen |
[
{
"from": "human",
"value": "Rename class, add new database class\n"
},
{
"from": "gpt",
"value": "package de.eightbitboy.hijacr.data;\n\n/**\n * A helper class for working with the ComicDatabse class.\n */\npublic class ComicDatabaseHelper {\n//TODO implement queries\n}\n"
}
] | java | chosen |
[
{
"from": "human",
"value": "OODT-568: Support the ability to run PGE Task Instances on Windows (Cygwin) executable environments\n\ngit-svn-id: cd5c091416a298f3e35c4136755389c696553b5d@1452618 13f79535-47bb-0310-9956-ffa450edef68\n"
},
{
"from": "gpt",
"value": "/*\n * Licensed to the Apache Sof... | java | chosen |
[
{
"from": "human",
"value": "Test for `return` inside `finally` problem\n"
},
{
"from": "gpt",
"value": "package com.yuzhouwan.hacker.effective;\n\nimport org.junit.Test;\n\nimport static junit.framework.TestCase.assertEquals;\n\n/**\n * Copyright @ 2017 yuzhouwan\n * All right reserved.\n * Fun... | java | chosen |
[
{
"from": "human",
"value": "Add thread local secure random\n"
},
{
"from": "gpt",
"value": "package com.amazonaws.services.dynamodbv2.datamodeling.internal;\n\nimport java.security.SecureRandom;\n\npublic class Utils {\n private static final ThreadLocal<SecureRandom> RND = new ThreadLocal<Se... | java | chosen |
[
{
"from": "human",
"value": "Add empty adapter to make writing change listeners easier\n"
},
{
"from": "gpt",
"value": "package org.realityforge.replicant.client;\n\nimport javax.annotation.Nonnull;\n\npublic class EntityChangeListenerAdapter\n implements EntityChangeListener\n{\n @Override\n ... | java | chosen |
[
{
"from": "human",
"value": "Add model for Google image API response\n"
},
{
"from": "gpt",
"value": "package fi.reaktor.android.rx.json;\n\nimport com.fasterxml.jackson.annotation.JsonCreator;\nimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;\nimport com.fasterxml.jackson.annotatio... | java | chosen |
[
{
"from": "human",
"value": "Fix HIVE table logic size\n\nTest Plan: ant test\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 informa... | java | chosen |
[
{
"from": "human",
"value": "Solve No.10869 from Baekjoon Online Judge\n"
},
{
"from": "gpt",
"value": "/*\n * Copyright 2017 haeun kim\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 obtai... | java | chosen |
[
{
"from": "human",
"value": "Test conversion of Circuit to STG\n"
},
{
"from": "gpt",
"value": "package org.workcraft.plugins.circuit;\n\nimport java.io.IOException;\nimport java.net.URL;\nimport java.util.HashSet;\nimport java.util.Set;\n\nimport org.junit.Assert;\nimport org.junit.BeforeClass;... | java | chosen |
[
{
"from": "human",
"value": "Add root certificate without destroying system ones\n"
},
{
"from": "gpt",
"value": "package org.helioviewer.jhv.io;\n\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.security.GeneralSecurityException;\nimport java.security.KeyStore;\nimport ja... | java | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.