conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "human",
"value": "Add a specific JBoss Registry\n\ngit-svn-id: bf08415a33f9c0f05ac2b054c631df0aaa894ee0@640 f54485bd-ff3a-0410-97a1-83db373c2bce\n"
},
{
"from": "gpt",
"value": "/**\n * Copyright (c) 2008 Intalio inc.\n *\n * All rights reserved. This program and the accompanying mate... | java | chosen |
[
{
"from": "human",
"value": "Add java solution for 76. Minimum Window Substring\n\n76. Minimum Window Substring: https://leetcode.com/problems/minimum-window-substring/"
},
{
"from": "gpt",
"value": "package leetcode.minimum_window_substring;\n\nimport java.util.HashMap;\nimport java.util.Map;\n... | java | chosen |
[
{
"from": "human",
"value": "Add back to make config server work with older models\n* Still needed, getting NoClassDefFoundError\n"
},
{
"from": "gpt",
"value": "// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.\npackage com.yahoo.c... | java | chosen |
[
{
"from": "human",
"value": "Add solution for problem Java String Reverse\n\nJava String Reverse from HackerRank/Strings/Java String Reverse\n"
},
{
"from": "gpt",
"value": "package javaStringReverse;\n\nimport java.util.Scanner;\n\npublic class Solution {\n \n\tpublic static boolean isPalind... | java | chosen |
[
{
"from": "human",
"value": "Create a Bot that does nothing\n"
},
{
"from": "gpt",
"value": "package nl.cois;\n\nimport start.Bot;\n\nimport java.io.IOException;\n\npublic class DvbBot extends Bot {\n public static void main(String[] args) throws IOException {\n new DvbBot().readSystem... | java | chosen |
[
{
"from": "human",
"value": "Add unit test for LString.toInputStream (meant to commit this a while ago)\n"
},
{
"from": "gpt",
"value": "package lua.value;\n\nimport java.io.IOException;\nimport java.io.InputStream;\n\nimport junit.framework.TestCase;\n\npublic class LStringTest extends TestCase... | java | chosen |
[
{
"from": "human",
"value": "Check that only one schema build type has been set to current in the coord_system table."
},
{
"from": "gpt",
"value": "package org.ensembl.healthcheck.testcase.funcgen;\n\nimport java.sql.Connection;\nimport java.sql.ResultSet;\nimport java.sql.SQLException;\nimport... | java | chosen |
[
{
"from": "human",
"value": "Add a registry singleton provider\n"
},
{
"from": "gpt",
"value": "package org.jboss.weld.bootstrap.api.helpers;\n\nimport java.util.Hashtable;\nimport java.util.Map;\n\nimport org.jboss.weld.bootstrap.api.Singleton;\nimport org.jboss.weld.bootstrap.api.SingletonProv... | java | chosen |
[
{
"from": "human",
"value": "Add unit test for new --uml-timeout option\n\nSigned-off-by: Sjoerd Talsma <1dafb4c4a7acdc6e1eca32ff35fda03e0e9cd976@talsma-ict.nl>\n"
},
{
"from": "gpt",
"value": "/*\n * Copyright 2016-2020 Talsma ICT\n *\n * Licensed under the Apache License, Version 2.0 (the \"Li... | java | chosen |
[
{
"from": "human",
"value": "Create a class to hold max age calculation when start time for caching availability is the day before the end caching time - i.e. the caching availability period runs overnight.\n"
},
{
"from": "gpt",
"value": "package uk.ac.ebi.quickgo.rest.cache;\n\nimport java.tim... | java | chosen |
[
{
"from": "human",
"value": "Add test case contributed by Matt Hargett\n\ngit-svn-id: e7d6bde23f017c9ff4efd468d79d66def666766b@7471 eae3c2d3-9b19-0410-a86e-396b6ccb6ab3\n"
},
{
"from": "gpt",
"value": "import java.sql.Connection;\nimport java.sql.ResultSet;\nimport java.sql.SQLException;\nimport... | java | chosen |
[
{
"from": "system",
"value": "Allow for import of 2016 Events\n"
},
{
"from": "human",
"value": "package com.team2052.frckrawler;\n\npublic class GlobalValues {\n /**\n * SharedPreferences file name\n */\n public static final String PREFS_FILE_NAME = \"FRCKrawlerPrefs\";\n publi... | java | chosen |
[
{
"from": "human",
"value": "Add 'word dictionary' for fun times\n"
},
{
"from": "gpt",
"value": "package com.rwtema.funkylocomotion.rendering;\n\nimport cpw.mods.fml.common.ObfuscationReflectionHelper;\nimport java.util.HashSet;\nimport java.util.Locale;\nimport java.util.Map;\nimport net.minec... | java | chosen |
[
{
"from": "human",
"value": "Check that transcript frameshift attributes have been calculated for core databases.\n"
},
{
"from": "gpt",
"value": "/*\n Copyright (C) 2003 EBI, GRL\n \n This library is free software; you can redistribute it and/or\n modify it under the terms of the GNU Lesser Gen... | java | chosen |
[
{
"from": "human",
"value": "Add servlet to queue a download.\n"
},
{
"from": "gpt",
"value": "package com.google.sps.servlets;\n\nimport com.google.cloud.tasks.v2.AppEngineHttpRequest;\nimport com.google.cloud.tasks.v2.CloudTasksClient;\nimport com.google.cloud.tasks.v2.HttpMethod;\nimport com.... | java | chosen |
[
{
"from": "human",
"value": "Add a test case for TLS 1.3 CLIENT-CERT\n\ngit-svn-id: 79cef5a5a257cc9dbe40a45ac190115b4780e2d0@1843405 13f79535-47bb-0310-9956-ffa450edef68\n"
},
{
"from": "gpt",
"value": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor lic... | java | chosen |
[
{
"from": "human",
"value": "Add response type for JSON serialization using Jackson\n"
},
{
"from": "gpt",
"value": "// Copyright 2019 Oath Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.\npackage com.yahoo.restapi;\n\nimport com.fasterxml.jackson.databi... | java | chosen |
[
{
"from": "human",
"value": "Add missing DbOpenHelper class (required by prev. commit)\n"
},
{
"from": "gpt",
"value": "package org.wikimedia.commons.data;\n\nimport android.content.Context;\nimport android.database.sqlite.SQLiteDatabase;\nimport android.database.sqlite.SQLiteOpenHelper;\nimport... | java | chosen |
[
{
"from": "human",
"value": "Create basic test for JUnit functionality.\n\nThis should be removed at a later date, but for now, it is a good way to\nverify that JUnit is working. The failing test has been given an ignore\nannotation, for obvious reasons.\n"
},
{
"from": "gpt",
"value": "package ... | java | chosen |
[
{
"from": "human",
"value": "Add class to maintain the application version number.\n"
},
{
"from": "gpt",
"value": "/*\n * To change this license header, choose License Headers in Project Properties.\n * To change this template file, choose Tools | Templates\n * and open the template in the edit... | java | chosen |
[
{
"from": "human",
"value": "Add test for Interval op.\n"
},
{
"from": "gpt",
"value": "package net.imagej.ops.view;\n\nimport static org.junit.Assert.assertTrue;\nimport net.imagej.ops.AbstractOpTest;\nimport net.imglib2.img.Img;\nimport net.imglib2.img.array.ArrayImgFactory;\nimport net.imglib... | java | chosen |
[
{
"from": "human",
"value": "Add java solution for 136. Single Number\n\n136. Single Number: https://leetcode.com/problems/single-number/"
},
{
"from": "gpt",
"value": "package leetcode.single_number;\n\npublic class Solution {\n\tpublic int singleNumber(int[] A) {\n int ans = 0;\n ... | java | chosen |
[
{
"from": "human",
"value": "Add the standard event controller"
},
{
"from": "gpt",
"value": "package com.mozu.base.controllers;\r\n\r\nimport javax.servlet.http.HttpServletRequest;\r\n\r\nimport org.springframework.http.HttpStatus;\r\nimport org.springframework.http.ResponseEntity;\r\nimport or... | java | chosen |
[
{
"from": "human",
"value": "Hide 'No log4j2 configuration file found' error\n\nAdd a Log4J2 `ConfigurationFactory` that is always applied so that the\n\"No log4j2 configuration file found\" error message does not appear.\n\nAlthough the message was harmless it was quite annoying to Spring Boot\nusers who c... | java | chosen |
[
{
"from": "human",
"value": "Add a connection to send events asynchronously\n"
},
{
"from": "gpt",
"value": "package net.kencochrane.raven.connection;\n\nimport net.kencochrane.raven.event.LoggedEvent;\n\nimport java.util.concurrent.ExecutorService;\nimport java.util.concurrent.Executors;\n\n/**... | java | chosen |
[
{
"from": "human",
"value": "Add configurable hard recipe for sacred light\n\nAdd documentation for totem types\nUpdate sacred light documentation "
},
{
"from": "gpt",
"value": "package com.corwinjv.mobtotems.items.guide;\n\n/**\n * Created by CorwinJV on 2/6/2017.\n */\npublic class PageOfferi... | java | chosen |
[
{
"from": "human",
"value": "Add Tests for Isin validator\n"
},
{
"from": "gpt",
"value": "package name.abuchen.portfolio.util;\n\nimport static org.junit.Assert.assertFalse;\nimport static org.junit.Assert.assertTrue;\n\nimport org.junit.Test;\n\npublic class IsinTest\n{\n @Test\n public ... | java | chosen |
[
{
"from": "human",
"value": "Add an example custom adapter which delegates\n"
},
{
"from": "gpt",
"value": "/*\n * Copyright (C) 2015 Square, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * Yo... | java | chosen |
[
{
"from": "human",
"value": "Add configuration for pagaing related properties.\n"
},
{
"from": "gpt",
"value": "package uk.ac.ebi.quickgo.ontology;\n\nimport uk.ac.ebi.quickgo.ontology.controller.ECOController;\nimport uk.ac.ebi.quickgo.ontology.controller.GOController;\nimport uk.ac.ebi.quickgo... | java | chosen |
[
{
"from": "human",
"value": "Add an example of writing a file in text and reading with BufferedReader\n"
},
{
"from": "gpt",
"value": "/*\n * Copyright 2013 Peter Lawrey\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 tests. See ticket:61.\n\nSigned-off-by: Raymond Audet <281aa2b19aab01efe2941a7da076ec0616a9b992@gmail.com>\nSigned-off-by: Etienne M. Gagnon <bf06ec0eb40152cd863534753d026b021022c851@j-meg.com>\n"
},
{
"from": "gpt",
"value": "/* This file is part of SableC... | java | chosen |
[
{
"from": "human",
"value": "Add a new handler that is responsible for registering a Collection of NotificationReceiver instances with the current SecurityContext.\n"
},
{
"from": "gpt",
"value": "/*\n * JBoss, Home of Professional Open Source.\n * Copyright 2013 Red Hat, Inc., and individual co... | java | chosen |
[
{
"from": "human",
"value": "Add some basic tests around ChannelDescriptor\n"
},
{
"from": "gpt",
"value": "package org.realityforge.replicant.server;\n\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.Collections;\nimport java.util.List;\nimport org.testng.annotations.Te... | java | chosen |
[
{
"from": "human",
"value": "Add abstract implementation of ProtocolHandlerChain for simplify implementations\n\ngit-svn-id: 72b794ca7b43188aed56de932e8081c5d617dce0@940679 13f79535-47bb-0310-9956-ffa450edef68\n"
},
{
"from": "gpt",
"value": "/****************************************************... | java | chosen |
[
{
"from": "human",
"value": "Create Service dedicated notification displayer.\n"
},
{
"from": "gpt",
"value": "package com.novoda.downloadmanager;\n\nimport android.app.Notification;\nimport android.app.Service;\nimport android.support.v4.app.NotificationManagerCompat;\n\nclass ServiceNotificati... | java | chosen |
[
{
"from": "human",
"value": "Add driver for running method tests\n\nAPI test cases are not in a maven/gradle project test folder.\nIDEs may not automatically configure JUnit test launchers,\nand a gradle build command will not automatically run tests.\nThis class is provided as a convenience until gradle ta... | java | chosen |
[
{
"from": "human",
"value": "Substitute BootLoader.hasClassPath() to work around a JDK 11 NPE\n"
},
{
"from": "gpt",
"value": "package io.quarkus.runtime.graal;\n\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.net.URL;\nimport java.util.Enumeration;\n\nimport com.oracle.s... | java | chosen |
[
{
"from": "human",
"value": "Add service injection test to git\n"
},
{
"from": "gpt",
"value": "package eu.scasefp7.eclipse.services.nlp.consumer;\n\nimport javax.inject.Inject;\n\nimport eu.scasefp7.eclipse.services.nlp.AnnotationFormat;\nimport eu.scasefp7.eclipse.services.nlp.INLPServiceAsync... | java | chosen |
[
{
"from": "human",
"value": "Add source example of using StreamedTriplesIterator\n\ngit-svn-id: bc509ec38c1227b3e85ea1246fda136342965d36@1437945 13f79535-47bb-0310-9956-ffa450edef68\n"
},
{
"from": "gpt",
"value": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more con... | java | chosen |
[
{
"from": "human",
"value": "Create : 121 Best Time to Buy and Sell Stock\n"
},
{
"from": "gpt",
"value": "import java.util.Arrays;\n\npublic class Solution {\n\n public int findContentChildren(int[] g, int[] s) {\n\n Arrays.sort(g);\n Arrays.sort(s);\n\n int gIndex = 0;\... | java | chosen |
[
{
"from": "human",
"value": "Add stubbed implementation of StorageManager.getVolumeList(int, int)\n\nPiperOrigin-RevId: 208535767\n"
},
{
"from": "gpt",
"value": "package org.robolectric.shadows;\n\nimport static android.os.Build.VERSION_CODES.M;\n\nimport android.os.storage.StorageManager;\nimp... | java | chosen |
[
{
"from": "system",
"value": "Test should not break when no internet connection"
},
{
"from": "human",
"value": "package eu.europa.ec.markt.dss.validation102853.tsl;\n\nimport org.junit.Assert;\nimport org.junit.Test;\n\nimport eu.europa.ec.markt.dss.validation102853.https.CommonsDataLoader;\n\n... | java | chosen |
[
{
"from": "human",
"value": "Include test using RemoteWebDriver without URL\n"
},
{
"from": "gpt",
"value": "/*\n * (C) Copyright 2017 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 comp... | java | chosen |
[
{
"from": "human",
"value": "Add unit test on MethodMatcher\n"
},
{
"from": "gpt",
"value": "/**\n * Copyright (c) 2013-2015 by The SeedStack authors. All rights reserved.\n *\n * This file is part of SeedStack, An enterprise-oriented full development stack.\n *\n * This Source Code Form is subj... | java | chosen |
[
{
"from": "human",
"value": "Add test coverage for the MessageInterface class\n"
},
{
"from": "gpt",
"value": "package net.kencochrane.raven.event.interfaces;\n\nimport org.testng.annotations.Test;\n\nimport java.util.Collections;\nimport java.util.List;\n\nimport static org.hamcrest.MatcherAsse... | java | chosen |
[
{
"from": "human",
"value": "Add serialization tests for ONetworkPropagate\n"
},
{
"from": "gpt",
"value": "package com.orientechnologies.orient.distributed.impl.coordinator.network;\n\nimport com.orientechnologies.orient.core.db.config.ONodeIdentity;\nimport com.orientechnologies.orient.distrib... | java | chosen |
[
{
"from": "human",
"value": "Introduce delete classes directories action\n\nAddresses #158\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 f... | java | chosen |
[
{
"from": "human",
"value": "Fix wrong test class name"
},
{
"from": "gpt",
"value": "package org.monospark.spongematchers.parser.base;\n\nimport static org.hamcrest.CoreMatchers.not;\nimport static org.junit.Assert.assertThat;\nimport static org.monospark.spongematchers.testutil.HamcrestSpongeM... | java | chosen |
[
{
"from": "human",
"value": "Add benchmark for statistical moments.\n"
},
{
"from": "gpt",
"value": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regardi... | java | chosen |
[
{
"from": "human",
"value": "XWIKI-9307: Add API to help convert a String to Locale\n* add tests\n"
},
{
"from": "gpt",
"value": "/*\n * See the NOTICE file distributed with this work for additional\n * information regarding copyright ownership.\n *\n * This is free software; you can redistribut... | java | chosen |
[
{
"from": "human",
"value": "Add skeleton for problem 303\n"
},
{
"from": "gpt",
"value": "package leetcode;\n\n/**\n * https://leetcode.com/problems/range-sum-query-immutable/\n */\npublic class Problem303 {\n public static class NumArray {\n public NumArray(int[] nums) {\n\n }... | java | chosen |
[
{
"from": "human",
"value": "Create a skeleton for problem 313\n"
},
{
"from": "gpt",
"value": "package leetcode;\n\n/**\n * https://leetcode.com/problems/super-ugly-number/\n */\npublic class Problem313 {\n public int nthSuperUglyNumber(int n, int[] primes) {\n // TODO\n return... | java | chosen |
[
{
"from": "human",
"value": "Add needed class for parameter items\n"
},
{
"from": "gpt",
"value": "package com.boundary.plugin.sdk.examples;\n\npublic class SimplePluginConfigurationItem {\n\tprivate String name;\n\tprivate String source;\n\t\n\tpublic SimplePluginConfigurationItem() {\n\t}\n\n\... | java | chosen |
[
{
"from": "human",
"value": "Add compatibility test with Axis M1054 camera\n"
},
{
"from": "gpt",
"value": "// Copyright (c) 2016 Petter Wintzell\n\npackage com.albroco.barebonesdigest.compatibility;\n\nimport com.albroco.barebonesdigest.DigestAuthentication;\n\nimport org.junit.Test;\n\nimport ... | java | chosen |
[
{
"from": "human",
"value": "Add equality test for `AbstractVersionableEntity`\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... | java | chosen |
[
{
"from": "human",
"value": "Add Spring boot main class\n"
},
{
"from": "gpt",
"value": "package net.lkrnac.blog.seleniumontravis;\n\nimport org.springframework.boot.SpringApplication;\nimport org.springframework.boot.autoconfigure.SpringBootApplication;\n\n@SpringBootApplication\npublic class A... | java | chosen |
[
{
"from": "human",
"value": "Add test of User model\n"
},
{
"from": "gpt",
"value": "package com.growthbeat.model;\n\nimport static org.junit.Assert.assertEquals;\nimport static org.junit.Assert.assertNotNull;\nimport static org.junit.Assert.assertNull;\nimport static org.junit.Assert.fail;\n\ni... | java | chosen |
[
{
"from": "human",
"value": "Add ViewPager implementation that can be backed by a Cursor.\n"
},
{
"from": "gpt",
"value": "/*\n * Copyright (C) 2012 Antew | antewcode@gmail.com\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compl... | java | chosen |
[
{
"from": "human",
"value": "Add preprocessor that auto-fills UserInterfaces\n"
},
{
"from": "gpt",
"value": "/*\n * #%L\n * ImageJ software for multidimensional image processing and analysis.\n * %%\n * Copyright (C) 2009 - 2012 Board of Regents of the University of\n * Wisconsin-Madison, Broad... | java | chosen |
[
{
"from": "human",
"value": "Add documentation for Zalando's Spring problem lib\n"
},
{
"from": "gpt",
"value": "<%#\n Copyright 2013-2017 the original author or authors from the JHipster project.\n\n This file is part of the JHipster project, see http://www.jhipster.tech/\n for more information... | java | chosen |
[
{
"from": "human",
"value": "Add Best Time to Buy or Sell Stock 3\n"
},
{
"from": "gpt",
"value": "package problems;\n\npublic class BestTimeToBuySellStock3 {\n public int maxProfit(int[] prices) {\n if (prices == null || prices.length <= 1)\n return 0;\n\n int n = pr... | java | chosen |
[
{
"from": "human",
"value": "Add simple example program to test search field text. It has a search field and a button. The button is just a place to put the focus so we can see the search field drawn both ways."
},
{
"from": "gpt",
"value": "package com.seaglasslookandfeel.demo;\n\nimport java.a... | java | chosen |
[
{
"from": "human",
"value": "Implement a client side context from IHyracksCommonContext.\n\nNotice that we return null from the getIOManger method because\nclients don't really need to have any IOManager. So the method\nis just a stub to fulfill the interface requirements.\n\ngit-svn-id: 45400e483b316c70cab... | java | chosen |
[
{
"from": "human",
"value": "Bug:17389: Add support for mixed document type of documents from MarkLogic.\n\n"
},
{
"from": "gpt",
"value": "/*\n * Copyright (c) 2003-2012 MarkLogic Corporation. All rights reserved.\n */\npackage com.marklogic.mapreduce;\n\nimport java.io.DataInput;\nimport java.... | java | chosen |
[
{
"from": "human",
"value": "Test to verify that data are encrypted if written to disk.\n"
},
{
"from": "gpt",
"value": "package com.github.davidcarboni.encryptedfileupload;\n\nimport com.github.davidcarboni.cryptolite.Random;\nimport org.apache.commons.fileupload.FileItem;\nimport org.apache.co... | java | chosen |
[
{
"from": "human",
"value": "Add unit tests for xobject operator\n"
},
{
"from": "gpt",
"value": "package org.verapdf.model.impl.pb.operator.xobject;\n\nimport org.junit.BeforeClass;\nimport org.junit.Test;\nimport org.verapdf.model.impl.pb.operator.base.PBOperatorTest;\nimport org.verapdf.model... | java | chosen |
[
{
"from": "human",
"value": "Copy file verbatim to preserve git history.\n"
},
{
"from": "gpt",
"value": "package no.steria.osgi.jsr330activator.tests;\n\nimport static org.junit.Assert.*;\nimport static org.ops4j.pax.exam.CoreOptions.junitBundles;\nimport static org.ops4j.pax.exam.CoreOptions.m... | java | chosen |
[
{
"from": "human",
"value": "Add c-struct-like class representing a Client Device.\n"
},
{
"from": "gpt",
"value": "package com.example.testapp;\n\nimport java.net.InetAddress;\n\n/** All public data members, similar to a C-struct */\npublic class ClientDevice {\n\tpublic int id;\n\tpublic long ... | java | chosen |
[
{
"from": "human",
"value": "Add class identifier for mapping between classes\n"
},
{
"from": "gpt",
"value": "package me.xdrop.jrand.annotation.processing;\n\nimport com.github.javaparser.ast.body.ClassOrInterfaceDeclaration;\n\nimport javax.lang.model.element.PackageElement;\nimport java.util.... | java | chosen |
[
{
"from": "human",
"value": "[NGRINDER-703] Make the configuration consistent and predictable.\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 co... | java | chosen |
[
{
"from": "human",
"value": "Add unit test for changed address parsing\n"
},
{
"from": "gpt",
"value": "/*\n * ice4j, the OpenSource Java Solution for NAT and Firewall Traversal.\n *\n * Copyright @ 2015 Atlassian Pty Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\... | java | chosen |
[
{
"from": "system",
"value": "Fix compilation after upstream changes\n\nOriginal commit: elastic/x-pack-elasticsearch@b1cb074651dec52a1e4beaa2788b3461d2172c53\n"
},
{
"from": "human",
"value": "/*\n * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one\n * or more contri... | java | chosen |
[
{
"from": "human",
"value": "Add a servlet returning the generated SQL to the client\n\nThis is a potential security risk, always limit access to it\n"
},
{
"from": "gpt",
"value": "/*\n Copyright 2010-2017 BusinessCode GmbH, Germany\n\n Licensed under the Apache License, Version 2.0 (the \"Li... | java | chosen |
[
{
"from": "system",
"value": "Fix study actions order on the toolbar\n"
},
{
"from": "human",
"value": "package com.jetbrains.edu.learning;\n\nimport com.intellij.openapi.actionSystem.DefaultActionGroup;\nimport com.intellij.openapi.project.Project;\nimport com.jetbrains.edu.courseFormat.Course;... | java | chosen |
[
{
"from": "human",
"value": "Add JUnit tests for GoogleConnector.\n"
},
{
"from": "gpt",
"value": "package google.finder;\n\nimport static org.junit.Assert.assertEquals;\nimport static org.junit.Assert.assertTrue;\nimport static org.mockito.ArgumentMatchers.anyString;\nimport static org.mockito.... | java | chosen |
[
{
"from": "human",
"value": "Apply the patch for WINK-339 from myself as the first commit\n\ngit-svn-id: 00d204a5454029cb4c4f043d44e9809460a5ea01@1080436 13f79535-47bb-0310-9956-ffa450edef68\n"
},
{
"from": "gpt",
"value": "/***********************************************************************... | java | chosen |
[
{
"from": "human",
"value": "Add regression test case for bugzilla 152704\n"
},
{
"from": "gpt",
"value": "/*******************************************************************************\n * Copyright (c) 2004 Actuate Corporation. All rights reserved. This program and\n * the accompanying mater... | java | chosen |
[
{
"from": "human",
"value": "Add quick exploration of SCIFIO metadata parsing\n"
},
{
"from": "gpt",
"value": "\npackage net.restlesscoder.sandbox.scifio;\n\nimport io.scif.FieldPrinter;\nimport io.scif.Format;\nimport io.scif.ImageMetadata;\nimport io.scif.Metadata;\n\nimport java.io.File;\n\ni... | java | chosen |
[
{
"from": "human",
"value": "Apply patch for HARMONY-3354([classlib][test] Refactor test for java.io.NotActiveException's default constructor)\n\nsvn path=/harmony/; revision=517623\n"
},
{
"from": "gpt",
"value": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * c... | java | chosen |
[
{
"from": "human",
"value": "Add java solution for 231. Power of Two\n\n231. Power of Two: https://leetcode.com/problems/power-of-two/"
},
{
"from": "gpt",
"value": "package leetcode.power_of_two;\n\npublic class Solution {\n public boolean isPowerOfTwo(int n) {\n return n > 0 && ((n &... | java | chosen |
[
{
"from": "human",
"value": "Add Jsvc daemon patch from Eric."
},
{
"from": "gpt",
"value": "package voldemort.server;\n\nimport static voldemort.utils.Utils.croak;\n\nimport org.apache.log4j.Logger;\n\n/**\n * Daemon class for use with the jsvc wrapper.\n * <p>\n * Simple example usage:\n * <p>... | java | chosen |
[
{
"from": "human",
"value": "Test negative numerators divided by a power of two constant.\n"
},
{
"from": "gpt",
"value": "\nclass NegativeDivideConst\n{\n static int div2(int n)\n {\n\treturn n / 2;\n }\n \n static int div4(int n)\n {\n\treturn n / 4;\n }\n \n static ... | java | chosen |
[
{
"from": "human",
"value": "Add a stack implementation using iterator\n"
},
{
"from": "gpt",
"value": "package Practice;\n\nimport java.util.ArrayList;\nimport java.util.Collection;\nimport java.util.Iterator;\n\n/**\n * Project: LearnJava\n * Package: Practice\n * Author: Novemser\n * 2016/10... | java | chosen |
[
{
"from": "human",
"value": "Add java solution for 23. Merge k Sorted Lists\n\n23. Merge k Sorted Lists: https://leetcode.com/problems/merge-k-sorted-lists/"
},
{
"from": "gpt",
"value": "package leetcode.merge_k_sorted_lists;\n\nimport java.util.ArrayList;\nimport java.util.Random;\n\nimport co... | java | chosen |
[
{
"from": "human",
"value": "Add NoUrlFound Exception for future handling"
},
{
"from": "gpt",
"value": "package ch.ice.exceptions;\n\npublic class NoUrlFoundException extends Exception{\n\t\n\tprivate static final long serialVersionUID = -6640585459525231605L;\n\t\n\tpublic NoUrlFoundException(... | java | chosen |
[
{
"from": "human",
"value": "Add example for RestTemplateBuilder use\n"
},
{
"from": "gpt",
"value": "/*\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n * FOR A PARTICULAR PURP... | java | chosen |
[
{
"from": "system",
"value": "utils: Handle mapping bnd project name to renamed eclipse project\n\nIf you rename a project in eclipse, it does not change the folder name\njust the project name in .project. This change deals with such a rename\nwhen bndtools needs to find the eclipse project for a bnd projec... | java | chosen |
[
{
"from": "human",
"value": "Check if input strings are valid anagrams\n"
},
{
"from": "gpt",
"value": "import java.util.Arrays;\n\npublic class ValidAnagram {\n public boolean isAnagram(String s, String t) {\n char[] charS = s.toCharArray ();\n char[] charT = t.toCharArray ();\... | java | chosen |
[
{
"from": "human",
"value": "Check that type analysis understands that Throwable.initCause(Throwable) always returns the this object.\n\n\ngit-svn-id: e7d6bde23f017c9ff4efd468d79d66def666766b@5360 eae3c2d3-9b19-0410-a86e-396b6ccb6ab3\n"
},
{
"from": "gpt",
"value": "import java.io.BufferedReader... | java | chosen |
[
{
"from": "human",
"value": "Implement set of stacks, spillover logic if threshold is reached.\n"
},
{
"from": "gpt",
"value": "package com.sunny.grokkingalgorithms.ctci.c3;\n\nimport java.util.Stack;\n\n/**\n * Created by sundas on 3/17/2018.\n */\npublic class SetOfStacks {\n\n /*\n In rea... | java | chosen |
[
{
"from": "human",
"value": "Solve No.2742 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 obtain... | java | chosen |
[
{
"from": "human",
"value": "Test case for [1948275] Unhelpful \"Load of known null\"\n\ngit-svn-id: e7d6bde23f017c9ff4efd468d79d66def666766b@9535 eae3c2d3-9b19-0410-a86e-396b6ccb6ab3\n"
},
{
"from": "gpt",
"value": "package sfBugs;\n\npublic class Bug1948275 {\n\tpublic static String trim(Strin... | java | chosen |
[
{
"from": "human",
"value": "Fix install script and dirtools so that we can add a user\n"
},
{
"from": "gpt",
"value": "/* **********************************************************************\n Copyright 2009 Rensselaer Polytechnic Institute. All worldwide rights reserved.\n\n Redistribu... | java | chosen |
[
{
"from": "human",
"value": "Add enqueue file for fetching movie data\n"
},
{
"from": "gpt",
"value": "package cs263;\n\n// The Enqueue servlet should be mapped to the \"/enqueue\" URL.\nimport java.io.IOException;\n\nimport javax.servlet.ServletException;\nimport javax.servlet.http.HttpServlet;... | java | chosen |
[
{
"from": "human",
"value": "Test that CharArraySequence functions as expected"
},
{
"from": "gpt",
"value": "package io.xlate.edi.internal.stream;\n\nimport static org.junit.jupiter.api.Assertions.*;\n\nimport java.nio.CharBuffer;\n\nimport org.junit.jupiter.api.BeforeEach;\nimport org.junit.ju... | java | chosen |
[
{
"from": "human",
"value": "Add connection pool client unit test."
},
{
"from": "gpt",
"value": "package net.rubyeye.xmemcached.test.unittest;\r\n\r\nimport java.net.InetSocketAddress;\r\nimport java.util.List;\r\n\r\nimport net.rubyeye.xmemcached.MemcachedClientBuilder;\r\nimport net.rubyeye.x... | java | chosen |
[
{
"from": "human",
"value": "Add unit test for PDUByteBuffer\n"
},
{
"from": "gpt",
"value": "package org.jsmpp.util;\nimport static org.testng.Assert.assertEquals;\n\nimport org.testng.annotations.BeforeMethod;\nimport org.testng.annotations.Test;\n/**\n * @author uudashr\n *\n */\npublic class... | java | chosen |
[
{
"from": "human",
"value": "Add an Enum<?> type adapter\n"
},
{
"from": "gpt",
"value": "package com.pcloud.networking;\n\nimport com.pcloud.protocol.streaming.ProtocolReader;\nimport com.pcloud.protocol.streaming.ProtocolWriter;\n\nimport java.io.IOException;\nimport java.util.HashMap;\nimport... | java | chosen |
[
{
"from": "human",
"value": "Add method utility to check arguments\n"
},
{
"from": "gpt",
"value": "package com.amalgam.lang.reflect;\n\n/**\n * @author keishin.yokomaku\n */\n@SuppressWarnings(\"unused\") // public APIs\npublic final class MethodUtils {\n public static final String TAG = Met... | java | chosen |
[
{
"from": "human",
"value": "Add a sample wizard with an auto injection in samples\n\nChange-Id: I82480f5141897f9e728f99270fcb147aeea7cd89\nSigned-off-by: Olivier Prouvost <922fcad8957c9a47efb13ab034b8bf0240ed7092@opcoach.com>\n"
},
{
"from": "gpt",
"value": "package com.opcoach.training.e4.code... | java | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.