conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "human", "value": "Add helper methods for matrix transformations\n" }, { "from": "gpt", "value": "package org.cyclops.cyclopscore.helper;\n\nimport net.minecraft.util.EnumFacing;\n\n/**\n * Contains helper methods for matrix transformations.\n * Contains several methods from BuildCraft...
java
chosen
[ { "from": "human", "value": "Add Enumerable for task attributes\n" }, { "from": "gpt", "value": "package utask.model.task;\n//@@author A0138423J\npublic enum Attributes {\n DEADLINE, TIMESTAMP, ISCOMPLETED, FREQUENCY, TAG, UNKNOWN;\n\n String key;\n\n Attributes(String key) {\n t...
java
chosen
[ { "from": "system", "value": "Add solution to problem 62\n" }, { "from": "human", "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 * Yo...
java
chosen
[ { "from": "human", "value": "Create wrapper class for LogSessionId.\n\nThe platform class is only available from API 31, so we need\na generic wrapper that can be used on all API levels. The wrapper\nessentially provides an identifier for a player instance, so naming\nit accordingly.\n\nPiperOrigin-RevId: 4...
java
chosen
[ { "from": "human", "value": "Add an example illustrating manual endpoint instantiation\n" }, { "from": "gpt", "value": "/*\n * Copyright 2014 Splunk, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"): you may\n * not use this file except in compliance with the License...
java
chosen
[ { "from": "human", "value": "Add new DAO for session details\n" }, { "from": "gpt", "value": "package org.wso2.carbon.identity.application.authenticator.samlsso.dao;\n\n\nimport org.wso2.carbon.identity.application.authenticator.samlsso.exception.SAMLSSOException;\nimport org.wso2.carbon.identit...
java
chosen
[ { "from": "human", "value": "Test JUnit failure in the logs\n" }, { "from": "gpt", "value": "package hu.wirtz.citest;\n\nimport org.hamcrest.CoreMatchers;\nimport org.junit.Assert;\nimport org.junit.Test;\n\n/**\n * Created by gergo on 2017. 03. 07..\n */\npublic class BarTest {\n\n @Test\n ...
java
chosen
[ { "from": "human", "value": "Define API for remote storage manager\n" }, { "from": "gpt", "value": "/*\n * Copyright 2020 Google LLC\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 a...
java
chosen
[ { "from": "human", "value": "Add AST type for reference field\n" }, { "from": "gpt", "value": "package com.yahoo.searchdefinition.document;\n\nimport com.yahoo.document.DataType;\nimport com.yahoo.document.TemporaryStructuredDataType;\nimport com.yahoo.document.datatypes.FieldValue;\n\n/**\n * @...
java
chosen
[ { "from": "human", "value": "Add tests for edge cases of XmlReportData\n\nIssue: #86\n" }, { "from": "gpt", "value": "/*\n * Copyright 2015-2016 the original author or authors.\n *\n * All rights reserved. This program and the accompanying materials are\n * made available under the terms of the ...
java
chosen
[ { "from": "human", "value": "Create : 26 Remove Duplicates from Sorted Array\n" }, { "from": "gpt", "value": "public class Solution {\n\n public int removeDuplicates(int[] nums) {\n\n int curIndex = 0;\n\n for (int i = 1; i < nums.length; i++) {\n\n if (nums[i] != num...
java
chosen
[ { "from": "human", "value": "Move last of unit test code to test tree\n\ngit-svn-id: 52ad764cdf1b64a6e804f4e5ad13917d3c4b2253@372385 13f79535-47bb-0310-9956-ffa450edef68\n" }, { "from": "gpt", "value": "/*\n * Copyright 2001-2005 The Apache Software Foundation.\n *\n * Licensed under the Apache ...
java
chosen
[ { "from": "human", "value": "Add EnrichmentInterface message configuration class\n" }, { "from": "gpt", "value": "/*\n * Copyright 2019, TeamDev. All rights reserved.\n *\n * Redistribution and use in source and/or binary forms, with or without\n * modification, must retain the above copyright n...
java
chosen
[ { "from": "human", "value": "Test for misbehaving JVM boolean property editors\n\ngit-svn-id: https://svn.apache.org/repos/asf/jakarta/jmeter/trunk@646637 13f79535-47bb-0310-9956-ffa450edef68\n\nFormer-commit-id: 2a9d96b45c4f53b5aec9c0bf39855e44bd7db907" }, { "from": "gpt", "value": "/*\n * Lice...
java
chosen
[ { "from": "human", "value": "Add test to iterate through all rows and attempt to load them\n" }, { "from": "gpt", "value": "package com.swandiggy.poe4j.test;\n\nimport com.swandiggy.poe4j.data.DatFileLookup;\nimport com.swandiggy.poe4j.data.DatFileReader;\nimport com.swandiggy.poe4j.data.DatFile...
java
chosen
[ { "from": "human", "value": "Add stub test to check jdbc component testing\n" }, { "from": "gpt", "value": "package com.boundary.sdk.service;\n\nimport static org.junit.Assert.*;\n\nimport org.junit.After;\nimport org.junit.AfterClass;\nimport org.junit.Before;\nimport org.junit.BeforeClass;\nim...
java
chosen
[ { "from": "human", "value": "Add parses per second example\n" }, { "from": "gpt", "value": "package com.anthonynsimon.url.examples;\n\nimport com.anthonynsimon.url.URL;\nimport com.anthonynsimon.url.exceptions.MalformedURLException;\n\nimport java.text.DecimalFormat;\n\npublic class ParsesPerSec...
java
chosen
[ { "from": "human", "value": "Add MediaChunkIterator for HLS media playlists.\n\nThis allows to iterate through the available segments of the playlist.\n\n-------------\nCreated by MOE: https://github.com/google/moe\nMOE_MIGRATED_REVID=204100116\n" }, { "from": "gpt", "value": "/*\n * Copyright (...
java
chosen
[ { "from": "human", "value": "Add sample that to enable scalability testing\n" }, { "from": "gpt", "value": "import java.util.*;\n\npublic class Exercise7\n{\n\tpublic static void main(String[] args)\n\t{\n Random random = new Random();\n\t\tGameArena a;\n Ball balls[];\n int...
java
chosen
[ { "from": "human", "value": "Support OFFSET ... ROWS in Sql Server 2012\n" }, { "from": "gpt", "value": "package com.github.pagehelper.parser.impl;\n\nimport com.github.pagehelper.Page;\nimport org.apache.ibatis.mapping.BoundSql;\nimport org.apache.ibatis.mapping.MappedStatement;\n\nimport java....
java
chosen
[ { "from": "human", "value": "Add benchmark for incremental parsing sum non-ambiguous\n" }, { "from": "gpt", "value": "package org.spoofax.jsglr2.benchmark.jsglr2;\n\nimport org.openjdk.jmh.annotations.Param;\nimport org.spoofax.jsglr2.testset.TestSet;\n\npublic class JSGLR2SumNonAmbiguousBenchma...
java
chosen
[ { "from": "human", "value": "Create the implementation that uses Symbols to parse MonetaryAmount\n" }, { "from": "gpt", "value": "package org.javamoney.moneta.format;\n\nimport javax.money.MonetaryAmount;\nimport javax.money.format.MonetaryAmountFormat;\n/**\n *The {@link MonetaryAmountFormat} t...
java
chosen
[ { "from": "human", "value": "Add some tests to problem 43\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": "Issue-12: Add an adapter class for event listeners\n" }, { "from": "gpt", "value": "package com.mgmtp.perfload.core.web.event;\r\n\r\nimport com.mgmtp.perfload.core.client.event.LtProcessEvent;\r\nimport com.mgmtp.perfload.core.client.event.LtProcessEventListener;\r\...
java
chosen
[ { "from": "human", "value": "Add unit tests for list element parsing" }, { "from": "gpt", "value": "package org.monospark.spongematchers.parser.element;\n\nimport static org.hamcrest.CoreMatchers.equalTo;\nimport static org.junit.Assert.assertThat;\n\nimport org.junit.Test;\nimport org.monospark...
java
chosen
[ { "from": "human", "value": "Introduce abstract context-aware test base\n" }, { "from": "gpt", "value": "/*\n * Copyright 2020, TeamDev. 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...
java
chosen
[ { "from": "human", "value": "Add tile entity deferred register, that automatically builds the builder" }, { "from": "gpt", "value": "package info.u_team.u_team_core.util.registry;\n\nimport java.util.function.Supplier;\n\nimport com.mojang.datafixers.DataFixUtils;\n\nimport net.minecraft.tileent...
java
chosen
[ { "from": "human", "value": "Add simple utility for testing performance of file system operations.\n\n" }, { "from": "gpt", "value": "//\n// FileOpsTest.java\n//\n\nimport java.io.File;\n\n/** Tests performance of File.exists() vs File.listFiles(). */\npublic class FileOpsTest {\n public static...
java
chosen
[ { "from": "human", "value": "Add more agent auth filter tests\n" }, { "from": "gpt", "value": "/*\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * htt...
java
chosen
[ { "from": "human", "value": "Test case for dynamic schema creation." }, { "from": "gpt", "value": "package org.hisrc.xml.bind.tests;\n\nimport java.io.IOException;\n\nimport javax.xml.bind.JAXBContext;\nimport javax.xml.bind.JAXBException;\nimport javax.xml.bind.MarshalException;\nimport javax.x...
java
chosen
[ { "from": "human", "value": "Introduce a Metrics auto configuration file\n\nIntroduce a Metrics auto configuration file\n\n#236\n" }, { "from": "gpt", "value": "package org.axonframework.boot.autoconfig;\n\nimport com.codahale.metrics.MetricRegistry;\nimport org.axonframework.metrics.GlobalMetri...
java
chosen
[ { "from": "human", "value": "[PAXEXAM-293] Test case for JUnit @Rule\n" }, { "from": "gpt", "value": "/*\n * Copyright (C) 2011 Harald Wellmann\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 m...
java
chosen
[ { "from": "human", "value": "Create fragment class for AddSavingsAccountAmountSplit view\n" }, { "from": "gpt", "value": "package de.fau.amos.virtualledger.android.views.savings.add;\n\nimport de.fau.amos.virtualledger.android.model.SavingsAccount;\n\npublic class AddSavingsAccountAmountSplitFra...
java
chosen
[ { "from": "human", "value": "Add an interface for counting events.\n" }, { "from": "gpt", "value": "/*******************************************************************************\n * Copyright (C) 2017 Push Technology Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"...
java
chosen
[ { "from": "human", "value": "Solve No.2441 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": "Add unit test for VCFHeaderReader, fails on gzipped and BGZF VCF formats\n" }, { "from": "gpt", "value": "package org.seqdoop.hadoop_bam.util;\n\nimport java.io.IOException;\n\nimport com.google.common.io.Resources;\n\nimport htsjdk.samtools.seekablestream.ByteArrayS...
java
chosen
[ { "from": "human", "value": "Create easter egg helper with greeting method.\n" }, { "from": "gpt", "value": "package com.github.aureliano.achmed.helper;\n\nimport java.util.Calendar;\n\npublic final class EasterEggHelper {\n\n\tprivate EasterEggHelper() {\n\t\tthrow new InstantiationError(this.g...
java
chosen
[ { "from": "human", "value": "Add problem 2 to unit 3\n" }, { "from": "gpt", "value": "import java.util.Scanner;\n\n/**\n * This program determines if two entered strings are subsets of each other.\n **/\npublic class Subset {\n public static boolean contains(String a, String b) {\n int...
java
chosen
[ { "from": "human", "value": "Add class for managing macro lists\n" }, { "from": "gpt", "value": "package org.matthewjwhite.stata.macro;\n\nimport org.matthewjwhite.stata.string.Quotes;\n\npublic class MacroList {\n\tpublic static String invtokens(String[] list, Quotes.Style style) {\n\t\tStringB...
java
chosen
[ { "from": "human", "value": "Add a function that operates on trees.\n" }, { "from": "gpt", "value": "package org.nwapw.abacus.function;\n\nimport org.nwapw.abacus.number.NumberInterface;\nimport org.nwapw.abacus.tree.TreeNode;\n\n/**\n * A function that operates on parse tree nodes instead of on...
java
chosen
[ { "from": "human", "value": "Check for duplicate rows in the assembly table.\n" }, { "from": "gpt", "value": "/*\n Copyright (C) 2003 EBI, GRL\n \n This library is free software; you can redistribute it and/or\n modify it under the terms of the GNU Lesser General Public\n License as published by...
java
chosen
[ { "from": "human", "value": "Add controller which for controlling life cycle of application. Read excel report from file system.\n" }, { "from": "gpt", "value": "import javafx.application.Application;\nimport javafx.application.Platform;\nimport javafx.stage.FileChooser;\nimport javafx.stage.Sta...
java
chosen
[ { "from": "human", "value": "Revert \"moved to other place\"\n\nThis reverts commit c797379dcb177831cd080a40b691fde394452460.\n" }, { "from": "gpt", "value": "package pl.selvin.android.syncframework;\n\nimport pl.selvin.android.ListSyncSample.Constants;\nimport pl.selvin.android.ListSyncSample.p...
java
chosen
[ { "from": "human", "value": "Add a nice helper to wrap checked Exceptions to unchecked ones\n" }, { "from": "gpt", "value": "package net.binggl.login.core.util;\n\n/**\n * @see https://gist.github.com/jfager/9317201\n * \n * <pre>\n * {@code\n * import static net.binggl.login.core.util.Exception...
java
chosen
[ { "from": "human", "value": "Add unit tests for rolling array\n" }, { "from": "gpt", "value": "package ru.nsu.ccfit.bogush.chat.server;\n\nimport org.junit.Test;\n\nimport static org.junit.Assert.*;\n\npublic class ConcurrentRollingArrayTest {\n\t@Test(expected = IllegalArgumentException.class)\...
java
chosen
[ { "from": "human", "value": "Add test for MessageProcess spy event\n" }, { "from": "gpt", "value": "package replicant.spy;\n\nimport arez.Arez;\nimport java.util.HashMap;\nimport org.realityforge.guiceyloops.shared.ValueUtil;\nimport org.realityforge.replicant.client.transport.DataLoadStatus;\ni...
java
chosen
[ { "from": "system", "value": "Increase max allowed continuation indent size (see IDEA-183665)\n" }, { "from": "human", "value": "/*\n * Copyright 2000-2017 JetBrains s.r.o.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in complianc...
java
chosen
[ { "from": "human", "value": "Add a test for PersonDAO\n\nAs an example of how to use `DAOTestRule`.\n" }, { "from": "gpt", "value": "package com.example.helloworld.db;\n\nimport com.example.helloworld.core.Person;\nimport io.dropwizard.testing.junit.DAOTestRule;\nimport org.hibernate.exception.C...
java
chosen
[ { "from": "human", "value": "[TACHYON-649] Add unit test of AllocatorFactory\n" }, { "from": "gpt", "value": "/*\n * Licensed to the University of California, Berkeley under one or more contributor license\n * agreements. See the NOTICE file distributed with this work for additional information ...
java
chosen
[ { "from": "human", "value": "Create wrapper class for LogSessionId.\n\nThe platform class is only available from API 31, so we need\na generic wrapper that can be used on all API levels. The wrapper\nessentially provides an identifier for a player instance, so naming\nit accordingly.\n\nPiperOrigin-RevId: 4...
java
chosen
[ { "from": "human", "value": "Add SSF reorder integration test\n\nCloses #16\n" }, { "from": "gpt", "value": "package rx.broadcast.integration;\n\nimport org.junit.Test;\nimport rx.Observable;\nimport rx.broadcast.Broadcast;\nimport rx.broadcast.SingleSourceFifoOrder;\nimport rx.broadcast.TestVal...
java
chosen
[ { "from": "human", "value": "Check in new file needed by previous check-in, and do ignores\n\n\nFormer-commit-id: e7bc80dd96045659ed8ff0bce928446749cb6bcf" }, { "from": "gpt", "value": "package org.intermine.sql.writebatch;\n\n/*\n * Copyright (C) 2002-2007 FlyMine\n *\n * This code may be freel...
java
chosen
[ { "from": "human", "value": "XWIKI-3083: Develop the initial feature set for the Office Importer module\n\n* Introduced an AnchorFilter for filtering xhtml anchors. But this filter is not included in OpenOfficeHTMLCleaner yet because wikimodel seems to have an issue with parsing the xhtml anchor into xwiki...
java
chosen
[ { "from": "human", "value": "Camel-AWS: Create single Karaf feature tests for single components, aws-iam test\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 * ...
java
chosen
[ { "from": "human", "value": "Add tests for escapeOroRegexpChars function\n\ngit-svn-id: https://svn.apache.org/repos/asf/jmeter/trunk@1785459 13f79535-47bb-0310-9956-ffa450edef68\n\nFormer-commit-id: 2f5d33a44a3b41159506252b7becc4374bd472b9" }, { "from": "gpt", "value": "/*\n * Licensed to the A...
java
chosen
[ { "from": "human", "value": "Add sanity check for the state abbreviation-name pairs.\n" }, { "from": "gpt", "value": "// Copyright 2019 Google LLC\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 cts test for SearchResult, MatchInfo and MatchRange\n\nBug: 183239760\nBug: 183239899\nBug: 183239508\nBug: 183239762\nTest: SearchResultCtsTest\nChange-Id: Ic59fa1063a75fa5e177b2c5f66ffb1026224f570\n" }, { "from": "gpt", "value": "/*\n * Copyright 2021 The Andro...
java
chosen
[ { "from": "human", "value": "Add local key cache implementation.\n" }, { "from": "gpt", "value": "package authentication.keys.impl;\n\nimport java.util.HashMap;\nimport java.util.Map;\n\nimport authentication.keys.KeyCache;\n\nimport com.google.common.cache.Cache;\n\npublic class LocalKeyCache e...
java
chosen
[ { "from": "human", "value": "Add enum for descriptive statistic denominators\n" }, { "from": "gpt", "value": "/*\n * Copyright 2015 Open mHealth\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": "Add the Callback for the Retrieved Issue\n" }, { "from": "gpt", "value": "package com.genymobile.pr.net;\n\nimport com.genymobile.pr.bus.BusProvider;\nimport com.genymobile.pr.bus.IssueRetrievedEvent;\nimport com.genymobile.pr.model.Issue;\n\nimport android.util.Log;...
java
chosen
[ { "from": "system", "value": "Print a list of aliases, if any exist.\n\n\ngit-svn-id: becfadaebdf67c7884f0d18099f2460615305e2e@921 c76caeb1-94fd-44dd-870f-0c9d92034fc1\n" }, { "from": "human", "value": "import java.util.*;\nimport org.xbill.DNS.*;\n\npublic class lookup {\n\npublic static void\n...
java
chosen
[ { "from": "human", "value": "SO-4635: Create code system upgrade state" }, { "from": "gpt", "value": "/*\n * Copyright 2021 B2i Healthcare Pte Ltd, http://b2i.sg\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the...
java
chosen
[ { "from": "system", "value": "Allow for passing parameters and delaying the run for analysis" }, { "from": "human", "value": "package net.stickycode.deploy.sample.main;\n\npublic class HelloWorld {\n\n public static void main(String[] args) {\n System.out.println(\"Hello World!\");\n }\n}\n...
java
chosen
[ { "from": "human", "value": "Add the first Java-written Activity.\n" }, { "from": "gpt", "value": "package hypernova.activities;\n\nimport java.util.Random;\n\nimport hypernova.Mass;\nimport hypernova.Loot;\nimport hypernova.Universe;\nimport hypernova.Activity;\n\npublic class GoodieField exten...
java
chosen
[ { "from": "human", "value": "camel-vertx-http: Add a test for streaming responses to file\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 additio...
java
chosen
[ { "from": "human", "value": "Add test case for CCTF\n" }, { "from": "gpt", "value": "/*\n * Copyright 2013 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain...
java
chosen
[ { "from": "human", "value": "Add test cases for PropertySortDescriptor." }, { "from": "gpt", "value": "/* PropertySortDescriptorTests.java created on Dec 5, 2015.\r\n *\r\n * Copyright (c) <2015> Pin-Ying Tu <dbi1463@gmail.com>\r\n * \r\n * This file is part of SortDescriptor under the MIT licen...
java
chosen
[ { "from": "human", "value": "Add example Java program that uses conexp-clj\n\nSigned-off-by: Daniel Borchmann <25857343a15bf1edafebc2912e82ecf775c585c1@mailbox.tu-dresden.de>\n" }, { "from": "gpt", "value": "import static conexp.contrib.JavaInterface.*;\n\npublic class Test {\n public static vo...
java
chosen
[ { "from": "human", "value": "Add default implementation of Collapse to CompositeView.\n" }, { "from": "gpt", "value": "package net.imagej.ops.views;\n\nimport net.imagej.ops.view.ViewOps;\nimport net.imagej.ops.view.ViewOps.Collapse;\nimport net.imglib2.RandomAccessibleInterval;\nimport net.imgl...
java
chosen
[ { "from": "human", "value": "Add deployment list fragment class\n" }, { "from": "gpt", "value": "/*\n * Copyright (c) 2014 Ushahidi.\n *\n * This program is free software: you can redistribute it and/or modify it under\n * the terms of the GNU Affero General Public License as published by the Fr...
java
chosen
[ { "from": "human", "value": "XWIKI-5197: Save & Continue should save as minor edit\nAdded test.\n\ngit-svn-id: cf27bad30c6b7316185bdac65b014e8c16cd40b6@28894 f329d543-caf0-0310-9063-dda96c69346f\n" }, { "from": "gpt", "value": "/*\n * See the NOTICE file distributed with this work for additional...
java
chosen
[ { "from": "human", "value": "Add test for the website's code example.\n\nEnsure that there is no foolish code on the website.\n" }, { "from": "gpt", "value": "package com.github.stefanbirkner.fishbowl;\n\nimport org.junit.Test;\nimport org.junit.experimental.runners.Enclosed;\nimport org.junit.r...
java
chosen
[ { "from": "human", "value": "Add class for GUI element identification warning\n" }, { "from": "gpt", "value": "package de.retest.recheck.ui.diff;\n\nimport java.io.Serializable;\n\nimport javax.xml.bind.annotation.XmlAttribute;\n\nimport lombok.Data;\nimport lombok.RequiredArgsConstructor;\n\n/*...
java
chosen
[ { "from": "human", "value": "Solve problem 137 (using O(n) space)\n" }, { "from": "gpt", "value": "package leetcode;\n\nimport java.util.HashMap;\nimport java.util.Map;\n\n/**\n * https://leetcode.com/problems/single-number-ii/\n */\npublic class Problem137 {\n public int singleNumber(int[] A...
java
chosen
[ { "from": "human", "value": "Increase mutation coverage in robozonky-app to make AppVeyor happy\n" }, { "from": "gpt", "value": "/*\n * Copyright 2018 The RoboZonky Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in complianc...
java
chosen
[ { "from": "human", "value": "Add test for Gremlin utility.\n" }, { "from": "gpt", "value": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding c...
java
chosen
[ { "from": "human", "value": "Add statement to problem 55\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": "Add missing class from previous commit." }, { "from": "gpt", "value": "package org.oddjob.beancmpr.comparers;\r\n\r\nimport org.oddjob.beancmpr.Comparison;\r\n\r\n\r\n/**\r\n * A {@link Comparison} that is the result of comparing many things.\r\n * \r\n * @author rob...
java
chosen
[ { "from": "human", "value": "Split and Merge combined to PageByPage Content Search\n" }, { "from": "gpt", "value": "package org.cbsa.api.controller.search;\n\nimport java.io.File;\nimport java.io.FileInputStream;\nimport java.io.IOException;\nimport java.util.ArrayList;\nimport java.util.List;\n...
java
chosen
[ { "from": "human", "value": "Add bundle logging provider for combing multiple providers\n" }, { "from": "gpt", "value": "/*\n * Copyright 2020 Martin Winandy\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with\n * the Lice...
java
chosen
[ { "from": "human", "value": "Add a test plugin for results tables\n" }, { "from": "gpt", "value": "package imagej.core.commands.debug;\n\nimport imagej.command.Command;\nimport imagej.data.table.DefaultResultsTable;\nimport imagej.data.table.ResultsTable;\nimport imagej.module.ItemIO;\nimport im...
java
chosen
[ { "from": "human", "value": "Add an empty authentication manager to the resource server to satisfy method security annotations.\n" }, { "from": "gpt", "value": "/*\n * Copyright 2014 Open mHealth\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this f...
java
chosen
[ { "from": "human", "value": "Test case for tracking fields in NP analysis\n\n\ngit-svn-id: e7d6bde23f017c9ff4efd468d79d66def666766b@6015 eae3c2d3-9b19-0410-a86e-396b6ccb6ab3\n" }, { "from": "gpt", "value": "package npe;\nclass TrackFields {\n Object x;\n TrackFields(Object x) {\n ...
java
chosen
[ { "from": "human", "value": "Add a Application subclass for the PowerShell implementation\n" }, { "from": "gpt", "value": "/*\n * Copyright © 2010 Red Hat, Inc.\n *\n * This is free software; you can redistribute it and/or modify it\n * under the terms of the GNU Lesser General Public License as...
java
chosen
[ { "from": "human", "value": "Move URLClassLoader into a separate class" }, { "from": "gpt", "value": "/*\n * This file is part of FastClasspathScanner.\n * \n * Author: Luke Hutchison\n * \n * Hosted at: https://github.com/lukehutch/fast-classpath-scanner\n * \n * --\n *\n * The MIT License (MIT...
java
chosen
[ { "from": "human", "value": "core: Add support for creating in memory tar\n\nChange-Id: I090ab5f9323dca57e8de191c1bc32cd5a164b71d\nSigned-off-by: Liron Aravot <3348b1f361b8c114be0a6d9109c20a9213007b88@redhat.com>\n" }, { "from": "gpt", "value": "package org.ovirt.engine.core.utils.archivers.tar;...
java
chosen
[ { "from": "human", "value": "Add java solution for 38. Count and Say\n\n38. Count and Say: https://leetcode.com/problems/count-and-say/" }, { "from": "gpt", "value": "package leetcode.count_and_say;\n\nimport java.util.ArrayList;\n\npublic class Solution {\n public String countAndSay(int n) {...
java
chosen
[ { "from": "human", "value": "Add util class to return the local host name\n\ngit-svn-id: bdb5f82b9b83a1400e05d69d262344b821646179@1629 e217846f-e12e-0410-a4e5-89ccaea66ff7\n" }, { "from": "gpt", "value": "package edu.usc.glidein.util;\n\nimport java.net.InetAddress;\n\nimport org.apache.log4j.Lo...
java
chosen
[ { "from": "human", "value": "Add another test to ensure invariants fail appropriately\n" }, { "from": "gpt", "value": "package arez.integration;\n\nimport arez.annotations.ArezComponent;\nimport arez.annotations.ComponentNameRef;\nimport org.testng.annotations.Test;\nimport static org.testng.Ass...
java
chosen
[ { "from": "human", "value": "Configure home and login pages.\n" }, { "from": "gpt", "value": "package security;\n\nimport org.springframework.context.annotation.Configuration;\nimport org.springframework.web.servlet.config.annotation.ViewControllerRegistry;\nimport org.springframework.web.servle...
java
chosen
[ { "from": "human", "value": "Add class for parser exception handling.\n" }, { "from": "gpt", "value": "package com.github.apsk.hax;\n\nimport javax.xml.stream.XMLStreamException;\n\npublic class ParseException extends XMLStreamException {\n public ParseException(String msg) {\n super(m...
java
chosen
[ { "from": "human", "value": "HIVE-11731: Exclude hbase-metastore in itests for hadoop-1\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 addition...
java
chosen
[ { "from": "human", "value": "Make a start with unit test for ClearableContextManager\n" }, { "from": "gpt", "value": "/*\n * Copyright 2016-2018 Talsma ICT\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the Licens...
java
chosen
[ { "from": "human", "value": "[prover.tests] Add test for division by zero\n" }, { "from": "gpt", "value": "package edu.kit.iti.formal.pse.worthwhile.prover;\n\nimport org.junit.Assert;\nimport org.junit.Test;\n\nimport edu.kit.iti.formal.pse.worthwhile.common.tests.TestASTProvider;\nimport edu.k...
java
chosen
[ { "from": "human", "value": "Add some console utility class.\n" }, { "from": "gpt", "value": "/*\n * Java Genetic Algorithm Library (@__identifier__@).\n * Copyright (c) @__year__@ Franz Wilhelmstötter\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use ...
java
chosen
[ { "from": "human", "value": "Add unit test for IteratorUtils.\n" }, { "from": "gpt", "value": "package org.apache.tinkerpop.gremlin.util.iterator;\n\nimport org.junit.Test;\n\nimport java.util.Iterator;\n\nimport static org.junit.Assert.assertEquals;\nimport static org.junit.Assert.assertFalse;\...
java
chosen
[ { "from": "human", "value": "Add an attribute for watermarking Lightsaber-processed classes\n" }, { "from": "gpt", "value": "/*\n * Copyright 2015 Michael Rozumyanskiy\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance wit...
java
chosen
[ { "from": "human", "value": "Add pending test for allowing generic type field.\n" }, { "from": "gpt", "value": "package org.mutabilitydetector.benchmarks.mutabletofield;\n\npublic final class HasFieldOfGenericType<T> {\n\n public final T field;\n\n public HasFieldOfGenericType(T field) {\n...
java
chosen
[ { "from": "human", "value": "Add visitors package for PluginVisitors.\n\ngit-svn-id: de5ce936019686f47409c93bcc5e202a9739563b@1597505 13f79535-47bb-0310-9956-ffa450edef68\n" }, { "from": "gpt", "value": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor li...
java
chosen
[ { "from": "human", "value": "Add an uncaught exception handler that logs a message to a SLF4J logger.\n" }, { "from": "gpt", "value": "/*\n * Copyright 2015 Greg Kopff\n * All rights reserved.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this softwa...
java
chosen