method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
@Override protected Collection<String> splitString(final String s, final boolean trim) { final List<String> list = new LinkedList<>(); StringBuilder token = new StringBuilder(); boolean inEscape = false; for (int i = 0; i < s.length(); i++) { final char c = s.charAt(...
Collection<String> function(final String s, final boolean trim) { final List<String> list = new LinkedList<>(); StringBuilder token = new StringBuilder(); boolean inEscape = false; for (int i = 0; i < s.length(); i++) { final char c = s.charAt(i); if (inEscape) { if (c != getDelimiter() && c != ESCAPE) { token.append(E...
/** * {@inheritDoc} This implementation reverses the escaping done by the {@code escape()} methods of this class. However, * it tries to be tolerant with unexpected escaping sequences: If after the escape character "\" no allowed character * follows, both the backslash and the following character are out...
This implementation reverses the escaping done by the escape() methods of this class. However, it tries to be tolerant with unexpected escaping sequences: If after the escape character "\" no allowed character follows, both the backslash and the following character are output
splitString
{ "repo_name": "apache/commons-configuration", "path": "src/main/java/org/apache/commons/configuration2/convert/DefaultListDelimiterHandler.java", "license": "apache-2.0", "size": 6766 }
[ "java.util.Collection", "java.util.LinkedList", "java.util.List" ]
import java.util.Collection; import java.util.LinkedList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,373,155
public void emitTypeVariables(List<TypeVariableName> typeVariables) throws IOException { if (typeVariables.isEmpty()) return; emit("<"); boolean firstTypeVariable = true; for (TypeVariableName typeVariable : typeVariables) { if (!firstTypeVariable) emit(", "); emit("$L", typeVariable.name...
void function(List<TypeVariableName> typeVariables) throws IOException { if (typeVariables.isEmpty()) return; emit("<"); boolean firstTypeVariable = true; for (TypeVariableName typeVariable : typeVariables) { if (!firstTypeVariable) emit(STR); emit("$L", typeVariable.name); boolean firstBound = true; for (TypeName boun...
/** * Emit type variables with their bounds. This should only be used when declaring type variables; * everywhere else bounds are omitted. */
Emit type variables with their bounds. This should only be used when declaring type variables; everywhere else bounds are omitted
emitTypeVariables
{ "repo_name": "benjholla/JReFrameworker", "path": "plugin/com.squareup.javapoet/src/com/squareup/javapoet/CodeWriter.java", "license": "mit", "size": 16560 }
[ "java.io.IOException", "java.util.List" ]
import java.io.IOException; import java.util.List;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,008,166
@Test public void testGetQuotaByExistingNameWIthNoMatchingStoragePool() throws Exception { Quota quotaGeneralToSpecific = dao.getQuotaByQuotaName("Quota General2"); assertEquals(null, quotaGeneralToSpecific); }
void function() throws Exception { Quota quotaGeneralToSpecific = dao.getQuotaByQuotaName(STR); assertEquals(null, quotaGeneralToSpecific); }
/** * Test get Quota by Name, with name that does not exist for the storage pool. * * @throws Exception */
Test get Quota by Name, with name that does not exist for the storage pool
testGetQuotaByExistingNameWIthNoMatchingStoragePool
{ "repo_name": "jbeecham/ovirt-engine", "path": "backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/QuotaDAOTest.java", "license": "apache-2.0", "size": 27148 }
[ "org.junit.Assert", "org.ovirt.engine.core.common.businessentities.Quota" ]
import org.junit.Assert; import org.ovirt.engine.core.common.businessentities.Quota;
import org.junit.*; import org.ovirt.engine.core.common.businessentities.*;
[ "org.junit", "org.ovirt.engine" ]
org.junit; org.ovirt.engine;
382,094
private static void post(String endpoint, String authToken, Map<String, String> params) throws IOException { URL url; try { url = new URL(endpoint); } catch (MalformedURLException e) { throw new IllegalArgumentException("invalid url: " + endpoint); } S...
static void function(String endpoint, String authToken, Map<String, String> params) throws IOException { URL url; try { url = new URL(endpoint); } catch (MalformedURLException e) { throw new IllegalArgumentException(STR + endpoint); } StringBuilder bodyBuilder = new StringBuilder(); Iterator<Entry<String, String>> iter...
/** * Issue a POST request to the server. * * @param endpoint POST address. * @param authToken Auth token for api call. * @param params request parameters. * @throws java.io.IOException propagated from POST. */
Issue a POST request to the server
post
{ "repo_name": "bigbugbb/iTracker", "path": "app/src/main/java/com/itracker/android/utils/ServerUtils.java", "license": "apache-2.0", "size": 6768 }
[ "com.itracker.android.Config", "java.io.IOException", "java.io.OutputStream", "java.net.HttpURLConnection", "java.net.MalformedURLException", "java.util.Iterator", "java.util.Map" ]
import com.itracker.android.Config; import java.io.IOException; import java.io.OutputStream; import java.net.HttpURLConnection; import java.net.MalformedURLException; import java.util.Iterator; import java.util.Map;
import com.itracker.android.*; import java.io.*; import java.net.*; import java.util.*;
[ "com.itracker.android", "java.io", "java.net", "java.util" ]
com.itracker.android; java.io; java.net; java.util;
2,648,865
public Iterator getInboundVariableNames() { return variables.keySet().iterator(); } protected static class Conversion { Conversion(InboundVariable inboundVariable, Class type) { this.inboundVariable = inboundVariable; this.type = type; ...
Iterator function() { return variables.keySet().iterator(); } protected static class Conversion { Conversion(InboundVariable inboundVariable, Class type) { this.inboundVariable = inboundVariable; this.type = type; }
/** * A debug method so people can get a list of all the variable names * @return an iterator over the known variable names */
A debug method so people can get a list of all the variable names
getInboundVariableNames
{ "repo_name": "simeshev/parabuild-ci", "path": "3rdparty/dwr-2.0.1/src/java/org/directwebremoting/extend/InboundContext.java", "license": "lgpl-3.0", "size": 8913 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
1,867,294
public static void restart() { System.out.println("Server restarting!"); for (Client client : clientList.values()) client.disconnect("Server shutting down!"); try { clientSocket.closeSocket(); start(); } catch (IOException e) { log.warn...
static void function() { System.out.println(STR); for (Client client : clientList.values()) client.disconnect(STR); try { clientSocket.closeSocket(); start(); } catch (IOException e) { log.warning(STR); e.printStackTrace(); } }
/** * Safely restart the server. Cleanly disconnects all connected clients * before closing the server socket. Once all clients are disconnected and * the socket is closed, the `run()` method is called to start the server back * up again. */
Safely restart the server. Cleanly disconnects all connected clients before closing the server socket. Once all clients are disconnected and the socket is closed, the `run()` method is called to start the server back up again
restart
{ "repo_name": "JamoBox/JamChat_Server", "path": "src/main/java/com/jamobox/jamchatserver/JamChatServer.java", "license": "gpl-3.0", "size": 10650 }
[ "com.jamobox.jamchatserver.clients.Client", "java.io.IOException" ]
import com.jamobox.jamchatserver.clients.Client; import java.io.IOException;
import com.jamobox.jamchatserver.clients.*; import java.io.*;
[ "com.jamobox.jamchatserver", "java.io" ]
com.jamobox.jamchatserver; java.io;
2,787,828
public static boolean isMetric(Context context) { SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context); String keyForUnits = context.getString(R.string.pref_units_key); String defaultUnits = context.getString(R.string.pref_units_metric); Str...
static boolean function(Context context) { SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context); String keyForUnits = context.getString(R.string.pref_units_key); String defaultUnits = context.getString(R.string.pref_units_metric); String preferredunits = preferences.getString(keyForUni...
/** * Returns true if the user has selected metric temperature display. * * @param context Context used to get the SharedPreferences * @return true If metric display should be used */
Returns true if the user has selected metric temperature display
isMetric
{ "repo_name": "divya2392/UdacitySunshine", "path": "app/src/main/java/com/example/android/sunshine/data/SunshinePreferences.java", "license": "apache-2.0", "size": 6404 }
[ "android.content.Context", "android.content.SharedPreferences", "android.support.v7.preference.PreferenceManager" ]
import android.content.Context; import android.content.SharedPreferences; import android.support.v7.preference.PreferenceManager;
import android.content.*; import android.support.v7.preference.*;
[ "android.content", "android.support" ]
android.content; android.support;
1,881,343
public synchronized MediaMetadataEditor putString(int key, String value) throws IllegalArgumentException { if (mApplied) { Log.e(TAG, "Can't edit a previously applied MediaMetadataEditor"); return this; } if (METADATA_KEYS_TYPE.get(key, METADATA_TYPE_INVAL...
synchronized MediaMetadataEditor function(int key, String value) throws IllegalArgumentException { if (mApplied) { Log.e(TAG, STR); return this; } if (METADATA_KEYS_TYPE.get(key, METADATA_TYPE_INVALID) != METADATA_TYPE_STRING) { throw(new IllegalArgumentException(STR+ key)); } mEditorMetadata.putString(String.valueOf(k...
/** * Adds textual information. * Note that none of the information added after {@link #apply()} has been called, * will be available to consumers of metadata stored by the MediaMetadataEditor. * @param key The identifier of a the metadata field to set. Valid values are * {@link android.me...
Adds textual information. Note that none of the information added after <code>#apply()</code> has been called, will be available to consumers of metadata stored by the MediaMetadataEditor
putString
{ "repo_name": "JSDemos/android-sdk-20", "path": "src/android/media/MediaMetadataEditor.java", "license": "apache-2.0", "size": 18973 }
[ "android.util.Log" ]
import android.util.Log;
import android.util.*;
[ "android.util" ]
android.util;
577,731
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; labSelectionMethod = new javax.swing.JLabel(); cboSelectionMethod = new javax.swin...
@SuppressWarnings(STR) void function() { java.awt.GridBagConstraints gridBagConstraints; labSelectionMethod = new javax.swing.JLabel(); cboSelectionMethod = new javax.swing.JComboBox(); labSource = new javax.swing.JLabel(); cboSource = new javax.swing.JComboBox(); labTarget = new javax.swing.JLabel(); tltTarget = new R...
/** * This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The * content of this method is always regenerated by the Form Editor. */
content of this method is always regenerated by the Form Editor
initComponents
{ "repo_name": "cismet/watergis-client", "path": "src/main/java/de/cismet/watergis/gui/components/location/LocationDialog.java", "license": "lgpl-3.0", "size": 40860 }
[ "de.cismet.cismap.commons.gui.layerwidget.ActiveLayerModel", "de.cismet.cismap.commons.gui.layerwidget.ReadOnlyThemeLayerWidget", "de.cismet.watergis.broker.AppBroker", "javax.swing.DefaultComboBoxModel", "org.openide.util.NbBundle" ]
import de.cismet.cismap.commons.gui.layerwidget.ActiveLayerModel; import de.cismet.cismap.commons.gui.layerwidget.ReadOnlyThemeLayerWidget; import de.cismet.watergis.broker.AppBroker; import javax.swing.DefaultComboBoxModel; import org.openide.util.NbBundle;
import de.cismet.cismap.commons.gui.layerwidget.*; import de.cismet.watergis.broker.*; import javax.swing.*; import org.openide.util.*;
[ "de.cismet.cismap", "de.cismet.watergis", "javax.swing", "org.openide.util" ]
de.cismet.cismap; de.cismet.watergis; javax.swing; org.openide.util;
2,066,547
public ChunkPosition findBiomePosition(int par1, int par2, int par3, List par4List, Random par5Random) { IntCache.resetIntCache(); int var6 = par1 - par3 >> 2; int var7 = par2 - par3 >> 2; int var8 = par1 + par3 >> 2; int var9 = par2 + par3 >> 2; int var10 = var8 ...
ChunkPosition function(int par1, int par2, int par3, List par4List, Random par5Random) { IntCache.resetIntCache(); int var6 = par1 - par3 >> 2; int var7 = par2 - par3 >> 2; int var8 = par1 + par3 >> 2; int var9 = par2 + par3 >> 2; int var10 = var8 - var6 + 1; int var11 = var9 - var7 + 1; int[] var12 = this.genBiomes.ge...
/** * Finds a valid position within a range, that is in one of the listed biomes. Searches {par1,par2} +-par3 blocks. * Strongly favors positive y positions. */
Finds a valid position within a range, that is in one of the listed biomes. Searches {par1,par2} +-par3 blocks. Strongly favors positive y positions
findBiomePosition
{ "repo_name": "LolololTrololol/InsertNameHere", "path": "minecraft/net/minecraft/src/WorldChunkManager.java", "license": "gpl-2.0", "size": 8100 }
[ "java.util.List", "java.util.Random" ]
import java.util.List; import java.util.Random;
import java.util.*;
[ "java.util" ]
java.util;
2,156,442
public void reloadForum(Forum forum) { Forum currentForum = this.getForum(forum.getId()); if (forum.getOrder() != currentForum.getOrder()) { throw new ForumOrderChangedException("Forum #" + forum.getId() + " cannot be reloaded, since its " + "display order was changed. You must call Category#changeFor...
void function(Forum forum) { Forum currentForum = this.getForum(forum.getId()); if (forum.getOrder() != currentForum.getOrder()) { throw new ForumOrderChangedException(STR + forum.getId() + STR + STR + "first"); } Set tmpSet = new TreeSet(new ForumOrderComparator()); tmpSet.addAll(this.forums); tmpSet.remove(currentFor...
/** * Reloads a forum. * The forum should already be in the cache and <b>SHOULD NOT</b> * have its order changed. If the forum's order was changed, * then you <b>MUST CALL</b> @link #changeForumOrder(Forum) <b>BEFORE</b> * calling this method. * * @param forum The forum to reload its information * @se...
Reloads a forum. The forum should already be in the cache and SHOULD NOT have its order changed. If the forum's order was changed, then you MUST CALL @link #changeForumOrder(Forum) BEFORE calling this method
reloadForum
{ "repo_name": "Nwanda/jforum", "path": "src/net/jforum/entities/Category.java", "license": "bsd-3-clause", "size": 9006 }
[ "java.util.Set", "java.util.TreeSet", "net.jforum.exceptions.ForumOrderChangedException", "net.jforum.util.ForumOrderComparator" ]
import java.util.Set; import java.util.TreeSet; import net.jforum.exceptions.ForumOrderChangedException; import net.jforum.util.ForumOrderComparator;
import java.util.*; import net.jforum.exceptions.*; import net.jforum.util.*;
[ "java.util", "net.jforum.exceptions", "net.jforum.util" ]
java.util; net.jforum.exceptions; net.jforum.util;
1,310,380
public void setLockService(LockService lockService) { this.lockService = lockService; }
void function(LockService lockService) { this.lockService = lockService; }
/** * Sets the lock service. * * @param lockService * the lockService to set */
Sets the lock service
setLockService
{ "repo_name": "SirmaITT/conservation-space-1.7.0", "path": "docker/sep-alfresco/alfresco/src/cmf/com/sirma/itt/cmf/integration/service/CMFLockService.java", "license": "lgpl-3.0", "size": 6153 }
[ "org.alfresco.service.cmr.lock.LockService" ]
import org.alfresco.service.cmr.lock.LockService;
import org.alfresco.service.cmr.lock.*;
[ "org.alfresco.service" ]
org.alfresco.service;
2,154,543
private void moveMembersBans(PerunSession sess, Member sourceMember, Member targetMember) { // move members bans on resources List<BanOnResource> bansOnResources = getPerunBl().getResourcesManagerBl().getBansForMember(sess, sourceMember.getId()); for (BanOnResource banOnResource : bansOnResources) { try { ...
void function(PerunSession sess, Member sourceMember, Member targetMember) { List<BanOnResource> bansOnResources = getPerunBl().getResourcesManagerBl().getBansForMember(sess, sourceMember.getId()); for (BanOnResource banOnResource : bansOnResources) { try { banOnResource.setMemberId(targetMember.getId()); getPerunBl()....
/** * Moves bans on resources and ban on VO from source member to target member. * * @param sess * @param sourceMember member to move bans from * @param targetMember member to move bans to */
Moves bans on resources and ban on VO from source member to target member
moveMembersBans
{ "repo_name": "martin-kuba/perun", "path": "perun-core/src/main/java/cz/metacentrum/perun/core/blImpl/MembersManagerBlImpl.java", "license": "bsd-2-clause", "size": 152238 }
[ "cz.metacentrum.perun.core.api.BanOnResource", "cz.metacentrum.perun.core.api.BanOnVo", "cz.metacentrum.perun.core.api.Member", "cz.metacentrum.perun.core.api.PerunSession", "cz.metacentrum.perun.core.api.exceptions.BanAlreadyExistsException", "cz.metacentrum.perun.core.api.exceptions.InternalErrorExcepti...
import cz.metacentrum.perun.core.api.BanOnResource; import cz.metacentrum.perun.core.api.BanOnVo; import cz.metacentrum.perun.core.api.Member; import cz.metacentrum.perun.core.api.PerunSession; import cz.metacentrum.perun.core.api.exceptions.BanAlreadyExistsException; import cz.metacentrum.perun.core.api.exceptions.Int...
import cz.metacentrum.perun.core.api.*; import cz.metacentrum.perun.core.api.exceptions.*; import java.util.*;
[ "cz.metacentrum.perun", "java.util" ]
cz.metacentrum.perun; java.util;
2,901,936
public int getPreferredWidth(Rectangle bounds) { if(updateNodeSizes) updateNodeSizes(false); return getMaxNodeWidth(); }
int function(Rectangle bounds) { if(updateNodeSizes) updateNodeSizes(false); return getMaxNodeWidth(); }
/** * Returns the preferred width and height for the region in * <code>visibleRegion</code>. * * @param bounds the region being queried */
Returns the preferred width and height for the region in <code>visibleRegion</code>
getPreferredWidth
{ "repo_name": "mirkosertic/Bytecoder", "path": "classlib/java.desktop/src/main/resources/META-INF/modules/java.desktop/classes/javax/swing/tree/VariableHeightLayoutCache.java", "license": "apache-2.0", "size": 61865 }
[ "java.awt.Rectangle" ]
import java.awt.Rectangle;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,991,359
public Map<String, List<String>> getHeaders() { return Collections.unmodifiableMap(headersMap); }
Map<String, List<String>> function() { return Collections.unmodifiableMap(headersMap); }
/** * Returns an unmodifiable view of the map of lowercase header name to values. * * <p>Note that unlike this method, {@link #getFirstHeaderValue(String)} and {@link * #getHeaderValues(String)} are not case sensitive with respect to the input header name. * * @since 1.5 */
Returns an unmodifiable view of the map of lowercase header name to values. Note that unlike this method, <code>#getFirstHeaderValue(String)</code> and <code>#getHeaderValues(String)</code> are not case sensitive with respect to the input header name
getHeaders
{ "repo_name": "googleapis/google-http-java-client", "path": "google-http-client/src/main/java/com/google/api/client/testing/http/MockLowLevelHttpRequest.java", "license": "apache-2.0", "size": 5699 }
[ "java.util.Collections", "java.util.List", "java.util.Map" ]
import java.util.Collections; import java.util.List; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,120,770
@Override public Adapter createGoToAdapter() { if (goToItemProvider == null) { goToItemProvider = new GoToItemProvider(this); } return goToItemProvider; } protected ReturnToBaseItemProvider returnToBaseItemProvider;
Adapter function() { if (goToItemProvider == null) { goToItemProvider = new GoToItemProvider(this); } return goToItemProvider; } protected ReturnToBaseItemProvider returnToBaseItemProvider;
/** * This creates an adapter for a {@link fr.obeo.dsl.mindstorms.GoTo}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This creates an adapter for a <code>fr.obeo.dsl.mindstorms.GoTo</code>.
createGoToAdapter
{ "repo_name": "mbats/mindstorms", "path": "plugins/fr.obeo.dsl.mindstorms.edit/src-gen/fr/obeo/dsl/mindstorms/provider/MindstormsItemProviderAdapterFactory.java", "license": "epl-1.0", "size": 20531 }
[ "org.eclipse.emf.common.notify.Adapter" ]
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
811,679
@Test public void testOtherConnMgrPropsApplied() throws Exception { //do a direct lookup of ucpDS InitialContext ctx = new InitialContext(); DataSource ds = (DataSource) ctx.lookup("jdbc/ucpDS"); //get and close a connection Connection con = ds.getConnection(); c...
void function() throws Exception { InitialContext ctx = new InitialContext(); DataSource ds = (DataSource) ctx.lookup(STR); Connection con = ds.getConnection(); con.close(); assertEquals(STR, 0, getPoolSize(STR)); }
/** * Test that the appropriate connection manager properties (currently just * enableSharingForDirectLookups) are still enforced when using UCP */
Test that the appropriate connection manager properties (currently just enableSharingForDirectLookups) are still enforced when using UCP
testOtherConnMgrPropsApplied
{ "repo_name": "kgibm/open-liberty", "path": "dev/com.ibm.ws.jdbc_fat_oracle/test-applications/oracleucpfat/src/ucp/web/OracleUCPTestServlet.java", "license": "epl-1.0", "size": 31473 }
[ "java.sql.Connection", "javax.naming.InitialContext", "javax.sql.DataSource", "junit.framework.Assert" ]
import java.sql.Connection; import javax.naming.InitialContext; import javax.sql.DataSource; import junit.framework.Assert;
import java.sql.*; import javax.naming.*; import javax.sql.*; import junit.framework.*;
[ "java.sql", "javax.naming", "javax.sql", "junit.framework" ]
java.sql; javax.naming; javax.sql; junit.framework;
2,530,436
@Test public void testSetExecutable() { Assert.assertNull(this.c.getExecutable()); this.c.setExecutable(EXECUTABLE); Assert.assertEquals(EXECUTABLE, this.c.getExecutable()); }
void function() { Assert.assertNull(this.c.getExecutable()); this.c.setExecutable(EXECUTABLE); Assert.assertEquals(EXECUTABLE, this.c.getExecutable()); }
/** * Test setting the executable. */
Test setting the executable
testSetExecutable
{ "repo_name": "ZhangboFrank/genie", "path": "genie-common/src/test/java/com/netflix/genie/common/model/TestCommand.java", "license": "apache-2.0", "size": 8186 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,337,226
@Override public URL getResource(String path) throws MalformedURLException { if (!path.startsWith("/")) throw new MalformedURLException("Path '" + path + "' does not start with '/'"); URL url = new URL(myResourceBaseURL, path.substri...
URL function(String path) throws MalformedURLException { if (!path.startsWith("/")) throw new MalformedURLException(STR + path + STR); URL url = new URL(myResourceBaseURL, path.substring(1)); InputStream is = null; try { is = url.openStream(); } catch (Throwable t) { ExceptionUtils.handleThrowable(t); url = null; } fin...
/** * Return a URL object of a resource that is mapped to the * specified context-relative path. * * @param path Context-relative path of the desired resource * * @exception MalformedURLException if the resource path is * not properly formed */
Return a URL object of a resource that is mapped to the specified context-relative path
getResource
{ "repo_name": "pistolove/sourcecode4junit", "path": "Source4Tomcat/src/org/apache/jasper/servlet/JspCServletContext.java", "license": "apache-2.0", "size": 14903 }
[ "java.io.InputStream", "java.net.MalformedURLException", "org.apache.jasper.util.ExceptionUtils" ]
import java.io.InputStream; import java.net.MalformedURLException; import org.apache.jasper.util.ExceptionUtils;
import java.io.*; import java.net.*; import org.apache.jasper.util.*;
[ "java.io", "java.net", "org.apache.jasper" ]
java.io; java.net; org.apache.jasper;
1,514,996
@Test public void testGetPropertyError() { assertNull("Wrong property value after error", setUpErrorConfig().getProperty("key")); checkErrorListener(ConfigurationErrorEvent.READ, ConfigurationErrorEvent.READ, "key", null); }
void function() { assertNull(STR, setUpErrorConfig().getProperty("key")); checkErrorListener(ConfigurationErrorEvent.READ, ConfigurationErrorEvent.READ, "key", null); }
/** * Tests handling of errors in getProperty(). */
Tests handling of errors in getProperty()
testGetPropertyError
{ "repo_name": "apache/commons-configuration", "path": "src/test/java/org/apache/commons/configuration2/TestJNDIConfiguration.java", "license": "apache-2.0", "size": 11485 }
[ "org.apache.commons.configuration2.event.ConfigurationErrorEvent", "org.junit.Assert" ]
import org.apache.commons.configuration2.event.ConfigurationErrorEvent; import org.junit.Assert;
import org.apache.commons.configuration2.event.*; import org.junit.*;
[ "org.apache.commons", "org.junit" ]
org.apache.commons; org.junit;
1,244,052
public static Collection<String> getFeatureIDs(final Collection<String> featureIDs, final String version) { if (Sos2Constants.SERVICEVERSION.equals(version)) { final Collection<String> validFeatureIDs = new ArrayList<String>(featureIDs.size()); for (final String featureID : featureID...
static Collection<String> function(final Collection<String> featureIDs, final String version) { if (Sos2Constants.SERVICEVERSION.equals(version)) { final Collection<String> validFeatureIDs = new ArrayList<String>(featureIDs.size()); for (final String featureID : featureIDs) { if (checkFeatureOfInterestIdentifierForSosV...
/** * Get valid FOI identifiers for SOS 2.0 * * @param featureIDs * FOI identifiers to test * @param version * SOS version * @return valid FOI identifiers */
Get valid FOI identifiers for SOS 2.0
getFeatureIDs
{ "repo_name": "ahuarte47/SOS", "path": "core/api/src/main/java/org/n52/sos/util/SosHelper.java", "license": "gpl-2.0", "size": 31206 }
[ "java.util.ArrayList", "java.util.Collection", "org.n52.sos.ogc.sos.Sos2Constants" ]
import java.util.ArrayList; import java.util.Collection; import org.n52.sos.ogc.sos.Sos2Constants;
import java.util.*; import org.n52.sos.ogc.sos.*;
[ "java.util", "org.n52.sos" ]
java.util; org.n52.sos;
2,631,104
FoxResponse receiveUpload(RequestContext pRequestContext) { if(mUploadInfo.getStatus() != UploadStatus.NOT_STARTED) { throw new ExInternal("Cannot start an upload when UploadInfo status is " + mUploadInfo.getStatus()); } FoxRequest lFoxRequest = pRequestContext.getFoxRequest(); App lApp = pReq...
FoxResponse receiveUpload(RequestContext pRequestContext) { if(mUploadInfo.getStatus() != UploadStatus.NOT_STARTED) { throw new ExInternal(STR + mUploadInfo.getStatus()); } FoxRequest lFoxRequest = pRequestContext.getFoxRequest(); App lApp = pRequestContext.getRequestApp(); WorkingUploadStorageLocation lWorkingSL = mUp...
/** * Initialise a WorkDoc LOB locator, streams a file upload into it, and handles storage location completion/finalisation. * @return JSON response representing upload success or failure. */
Initialise a WorkDoc LOB locator, streams a file upload into it, and handles storage location completion/finalisation
receiveUpload
{ "repo_name": "Fivium/FOXopen", "path": "src/main/java/net/foxopen/fox/filetransfer/UploadProcessor.java", "license": "gpl-3.0", "size": 17701 }
[ "java.sql.Blob", "java.sql.Savepoint", "net.foxopen.fox.App", "net.foxopen.fox.FoxRequest", "net.foxopen.fox.FoxResponse", "net.foxopen.fox.database.UCon", "net.foxopen.fox.database.storage.lob.LOBWorkDoc", "net.foxopen.fox.database.storage.lob.WriteableLOBWorkDoc", "net.foxopen.fox.entrypoint.FoxGl...
import java.sql.Blob; import java.sql.Savepoint; import net.foxopen.fox.App; import net.foxopen.fox.FoxRequest; import net.foxopen.fox.FoxResponse; import net.foxopen.fox.database.UCon; import net.foxopen.fox.database.storage.lob.LOBWorkDoc; import net.foxopen.fox.database.storage.lob.WriteableLOBWorkDoc; import net.fo...
import java.sql.*; import net.foxopen.fox.*; import net.foxopen.fox.database.*; import net.foxopen.fox.database.storage.lob.*; import net.foxopen.fox.entrypoint.*; import net.foxopen.fox.ex.*; import net.foxopen.fox.module.*; import net.foxopen.fox.queue.*; import net.foxopen.fox.thread.*; import net.foxopen.fox.thread...
[ "java.sql", "net.foxopen.fox" ]
java.sql; net.foxopen.fox;
2,218,704
public BigDecimal getQtyOrdered(); public static final String COLUMNNAME_QtyReserved = "QtyReserved";
BigDecimal function(); public static final String COLUMNNAME_QtyReserved = STR;
/** Get Bestellte Menge. * Bestellte Menge */
Get Bestellte Menge. Bestellte Menge
getQtyOrdered
{ "repo_name": "klst-com/metasfresh", "path": "de.metas.swat/de.metas.swat.base/src/main/java-gen/org/adempiere/model/I_RV_C_OrderLine_Overview.java", "license": "gpl-2.0", "size": 25037 }
[ "java.math.BigDecimal" ]
import java.math.BigDecimal;
import java.math.*;
[ "java.math" ]
java.math;
2,359,955
@Deprecated public final void writeGroup(final int fieldNumber, final MessageLite value) throws IOException { writeTag(fieldNumber, WireFormat.WIRETYPE_START_GROUP); writeGroupNoTag(value); writeTag(fieldNumber, WireFormat.WIRETYPE_END_GROUP); }
final void function(final int fieldNumber, final MessageLite value) throws IOException { writeTag(fieldNumber, WireFormat.WIRETYPE_START_GROUP); writeGroupNoTag(value); writeTag(fieldNumber, WireFormat.WIRETYPE_END_GROUP); }
/** * Write a {@code group} field, including tag, to the stream. * * @deprecated groups are deprecated. */
Write a group field, including tag, to the stream
writeGroup
{ "repo_name": "danakj/chromium", "path": "third_party/protobuf/java/core/src/main/java/com/google/protobuf/CodedOutputStream.java", "license": "bsd-3-clause", "size": 93273 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
438,795
@Test public void testIfTablePrefixIsBeingUsed() throws SQLException { String tablePrefix = "TBL_"; namingStrategy.setTablePrefix(tablePrefix); String className = "SomeCamelCaseClass"; String expectedPhysicalName = "tbl_somecamelcaseclass"; Dialect dialect = new H2Diale...
void function() throws SQLException { String tablePrefix = "TBL_"; namingStrategy.setTablePrefix(tablePrefix); String className = STR; String expectedPhysicalName = STR; Dialect dialect = new H2Dialect(); assertExpectedPhysicalTableName(dialect, className, expectedPhysicalName); }
/** * Tests whether the table prefix is being respected. * * @throws SQLException */
Tests whether the table prefix is being respected
testIfTablePrefixIsBeingUsed
{ "repo_name": "buehner/shogun2", "path": "src/shogun-core-main/src/test/java/de/terrestris/shoguncore/util/naming/PhysicalNamingStrategyShogunCoreTest.java", "license": "apache-2.0", "size": 8200 }
[ "java.sql.SQLException", "org.hibernate.dialect.Dialect", "org.hibernate.dialect.H2Dialect" ]
import java.sql.SQLException; import org.hibernate.dialect.Dialect; import org.hibernate.dialect.H2Dialect;
import java.sql.*; import org.hibernate.dialect.*;
[ "java.sql", "org.hibernate.dialect" ]
java.sql; org.hibernate.dialect;
1,743,202
@Test public void testSetAlreadyCreated() throws Exception { deviceInformation.setAlreadyCreated(true); assertThat(deviceInformation.isAlreadyCreated(), is(true)); }
void function() throws Exception { deviceInformation.setAlreadyCreated(true); assertThat(deviceInformation.isAlreadyCreated(), is(true)); }
/** * Tests isAlreadyCreated() setter method. */
Tests isAlreadyCreated() setter method
testSetAlreadyCreated
{ "repo_name": "Phaneendra-Huawei/demo", "path": "protocols/ospf/ctl/src/test/java/org/onosproject/ospf/controller/impl/DeviceInformationImplTest.java", "license": "apache-2.0", "size": 4919 }
[ "org.hamcrest.CoreMatchers", "org.junit.Assert" ]
import org.hamcrest.CoreMatchers; import org.junit.Assert;
import org.hamcrest.*; import org.junit.*;
[ "org.hamcrest", "org.junit" ]
org.hamcrest; org.junit;
997,615
public ResultSet getGeneratedKeys() throws SQLException { final boolean isTraceOn = TraceComponent.isAnyTracingEnabled(); if (isTraceOn && tc.isEntryEnabled()) Tr.entry(this, tc, "getGeneratedKeys"); ResultSet rsetImpl = null; WSJdbcResultSet rsetWrapper = null; ...
ResultSet function() throws SQLException { final boolean isTraceOn = TraceComponent.isAnyTracingEnabled(); if (isTraceOn && tc.isEntryEnabled()) Tr.entry(this, tc, STR); ResultSet rsetImpl = null; WSJdbcResultSet rsetWrapper = null; try { rsetImpl = stmtImpl.getGeneratedKeys(); } catch (SQLException ex) { FFDCFilter.pr...
/** * Method getGeneratedKeys. * <p>Retrieves any auto-generated keys created as a result of executing this Statement * object. If this Statement object did not generate any keys, an empty ResultSet object * is returned. </p> * * @return ResultSet object containing the auto-generated key(...
Method getGeneratedKeys. Retrieves any auto-generated keys created as a result of executing this Statement object. If this Statement object did not generate any keys, an empty ResultSet object is returned.
getGeneratedKeys
{ "repo_name": "kgibm/open-liberty", "path": "dev/com.ibm.ws.jdbc/src/com/ibm/ws/rsadapter/jdbc/WSJdbcStatement.java", "license": "epl-1.0", "size": 68892 }
[ "com.ibm.websphere.ras.Tr", "com.ibm.websphere.ras.TraceComponent", "com.ibm.ws.ffdc.FFDCFilter", "java.sql.ResultSet", "java.sql.SQLException", "java.sql.Wrapper", "java.util.ArrayList" ]
import com.ibm.websphere.ras.Tr; import com.ibm.websphere.ras.TraceComponent; import com.ibm.ws.ffdc.FFDCFilter; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Wrapper; import java.util.ArrayList;
import com.ibm.websphere.ras.*; import com.ibm.ws.ffdc.*; import java.sql.*; import java.util.*;
[ "com.ibm.websphere", "com.ibm.ws", "java.sql", "java.util" ]
com.ibm.websphere; com.ibm.ws; java.sql; java.util;
2,335,127
private AmazonServiceException handleErrorResponse(Request<?> request, HttpResponseHandler<AmazonServiceException> errorResponseHandler, HttpRequestBase method, final org.apache.http.HttpResponse apacheHttpResponse) throws IOException { final StatusLine statusLine = apacheHttpRes...
AmazonServiceException function(Request<?> request, HttpResponseHandler<AmazonServiceException> errorResponseHandler, HttpRequestBase method, final org.apache.http.HttpResponse apacheHttpResponse) throws IOException { final StatusLine statusLine = apacheHttpResponse.getStatusLine(); final int statusCode; final String r...
/** * Responsible for handling an error response, including unmarshalling the * error response into the most specific exception type possible, and * throwing the exception. * * @param request * The request that generated the error response being handled. * @param errorRespo...
Responsible for handling an error response, including unmarshalling the error response into the most specific exception type possible, and throwing the exception
handleErrorResponse
{ "repo_name": "sdole/aws-sdk-java", "path": "aws-java-sdk-core/src/main/java/com/amazonaws/http/AmazonHttpClient.java", "license": "apache-2.0", "size": 62303 }
[ "com.amazonaws.AmazonClientException", "com.amazonaws.AmazonServiceException", "com.amazonaws.Request", "com.amazonaws.util.AWSRequestMetrics", "java.io.IOException", "org.apache.http.StatusLine", "org.apache.http.client.methods.HttpRequestBase" ]
import com.amazonaws.AmazonClientException; import com.amazonaws.AmazonServiceException; import com.amazonaws.Request; import com.amazonaws.util.AWSRequestMetrics; import java.io.IOException; import org.apache.http.StatusLine; import org.apache.http.client.methods.HttpRequestBase;
import com.amazonaws.*; import com.amazonaws.util.*; import java.io.*; import org.apache.http.*; import org.apache.http.client.methods.*;
[ "com.amazonaws", "com.amazonaws.util", "java.io", "org.apache.http" ]
com.amazonaws; com.amazonaws.util; java.io; org.apache.http;
2,687,014
private long tryToFindSequentially(int cap) throws IgniteCheckedException { assert getWriteHoldCount() > 0; long prevAddr = INVALID_REL_PTR; int pinnedCnt = 0; int failToPrepare = 0; for (int i = 0; i < cap; i++) { final EvictCandidat...
long function(int cap) throws IgniteCheckedException { assert getWriteHoldCount() > 0; long prevAddr = INVALID_REL_PTR; int pinnedCnt = 0; int failToPrepare = 0; for (int i = 0; i < cap; i++) { final EvictCandidate nearest = loadedPages.getNearestAt(i, INVALID_REL_PTR); assert nearest != null && nearest.relativePointer...
/** * Will scan all segment pages to find one to evict it * * @param cap Capacity. */
Will scan all segment pages to find one to evict it
tryToFindSequentially
{ "repo_name": "WilliamDo/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/pagemem/PageMemoryImpl.java", "license": "apache-2.0", "size": 79433 }
[ "org.apache.ignite.IgniteCheckedException", "org.apache.ignite.internal.mem.IgniteOutOfMemoryException", "org.apache.ignite.internal.pagemem.FullPageId", "org.apache.ignite.internal.pagemem.PageIdUtils" ]
import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.internal.mem.IgniteOutOfMemoryException; import org.apache.ignite.internal.pagemem.FullPageId; import org.apache.ignite.internal.pagemem.PageIdUtils;
import org.apache.ignite.*; import org.apache.ignite.internal.mem.*; import org.apache.ignite.internal.pagemem.*;
[ "org.apache.ignite" ]
org.apache.ignite;
88,946
public static int convert(EnumSet<XAttrSetFlag> flag) { int value = 0; if (flag.contains(XAttrSetFlag.CREATE)) { value |= XAttrSetFlagProto.XATTR_CREATE.getNumber(); } if (flag.contains(XAttrSetFlag.REPLACE)) { value |= XAttrSetFlagProto.XATTR_REPLACE.getNumber(); } return value; ...
static int function(EnumSet<XAttrSetFlag> flag) { int value = 0; if (flag.contains(XAttrSetFlag.CREATE)) { value = XAttrSetFlagProto.XATTR_CREATE.getNumber(); } if (flag.contains(XAttrSetFlag.REPLACE)) { value = XAttrSetFlagProto.XATTR_REPLACE.getNumber(); } return value; }
/** * The flag field in PB is a bitmask whose values are the same a the * emum values of XAttrSetFlag */
The flag field in PB is a bitmask whose values are the same a the emum values of XAttrSetFlag
convert
{ "repo_name": "soumabrata-chakraborty/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocolPB/PBHelperClient.java", "license": "apache-2.0", "size": 118726 }
[ "java.util.EnumSet", "org.apache.hadoop.fs.XAttrSetFlag", "org.apache.hadoop.hdfs.protocol.proto.XAttrProtos" ]
import java.util.EnumSet; import org.apache.hadoop.fs.XAttrSetFlag; import org.apache.hadoop.hdfs.protocol.proto.XAttrProtos;
import java.util.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.protocol.proto.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
2,237,034
public DefaultValueProcessorMatcher getDefaultValueProcessorMatcher() { return defaultValueProcessorMatcher; }
DefaultValueProcessorMatcher function() { return defaultValueProcessorMatcher; }
/** * Returns the configured DefaultValueProcessorMatcher.<br> * Default value is DefaultValueProcessorMatcher.DEFAULT<br> * [Java -&gt; JSON] */
Returns the configured DefaultValueProcessorMatcher. Default value is DefaultValueProcessorMatcher.DEFAULT [Java -&gt; JSON]
getDefaultValueProcessorMatcher
{ "repo_name": "kohsuke/Json-lib", "path": "src/main/java/net/sf/json/JsonConfig.java", "license": "apache-2.0", "size": 49405 }
[ "net.sf.json.processors.DefaultValueProcessorMatcher" ]
import net.sf.json.processors.DefaultValueProcessorMatcher;
import net.sf.json.processors.*;
[ "net.sf.json" ]
net.sf.json;
2,130,852
public void testDisablePushDirectoryOnParallelBuild_Jobs() throws Exception { String fileName = getName()+".c"; ResourceHelper.createFolder(fProject, "Folder"); ResourceHelper.createFile(fProject, fileName); ResourceHelper.createFile(fProject, "Folder/"+fileName); String lines = "make --jobs=2\n" + "m...
void function() throws Exception { String fileName = getName()+".c"; ResourceHelper.createFolder(fProject, STR); ResourceHelper.createFile(fProject, fileName); ResourceHelper.createFile(fProject, STR+fileName); String lines = STR + STR + fileName+STR; String[] errorParsers = {CWD_LOCATOR_ID, mockErrorParserId }; parseO...
/** * Checks if a file from error output can be found. * * @throws Exception... */
Checks if a file from error output can be found
testDisablePushDirectoryOnParallelBuild_Jobs
{ "repo_name": "Yuerr14/RepeatedFixes", "path": "RepeatedFixes/misc/org/eclipse/cdt/core/internal/errorparsers/tests/ErrorParserFileMatchingTest.java", "license": "mit", "size": 60376 }
[ "org.eclipse.cdt.core.ProblemMarkerInfo", "org.eclipse.cdt.core.testplugin.ResourceHelper" ]
import org.eclipse.cdt.core.ProblemMarkerInfo; import org.eclipse.cdt.core.testplugin.ResourceHelper;
import org.eclipse.cdt.core.*; import org.eclipse.cdt.core.testplugin.*;
[ "org.eclipse.cdt" ]
org.eclipse.cdt;
679,746
public Builder initializeAsNew(IndexMetaData indexMetaData) { return initializeEmpty(indexMetaData, new UnassignedInfo(UnassignedInfo.Reason.INDEX_CREATED, null)); }
Builder function(IndexMetaData indexMetaData) { return initializeEmpty(indexMetaData, new UnassignedInfo(UnassignedInfo.Reason.INDEX_CREATED, null)); }
/** * Initializes a new empty index, as if it was created from an API. */
Initializes a new empty index, as if it was created from an API
initializeAsNew
{ "repo_name": "mmaracic/elasticsearch", "path": "core/src/main/java/org/elasticsearch/cluster/routing/IndexRoutingTable.java", "license": "apache-2.0", "size": 22454 }
[ "org.elasticsearch.cluster.metadata.IndexMetaData" ]
import org.elasticsearch.cluster.metadata.IndexMetaData;
import org.elasticsearch.cluster.metadata.*;
[ "org.elasticsearch.cluster" ]
org.elasticsearch.cluster;
723,746
public void setNodePoolManagement(com.google.container.v1.SetNodePoolManagementRequest request, io.grpc.stub.StreamObserver<com.google.container.v1.Operation> responseObserver) { asyncUnaryCall( getChannel().newCall(getSetNodePoolManagementMethodHelper(), getCallOptions()), request, response...
void function(com.google.container.v1.SetNodePoolManagementRequest request, io.grpc.stub.StreamObserver<com.google.container.v1.Operation> responseObserver) { asyncUnaryCall( getChannel().newCall(getSetNodePoolManagementMethodHelper(), getCallOptions()), request, responseObserver); }
/** * <pre> * Sets the NodeManagement options for a node pool. * </pre> */
<code> Sets the NodeManagement options for a node pool. </code>
setNodePoolManagement
{ "repo_name": "pongad/api-client-staging", "path": "generated/java/grpc-google-cloud-container-v1/src/main/java/com/google/container/v1/ClusterManagerGrpc.java", "license": "bsd-3-clause", "size": 147597 }
[ "io.grpc.stub.ClientCalls", "io.grpc.stub.ServerCalls" ]
import io.grpc.stub.ClientCalls; import io.grpc.stub.ServerCalls;
import io.grpc.stub.*;
[ "io.grpc.stub" ]
io.grpc.stub;
2,509,918
protected AdaptiveTrackSelection createAdaptiveTrackSelection( TrackGroup group, BandwidthMeter bandwidthMeter, int[] tracks) { return new AdaptiveTrackSelection( group, tracks, new DefaultBandwidthProvider(bandwidthMeter, bandwidthFraction), minDurationForQuali...
AdaptiveTrackSelection function( TrackGroup group, BandwidthMeter bandwidthMeter, int[] tracks) { return new AdaptiveTrackSelection( group, tracks, new DefaultBandwidthProvider(bandwidthMeter, bandwidthFraction), minDurationForQualityIncreaseMs, maxDurationForQualityDecreaseMs, minDurationToRetainAfterDiscardMs, buffer...
/** * Creates a single adaptive selection for the given group, bandwidth meter and tracks. * * @param group The {@link TrackGroup}. * @param bandwidthMeter A {@link BandwidthMeter} which can be used to select tracks. * @param tracks The indices of the selected tracks in the track group. * ...
Creates a single adaptive selection for the given group, bandwidth meter and tracks
createAdaptiveTrackSelection
{ "repo_name": "CzBiX/Telegram", "path": "TMessagesProj/src/main/java/com/google/android/exoplayer2/trackselection/AdaptiveTrackSelection.java", "license": "gpl-2.0", "size": 35177 }
[ "com.google.android.exoplayer2.Format", "com.google.android.exoplayer2.source.TrackGroup", "com.google.android.exoplayer2.upstream.BandwidthMeter", "com.google.android.exoplayer2.util.Clock" ]
import com.google.android.exoplayer2.Format; import com.google.android.exoplayer2.source.TrackGroup; import com.google.android.exoplayer2.upstream.BandwidthMeter; import com.google.android.exoplayer2.util.Clock;
import com.google.android.exoplayer2.*; import com.google.android.exoplayer2.source.*; import com.google.android.exoplayer2.upstream.*; import com.google.android.exoplayer2.util.*;
[ "com.google.android" ]
com.google.android;
2,640,550
private static void update_perm_redir_list(RoRequest req, URI new_loc) { HTTPConnection con = req.getConnection(); URI cur_loc = null; try { cur_loc = new URI(new URI(con.getProtocol(), con.getHost(), con.getPort(), null), req.getRequestURI()); } catch (ParseException pe) { } if (!cur...
static void function(RoRequest req, URI new_loc) { HTTPConnection con = req.getConnection(); URI cur_loc = null; try { cur_loc = new URI(new URI(con.getProtocol(), con.getHost(), con.getPort(), null), req.getRequestURI()); } catch (ParseException pe) { } if (!cur_loc.equals(new_loc)) { Hashtable perm_redir_list = Util....
/** * Update the permanent redirection list. * * @param the original request * @param the new location */
Update the permanent redirection list
update_perm_redir_list
{ "repo_name": "unrelatedlabs/java-wemo-bridge", "path": "target/HTTPClient/RedirectionModule.java", "license": "apache-2.0", "size": 14381 }
[ "java.util.Hashtable" ]
import java.util.Hashtable;
import java.util.*;
[ "java.util" ]
java.util;
1,332,994
private void runTest(TestGroupDefinition testGroupDefinition, Description description) { // Run the test, when an exception is thrown in the test, consider test as failed UserTransaction utx = sessionContext.getUserTransaction(); try { // Start a new transaction utx....
void function(TestGroupDefinition testGroupDefinition, Description description) { UserTransaction utx = sessionContext.getUserTransaction(); try { utx.begin(); } catch (Exception e) { throw new RuntimeException(STR + description.getName()); } runBeforeEachInMainTx(testGroupDefinition); runBeforeInMainTx(testGroupDefini...
/** * Run a test method * * @param testGroupDefinition The test group definition * @param description The test description */
Run a test method
runTest
{ "repo_name": "probedock/jee-itf", "path": "src/main/java/io/probedock/jee/itf/AbstractTestController.java", "license": "mit", "size": 21666 }
[ "io.probedock.jee.itf.model.Description", "io.probedock.jee.itf.model.TestGroupDefinition", "java.io.PrintWriter", "java.io.StringWriter", "java.io.Writer", "javax.transaction.UserTransaction" ]
import io.probedock.jee.itf.model.Description; import io.probedock.jee.itf.model.TestGroupDefinition; import java.io.PrintWriter; import java.io.StringWriter; import java.io.Writer; import javax.transaction.UserTransaction;
import io.probedock.jee.itf.model.*; import java.io.*; import javax.transaction.*;
[ "io.probedock.jee", "java.io", "javax.transaction" ]
io.probedock.jee; java.io; javax.transaction;
610,396
private void addEntry(ContactsExampleParameters parameters) throws IOException, ServiceException { if (parameters.isGroupFeed()) { ContactGroupEntry addedGroup = service.insert(feedUrl, buildGroup(parameters)); printGroup(addedGroup); lastAddedId = addedGroup.getId(); } else...
void function(ContactsExampleParameters parameters) throws IOException, ServiceException { if (parameters.isGroupFeed()) { ContactGroupEntry addedGroup = service.insert(feedUrl, buildGroup(parameters)); printGroup(addedGroup); lastAddedId = addedGroup.getId(); } else { ContactEntry addedContact = service.insert(feedUrl...
/** * Adds contact or group entry according to the parameters specified. * * @param parameters parameters for contact adding */
Adds contact or group entry according to the parameters specified
addEntry
{ "repo_name": "simonrrr/gdata-java-client", "path": "java/sample/contacts/ContactsExample.java", "license": "apache-2.0", "size": 21759 }
[ "com.google.gdata.data.contacts.ContactEntry", "com.google.gdata.data.contacts.ContactGroupEntry", "com.google.gdata.util.ServiceException", "java.io.IOException" ]
import com.google.gdata.data.contacts.ContactEntry; import com.google.gdata.data.contacts.ContactGroupEntry; import com.google.gdata.util.ServiceException; import java.io.IOException;
import com.google.gdata.data.contacts.*; import com.google.gdata.util.*; import java.io.*;
[ "com.google.gdata", "java.io" ]
com.google.gdata; java.io;
1,886,970
List<? extends Project> getProjects();
List<? extends Project> getProjects();
/** * Returns projects configurations which are related to the devfile, when devfile doesn't contain * projects returns empty list. It is optional, devfile may contain 0 or N project configurations. */
Returns projects configurations which are related to the devfile, when devfile doesn't contain projects returns empty list. It is optional, devfile may contain 0 or N project configurations
getProjects
{ "repo_name": "davidfestal/che", "path": "core/che-core-api-model/src/main/java/org/eclipse/che/api/core/model/workspace/devfile/Devfile.java", "license": "epl-1.0", "size": 1709 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,837,683
public void loadArtistImage(final String key, final ImageView imageView) { loadImage(key, key, null, -1, imageView, ImageType.ARTIST); }
void function(final String key, final ImageView imageView) { loadImage(key, key, null, -1, imageView, ImageType.ARTIST); }
/** * Used to fetch artist images. */
Used to fetch artist images
loadArtistImage
{ "repo_name": "YouKim/ExoPlayer", "path": "twelve/src/main/java/com/dolzzo/twelve/cache/ImageFetcher.java", "license": "apache-2.0", "size": 12176 }
[ "android.widget.ImageView" ]
import android.widget.ImageView;
import android.widget.*;
[ "android.widget" ]
android.widget;
1,520,972
void process(FocusEvent event);
void process(FocusEvent event);
/** * Used to handle {@link FocusEvent}. * * @param event event to handle. */
Used to handle <code>FocusEvent</code>
process
{ "repo_name": "LiquidEngine/legui", "path": "src/main/java/org/liquidengine/legui/listener/FocusEventListener.java", "license": "bsd-3-clause", "size": 370 }
[ "org.liquidengine.legui.event.FocusEvent" ]
import org.liquidengine.legui.event.FocusEvent;
import org.liquidengine.legui.event.*;
[ "org.liquidengine.legui" ]
org.liquidengine.legui;
138,970
public Set<String> getGsiNamesByIndexHashKey(String indexHashKeyName) { Set<String> gsiNames = gsiHashKeyNameToIndexNames.get(indexHashKeyName); if (gsiNames != null) { gsiNames = Collections.unmodifiableSet(gsiNames); } return gsiNames; }
Set<String> function(String indexHashKeyName) { Set<String> gsiNames = gsiHashKeyNameToIndexNames.get(indexHashKeyName); if (gsiNames != null) { gsiNames = Collections.unmodifiableSet(gsiNames); } return gsiNames; }
/** * Returns the names of all the annotated global secondary indexes that * use the given attribute as the index hash key. */
Returns the names of all the annotated global secondary indexes that use the given attribute as the index hash key
getGsiNamesByIndexHashKey
{ "repo_name": "trasa/aws-sdk-java", "path": "aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/datamodeling/DynamoDBTableSchemaParser.java", "license": "apache-2.0", "size": 22973 }
[ "java.util.Collections", "java.util.Set" ]
import java.util.Collections; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
816,977
public TagValue cloneAndRollUp(final UID rolledUpValue) { Preconditions.checkNotNull(rolledUpValue); return new TagValue(this.tag, rolledUpValue); }
TagValue function(final UID rolledUpValue) { Preconditions.checkNotNull(rolledUpValue); return new TagValue(this.tag, rolledUpValue); }
/** * Shallow copy, replacing the value with a reference to the rolled up value * * @param rolledUpValue * @return */
Shallow copy, replacing the value with a reference to the rolled up value
cloneAndRollUp
{ "repo_name": "gchq/stroom-stats", "path": "stroom-stats-model/src/main/java/stroom/stats/streams/TagValue.java", "license": "lgpl-3.0", "size": 4070 }
[ "com.google.common.base.Preconditions" ]
import com.google.common.base.Preconditions;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
594,802
@Nonnull @ReturnsMutableCopy public static <ELEMENTTYPE> Queue <ELEMENTTYPE> newQueue (@Nullable final Enumeration <? extends ELEMENTTYPE> aEnum) { final Queue <ELEMENTTYPE> ret = new PriorityQueue <ELEMENTTYPE> (); if (aEnum != null) while (aEnum.hasMoreElements ()) ret.add (aEnum.nextEle...
static <ELEMENTTYPE> Queue <ELEMENTTYPE> function (@Nullable final Enumeration <? extends ELEMENTTYPE> aEnum) { final Queue <ELEMENTTYPE> ret = new PriorityQueue <ELEMENTTYPE> (); if (aEnum != null) while (aEnum.hasMoreElements ()) ret.add (aEnum.nextElement ()); return ret; }
/** * Compared to {@link Collections#list(Enumeration)} this method is more * flexible in Generics parameter. * * @param <ELEMENTTYPE> * Type of the elements * @param aEnum * The enumeration to be converted * @return The non-<code>null</code> created {@link PriorityQueue}. * @s...
Compared to <code>Collections#list(Enumeration)</code> this method is more flexible in Generics parameter
newQueue
{ "repo_name": "lsimons/phloc-schematron-standalone", "path": "phloc-commons/src/main/java/com/phloc/commons/collections/ContainerHelper.java", "license": "apache-2.0", "size": 126718 }
[ "java.util.Enumeration", "java.util.PriorityQueue", "java.util.Queue", "javax.annotation.Nullable" ]
import java.util.Enumeration; import java.util.PriorityQueue; import java.util.Queue; import javax.annotation.Nullable;
import java.util.*; import javax.annotation.*;
[ "java.util", "javax.annotation" ]
java.util; javax.annotation;
2,364,910
public boolean applyOnDoc(int offset, boolean eat, IDocument doc, int dif, char trigger) throws BadLocationException { boolean doReturn = false; String rep = fReplacementString; int iPar = rep.indexOf('('); if (eat) { //behavior change: when we have a paren...
boolean function(int offset, boolean eat, IDocument doc, int dif, char trigger) throws BadLocationException { boolean doReturn = false; String rep = fReplacementString; int iPar = rep.indexOf('('); if (eat) { if (iPar != -1) { rep = rep.substring(0, iPar); doc.replace(offset - dif, dif + this.fLen, rep); if (!fLastIsPa...
/** * Applies the changes in the document (useful for testing) * * @param offset the offset where the change should be applied * @param eat whether we should 'eat' the selection (on toggle) * @param doc the document where the changes should be applied * @param dif the difference between ...
Applies the changes in the document (useful for testing)
applyOnDoc
{ "repo_name": "bobwalker99/Pydev", "path": "plugins/org.python.pydev/src_completions/org/python/pydev/editor/codecompletion/PyLinkedModeCompletionProposal.java", "license": "epl-1.0", "size": 15414 }
[ "org.eclipse.jface.text.BadLocationException", "org.eclipse.jface.text.IDocument" ]
import org.eclipse.jface.text.BadLocationException; import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.*;
[ "org.eclipse.jface" ]
org.eclipse.jface;
2,434,501
@Test public void testNamespaceUriForRole() { boolean foundType = false; String userCode = "12345"; String userSystem = "1.2.34.56"; String userSystemName = "CANCER-Research"; String userDisplay = "Public Health"; String type = "hl7:CE"; Attribute attribut...
void function() { boolean foundType = false; String userCode = "12345"; String userSystem = STR; String userSystemName = STR; String userDisplay = STR; String type = STR; Attribute attribute = OpenSAML2ComponentBuilder.getInstance().createUserRoleAttribute(userCode, userSystem, userSystemName, userDisplay); List<XMLObj...
/** * Test namespace uri for role. */
Test namespace uri for role
testNamespaceUriForRole
{ "repo_name": "beiyuxinke/CONNECT", "path": "Product/Production/Common/CONNECTCoreLib/src/test/java/gov/hhs/fha/nhinc/callback/openSAML/OpenSAML2ComponentBuilderTest.java", "license": "bsd-3-clause", "size": 5311 }
[ "java.util.List", "javax.xml.namespace.QName", "org.junit.Assert", "org.opensaml.saml2.core.Attribute", "org.opensaml.xml.XMLObject", "org.opensaml.xml.schema.XSAny", "org.opensaml.xml.util.AttributeMap" ]
import java.util.List; import javax.xml.namespace.QName; import org.junit.Assert; import org.opensaml.saml2.core.Attribute; import org.opensaml.xml.XMLObject; import org.opensaml.xml.schema.XSAny; import org.opensaml.xml.util.AttributeMap;
import java.util.*; import javax.xml.namespace.*; import org.junit.*; import org.opensaml.saml2.core.*; import org.opensaml.xml.*; import org.opensaml.xml.schema.*; import org.opensaml.xml.util.*;
[ "java.util", "javax.xml", "org.junit", "org.opensaml.saml2", "org.opensaml.xml" ]
java.util; javax.xml; org.junit; org.opensaml.saml2; org.opensaml.xml;
1,841,099
public void addTemplateResolver(final ITemplateResolver templateResolver) { Validate.notNull(templateResolver, "Template Resolver cannot be null"); checkNotInitialized(); this.templateResolvers.add(templateResolver); } /** * <p> * Sets a single template resolver for this...
void function(final ITemplateResolver templateResolver) { Validate.notNull(templateResolver, STR); checkNotInitialized(); this.templateResolvers.add(templateResolver); } /** * <p> * Sets a single template resolver for this template engine. * </p> * <p> * Calling this method is equivalent to calling {@link #setTemplateR...
/** * <p> * Adds a new template resolver to the current set. * </p> * * @param templateResolver the new template resolver. */
Adds a new template resolver to the current set.
addTemplateResolver
{ "repo_name": "thymeleaf/thymeleaf", "path": "src/main/java/org/thymeleaf/TemplateEngine.java", "license": "apache-2.0", "size": 48382 }
[ "java.util.Set", "org.thymeleaf.templateresolver.ITemplateResolver", "org.thymeleaf.util.Validate" ]
import java.util.Set; import org.thymeleaf.templateresolver.ITemplateResolver; import org.thymeleaf.util.Validate;
import java.util.*; import org.thymeleaf.templateresolver.*; import org.thymeleaf.util.*;
[ "java.util", "org.thymeleaf.templateresolver", "org.thymeleaf.util" ]
java.util; org.thymeleaf.templateresolver; org.thymeleaf.util;
1,894,652
Rectangle compDim = getViewportBorderBounds(); Dimension vertSBDim = fVertSB.getPreferredSize(); Dimension horizSBDim = fHorizSB.getPreferredSize(); Dimension dim = new Dimension(compDim.width + vertSBDim.width, compDim.height + horizSBDim.height); return dim; } ...
Rectangle compDim = getViewportBorderBounds(); Dimension vertSBDim = fVertSB.getPreferredSize(); Dimension horizSBDim = fHorizSB.getPreferredSize(); Dimension dim = new Dimension(compDim.width + vertSBDim.width, compDim.height + horizSBDim.height); return dim; } class SDViewport extends JViewport { JPanel fView; SDView...
/** * Calculates the preferred size of the component. * * @return the calculated preferred size */
Calculates the preferred size of the component
getPreferredSize
{ "repo_name": "vnu-dse/rtl", "path": "src/gui/org/tzi/use/gui/views/seqDiag/SDScrollPane.java", "license": "gpl-2.0", "size": 4309 }
[ "java.awt.Dimension", "java.awt.Rectangle", "javax.swing.JPanel", "javax.swing.JViewport" ]
import java.awt.Dimension; import java.awt.Rectangle; import javax.swing.JPanel; import javax.swing.JViewport;
import java.awt.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
781,037
public CSSStyleSheetImpl merge() { final CSSStyleSheetImpl merged = new CSSStyleSheetImpl(); final CSSRuleListImpl cssRuleList = new CSSRuleListImpl(); final Iterator<CSSStyleSheetImpl> it = getCSSStyleSheets().iterator(); while (it.hasNext()) { final CSSStyleSheetImpl cs...
CSSStyleSheetImpl function() { final CSSStyleSheetImpl merged = new CSSStyleSheetImpl(); final CSSRuleListImpl cssRuleList = new CSSRuleListImpl(); final Iterator<CSSStyleSheetImpl> it = getCSSStyleSheets().iterator(); while (it.hasNext()) { final CSSStyleSheetImpl cssStyleSheet = it.next(); final CSSMediaRuleImpl cssM...
/** * Merges all StyleSheets in this list into one. * * @return the new (merged) StyleSheet */
Merges all StyleSheets in this list into one
merge
{ "repo_name": "oswetto/LoboEvolution", "path": "LoboParser/src/main/java/com/gargoylesoftware/css/dom/CSSStyleSheetListImpl.java", "license": "gpl-3.0", "size": 3478 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
213,300
@Test public void testDeepLinkOldStyle() { registerWebApk(false ); final String deepLinkUrl = "https://pwa.rocks/deep.html"; Intent launchIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(deepLinkUrl)); launchIntent.setPackage(sWebApkPackageName); ArrayList<Intent> laun...
void function() { registerWebApk(false ); final String deepLinkUrl = "https: Intent launchIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(deepLinkUrl)); launchIntent.setPackage(sWebApkPackageName); ArrayList<Intent> launchedIntents = launchAndCheckBrowserLaunched(false , true , launchIntent, H2OTransparentLauncherAct...
/** * Test launching old-style WebAPK via deep link: * Check that: * 1) Chrome is launched. * 2) No activities have been enabled/disabled. */
Test launching old-style WebAPK via deep link: Check that: 1) Chrome is launched. 2) No activities have been enabled/disabled
testDeepLinkOldStyle
{ "repo_name": "endlessm/chromium-browser", "path": "chrome/android/webapk/shell_apk/junit/src/org/chromium/webapk/shell_apk/h2o/LaunchTest.java", "license": "bsd-3-clause", "size": 32250 }
[ "android.content.Intent", "android.net.Uri", "java.util.ArrayList", "org.junit.Assert" ]
import android.content.Intent; import android.net.Uri; import java.util.ArrayList; import org.junit.Assert;
import android.content.*; import android.net.*; import java.util.*; import org.junit.*;
[ "android.content", "android.net", "java.util", "org.junit" ]
android.content; android.net; java.util; org.junit;
2,894,518
public void isUcoreInit(com.actiontech.dble.alarm.UcoreInterface.Empty request, io.grpc.stub.StreamObserver<com.actiontech.dble.alarm.UcoreInterface.Empty> responseObserver) { asyncUnimplementedUnaryCall(METHOD_IS_UCORE_INIT, responseObserver); }
void function(com.actiontech.dble.alarm.UcoreInterface.Empty request, io.grpc.stub.StreamObserver<com.actiontech.dble.alarm.UcoreInterface.Empty> responseObserver) { asyncUnimplementedUnaryCall(METHOD_IS_UCORE_INIT, responseObserver); }
/** * <pre> * IsUcoreInit returns if consul is started. * </pre> */
<code> IsUcoreInit returns if consul is started. </code>
isUcoreInit
{ "repo_name": "actiontech/dble", "path": "src/main/java/com/actiontech/dble/alarm/UcoreGrpc.java", "license": "gpl-2.0", "size": 134635 }
[ "io.grpc.stub.ServerCalls" ]
import io.grpc.stub.ServerCalls;
import io.grpc.stub.*;
[ "io.grpc.stub" ]
io.grpc.stub;
1,859,849
private boolean isReferredNodeInSiblingListProcessed(YangNode potentialReferredNode) throws DataModelException { while (potentialReferredNode != null) { // Check if the potential referred node is the actual referred node if (isReferredNode(potentialReferredNode)) { ...
boolean function(YangNode potentialReferredNode) throws DataModelException { while (potentialReferredNode != null) { if (isReferredNode(potentialReferredNode)) { addReferredEntityLink(potentialReferredNode, LINKED); addUnresolvedRecursiveReferenceToStack(potentialReferredNode); return true; } potentialReferredNode = po...
/** * Checks for the referred node defined in a ancestor scope. * * @param potentialReferredNode potential referred node * @return status of resolution and updating the partial resolved stack with * the any recursive references * @throws DataModelException a violation of data model rules ...
Checks for the referred node defined in a ancestor scope
isReferredNodeInSiblingListProcessed
{ "repo_name": "VinodKumarS-Huawei/ietf96yang", "path": "utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/linker/impl/YangResolutionInfoImpl.java", "license": "apache-2.0", "size": 80538 }
[ "org.onosproject.yangutils.datamodel.YangNode", "org.onosproject.yangutils.datamodel.exceptions.DataModelException" ]
import org.onosproject.yangutils.datamodel.YangNode; import org.onosproject.yangutils.datamodel.exceptions.DataModelException;
import org.onosproject.yangutils.datamodel.*; import org.onosproject.yangutils.datamodel.exceptions.*;
[ "org.onosproject.yangutils" ]
org.onosproject.yangutils;
751,327
public NamedSort getContainerNamedSort() { return item.getContainerNamedSort(); }
NamedSort function() { return item.getContainerNamedSort(); }
/** * Return the encapsulate Low Level API object. */
Return the encapsulate Low Level API object
getContainerNamedSort
{ "repo_name": "lhillah/pnmlframework", "path": "pnmlFw-PT-HLPNG/src/fr/lip6/move/pnml/pthlpng/booleans/hlapi/BoolHLAPI.java", "license": "epl-1.0", "size": 13213 }
[ "fr.lip6.move.pnml.pthlpng.terms.NamedSort" ]
import fr.lip6.move.pnml.pthlpng.terms.NamedSort;
import fr.lip6.move.pnml.pthlpng.terms.*;
[ "fr.lip6.move" ]
fr.lip6.move;
522,793
@Test(expected = BgpParseException.class) public void bgpUpdateMessageTest14() throws BgpParseException { byte[] updateMsg = new byte[] {(byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0...
@Test(expected = BgpParseException.class) void function() throws BgpParseException { byte[] updateMsg = new byte[] {(byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0x...
/** * In this test case, Invalid MP reach flags is given as input and expecting * an exception. */
In this test case, Invalid MP reach flags is given as input and expecting an exception
bgpUpdateMessageTest14
{ "repo_name": "sonu283304/onos", "path": "protocols/bgp/bgpio/src/test/java/org/onosproject/bgpio/protocol/BgpUpdateMsgTest.java", "license": "apache-2.0", "size": 100189 }
[ "org.hamcrest.MatcherAssert", "org.hamcrest.Matchers", "org.jboss.netty.buffer.ChannelBuffer", "org.jboss.netty.buffer.ChannelBuffers", "org.junit.Test", "org.onosproject.bgpio.exceptions.BgpParseException", "org.onosproject.bgpio.types.BgpHeader" ]
import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; import org.jboss.netty.buffer.ChannelBuffer; import org.jboss.netty.buffer.ChannelBuffers; import org.junit.Test; import org.onosproject.bgpio.exceptions.BgpParseException; import org.onosproject.bgpio.types.BgpHeader;
import org.hamcrest.*; import org.jboss.netty.buffer.*; import org.junit.*; import org.onosproject.bgpio.exceptions.*; import org.onosproject.bgpio.types.*;
[ "org.hamcrest", "org.jboss.netty", "org.junit", "org.onosproject.bgpio" ]
org.hamcrest; org.jboss.netty; org.junit; org.onosproject.bgpio;
2,701,993
DataSourcePropertiesInterface getDataConnectorProperties();
DataSourcePropertiesInterface getDataConnectorProperties();
/** * Gets the data connector properties. * * @return the data connector properties */
Gets the data connector properties
getDataConnectorProperties
{ "repo_name": "robward-scisys/sldeditor", "path": "modules/application/src/main/java/com/sldeditor/datasource/DataSourceInterface.java", "license": "gpl-3.0", "size": 5451 }
[ "com.sldeditor.common.DataSourcePropertiesInterface" ]
import com.sldeditor.common.DataSourcePropertiesInterface;
import com.sldeditor.common.*;
[ "com.sldeditor.common" ]
com.sldeditor.common;
133,086
public void execute(MinecraftServer server, ICommandSender sender, String[] args) throws CommandException { if (args.length <= 0) { throw new WrongUsageException("commands.gamemode.usage", new Object[0]); } else { GameType gametype = this.g...
void function(MinecraftServer server, ICommandSender sender, String[] args) throws CommandException { if (args.length <= 0) { throw new WrongUsageException(STR, new Object[0]); } else { GameType gametype = this.getGameModeFromCommand(sender, args[0]); EntityPlayer entityplayer = args.length >= 2 ? getPlayer(server, sen...
/** * Callback for when the command is executed */
Callback for when the command is executed
execute
{ "repo_name": "lucemans/ShapeClient-SRC", "path": "net/minecraft/command/CommandGameMode.java", "license": "mpl-2.0", "size": 3454 }
[ "net.minecraft.entity.player.EntityPlayer", "net.minecraft.server.MinecraftServer", "net.minecraft.util.text.ITextComponent", "net.minecraft.util.text.TextComponentTranslation", "net.minecraft.world.GameType" ]
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.server.MinecraftServer; import net.minecraft.util.text.ITextComponent; import net.minecraft.util.text.TextComponentTranslation; import net.minecraft.world.GameType;
import net.minecraft.entity.player.*; import net.minecraft.server.*; import net.minecraft.util.text.*; import net.minecraft.world.*;
[ "net.minecraft.entity", "net.minecraft.server", "net.minecraft.util", "net.minecraft.world" ]
net.minecraft.entity; net.minecraft.server; net.minecraft.util; net.minecraft.world;
742,563
@DELETE @Path("{path:.*}") @Produces(MediaType.APPLICATION_JSON + "; " + JettyUtils.UTF_8) public Response delete(@PathParam("path") String path, @QueryParam(OperationParam.NAME) OperationParam op, @Context Parameters params, @Context Ht...
@Path(STR) @Produces(MediaType.APPLICATION_JSON + STR + JettyUtils.UTF_8) Response function(@PathParam("path") String path, @QueryParam(OperationParam.NAME) OperationParam op, @Context Parameters params, @Context HttpServletRequest request) throws IOException, FileSystemAccessException { UserGroupInformation user = Htt...
/** * Binding to handle DELETE requests. * * @param path the path for operation. * @param op the HttpFS operation of the request. * @param params the HttpFS parameters of the request. * * @return the request response. * * @throws IOException thrown if an IO error occurred. Thrown exceptions a...
Binding to handle DELETE requests
delete
{ "repo_name": "GeLiXin/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/server/HttpFSServer.java", "license": "apache-2.0", "size": 32840 }
[ "java.io.IOException", "java.text.MessageFormat", "javax.servlet.http.HttpServletRequest", "javax.ws.rs.Path", "javax.ws.rs.PathParam", "javax.ws.rs.Produces", "javax.ws.rs.QueryParam", "javax.ws.rs.core.Context", "javax.ws.rs.core.MediaType", "javax.ws.rs.core.Response", "org.apache.hadoop.fs.h...
import java.io.IOException; import java.text.MessageFormat; import javax.servlet.http.HttpServletRequest; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Respons...
import java.io.*; import java.text.*; import javax.servlet.http.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import org.apache.hadoop.fs.http.client.*; import org.apache.hadoop.fs.http.server.*; import org.apache.hadoop.http.*; import org.apache.hadoop.lib.service.*; import org.apache.hadoop.lib.wsrs.*; import o...
[ "java.io", "java.text", "javax.servlet", "javax.ws", "org.apache.hadoop", "org.json.simple", "org.slf4j" ]
java.io; java.text; javax.servlet; javax.ws; org.apache.hadoop; org.json.simple; org.slf4j;
314,870
protected void workspaceAdded( String workspaceName ) { String workspaceKey = NodeKey.keyForWorkspaceName(workspaceName); if (systemWorkspaceKey.equals(workspaceKey)) { // No sequencers for the system workspace! return; } Collection<SequencingConfiguration> co...
void function( String workspaceName ) { String workspaceKey = NodeKey.keyForWorkspaceName(workspaceName); if (systemWorkspaceKey.equals(workspaceKey)) { return; } Collection<SequencingConfiguration> configs = new LinkedList<SequencingConfiguration>(); for (Sequencer sequencer : sequencersById.values()) { boolean update...
/** * Signal that a new workspace was added. * * @param workspaceName the workspace name; may not be null */
Signal that a new workspace was added
workspaceAdded
{ "repo_name": "stemig62/modeshape", "path": "modeshape-jcr/src/main/java/org/modeshape/jcr/Sequencers.java", "license": "apache-2.0", "size": 32293 }
[ "java.util.Collection", "java.util.HashMap", "java.util.LinkedList", "java.util.Map", "org.modeshape.jcr.api.sequencer.Sequencer", "org.modeshape.jcr.cache.NodeKey", "org.modeshape.jcr.sequencer.SequencerPathExpression" ]
import java.util.Collection; import java.util.HashMap; import java.util.LinkedList; import java.util.Map; import org.modeshape.jcr.api.sequencer.Sequencer; import org.modeshape.jcr.cache.NodeKey; import org.modeshape.jcr.sequencer.SequencerPathExpression;
import java.util.*; import org.modeshape.jcr.api.sequencer.*; import org.modeshape.jcr.cache.*; import org.modeshape.jcr.sequencer.*;
[ "java.util", "org.modeshape.jcr" ]
java.util; org.modeshape.jcr;
2,745,237
public SecurityAttributes getSecurityAttributes() { return (_securityAttributes); } public static class Builder implements IBuilder, Serializable { private static final long serialVersionUID = 7851044806424206976L; private List<RequesterInfo.Builder> _requesterInfos; private List<Addressee.Builde...
SecurityAttributes function() { return (_securityAttributes); } public static class Builder implements IBuilder, Serializable { private static final long serialVersionUID = 7851044806424206976L; private List<RequesterInfo.Builder> _requesterInfos; private List<Addressee.Builder> _addressees; private Description.Builder...
/** * Accessor for the Security Attributes. Will always be non-null even if the attributes are not set. */
Accessor for the Security Attributes. Will always be non-null even if the attributes are not set
getSecurityAttributes
{ "repo_name": "imintel/ddmsence", "path": "src/main/java/buri/ddmsence/ddms/resource/TaskingInfo.java", "license": "lgpl-3.0", "size": 12370 }
[ "java.io.Serializable", "java.util.List" ]
import java.io.Serializable; import java.util.List;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
590,037
public Observable<ServiceResponse<Page<VirtualWANInner>>> listNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); }
Observable<ServiceResponse<Page<VirtualWANInner>>> function(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException(STR); }
/** * Lists all the VirtualWANs in a subscription. * ServiceResponse<PageImpl<VirtualWANInner>> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList&lt;VirtualWA...
Lists all the VirtualWANs in a subscription
listNextSinglePageAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/VirtualWansInner.java", "license": "mit", "size": 72604 }
[ "com.microsoft.azure.Page", "com.microsoft.rest.ServiceResponse" ]
import com.microsoft.azure.Page; import com.microsoft.rest.ServiceResponse;
import com.microsoft.azure.*; import com.microsoft.rest.*;
[ "com.microsoft.azure", "com.microsoft.rest" ]
com.microsoft.azure; com.microsoft.rest;
743,524
public ServiceFuture<PacketCaptureResultInner> createAsync(String resourceGroupName, String networkWatcherName, String packetCaptureName, PacketCaptureInner parameters, final ServiceCallback<PacketCaptureResultInner> serviceCallback) { return ServiceFuture.fromResponse(createWithServiceResponseAsync(resourc...
ServiceFuture<PacketCaptureResultInner> function(String resourceGroupName, String networkWatcherName, String packetCaptureName, PacketCaptureInner parameters, final ServiceCallback<PacketCaptureResultInner> serviceCallback) { return ServiceFuture.fromResponse(createWithServiceResponseAsync(resourceGroupName, networkWat...
/** * Create and start a packet capture on the specified VM. * * @param resourceGroupName The name of the resource group. * @param networkWatcherName The name of the network watcher. * @param packetCaptureName The name of the packet capture session. * @param parameters Parameters that defi...
Create and start a packet capture on the specified VM
createAsync
{ "repo_name": "hovsepm/azure-sdk-for-java", "path": "network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/PacketCapturesInner.java", "license": "mit", "size": 59855 }
[ "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
880,574
private Supplier<Iterator<Node>> asNodeSupplierOfNewContents( final Supplier<Iterator<DiffEntry>> supplier, final List<String> strippedPathFilters) {
Supplier<Iterator<Node>> function( final Supplier<Iterator<DiffEntry>> supplier, final List<String> strippedPathFilters) {
/** * Transforms a {@code Supplier<DiffEntry>} to a {@code Supplier<Node>} with the * {@link DiffEntry#getNewObject() new nodes} of entries that represent changes or additions. * * @param strippedPathFilters */
Transforms a Supplier to a Supplier with the <code>DiffEntry#getNewObject() new nodes</code> of entries that represent changes or additions
asNodeSupplierOfNewContents
{ "repo_name": "markles/GeoGit", "path": "src/core/src/main/java/org/geogit/api/plumbing/WriteTree2.java", "license": "bsd-3-clause", "size": 21733 }
[ "com.google.common.base.Supplier", "java.util.Iterator", "java.util.List", "org.geogit.api.Node", "org.geogit.api.plumbing.diff.DiffEntry" ]
import com.google.common.base.Supplier; import java.util.Iterator; import java.util.List; import org.geogit.api.Node; import org.geogit.api.plumbing.diff.DiffEntry;
import com.google.common.base.*; import java.util.*; import org.geogit.api.*; import org.geogit.api.plumbing.diff.*;
[ "com.google.common", "java.util", "org.geogit.api" ]
com.google.common; java.util; org.geogit.api;
593,121
protected final Map<String, InterfaceParameter> getUsingParamMap() { return mNameToUsingParamMap; }
final Map<String, InterfaceParameter> function() { return mNameToUsingParamMap; }
/** * Gets this statement's map of parameter names to using parameters. * @return */
Gets this statement's map of parameter names to using parameters
getUsingParamMap
{ "repo_name": "Fivium/FOXopen", "path": "src/main/java/net/foxopen/fox/dbinterface/InterfaceStatement.java", "license": "gpl-3.0", "size": 18260 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
623,973
public static void e(String tag, String msg) { if (logLevel <= ERROR && showLog) { Log.e(tag, msg); } }
static void function(String tag, String msg) { if (logLevel <= ERROR && showLog) { Log.e(tag, msg); } }
/** * Send an {@link #ERROR} log message. * * @param tag Used to identify the source of a log message. It usually * identifies the class or activity where the log call occurs. * @param msg The message you would like logged. */
Send an <code>#ERROR</code> log message
e
{ "repo_name": "ypochien/ReturnTrue", "path": "Android/app/src/main/java/com/returntrue/util/JLog.java", "license": "mit", "size": 7320 }
[ "android.util.Log" ]
import android.util.Log;
import android.util.*;
[ "android.util" ]
android.util;
2,211,752
ChainResult calculateOutputHash(long level) throws KSIException;
ChainResult calculateOutputHash(long level) throws KSIException;
/** * Calculates the aggregation hash chain output hash. */
Calculates the aggregation hash chain output hash
calculateOutputHash
{ "repo_name": "GuardTime/ksi-java-sdk", "path": "ksi-api/src/main/java/com/guardtime/ksi/unisignature/AggregationHashChain.java", "license": "apache-2.0", "size": 2883 }
[ "com.guardtime.ksi.exceptions.KSIException" ]
import com.guardtime.ksi.exceptions.KSIException;
import com.guardtime.ksi.exceptions.*;
[ "com.guardtime.ksi" ]
com.guardtime.ksi;
1,326,112
private static byte[] intToBytes(int i) { return ByteBuffer.allocate(4).putInt(i).array(); }
static byte[] function(int i) { return ByteBuffer.allocate(4).putInt(i).array(); }
/** * get representation on memory for i * * @param i * @return */
get representation on memory for i
intToBytes
{ "repo_name": "t-lou/JSudokuSolver", "path": "src/NN/NeuralNetworkStorage.java", "license": "apache-2.0", "size": 4959 }
[ "java.nio.ByteBuffer" ]
import java.nio.ByteBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
2,476,296
private void checkForConflicts(Rule rule) throws NameConflictException, InterruptedException { String name = rule.getName(); Target existing = targets.get(name); if (existing != null) { throw nameConflict(rule, existing); } Map<String, OutputFile> outputFiles = new HashMap<>();...
void function(Rule rule) throws NameConflictException, InterruptedException { String name = rule.getName(); Target existing = targets.get(name); if (existing != null) { throw nameConflict(rule, existing); } Map<String, OutputFile> outputFiles = new HashMap<>(); for (OutputFile outputFile : rule.getOutputFiles()) { Stri...
/** * Precondition check for addRule. We must maintain these invariants of the package: * * <ul> * <li>Each name refers to at most one target. * <li>No rule with errors is inserted into the package. * <li>The generating rule of every output file in the package must itself be in the package...
Precondition check for addRule. We must maintain these invariants of the package: Each name refers to at most one target. No rule with errors is inserted into the package. The generating rule of every output file in the package must itself be in the package.
checkForConflicts
{ "repo_name": "UrbanCompass/bazel", "path": "src/main/java/com/google/devtools/build/lib/packages/Package.java", "license": "apache-2.0", "size": 52858 }
[ "com.google.devtools.build.lib.vfs.PathFragment", "java.util.HashMap", "java.util.Map" ]
import com.google.devtools.build.lib.vfs.PathFragment; import java.util.HashMap; import java.util.Map;
import com.google.devtools.build.lib.vfs.*; import java.util.*;
[ "com.google.devtools", "java.util" ]
com.google.devtools; java.util;
2,437,507
public SqlType findColumnType( Class<?> klass ) { return ClassSqltypeIndicator.$.getSqlType( klass, table.getEnvironmentId() ); }
SqlType function( Class<?> klass ) { return ClassSqltypeIndicator.$.getSqlType( klass, table.getEnvironmentId() ); }
/** * get SqlType for column creation * * @param klass matched class * @return SqlType */
get SqlType for column creation
findColumnType
{ "repo_name": "NyBatis/NyBatisCore", "path": "src/main/java/org/nybatis/core/db/sql/orm/vo/TableColumn.java", "license": "apache-2.0", "size": 8216 }
[ "org.nybatis.core.db.sql.mapper.SqlType", "org.nybatis.core.db.sql.orm.indicator.klass.ClassSqltypeIndicator" ]
import org.nybatis.core.db.sql.mapper.SqlType; import org.nybatis.core.db.sql.orm.indicator.klass.ClassSqltypeIndicator;
import org.nybatis.core.db.sql.mapper.*; import org.nybatis.core.db.sql.orm.indicator.klass.*;
[ "org.nybatis.core" ]
org.nybatis.core;
1,434,485
void put(String id, byte[] data) throws IOException;
void put(String id, byte[] data) throws IOException;
/** * Put some datas in cache. * * @param id the key id of the data * @param data the data to cache * @throws IOException if an IO error occurs while caching the data */
Put some datas in cache
put
{ "repo_name": "luozheng1985/Android-Animexxenger", "path": "src/de/meisterfuu/animexxenger/smack/avatar/AvatarCache.java", "license": "gpl-3.0", "size": 2821 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
919,522
ServiceResponse<DateTime> getOverflow() throws ErrorException, IOException;
ServiceResponse<DateTime> getOverflow() throws ErrorException, IOException;
/** * Get overflow datetime value. * * @throws ErrorException exception thrown from REST call * @throws IOException exception thrown from serialization/deserialization * @return the DateTime object wrapped in {@link ServiceResponse} if successful. */
Get overflow datetime value
getOverflow
{ "repo_name": "sharadagarwal/autorest", "path": "AutoRest/Generators/Java/Java.Tests/src/main/java/fixtures/bodydatetimerfc1123/Datetimerfc1123Operations.java", "license": "mit", "size": 8327 }
[ "com.microsoft.rest.ServiceResponse", "java.io.IOException", "org.joda.time.DateTime" ]
import com.microsoft.rest.ServiceResponse; import java.io.IOException; import org.joda.time.DateTime;
import com.microsoft.rest.*; import java.io.*; import org.joda.time.*;
[ "com.microsoft.rest", "java.io", "org.joda.time" ]
com.microsoft.rest; java.io; org.joda.time;
2,031,978
Query qry = null; if (searchTerm.equals("*")) { qry = new MatchAllDocsQuery(); } else { // Search in all indexed fields IndexReaderAccessor readerAccessor = null; IndexReader reader = null; try { FullTextSession txtSession = S...
Query qry = null; if (searchTerm.equals("*")) { qry = new MatchAllDocsQuery(); } else { IndexReaderAccessor readerAccessor = null; IndexReader reader = null; try { FullTextSession txtSession = Search.getFullTextSession(sess); Analyzer analyzer; if (searchedEntity == null) { analyzer = defaultAnalyzer; } else { analyzer...
/** * Generates a lucene query to search for a given term in all the indexed fields of a class * * @param searchTerm the term to search for * @param searchedEntity the class searched * @param sess the hibernate session * @param defaultAnalyzer the default analyzer for parsing the search te...
Generates a lucene query to search for a given term in all the indexed fields of a class
generateQuery
{ "repo_name": "deng947/nbstudio", "path": "src/main/java/com/cb/dao/hibernate/HibernateSearchTools.java", "license": "apache-2.0", "size": 5088 }
[ "java.util.Collection", "java.util.HashSet", "org.apache.lucene.analysis.Analyzer", "org.apache.lucene.index.FieldInfo", "org.apache.lucene.index.IndexReader", "org.apache.lucene.queryParser.MultiFieldQueryParser", "org.apache.lucene.search.MatchAllDocsQuery", "org.apache.lucene.search.Query", "org....
import java.util.Collection; import java.util.HashSet; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.index.FieldInfo; import org.apache.lucene.index.IndexReader; import org.apache.lucene.queryParser.MultiFieldQueryParser; import org.apache.lucene.search.MatchAllDocsQuery; import org.apache.lucene...
import java.util.*; import org.apache.lucene.*; import org.apache.lucene.analysis.*; import org.apache.lucene.index.*; import org.apache.lucene.search.*; import org.apache.lucene.util.*; import org.hibernate.search.*; import org.hibernate.search.indexes.*;
[ "java.util", "org.apache.lucene", "org.hibernate.search" ]
java.util; org.apache.lucene; org.hibernate.search;
315,964
public static void addSpringLibraries(WebArchive archive) { archive.addAsLibraries(resolveSpringDependencies(getSpringVersion())); }
static void function(WebArchive archive) { archive.addAsLibraries(resolveSpringDependencies(getSpringVersion())); }
/** * Adds Spring libraries and its dependencied into webarchove * * @param archive */
Adds Spring libraries and its dependencied into webarchove
addSpringLibraries
{ "repo_name": "awhitford/Resteasy", "path": "testsuite/arquillian-utils/src/main/java/org/jboss/resteasy/utils/TestUtilSpring.java", "license": "apache-2.0", "size": 2332 }
[ "org.jboss.shrinkwrap.api.spec.WebArchive" ]
import org.jboss.shrinkwrap.api.spec.WebArchive;
import org.jboss.shrinkwrap.api.spec.*;
[ "org.jboss.shrinkwrap" ]
org.jboss.shrinkwrap;
1,344,539
public void buildLegacyFeatureConfig() { LegacyFeatureConfig legacyFeatureConfig; OMElement legacyFeaturesConfigElement = this.getConfigElement(IdentityConstants.LegacyFeatureConfigElements.LEGACY_FEATURE_CONFIG); if (legacyFeaturesConfigElement != null) { int l...
void function() { LegacyFeatureConfig legacyFeatureConfig; OMElement legacyFeaturesConfigElement = this.getConfigElement(IdentityConstants.LegacyFeatureConfigElements.LEGACY_FEATURE_CONFIG); if (legacyFeaturesConfigElement != null) { int legacyFeaturesConfigElementIndex = 0; Iterator<OMElement> legacyFeatures = legacyF...
/** * Build legacy feature config by adding the configs to legacyFeatureConfigurationHolder Map. */
Build legacy feature config by adding the configs to legacyFeatureConfigurationHolder Map
buildLegacyFeatureConfig
{ "repo_name": "omindu/carbon-identity-framework", "path": "components/identity-core/org.wso2.carbon.identity.core/src/main/java/org/wso2/carbon/identity/core/util/IdentityConfigParser.java", "license": "apache-2.0", "size": 29853 }
[ "java.util.Iterator", "org.apache.axiom.om.OMElement", "org.apache.commons.lang.StringUtils", "org.wso2.carbon.identity.base.IdentityConstants", "org.wso2.carbon.identity.core.model.LegacyFeatureConfig" ]
import java.util.Iterator; import org.apache.axiom.om.OMElement; import org.apache.commons.lang.StringUtils; import org.wso2.carbon.identity.base.IdentityConstants; import org.wso2.carbon.identity.core.model.LegacyFeatureConfig;
import java.util.*; import org.apache.axiom.om.*; import org.apache.commons.lang.*; import org.wso2.carbon.identity.base.*; import org.wso2.carbon.identity.core.model.*;
[ "java.util", "org.apache.axiom", "org.apache.commons", "org.wso2.carbon" ]
java.util; org.apache.axiom; org.apache.commons; org.wso2.carbon;
2,607,928
protected ContractsAndGrantsBillingAward retrieveAward(String proposalNumber) { Map<String, Object> map = new HashMap<>(); map.put(KFSPropertyConstants.PROPOSAL_NUMBER, proposalNumber); ContractsAndGrantsBillingAward awd = SpringContext.getBean(KualiModuleService.class).getResponsibleModuleS...
ContractsAndGrantsBillingAward function(String proposalNumber) { Map<String, Object> map = new HashMap<>(); map.put(KFSPropertyConstants.PROPOSAL_NUMBER, proposalNumber); ContractsAndGrantsBillingAward awd = SpringContext.getBean(KualiModuleService.class).getResponsibleModuleService(ContractsAndGrantsBillingAward.class...
/** * Retrieves an award based on proposal number * * @param proposalNumber the proposal number to look up the award for * @return the award */
Retrieves an award based on proposal number
retrieveAward
{ "repo_name": "quikkian-ua-devops/will-financials", "path": "kfs-ar/src/main/java/org/kuali/kfs/module/ar/document/service/impl/ContractsGrantsLetterOfCreditReviewDocumentServiceImpl.java", "license": "agpl-3.0", "size": 11475 }
[ "java.util.HashMap", "java.util.Map", "org.kuali.kfs.integration.cg.ContractsAndGrantsBillingAward", "org.kuali.kfs.krad.service.KualiModuleService", "org.kuali.kfs.sys.KFSPropertyConstants", "org.kuali.kfs.sys.context.SpringContext" ]
import java.util.HashMap; import java.util.Map; import org.kuali.kfs.integration.cg.ContractsAndGrantsBillingAward; import org.kuali.kfs.krad.service.KualiModuleService; import org.kuali.kfs.sys.KFSPropertyConstants; import org.kuali.kfs.sys.context.SpringContext;
import java.util.*; import org.kuali.kfs.integration.cg.*; import org.kuali.kfs.krad.service.*; import org.kuali.kfs.sys.*; import org.kuali.kfs.sys.context.*;
[ "java.util", "org.kuali.kfs" ]
java.util; org.kuali.kfs;
1,549,106
@Test public void testScenario2() throws Exception { InterestCalculationRequest request = new InterestCalculationRequest(); request.setInterestCalculatedToDate(new DateTime(2009, 12, 9, 0, 0).toDate()); List<ExtendedServicePeriod> extendedServicePeriods = new ArrayList<ExtendedServicePer...
void function() throws Exception { InterestCalculationRequest request = new InterestCalculationRequest(); request.setInterestCalculatedToDate(new DateTime(2009, 12, 9, 0, 0).toDate()); List<ExtendedServicePeriod> extendedServicePeriods = new ArrayList<ExtendedServicePeriod>(); ExtendedServicePeriod extendedServicePerio...
/** * Ret Scenario- CSRS mixed red and dep.pdf * * @throws Exception * to JUnit. */
Ret Scenario- CSRS mixed red and dep.pdf
testScenario2
{ "repo_name": "NASA-Tournament-Lab/CoECI-OPM-Service-Credit-Redeposit-Deposit-Application", "path": "Code/SCRD_BRE/src/java/tests/gov/opm/scrd/InterestTest.java", "license": "apache-2.0", "size": 87229 }
[ "gov.opm.scrd.TestsHelper", "gov.opm.scrd.entities.application.ExtendedServicePeriod", "gov.opm.scrd.entities.application.InterestCalculationRequest", "gov.opm.scrd.entities.application.InterestCalculationResponse", "java.math.BigDecimal", "java.util.ArrayList", "java.util.List", "junit.framework.Asse...
import gov.opm.scrd.TestsHelper; import gov.opm.scrd.entities.application.ExtendedServicePeriod; import gov.opm.scrd.entities.application.InterestCalculationRequest; import gov.opm.scrd.entities.application.InterestCalculationResponse; import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; impo...
import gov.opm.scrd.*; import gov.opm.scrd.entities.application.*; import java.math.*; import java.util.*; import junit.framework.*; import org.joda.time.*;
[ "gov.opm.scrd", "java.math", "java.util", "junit.framework", "org.joda.time" ]
gov.opm.scrd; java.math; java.util; junit.framework; org.joda.time;
790,112
if (event.getHandlers().getRegisteredListeners().length == 0) { return event; } Server server = ServerProvider.getServer(); if (event.isAsynchronous()) { server.getPluginManager().callEvent(event); return event; } else { FutureTask<T> task ...
if (event.getHandlers().getRegisteredListeners().length == 0) { return event; } Server server = ServerProvider.getServer(); if (event.isAsynchronous()) { server.getPluginManager().callEvent(event); return event; } else { FutureTask<T> task = new FutureTask<>( () -> server.getPluginManager().callEvent(event), event); Bu...
/** * Calls an event through the plugin manager. * * @param event The event to throw. * @param <T> The type of the event. * @return the called event */
Calls an event through the plugin manager
callEvent
{ "repo_name": "GlowstoneMC/GlowstonePlusPlus", "path": "src/main/java/net/glowstone/EventFactory.java", "license": "mit", "size": 11232 }
[ "java.util.concurrent.CancellationException", "java.util.concurrent.ExecutionException", "java.util.concurrent.FutureTask", "net.glowstone.i18n.ConsoleMessages", "net.glowstone.scheduler.GlowScheduler", "org.bukkit.Server", "org.bukkit.event.Event", "org.bukkit.scheduler.BukkitScheduler" ]
import java.util.concurrent.CancellationException; import java.util.concurrent.ExecutionException; import java.util.concurrent.FutureTask; import net.glowstone.i18n.ConsoleMessages; import net.glowstone.scheduler.GlowScheduler; import org.bukkit.Server; import org.bukkit.event.Event; import org.bukkit.scheduler.BukkitS...
import java.util.concurrent.*; import net.glowstone.i18n.*; import net.glowstone.scheduler.*; import org.bukkit.*; import org.bukkit.event.*; import org.bukkit.scheduler.*;
[ "java.util", "net.glowstone.i18n", "net.glowstone.scheduler", "org.bukkit", "org.bukkit.event", "org.bukkit.scheduler" ]
java.util; net.glowstone.i18n; net.glowstone.scheduler; org.bukkit; org.bukkit.event; org.bukkit.scheduler;
2,674,815
public ScheduleExpression start(Date start) { _start = start; return this; }
ScheduleExpression function(Date start) { _start = start; return this; }
/** * Sets the start date for this schedule. * * @param start * Start date of this schedule. * @return Reference to the current object (this) for method chaining. */
Sets the start date for this schedule
start
{ "repo_name": "christianchristensen/resin", "path": "modules/ejb/src/javax/ejb/ScheduleExpression.java", "license": "gpl-2.0", "size": 8918 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,880,391
switch (symbol.getType()) { case PathSymbol: draw((PathSymbol) symbol, canvas, color, position, scaling); break; case WarningSymbol: draw((WarningSymbol) symbol, canvas, color, position, scaling); break; } }
switch (symbol.getType()) { case PathSymbol: draw((PathSymbol) symbol, canvas, color, position, scaling); break; case WarningSymbol: draw((WarningSymbol) symbol, canvas, color, position, scaling); break; } }
/** * Draws the given {@link Symbol} on the given canvas * with the given color at the given position and the given scaling. */
Draws the given <code>Symbol</code> on the given canvas with the given color at the given position and the given scaling
draw
{ "repo_name": "Xenoage/Zong", "path": "renderer/src/com/xenoage/zong/renderer/symbol/SymbolsRenderer.java", "license": "agpl-3.0", "size": 1618 }
[ "com.xenoage.zong.symbols.PathSymbol", "com.xenoage.zong.symbols.WarningSymbol" ]
import com.xenoage.zong.symbols.PathSymbol; import com.xenoage.zong.symbols.WarningSymbol;
import com.xenoage.zong.symbols.*;
[ "com.xenoage.zong" ]
com.xenoage.zong;
1,233,229
public int padCount(byte[] in) throws InvalidCipherTextException;
int function(byte[] in) throws InvalidCipherTextException;
/** * return the number of pad bytes present in the block. * * @param in * Block * @return * Number of pad bytes in the block * @throws InvalidCipherTextException if the padding is badly formed * or invalid. */
return the number of pad bytes present in the block
padCount
{ "repo_name": "mdippery/snodes", "path": "src/main/java/org/bouncycastle/crypto/paddings/BlockCipherPadding.java", "license": "gpl-2.0", "size": 1720 }
[ "org.bouncycastle.crypto.InvalidCipherTextException" ]
import org.bouncycastle.crypto.InvalidCipherTextException;
import org.bouncycastle.crypto.*;
[ "org.bouncycastle.crypto" ]
org.bouncycastle.crypto;
1,898,846
public Comparator getBtreeComparator() { return btreeComparator; }
Comparator function() { return btreeComparator; }
/** * Javadoc for this public method is generated via the doc templates in the * doc_src directory. */
Javadoc for this public method is generated via the doc templates in the doc_src directory
getBtreeComparator
{ "repo_name": "ckaestne/CIDE", "path": "CIDE_Samples/cide_samples/Berkeley DB JE/src/com/sleepycat/je/DatabaseConfig.java", "license": "gpl-3.0", "size": 9280 }
[ "java.util.Comparator" ]
import java.util.Comparator;
import java.util.*;
[ "java.util" ]
java.util;
508,060
public TransHopMeta findTransHopTo(StepMeta tostep) { int i; for (i = 0; i < nrTransHops(); i++) { TransHopMeta hi = getTransHop(i); if (hi.getToStep() != null && hi.getToStep().equals(tostep)) // Return the first! { return hi; } } retu...
TransHopMeta function(StepMeta tostep) { int i; for (i = 0; i < nrTransHops(); i++) { TransHopMeta hi = getTransHop(i); if (hi.getToStep() != null && hi.getToStep().equals(tostep)) { return hi; } } return null; }
/** * Search all hops for a hop where a certain step is at the end. * * @param tostep The step at the end of the hop. * @return The hop or null if no hop was found. */
Search all hops for a hop where a certain step is at the end
findTransHopTo
{ "repo_name": "icholy/geokettle-2.0", "path": "src/org/pentaho/di/trans/TransMeta.java", "license": "lgpl-2.1", "size": 230572 }
[ "org.pentaho.di.trans.step.StepMeta" ]
import org.pentaho.di.trans.step.StepMeta;
import org.pentaho.di.trans.step.*;
[ "org.pentaho.di" ]
org.pentaho.di;
1,554,573
@param pErrorText */ public void setErrorText(ArrayList<String> pErrorText) { iErrorText = pErrorText; } ////////////////////////////////////////////////////////////////////////////// /** Return the return-code of the failing command.
@param pErrorText */ void function(ArrayList<String> pErrorText) { iErrorText = pErrorText; } /** Return the return-code of the failing command.
/** * Set the error text of this exception. @param pErrorText */
Set the error text of this exception
setErrorText
{ "repo_name": "alexproca/im4java", "path": "src/org/im4java/core/CommandException.java", "license": "lgpl-2.1", "size": 3582 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
1,227,368
@Nonnull public java.util.concurrent.CompletableFuture<DriveItemVersion> postAsync(@Nonnull final DriveItemVersion newDriveItemVersion) { return sendAsync(HttpMethod.POST, newDriveItemVersion); }
java.util.concurrent.CompletableFuture<DriveItemVersion> function(@Nonnull final DriveItemVersion newDriveItemVersion) { return sendAsync(HttpMethod.POST, newDriveItemVersion); }
/** * Creates a DriveItemVersion with a new object * * @param newDriveItemVersion the new object to create * @return a future with the result */
Creates a DriveItemVersion with a new object
postAsync
{ "repo_name": "microsoftgraph/msgraph-sdk-java", "path": "src/main/java/com/microsoft/graph/requests/DriveItemVersionRequest.java", "license": "mit", "size": 5993 }
[ "com.microsoft.graph.http.HttpMethod", "com.microsoft.graph.models.DriveItemVersion", "javax.annotation.Nonnull" ]
import com.microsoft.graph.http.HttpMethod; import com.microsoft.graph.models.DriveItemVersion; import javax.annotation.Nonnull;
import com.microsoft.graph.http.*; import com.microsoft.graph.models.*; import javax.annotation.*;
[ "com.microsoft.graph", "javax.annotation" ]
com.microsoft.graph; javax.annotation;
637,352
EAttribute getUiContext_SharedStateGroup();
EAttribute getUiContext_SharedStateGroup();
/** * Returns the meta object for the attribute '{@link org.lunifera.ecview.semantic.uimodel.UiContext#getSharedStateGroup <em>Shared State Group</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Shared State Group</em>'. * @see org.lunifera.ecview.sema...
Returns the meta object for the attribute '<code>org.lunifera.ecview.semantic.uimodel.UiContext#getSharedStateGroup Shared State Group</code>'.
getUiContext_SharedStateGroup
{ "repo_name": "lunifera/lunifera-ecview-addons", "path": "org.lunifera.ecview.semantic.uimodel/src/org/lunifera/ecview/semantic/uimodel/UiModelPackage.java", "license": "epl-1.0", "size": 498897 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,419,366
private void showCurrentDocumentImage() { final javafx.scene.image.Image documentImage = this.activeImage().load( this.path, this.showBinarizedImage); this.firePropertyChange(DocumentPanelController.RELOAD_IMAGE, null, documentImage); this.showElements(); ...
void function() { final javafx.scene.image.Image documentImage = this.activeImage().load( this.path, this.showBinarizedImage); this.firePropertyChange(DocumentPanelController.RELOAD_IMAGE, null, documentImage); this.showElements(); }
/** * This method is used to show the current document image. */
This method is used to show the current document image
showCurrentDocumentImage
{ "repo_name": "Diptychon/Diptychon", "path": "src/Diptychon/src/de/diptychon/models/data/Digital.java", "license": "gpl-3.0", "size": 60359 }
[ "de.diptychon.controller.DocumentPanelController" ]
import de.diptychon.controller.DocumentPanelController;
import de.diptychon.controller.*;
[ "de.diptychon.controller" ]
de.diptychon.controller;
1,782,982
private void zip(String[] filenames, String[] contents, OutputStream whereTo) throws IOException { assert (filenames.length == contents.length); // enclose the whereTo stream into a ZipOutputStream. ZipOutputStream out = new ZipOutputStream(whereTo); // iterate over all filenames. for (int i = 0; i < f...
void function(String[] filenames, String[] contents, OutputStream whereTo) throws IOException { assert (filenames.length == contents.length); ZipOutputStream out = new ZipOutputStream(whereTo); for (int i = 0; i < filenames.length; i++) { out.putNextEntry(new ZipEntry(filenames[i])); out.write(contents[i].getBytes()); ...
/** * Creates a zipfile consisting of filenames and contents provided in * filenames and contents parameters, respectively. The resulting zip file * is written into the whereTo stream. * * This method requires that the length of the filenames and contents array * is equal and performs an ...
Creates a zipfile consisting of filenames and contents provided in filenames and contents parameters, respectively. The resulting zip file is written into the whereTo stream. This method requires that the length of the filenames and contents array is equal and performs an assertion on this
zip
{ "repo_name": "fanta-mnix/designer", "path": "src/main/java/org/jbpm/designer/server/MultiDownloader.java", "license": "apache-2.0", "size": 7058 }
[ "java.io.IOException", "java.io.OutputStream", "java.util.zip.ZipEntry", "java.util.zip.ZipOutputStream" ]
import java.io.IOException; import java.io.OutputStream; import java.util.zip.ZipEntry; import java.util.zip.ZipOutputStream;
import java.io.*; import java.util.zip.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,040,588
private boolean isBodyContainingElements(SmtpMessage message) { String trimmedBody = StringUtils.deleteWhitespace(message.getBody()); for (Iterator iterator = bodyElements.iterator(); iterator.hasNext();) { String element = (String) iterator.next(); if (!StringUtils.conta...
boolean function(SmtpMessage message) { String trimmedBody = StringUtils.deleteWhitespace(message.getBody()); for (Iterator iterator = bodyElements.iterator(); iterator.hasNext();) { String element = (String) iterator.next(); if (!StringUtils.contains(trimmedBody, StringUtils.deleteWhitespace(element))) { return false;...
/** Checks if is body containing elements. * * @param message * the message * @return true, if is body containing elements */
Checks if is body containing elements
isBodyContainingElements
{ "repo_name": "alarulrajan/CodeFest", "path": "test/com/technoetic/xplanner/acceptance/web/MailTester.java", "license": "gpl-2.0", "size": 11332 }
[ "com.dumbster.smtp.SmtpMessage", "java.util.Iterator", "org.apache.commons.lang.StringUtils" ]
import com.dumbster.smtp.SmtpMessage; import java.util.Iterator; import org.apache.commons.lang.StringUtils;
import com.dumbster.smtp.*; import java.util.*; import org.apache.commons.lang.*;
[ "com.dumbster.smtp", "java.util", "org.apache.commons" ]
com.dumbster.smtp; java.util; org.apache.commons;
1,485,493
@Override public IBlockState getStateFromMeta(int meta) { return this.getDefaultState().withProperty(AGE, Integer.valueOf(meta)); }
IBlockState function(int meta) { return this.getDefaultState().withProperty(AGE, Integer.valueOf(meta)); }
/** * Convert the given metadata into a BlockState for this Block */
Convert the given metadata into a BlockState for this Block
getStateFromMeta
{ "repo_name": "Alec-WAM/CrystalMod", "path": "src/main/java/alec_wam/CrystalMod/blocks/crops/BlockCrystalReed.java", "license": "mit", "size": 7359 }
[ "net.minecraft.block.state.IBlockState" ]
import net.minecraft.block.state.IBlockState;
import net.minecraft.block.state.*;
[ "net.minecraft.block" ]
net.minecraft.block;
2,714,890
protected IChunkProvider createChunkProvider() { IChunkLoader ichunkloader = this.saveHandler.getChunkLoader(this.provider); return new ChunkProviderServer(this, ichunkloader, this.provider.createChunkGenerator()); }
IChunkProvider function() { IChunkLoader ichunkloader = this.saveHandler.getChunkLoader(this.provider); return new ChunkProviderServer(this, ichunkloader, this.provider.createChunkGenerator()); }
/** * Creates the chunk provider for this world. Called in the constructor. Retrieves provider from worldProvider? */
Creates the chunk provider for this world. Called in the constructor. Retrieves provider from worldProvider
createChunkProvider
{ "repo_name": "SuperUnitato/UnLonely", "path": "build/tmp/recompileMc/sources/net/minecraft/world/WorldServer.java", "license": "lgpl-2.1", "size": 54853 }
[ "net.minecraft.world.chunk.IChunkProvider", "net.minecraft.world.chunk.storage.IChunkLoader", "net.minecraft.world.gen.ChunkProviderServer" ]
import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.chunk.storage.IChunkLoader; import net.minecraft.world.gen.ChunkProviderServer;
import net.minecraft.world.chunk.*; import net.minecraft.world.chunk.storage.*; import net.minecraft.world.gen.*;
[ "net.minecraft.world" ]
net.minecraft.world;
1,035,219
public void dataElement (String uri, String localName, String qName, Attributes atts, String content) throws SAXException { startElement(uri, localName, qName, atts); characters(content); endElement(uri, localName, qName); }
void function (String uri, String localName, String qName, Attributes atts, String content) throws SAXException { startElement(uri, localName, qName, atts); characters(content); endElement(uri, localName, qName); }
/** * Write an element with character data content. * * <p>This is a convenience method to write a complete element * with character data content, including the start tag * and end tag.</p> * * <p>This method invokes * {@link #startElement(String, String, String, Attributes)}, ...
Write an element with character data content. This is a convenience method to write a complete element with character data content, including the start tag and end tag. This method invokes <code>#startElement(String, String, String, Attributes)</code>, followed by <code>#characters(String)</code>, followed by <code>#en...
dataElement
{ "repo_name": "forty3degrees/graphclasses", "path": "K/p/src/teo/isgci/data/xml/XMLWriter.java", "license": "gpl-3.0", "size": 39040 }
[ "org.xml.sax.Attributes", "org.xml.sax.SAXException" ]
import org.xml.sax.Attributes; import org.xml.sax.SAXException;
import org.xml.sax.*;
[ "org.xml.sax" ]
org.xml.sax;
1,254,752
@Test public void testOnUnauthenticatedMessageDoesNotSendPubAckOnFailure(final TestContext ctx) { // GIVEN an adapter with a downstream event consumer final Future<ProtonDelivery> outcome = Future.future(); givenAnEventSenderForOutcome(outcome); final MqttServer server = getMqtt...
void function(final TestContext ctx) { final Future<ProtonDelivery> outcome = Future.future(); givenAnEventSenderForOutcome(outcome); final MqttServer server = getMqttServer(false); final AbstractVertxBasedMqttProtocolAdapter<ProtocolAdapterProperties> adapter = getAdapter(server); final Buffer payload = Buffer.buffer(...
/** * Verifies that the adapter does not send a PUBACK package to the device if an event message has not been accepted * by the peer. * * @param ctx The vert.x test context. */
Verifies that the adapter does not send a PUBACK package to the device if an event message has not been accepted by the peer
testOnUnauthenticatedMessageDoesNotSendPubAckOnFailure
{ "repo_name": "dejanb/hono", "path": "adapters/mqtt-vertx-base/src/test/java/org/eclipse/hono/adapter/mqtt/AbstractVertxBasedMqttProtocolAdapterTest.java", "license": "epl-1.0", "size": 34686 }
[ "io.netty.handler.codec.mqtt.MqttQoS", "io.vertx.core.Future", "io.vertx.core.buffer.Buffer", "io.vertx.ext.unit.TestContext", "io.vertx.mqtt.MqttEndpoint", "io.vertx.mqtt.MqttServer", "io.vertx.mqtt.messages.MqttPublishMessage", "io.vertx.proton.ProtonDelivery", "java.net.HttpURLConnection", "org...
import io.netty.handler.codec.mqtt.MqttQoS; import io.vertx.core.Future; import io.vertx.core.buffer.Buffer; import io.vertx.ext.unit.TestContext; import io.vertx.mqtt.MqttEndpoint; import io.vertx.mqtt.MqttServer; import io.vertx.mqtt.messages.MqttPublishMessage; import io.vertx.proton.ProtonDelivery; import java.net....
import io.netty.handler.codec.mqtt.*; import io.vertx.core.*; import io.vertx.core.buffer.*; import io.vertx.ext.unit.*; import io.vertx.mqtt.*; import io.vertx.mqtt.messages.*; import io.vertx.proton.*; import java.net.*; import org.eclipse.hono.client.*; import org.eclipse.hono.config.*; import org.mockito.*;
[ "io.netty.handler", "io.vertx.core", "io.vertx.ext", "io.vertx.mqtt", "io.vertx.proton", "java.net", "org.eclipse.hono", "org.mockito" ]
io.netty.handler; io.vertx.core; io.vertx.ext; io.vertx.mqtt; io.vertx.proton; java.net; org.eclipse.hono; org.mockito;
1,487,552
public Observable<ServiceResponse<Page<ExpressRoutePortInner>>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); }
Observable<ServiceResponse<Page<ExpressRoutePortInner>>> function(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException(STR); }
/** * List all the ExpressRoutePort resources in the specified resource group. * ServiceResponse<PageImpl<ExpressRoutePortInner>> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * ...
List all the ExpressRoutePort resources in the specified resource group
listByResourceGroupNextSinglePageAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2019_11_01/src/main/java/com/microsoft/azure/management/network/v2019_11_01/implementation/ExpressRoutePortsInner.java", "license": "mit", "size": 66205 }
[ "com.microsoft.azure.Page", "com.microsoft.rest.ServiceResponse" ]
import com.microsoft.azure.Page; import com.microsoft.rest.ServiceResponse;
import com.microsoft.azure.*; import com.microsoft.rest.*;
[ "com.microsoft.azure", "com.microsoft.rest" ]
com.microsoft.azure; com.microsoft.rest;
338,162
public com.squareup.okhttp.Call getAgastListAsync(String authorization, String text, final ApiCallback<List<InlineResponse2001>> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
com.squareup.okhttp.Call function(String authorization, String text, final ApiCallback<List<InlineResponse2001>> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
/** * (asynchronously) * This operation return agast configurations that match with parameters queries * @param authorization Bearer {auth} (required) * @param text Text query (optional) * @param callback The callback to be executed when the API call finishes * @return The request call ...
(asynchronously) This operation return agast configurations that match with parameters queries
getAgastListAsync
{ "repo_name": "Avalara/avataxbr-clients", "path": "java-client/src/main/java/io/swagger/client/api/AGASTApi.java", "license": "gpl-3.0", "size": 32262 }
[ "io.swagger.client.ApiCallback", "io.swagger.client.ApiException", "io.swagger.client.ProgressRequestBody", "io.swagger.client.ProgressResponseBody", "io.swagger.client.model.InlineResponse2001", "java.util.List" ]
import io.swagger.client.ApiCallback; import io.swagger.client.ApiException; import io.swagger.client.ProgressRequestBody; import io.swagger.client.ProgressResponseBody; import io.swagger.client.model.InlineResponse2001; import java.util.List;
import io.swagger.client.*; import io.swagger.client.model.*; import java.util.*;
[ "io.swagger.client", "java.util" ]
io.swagger.client; java.util;
1,034,978
@Override public void setFloat(String parameterName, float x) throws SQLException { setFloat(getIndexForName(parameterName), x); }
void function(String parameterName, float x) throws SQLException { setFloat(getIndexForName(parameterName), x); }
/** * Sets the value of a parameter. * * @param parameterName the parameter name * @param x the value * @throws SQLException if this object is closed */
Sets the value of a parameter
setFloat
{ "repo_name": "vdr007/ThriftyPaxos", "path": "src/applications/h2/src/main/org/h2/jdbc/JdbcCallableStatement.java", "license": "apache-2.0", "size": 53148 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,447,699
public long getClockRate(MediaManager mediaManager) { String clockRate = getPreferenceStringValue(SipConfigManager.SND_CLOCK_RATE); long defaultRate = 16000; try { long rate = Integer.parseInt(clockRate); if(rate == 0) { return mediaManager.getBestSamp...
long function(MediaManager mediaManager) { String clockRate = getPreferenceStringValue(SipConfigManager.SND_CLOCK_RATE); long defaultRate = 16000; try { long rate = Integer.parseInt(clockRate); if(rate == 0) { return mediaManager.getBestSampleRate(defaultRate); } return rate; } catch (NumberFormatException e) { Log.e(T...
/** * Get current clock rate * @param mediaManager * * @return clock rate in Hz */
Get current clock rate
getClockRate
{ "repo_name": "voxofon/CSipSimple", "path": "src/com/csipsimple/utils/PreferencesProviderWrapper.java", "license": "lgpl-3.0", "size": 21675 }
[ "com.csipsimple.api.SipConfigManager", "com.csipsimple.service.MediaManager" ]
import com.csipsimple.api.SipConfigManager; import com.csipsimple.service.MediaManager;
import com.csipsimple.api.*; import com.csipsimple.service.*;
[ "com.csipsimple.api", "com.csipsimple.service" ]
com.csipsimple.api; com.csipsimple.service;
1,534,109
final ValidatorFactory factory = Validation.buildDefaultValidatorFactory(); validator = factory.getValidator(); }
final ValidatorFactory factory = Validation.buildDefaultValidatorFactory(); validator = factory.getValidator(); }
/** * Setup the validator. */
Setup the validator
setupClass
{ "repo_name": "Netflix/genie", "path": "genie-web/src/test/java/com/netflix/genie/web/data/services/impl/jpa/entities/EntityTestBase.java", "license": "apache-2.0", "size": 1764 }
[ "javax.validation.Validation", "javax.validation.ValidatorFactory" ]
import javax.validation.Validation; import javax.validation.ValidatorFactory;
import javax.validation.*;
[ "javax.validation" ]
javax.validation;
1,059,701
@Test public void testBoolean2String() { try { Message message = senderSession.createMessage(); message.setBooleanProperty("prop", true); Assert.assertEquals("true", message.getStringProperty("prop")); } catch (JMSException e) { fail(e); } }
void function() { try { Message message = senderSession.createMessage(); message.setBooleanProperty("prop", true); Assert.assertEquals("true", message.getStringProperty("prop")); } catch (JMSException e) { fail(e); } }
/** * if a property is set as a <code>boolean</code>, * it can also be read as a <code>String</code>. */
if a property is set as a <code>boolean</code>, it can also be read as a <code>String</code>
testBoolean2String
{ "repo_name": "cshannon/activemq-artemis", "path": "tests/joram-tests/src/test/java/org/objectweb/jtests/jms/conform/message/properties/MessagePropertyConversionTest.java", "license": "apache-2.0", "size": 43771 }
[ "javax.jms.JMSException", "javax.jms.Message", "org.junit.Assert" ]
import javax.jms.JMSException; import javax.jms.Message; import org.junit.Assert;
import javax.jms.*; import org.junit.*;
[ "javax.jms", "org.junit" ]
javax.jms; org.junit;
11,466
public static void main(String[] args) throws Exception { ProcessEntryPoint entryPoint = ProcessEntryPoint.createForArguments(args); Logging.init(entryPoint.getProps()); WebServer server = new WebServer(entryPoint.getProps()); entryPoint.launch(server); }
static void function(String[] args) throws Exception { ProcessEntryPoint entryPoint = ProcessEntryPoint.createForArguments(args); Logging.init(entryPoint.getProps()); WebServer server = new WebServer(entryPoint.getProps()); entryPoint.launch(server); }
/** * Can't be started as is. Needs to be bootstrapped by sonar-application */
Can't be started as is. Needs to be bootstrapped by sonar-application
main
{ "repo_name": "teryk/sonarqube", "path": "server/sonar-server/src/main/java/org/sonar/server/app/WebServer.java", "license": "lgpl-3.0", "size": 1997 }
[ "org.sonar.process.ProcessEntryPoint" ]
import org.sonar.process.ProcessEntryPoint;
import org.sonar.process.*;
[ "org.sonar.process" ]
org.sonar.process;
1,810,390
public static ims.careuk.domain.objects.PatientElectiveList extractPatientElectiveList(ims.domain.ILightweightDomainFactory domainFactory, ims.careuk.vo.PatientElectiveListForReferralDetailsVo valueObject) { return extractPatientElectiveList(domainFactory, valueObject, new HashMap()); }
static ims.careuk.domain.objects.PatientElectiveList function(ims.domain.ILightweightDomainFactory domainFactory, ims.careuk.vo.PatientElectiveListForReferralDetailsVo valueObject) { return extractPatientElectiveList(domainFactory, valueObject, new HashMap()); }
/** * Create the domain object from the value object. * @param domainFactory - used to create existing (persistent) domain objects. * @param valueObject - extract the domain object fields from this. */
Create the domain object from the value object
extractPatientElectiveList
{ "repo_name": "open-health-hub/openmaxims-linux", "path": "openmaxims_workspace/ValueObjects/src/ims/careuk/vo/domain/PatientElectiveListForReferralDetailsVoAssembler.java", "license": "agpl-3.0", "size": 22116 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
570,156
java.io.Reader getNCharacterStream(String parameterName) throws SQLException;
java.io.Reader getNCharacterStream(String parameterName) throws SQLException;
/** * Retrieves the value of the designated parameter as a * <code>java.io.Reader</code> object in the Java programming language. * It is intended for use when * accessing <code>NCHAR</code>,<code>NVARCHAR</code> * and <code>LONGNVARCHAR</code> parameters. * * @param parameterName th...
Retrieves the value of the designated parameter as a <code>java.io.Reader</code> object in the Java programming language. It is intended for use when accessing <code>NCHAR</code>,<code>NVARCHAR</code> and <code>LONGNVARCHAR</code> parameters
getNCharacterStream
{ "repo_name": "FauxFaux/jdk9-jdk", "path": "src/java.sql/share/classes/java/sql/CallableStatement.java", "license": "gpl-2.0", "size": 135185 }
[ "java.io.Reader" ]
import java.io.Reader;
import java.io.*;
[ "java.io" ]
java.io;
1,949,328