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
public void DeleteUsername(String _Username) throws java.sql.SQLException { Statement lStatement = null; lStatement = mConnect.createStatement(); lStatement.executeQuery(" DELETE FROM "+UserTable+" WHERE "+UserNameField+"="+_Username+";"); }
void function(String _Username) throws java.sql.SQLException { Statement lStatement = null; lStatement = mConnect.createStatement(); lStatement.executeQuery(STR+UserTable+STR+UserNameField+"="+_Username+";"); }
/** * DeleteUsername * Delete the specified user * * @param _Username : Username of the specified user * @return void */
DeleteUsername Delete the specified user
DeleteUsername
{ "repo_name": "hellgheast/AndroidCityResto", "path": "Samples/CityResto/app/src/main/java/iee3/he_arc/cityresto/ClassDBHelper.java", "license": "gpl-3.0", "size": 7035 }
[ "java.sql.SQLException", "java.sql.Statement" ]
import java.sql.SQLException; import java.sql.Statement;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,394,518
protected void callCustomActivityStartListeners(ActivityExecution execution) { List<ExecutionListener> listeners = activity.getExecutionListeners(org.activiti.engine.impl.pvm.PvmEvent.EVENTNAME_START); if (listeners != null) { List<ExecutionListener> filteredExecutionListeners = new Arr...
void function(ActivityExecution execution) { List<ExecutionListener> listeners = activity.getExecutionListeners(org.activiti.engine.impl.pvm.PvmEvent.EVENTNAME_START); if (listeners != null) { List<ExecutionListener> filteredExecutionListeners = new ArrayList<>(listeners.size()); for (ExecutionListener executionListene...
/** * Since the first loop of the multi instance is not executed as a regular activity, it is needed to call the start listeners yourself. */
Since the first loop of the multi instance is not executed as a regular activity, it is needed to call the start listeners yourself
callCustomActivityStartListeners
{ "repo_name": "dbmalkovsky/flowable-engine", "path": "modules/flowable5-engine/src/main/java/org/activiti/engine/impl/bpmn/behavior/MultiInstanceActivityBehavior.java", "license": "apache-2.0", "size": 16253 }
[ "java.util.ArrayList", "java.util.List", "org.activiti.engine.impl.context.Context", "org.activiti.engine.impl.history.handler.ActivityInstanceStartHandler", "org.activiti.engine.impl.pvm.delegate.ActivityExecution", "org.activiti.engine.impl.pvm.runtime.InterpretableExecution", "org.flowable.engine.del...
import java.util.ArrayList; import java.util.List; import org.activiti.engine.impl.context.Context; import org.activiti.engine.impl.history.handler.ActivityInstanceStartHandler; import org.activiti.engine.impl.pvm.delegate.ActivityExecution; import org.activiti.engine.impl.pvm.runtime.InterpretableExecution; import org...
import java.util.*; import org.activiti.engine.impl.context.*; import org.activiti.engine.impl.history.handler.*; import org.activiti.engine.impl.pvm.delegate.*; import org.activiti.engine.impl.pvm.runtime.*; import org.flowable.engine.delegate.*;
[ "java.util", "org.activiti.engine", "org.flowable.engine" ]
java.util; org.activiti.engine; org.flowable.engine;
821,342
public void setDateofengagement(final LocalDateTime dateofengagement) { this.dateofengagement = dateofengagement; }
void function(final LocalDateTime dateofengagement) { this.dateofengagement = dateofengagement; }
/** * Set the value related to the column: dateofengagement. * @param dateofengagement the dateofengagement value you wish to set */
Set the value related to the column: dateofengagement
setDateofengagement
{ "repo_name": "servinglynk/servinglynk-hmis", "path": "hmis-model-v2014/src/main/java/com/servinglynk/hmis/warehouse/model/v2014/Dateofengagement.java", "license": "mpl-2.0", "size": 7803 }
[ "java.time.LocalDateTime" ]
import java.time.LocalDateTime;
import java.time.*;
[ "java.time" ]
java.time;
2,061,748
protected String parseCassandraKeyspace(Properties tbl) throws SerDeException { String result = tbl.getProperty(CASSANDRA_KEYSPACE_NAME); if (result == null) { result = tbl .getProperty(org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.META_TABLE_NAME); ...
String function(Properties tbl) throws SerDeException { String result = tbl.getProperty(CASSANDRA_KEYSPACE_NAME); if (result == null) { result = tbl .getProperty(org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.META_TABLE_NAME); if (result == null) { throw new SerDeException(STR + tbl.toString()); } if (res...
/** * Parse cassandra keyspace from table properties. * * @param tbl table properties * @return cassandra keyspace * @throws org.apache.hadoop.hive.serde2.SerDeException error parsing * keyspace */
Parse cassandra keyspace from table properties
parseCassandraKeyspace
{ "repo_name": "bigdbcloud/hive-cassandra", "path": "src/main/java/org/apache/hadoop/hive/cassandra/serde/AbstractCassandraSerDe.java", "license": "apache-2.0", "size": 9530 }
[ "java.util.Properties", "org.apache.hadoop.hive.serde2.SerDeException" ]
import java.util.Properties; import org.apache.hadoop.hive.serde2.SerDeException;
import java.util.*; import org.apache.hadoop.hive.serde2.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
2,130,206
public static byte[] floatArrayToByteArray(float floatArray[]) { byte byteArray[] = new byte[floatArray.length*4]; // 4 bytes per float ByteBuffer byteBuf = ByteBuffer.wrap(byteArray); FloatBuffer floatBuf = byteBuf.asFloatBuffer(); floatBuf.put(floatArray); return byteArray; }
static byte[] function(float floatArray[]) { byte byteArray[] = new byte[floatArray.length*4]; ByteBuffer byteBuf = ByteBuffer.wrap(byteArray); FloatBuffer floatBuf = byteBuf.asFloatBuffer(); floatBuf.put(floatArray); return byteArray; }
/** * Convert from an array of floats to an array of bytes * * @param floatArray */
Convert from an array of floats to an array of bytes
floatArrayToByteArray
{ "repo_name": "AngelBanuelos/hipi", "path": "core/src/main/java/org/hipi/util/ByteUtils.java", "license": "bsd-3-clause", "size": 7498 }
[ "java.nio.ByteBuffer", "java.nio.FloatBuffer" ]
import java.nio.ByteBuffer; import java.nio.FloatBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
98,411
@AfterEach public void teardownTest(TestInfo testInfo) { if (testContextManager != null && testContextManager.didTestRun()) { afterTest(); interceptorManager.close(); } }
void function(TestInfo testInfo) { if (testContextManager != null && testContextManager.didTestRun()) { afterTest(); interceptorManager.close(); } }
/** * Disposes of {@link InterceptorManager} and its inheriting class' resources. * * @param testInfo the injected testInfo */
Disposes of <code>InterceptorManager</code> and its inheriting class' resources
teardownTest
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/core/azure-core-test/src/main/java/com/azure/core/test/TestBase.java", "license": "mit", "size": 12438 }
[ "org.junit.jupiter.api.TestInfo" ]
import org.junit.jupiter.api.TestInfo;
import org.junit.jupiter.api.*;
[ "org.junit.jupiter" ]
org.junit.jupiter;
2,177,425
private void registerFabListener() { FileActivity activity = (FileActivity) getActivity(); getFabMain().setOnClickListener(v -> new OCFileListBottomSheetDialog(activity, this, ...
void function() { FileActivity activity = (FileActivity) getActivity(); getFabMain().setOnClickListener(v -> new OCFileListBottomSheetDialog(activity, this, deviceInfo, accountManager.getUser(), getCurrentFile()) .show()); }
/** * register listener on FAB. */
register listener on FAB
registerFabListener
{ "repo_name": "jsargent7089/android", "path": "src/main/java/com/owncloud/android/ui/fragment/OCFileListFragment.java", "license": "gpl-2.0", "size": 73728 }
[ "com.owncloud.android.ui.activity.FileActivity" ]
import com.owncloud.android.ui.activity.FileActivity;
import com.owncloud.android.ui.activity.*;
[ "com.owncloud.android" ]
com.owncloud.android;
353,075
@JSFunction public void sftpPut(Object aSource, String aRemoteFile, Object monitor) throws Exception { ChannelSftp ch = (ChannelSftp) getSftpChannel(); if (monitor != null && !(monitor instanceof Undefined)) { if (aSource instanceof String) { ch.put((String) aSource, aRemoteFile, (SftpProgressMonitor)...
void function(Object aSource, String aRemoteFile, Object monitor) throws Exception { ChannelSftp ch = (ChannelSftp) getSftpChannel(); if (monitor != null && !(monitor instanceof Undefined)) { if (aSource instanceof String) { ch.put((String) aSource, aRemoteFile, (SftpProgressMonitor) ((NativeJavaObject) monitor).unwrap...
/** * <odoc> * <key>SSH.sftpPut(aSource, aRemoteFile, monitor)</key> * Sends aSource file (if string) or a Java stream to a remote file path over a SFTP connection. * Optionally you can provided a callback function called monitor (see more in ow.format.sshProgress) * </odoc> * @throws Exception */
SSH.sftpPut(aSource, aRemoteFile, monitor) Sends aSource file (if string) or a Java stream to a remote file path over a SFTP connection. Optionally you can provided a callback function called monitor (see more in ow.format.sshProgress)
sftpPut
{ "repo_name": "OpenAF/openaf", "path": "src/openaf/plugins/SSH.java", "license": "apache-2.0", "size": 32314 }
[ "com.jcraft.jsch.ChannelSftp", "com.jcraft.jsch.SftpProgressMonitor", "java.io.InputStream", "java.io.OutputStream", "java.lang.String", "org.apache.commons.io.IOUtils", "org.mozilla.javascript.NativeJavaObject", "org.mozilla.javascript.Undefined" ]
import com.jcraft.jsch.ChannelSftp; import com.jcraft.jsch.SftpProgressMonitor; import java.io.InputStream; import java.io.OutputStream; import java.lang.String; import org.apache.commons.io.IOUtils; import org.mozilla.javascript.NativeJavaObject; import org.mozilla.javascript.Undefined;
import com.jcraft.jsch.*; import java.io.*; import java.lang.*; import org.apache.commons.io.*; import org.mozilla.javascript.*;
[ "com.jcraft.jsch", "java.io", "java.lang", "org.apache.commons", "org.mozilla.javascript" ]
com.jcraft.jsch; java.io; java.lang; org.apache.commons; org.mozilla.javascript;
862,484
protected List createOverflowCommandList(Vector commands) { List l = new List(commands); l.setRenderingPrototype(null); l.setListSizeCalculationSampleCount(commands.size()); l.setUIID("CommandList"); Component c = (Component) l.getRenderer(); c.setUIID("Command"...
List function(Vector commands) { List l = new List(commands); l.setRenderingPrototype(null); l.setListSizeCalculationSampleCount(commands.size()); l.setUIID(STR); Component c = (Component) l.getRenderer(); c.setUIID(STR); c = l.getRenderer().getListFocusComponent(l); c.setUIID(STR); l.setFixedSelection(List.FIXED_NONE_...
/** * Creates the list component containing the commands within the given * vector used for showing the menu dialog * * @param commands list of command objects * @return List object */
Creates the list component containing the commands within the given vector used for showing the menu dialog
createOverflowCommandList
{ "repo_name": "codenameone/CodenameOne", "path": "CodenameOne/src/com/codename1/ui/Toolbar.java", "license": "gpl-2.0", "size": 114065 }
[ "com.codename1.ui.list.DefaultListCellRenderer", "java.util.Vector" ]
import com.codename1.ui.list.DefaultListCellRenderer; import java.util.Vector;
import com.codename1.ui.list.*; import java.util.*;
[ "com.codename1.ui", "java.util" ]
com.codename1.ui; java.util;
1,465,183
@NonNull @Override public RenderMode getRenderMode() { return getBackgroundMode() == BackgroundMode.opaque ? RenderMode.surface : RenderMode.texture; }
RenderMode function() { return getBackgroundMode() == BackgroundMode.opaque ? RenderMode.surface : RenderMode.texture; }
/** * {@link FlutterActivityAndFragmentDelegate.Host} method that is used by {@link * FlutterActivityAndFragmentDelegate} to obtain the desired {@link RenderMode} that should be * used when instantiating a {@link FlutterView}. */
<code>FlutterActivityAndFragmentDelegate.Host</code> method that is used by <code>FlutterActivityAndFragmentDelegate</code> to obtain the desired <code>RenderMode</code> that should be used when instantiating a <code>FlutterView</code>
getRenderMode
{ "repo_name": "flutter/engine", "path": "shell/platform/android/io/flutter/embedding/android/FlutterActivity.java", "license": "bsd-3-clause", "size": 49506 }
[ "io.flutter.embedding.android.FlutterActivityLaunchConfigs" ]
import io.flutter.embedding.android.FlutterActivityLaunchConfigs;
import io.flutter.embedding.android.*;
[ "io.flutter.embedding" ]
io.flutter.embedding;
2,206,793
public static Map<String, List<String>> getZoneBasedDiscoveryUrlsFromRegion(EurekaClientConfig clientConfig, String region) { String discoveryDnsName = null; try { discoveryDnsName = "txt." + region + "." + clientConfig.getEurekaServerDNSName(); logger.debug("The region url ...
static Map<String, List<String>> function(EurekaClientConfig clientConfig, String region) { String discoveryDnsName = null; try { discoveryDnsName = "txt." + region + "." + clientConfig.getEurekaServerDNSName(); logger.debug(STR, discoveryDnsName); Set<String> zoneCnamesForRegion = new TreeSet<String>(DnsResolver.getCN...
/** * Get the zone based CNAMES that are bound to a region. * * @param region * - The region for which the zone names need to be retrieved * @return - The list of CNAMES from which the zone-related information can * be retrieved */
Get the zone based CNAMES that are bound to a region
getZoneBasedDiscoveryUrlsFromRegion
{ "repo_name": "krutsko/eureka", "path": "eureka-client/src/main/java/com/netflix/discovery/endpoint/EndpointUtils.java", "license": "apache-2.0", "size": 16912 }
[ "com.netflix.discovery.EurekaClientConfig", "java.util.ArrayList", "java.util.List", "java.util.Map", "java.util.Set", "java.util.TreeMap", "java.util.TreeSet" ]
import com.netflix.discovery.EurekaClientConfig; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Set; import java.util.TreeMap; import java.util.TreeSet;
import com.netflix.discovery.*; import java.util.*;
[ "com.netflix.discovery", "java.util" ]
com.netflix.discovery; java.util;
1,326,265
public static Map<Integer, Set<String>> getComponents(QueryHandler graph) { int nextComponentId = 0; List<Vertex> vertices = new ArrayList<>(graph.getVertices()); Map<Integer, Set<String>> mapping = new HashMap<>(); //While there are vertices that do not belong to a component while (vertices.size...
static Map<Integer, Set<String>> function(QueryHandler graph) { int nextComponentId = 0; List<Vertex> vertices = new ArrayList<>(graph.getVertices()); Map<Integer, Set<String>> mapping = new HashMap<>(); while (vertices.size() != 0) { int componentId = nextComponentId++; List<Long> nextVertices = Lists.newArrayList(ver...
/** * Computes the graphs connected components * * @param graph input graph * @return connected components */
Computes the graphs connected components
getComponents
{ "repo_name": "galpha/gradoop", "path": "gradoop-flink/src/main/java/org/gradoop/flink/model/impl/operators/matching/common/query/GraphMetrics.java", "license": "apache-2.0", "size": 4939 }
[ "com.google.common.collect.Lists", "com.google.common.collect.Sets", "java.util.ArrayList", "java.util.HashMap", "java.util.List", "java.util.Map", "java.util.Set", "java.util.stream.Collectors", "org.gradoop.gdl.model.Vertex" ]
import com.google.common.collect.Lists; import com.google.common.collect.Sets; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; import java.util.stream.Collectors; import org.gradoop.gdl.model.Vertex;
import com.google.common.collect.*; import java.util.*; import java.util.stream.*; import org.gradoop.gdl.model.*;
[ "com.google.common", "java.util", "org.gradoop.gdl" ]
com.google.common; java.util; org.gradoop.gdl;
648,392
public void onDestroy() { Log.d(TAG, ">>> FMRadioEMActivity.onDestroy"); mIsDestroying = true; mHandler.removeCallbacks(null); if (null != mHeadsetConnectionReceiver) { Log.d(TAG, "Unregister headset broadcast receiver."); unregisterReceiver(mHeadsetConnection...
void function() { Log.d(TAG, STR); mIsDestroying = true; mHandler.removeCallbacks(null); if (null != mHeadsetConnectionReceiver) { Log.d(TAG, STR); unregisterReceiver(mHeadsetConnectionReceiver); mHeadsetConnectionReceiver = null; } if (mIsPlaying) { Log.d(TAG, STR); mService.powerDownAsync(); mIsPlaying = false; } if ...
/** * called when activity destroy */
called when activity destroy
onDestroy
{ "repo_name": "darklord4822/android_device_smart_sprint4g", "path": "mtk/FmRadio/src/com/mediatek/fmradio/FmRadioEmActivity.java", "license": "gpl-2.0", "size": 41167 }
[ "android.util.Log" ]
import android.util.Log;
import android.util.*;
[ "android.util" ]
android.util;
2,426,776
public boolean saslConnect(InputStream inS, OutputStream outS) throws IOException { DataInputStream inStream = new DataInputStream(new BufferedInputStream(inS)); DataOutputStream outStream = new DataOutputStream(new BufferedOutputStream( outS)); try { byte[] saslToken = new byte[0]; ...
boolean function(InputStream inS, OutputStream outS) throws IOException { DataInputStream inStream = new DataInputStream(new BufferedInputStream(inS)); DataOutputStream outStream = new DataOutputStream(new BufferedOutputStream( outS)); try { byte[] saslToken = new byte[0]; if (saslClient.hasInitialResponse()) saslToken...
/** * Do client side SASL authentication with server via the given InputStream * and OutputStream * * @param inS * InputStream to use * @param outS * OutputStream to use * @return true if connection is set up, or false if needs to switch * to simple Auth. * ...
Do client side SASL authentication with server via the given InputStream and OutputStream
saslConnect
{ "repo_name": "throughsky/lywebank", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/security/HBaseSaslRpcClient.java", "license": "apache-2.0", "size": 12082 }
[ "java.io.BufferedInputStream", "java.io.BufferedOutputStream", "java.io.DataInputStream", "java.io.DataOutputStream", "java.io.IOException", "java.io.InputStream", "java.io.OutputStream", "javax.security.sasl.Sasl", "javax.security.sasl.SaslException" ]
import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import javax.security.sasl.Sasl; import javax.security.sasl.SaslException;
import java.io.*; import javax.security.sasl.*;
[ "java.io", "javax.security" ]
java.io; javax.security;
1,916,482
public float[] SFColorRGBA(String value) throws InvalidFieldFormatException { throw new InvalidFieldFormatException(RGBA_SPT_MSG); }
float[] function(String value) throws InvalidFieldFormatException { throw new InvalidFieldFormatException(RGBA_SPT_MSG); }
/** * Parse a SFColorRGBA value. The color differs from the float value by being * clamped between 0 and 1. Any more than a single colour value is ignored. * <pre> * SFColorRGBA ::= * NUMBER_LITERAL NUMBER_LITERAL NUMBER_LITERAL NUMBER_LITERAL * </pre> * * @param value The raw ...
Parse a SFColorRGBA value. The color differs from the float value by being clamped between 0 and 1. Any more than a single colour value is ignored. <code> SFColorRGBA ::= NUMBER_LITERAL NUMBER_LITERAL NUMBER_LITERAL NUMBER_LITERAL </code>
SFColorRGBA
{ "repo_name": "Norkart/NK-VirtualGlobe", "path": "Xj3D/src/java/org/web3d/parser/vrml97/VRML97FieldReader.java", "license": "gpl-2.0", "size": 61534 }
[ "org.web3d.vrml.lang.InvalidFieldFormatException" ]
import org.web3d.vrml.lang.InvalidFieldFormatException;
import org.web3d.vrml.lang.*;
[ "org.web3d.vrml" ]
org.web3d.vrml;
2,840,464
if (TextUtils.isEmpty(signedData) || TextUtils.isEmpty(base64PublicKey) || TextUtils.isEmpty(signature)) { Log.e(TAG, "Purchase verification failed: missing data."); return false; } PublicKey key = Security.generatePublicKey(base64PublicKey); return Secur...
if (TextUtils.isEmpty(signedData) TextUtils.isEmpty(base64PublicKey) TextUtils.isEmpty(signature)) { Log.e(TAG, STR); return false; } PublicKey key = Security.generatePublicKey(base64PublicKey); return Security.verify(key, signedData, signature); }
/** * Verifies that the data was signed with the given signature, and returns * the verified purchase. The data is in JSON format and signed * with a private key. The data also contains the {@link PurchaseState} * and product ID of the purchase. * @param base64PublicKey the base64-encoded publi...
Verifies that the data was signed with the given signature, and returns the verified purchase. The data is in JSON format and signed with a private key. The data also contains the <code>PurchaseState</code> and product ID of the purchase
verifyPurchase
{ "repo_name": "OpenSilk/Orpheus", "path": "iabgplay/src/main/java/org/opensilk/iab/gplay/util/Security.java", "license": "gpl-3.0", "size": 4957 }
[ "android.text.TextUtils", "android.util.Log", "java.security.PublicKey" ]
import android.text.TextUtils; import android.util.Log; import java.security.PublicKey;
import android.text.*; import android.util.*; import java.security.*;
[ "android.text", "android.util", "java.security" ]
android.text; android.util; java.security;
836,943
public boolean ready() throws IOException { return false; } // ready()
boolean function() throws IOException { return false; }
/** * Tell whether this stream is ready to be read. * * @return True if the next read() is guaranteed not to block for input, * false otherwise. Note that returning false does not guarantee that the * next read will block. * * @exception IOException If an I/O error occurs ...
Tell whether this stream is ready to be read
ready
{ "repo_name": "AaronZhangL/SplitCharater", "path": "xerces-2_11_0/src/org/apache/xerces/impl/io/ASCIIReader.java", "license": "gpl-2.0", "size": 9204 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,286,935
@Test public void testDisableSASIIndexes() { createTable("CREATE TABLE %s (k int PRIMARY KEY, v int)"); boolean enableSASIIndexes = DatabaseDescriptor.getSASIIndexesEnabled(); try { DatabaseDescriptor.setSASIIndexesEnabled(false); createIndex("CREATE ...
void function() { createTable(STR); boolean enableSASIIndexes = DatabaseDescriptor.getSASIIndexesEnabled(); try { DatabaseDescriptor.setSASIIndexesEnabled(false); createIndex(STR); Assert.fail(STR); } catch (RuntimeException e) { Throwable cause = e.getCause(); Assert.assertNotNull(cause); Assert.assertTrue(cause insta...
/** * Tests the configuration flag to disable SASI indexes. */
Tests the configuration flag to disable SASI indexes
testDisableSASIIndexes
{ "repo_name": "instaclustr/cassandra", "path": "test/unit/org/apache/cassandra/index/sasi/SASICQLTest.java", "license": "apache-2.0", "size": 15156 }
[ "org.apache.cassandra.config.DatabaseDescriptor", "org.apache.cassandra.exceptions.InvalidRequestException", "org.junit.Assert" ]
import org.apache.cassandra.config.DatabaseDescriptor; import org.apache.cassandra.exceptions.InvalidRequestException; import org.junit.Assert;
import org.apache.cassandra.config.*; import org.apache.cassandra.exceptions.*; import org.junit.*;
[ "org.apache.cassandra", "org.junit" ]
org.apache.cassandra; org.junit;
1,710,271
Map<Integer, List<String>> getAccessionNumbersMapForProteinSequences(Set<Integer> proteinSequenceLists, Integer databaseId);
Map<Integer, List<String>> getAccessionNumbersMapForProteinSequences(Set<Integer> proteinSequenceLists, Integer databaseId);
/** * Look at all proteins given {@link ProteinSequenceList} ids. For each protein sequence list * load all accession numbers associated with it and put them in a map keyed by their id. * Only limit yourself to accession numbers from a given database. * * @param proteinSequenceLists Ids of protein sequence li...
Look at all proteins given <code>ProteinSequenceList</code> ids. For each protein sequence list load all accession numbers associated with it and put them in a map keyed by their id. Only limit yourself to accession numbers from a given database
getAccessionNumbersMapForProteinSequences
{ "repo_name": "romanzenka/swift", "path": "services/search-db/src/main/java/edu/mayo/mprc/searchdb/dao/SearchDbDao.java", "license": "apache-2.0", "size": 6854 }
[ "java.util.List", "java.util.Map", "java.util.Set" ]
import java.util.List; import java.util.Map; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
530,444
@SuppressWarnings("unchecked") public static String[] getValuesFromRequestParameterMap(HttpServletRequest req, String key) { return getValuesFromParamMap(req.getParameterMap(), key); }
@SuppressWarnings(STR) static String[] function(HttpServletRequest req, String key) { return getValuesFromParamMap(req.getParameterMap(), key); }
/** * Returns all values for the key in the request's parameter map, or null if key not found. * * @param req An HttpServletRequest which contains the parameters map */
Returns all values for the key in the request's parameter map, or null if key not found
getValuesFromRequestParameterMap
{ "repo_name": "whipermr5/teammates", "path": "src/main/java/teammates/common/util/HttpRequestHelper.java", "license": "gpl-2.0", "size": 4000 }
[ "javax.servlet.http.HttpServletRequest" ]
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.*;
[ "javax.servlet" ]
javax.servlet;
1,006,356
private void buildCqlQueryable(List<String> queryables, String name, String value) { if (value.length() != 0) if (value.contains("%")) queryables.add(name + " like '" + value + "'"); else queryables.add(name + " = '" + value + "'"); }
void function(List<String> queryables, String name, String value) { if (value.length() != 0) if (value.contains("%")) queryables.add(name + STR + value + "'"); else queryables.add(name + STR + value + "'"); }
/** * Build CQL from user entry. If parameter value * contains '%', then the like operator is used. */
Build CQL from user entry. If parameter value contains '%', then the like operator is used
buildCqlQueryable
{ "repo_name": "OpenWIS/openwis", "path": "openwis-metadataportal/openwis-portal/src/main/java/org/openwis/metadataportal/kernel/harvest/csw/CSWHarvester.java", "license": "gpl-3.0", "size": 24156 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,716,087
public void addExperience(int skill, double exp) { final int oldLevel = levels[skill]; exps[skill] += exp; if (exps[skill] > MAXIMUM_EXP) { exps[skill] = MAXIMUM_EXP; } final int newLevel = getLevelForExperience(skill); final int levelDiff = newLevel - oldLevel; if (levelDiff > 0) { levels[skill]...
void function(int skill, double exp) { final int oldLevel = levels[skill]; exps[skill] += exp; if (exps[skill] > MAXIMUM_EXP) { exps[skill] = MAXIMUM_EXP; } final int newLevel = getLevelForExperience(skill); final int levelDiff = newLevel - oldLevel; if (levelDiff > 0) { levels[skill] += levelDiff; player.getUpdateFlag...
/** * Adds experience. * * @param skill * The skill. * @param exp * The experience to add. */
Adds experience
addExperience
{ "repo_name": "lightstorm/lightstorm-server", "path": "src/org/hyperion/rs2/model/Skills.java", "license": "mit", "size": 7137 }
[ "org.hyperion.rs2.model.UpdateFlags" ]
import org.hyperion.rs2.model.UpdateFlags;
import org.hyperion.rs2.model.*;
[ "org.hyperion.rs2" ]
org.hyperion.rs2;
575,893
try { GoogleCredential credentials = new GoogleCredential.Builder().setTransport(TRANSPORT) .setJsonFactory(JSON_FACTORY) .setServiceAccountId(accountId) .setServiceAccountScopes(scopes) .setServiceAccountPrivateKeyFromP12File(p12File) .build(); return credentials; } catch (GeneralSec...
try { GoogleCredential credentials = new GoogleCredential.Builder().setTransport(TRANSPORT) .setJsonFactory(JSON_FACTORY) .setServiceAccountId(accountId) .setServiceAccountScopes(scopes) .setServiceAccountPrivateKeyFromP12File(p12File) .build(); return credentials; } catch (GeneralSecurityException e) { throw new Runti...
/** * Authorizes the installed application to access user's protected data. */
Authorizes the installed application to access user's protected data
authorize
{ "repo_name": "kamiru78/be-bigquery", "path": "src/main/java/jp/gr/java_conf/bebigquery/AuthorizationLogic.java", "license": "apache-2.0", "size": 2639 }
[ "com.google.api.client.googleapis.auth.oauth2.GoogleCredential", "java.io.IOException", "java.security.GeneralSecurityException" ]
import com.google.api.client.googleapis.auth.oauth2.GoogleCredential; import java.io.IOException; import java.security.GeneralSecurityException;
import com.google.api.client.googleapis.auth.oauth2.*; import java.io.*; import java.security.*;
[ "com.google.api", "java.io", "java.security" ]
com.google.api; java.io; java.security;
525,986
protected void customizeConnection(String pathInContext, String pathParams, HttpRequest request, URLConnection connection) { }
void function(String pathInContext, String pathParams, HttpRequest request, URLConnection connection) { }
/** * Customize proxy URL connection. Method to allow derived handlers to customize the connection. */
Customize proxy URL connection. Method to allow derived handlers to customize the connection
customizeConnection
{ "repo_name": "hugs/selenium", "path": "remote/server/src/java/org/openqa/selenium/server/ProxyHandler.java", "license": "apache-2.0", "size": 38311 }
[ "java.net.URLConnection", "org.openqa.jetty.http.HttpRequest" ]
import java.net.URLConnection; import org.openqa.jetty.http.HttpRequest;
import java.net.*; import org.openqa.jetty.http.*;
[ "java.net", "org.openqa.jetty" ]
java.net; org.openqa.jetty;
2,192,284
public void setPortfolio(final Portfolio portfolio) { put(PORTFOLIO, portfolio); }
void function(final Portfolio portfolio) { put(PORTFOLIO, portfolio); }
/** * Sets the portfolio being compiled, if any. * * @param portfolio the portfolio object, or null if there is none for the current compilation */
Sets the portfolio being compiled, if any
setPortfolio
{ "repo_name": "jeorme/OG-Platform", "path": "projects/OG-Engine/src/main/java/com/opengamma/engine/function/FunctionCompilationContext.java", "license": "apache-2.0", "size": 13824 }
[ "com.opengamma.core.position.Portfolio" ]
import com.opengamma.core.position.Portfolio;
import com.opengamma.core.position.*;
[ "com.opengamma.core" ]
com.opengamma.core;
610,094
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller<PollResult<AccountInner>, AccountInner> beginCreate( String resourceGroupName, String accountName, AccountInner account) { return beginCreateAsync(resourceGroupName, accountName, account).getSyncPoller(); }
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller<PollResult<AccountInner>, AccountInner> function( String resourceGroupName, String accountName, AccountInner account) { return beginCreateAsync(resourceGroupName, accountName, account).getSyncPoller(); }
/** * Create Cognitive Services Account. Accounts is a resource group wide resource type. It holds the keys for * developer to access intelligent APIs. It's also the resource type for billing. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param ac...
Create Cognitive Services Account. Accounts is a resource group wide resource type. It holds the keys for developer to access intelligent APIs. It's also the resource type for billing
beginCreate
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/src/main/java/com/azure/resourcemanager/cognitiveservices/implementation/AccountsClientImpl.java", "license": "mit", "size": 114340 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.management.polling.PollResult", "com.azure.core.util.polling.SyncPoller", "com.azure.resourcemanager.cognitiveservices.fluent.models.AccountInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.management.polling.PollResult; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.cognitiveservices.fluent.models.AccountInner;
import com.azure.core.annotation.*; import com.azure.core.management.polling.*; import com.azure.core.util.polling.*; import com.azure.resourcemanager.cognitiveservices.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
797,741
private boolean checkDataQuality(Optional<Object> schema) throws Exception { if (this.branches > 1) { this.forkTaskState.setProp(ConfigurationKeys.EXTRACTOR_ROWS_EXPECTED, this.taskState.getProp(ConfigurationKeys.EXTRACTOR_ROWS_EXPECTED)); this.forkTaskState.setProp(ConfigurationKeys.E...
boolean function(Optional<Object> schema) throws Exception { if (this.branches > 1) { this.forkTaskState.setProp(ConfigurationKeys.EXTRACTOR_ROWS_EXPECTED, this.taskState.getProp(ConfigurationKeys.EXTRACTOR_ROWS_EXPECTED)); this.forkTaskState.setProp(ConfigurationKeys.EXTRACTOR_ROWS_EXTRACTED, this.taskState.getProp(Co...
/** * Check data quality. * * @return whether data publishing is successful and data should be committed */
Check data quality
checkDataQuality
{ "repo_name": "sahilTakiar/gobblin", "path": "gobblin-runtime/src/main/java/gobblin/runtime/fork/Fork.java", "license": "apache-2.0", "size": 24991 }
[ "com.google.common.base.Optional" ]
import com.google.common.base.Optional;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
1,897,455
protected void weave(Spell... spells) { super.setParent(spells[0]); for (int i = 0; i < spells.length - 1; ++i) { spells[i].setParent(spells[i + 1]); } }
void function(Spell... spells) { super.setParent(spells[0]); for (int i = 0; i < spells.length - 1; ++i) { spells[i].setParent(spells[i + 1]); } }
/**Weaves this spell together with the given spells, * so that the effects of all the spells are combined. * * @param spells Spells to weave in. * @return This spell (no new spell). */
Weaves this spell together with the given spells, so that the effects of all the spells are combined
weave
{ "repo_name": "machisuji/Wandledi", "path": "core/src/main/java/org/wandledi/spells/ComplexSpell.java", "license": "mit", "size": 2426 }
[ "org.wandledi.Spell" ]
import org.wandledi.Spell;
import org.wandledi.*;
[ "org.wandledi" ]
org.wandledi;
468,490
default Web3jEndpointProducerBuilder addresses(List<String> addresses) { doSetProperty("addresses", addresses); return this; }
default Web3jEndpointProducerBuilder addresses(List<String> addresses) { doSetProperty(STR, addresses); return this; }
/** * Contract address or a list of addresses. * * The option is a: <code>java.util.List&lt;java.lang.String&gt;</code> * type. * * Group: common */
Contract address or a list of addresses. The option is a: <code>java.util.List&lt;java.lang.String&gt;</code> type. Group: common
addresses
{ "repo_name": "nicolaferraro/camel", "path": "core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Web3jEndpointBuilderFactory.java", "license": "apache-2.0", "size": 48011 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
289,130
private void initialize() { rootFrame = new JFrame(); rootFrame.setBounds(100, 100, 450, 500); rootFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); fc = new JFileChooser(); fcSecret = new JFileChooser(); fcOutput = new JFileChooser(); fcTianGangTu = new JFileChooser(); fcSecretOutput = n...
void function() { rootFrame = new JFrame(); rootFrame.setBounds(100, 100, 450, 500); rootFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); fc = new JFileChooser(); fcSecret = new JFileChooser(); fcOutput = new JFileChooser(); fcTianGangTu = new JFileChooser(); fcSecretOutput = new JFileChooser(); rootFrame.getConte...
/** * Initialize the contents of the frame. */
Initialize the contents of the frame
initialize
{ "repo_name": "tiangangtu/tiangangtu-gui", "path": "src/com/tiangangtu/gui/GUI.java", "license": "apache-2.0", "size": 16777 }
[ "java.awt.Font", "javax.swing.JFileChooser", "javax.swing.JFrame", "javax.swing.JLabel", "javax.swing.JPanel", "javax.swing.SwingConstants" ]
import java.awt.Font; import javax.swing.JFileChooser; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.SwingConstants;
import java.awt.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
992,363
List<Operation> parse(Reader r) throws RepoInitParsingException;
List<Operation> parse(Reader r) throws RepoInitParsingException;
/** Parse the supplied input. * @param r Input in ACL definitions format. The reader is closed * by this method. * @throws AclParsingException on parsing errors */
Parse the supplied input
parse
{ "repo_name": "wimsymons/sling", "path": "bundles/extensions/repoinit/parser/src/main/java/org/apache/sling/repoinit/parser/RepoInitParser.java", "license": "apache-2.0", "size": 1304 }
[ "java.io.Reader", "java.util.List", "org.apache.sling.repoinit.parser.operations.Operation" ]
import java.io.Reader; import java.util.List; import org.apache.sling.repoinit.parser.operations.Operation;
import java.io.*; import java.util.*; import org.apache.sling.repoinit.parser.operations.*;
[ "java.io", "java.util", "org.apache.sling" ]
java.io; java.util; org.apache.sling;
1,321,673
@Override @WebApiDescription(title = "Get Person Information", description = "Get information for the person with id 'personId'") @WebApiParam(name = "personId", title = "The person's username") public Person readById(String personId, Parameters parameters) { Person person = people.getP...
@WebApiDescription(title = STR, description = STR) @WebApiParam(name = STR, title = STR) Person function(String personId, Parameters parameters) { Person person = people.getPerson(personId); return person; }
/** * Get a person by userName. * * @see org.alfresco.rest.framework.resource.actions.interfaces.EntityResourceAction.ReadById#readById(String, org.alfresco.rest.framework.resource.parameters.Parameters) */
Get a person by userName
readById
{ "repo_name": "Alfresco/community-edition", "path": "projects/remote-api/source/java/org/alfresco/rest/api/people/PeopleEntityResource.java", "license": "lgpl-3.0", "size": 2862 }
[ "org.alfresco.rest.api.model.Person", "org.alfresco.rest.framework.WebApiDescription", "org.alfresco.rest.framework.WebApiParam", "org.alfresco.rest.framework.resource.parameters.Parameters" ]
import org.alfresco.rest.api.model.Person; import org.alfresco.rest.framework.WebApiDescription; import org.alfresco.rest.framework.WebApiParam; import org.alfresco.rest.framework.resource.parameters.Parameters;
import org.alfresco.rest.api.model.*; import org.alfresco.rest.framework.*; import org.alfresco.rest.framework.resource.parameters.*;
[ "org.alfresco.rest" ]
org.alfresco.rest;
200,826
@ApiModelProperty(required = true, value = "Time that the war was declared") public OffsetDateTime getDeclared() { return declared; }
@ApiModelProperty(required = true, value = STR) OffsetDateTime function() { return declared; }
/** * Time that the war was declared * * @return declared **/
Time that the war was declared
getDeclared
{ "repo_name": "burberius/eve-esi", "path": "src/main/java/net/troja/eve/esi/model/WarResponse.java", "license": "apache-2.0", "size": 10080 }
[ "io.swagger.annotations.ApiModelProperty", "java.time.OffsetDateTime" ]
import io.swagger.annotations.ApiModelProperty; import java.time.OffsetDateTime;
import io.swagger.annotations.*; import java.time.*;
[ "io.swagger.annotations", "java.time" ]
io.swagger.annotations; java.time;
10,073
public void addCertificate(AddCertificates addcert);
void function(AddCertificates addcert);
/** * Add the given direct certificates. * * @param addcert */
Add the given direct certificates
addCertificate
{ "repo_name": "AurionProject/Aurion", "path": "Product/Production/Adapters/General/CONNECTAdminGUI/src/main/java/gov/hhs/fha/nhinc/admingui/services/DirectService.java", "license": "bsd-3-clause", "size": 6917 }
[ "org.nhind.config.AddCertificates" ]
import org.nhind.config.AddCertificates;
import org.nhind.config.*;
[ "org.nhind.config" ]
org.nhind.config;
2,585,455
@StrutsTagAttribute(description="Deprecated. Use 'var' instead") public void setId(String id) { setVar(id); }
@StrutsTagAttribute(description=STR) void function(String id) { setVar(id); }
/** * To keep backward compatibility * TODO remove after 2.1 */
To keep backward compatibility TODO remove after 2.1
setId
{ "repo_name": "TheTypoMaster/struts-2.3.24", "path": "src/core/src/main/java/org/apache/struts2/components/ContextBean.java", "license": "apache-2.0", "size": 1851 }
[ "org.apache.struts2.views.annotations.StrutsTagAttribute" ]
import org.apache.struts2.views.annotations.StrutsTagAttribute;
import org.apache.struts2.views.annotations.*;
[ "org.apache.struts2" ]
org.apache.struts2;
1,798,003
public String getIdentifier() { return ID3v24Frames.FRAME_ID_URL_COPYRIGHT; }
String function() { return ID3v24Frames.FRAME_ID_URL_COPYRIGHT; }
/** * The ID3v2 frame identifier * * @return the ID3v2 frame identifier for this frame type */
The ID3v2 frame identifier
getIdentifier
{ "repo_name": "dubenju/javay", "path": "src/java/org/jaudiotagger/tag/id3/framebody/FrameBodyWCOP.java", "license": "apache-2.0", "size": 2494 }
[ "org.jaudiotagger.tag.id3.ID3v24Frames" ]
import org.jaudiotagger.tag.id3.ID3v24Frames;
import org.jaudiotagger.tag.id3.*;
[ "org.jaudiotagger.tag" ]
org.jaudiotagger.tag;
195,593
public String getServerErrorCodeVerbose() { String[] detail = ErrorCodes.getDescription(sftpErrorCode); if (detail == null) return "The error code " + sftpErrorCode + " is unknown."; return detail[1]; }
String function() { String[] detail = ErrorCodes.getDescription(sftpErrorCode); if (detail == null) return STR + sftpErrorCode + STR; return detail[1]; }
/** * Get the description of the error code as given in the SFTP specs. * * @return e.g., "The filename is not valid." */
Get the description of the error code as given in the SFTP specs
getServerErrorCodeVerbose
{ "repo_name": "mattb243/AmazonEC2Matlab", "path": "third-party/ganymed-ssh2-build250/src/ch/ethz/ssh2/SFTPException.java", "license": "bsd-3-clause", "size": 1981 }
[ "ch.ethz.ssh2.sftp.ErrorCodes" ]
import ch.ethz.ssh2.sftp.ErrorCodes;
import ch.ethz.ssh2.sftp.*;
[ "ch.ethz.ssh2" ]
ch.ethz.ssh2;
1,336,106
public ManagedLedgerConfig setThrottleMarkDelete(double throttleMarkDelete) { checkArgument(throttleMarkDelete >= 0.0); this.throttleMarkDelete = throttleMarkDelete; return this; }
ManagedLedgerConfig function(double throttleMarkDelete) { checkArgument(throttleMarkDelete >= 0.0); this.throttleMarkDelete = throttleMarkDelete; return this; }
/** * Set the rate limiter on how many mark-delete calls per second are allowed. If the value is set to 0, the rate * limiter is disabled. Default is 0. * * @param throttleMarkDelete * the max number of mark-delete calls allowed per second */
Set the rate limiter on how many mark-delete calls per second are allowed. If the value is set to 0, the rate limiter is disabled. Default is 0
setThrottleMarkDelete
{ "repo_name": "sschepens/pulsar", "path": "managed-ledger/src/main/java/org/apache/bookkeeper/mledger/ManagedLedgerConfig.java", "license": "apache-2.0", "size": 12792 }
[ "com.google.common.base.Preconditions" ]
import com.google.common.base.Preconditions;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
2,740,757
public static void insertHistory(Context context, String query, String record) { SQLiteDatabase db = getDatabase(context); ContentValues values = new ContentValues(); values.put("query", query); values.put("record", record); db.insert("history", null, values); db.clo...
static void function(Context context, String query, String record) { SQLiteDatabase db = getDatabase(context); ContentValues values = new ContentValues(); values.put("query", query); values.put(STR, record); db.insert(STR, null, values); db.close(); }
/** * Insert new item into history * * @param context android context * @param query query to insert * @param record record to insert */
Insert new item into history
insertHistory
{ "repo_name": "kuroidoruido/KISS", "path": "app/src/main/java/fr/neamar/kiss/db/DBHelper.java", "license": "mit", "size": 5085 }
[ "android.content.ContentValues", "android.content.Context", "android.database.sqlite.SQLiteDatabase" ]
import android.content.ContentValues; import android.content.Context; import android.database.sqlite.SQLiteDatabase;
import android.content.*; import android.database.sqlite.*;
[ "android.content", "android.database" ]
android.content; android.database;
2,195,221
private static boolean useUntrimmedConfigs(BuildOptions options) { return options.get(CoreOptions.class).configsMode == CoreOptions.ConfigsMode.NOTRIM; }
static boolean function(BuildOptions options) { return options.get(CoreOptions.class).configsMode == CoreOptions.ConfigsMode.NOTRIM; }
/** * Returns whether configurations should trim their fragments to only those needed by * targets and their transitive dependencies. */
Returns whether configurations should trim their fragments to only those needed by targets and their transitive dependencies
useUntrimmedConfigs
{ "repo_name": "davidzchen/bazel", "path": "src/main/java/com/google/devtools/build/lib/skyframe/PrepareAnalysisPhaseFunction.java", "license": "apache-2.0", "size": 18819 }
[ "com.google.devtools.build.lib.analysis.config.BuildOptions", "com.google.devtools.build.lib.analysis.config.CoreOptions" ]
import com.google.devtools.build.lib.analysis.config.BuildOptions; import com.google.devtools.build.lib.analysis.config.CoreOptions;
import com.google.devtools.build.lib.analysis.config.*;
[ "com.google.devtools" ]
com.google.devtools;
1,710,131
protected byte[] createZipFile(XWikiDocument docs[], String[] encodings, String packageXmlEncoding, ExtensionId extension) throws Exception { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ZipOutputStream zos = new ZipOutputStream(baos); ZipEntry zipp = new ZipEntry("p...
byte[] function(XWikiDocument docs[], String[] encodings, String packageXmlEncoding, ExtensionId extension) throws Exception { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ZipOutputStream zos = new ZipOutputStream(baos); ZipEntry zipp = new ZipEntry(STR); zos.putNextEntry(zipp); zos.write(getEncodedByteArr...
/** * Create a XAR file using java.util.zip. * * @param docs The documents to include. * @param encodings The charset for each document. * @param packageXmlEncoding The encoding of package.xml * @param extension the extension id and version or null if none should be added * @return th...
Create a XAR file using java.util.zip
createZipFile
{ "repo_name": "xwiki/xwiki-platform", "path": "xwiki-platform-core/xwiki-platform-oldcore/src/test/java/com/xpn/xwiki/plugin/packaging/AbstractPackageTest.java", "license": "lgpl-2.1", "size": 7898 }
[ "com.xpn.xwiki.doc.XWikiDocument", "java.io.ByteArrayOutputStream", "java.util.zip.ZipEntry", "java.util.zip.ZipOutputStream", "org.xwiki.extension.ExtensionId" ]
import com.xpn.xwiki.doc.XWikiDocument; import java.io.ByteArrayOutputStream; import java.util.zip.ZipEntry; import java.util.zip.ZipOutputStream; import org.xwiki.extension.ExtensionId;
import com.xpn.xwiki.doc.*; import java.io.*; import java.util.zip.*; import org.xwiki.extension.*;
[ "com.xpn.xwiki", "java.io", "java.util", "org.xwiki.extension" ]
com.xpn.xwiki; java.io; java.util; org.xwiki.extension;
2,057,273
public FeedbackSessionQuestionsBundle getFeedbackSessionQuestionsForStudent( String feedbackSessionName, String courseId, String userEmail) throws EntityDoesNotExistException { FeedbackSessionAttributes fsa = fsDb.getFeedbackSession( courseId, feedbackSessionName); ...
FeedbackSessionQuestionsBundle function( String feedbackSessionName, String courseId, String userEmail) throws EntityDoesNotExistException { FeedbackSessionAttributes fsa = fsDb.getFeedbackSession( courseId, feedbackSessionName); if (fsa == null) { throw new EntityDoesNotExistException(ERROR_NON_EXISTENT_FS_GET + cours...
/** * Gets {@code FeedbackQuestions} and previously filled * {@code FeedbackResponses} that a student can view/submit as a * {@link FeedbackSessionQuestionsBundle}. */
Gets FeedbackQuestions and previously filled FeedbackResponses that a student can view/submit as a <code>FeedbackSessionQuestionsBundle</code>
getFeedbackSessionQuestionsForStudent
{ "repo_name": "shaharyarshamshi/teammates", "path": "src/main/java/teammates/logic/core/FeedbackSessionsLogic.java", "license": "gpl-2.0", "size": 109331 }
[ "java.util.HashMap", "java.util.List", "java.util.Map", "java.util.Set" ]
import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,774,743
public ValuesIterator getValues() { return this.valuesIterator; } // -------------------------------------------------------------------------------------------- public final class ValuesIterator implements Iterator<E>, Iterable<E> { private E next; private boolean iteratorAvailable = true; private f...
ValuesIterator function() { return this.valuesIterator; } public final class ValuesIterator implements Iterator<E>, Iterable<E> { private E next; private boolean iteratorAvailable = true; private final TypeSerializer<E> serializer; private ValuesIterator(E first, TypeSerializer<E> serializer) { this.next = first; this....
/** * Returns an iterator over all values that belong to the current key. The iterator is initially <code>null</code> * (before the first call to {@link #nextKey()} and after all keys are consumed. In general, this method returns * always a non-null value, if a previous call to {@link #nextKey()} return <code>tru...
Returns an iterator over all values that belong to the current key. The iterator is initially <code>null</code> (before the first call to <code>#nextKey()</code> and after all keys are consumed. In general, this method returns always a non-null value, if a previous call to <code>#nextKey()</code> return <code>true</cod...
getValues
{ "repo_name": "WangTaoTheTonic/flink", "path": "flink-core/src/main/java/org/apache/flink/api/common/operators/util/ListKeyGroupedIterator.java", "license": "apache-2.0", "size": 6009 }
[ "java.util.Iterator", "org.apache.flink.api.common.typeutils.TypeSerializer" ]
import java.util.Iterator; import org.apache.flink.api.common.typeutils.TypeSerializer;
import java.util.*; import org.apache.flink.api.common.typeutils.*;
[ "java.util", "org.apache.flink" ]
java.util; org.apache.flink;
1,998,265
public static Long toLong(Object data) { if (data != null) { try { if (data instanceof Integer) { return Long.parseLong(Integer.toString((Integer) data)); } else if (data instanceof String) { return Long.parseLong(data.toString()); } else if (data instanceof BigDecimal) { return ((Bi...
static Long function(Object data) { if (data != null) { try { if (data instanceof Integer) { return Long.parseLong(Integer.toString((Integer) data)); } else if (data instanceof String) { return Long.parseLong(data.toString()); } else if (data instanceof BigDecimal) { return ((BigDecimal) data).longValue(); } else if (d...
/** * Attempts to convert object to an Long * * @param data * @return the long or null if it can't convert. */
Attempts to convert object to an Long
toLong
{ "repo_name": "Jedwondle/openstorefront", "path": "server/openstorefront/openstorefront-core/common/src/main/java/edu/usu/sdl/openstorefront/common/util/Convert.java", "license": "apache-2.0", "size": 4950 }
[ "java.math.BigDecimal", "java.math.BigInteger" ]
import java.math.BigDecimal; import java.math.BigInteger;
import java.math.*;
[ "java.math" ]
java.math;
142,163
@Test public void testNoTypesToString() { String nameSampleStr = createSimpleNameSample(false).toString(); assertEquals("<START> U . S . <END> President <START> Barack Obama <END> is considering " + "sending additional American forces to <START> Afghanistan <END> .", nameSampleStr); }
void function() { String nameSampleStr = createSimpleNameSample(false).toString(); assertEquals(STR + STR, nameSampleStr); }
/** * Checks if could create a NameSample without NameTypes, generate the * string representation and validate it. */
Checks if could create a NameSample without NameTypes, generate the string representation and validate it
testNoTypesToString
{ "repo_name": "Eagles2F/opennlp", "path": "opennlp-tools/src/test/java/opennlp/tools/namefind/NameSampleTest.java", "license": "apache-2.0", "size": 6489 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,498,444
void getBrokenLinks(CmsUUID structureId, AsyncCallback<CmsDeleteResourceBean> callback);
void getBrokenLinks(CmsUUID structureId, AsyncCallback<CmsDeleteResourceBean> callback);
/** * Returns a list of potentially broken links, if the given resource was deleted.<p> * * @param structureId the resource structure id * @param callback the callback */
Returns a list of potentially broken links, if the given resource was deleted
getBrokenLinks
{ "repo_name": "it-tavis/opencms-core", "path": "src/org/opencms/gwt/shared/rpc/I_CmsVfsServiceAsync.java", "license": "lgpl-2.1", "size": 12380 }
[ "com.google.gwt.user.client.rpc.AsyncCallback", "org.opencms.gwt.shared.CmsDeleteResourceBean", "org.opencms.util.CmsUUID" ]
import com.google.gwt.user.client.rpc.AsyncCallback; import org.opencms.gwt.shared.CmsDeleteResourceBean; import org.opencms.util.CmsUUID;
import com.google.gwt.user.client.rpc.*; import org.opencms.gwt.shared.*; import org.opencms.util.*;
[ "com.google.gwt", "org.opencms.gwt", "org.opencms.util" ]
com.google.gwt; org.opencms.gwt; org.opencms.util;
550,491
boolean validateReviewOfSystemsSectionTemplateId(DiagnosticChain diagnostics, Map<Object, Object> context);
boolean validateReviewOfSystemsSectionTemplateId(DiagnosticChain diagnostics, Map<Object, Object> context);
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * self.templateId->exists(id : datatypes::II | id.root = '1.3.6.1.4.1.19376.1.5.3.1.3.18') * @param diagnostics The chain of diagnostics to which problems are to be appended. * @param context The cache of context-specific...
self.templateId->exists(id : datatypes::II | id.root = '1.3.6.1.4.1.19376.1.5.3.1.3.18')
validateReviewOfSystemsSectionTemplateId
{ "repo_name": "drbgfc/mdht", "path": "cda/deprecated/org.openhealthtools.mdht.uml.cda.ihe/src/org/openhealthtools/mdht/uml/cda/ihe/ReviewOfSystemsSection.java", "license": "epl-1.0", "size": 2890 }
[ "java.util.Map", "org.eclipse.emf.common.util.DiagnosticChain" ]
import java.util.Map; import org.eclipse.emf.common.util.DiagnosticChain;
import java.util.*; import org.eclipse.emf.common.util.*;
[ "java.util", "org.eclipse.emf" ]
java.util; org.eclipse.emf;
2,728,522
@SuppressWarnings("unchecked") public T addHeader(final String name, final String value) { List<String> values = new ArrayList<String>(); values.add(value); this.headers.put(name, values); return (T) this; }
@SuppressWarnings(STR) T function(final String name, final String value) { List<String> values = new ArrayList<String>(); values.add(value); this.headers.put(name, values); return (T) this; }
/** * Adds a single header value to the Message. * * @param name * The header name. * @param value * The header value * @return this Message, to support chained method calls */
Adds a single header value to the Message
addHeader
{ "repo_name": "hyperwallet/java-sdk", "path": "src/main/java/com/hyperwallet/clientsdk/util/Message.java", "license": "mit", "size": 4191 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,242,442
private static GsonBuilder registerZonedDateTime(GsonBuilder builder) { builder.registerTypeAdapter(ZONED_DATE_TIME_TYPE, new ZonedDateTimeConverter()); return builder; }
static GsonBuilder function(GsonBuilder builder) { builder.registerTypeAdapter(ZONED_DATE_TIME_TYPE, new ZonedDateTimeConverter()); return builder; }
/** * Registers the {@link ZonedDateTimeConverter} converter. * @param builder The GSON builder to register the converter with. * @return A reference to {@code builder}. */
Registers the <code>ZonedDateTimeConverter</code> converter
registerZonedDateTime
{ "repo_name": "gkopff/gson-javatime-serialisers", "path": "src/test/java/com/fatboyindustrial/gsonjavatime/ZonedDateTimeConverterTest.java", "license": "mit", "size": 2998 }
[ "com.google.gson.GsonBuilder" ]
import com.google.gson.GsonBuilder;
import com.google.gson.*;
[ "com.google.gson" ]
com.google.gson;
1,957,840
public String toString() { StringBuffer str = new StringBuffer(); str.append("[Type2:0x"); str.append(Integer.toHexString(getFlags())); str.append(",Target:"); str.append(getTarget()); str.append(",Ch:"); str.append(HexDump.hexString(getChallenge())); if ( hasTargetInformatio...
String function() { StringBuffer str = new StringBuffer(); str.append(STR); str.append(Integer.toHexString(getFlags())); str.append(STR); str.append(getTarget()); str.append(",Ch:"); str.append(HexDump.hexString(getChallenge())); if ( hasTargetInformation()) { List targets = getTargetInformation(); str.append(STR); for...
/** * Return the type 2 message as a string * * @return String */
Return the type 2 message as a string
toString
{ "repo_name": "arcusys/Liferay-CIFS", "path": "source/java/org/alfresco/jlan/server/auth/ntlm/Type2NTLMMessage.java", "license": "gpl-3.0", "size": 7722 }
[ "java.util.List", "org.alfresco.jlan.util.HexDump" ]
import java.util.List; import org.alfresco.jlan.util.HexDump;
import java.util.*; import org.alfresco.jlan.util.*;
[ "java.util", "org.alfresco.jlan" ]
java.util; org.alfresco.jlan;
2,351,607
private void actionSend() { new TaskSendMessage().execute(newMessage); }
void function() { new TaskSendMessage().execute(newMessage); }
/** * Action d'envoi du nouveau Message */
Action d'envoi du nouveau Message
actionSend
{ "repo_name": "uSpreadIt/uSpreadIt-Android", "path": "uSpreadIt/src/main/java/it/uspread/android/activity/message/create/MessageCreationActivity.java", "license": "mit", "size": 16609 }
[ "it.uspread.android.task.TaskSendMessage" ]
import it.uspread.android.task.TaskSendMessage;
import it.uspread.android.task.*;
[ "it.uspread.android" ]
it.uspread.android;
1,857,224
LogicalPreparedStatement newLogicalPreparedStatement( PreparedStatement ps, StatementKey stmtKey, StatementCacheInteractor cacheInteractor);
LogicalPreparedStatement newLogicalPreparedStatement( PreparedStatement ps, StatementKey stmtKey, StatementCacheInteractor cacheInteractor);
/** * Returns a new logical prepared statement object. * * @param ps underlying physical prepared statement * @param stmtKey key for the underlying physical prepared statement * @param cacheInteractor the statement cache interactor * @return A logical prepared statement. */
Returns a new logical prepared statement object
newLogicalPreparedStatement
{ "repo_name": "apache/derby", "path": "java/org.apache.derby.client/org/apache/derby/client/am/ClientJDBCObjectFactory.java", "license": "apache-2.0", "size": 17009 }
[ "java.sql.PreparedStatement", "org.apache.derby.client.am.stmtcache.StatementKey" ]
import java.sql.PreparedStatement; import org.apache.derby.client.am.stmtcache.StatementKey;
import java.sql.*; import org.apache.derby.client.am.stmtcache.*;
[ "java.sql", "org.apache.derby" ]
java.sql; org.apache.derby;
410,971
@Override @Deprecated @Dependencies("getExtents") public Extent getExtent() { return LegacyPropertyAdapter.getSingleton(getExtents(), Extent.class, null, DefaultScope.class, "getExtent"); }
@Dependencies(STR) Extent function() { return LegacyPropertyAdapter.getSingleton(getExtents(), Extent.class, null, DefaultScope.class, STR); }
/** * Information about the spatial, vertical and temporal extent of the data specified by the scope. * This method fetches the value from the {@linkplain #getExtents() extents} collection. * * @return Information about the extent of the data, or {@code null}. * * @deprecated As of ISO 191...
Information about the spatial, vertical and temporal extent of the data specified by the scope. This method fetches the value from the #getExtents() extents collection
getExtent
{ "repo_name": "apache/sis", "path": "core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/DefaultScope.java", "license": "apache-2.0", "size": 10225 }
[ "org.apache.sis.internal.metadata.Dependencies", "org.apache.sis.internal.metadata.legacy.LegacyPropertyAdapter", "org.opengis.metadata.extent.Extent" ]
import org.apache.sis.internal.metadata.Dependencies; import org.apache.sis.internal.metadata.legacy.LegacyPropertyAdapter; import org.opengis.metadata.extent.Extent;
import org.apache.sis.internal.metadata.*; import org.apache.sis.internal.metadata.legacy.*; import org.opengis.metadata.extent.*;
[ "org.apache.sis", "org.opengis.metadata" ]
org.apache.sis; org.opengis.metadata;
2,763,481
@Test public void setSplitFalse() { final QueryModifier expected = new QueryModifier(TermModifier.NONE, false, false, false, null); final QueryModifier actual = QueryModifier.start().setSplit(false).end(); Assert.assertEquals(expected, actual); }
void function() { final QueryModifier expected = new QueryModifier(TermModifier.NONE, false, false, false, null); final QueryModifier actual = QueryModifier.start().setSplit(false).end(); Assert.assertEquals(expected, actual); }
/** * Tests {@link ModifierBuilder#setSplit(boolean)} with false. */
Tests <code>ModifierBuilder#setSplit(boolean)</code> with false
setSplitFalse
{ "repo_name": "cosmocode/cosmocode-lucene", "path": "src/test/java/de/cosmocode/lucene/QueryModifierTest.java", "license": "apache-2.0", "size": 11555 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,028,990
void handleOcrContinuousDecode(OcrResultFailure obj) { lastResult = null; viewfinderView.removeResultText(); // Reset the text in the recognized text box. statusViewTop.setText(""); if (CONTINUOUS_DISPLAY_METADATA) { // Color text delimited by '-' as red. statusViewBottom.setText...
void handleOcrContinuousDecode(OcrResultFailure obj) { lastResult = null; viewfinderView.removeResultText(); statusViewTop.setText(STROCR: STR - OCR failed - Time required: STR msSTR-", new ForegroundColorSpan(0xFFFF0000)); statusViewBottom.setText(cs); } }
/** * Version of handleOcrContinuousDecode for failed OCR requests. Displays a failure message. * * @param obj Metadata for the failed OCR request. */
Version of handleOcrContinuousDecode for failed OCR requests. Displays a failure message
handleOcrContinuousDecode
{ "repo_name": "Limorerez/JamXPlanit", "path": "Planit/src/main/java/edu/sfsu/cs/orange/ocr/CaptureActivity.java", "license": "apache-2.0", "size": 51661 }
[ "android.text.style.ForegroundColorSpan" ]
import android.text.style.ForegroundColorSpan;
import android.text.style.*;
[ "android.text" ]
android.text;
435,447
public static InputStream openStream(Buffer buffer, boolean owner) { return new BufferInputStream(owner ? buffer : ignoreClose(buffer)); }
static InputStream function(Buffer buffer, boolean owner) { return new BufferInputStream(owner ? buffer : ignoreClose(buffer)); }
/** * Creates a new {@link InputStream} backed by the given buffer. Any read taken on the stream will * automatically increment the read position of this buffer. Closing the stream, however, does not * affect the original buffer. * * @param buffer the buffer backing the new {@link InputStream}. * @par...
Creates a new <code>InputStream</code> backed by the given buffer. Any read taken on the stream will automatically increment the read position of this buffer. Closing the stream, however, does not affect the original buffer
openStream
{ "repo_name": "dongc/grpc-java", "path": "core/src/main/java/io/grpc/transport/Buffers.java", "license": "bsd-3-clause", "size": 10094 }
[ "java.io.InputStream" ]
import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
1,403,197
private static long of(final int year, final int month) { long millis = utcMillisAtStartOfYear(year); millis += getTotalMillisByYearMonth(year, month); return millis; } /** * Returns the current UTC date-time with milliseconds precision. * In Java 9+ (as opposed to Java 8)...
static long function(final int year, final int month) { long millis = utcMillisAtStartOfYear(year); millis += getTotalMillisByYearMonth(year, month); return millis; } /** * Returns the current UTC date-time with milliseconds precision. * In Java 9+ (as opposed to Java 8) the {@code Clock} implementation uses system's b...
/** * Return the first day of the month * @param year the year to return * @param month the month to return, ranging from 1-12 * @return the milliseconds since the epoch of the first day of the month in the year */
Return the first day of the month
of
{ "repo_name": "HonzaKral/elasticsearch", "path": "server/src/main/java/org/elasticsearch/common/time/DateUtils.java", "license": "apache-2.0", "size": 18238 }
[ "java.time.Clock", "org.elasticsearch.common.time.DateUtilsRounding" ]
import java.time.Clock; import org.elasticsearch.common.time.DateUtilsRounding;
import java.time.*; import org.elasticsearch.common.time.*;
[ "java.time", "org.elasticsearch.common" ]
java.time; org.elasticsearch.common;
1,292,048
public void writePacketData(PacketBuffer data) throws IOException { data.writeBlockPos(this.field_179824_a); data.writeByte((byte)this.metadata); data.writeNBTTagCompoundToBuffer(this.nbt); }
void function(PacketBuffer data) throws IOException { data.writeBlockPos(this.field_179824_a); data.writeByte((byte)this.metadata); data.writeNBTTagCompoundToBuffer(this.nbt); }
/** * Writes the raw packet data to the data stream. */
Writes the raw packet data to the data stream
writePacketData
{ "repo_name": "Hexeption/Youtube-Hacked-Client-1.8", "path": "minecraft/net/minecraft/network/play/server/S35PacketUpdateTileEntity.java", "license": "mit", "size": 2045 }
[ "java.io.IOException", "net.minecraft.network.PacketBuffer" ]
import java.io.IOException; import net.minecraft.network.PacketBuffer;
import java.io.*; import net.minecraft.network.*;
[ "java.io", "net.minecraft.network" ]
java.io; net.minecraft.network;
413,616
protected int getDeliveryMode() { return DeliveryMode.NON_PERSISTENT; } }
int function() { return DeliveryMode.NON_PERSISTENT; } }
/** * Returns delivery mode. * * @return int - non-persistent delivery mode. */
Returns delivery mode
getDeliveryMode
{ "repo_name": "mocc/bookkeeper-lab", "path": "hedwig-client-jms/src/test/java/org/apache/activemq/JmsRedeliveredTest.java", "license": "apache-2.0", "size": 13592 }
[ "javax.jms.DeliveryMode" ]
import javax.jms.DeliveryMode;
import javax.jms.*;
[ "javax.jms" ]
javax.jms;
417,442
return Optional.ofNullable(name); }
return Optional.ofNullable(name); }
/** * Returns user provided name of the operator. * * @return maybe name */
Returns user provided name of the operator
getName
{ "repo_name": "mxm/incubator-beam", "path": "sdks/java/extensions/euphoria/src/main/java/org/apache/beam/sdk/extensions/euphoria/core/client/operator/base/Operator.java", "license": "apache-2.0", "size": 2128 }
[ "java.util.Optional" ]
import java.util.Optional;
import java.util.*;
[ "java.util" ]
java.util;
306,033
ServiceCall put504Async(Boolean booleanValue, final ServiceCallback<Void> serviceCallback) throws IllegalArgumentException;
ServiceCall put504Async(Boolean booleanValue, final ServiceCallback<Void> serviceCallback) throws IllegalArgumentException;
/** * Return 504 status code, then 200 after retry. * * @param booleanValue Simple boolean value true * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall...
Return 504 status code, then 200 after retry
put504Async
{ "repo_name": "John-Hart/autorest", "path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/http/HttpRetrys.java", "license": "mit", "size": 12077 }
[ "com.microsoft.rest.ServiceCall", "com.microsoft.rest.ServiceCallback" ]
import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
2,824,183
WebDriver getWebDriver();
WebDriver getWebDriver();
/** * Gets the web driver. * * @return the web driver */
Gets the web driver
getWebDriver
{ "repo_name": "openMF/mifosx-e2e-testing", "path": "MifosTestingFramework/src/main/java/com/mifos/testing/framework/webdriver/WebDriverFactory.java", "license": "mpl-2.0", "size": 622 }
[ "org.openqa.selenium.WebDriver" ]
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.*;
[ "org.openqa.selenium" ]
org.openqa.selenium;
1,052,534
public HttpUrlConnectorProvider connectionFactory(final ConnectionFactory connectionFactory) { if (connectionFactory == null) { throw new NullPointerException(LocalizationMessages.NULL_INPUT_PARAMETER("connectionFactory")); } this.connectionFactory = connectionFactory; r...
HttpUrlConnectorProvider function(final ConnectionFactory connectionFactory) { if (connectionFactory == null) { throw new NullPointerException(LocalizationMessages.NULL_INPUT_PARAMETER(STR)); } this.connectionFactory = connectionFactory; return this; }
/** * Set a custom {@link java.net.HttpURLConnection} factory. * * @param connectionFactory custom HTTP URL connection factory. Must not be {@code null}. * @return updated connector provider instance. * @throws java.lang.NullPointerException in case the supplied connectionFactory is {@code null...
Set a custom <code>java.net.HttpURLConnection</code> factory
connectionFactory
{ "repo_name": "agentlab/org.glassfish.jersey", "path": "plugins/org.glassfish.jersey.client/src/main/java/org/glassfish/jersey/client/HttpUrlConnectorProvider.java", "license": "epl-1.0", "size": 13452 }
[ "org.glassfish.jersey.client.internal.LocalizationMessages" ]
import org.glassfish.jersey.client.internal.LocalizationMessages;
import org.glassfish.jersey.client.internal.*;
[ "org.glassfish.jersey" ]
org.glassfish.jersey;
2,014,608
public void clearSeedRelays() { for (String Key : PropertiesUtil.stringPropertyNames(this)) { if ( Key.startsWith(JXSE_SEED_RELAY_URI)) { this.remove(Key); } } } private static final String JXSE_SEED_RDV_URI = "JXSE_SEED_RDV_URI"; ...
void function() { for (String Key : PropertiesUtil.stringPropertyNames(this)) { if ( Key.startsWith(JXSE_SEED_RELAY_URI)) { this.remove(Key); } } } private static final String JXSE_SEED_RDV_URI = STR; /** * Adds RendezvousService peer seed address using item numbers. If the {@code seedURI}
/** * Clears the list of RendezVousService seeds */
Clears the list of RendezVousService seeds
clearSeedRelays
{ "repo_name": "johnjianfang/jxse", "path": "src/main/java/net/jxse/configuration/JxsePeerConfiguration.java", "license": "apache-2.0", "size": 38745 }
[ "net.jxta.configuration.PropertiesUtil" ]
import net.jxta.configuration.PropertiesUtil;
import net.jxta.configuration.*;
[ "net.jxta.configuration" ]
net.jxta.configuration;
2,292,334
public static MappingSingleton getInstance() throws JAXBException, MissingResourceException { if (instance == null) { instance = new MappingSingleton(); } return instance; } // Private constructor, pattern Singleton. private MappingSingleton() throws JAXBException, MissingResourceException { // R...
static MappingSingleton function() throws JAXBException, MissingResourceException { if (instance == null) { instance = new MappingSingleton(); } return instance; } private MappingSingleton() throws JAXBException, MissingResourceException { JAXBContext context = JAXBContext.newInstance(IadMapping.class); Unmarshaller m ...
/** * Gets the only instance of this class. * * @throws JAXBException */
Gets the only instance of this class
getInstance
{ "repo_name": "hpclab/TheMatrixProject", "path": "src/it/cnr/isti/thematrix/configuration/MappingSingleton.java", "license": "gpl-3.0", "size": 2175 }
[ "it.cnr.isti.thematrix.configuration.mapping.IadMapping", "java.io.File", "java.util.MissingResourceException", "javax.xml.bind.JAXBContext", "javax.xml.bind.JAXBException", "javax.xml.bind.Unmarshaller" ]
import it.cnr.isti.thematrix.configuration.mapping.IadMapping; import java.io.File; import java.util.MissingResourceException; import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBException; import javax.xml.bind.Unmarshaller;
import it.cnr.isti.thematrix.configuration.mapping.*; import java.io.*; import java.util.*; import javax.xml.bind.*;
[ "it.cnr.isti", "java.io", "java.util", "javax.xml" ]
it.cnr.isti; java.io; java.util; javax.xml;
864,071
public ServiceResponse<List<Double>> getFloatValid() throws ErrorException, IOException { Call<ResponseBody> call = service.getFloatValid(); return getFloatValidDelegate(call.execute()); }
ServiceResponse<List<Double>> function() throws ErrorException, IOException { Call<ResponseBody> call = service.getFloatValid(); return getFloatValidDelegate(call.execute()); }
/** * Get float array value [0, -0.01, 1.2e20]. * * @throws ErrorException exception thrown from REST call * @throws IOException exception thrown from serialization/deserialization * @return the List&lt;Double&gt; object wrapped in {@link ServiceResponse} if successful. */
Get float array value [0, -0.01, 1.2e20]
getFloatValid
{ "repo_name": "stankovski/AutoRest", "path": "AutoRest/Generators/Java/Java.Tests/src/main/java/fixtures/bodyarray/ArrayOperationsImpl.java", "license": "mit", "size": 167174 }
[ "com.microsoft.rest.ServiceResponse", "java.io.IOException", "java.util.List" ]
import com.microsoft.rest.ServiceResponse; import java.io.IOException; import java.util.List;
import com.microsoft.rest.*; import java.io.*; import java.util.*;
[ "com.microsoft.rest", "java.io", "java.util" ]
com.microsoft.rest; java.io; java.util;
2,041,928
@SuppressWarnings("unchecked") public List<Cidadao> listarPorRole(String role) { if (trace) { logger.trace(String.format( "Listar cidadaos por role=%s", role)); } List<Cidadao> list = null; Query q = null; try { q = em.createQuery("from Cidadao where role like :role"); q.setParamet...
@SuppressWarnings(STR) List<Cidadao> function(String role) { if (trace) { logger.trace(String.format( STR, role)); } List<Cidadao> list = null; Query q = null; try { q = em.createQuery(STR); q.setParameter("role", role); list = (List<Cidadao>) q.getResultList(); } catch (Exception e) { if (trace) { logger.trace(STR, e)...
/** * Lista Cidadaos por Role. * @param role Role dos cidadaos. * @return Lista de Cidadaos. */
Lista Cidadaos por Role
listarPorRole
{ "repo_name": "robsonsmartins/fiap-mba-java-projects", "path": "source/tcc.fiap.jboss7/ReceitaNacionalCommon/src/receita/dao/CidadaoDAO.java", "license": "gpl-3.0", "size": 4614 }
[ "java.util.List", "javax.persistence.Query" ]
import java.util.List; import javax.persistence.Query;
import java.util.*; import javax.persistence.*;
[ "java.util", "javax.persistence" ]
java.util; javax.persistence;
2,023,722
public String getFromAddress() { String fromAddress = null; if (getFrom() == null || getFrom().isEmpty()) { fromAddress = null; } else { Matcher mEmail = EMAIL_WITH_NAME.matcher(getFrom()); if (mEmail.find()) { ...
String function() { String fromAddress = null; if (getFrom() == null getFrom().isEmpty()) { fromAddress = null; } else { Matcher mEmail = EMAIL_WITH_NAME.matcher(getFrom()); if (mEmail.find()) { fromAddress = mEmail.group(2); } else { fromAddress = getFrom(); } } return fromAddress; }
/** * Returns the 'Address' portion of an email address when the email contains a name. E.g. returns * "rmccullough@salesforce.com" if the email address is "Ryan McCullough <rmccullough@salesforce.com>". * If name is not present in the email address, returns null. * @return the 'Name' portion of an ...
Returns the 'Address' portion of an email address when the email contains a name. E.g. returns "rmccullough@salesforce.com" if the email address is "Ryan McCullough ". If name is not present in the email address, returns null
getFromAddress
{ "repo_name": "forcedotcom/scmt-server", "path": "src/main/java/com/desk/java/apiclient/model/Interaction.java", "license": "bsd-3-clause", "size": 15939 }
[ "java.util.regex.Matcher" ]
import java.util.regex.Matcher;
import java.util.regex.*;
[ "java.util" ]
java.util;
1,194,251
public void removeSubSystem(SubSystem subSystem, boolean clear) { if (subSystems.remove(subSystem)) { Node n = (Node) renderSystemNode.getChild(subSystem.getClass().getName()); if (n != null && !clear) { for (Spatial s : n.getChildren()) { if (spat...
void function(SubSystem subSystem, boolean clear) { if (subSystems.remove(subSystem)) { Node n = (Node) renderSystemNode.getChild(subSystem.getClass().getName()); if (n != null && !clear) { for (Spatial s : n.getChildren()) { if (spatials.containsValue(s)) { renderSystemNode.attachChild(s); } } } else if (n != null) { ...
/** * Remove a subSystem ratached to this system. * * @param subSystem the subSystem to remove. * @param clear does all spatial belong to that subSystem have to be purge ? */
Remove a subSystem ratached to this system
removeSubSystem
{ "repo_name": "meltzow/MultiverseKing_JME", "path": "MultiverseKingCore/src/org/multiverseking/render/RenderSystem.java", "license": "gpl-3.0", "size": 9901 }
[ "com.jme3.scene.Node", "com.jme3.scene.Spatial", "java.util.logging.Level", "java.util.logging.Logger", "org.multiverseking.utility.system.SubSystem" ]
import com.jme3.scene.Node; import com.jme3.scene.Spatial; import java.util.logging.Level; import java.util.logging.Logger; import org.multiverseking.utility.system.SubSystem;
import com.jme3.scene.*; import java.util.logging.*; import org.multiverseking.utility.system.*;
[ "com.jme3.scene", "java.util", "org.multiverseking.utility" ]
com.jme3.scene; java.util; org.multiverseking.utility;
1,800,897
protected static int readFully(InputStream stm, byte[] buf, int offset, int len) throws IOException { int n = 0; for (;;) { int nread = stm.read(buf, offset + n, len - n); if (nread <= 0) return (n == 0) ? nread : n; n += nread; if (n >= len) return n; } }
static int function(InputStream stm, byte[] buf, int offset, int len) throws IOException { int n = 0; for (;;) { int nread = stm.read(buf, offset + n, len - n); if (nread <= 0) return (n == 0) ? nread : n; n += nread; if (n >= len) return n; } }
/** * A utility function that tries to read up to <code>len</code> bytes from * <code>stm</code> * * @param stm an input stream * @param buf destiniation buffer * @param offset offset at which to store data * @param len number of bytes to read * @return actual number of bytes read *...
A utility function that tries to read up to <code>len</code> bytes from <code>stm</code>
readFully
{ "repo_name": "tseen/Federated-HDFS", "path": "tseenliu/FedHDFS-hadoop-src/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FSInputChecker.java", "license": "apache-2.0", "size": 16370 }
[ "java.io.IOException", "java.io.InputStream" ]
import java.io.IOException; import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
1,735,896
private static void prependZero(@NonNull final StringBuilder format, final int number, final int digits) { if( digits >= 3 && number < 100 ) { format.append( 0 ); } if( digits >= 2 && number < 10 ) { format.append( 0 ); } format.append(number); }
static void function(@NonNull final StringBuilder format, final int number, final int digits) { if( digits >= 3 && number < 100 ) { format.append( 0 ); } if( digits >= 2 && number < 10 ) { format.append( 0 ); } format.append(number); }
/** * Add a zero before the number if its less then 10. * * @param format builder * @param number to append */
Add a zero before the number if its less then 10
prependZero
{ "repo_name": "felixWackernagel/sidekick", "path": "sidekick/src/main/java/de/wackernagel/android/sidekick/converters/DateConverter.java", "license": "apache-2.0", "size": 4365 }
[ "android.support.annotation.NonNull" ]
import android.support.annotation.NonNull;
import android.support.annotation.*;
[ "android.support" ]
android.support;
870,938
public JavaClass getJavaClass() { return mJavaClass; }
JavaClass function() { return mJavaClass; }
/** * Gets the JavaClass for this definition. * @return the JavaClass */
Gets the JavaClass for this definition
getJavaClass
{ "repo_name": "checkstyle/contribution", "path": "bcel/src/checkstyle/com/puppycrawl/tools/checkstyle/bcel/classfile/JavaClassDefinition.java", "license": "lgpl-2.1", "size": 6201 }
[ "org.apache.bcel.classfile.JavaClass" ]
import org.apache.bcel.classfile.JavaClass;
import org.apache.bcel.classfile.*;
[ "org.apache.bcel" ]
org.apache.bcel;
905,753
public List<String> getCellCssClassAttributes() { return cellCssClassAttributes; }
List<String> function() { return cellCssClassAttributes; }
/** * List of css class HTML attribute values ordered by the order in which the cell appears * * @return the list of css class HTML attributes for cells */
List of css class HTML attribute values ordered by the order in which the cell appears
getCellCssClassAttributes
{ "repo_name": "ricepanda/rice-git2", "path": "rice-framework/krad-web-framework/src/main/java/org/kuali/rice/krad/uif/layout/CssGridLayoutManagerBase.java", "license": "apache-2.0", "size": 6697 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,050,149
public static boolean compareSet(Set s1, Set s2) { if (s1 == null) { return s2 == null; } else if (s2 == null) { return false; } if (s1.size() != s2.size()) { return false; } s...
static boolean function(Set s1, Set s2) { if (s1 == null) { return s2 == null; } else if (s2 == null) { return false; } if (s1.size() != s2.size()) { return false; } s2 = new HashSet(s2); Iterator i = s1.iterator(); while (i.hasNext()) { Person obj = (Person) i.next(); boolean found = false; Iterator j = s2.iterator();...
/** * Compares two sets of Person. Returns true if and only if the two sets * contain the same number of objects and each element of the first set has * a corresponding element in the second set whose fields compare equal * according to the compareTo() method. * @return <i>true</i> if the ...
Compares two sets of Person. Returns true if and only if the two sets contain the same number of objects and each element of the first set has a corresponding element in the second set whose fields compare equal according to the compareTo() method
compareSet
{ "repo_name": "datanucleus/tests", "path": "jpa/rdbms/src/java/org/datanucleus/samples/annotations/models/company/Manager.java", "license": "apache-2.0", "size": 4430 }
[ "java.util.HashSet", "java.util.Iterator", "java.util.Set" ]
import java.util.HashSet; import java.util.Iterator; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,860,289
public static void openErrorDialog(Shell shell, String title, String description, String reason, List<String> errorList) { LOGGER.debug("shell:" + shell + "messasge:" + reason + "errorList:" + errorList); org.eclipse.jface.dialogs.ErrorDialog .openError(sh...
static void function(Shell shell, String title, String description, String reason, List<String> errorList) { LOGGER.debug(STR + shell + STR + reason + STR + errorList); org.eclipse.jface.dialogs.ErrorDialog .openError(shell, title, description, ErrorDialog .createMultiStatus(IStatus.ERROR, reason, errorList)); }
/** * It displays an error dialog the error icon.<br/> * View (only if Exception is passed) and trace error message.<br/> * * @param shell * Shell * @param title * Title * @param description * The top message * @param reason * ...
It displays an error dialog the error icon. View (only if Exception is passed) and trace error message
openErrorDialog
{ "repo_name": "azkaoru/migration-tool", "path": "src/tubame.knowhow/src/tubame/knowhow/plugin/ui/dialog/ErrorDialog.java", "license": "apache-2.0", "size": 6423 }
[ "java.util.List", "org.eclipse.core.runtime.IStatus", "org.eclipse.swt.widgets.Shell" ]
import java.util.List; import org.eclipse.core.runtime.IStatus; import org.eclipse.swt.widgets.Shell;
import java.util.*; import org.eclipse.core.runtime.*; import org.eclipse.swt.widgets.*;
[ "java.util", "org.eclipse.core", "org.eclipse.swt" ]
java.util; org.eclipse.core; org.eclipse.swt;
1,838,248
public static Map<String, CCModel> parseObjModels(ResourceLocation res, int vertexMode, Transformation coordSystem) { try { return parseObjModels(Minecraft.getMinecraft().getResourceManager().getResource(res).getInputStream(), vertexMode, coordSystem); } catch (Exception e) { throw new RuntimeException("f...
static Map<String, CCModel> function(ResourceLocation res, int vertexMode, Transformation coordSystem) { try { return parseObjModels(Minecraft.getMinecraft().getResourceManager().getResource(res).getInputStream(), vertexMode, coordSystem); } catch (Exception e) { throw new RuntimeException(STR + res, e); } }
/** * Parses vertices, texture coords, normals and polygons from a WaveFront Obj file * * @param res * The resource for the obj file * @param vertexMode * The vertex mode to create the model for (GL_TRIANGLES or GL_QUADS) * @param coordSystem * The cooridnate system tra...
Parses vertices, texture coords, normals and polygons from a WaveFront Obj file
parseObjModels
{ "repo_name": "Todkommt/Mass-Effect-Ships-Mod", "path": "lib/src/CoFHCore/src/main/java/cofh/repack/codechicken/lib/render/CCModel.java", "license": "gpl-3.0", "size": 31853 }
[ "java.util.Map", "net.minecraft.client.Minecraft", "net.minecraft.util.ResourceLocation" ]
import java.util.Map; import net.minecraft.client.Minecraft; import net.minecraft.util.ResourceLocation;
import java.util.*; import net.minecraft.client.*; import net.minecraft.util.*;
[ "java.util", "net.minecraft.client", "net.minecraft.util" ]
java.util; net.minecraft.client; net.minecraft.util;
1,006,677
public AccountingDocument getAccountingDocumentForValidation() { return accountingDocumentForValidation; }
AccountingDocument function() { return accountingDocumentForValidation; }
/** * Gets the accountingDocumentForValdation attribute. * @return Returns the accountingDocumentForValdation. */
Gets the accountingDocumentForValdation attribute
getAccountingDocumentForValidation
{ "repo_name": "ua-eas/ua-kfs-5.3", "path": "work/src/org/kuali/kfs/sys/document/validation/impl/OptionalOneSidedDocumentAccountingLinesCountValidation.java", "license": "agpl-3.0", "size": 3387 }
[ "org.kuali.kfs.sys.document.AccountingDocument" ]
import org.kuali.kfs.sys.document.AccountingDocument;
import org.kuali.kfs.sys.document.*;
[ "org.kuali.kfs" ]
org.kuali.kfs;
1,029,984
public int getEnchantmentId(String enchantment) { return Item.getEnchantments().indexOf(enchantment); }
int function(String enchantment) { return Item.getEnchantments().indexOf(enchantment); }
/** * Gets the ID of the enchantment specified * * @param enchantment - The enchantment name * @return The ID of the enchantment, or -1 if not found */
Gets the ID of the enchantment specified
getEnchantmentId
{ "repo_name": "simo415/spc", "path": "src/com/sijobe/spc/command/Enchant.java", "license": "lgpl-3.0", "size": 3506 }
[ "com.sijobe.spc.wrapper.Item" ]
import com.sijobe.spc.wrapper.Item;
import com.sijobe.spc.wrapper.*;
[ "com.sijobe.spc" ]
com.sijobe.spc;
1,460,801
SoftwareComponentContainer getComponents();
SoftwareComponentContainer getComponents();
/** * Returns the software components produced by this project. * * @return The components for this project. */
Returns the software components produced by this project
getComponents
{ "repo_name": "lsmaira/gradle", "path": "subprojects/core-api/src/main/java/org/gradle/api/Project.java", "license": "apache-2.0", "size": 72230 }
[ "org.gradle.api.component.SoftwareComponentContainer" ]
import org.gradle.api.component.SoftwareComponentContainer;
import org.gradle.api.component.*;
[ "org.gradle.api" ]
org.gradle.api;
2,646,092
public void show(Player observer, Location location); /** * Shows the hologram to a player at a specific location * * @param observer player to clear the hologram display for * @param x x coordinate of the location to show the hologram at * @param y y co...
void function(Player observer, Location location); /** * Shows the hologram to a player at a specific location * * @param observer player to clear the hologram display for * @param x x coordinate of the location to show the hologram at * @param y y coordinate of the location to show the hologram at * @param z z coordin...
/** * Shows the hologram to a player at a location * * @param observer player to show the hologram to * @param location location that the hologram is visible at */
Shows the hologram to a player at a location
show
{ "repo_name": "khmMinecraftProjects/HoloAPI", "path": "src/main/java/com/dsh105/holoapi/api/Hologram.java", "license": "gpl-3.0", "size": 16495 }
[ "com.dsh105.holoapi.api.visibility.Visibility", "org.bukkit.Location", "org.bukkit.entity.Player" ]
import com.dsh105.holoapi.api.visibility.Visibility; import org.bukkit.Location; import org.bukkit.entity.Player;
import com.dsh105.holoapi.api.visibility.*; import org.bukkit.*; import org.bukkit.entity.*;
[ "com.dsh105.holoapi", "org.bukkit", "org.bukkit.entity" ]
com.dsh105.holoapi; org.bukkit; org.bukkit.entity;
2,765,684
private void pvMoveBeforeFistRow() throws DBSIOException{ wDAO.moveBeforeFirstRow(); }
void function() throws DBSIOException{ wDAO.moveBeforeFirstRow(); }
/** * Move para o registro anterior ao primeiro registro. * @throws DBSIOException */
Move para o registro anterior ao primeiro registro
pvMoveBeforeFistRow
{ "repo_name": "dbsoftcombr/dbsfaces", "path": "src/main/java/br/com/dbsoft/ui/bean/crud/DBSCrudOldBean.java", "license": "mit", "size": 120397 }
[ "br.com.dbsoft.error.DBSIOException" ]
import br.com.dbsoft.error.DBSIOException;
import br.com.dbsoft.error.*;
[ "br.com.dbsoft" ]
br.com.dbsoft;
1,635,577
//--------// // getPid // //--------// public static String getPid () throws IOException { String pid = new File("/proc/self").getCanonicalFile() .getName(); logger.debug("pid: {}", pid); return pid; }
static String function () throws IOException { String pid = new File(STR).getCanonicalFile() .getName(); logger.debug(STR, pid); return pid; }
/** * Report the pid of the current process. * * @return the process id, as a string */
Report the pid of the current process
getPid
{ "repo_name": "jlpoolen/libreveris", "path": "src/installer/com/audiveris/installer/unix/UnixUtilities.java", "license": "lgpl-3.0", "size": 3016 }
[ "java.io.File", "java.io.IOException" ]
import java.io.File; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,659,378
public void close() throws IOException { if (mPositionReader != null) { mPositionReader.close(); } mPositionReader = null; mPositionReaderUnit = null; }
void function() throws IOException { if (mPositionReader != null) { mPositionReader.close(); } mPositionReader = null; mPositionReaderUnit = null; }
/** * Closes all open resources. */
Closes all open resources
close
{ "repo_name": "injectnique/KnuckleHeadedMcSpazatron", "path": "Tools/TeaTrove-Tea/teatrove-Tea-3.2.0/Tea3.2.0/Code/Java/com/go/tea/util/ConsoleErrorReporter.java", "license": "mit", "size": 5877 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,556,860
public Module fetchByUserId_First(long userId, OrderByComparator orderByComparator) throws SystemException { List<Module> list = findByUserId(userId, 0, 1, orderByComparator); if (!list.isEmpty()) { return list.get(0); } return null; }
Module function(long userId, OrderByComparator orderByComparator) throws SystemException { List<Module> list = findByUserId(userId, 0, 1, orderByComparator); if (!list.isEmpty()) { return list.get(0); } return null; }
/** * Returns the first module in the ordered set where userId = &#63;. * * @param userId the user ID * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the first matching module, or <code>null</code> if a matching module could not be found * @throws Syste...
Returns the first module in the ordered set where userId = &#63;
fetchByUserId_First
{ "repo_name": "TelefonicaED/liferaylms-portlet", "path": "docroot/WEB-INF/src/com/liferay/lms/service/persistence/ModulePersistenceImpl.java", "license": "agpl-3.0", "size": 125928 }
[ "com.liferay.lms.model.Module", "com.liferay.portal.kernel.exception.SystemException", "com.liferay.portal.kernel.util.OrderByComparator", "java.util.List" ]
import com.liferay.lms.model.Module; import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.kernel.util.OrderByComparator; import java.util.List;
import com.liferay.lms.model.*; import com.liferay.portal.kernel.exception.*; import com.liferay.portal.kernel.util.*; import java.util.*;
[ "com.liferay.lms", "com.liferay.portal", "java.util" ]
com.liferay.lms; com.liferay.portal; java.util;
2,212,309
QuerySmResult queryShortMessage(String messageId, TypeOfNumber sourceAddrTon, NumberingPlanIndicator sourceAddrNpi, String sourceAddr) throws PDUException, ResponseTimeoutException, InvalidResponseException, NegativeResponseException, IOException;
QuerySmResult queryShortMessage(String messageId, TypeOfNumber sourceAddrTon, NumberingPlanIndicator sourceAddrNpi, String sourceAddr) throws PDUException, ResponseTimeoutException, InvalidResponseException, NegativeResponseException, IOException;
/** * Query previous submitted short message based on it's message_id and * message_id. This method will blocks until response received or timeout * reached. This method is simplify operations of sending QUERY_SM and * receiving QUERY_SM_RESP. * * @param messageId is the message_id. ...
Query previous submitted short message based on it's message_id and message_id. This method will blocks until response received or timeout reached. This method is simplify operations of sending QUERY_SM and receiving QUERY_SM_RESP
queryShortMessage
{ "repo_name": "opentelecoms-org/jsmpp", "path": "jsmpp/src/main/java/org/jsmpp/session/ClientSession.java", "license": "apache-2.0", "size": 13511 }
[ "java.io.IOException", "org.jsmpp.InvalidResponseException", "org.jsmpp.PDUException", "org.jsmpp.bean.NumberingPlanIndicator", "org.jsmpp.bean.TypeOfNumber", "org.jsmpp.extra.NegativeResponseException", "org.jsmpp.extra.ResponseTimeoutException" ]
import java.io.IOException; import org.jsmpp.InvalidResponseException; import org.jsmpp.PDUException; import org.jsmpp.bean.NumberingPlanIndicator; import org.jsmpp.bean.TypeOfNumber; import org.jsmpp.extra.NegativeResponseException; import org.jsmpp.extra.ResponseTimeoutException;
import java.io.*; import org.jsmpp.*; import org.jsmpp.bean.*; import org.jsmpp.extra.*;
[ "java.io", "org.jsmpp", "org.jsmpp.bean", "org.jsmpp.extra" ]
java.io; org.jsmpp; org.jsmpp.bean; org.jsmpp.extra;
2,233,800
@NonNull public AppComponent appComponent() { if (appComponent == null) { synchronized (MainApp.class) { if (appComponent == null) { appComponent = createAppComponent(); } } } return appComponent; }
AppComponent function() { if (appComponent == null) { synchronized (MainApp.class) { if (appComponent == null) { appComponent = createAppComponent(); } } } return appComponent; }
/** * Creates the appComponent object if not created and returns it * @return */
Creates the appComponent object if not created and returns it
appComponent
{ "repo_name": "PiXeL16/Sea-Nec-IO", "path": "app/src/main/java/com/greenpixels/seanecio/general_classes/MainApp.java", "license": "mit", "size": 2958 }
[ "com.greenpixels.seanecio.components.AppComponent" ]
import com.greenpixels.seanecio.components.AppComponent;
import com.greenpixels.seanecio.components.*;
[ "com.greenpixels.seanecio" ]
com.greenpixels.seanecio;
976,272
void addAttachment(Attachment attachment);
void addAttachment(Attachment attachment);
/** * Adds the specified attachment to our list of Attachments. * * @param attachment attachment to add */
Adds the specified attachment to our list of Attachments
addAttachment
{ "repo_name": "Multi-Support/droolsjbpm-knowledge", "path": "kie-internal/src/main/java/org/kie/internal/task/api/model/InternalTaskData.java", "license": "apache-2.0", "size": 4758 }
[ "org.kie.api.task.model.Attachment" ]
import org.kie.api.task.model.Attachment;
import org.kie.api.task.model.*;
[ "org.kie.api" ]
org.kie.api;
1,716,930
@CheckReturnValue public LocalTimeAssert assertThat(LocalTime actual) { return proxy(LocalTimeAssert.class, LocalTime.class, actual); }
LocalTimeAssert function(LocalTime actual) { return proxy(LocalTimeAssert.class, LocalTime.class, actual); }
/** * Creates a new instance of <code>{@link LocalTimeAssert}</code>. * * @param actual the actual value. * @return the created assertion object. */
Creates a new instance of <code><code>LocalTimeAssert</code></code>
assertThat
{ "repo_name": "ChrisA89/assertj-core", "path": "src/main/java/org/assertj/core/api/AbstractStandardSoftAssertions.java", "license": "apache-2.0", "size": 10569 }
[ "java.time.LocalTime" ]
import java.time.LocalTime;
import java.time.*;
[ "java.time" ]
java.time;
1,660,252
public void addRootContainerReference(EClass rootContainer) { EReference reference = ecoreFactory.createEReference(); reference.setName("containedElements"); reference.setUpperBound(-1); // one to many relation reference.setEType(EcorePackage.eINSTANCE.getEObject()); referenc...
void function(EClass rootContainer) { EReference reference = ecoreFactory.createEReference(); reference.setName(STR); reference.setUpperBound(-1); reference.setEType(EcorePackage.eINSTANCE.getEObject()); reference.setContainment(true); rootContainer.getEStructuralFeatures().add(reference); }
/** * Adds a root container {@link EReference} to an root container {@link EClass}. The root container * {@link EReference} is a one-to-many reference to {@link EObject}. * @param rootContainer is the root container {@link EClass}. */
Adds a root container <code>EReference</code> to an root container <code>EClass</code>. The root container <code>EReference</code> is a one-to-many reference to <code>EObject</code>
addRootContainerReference
{ "repo_name": "tsaglam/EcoreMetamodelExtraction", "path": "src/main/java/eme/generator/EMemberGenerator.java", "license": "epl-1.0", "size": 9428 }
[ "org.eclipse.emf.ecore.EClass", "org.eclipse.emf.ecore.EReference", "org.eclipse.emf.ecore.EcorePackage" ]
import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EReference; import org.eclipse.emf.ecore.EcorePackage;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
159,324
public void setUI(TaskPaneContainerUI ui) { super.setUI(ui); } /** * Returns the name of the L&F class that renders this component. * * @return the string {@link #uiClassID}
void function(TaskPaneContainerUI ui) { super.setUI(ui); } /** * Returns the name of the L&F class that renders this component. * * @return the string {@link #uiClassID}
/** * Sets the L&F object that renders this component. * * @param ui the <code>TaskPaneContainerUI</code> L&F object * @see javax.swing.UIDefaults#getUI * * @beaninfo bound: true hidden: true description: The UI object that * implements the taskpane's LookAndFeel. */
Sets the L&F object that renders this component
setUI
{ "repo_name": "trejkaz/swingx", "path": "swingx-core/src/main/java/org/jdesktop/swingx/JXTaskPaneContainer.java", "license": "lgpl-2.1", "size": 5552 }
[ "org.jdesktop.swingx.plaf.TaskPaneContainerUI" ]
import org.jdesktop.swingx.plaf.TaskPaneContainerUI;
import org.jdesktop.swingx.plaf.*;
[ "org.jdesktop.swingx" ]
org.jdesktop.swingx;
1,615,019
@Test public void applyExceptionWithoutDescription() throws SQLException { Exception exception = new UnsupportedOperationException(); PreparedStatement statement = mock(PreparedStatement.class); ArgumentCaptor<String> captor = ArgumentCaptor.forClass(String.class); new ExceptionToken(Collections.emptyList...
void function() throws SQLException { Exception exception = new UnsupportedOperationException(); PreparedStatement statement = mock(PreparedStatement.class); ArgumentCaptor<String> captor = ArgumentCaptor.forClass(String.class); new ExceptionToken(Collections.emptyList()).apply(createLogEntry(exception), statement, 1);...
/** * Verifies that an exception without description will be added correctly rendered to a {@link PreparedStatement}. * * @throws SQLException * Failed to add value to prepared SQL statement */
Verifies that an exception without description will be added correctly rendered to a <code>PreparedStatement</code>
applyExceptionWithoutDescription
{ "repo_name": "pmwmedia/tinylog", "path": "tinylog-impl/src/test/java/org/tinylog/pattern/ExceptionTokenTest.java", "license": "apache-2.0", "size": 9601 }
[ "java.sql.PreparedStatement", "java.sql.SQLException", "java.util.Collections", "org.assertj.core.api.Assertions", "org.mockito.ArgumentCaptor", "org.mockito.Mockito" ]
import java.sql.PreparedStatement; import java.sql.SQLException; import java.util.Collections; import org.assertj.core.api.Assertions; import org.mockito.ArgumentCaptor; import org.mockito.Mockito;
import java.sql.*; import java.util.*; import org.assertj.core.api.*; import org.mockito.*;
[ "java.sql", "java.util", "org.assertj.core", "org.mockito" ]
java.sql; java.util; org.assertj.core; org.mockito;
1,585,911
protected Optional<String> getDeleteLimitWhereClause(@SuppressWarnings("unused") int limit) { return Optional.empty(); };
Optional<String> function(@SuppressWarnings(STR) int limit) { return Optional.empty(); };
/** * Returns the SQL that specifies the deletion limit in the WHERE clause, if any, for the dialect. * * @param limit The delete limit. * @return The SQL fragment. */
Returns the SQL that specifies the deletion limit in the WHERE clause, if any, for the dialect
getDeleteLimitWhereClause
{ "repo_name": "alfasoftware/morf", "path": "morf-core/src/main/java/org/alfasoftware/morf/jdbc/SqlDialect.java", "license": "apache-2.0", "size": 144949 }
[ "java.util.Optional" ]
import java.util.Optional;
import java.util.*;
[ "java.util" ]
java.util;
1,483,904
static AttributeDescriptor createAttribute(String typeSpec) throws SchemaException { int split = typeSpec.indexOf(":"); String name; String type; String hint = null; if (split == -1) { name = typeSpec; type = "String"; } else { na...
static AttributeDescriptor createAttribute(String typeSpec) throws SchemaException { int split = typeSpec.indexOf(":"); String name; String type; String hint = null; if (split == -1) { name = typeSpec; type = STR; } else { name = typeSpec.substring(0, split); int split2 = typeSpec.indexOf(":", split + 1); if (split2 ==...
/** * Generate AttributeDescriptor based on String type specification (based on UML). * * <p>Will parse a String of the form: <i>"name:Type:hint" as described in {@link * #createType}</i> * * @see #createType * @throws SchemaException If typeSpect could not be interpreted */
Generate AttributeDescriptor based on String type specification (based on UML). Will parse a String of the form: "name:Type:hint" as described in <code>#createType</code>
createAttribute
{ "repo_name": "geotools/geotools", "path": "modules/library/main/src/main/java/org/geotools/data/DataUtilities.java", "license": "lgpl-2.1", "size": 114940 }
[ "java.util.Collections", "java.util.StringTokenizer", "org.geotools.feature.FeatureCollection", "org.geotools.feature.FeatureIterator", "org.geotools.feature.NameImpl", "org.geotools.feature.SchemaException", "org.geotools.feature.type.AttributeDescriptorImpl", "org.geotools.feature.type.AttributeType...
import java.util.Collections; import java.util.StringTokenizer; import org.geotools.feature.FeatureCollection; import org.geotools.feature.FeatureIterator; import org.geotools.feature.NameImpl; import org.geotools.feature.SchemaException; import org.geotools.feature.type.AttributeDescriptorImpl; import org.geotools.fea...
import java.util.*; import org.geotools.feature.*; import org.geotools.feature.type.*; import org.geotools.referencing.*; import org.locationtech.jts.geom.*; import org.opengis.feature.type.*; import org.opengis.referencing.crs.*;
[ "java.util", "org.geotools.feature", "org.geotools.referencing", "org.locationtech.jts", "org.opengis.feature", "org.opengis.referencing" ]
java.util; org.geotools.feature; org.geotools.referencing; org.locationtech.jts; org.opengis.feature; org.opengis.referencing;
133,404
public void addHeader(String header, String value) { synchronized (mLock) { validateNotStarted(); if (mAdditionalHeaders == null) { mAdditionalHeaders = new HashMap<String, String>(); } mAdditionalHeaders.put(header, value); } }
void function(String header, String value) { synchronized (mLock) { validateNotStarted(); if (mAdditionalHeaders == null) { mAdditionalHeaders = new HashMap<String, String>(); } mAdditionalHeaders.put(header, value); } }
/** * Adds a request header. Must be done before request has started. */
Adds a request header. Must be done before request has started
addHeader
{ "repo_name": "axinging/chromium-crosswalk", "path": "components/cronet/android/java/src/org/chromium/net/ChromiumUrlRequest.java", "license": "bsd-3-clause", "size": 26226 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
1,524,099
@Test public void testSetAllWrite() { try { debugPrintTestName(); //get the default options ClientOptions clientOpts = new ClientOptions(); assertFalse("Default setting for isAllWrite should be false.", clientOpts.isAllWrite()); String clientRoot = client.getRoot(); assertNotNull("client...
void function() { try { debugPrintTestName(); ClientOptions clientOpts = new ClientOptions(); assertFalse(STR, clientOpts.isAllWrite()); String clientRoot = client.getRoot(); assertNotNull(STR, clientRoot); server.setCurrentClient(client); String newFile = clientRoot + File.separator + clientDir + File.separator + STR;...
/** * allwrite noallwrite Leaves all files writable on the client; * else only checked out files are writable. If set, files may be clobbered * ignoring the clobber option below. */
allwrite noallwrite Leaves all files writable on the client; else only checked out files are writable. If set, files may be clobbered ignoring the clobber option below
testSetAllWrite
{ "repo_name": "groboclown/p4ic4idea", "path": "p4java/src/test/java/com/perforce/p4java/tests/dev/unit/endtoend/ClientOptionsE2ETest.java", "license": "apache-2.0", "size": 14318 }
[ "com.perforce.p4java.core.IChangelist", "com.perforce.p4java.core.file.FileSpecBuilder", "com.perforce.p4java.core.file.IFileSpec", "com.perforce.p4java.impl.generic.client.ClientOptions", "java.io.File", "java.util.List", "org.junit.Assert" ]
import com.perforce.p4java.core.IChangelist; import com.perforce.p4java.core.file.FileSpecBuilder; import com.perforce.p4java.core.file.IFileSpec; import com.perforce.p4java.impl.generic.client.ClientOptions; import java.io.File; import java.util.List; import org.junit.Assert;
import com.perforce.p4java.core.*; import com.perforce.p4java.core.file.*; import com.perforce.p4java.impl.generic.client.*; import java.io.*; import java.util.*; import org.junit.*;
[ "com.perforce.p4java", "java.io", "java.util", "org.junit" ]
com.perforce.p4java; java.io; java.util; org.junit;
2,751,523
protected String computeModuleCardName(Module module) { if (module instanceof BeanCollectionModule) { return Integer.toHexString(module.hashCode()); } else { // Simple modules, bean modules can share UI IViewDescriptor pvd = module.getProjectedViewDescriptor(); if (pvd != null) { ...
String function(Module module) { if (module instanceof BeanCollectionModule) { return Integer.toHexString(module.hashCode()); } else { IViewDescriptor pvd = module.getProjectedViewDescriptor(); if (pvd != null) { return Integer.toHexString(pvd.hashCode()); } } return Integer.toHexString(module.hashCode()); }
/** * Computes a identifier that is unique per module view. * * @param module * the module * @return the string */
Computes a identifier that is unique per module view
computeModuleCardName
{ "repo_name": "jspresso/jspresso-ce", "path": "application/src/main/java/org/jspresso/framework/application/view/descriptor/basic/WorkspaceCardViewDescriptor.java", "license": "lgpl-3.0", "size": 3119 }
[ "org.jspresso.framework.application.model.BeanCollectionModule", "org.jspresso.framework.application.model.Module", "org.jspresso.framework.view.descriptor.IViewDescriptor" ]
import org.jspresso.framework.application.model.BeanCollectionModule; import org.jspresso.framework.application.model.Module; import org.jspresso.framework.view.descriptor.IViewDescriptor;
import org.jspresso.framework.application.model.*; import org.jspresso.framework.view.descriptor.*;
[ "org.jspresso.framework" ]
org.jspresso.framework;
94,824
@Test public final void test_that_the_same_Indentation_instance_is_returned_for_the_same_previous_Indentation() { final Indentation indentation = builder.newIndentation(mockIndentation); assertSame(indentation, builder.newIndentation(mockIndentation)); }
final void function() { final Indentation indentation = builder.newIndentation(mockIndentation); assertSame(indentation, builder.newIndentation(mockIndentation)); }
/** * Tests that the same {@code Indentation} instance is returned for the same previous {@code Indentation}. */
Tests that the same Indentation instance is returned for the same previous Indentation
test_that_the_same_Indentation_instance_is_returned_for_the_same_previous_Indentation
{ "repo_name": "hilcode/text", "path": "src/test/java/com/github/hilcode/text/impl/DefaultIndentationBuilderTest.java", "license": "mpl-2.0", "size": 2935 }
[ "com.github.hilcode.text.Indentation", "org.junit.Assert" ]
import com.github.hilcode.text.Indentation; import org.junit.Assert;
import com.github.hilcode.text.*; import org.junit.*;
[ "com.github.hilcode", "org.junit" ]
com.github.hilcode; org.junit;
2,862,935
public interface Executable extends Runnable { SubTask getParent();
interface Executable extends Runnable { SubTask function();
/** * Task from which this executable was created. * Never null. * * <p> * Since this method went through a signature change in 1.377, the invocation may results in * {@link AbstractMethodError}. * Use {@link Executables#getParentOf(Executable)} that avoids...
Task from which this executable was created. Never null. Since this method went through a signature change in 1.377, the invocation may results in <code>AbstractMethodError</code>. Use <code>Executables#getParentOf(Executable)</code> that avoids this
getParent
{ "repo_name": "jtnord/jenkins", "path": "core/src/main/java/hudson/model/Queue.java", "license": "mit", "size": 59609 }
[ "hudson.model.queue.SubTask" ]
import hudson.model.queue.SubTask;
import hudson.model.queue.*;
[ "hudson.model.queue" ]
hudson.model.queue;
2,296,359
public BigDecimal getMargin(); public static final String COLUMNNAME_M_PriceList_Version_ID = "M_PriceList_Version_ID";
BigDecimal function(); public static final String COLUMNNAME_M_PriceList_Version_ID = STR;
/** Get Margin %. * Margin for a product as a percentage */
Get Margin %. Margin for a product as a percentage
getMargin
{ "repo_name": "geneos/adempiere", "path": "base/src/org/compiere/model/I_RV_WarehousePrice.java", "license": "gpl-2.0", "size": 9934 }
[ "java.math.BigDecimal" ]
import java.math.BigDecimal;
import java.math.*;
[ "java.math" ]
java.math;
2,843,890
ResolveScheduling getResolveScheduling() throws ServiceException;
ResolveScheduling getResolveScheduling() throws ServiceException;
/** * Getter for the ResolveScheduling. * * @return the ResolveScheduling. * @throws ServiceException */
Getter for the ResolveScheduling
getResolveScheduling
{ "repo_name": "NABUCCO/org.nabucco.business.scheduling", "path": "org.nabucco.business.scheduling.facade.component/src/main/gen/org/nabucco/business/scheduling/facade/component/SchedulingComponent.java", "license": "epl-1.0", "size": 2543 }
[ "org.nabucco.business.scheduling.facade.service.resolve.ResolveScheduling", "org.nabucco.framework.base.facade.exception.service.ServiceException" ]
import org.nabucco.business.scheduling.facade.service.resolve.ResolveScheduling; import org.nabucco.framework.base.facade.exception.service.ServiceException;
import org.nabucco.business.scheduling.facade.service.resolve.*; import org.nabucco.framework.base.facade.exception.service.*;
[ "org.nabucco.business", "org.nabucco.framework" ]
org.nabucco.business; org.nabucco.framework;
1,921,862