conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "human", "value": "Add helper class for working EXIF headers\n" }, { "from": "gpt", "value": "package com.cocoahero.android.essentials.media;\n\nimport java.io.File;\nimport java.io.IOException;\nimport java.text.SimpleDateFormat;\nimport java.util.Date;\n\nimport android.location.Loca...
java
chosen
[ { "from": "human", "value": "Split functions out from Expression.java into separate classes.\n" }, { "from": "gpt", "value": "/*\n * This file is part of Mapyrus, software for plotting maps.\n * Copyright (C) 2003 Simon Chenery.\n *\n * Mapyrus is free software; you can redistribute it and/or mo...
java
chosen
[ { "from": "human", "value": "Create an interface to be producer of MonetaryAmount\n" }, { "from": "gpt", "value": "package org.javamoney.moneta.spi;\n\nimport java.util.Objects;\n\nimport javax.money.CurrencyUnit;\nimport javax.money.MonetaryAmount;\n\nimport org.javamoney.moneta.FastMoney;\n\np...
java
chosen
[ { "from": "human", "value": "Add missing unit test utility class\n" }, { "from": "gpt", "value": "package com.gitblit.tests;\r\n\r\nimport java.security.KeyPair;\r\n\r\nimport org.eclipse.jgit.transport.JschConfigSessionFactory;\r\nimport org.eclipse.jgit.transport.OpenSshConfig;\r\nimport org.e...
java
chosen
[ { "from": "human", "value": "Add test for Phabricator repo browser\n\nCompletes addition of repo browser tests\n" }, { "from": "gpt", "value": "package hudson.plugins.git.browser;\n\nimport hudson.plugins.git.GitChangeSet;\nimport java.io.IOException;\nimport java.net.URL;\nimport org.junit.Test...
java
chosen
[ { "from": "human", "value": "Add fragment class for EventCategory\n" }, { "from": "gpt", "value": "package in.co.sdslabs.cognizance;\n\nimport android.os.Bundle;\nimport android.support.v4.app.Fragment;\nimport android.view.LayoutInflater;\nimport android.view.View;\nimport android.view.ViewGrou...
java
chosen
[ { "from": "human", "value": "Add tests for csv exporter\n" }, { "from": "gpt", "value": "package io.mandrel.data.export;\n\nimport io.mandrel.data.content.FieldExtractor;\nimport io.mandrel.gateway.Document;\n\nimport java.io.ByteArrayOutputStream;\nimport java.io.OutputStreamWriter;\nimport jav...
java
chosen
[ { "from": "human", "value": "Add java solution for 45. Jump Game II\n\n45. Jump Game II: https://leetcode.com/problems/jump-game-ii/" }, { "from": "gpt", "value": "package leetcode.jump_game_ii;\n\npublic class Solution {\n\tpublic int jump(int[] A) {\n\t\tif(A == null || A.length == 0) return -...
java
chosen
[ { "from": "system", "value": "Fix guide book entry order.\n" }, { "from": "human", "value": "package net.silentchaos512.gems.guide;\n\nimport java.util.Collection;\nimport java.util.Collections;\nimport java.util.HashMap;\nimport java.util.List;\n\nimport com.google.common.collect.Lists;\n\n/**\...
java
chosen
[ { "from": "human", "value": "Add annotation to mark utility classes\n" }, { "from": "gpt", "value": "package io.jasonsparc.chemistry.util;\n\nimport java.lang.annotation.Documented;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.Target;\n\nimport static java.lang.annotation...
java
chosen
[ { "from": "human", "value": "Add some tests to problem 23\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": "Fix the failing test with @tglaeser's PR." }, { "from": "gpt", "value": "/*\n * Copyright 2020 DiffPlug\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 test for token map initialization at startup (JAVA-415).\n" }, { "from": "gpt", "value": "package com.datastax.driver.core;\n\nimport java.nio.ByteBuffer;\nimport java.util.Set;\n\nimport org.testng.annotations.*;\n\nimport static org.testng.Assert.assertFalse;\n...
java
chosen
[ { "from": "system", "value": "Move Alert into events package\n" }, { "from": "human", "value": "/*\n * Copyright 2015 Red Hat, Inc. and/or its affiliates\n * and other contributors as indicated by the @author tags.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you...
java
chosen
[ { "from": "human", "value": "Create Vaadin view with BrowserFrame with Hystrix dashboard\n" }, { "from": "gpt", "value": "package no.uio.ifi.trackfind.frontend;\n\nimport com.vaadin.annotations.Theme;\nimport com.vaadin.annotations.Title;\nimport com.vaadin.annotations.Widgetset;\nimport com.vaa...
java
chosen
[ { "from": "human", "value": "Add preset GET and POST tests (Not implemented)\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// You may ob...
java
chosen
[ { "from": "human", "value": "Add skeleton for problem 241\n" }, { "from": "gpt", "value": "package leetcode;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\n/**\n * https://leetcode.com/problems/different-ways-to-add-parentheses/\n */\npublic class Problem241 {\n public List<Integer...
java
chosen
[ { "from": "human", "value": "Add Package Info File: most elegant place to specify LFC namespace\n" }, { "from": "gpt", "value": "@XmlSchema(namespace=\"http://xml.opendap.org/ns/WCS/2.0/LocalFileCatalog#\",\n elementFormDefault = XmlNsForm.QUALIFIED)\npackage opendap.wcs.v2_0;\n\nimport ...
java
chosen
[ { "from": "human", "value": "Test case for TResourceFactory find method\n" }, { "from": "gpt", "value": "\npackage scratch;\n\nimport com.bradmcevoy.http.Resource;\nimport com.ettrema.http.caldav.demo.TResourceFactory;\n\n/**\n *\n * @author alex\n */\npublic class TResourceFactoryFindTest {\n ...
java
chosen
[ { "from": "human", "value": "Add new test case for OctetString validation\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...
java
chosen
[ { "from": "human", "value": "Test for person class (without 1 import test case)" }, { "from": "gpt", "value": "package org.swcraft.javase.collections.puzzle;\n\nimport static org.junit.Assert.assertFalse;\nimport static org.junit.Assert.assertTrue;\n\nimport org.junit.Test;\n\npublic class Perso...
java
chosen
[ { "from": "human", "value": "Add tests to validate string formatting for warnings on rate limits" }, { "from": "gpt", "value": "/**\n *\n */\npackage test.api.service.impl.retrofit;\n\nimport static org.junit.Assert.assertTrue;\nimport javastrava.api.v3.service.impl.retrofit.StravaServiceImpl;\n...
java
chosen
[ { "from": "human", "value": "Add java solution for 143. Reorder List\n\n143. Reorder List: https://leetcode.com/problems/reorder-list/" }, { "from": "gpt", "value": "package leetcode.reorder_list;\n\nimport java.util.ArrayList;\n\nimport common.ListNode;\n\npublic class Solution {\n\tpublic void...
java
chosen
[ { "from": "system", "value": "Add comment explaining why there is a shim\n\nSigned-off-by: Jeff Smick <f3e731dfa293c7a83119d8aacfa41b5d2d780be9@twitter.com>\n" }, { "from": "human", "value": "package com.google.common.base;\n\npublic final class Stopwatch{\n\tprivate long start;\n\tprivate long ...
java
chosen
[ { "from": "human", "value": "Add interface for filtering reddit posts.\n" }, { "from": "gpt", "value": "package com.antew.redditinpictures.library.interfaces;\n\nimport java.util.List;\n\npublic interface RedditPostFilter<PostData> {\n public List<PostData> filterPosts(boolean includeNsfwImag...
java
chosen
[ { "from": "human", "value": "Add unit tests for empty element parsing" }, { "from": "gpt", "value": "package org.monospark.spongematchers.parser.element;\n\nimport static org.junit.Assert.assertTrue;\n\nimport org.junit.Test;\nimport org.monospark.spongematchers.parser.SpongeMatcherParseExceptio...
java
chosen
[ { "from": "human", "value": "Add test for hardcoded initializer\n" }, { "from": "gpt", "value": "package ruby.ninja.experiments.zahlenpuzzle.board;\n\nimport org.junit.Test;\nimport rubys.ninja.experiments.zahlenpuzzle.board.BoardSize;\nimport rubys.ninja.experiments.zahlenpuzzle.board.Hardcoded...
java
chosen
[ { "from": "human", "value": "Add parser for NewsIR JSON document collection.\n" }, { "from": "gpt", "value": "package org.lemurproject.galago.contrib.parse;\n\nimport org.lemurproject.galago.core.parse.Document;\nimport org.lemurproject.galago.core.parse.DocumentStreamParser;\nimport org.lemurpr...
java
chosen
[ { "from": "human", "value": "Add class to handle getHostname" }, { "from": "gpt", "value": "/*\n * Copyright (C) 2016 Black Duck Software Inc.\n * http://www.blackducksoftware.com/\n * All rights reserved.\n *\n * This software is the confidential and proprietary information of\n * Black Duck So...
java
chosen
[ { "from": "human", "value": "Add Enum for Birt Parameter Types\n" }, { "from": "gpt", "value": "package de.interseroh.report.server.birt;\n\npublic enum BirtDataType {\n\n SCALAR_PARAMETER(0),\n FILTER_PARAMETER(1),\n LIST_PARAMETER(2),\n TABLE_PARAMETER(3),\n PARAMETER_GROUP(4),\...
java
chosen
[ { "from": "human", "value": "Add jcstress test which reveals issue in SingleWriterHashSet with removal + iterator reads\n" }, { "from": "gpt", "value": "package org.jctools.sets;\n\nimport org.openjdk.jcstress.annotations.Actor;\nimport org.openjdk.jcstress.annotations.JCStressTest;\nimport org....
java
chosen
[ { "from": "human", "value": "Camel-AWS: Create single Karaf feature tests for single components, aws-ses 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 2nd JAXB inheritance test" }, { "from": "gpt", "value": "package org.jboss.loom.test.jaxb;\n\nimport java.io.StringReader;\nimport java.util.List;\nimport javax.xml.bind.JAXBException;\nimport javax.xml.bind.Unmarshaller;\nimport javax.xml.bind.annotation.XmlElem...
java
chosen
[ { "from": "system", "value": "Upgrade to JUnit 4.0: Fixing Vector -> List update consequences.\n" }, { "from": "human", "value": "package com.intellij.rt.execution.junit2;\n\nimport junit.framework.TestResult;\nimport junit.framework.TestCase;\nimport junit.framework.TestSuite;\nimport junit.fra...
java
chosen
[ { "from": "human", "value": "Add interface for named things\n\nMigrated from the imglib2-meta project.\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-Madi...
java
chosen
[ { "from": "human", "value": "Move collections to requests folder\n" }, { "from": "gpt", "value": "// ------------------------------------------------------------------------------\n// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the ...
java
chosen
[ { "from": "human", "value": "Add an annotation to clearly identify incompatible changes to method signatures\n" }, { "from": "gpt", "value": "// Copyright 2013 The Apache Software Foundation\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file ...
java
chosen
[ { "from": "human", "value": "Include test to force EdgeDriver in a non-Windows machine\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 exc...
java
chosen
[ { "from": "human", "value": "Add basic test for ModuleIvyProjectHelper\n\ngit-svn-id: e7bf011906c3b3027f423e4c91c31a2d48cde9a3@1406307 13f79535-47bb-0310-9956-ffa450edef68\n" }, { "from": "gpt", "value": "package org.apache.easyant.core.ant;\n\nimport java.io.File;\nimport java.net.URISyntaxExce...
java
chosen
[ { "from": "human", "value": "Add test case for adding and deleting a list.\n" }, { "from": "gpt", "value": "package com.jakewharton.trakt.services;\n\nimport com.jakewharton.trakt.BaseTestCase;\nimport com.jakewharton.trakt.entities.ListResponse;\nimport com.jakewharton.trakt.entities.Response;\...
java
chosen
[ { "from": "human", "value": "[OPENENGSB-3809] Create a default password class in security api\n" }, { "from": "gpt", "value": "/**\n * Licensed to the Austrian Association for Software Tool Integration (AASTI)\n * under one or more contributor license agreements. See the NOTICE file\n * distribu...
java
chosen
[ { "from": "human", "value": "Add JAR extractor to temporary directory (to do: remove JNA depedencies)" }, { "from": "gpt", "value": "package net.aeten.core.jna;\n\nimport java.io.File;\nimport java.io.FileOutputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.net.UR...
java
chosen
[ { "from": "human", "value": "Add resource not found exception\n" }, { "from": "gpt", "value": "/*\n * Copyright 2015 EuregJUG.\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 copy ...
java
chosen
[ { "from": "human", "value": "Add tests for escaped property access.\n" }, { "from": "gpt", "value": "package org.mule.mvel2.tests.core;\n\nimport org.mule.mvel2.MVEL;\n\npublic class EscapedPropertyAccessTests extends AbstractTest {\n public void testEscapeQuotesNoSpaces() {\n assertEquals(\...
java
chosen
[ { "from": "human", "value": "Add example with generic join tables/fields\n\n" }, { "from": "gpt", "value": "/**\n *\n * Copyright (c) 2006-2019, Speedment, Inc. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); You may not\n * use this file except in ...
java
chosen
[ { "from": "human", "value": "Add JUnit test for Response class in rest modeling module.\n" }, { "from": "gpt", "value": "package org.slc.sli.modeling.rest;\n\nimport static org.junit.Assert.*;\n\nimport java.util.ArrayList;\n\nimport org.junit.Before;\nimport org.junit.Test;\n\n/**\n * JUnit tes...
java
chosen
[ { "from": "human", "value": "Add statement to problem 66\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 code for Twist In The Tale 4.1\n" }, { "from": "gpt", "value": "/**\n * Twist in the Tale 4.1 from the OCA Java SE 7 book by Mala Gupta (Manning Publications)\n * Created by Josef on 1/1/14.\n */\npublic class TwistInTheTale4_1 {\n public static void main(Stri...
java
chosen
[ { "from": "human", "value": "XWIKI-4129: Make threads names created by the application server more meaningful\n\ngit-svn-id: d23d7a6431d93e1bdd218a46658458610974b053@22386 f329d543-caf0-0310-9063-dda96c69346f\n" }, { "from": "gpt", "value": "/*\n * See the NOTICE file distributed with this work ...
java
chosen
[ { "from": "human", "value": "Add experiment to disable mount content pooling in stories footer\n\nReviewed By: pasqualeanatriello\n\nDifferential Revision: D14090419\n\nfbshipit-source-id: 86abb1a47b0ca98c8dd645d601ec6ecc92e5f1e2\n" }, { "from": "gpt", "value": "/*\n * Copyright 2014-present Fac...
java
chosen
[ { "from": "human", "value": "Test class for BerkeleyDB implementation of persistent/cache data stores. See PROTEMPA-64 in JIRA.\n" }, { "from": "gpt", "value": "package org.arp.javautil.datastore;\n\n\nfinal class BdbStoreTest {\n public static void main(String[] args) throws Exception {\n ...
java
chosen
[ { "from": "human", "value": "[XJC] Write test to verify whether sources were created\n" }, { "from": "gpt", "value": "package wtf.java9.xml_generation;\n\nimport org.junit.Test;\n\nimport static org.junit.Assert.assertNotNull;\n\npublic class JaxbPluginTest {\n\n\t@Test\n\tpublic void simpleCase...
java
chosen
[ { "from": "human", "value": "Add java solution for 39. Combination Sum\n\n39. Combination Sum: https://leetcode.com/problems/combination-sum/" }, { "from": "gpt", "value": "package leetcode.combination_sum;\n\nimport java.util.ArrayList;\nimport java.util.Arrays;\n\npublic class Solution {\n\n\t...
java
chosen
[ { "from": "human", "value": "Add unit test for loading from hadoop conf\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 regar...
java
chosen
[ { "from": "human", "value": "Add upload file controller (still need to dispatch create file on server)\n" }, { "from": "gpt", "value": "package org.araymond.joal.web.resources;\n\nimport com.google.common.base.Charsets;\nimport com.sun.org.apache.xml.internal.security.exceptions.Base64DecodingEx...
java
chosen
[ { "from": "human", "value": "Add MarkersPlugin to views that dont have it\n" }, { "from": "gpt", "value": "package flyway.asdi;\n\nimport fi.nls.oskari.domain.map.view.Bundle;\nimport fi.nls.oskari.domain.map.view.View;\nimport fi.nls.oskari.log.LogFactory;\nimport fi.nls.oskari.log.Logger;\nimp...
java
chosen
[ { "from": "human", "value": "Test message encoding to frames.\n" }, { "from": "gpt", "value": "package org.projectodd.stilts.stomp.protocol;\n\nimport static org.junit.Assert.*;\n\nimport java.nio.charset.Charset;\n\nimport org.jboss.netty.handler.codec.embedder.EncoderEmbedder;\nimport org.juni...
java
chosen
[ { "from": "human", "value": "Add a simple CORS filter, so that we can make calls from sencha fiddle" }, { "from": "gpt", "value": "package ch.rasc.extdirectspring.demo;\n\nimport java.io.IOException;\n\nimport javax.servlet.Filter;\nimport javax.servlet.FilterChain;\nimport javax.servlet.FilterC...
java
chosen
[ { "from": "human", "value": "Add CPU observable for voltage, freq, temperature\n" }, { "from": "gpt", "value": "package com.easternedgerobotics.rov.io;\n\nimport com.easternedgerobotics.rov.value.CpuValue;\n\nimport com.pi4j.system.SystemInfo;\nimport rx.Observable;\nimport rx.exceptions.Excepti...
java
chosen
[ { "from": "human", "value": "Add class for demand supply" }, { "from": "gpt", "value": "/**\n * Project Distributed Transactions.\n * Copyright Michał Szczygieł, 2013.\n * Created at Dec 31, 2013.\n */\npackage com.m4gik.business.operations;\n\nimport org.springframework.transaction.annotation.T...
java
chosen
[ { "from": "human", "value": "Add example converting PyFunction to Function\n" }, { "from": "gpt", "value": "\npackage net.restlesscoder.sandbox;\n\nimport java.util.Arrays;\nimport java.util.function.Function;\n\nimport org.python.core.Py;\nimport org.python.core.PyObject;\nimport org.scijava.Co...
java
chosen
[ { "from": "human", "value": "Add utility class to work with packages\n" }, { "from": "gpt", "value": "package org.jetbrains.kotlin.core.utils;\n\nimport java.util.Arrays;\nimport java.util.Collection;\n\nimport org.eclipse.core.resources.IFile;\nimport org.jetbrains.jet.lang.resolve.java.Package...
java
chosen
[ { "from": "human", "value": "Add a wrapper for component that allows specifying an alternate default runbook.\n" }, { "from": "gpt", "value": "package com.timgroup.tucker.info.component;\n\nimport com.timgroup.tucker.info.Component;\nimport com.timgroup.tucker.info.Report;\nimport com.timgroup.t...
java
chosen
[ { "from": "human", "value": "Add tests for Hibernate LengthValidator\n" }, { "from": "gpt", "value": "package fi.vincit.jmobster.processor.defaults.validator.hibernate;\n\n/*\n * Copyright 2012 Juha Siponen\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not...
java
chosen
[ { "from": "human", "value": "Add a basic java query example\n" }, { "from": "gpt", "value": "/**\n * Illustrates loading a json file and finding out if people like pandas\n */\npackage com.oreilly.learningsparkexamples.java;\n\nimport java.io.StringReader;\nimport java.util.ArrayList;\nimport ja...
java
chosen
[ { "from": "human", "value": "Add test with standard analyzer\n" }, { "from": "gpt", "value": "package de.hsmannheim.iws2014.analyzers;\n\nimport org.apache.lucene.analysis.standard.StandardAnalyzer;\nimport org.apache.lucene.index.DirectoryReader;\nimport org.apache.lucene.queryparser.simple.Sim...
java
chosen
[ { "from": "human", "value": "Add a new helper class which will help accessing data from the scan results.\n" }, { "from": "gpt", "value": "package com.reelyactive.blesdk.support.ble;\n\n/**\n * Created by saiimons on 15-03-30.\n */\npublic class ScanResultParser {\n public static String getSy...
java
chosen
[ { "from": "human", "value": "Add missing interface from reorganisation" }, { "from": "gpt", "value": "package org.eclipse.dawnsci.nexus;\n\npublic interface INexusFileFactory {\n\n\tpublic NexusFile createNexusFile(String path);\n\n\tpublic NexusFile createNexusFile(String path, boolean enableSW...
java
chosen
[ { "from": "human", "value": "Add support for plugin root level command\n\nCompletely generic plugins can be now created:\n\n @RequiresCapability(\n value = GlobalCapability.ADMINISTRATE_SERVER,\n scope = CapabilityScope.CORE)\n public class ShellCommand extends SshCommand {\n @Override\n p...
java
chosen
[ { "from": "human", "value": "Add a converter implementation which respects the DoNotConvert annotation.\n" }, { "from": "gpt", "value": "/*\n * Copyright 2015 Hewlett-Packard Development Company, L.P.\n * Licensed under the MIT License (the \"License\"); you may not use this file except in compl...
java
chosen
[ { "from": "human", "value": "PUREWIDGET-16: Add support for the GWT client 2.0 and adjust naming as such.\n" }, { "from": "gpt", "value": "/*\n * This is part of Geomajas, a GIS framework, http://www.geomajas.org/.\n *\n * Copyright 2008-2013 Geosparc nv, http://www.geosparc.com/, Belgium.\n *\n...
java
chosen
[ { "from": "human", "value": "Add header builder class to build 2 rows headers" }, { "from": "gpt", "value": "package com.codenvy.ide.ext.datasource.client.sqllauncher;\n\nimport java.util.List;\n\nimport com.google.gwt.dom.builder.shared.TableCellBuilder;\nimport com.google.gwt.dom.builder.share...
java
chosen
[ { "from": "human", "value": "Add a new event for to signal when data has been updated\n" }, { "from": "gpt", "value": "package org.wwarn.surveyor.client.event;\n\n/*\n * #%L\n * SurveyorCore\n * %%\n * Copyright (C) 2013 - 2014 University of Oxford\n * %%\n * Redistribution and use in source and...
java
chosen
[ { "from": "human", "value": "Revert \"Revert \"Revert \"Revert \"9:30\"\"\"\"\n\nThis reverts commit ac6882146495f40fec1779f32f814f988b62a32d.\n" }, { "from": "gpt", "value": "package com.mengyunzhi.service;\n\nimport com.mengyunzhi.repository.Klass;\nimport com.mengyunzhi.repository.Teacher;\ni...
java
chosen
[ { "from": "human", "value": "Add some tests to problem 44\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": "Create not null constraint annotation.\n" }, { "from": "gpt", "value": "package com.github.aureliano.damihilogs.annotation;\n\nimport java.lang.annotation.ElementType;\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\nimport java....
java
chosen
[ { "from": "human", "value": "Add an example that shows a working trampoline\n\nSigned-off-by: Ricky Elrod <3de8762d49a778edd8b1aa9f381ea5a9ccb62944@elrod.me>\n" }, { "from": "gpt", "value": "import me.elrod.pureio.*;\n\nimport java.math.BigInteger;\n\n/**\n * A simple example to show that our Tr...
java
chosen
[ { "from": "human", "value": "Add web filter for protecting resources\n" }, { "from": "gpt", "value": "package slbedu.library.filters;\r\n\r\nimport java.io.IOException;\r\n\r\nimport javax.inject.Inject;\r\nimport javax.servlet.Filter;\r\nimport javax.servlet.FilterChain;\r\nimport javax.servlet...
java
chosen
[ { "from": "human", "value": "Add CommunicationManager for the client\n" }, { "from": "gpt", "value": "/**\n * \n */\npackage com.example.crystalgame.communication;\n\nimport java.io.IOException;\nimport java.io.ObjectInputStream;\nimport java.io.ObjectOutputStream;\nimport java.net.Socket;\nimpo...
java
chosen
[ { "from": "human", "value": "[ADD] Add generic class to serialize object\n" }, { "from": "gpt", "value": "/**\n * Copyright 2016 Alessandro Daniele, Fabio Cesarato, Andrea Giraldin\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in ...
java
chosen
[ { "from": "human", "value": "Add JUnit test runner with support for mixins\n\nGitOrigin-RevId: fc62d0ad52c8b0cb9d8676551681b408c568bbb3" }, { "from": "gpt", "value": "// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LI...
java
chosen
[ { "from": "human", "value": "Add profile item remover. PL-11187.\n" }, { "from": "gpt", "value": "package com.amee.platform.resource.profileitem.v_3_6;\n\nimport com.amee.base.domain.Since;\nimport com.amee.base.resource.RequestWrapper;\nimport com.amee.base.resource.ResponseHelper;\nimport com....
java
chosen
[ { "from": "human", "value": "Add session listener to log creation and deletion\n" }, { "from": "gpt", "value": "package org.xcolab.view.config.spring.logging;\n\nimport org.apache.commons.lang3.StringUtils;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\nimport org.springframework.st...
java
chosen
[ { "from": "human", "value": "Test returning null for classes which cannot be instantiated\n" }, { "from": "gpt", "value": "package uk.co.jemos.podam.test.unit;\n\nimport org.junit.Assert;\nimport org.junit.Test;\nimport uk.co.jemos.podam.api.PodamFactory;\nimport uk.co.jemos.podam.api.PodamFacto...
java
chosen
[ { "from": "human", "value": "Create a skeleton for problem 74\n" }, { "from": "gpt", "value": "package leetcode;\n\n/**\n * https://leetcode.com/problems/search-a-2d-matrix/\n */\npublic class Problem74 {\n public boolean searchMatrix(int[][] matrix, int target) {\n return false;\n ...
java
chosen
[ { "from": "human", "value": "Create : 442 Find All Duplicates in an Array\n" }, { "from": "gpt", "value": "import java.util.ArrayList;\nimport java.util.List;\n\npublic class Solution {\n\n public List<Integer> findDuplicates(int[] nums) {\n\n List<Integer> duplicatesList = new ArrayLi...
java
chosen
[ { "from": "human", "value": "Check for the presence of the | character in dna/protein (align) features\n" }, { "from": "gpt", "value": "/*\n * Copyright (C) 2004 EBI, GRL\n * \n * This library is free software; you can redistribute it and/or modify it under the terms of the\n * GNU Lesser Genera...
java
chosen
[ { "from": "human", "value": "Create close all tabs command.\n" }, { "from": "gpt", "value": "package com.github.aureliano.edocs.app.cmd;\n\nimport com.github.aureliano.edocs.app.EdocsApp;\n\npublic class CloseAllTabsCommand implements ICommand {\n\n\t@Override\n\tpublic void execute() {\n\t\tif ...
java
chosen
[ { "from": "human", "value": "Add example of unique keys\n" }, { "from": "gpt", "value": "/**\n * Copyright (c) 2008-2012, http://www.snakeyaml.org\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": "Print the elements of a linked list" }, { "from": "gpt", "value": "package data_structures.linked_lists;\r\n\r\n/*\r\n Print elements of a linked list on console \r\n head pointer input could be NULL as well for empty list\r\n Node is defined as \r\n class Node {...
java
chosen
[ { "from": "human", "value": "Move language handling from search-optimiser to haven-search-components, rewriting on prem implementation to use idol-types module\n" }, { "from": "gpt", "value": "/*\n * Copyright 2015 Hewlett-Packard Development Company, L.P.\n * Licensed under the MIT License (the...
java
chosen
[ { "from": "human", "value": "Test AEM I18n object with resource bundle support from sling-mock.\n" }, { "from": "gpt", "value": "/*\n * #%L\n * wcm.io\n * %%\n * Copyright (C) 2020 wcm.io\n * %%\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file e...
java
chosen
[ { "from": "human", "value": "Add interface for detecting whether two values are equal.\n\nWill be used when comparing computedValues\n" }, { "from": "gpt", "value": "package org.realityforge.arez;\n\nimport javax.annotation.Nullable;\n\n/**\n * Functional interface for detecting if two values ar...
java
chosen
[ { "from": "human", "value": "Update unit testing for class DeterLabAutoConfiguration in adapter-deterlab(SIO)\n" }, { "from": "gpt", "value": "package sg.ncl.adapter.deterlab;\n\nimport org.junit.Before;\nimport org.junit.Test;\nimport org.springframework.web.client.RestTemplate;\nimport static ...
java
chosen
[ { "from": "human", "value": "[ONOS-3230] Add the junit test code of SegmentationId\n\nChange-Id: I3452d782b4e4527f2f0fa23028f60b80a39aaffe\n" }, { "from": "gpt", "value": "/*\n * Copyright 2015 Open Networking Laboratory\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n...
java
chosen
[ { "from": "human", "value": "SPARK-1208: Change the default file transfer save path\n\ngit-svn-id: f13e20fb8540f76a08799c0051229138c0279aa7@12054 b35dd754-fafc-0310-a699-88a17e54d16e\n" }, { "from": "gpt", "value": "/**\n * $RCSfile: ,v $\n * $Revision: $\n * $Date: $\n * \n * Copyright (C) 2004...
java
chosen
[ { "from": "human", "value": "Implement integration test to specific feature to groups\n" }, { "from": "gpt", "value": "package com.jmb.springfactory.integration;\n\nimport static org.junit.Assert.assertNotNull;\n\nimport javax.validation.ValidationException;\n\nimport org.junit.Test;\nimport org...
java
chosen
[ { "from": "human", "value": "Add missed psi util class\n" }, { "from": "gpt", "value": "package com.aopphp.go.psi.impl;\n\nimport com.aopphp.go.psi.NamespaceName;\n\npublic class PointcutQueryUtil {\n\n /**\n * Returns an absolute FQN for namespace name node\n *\n * @param namespa...
java
chosen
[ { "from": "human", "value": "Add test for encrypted payloads.\n" }, { "from": "gpt", "value": "/*\n * Copyright (c) 2017, Apptentive, Inc. All Rights Reserved.\n * Please refer to the LICENSE file for the terms and conditions\n * under which redistribution and use of this file is permitted.\n */...
java
chosen
[ { "from": "human", "value": "Add Google Fit speed mapper\n" }, { "from": "gpt", "value": "/*\n * Copyright 2017 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 may obtain a copy of...
java
chosen