conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "human",
"value": "Add basic test for OperationSequence\n"
},
{
"from": "gpt",
"value": "package otld.otld.intermediate;\n\nimport org.junit.Test;\nimport otld.otld.intermediate.exceptions.TypeMismatch;\n\nimport static org.junit.Assert.*;\n\npublic class OperationSequenceTest {\n F... | java | chosen |
[
{
"from": "human",
"value": "Add push handler that can push resources for specific URL's\n"
},
{
"from": "gpt",
"value": "/*\n * JBoss, Home of Professional Open Source.\n * Copyright 2014 Red Hat, Inc., and individual contributors\n * as indicated by the @author tags.\n *\n * Licensed under the... | java | chosen |
[
{
"from": "human",
"value": "Add snippets: download file by Java\n"
},
{
"from": "gpt",
"value": "package net;\n\nimport java.net.URL;\nimport java.io.IOException;\nimport java.io.File;\nimport java.io.DataInputStream;\nimport java.io.FileOutputStream;\nimport java.io.ByteArrayOutputStream;\n\np... | java | chosen |
[
{
"from": "human",
"value": "Add a package annotation to network.\n"
},
{
"from": "gpt",
"value": "/**\n * The {@code network} package contains classes implementing self-organizing\n * maps. These classes all implement\n * {@link cs437.som.TrainableSelfOrganizingMap} in {@link cs437.som}, eithe... | java | chosen |
[
{
"from": "human",
"value": "Add new controller to differentiate API v1 and v2\n"
},
{
"from": "gpt",
"value": "/*\n * *\n * ProActive Parallel Suite(TM): The Java(TM) library for\n * Parallel, Distributed, Multi-Core Computing for\n * Enterprise Grids & Clouds\n *\n * Copyright (C) 1997-... | java | chosen |
[
{
"from": "human",
"value": "[TACHYON-1559] Add unit test for tachyon.client.ClientUtils.getRandomNonNegativeLong()\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 wit... | java | chosen |
[
{
"from": "human",
"value": "Update the object stream test\n\ngit-svn-id: 4741f78aa2d3279ddd0a34c053c42ca3ce19451b@1158 124fc276-1b20-0410-8d16-dc08e6bff5e9\n"
},
{
"from": "gpt",
"value": "package org.simpleframework.xml.core;\n\nimport java.io.ByteArrayInputStream;\nimport java.io.ByteArrayOut... | java | chosen |
[
{
"from": "human",
"value": "Add test for the changed behavior\n"
},
{
"from": "gpt",
"value": "package de.retest.recheck.review;\n\nimport static de.retest.recheck.review.counter.NopCounter.getInstance;\nimport static org.assertj.core.api.Assertions.assertThat;\n\nimport org.junit.jupiter.api.T... | java | chosen |
[
{
"from": "human",
"value": "Add sample to test basic creation, writing, and reading text files"
},
{
"from": "gpt",
"value": "package edu.java.cosc111.samples;\n\nimport java.io.IOException;\nimport java.nio.file.Files;\nimport java.nio.file.OpenOption;\nimport java.nio.file.Path;\nimport java.... | java | chosen |
[
{
"from": "human",
"value": "Solve No.1065 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 handler for serving static files\n"
},
{
"from": "gpt",
"value": "/*\n * JBoss, Home of Professional Open Source.\n * Copyright 2012 Red Hat, Inc., and individual contributors\n * as indicated by the @author tags.\n *\n * Licensed under the Apache License, Versio... | java | chosen |
[
{
"from": "human",
"value": "Add vertex class for bfs\n"
},
{
"from": "gpt",
"value": "package bfs;\n\n/*\n\tThis class defines a vertex for Breadth First Search algorithm.\n*/\n\nclass Vertex{\n\n\tprivate int name = -1;\t\t\t\t\t// vertex name\n\tprivate int parent = -1;\t\t\t\t// parent verte... | java | chosen |
[
{
"from": "human",
"value": "Include \"template\" build date, so we can check it's being updated.\n"
},
{
"from": "gpt",
"value": "/*\r\n * Debrief - the Open Source Maritime Analysis Application\r\n * http://debrief.info\r\n *\r\n * (C) 2000-2016, Deep Blue C Technology Ltd\r\n *\r\n *... | java | chosen |
[
{
"from": "human",
"value": "Add some example using filter\n"
},
{
"from": "gpt",
"value": "package bzh.ys.javabyexample.pattern.filter;\n\nimport java.text.ParseException;\nimport java.text.SimpleDateFormat;\nimport java.util.*;\nimport java.util.function.Function;\nimport java.util.stream.Coll... | java | chosen |
[
{
"from": "human",
"value": "Add file missed in r1098736.\n\n* subversion/bindings/javahl/src/org/apache/subversion/javahl/types/Checksum.java: New.\n\n\ngit-svn-id: f8a4e5e023278da1e04e203c7fe051e3c4285d88@1098745 13f79535-47bb-0310-9956-ffa450edef68\n"
},
{
"from": "gpt",
"value": "/**\n * @co... | java | chosen |
[
{
"from": "human",
"value": "Add execute to csv button on UI and mock servlet\n"
},
{
"from": "gpt",
"value": "package com.github.terma.gigaspacesqlconsole;\n\nimport com.github.terma.gigaspacesqlconsole.core.ExecuteRequest;\nimport com.google.gson.Gson;\n\nimport javax.servlet.ServletException;... | java | chosen |
[
{
"from": "human",
"value": "Add test for sort batch stage\n"
},
{
"from": "gpt",
"value": "/*\n * Copyright (c) 2008-2020, Hazelcast, Inc. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the L... | java | chosen |
[
{
"from": "human",
"value": "Create unit test for MemcachedCacheManager\n"
},
{
"from": "gpt",
"value": "package info.noconfuse.modules.cache.support;\n\nimport info.noconfuse.modules.cache.MemcachedCache;\nimport net.rubyeye.xmemcached.MemcachedClient;\nimport net.rubyeye.xmemcached.MemcachedCl... | java | chosen |
[
{
"from": "human",
"value": "Add test case for inner class with generic issue\n"
},
{
"from": "gpt",
"value": "package com.evernote.android.state.test;\n\nimport com.evernote.android.state.State;\n\npublic class TestInnerClassGeneric<P> {\n\n public class Inner {\n @State int field;\n ... | java | chosen |
[
{
"from": "human",
"value": "Add unit tests for VideoDetailsPresenter\n"
},
{
"from": "gpt",
"value": "/*\n * Copyright 2016 Martin Kamp Jensen\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": "Add test fat fs creator\n\n"
},
{
"from": "gpt",
"value": "package com.github.magnusja.libaums.javafs;\n\nimport android.util.Log;\n\nimport com.github.magnusja.libaums.javafs.wrapper.DeviceWrapper;\nimport com.github.magnusja.libaums.javafs.wrapper.FSBlockDeviceWrap... | java | chosen |
[
{
"from": "human",
"value": "Add test for subsetting a coverage axis\n"
},
{
"from": "gpt",
"value": "package ucar.nc2.ft2.coverage;\n\nimport static com.google.common.truth.Truth.assertThat;\n\nimport java.util.Arrays;\nimport java.util.List;\nimport org.junit.Test;\nimport org.junit.runner.Run... | java | chosen |
[
{
"from": "human",
"value": "Add missing tests for functions."
},
{
"from": "gpt",
"value": "package org.petitparser.utils;\n\nimport org.junit.Test;\n\nimport java.util.List;\n\nimport static java.util.Arrays.asList;\nimport static org.junit.Assert.assertEquals;\nimport static org.petitparser.u... | java | chosen |
[
{
"from": "human",
"value": "Add test for deployment entity\n"
},
{
"from": "gpt",
"value": "/*\n * Copyright (c) 2015 Ushahidi Inc\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": "Add script to calculate the highest level for each variant of all genes\n"
},
{
"from": "gpt",
"value": "/*\n * To change this template, choose Tools | Templates\n * and open the template in the editor.\n */\npackage org.mskcc.cbio.oncokb.importer;\n\nimport org.mskc... | java | chosen |
[
{
"from": "human",
"value": "Add Matcher Model for Regexes\n"
},
{
"from": "gpt",
"value": "package co.uk.jiveelection.campaign.utils;\n\nimport com.google.auto.value.AutoValue;\n\n/**\n * Describes information about a regex match to be accessed outside a matcher loop.\n */\n@AutoValue\npublic a... | java | chosen |
[
{
"from": "human",
"value": "Solve No.11719 from Baekjoon Online Judge\n"
},
{
"from": "gpt",
"value": "/*\n * Copyright 2017 haeun kim\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtai... | java | chosen |
[
{
"from": "human",
"value": "Include Calcultor steps in Cucumber project\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 complia... | java | chosen |
[
{
"from": "human",
"value": "Check if there are gene Gain/Loss trees coming from both protein and ncRNA trees\n"
},
{
"from": "gpt",
"value": "/*\n * Copyright (C) 2012 EBI, GRL\n * \n * This library is free software; you can redistribute it and/or modify it under the\n * terms of the GNU Lesser... | java | chosen |
[
{
"from": "human",
"value": "Add primitive to compare patterns.\n"
},
{
"from": "gpt",
"value": "package mb.statix.spoofax;\n\nimport static mb.nabl2.terms.build.TermBuild.B;\nimport static mb.nabl2.terms.matching.TermMatch.M;\n\nimport java.util.List;\nimport java.util.Optional;\n\nimport org.s... | java | chosen |
[
{
"from": "human",
"value": "Add test for enum mocking using inline mock maker.\n"
},
{
"from": "gpt",
"value": "/*\n * Copyright (c) 2021 Mockito contributors\n * This program is made available under the terms of the MIT License.\n */\npackage org.mockitoinline;\n\nimport org.junit.Test;\nimpor... | java | chosen |
[
{
"from": "human",
"value": "Rename Class, hinted by check style\n"
},
{
"from": "gpt",
"value": "/*\n * eXist Open Source Native XML Database\n * Copyright (C) 2012 The eXist Project\n * http://exist-db.org\n *\n * This program is free software; you can redistribute it and/or\n * modify it... | java | chosen |
[
{
"from": "human",
"value": "Create example project application class\n"
},
{
"from": "gpt",
"value": "package br.com.bloder.better_migrations;\n\nimport android.app.Application;\n\nimport com.facebook.stetho.Stetho;\nimport com.uphyca.stetho_realm.RealmInspectorModulesProvider;\n\n/**\n * Creat... | java | chosen |
[
{
"from": "human",
"value": "Elasticsearch: Add tests for project queries against version 6\n\nBug: Issue 9112\nChange-Id: I83b25ac02b932babe5b51185af0d7a7057bc2fac\n"
},
{
"from": "gpt",
"value": "// Copyright (C) 2018 The Android Open Source Project\n//\n// Licensed under the Apache License, V... | java | chosen |
[
{
"from": "human",
"value": "Add the class that allows to work with image as array."
},
{
"from": "gpt",
"value": "package net.starwix;\n\nimport java.awt.AWTException;\nimport java.awt.Graphics;\nimport java.awt.image.BufferedImage;\nimport java.awt.image.DataBuffer;\n\n/**\n * @author starwix\... | java | chosen |
[
{
"from": "human",
"value": "Add Leetcode 2 java code\n"
},
{
"from": "gpt",
"value": "package com.smartx;\n\n/**\n * <b><code>Leetcode2</code></b>\n * <p>\n * \n * </p>\n * @author kext\n */\npublic class Leetcode2 {\n\n\tpublic static ListNode addTwoNumbers(ListNode l1, ListNode l2) {\n\t\t// ... | java | chosen |
[
{
"from": "system",
"value": "Remove minor unwanted code change\n"
},
{
"from": "human",
"value": "package org.skyscreamer.jsonassert.comparator;\n\nimport org.json.JSONException;\nimport org.skyscreamer.jsonassert.Customization;\nimport org.skyscreamer.jsonassert.JSONCompareMode;\nimport org.sk... | java | chosen |
[
{
"from": "human",
"value": "Add Flipper debug cache key factory\n\nReviewed By: oprisnik\n\nDifferential Revision: D14598273\n\nfbshipit-source-id: a34c6e0df9b725d9b4887124fb7542eb56e9cec8\n"
},
{
"from": "gpt",
"value": "/*\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This sour... | java | chosen |
[
{
"from": "human",
"value": "Add some tests for new template loader class\n"
},
{
"from": "gpt",
"value": "package com.github.onsdigital.perkin.helper;\n\nimport com.github.onsdigital.perkin.json.Survey;\nimport com.github.onsdigital.perkin.json.SurveyParser;\nimport com.github.onsdigital.perkin... | java | chosen |
[
{
"from": "human",
"value": "Add test class for GameStateFormatException."
},
{
"from": "gpt",
"value": "package com.skraylabs.poker.model;\n\nimport static com.skraylabs.poker.model.PokerFormatExceptionTest.assertMessageAndInvalidString;\n\nimport org.junit.Test;\n\npublic class GameStateFormat... | java | chosen |
[
{
"from": "human",
"value": "Add test cases for Name\n"
},
{
"from": "gpt",
"value": "package seedu.address.model.task;\n\nimport static org.junit.Assert.assertFalse;\nimport static org.junit.Assert.assertTrue;\n\nimport org.junit.Test;\n\npublic class NameTest {\n\n @Test\n public void is... | java | chosen |
[
{
"from": "human",
"value": "Add JUnit test for BackupCommand\n"
},
{
"from": "gpt",
"value": "//@@author A0147944U\npackage guitests;\n\nimport org.junit.Test;\n\nimport seedu.task.commons.core.Messages;\nimport seedu.task.logic.commands.BackupCommand;\nimport seedu.task.testutil.TypicalTestTas... | java | chosen |
[
{
"from": "human",
"value": "Add new package and class for local chat example\n\nThis local chat will be able to work with multiple connections in one. I\nplay to later on put it in another maven-module to this project and add\nawesome stuff like authorization, message history saving, maybe even GUI\n"
},... | java | chosen |
[
{
"from": "human",
"value": "[TACHYON-648] Add unit test of EvictorFactory\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 re... | java | chosen |
[
{
"from": "human",
"value": "Add test for java bucket sort\n"
},
{
"from": "gpt",
"value": "public class BucketSortTest {\n\n\tpublic static void main(String[] args) {\n\t\tint items[] = { 65, 2, 5, 1, -3, 12, 34, 0, 13 };\n\t\tBucketSort.sort(items);\n\t\tfor (int i = 0; i < items.length - 1; i... | java | chosen |
[
{
"from": "human",
"value": "Add a unit test for parsing logical conjunctions"
},
{
"from": "gpt",
"value": "package org.monospark.spongematchers.parser.type;\n\nimport static org.hamcrest.CoreMatchers.not;\nimport static org.junit.Assert.assertThat;\nimport static org.monospark.spongematchers.t... | java | chosen |
[
{
"from": "human",
"value": "Add JUnit test for Resources 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 te... | java | chosen |
[
{
"from": "human",
"value": "Add the missing mac aarch64 code."
},
{
"from": "gpt",
"value": "/*\n * Copyright (C) 2020-2022 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 ... | java | chosen |
[
{
"from": "human",
"value": "Add one more easy level linked list problem.\n"
},
{
"from": "gpt",
"value": "public class RemoveDuplicatesFromSortedList {\n /**\n * @param ListNode head is the head of the linked list\n * @return: ListNode head of linked list\n */\n public static ... | java | chosen |
[
{
"from": "human",
"value": "Add factory for request sender builders.\n"
},
{
"from": "gpt",
"value": "/*******************************************************************************\n * Copyright (C) 2017 Push Technology Ltd.\n *\n * Licensed under the Apache License, Version 2.0 (the \"Licens... | java | chosen |
[
{
"from": "human",
"value": "Add tests-sample for the ColumnType.\n"
},
{
"from": "gpt",
"value": "/*\n * Copyright 2017, TeamDev Ltd. All rights reserved.\n *\n * Redistribution and use in source and/or binary forms, with or without\n * modification, must retain the above copyright notice and t... | java | chosen |
[
{
"from": "human",
"value": "Add test for attribute ambiguity\n\ngit-svn-id: 4741f78aa2d3279ddd0a34c053c42ca3ce19451b@1976 124fc276-1b20-0410-8d16-dc08e6bff5e9\n"
},
{
"from": "gpt",
"value": "package org.simpleframework.xml.core;\r\n\r\nimport java.io.StringWriter;\r\n\r\nimport junit.framework... | java | chosen |
[
{
"from": "human",
"value": "Add WebViewClient to wrap URL matching.\n"
},
{
"from": "gpt",
"value": "/* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-\n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL ... | java | chosen |
[
{
"from": "human",
"value": "Add small utility for simplifying graph invocation in grpc services.\n"
},
{
"from": "gpt",
"value": "/*\n * MIT License\n *\n * Copyright (c) 2017 Choko (choko@curioswitch.org)\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * ... | java | chosen |
[
{
"from": "human",
"value": "Add event to notify plugins about finish application initialization"
},
{
"from": "gpt",
"value": "package org.xdi.service.cdi.event;\n\nimport javax.enterprise.util.AnnotationLiteral;\nimport javax.inject.Qualifier;\nimport java.lang.annotation.Documented;\nimport j... | java | chosen |
[
{
"from": "human",
"value": "Add a unit test for PatientChartController.\n"
},
{
"from": "gpt",
"value": "package org.msf.records.ui.chart;\n\nimport android.test.AndroidTestCase;\n\nimport org.mockito.Mock;\nimport org.mockito.MockitoAnnotations;\nimport org.msf.records.data.app.AppModel;\nimpo... | java | chosen |
[
{
"from": "human",
"value": "Add async (i.e. non-synchronized) http read"
},
{
"from": "gpt",
"value": "/*\n * Copyright 2016 peter.\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": "Create main file and Add checks for arguments\n"
},
{
"from": "gpt",
"value": "package com.marcusman.packageify;\n\nimport java.io.File;\n\n/**\n* Packageify puts files that were originally all in the same folder\n* in organized packages based on input information.\n... | java | chosen |
[
{
"from": "human",
"value": "Add some simple tests for the SciJava gateway\n\nThese tests fail before the previous commit's improvements.\n"
},
{
"from": "gpt",
"value": "/*\n * #%L\n * SciJava Common shared library for SciJava software.\n * %%\n * Copyright (C) 2009 - 2017 Board of Regents of t... | java | chosen |
[
{
"from": "human",
"value": "Change the Viewer Birt resources to handle multiple resource locales.\n"
},
{
"from": "gpt",
"value": "\npackage org.eclipse.birt.report.resource;\n\nimport java.util.Locale;\n\nimport org.eclipse.birt.core.i18n.ResourceHandle;\n\npublic class ViewerResourceHandle ex... | java | chosen |
[
{
"from": "human",
"value": "Add command to add a message to a phabricator revision\n"
},
{
"from": "gpt",
"value": "package com.box.l10n.mojito.cli.command;\n\n\nimport com.beust.jcommander.Parameter;\nimport com.beust.jcommander.Parameters;\nimport com.box.l10n.mojito.cli.console.ConsoleWriter... | java | chosen |
[
{
"from": "human",
"value": "Migrate FbReactTTRCStepRenderFlagManager to JS codegen\n\nSummary: This diff migrates `FbReactTTRCStepRenderFlagManager` to use the generated `TTRCStepRenderFlagManagerDelegate` for setting its properties. A bit more work was required to migrate this view manager since it doesn'... | java | chosen |
[
{
"from": "human",
"value": "Add FlowPanel without key event propagation\n\nChange-Id: Idfdda3fca94619df6293c5be33cfbefd681a607a\n"
},
{
"from": "gpt",
"value": "// Copyright (C) 2013 The Android Open Source Project\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// yo... | java | chosen |
[
{
"from": "human",
"value": "Update build infrastructure. Add binary font rest resource\n"
},
{
"from": "gpt",
"value": "package ch.squix.esp8266.fontconverter.rest.font;\n\nimport java.awt.Font;\nimport java.awt.FontFormatException;\nimport java.awt.GraphicsEnvironment;\nimport java.io.IOExcept... | java | chosen |
[
{
"from": "human",
"value": "Add java solution for 27. Remove Element\n\n27. Remove Element: https://leetcode.com/problems/remove-element/"
},
{
"from": "gpt",
"value": "package leetcode.remove_element;\n\npublic class Solution {\n public int removeElement(int[] A, int elem) {\n \tif(A == ... | java | chosen |
[
{
"from": "human",
"value": "[ALLUXIO-2806] Add unit tests for block policy CreateOptions.\n"
},
{
"from": "gpt",
"value": "/*\n * The Alluxio Open Foundation licenses this work under the Apache License, version 2.0\n * (the \"License\"). You may not use this work except in compliance with the L... | java | chosen |
[
{
"from": "human",
"value": "Add a RuntimeException subclass that contains the context of the error\n"
},
{
"from": "gpt",
"value": "package no.ssb.vtl.script.error;\n\n/*\n * ========================LICENSE_START=================================\n * Java VTL\n * %%\n * Copyright (C) 2016 - 2017... | java | chosen |
[
{
"from": "human",
"value": "Add simple calculator for HTML Form examples."
},
{
"from": "gpt",
"value": "package de.asw.web2.demo;\n\nimport static java.util.Arrays.asList;\n\nimport java.math.BigDecimal;\nimport java.util.List;\n\nimport org.springframework.http.ResponseEntity;\nimport org.spr... | java | chosen |
[
{
"from": "human",
"value": "Add byte buffer and byte channel example to NIO\n"
},
{
"from": "gpt",
"value": "package learntocode.javaapi.io_and_nio.nio;\r\n\r\nimport java.io.IOException;\r\nimport java.nio.ByteBuffer;\r\nimport java.nio.channels.SeekableByteChannel;\r\nimport java.nio.file.Fil... | java | chosen |
[
{
"from": "human",
"value": "Add JUnit test for WadlWalker class.\n"
},
{
"from": "gpt",
"value": "/*\n * Copyright 2012 Shared Learning Collaborative, LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the Licens... | java | chosen |
[
{
"from": "human",
"value": "Add new saver interface for use by lazy writeable dataset"
},
{
"from": "gpt",
"value": "/*-\n * Copyright 2015 Diamond Light Source Ltd.\n *\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Pu... | java | chosen |
[
{
"from": "human",
"value": "Camel-AWS: Create single Karaf feature tests for single components, aws-ddb 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": "Test case for Null Pointer Dereference\n\n\ngit-svn-id: e7d6bde23f017c9ff4efd468d79d66def666766b@1081 eae3c2d3-9b19-0410-a86e-396b6ccb6ab3\n"
},
{
"from": "gpt",
"value": "import java.util.*;\n\nclass NP {\n\n int x;\n static Map m = new HashMap();\n public static... | java | chosen |
[
{
"from": "human",
"value": "Add java solution for 207. Course Schedule\n\n207. Course Schedule: https://leetcode.com/problems/course-schedule/"
},
{
"from": "gpt",
"value": "package leetcode.course_schedule;\n\nimport java.util.HashMap;\nimport java.util.HashSet;\nimport java.util.LinkedList;\n... | java | chosen |
[
{
"from": "human",
"value": "Create a skeleton for problem 312\n"
},
{
"from": "gpt",
"value": "package leetcode;\n\n/**\n * https://leetcode.com/problems/burst-balloons/\n */\npublic class Problem312 {\n public int maxCoins(int[] nums) {\n // TODO\n return 0;\n }\n\n publ... | java | chosen |
[
{
"from": "human",
"value": "Solve No.2557 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": "Create a skeleton for problem 116\n"
},
{
"from": "gpt",
"value": "package leetcode;\n\n/**\n * https://leetcode.com/problems/populating-next-right-pointers-in-each-node/\n */\npublic class Problem116 {\n public static class TreeLinkNode {\n int val;\n ... | java | chosen |
[
{
"from": "human",
"value": "Create a skeleton for problem 324\n"
},
{
"from": "gpt",
"value": "package leetcode;\n\nimport java.util.Arrays;\n\n/**\n * https://leetcode.com/problems/wiggle-sort-ii/\n */\npublic class Problem324 {\n public void wiggleSort(int[] nums) {\n // TODO:\n ... | java | chosen |
[
{
"from": "human",
"value": "Add model for Deployment Group\n"
},
{
"from": "gpt",
"value": "/**\n * Copyright 2016, RadiantBlue Technologies, 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 * ... | java | chosen |
[
{
"from": "human",
"value": "Create : 112 Path Sum\n"
},
{
"from": "gpt",
"value": "/**\n * Definition for a binary tree node.\n * public class TreeNode {\n * int val;\n * TreeNode left;\n * TreeNode right;\n * TreeNode(int x) { val = x; }\n * }\n */\n\npublic class Solution {\n\... | java | chosen |
[
{
"from": "system",
"value": "Undo change to IOE full message to use ErrorCode name not formatted code number. Due to Adatper tests expecting message text not to change."
},
{
"from": "human",
"value": "/**\n * Copyright (C) 2011 Akiban Technologies Inc.\n * This program is free software: you ca... | java | chosen |
[
{
"from": "human",
"value": "Test the Dialog Result view."
},
{
"from": "gpt",
"value": "/*******************************************************************************\n * Copyright (c) 2012 - 2015 Signal Iduna Corporation and others.\n * All rights reserved. This program and the accompanying ... | java | chosen |
[
{
"from": "human",
"value": "Refactor import/export plug-ins:\n- externalize strings\n- add internal package for messages and activator\n"
},
{
"from": "gpt",
"value": "/***********************************************************************************************************************\n * Co... | java | chosen |
[
{
"from": "human",
"value": "SENTRY-653: Add simple Indexer model object test for sentry-core-model-indexer\n"
},
{
"from": "gpt",
"value": "package org.apache.sentry.core.indexer;\n/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See... | java | chosen |
[
{
"from": "human",
"value": "Add missing test for 65f2d88\n\nSigned-off-by: Fred Bricon <3278c038c93c729ae96f0d035919e3fb69e9cff7@gmail.com>\n"
},
{
"from": "gpt",
"value": "/*******************************************************************************\n * Copyright (c) 2016 Red Hat Inc. and o... | java | chosen |
[
{
"from": "human",
"value": "Send 406 codes when appropriate\n"
},
{
"from": "gpt",
"value": "package org.intermine.webservice.server.exceptions;\n\nimport org.intermine.webservice.server.output.Output;\n\npublic class UnauthorizedException extends ServiceException {\n\n private static final ... | java | chosen |
[
{
"from": "human",
"value": "Split the old reflector into two parts: the adapter factory and the specification loader.\n\ngit-svn-id: 3f09329b2f6451ddff3637e937fd5de689f72c1f@1008103 13f79535-47bb-0310-9956-ffa450edef68\n"
},
{
"from": "gpt",
"value": "package org.nakedobjects.reflector.java.ref... | java | chosen |
[
{
"from": "human",
"value": "Add a new type of exception for web projects that Spring MVC handles and renders the appropriate error code."
},
{
"from": "gpt",
"value": "/*\n * Copyright 2013 Franklin Bristow <franklin.bristow@phac-aspc.gc.ca>.\n *\n * Licensed under the Apache License, Version 2... | java | chosen |
[
{
"from": "human",
"value": "Add integration test to verify behaviour\n"
},
{
"from": "gpt",
"value": "package arez.integration.observable;\n\nimport arez.annotations.ArezComponent;\nimport arez.annotations.Observable;\nimport arez.integration.AbstractArezIntegrationTest;\nimport java.util.concu... | java | chosen |
[
{
"from": "human",
"value": "[PAXEXAM-317] Use logback in Native Container regression tests and\nreduce verbosity\n\nadded missing source"
},
{
"from": "gpt",
"value": "package org.ops4j.pax.exam.regression.nat;\n\nimport static org.ops4j.pax.exam.Constants.START_LEVEL_SYSTEM_BUNDLES;\nimport st... | java | chosen |
[
{
"from": "human",
"value": "Add a simple Java app that demonstrates a TCCL memory leak with RMI\nregistry creation."
},
{
"from": "gpt",
"value": "package org.apache.markt.leaks.rmi;\n\nimport java.lang.ref.WeakReference;\nimport java.net.URL;\nimport java.net.URLClassLoader;\nimport java.rmi.r... | java | chosen |
[
{
"from": "human",
"value": "Add utility class to run a OkHttp requests as a RxJava Single\n"
},
{
"from": "gpt",
"value": "package cgeo.geocaching.utils;\n\nimport okhttp3.Call;\nimport okhttp3.Callback;\nimport okhttp3.OkHttpClient;\nimport okhttp3.Request;\nimport okhttp3.Response;\nimport rx... | java | chosen |
[
{
"from": "human",
"value": "Add problem 2 to unit 2\n"
},
{
"from": "gpt",
"value": "import java.util.Scanner;\n\n/**\n * This program computes the Fibonacci Sequence using arrays, and the length specified\n * by the user.\n **/\npublic class Fibonacci_Array {\n public static void main(Strin... | java | chosen |
[
{
"from": "human",
"value": "Add butterworth low path filter. Todo: create hight path and band path filters as well.\n"
},
{
"from": "gpt",
"value": "package jeranvier.math.dsp;\n\nimport jeranvier.math.linearAlgebra.Vector;\nimport jeranvier.math.util.Complex;\n\npublic class ButterworthFilter ... | java | chosen |
[
{
"from": "human",
"value": "Enable logging to a GUI console window"
},
{
"from": "gpt",
"value": "package com.fatico.winthing.logging;\n\nimport java.util.Arrays;\nimport java.util.concurrent.ConcurrentLinkedQueue;\n\nimport com.fatico.winthing.gui.WindowGUI;\n\nimport ch.qos.logback.classic.sp... | java | chosen |
[
{
"from": "human",
"value": "Add a test for .stop() on NettyWebServer to make sure that all resources have been released cleanly\n"
},
{
"from": "gpt",
"value": "package org.webbitserver.netty;\n\nimport java.util.Set;\nimport org.junit.Test;\n\nimport static org.junit.Assert.assertEquals;\n\n/*... | java | chosen |
[
{
"from": "human",
"value": "Test to test the LoaderController\n"
},
{
"from": "gpt",
"value": "package edu.columbia.gemma.controller;\n\nimport org.springframework.mock.web.MockHttpServletRequest;\nimport org.springframework.mock.web.MockHttpServletResponse;\nimport org.springframework.validati... | java | chosen |
[
{
"from": "human",
"value": "Add generation of web.xml naming/mapping code for servlets\n"
},
{
"from": "gpt",
"value": "package org.beanmaker;\n\nimport org.dbbeans.util.Strings;\n\nimport org.jcodegen.html.xmlbase.XMLElement;\n\npublic class WebXMLConfig {\n\n private static final String XM... | java | chosen |
[
{
"from": "human",
"value": "Solve No.10430 from Baekjoon Online Judge\n"
},
{
"from": "gpt",
"value": "/*\n * Copyright 2017 haeun kim\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtai... | java | chosen |
[
{
"from": "human",
"value": "Add support for dedicated events logfile (2 out of 3)"
},
{
"from": "gpt",
"value": "/*\n * Copyright (c) 2013 SimpleServer authors (see CONTRIBUTORS)\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associ... | java | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.