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
void setWrappedModel(TableModel model);
void setWrappedModel(TableModel model);
/** * Causes this wrapper to wrap the given model instead of the one it was * formerly wrapping. */
Causes this wrapper to wrap the given model instead of the one it was formerly wrapping
setWrappedModel
{ "repo_name": "amitkr/sqlpower-library", "path": "src/main/java/ca/sqlpower/swingui/table/TableModelWrapper.java", "license": "gpl-3.0", "size": 1353 }
[ "javax.swing.table.TableModel" ]
import javax.swing.table.TableModel;
import javax.swing.table.*;
[ "javax.swing" ]
javax.swing;
2,732,931
@Override public void log(final Level level, final String message) { first .log(level, message); second.log(level, message); }
void function(final Level level, final String message) { first .log(level, message); second.log(level, message); }
/** * Logs a record at the specified level. */
Logs a record at the specified level
log
{ "repo_name": "apache/sis", "path": "core/sis-utility/src/main/java/org/apache/sis/util/logging/DualLogger.java", "license": "apache-2.0", "size": 3898 }
[ "java.util.logging.Level" ]
import java.util.logging.Level;
import java.util.logging.*;
[ "java.util" ]
java.util;
2,217,785
private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); this.wallPaint = SerialUtilities.readPaint(stream); }
void function(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); this.wallPaint = SerialUtilities.readPaint(stream); }
/** * Provides serialization support. * * @param stream the input stream. * * @throws IOException if there is an I/O error. * @throws ClassNotFoundException if there is a classpath problem. */
Provides serialization support
readObject
{ "repo_name": "nologic/nabs", "path": "client/trunk/shared/libraries/jfreechart-1.0.5/source/org/jfree/chart/renderer/category/LineRenderer3D.java", "license": "gpl-2.0", "size": 23549 }
[ "java.io.IOException", "java.io.ObjectInputStream", "org.jfree.io.SerialUtilities" ]
import java.io.IOException; import java.io.ObjectInputStream; import org.jfree.io.SerialUtilities;
import java.io.*; import org.jfree.io.*;
[ "java.io", "org.jfree.io" ]
java.io; org.jfree.io;
610,504
public ValidatorError storeMethod(User currentUser) { if (logger.isDebugEnabled()) { logger.debug("storeMethod(User currentUser=" + currentUser + ") - start"); } String dest = null; if (this.method.getType().equals(NotificationFactory.TYPE_EMAIL)) { ...
ValidatorError function(User currentUser) { if (logger.isDebugEnabled()) { logger.debug(STR + currentUser + STR); } String dest = null; if (this.method.getType().equals(NotificationFactory.TYPE_EMAIL)) { dest = this.method.getEmailAddress(); } else if (this.method.getType().equals(NotificationFactory.TYPE_PAGER)) { des...
/** * Persist the Method * @param currentUser The user/admin storing this method. Usually not the user * associated with the Notification Method and instead is the one who initiated * the save. * @return ValidatorError if the currentUser is in the wrong state or is * missing a field. ...
Persist the Method
storeMethod
{ "repo_name": "dmacvicar/spacewalk", "path": "java/code/src/com/redhat/rhn/manager/monitoring/ModifyMethodCommand.java", "license": "gpl-2.0", "size": 9049 }
[ "com.redhat.rhn.common.localization.LocalizationService", "com.redhat.rhn.common.validator.ValidatorError", "com.redhat.rhn.domain.monitoring.notification.Method", "com.redhat.rhn.domain.monitoring.notification.NotificationFactory", "com.redhat.rhn.domain.user.User", "org.apache.commons.lang.StringUtils" ...
import com.redhat.rhn.common.localization.LocalizationService; import com.redhat.rhn.common.validator.ValidatorError; import com.redhat.rhn.domain.monitoring.notification.Method; import com.redhat.rhn.domain.monitoring.notification.NotificationFactory; import com.redhat.rhn.domain.user.User; import org.apache.commons.l...
import com.redhat.rhn.common.localization.*; import com.redhat.rhn.common.validator.*; import com.redhat.rhn.domain.monitoring.notification.*; import com.redhat.rhn.domain.user.*; import org.apache.commons.lang.*;
[ "com.redhat.rhn", "org.apache.commons" ]
com.redhat.rhn; org.apache.commons;
1,619,469
public static Checkin getDataFromCursor(Cursor cursor) { long rowID = cursor.getLong(cursor.getColumnIndex(SymptomSchema.Checkin.Cols.ID)); String howbad = cursor.getString(cursor.getColumnIndex(SymptomSchema.Checkin.Cols.HOWBAD)); String painstop = cursor.getString(cursor.getColumnIndex(SymptomSchema.Checkin....
static Checkin function(Cursor cursor) { long rowID = cursor.getLong(cursor.getColumnIndex(SymptomSchema.Checkin.Cols.ID)); String howbad = cursor.getString(cursor.getColumnIndex(SymptomSchema.Checkin.Cols.HOWBAD)); String painstop = cursor.getString(cursor.getColumnIndex(SymptomSchema.Checkin.Cols.PAINSTOP)); String c...
/** * This method creates a new Checkin object getting the data from cursor object * * @param cursor a Cursor object that is mapped to the local database * @return a Checkin object with data read from cursor */
This method creates a new Checkin object getting the data from cursor object
getDataFromCursor
{ "repo_name": "estebanluengo/symptommanagment", "path": "Symptom/src/org/coursera/symptom/orm/Checkin.java", "license": "apache-2.0", "size": 11391 }
[ "android.database.Cursor", "org.coursera.symptom.provider.SymptomSchema" ]
import android.database.Cursor; import org.coursera.symptom.provider.SymptomSchema;
import android.database.*; import org.coursera.symptom.provider.*;
[ "android.database", "org.coursera.symptom" ]
android.database; org.coursera.symptom;
1,988,370
Distribution getDistribution() { return distribution; }
Distribution getDistribution() { return distribution; }
/** * Gets the distribution this operation represents * * @return Distribution */
Gets the distribution this operation represents
getDistribution
{ "repo_name": "tseen/Federated-HDFS", "path": "tseenliu/FedHDFS-hadoop-src/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/fs/slive/OperationData.java", "license": "apache-2.0", "size": 2900 }
[ "org.apache.hadoop.fs.slive.Constants" ]
import org.apache.hadoop.fs.slive.Constants;
import org.apache.hadoop.fs.slive.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,442,252
public Vector<MRFEdge> getEdges() { return m_Edges; }
Vector<MRFEdge> function() { return m_Edges; }
/** * <p>Method : getEdges * <p>Purpose : Returns the list of edges * <p>@return Vector<MRFEdge> */
Method : getEdges Purpose : Returns the list of edges @return Vector
getEdges
{ "repo_name": "Khalian/WSDAlphaExpansion", "path": "code/MRFGraph.java", "license": "apache-2.0", "size": 2330 }
[ "java.util.Vector" ]
import java.util.Vector;
import java.util.*;
[ "java.util" ]
java.util;
1,602,189
public PokestopLootResult loot() throws RequestFailedException { return AsyncHelper.toBlocking(lootAsync()); }
PokestopLootResult function() throws RequestFailedException { return AsyncHelper.toBlocking(lootAsync()); }
/** * Loots a pokestop for pokeballs and other items. * * @return PokestopLootResult * @throws RequestFailedException if an exception occurred while sending requests */
Loots a pokestop for pokeballs and other items
loot
{ "repo_name": "gegy1000/PokeGOAPI-Java", "path": "library/src/main/java/com/pokegoapi/api/map/fort/Fort.java", "license": "gpl-3.0", "size": 9019 }
[ "com.pokegoapi.exceptions.request.RequestFailedException", "com.pokegoapi.util.AsyncHelper" ]
import com.pokegoapi.exceptions.request.RequestFailedException; import com.pokegoapi.util.AsyncHelper;
import com.pokegoapi.exceptions.request.*; import com.pokegoapi.util.*;
[ "com.pokegoapi.exceptions", "com.pokegoapi.util" ]
com.pokegoapi.exceptions; com.pokegoapi.util;
541,869
void bookmarksOrHistoryPicker(boolean startWithHistory) { WebView current = mTabControl.getCurrentWebView(); if (current == null) { return; } Intent intent = new Intent(this, CombinedBookmarkHistoryActivity.class); String title = current.getTitle(...
void bookmarksOrHistoryPicker(boolean startWithHistory) { WebView current = mTabControl.getCurrentWebView(); if (current == null) { return; } Intent intent = new Intent(this, CombinedBookmarkHistoryActivity.class); String title = current.getTitle(); String url = current.getUrl(); Bitmap thumbnail = createScreenshot(cur...
/** * Open the Go page. * @param startWithHistory If true, open starting on the history tab. * Otherwise, start with the bookmarks tab. */
Open the Go page
bookmarksOrHistoryPicker
{ "repo_name": "xjwangliang/android_source_note", "path": "Browser_2.3/BrowserActivity/src/com/android/browser/BrowserActivity.java", "license": "apache-2.0", "size": 160209 }
[ "android.content.Intent", "android.graphics.Bitmap", "android.webkit.WebView" ]
import android.content.Intent; import android.graphics.Bitmap; import android.webkit.WebView;
import android.content.*; import android.graphics.*; import android.webkit.*;
[ "android.content", "android.graphics", "android.webkit" ]
android.content; android.graphics; android.webkit;
901,159
public void testDoReloadProperties( ) throws AccessDeniedException, IOException { String property = "junit_testDoReloadProperties"; String propertyValue = getRandomName( ); File luteceProperties = new File( getResourcesDir( ), "WEB-INF/conf/lutece.properties" ); Properties props...
void function( ) throws AccessDeniedException, IOException { String property = STR; String propertyValue = getRandomName( ); File luteceProperties = new File( getResourcesDir( ), STR ); Properties props = new Properties( ); InputStream is = new FileInputStream( luteceProperties ); props.load( is ); is.close( ); props.s...
/** * Test of doReloadProperties method, of class fr.paris.lutece.portal.web.system.SystemJspBean. * * @throws AccessDeniedException * @throws IOException */
Test of doReloadProperties method, of class fr.paris.lutece.portal.web.system.SystemJspBean
testDoReloadProperties
{ "repo_name": "lutece-platform/lutece-core", "path": "src/test/java/fr/paris/lutece/portal/web/system/CacheJspBeanTest.java", "license": "bsd-3-clause", "size": 23149 }
[ "fr.paris.lutece.portal.business.user.AdminUser", "fr.paris.lutece.portal.service.admin.AccessDeniedException", "fr.paris.lutece.portal.service.security.SecurityTokenService", "fr.paris.lutece.portal.service.util.AppPropertiesService", "fr.paris.lutece.test.Utils", "java.io.File", "java.io.FileInputStre...
import fr.paris.lutece.portal.business.user.AdminUser; import fr.paris.lutece.portal.service.admin.AccessDeniedException; import fr.paris.lutece.portal.service.security.SecurityTokenService; import fr.paris.lutece.portal.service.util.AppPropertiesService; import fr.paris.lutece.test.Utils; import java.io.File; import j...
import fr.paris.lutece.portal.business.user.*; import fr.paris.lutece.portal.service.admin.*; import fr.paris.lutece.portal.service.security.*; import fr.paris.lutece.portal.service.util.*; import fr.paris.lutece.test.*; import java.io.*; import java.util.*; import org.springframework.mock.web.*;
[ "fr.paris.lutece", "java.io", "java.util", "org.springframework.mock" ]
fr.paris.lutece; java.io; java.util; org.springframework.mock;
764,729
@Override public void removeListener(Listener<ReusableFloatBuffer> listener) { mListener = null; }
void function(Listener<ReusableFloatBuffer> listener) { mListener = null; }
/** * Unregisters the listener from receiving sample buffers */
Unregisters the listener from receiving sample buffers
removeListener
{ "repo_name": "ImagoTrigger/sdrtrunk", "path": "src/main/java/io/github/dsheirer/source/wave/RealWaveSource.java", "license": "gpl-3.0", "size": 8217 }
[ "io.github.dsheirer.sample.Listener", "io.github.dsheirer.sample.buffer.ReusableFloatBuffer" ]
import io.github.dsheirer.sample.Listener; import io.github.dsheirer.sample.buffer.ReusableFloatBuffer;
import io.github.dsheirer.sample.*; import io.github.dsheirer.sample.buffer.*;
[ "io.github.dsheirer" ]
io.github.dsheirer;
1,855,572
public List<ConceptName> getCompatibleNames(Locale desiredLocale) { // lazy create the cache List<ConceptName> compatibleNames = null; if (compatibleCache == null) { compatibleCache = new HashMap<Locale, List<ConceptName>>(); } else { compatibleNames = compatibleCache.get(desiredLocale); } if (c...
List<ConceptName> function(Locale desiredLocale) { List<ConceptName> compatibleNames = null; if (compatibleCache == null) { compatibleCache = new HashMap<Locale, List<ConceptName>>(); } else { compatibleNames = compatibleCache.get(desiredLocale); } if (compatibleNames == null) { compatibleNames = new Vector<ConceptName...
/** * Returns all names from compatible locales. A locale is considered compatible if it is exactly * the same locale, or if either locale has no country specified and the language matches. <br> * <br> * This is recommended when presenting possible names to the use. * * @param desiredLocale locale with whi...
Returns all names from compatible locales. A locale is considered compatible if it is exactly the same locale, or if either locale has no country specified and the language matches. This is recommended when presenting possible names to the use
getCompatibleNames
{ "repo_name": "koskedk/openmrs-core", "path": "api/src/main/java/org/openmrs/Concept.java", "license": "mpl-2.0", "size": 52924 }
[ "java.util.HashMap", "java.util.List", "java.util.Locale", "java.util.Vector", "org.openmrs.util.LocaleUtility" ]
import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Vector; import org.openmrs.util.LocaleUtility;
import java.util.*; import org.openmrs.util.*;
[ "java.util", "org.openmrs.util" ]
java.util; org.openmrs.util;
21,467
SELF allSatisfy(Consumer<? super ELEMENT> requirements);
SELF allSatisfy(Consumer<? super ELEMENT> requirements);
/** * Verifies that all the elements satisfy the given requirements expressed as a {@link Consumer}. * <p> * This is useful to perform a group of assertions on elements. * <p> * Example: * <pre><code class='java'> assertThat(myIcelanderFriends).allSatisfy(person -&gt; { * ...
Verifies that all the elements satisfy the given requirements expressed as a <code>Consumer</code>. This is useful to perform a group of assertions on elements. Example: <code> assertThat(myIcelanderFriends).allSatisfy(person -&gt; { assertThat(person.getCountry()).isEqualTo("Iceland"); assertThat(person.getPhoneCountr...
allSatisfy
{ "repo_name": "hazendaz/assertj-core", "path": "src/main/java/org/assertj/core/api/ObjectEnumerableAssert.java", "license": "apache-2.0", "size": 87624 }
[ "java.util.function.Consumer" ]
import java.util.function.Consumer;
import java.util.function.*;
[ "java.util" ]
java.util;
1,477,467
@DesignerProperty(editorType = PropertyTypeConstants.PROPERTY_TYPE_STRING, defaultValue = "") @SimpleProperty(userVisible = false, description = "This is the display name of the installed application in the phone." + "If the AppName is blank, it will be set to the name of the project when the project ...
@DesignerProperty(editorType = PropertyTypeConstants.PROPERTY_TYPE_STRING, defaultValue = STRThis is the display name of the installed application in the phone.STRIf the AppName is blank, it will be set to the name of the project when the project is built.") void function(String aName) { }
/** * Specifies the App Name. * * @param aName the display name of the installed application in the phone */
Specifies the App Name
AppName
{ "repo_name": "Klomi/appinventor-sources", "path": "appinventor/components/src/com/google/appinventor/components/runtime/Form.java", "license": "apache-2.0", "size": 87303 }
[ "com.google.appinventor.components.annotations.DesignerProperty", "com.google.appinventor.components.common.PropertyTypeConstants" ]
import com.google.appinventor.components.annotations.DesignerProperty; import com.google.appinventor.components.common.PropertyTypeConstants;
import com.google.appinventor.components.annotations.*; import com.google.appinventor.components.common.*;
[ "com.google.appinventor" ]
com.google.appinventor;
2,113,589
public static void startHouseKeepingThreads() throws AndesException { //reload exchanges/queues/bindings and subscriptions AndesContextInformationManager contextInformationManager = AndesContext.getInstance() .getAndesContextInformationManager(); AndesSubscriptionManager sub...
static void function() throws AndesException { AndesContextInformationManager contextInformationManager = AndesContext.getInstance() .getAndesContextInformationManager(); AndesSubscriptionManager subscriptionManager = AndesContext.getInstance() .getAndesSubscriptionManager(); InboundEventManager inboundEventManager = A...
/** * start andes house keeping threads for the broker * * @throws AndesException */
start andes house keeping threads for the broker
startHouseKeepingThreads
{ "repo_name": "pumudu88/andes", "path": "modules/andes-core/broker/src/main/java/org/wso2/andes/kernel/AndesKernelBoot.java", "license": "apache-2.0", "size": 25991 }
[ "java.util.concurrent.TimeUnit", "org.wso2.andes.configuration.AndesConfigurationManager", "org.wso2.andes.configuration.enums.AndesConfiguration", "org.wso2.andes.kernel.disruptor.inbound.InboundEventManager", "org.wso2.andes.kernel.subscription.AndesSubscriptionManager", "org.wso2.andes.server.ClusterRe...
import java.util.concurrent.TimeUnit; import org.wso2.andes.configuration.AndesConfigurationManager; import org.wso2.andes.configuration.enums.AndesConfiguration; import org.wso2.andes.kernel.disruptor.inbound.InboundEventManager; import org.wso2.andes.kernel.subscription.AndesSubscriptionManager; import org.wso2.andes...
import java.util.concurrent.*; import org.wso2.andes.configuration.*; import org.wso2.andes.configuration.enums.*; import org.wso2.andes.kernel.disruptor.inbound.*; import org.wso2.andes.kernel.subscription.*; import org.wso2.andes.server.*;
[ "java.util", "org.wso2.andes" ]
java.util; org.wso2.andes;
2,412,027
private static int keyForCode(int keyCode) { switch (keyCode) { case KeyCodes.KEY_ALT: return Keys.ALT_LEFT; case KeyCodes.KEY_BACKSPACE: return Keys.BACKSPACE; case KeyCodes.KEY_CTRL: return Keys.CONTROL_LEFT; c...
static int function(int keyCode) { switch (keyCode) { case KeyCodes.KEY_ALT: return Keys.ALT_LEFT; case KeyCodes.KEY_BACKSPACE: return Keys.BACKSPACE; case KeyCodes.KEY_CTRL: return Keys.CONTROL_LEFT; case KeyCodes.KEY_DELETE: return Keys.DEL; case KeyCodes.KEY_DOWN: return Keys.DOWN; case KeyCodes.KEY_END: return Keys...
/** * borrowed from PlayN, thanks guys **/
borrowed from PlayN, thanks guys
keyForCode
{ "repo_name": "mapsforge/vtm", "path": "vtm-web/src/org/oscim/gdx/emu/com/badlogic/gdx/backends/gwt/GwtInput.java", "license": "lgpl-3.0", "size": 35943 }
[ "com.google.gwt.event.dom.client.KeyCodes" ]
import com.google.gwt.event.dom.client.KeyCodes;
import com.google.gwt.event.dom.client.*;
[ "com.google.gwt" ]
com.google.gwt;
1,717,814
public void declare(String varname, Location location) throws EvalException { checkReadonly(varname, location); if (parent == null) { // top-level values are immutable readOnlyVariables.add(varname); if (!futureReadOnlyVariables.isEmpty()) { // Currently validating an if-else statem...
void function(String varname, Location location) throws EvalException { checkReadonly(varname, location); if (parent == null) { readOnlyVariables.add(varname); if (!futureReadOnlyVariables.isEmpty()) { futureReadOnlyVariables.peek().add(varname); } } variables.add(varname); variableLocations.put(varname, location); }
/** * Declare a variable and add it to the environment. */
Declare a variable and add it to the environment
declare
{ "repo_name": "juhalindfors/bazel-patches", "path": "src/main/java/com/google/devtools/build/lib/syntax/ValidationEnvironment.java", "license": "apache-2.0", "size": 7216 }
[ "com.google.devtools.build.lib.events.Location" ]
import com.google.devtools.build.lib.events.Location;
import com.google.devtools.build.lib.events.*;
[ "com.google.devtools" ]
com.google.devtools;
2,903,320
private Block allocateBlock(String src, INode[] inodes) throws IOException { Block b = new Block(FSNamesystem.randBlockId.nextLong(), 0, 0); while(isValidBlock(b)) { b.setBlockId(FSNamesystem.randBlockId.nextLong()); } b.setGenerationStamp(getGenerationStamp()); b = dir.addBlock(src, inodes...
Block function(String src, INode[] inodes) throws IOException { Block b = new Block(FSNamesystem.randBlockId.nextLong(), 0, 0); while(isValidBlock(b)) { b.setBlockId(FSNamesystem.randBlockId.nextLong()); } b.setGenerationStamp(getGenerationStamp()); b = dir.addBlock(src, inodes, b); NameNode.stateChangeLog.info(STR +sr...
/** * Allocate a block at the given pending filename * * @param src path to the file * @param inodes INode representing each of the components of src. * <code>inodes[inodes.length-1]</code> is the INode for the file. */
Allocate a block at the given pending filename
allocateBlock
{ "repo_name": "andy8788/hadoop-hdfs", "path": "src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java", "license": "apache-2.0", "size": 214042 }
[ "java.io.IOException", "org.apache.hadoop.hdfs.protocol.Block" ]
import java.io.IOException; import org.apache.hadoop.hdfs.protocol.Block;
import java.io.*; import org.apache.hadoop.hdfs.protocol.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
1,530,262
public int getRequestCount() { int result = 0; Container[] children = findChildren(); if (children != null) { for( int i=0; i< children.length; i++ ) { result += ((StandardWrapper)children[i]).getRequestCount(); } } return result; ...
int function() { int result = 0; Container[] children = findChildren(); if (children != null) { for( int i=0; i< children.length; i++ ) { result += ((StandardWrapper)children[i]).getRequestCount(); } } return result; }
/** * Gets the cumulative request count of all servlets in this * StandardContext. * * @return Cumulative request count of all servlets in this * StandardContext */
Gets the cumulative request count of all servlets in this StandardContext
getRequestCount
{ "repo_name": "sdw2330976/apache-tomcat-7.0.57", "path": "target/classes/org/apache/catalina/core/StandardContext.java", "license": "apache-2.0", "size": 213785 }
[ "org.apache.catalina.Container" ]
import org.apache.catalina.Container;
import org.apache.catalina.*;
[ "org.apache.catalina" ]
org.apache.catalina;
2,161,688
public static double getAssignedMemoryForSlot(final Map<String, Object> topConf) { double totalWorkerMemory = 0.0; final Integer topologyWorkerDefaultMemoryAllocation = 768; List<String> topologyWorkerGcChildopts = ConfigUtils.getValueAsList( Config.TOPOLOGY_WORKER_GC_CHILDOPTS,...
static double function(final Map<String, Object> topConf) { double totalWorkerMemory = 0.0; final Integer topologyWorkerDefaultMemoryAllocation = 768; List<String> topologyWorkerGcChildopts = ConfigUtils.getValueAsList( Config.TOPOLOGY_WORKER_GC_CHILDOPTS, topConf); List<String> workerGcChildopts = ConfigUtils.getValue...
/** * Get heap memory usage for a worker's main process and logwriter process. * * @param topConf - the topology config * @return the assigned memory (in MB) */
Get heap memory usage for a worker's main process and logwriter process
getAssignedMemoryForSlot
{ "repo_name": "erikdw/storm", "path": "storm-server/src/main/java/org/apache/storm/scheduler/Cluster.java", "license": "apache-2.0", "size": 36707 }
[ "java.util.List", "java.util.Map", "org.apache.storm.Config", "org.apache.storm.utils.ConfigUtils", "org.apache.storm.utils.ObjectReader", "org.apache.storm.utils.Utils" ]
import java.util.List; import java.util.Map; import org.apache.storm.Config; import org.apache.storm.utils.ConfigUtils; import org.apache.storm.utils.ObjectReader; import org.apache.storm.utils.Utils;
import java.util.*; import org.apache.storm.*; import org.apache.storm.utils.*;
[ "java.util", "org.apache.storm" ]
java.util; org.apache.storm;
103,035
static void reloadLuceneSPI(ClassLoader loader) { // do NOT change the order of these method calls! // Codecs: PostingsFormat.reloadPostingsFormats(loader); DocValuesFormat.reloadDocValuesFormats(loader); Codec.reloadCodecs(loader); // Analysis: CharFilterFac...
static void reloadLuceneSPI(ClassLoader loader) { PostingsFormat.reloadPostingsFormats(loader); DocValuesFormat.reloadDocValuesFormats(loader); Codec.reloadCodecs(loader); CharFilterFactory.reloadCharFilters(loader); TokenFilterFactory.reloadTokenFilters(loader); TokenizerFactory.reloadTokenizers(loader); }
/** * Reloads all Lucene SPI implementations using the new classloader. * This method must be called after the new classloader has been created to * register the services for use. */
Reloads all Lucene SPI implementations using the new classloader. This method must be called after the new classloader has been created to register the services for use
reloadLuceneSPI
{ "repo_name": "gfyoung/elasticsearch", "path": "server/src/main/java/org/elasticsearch/plugins/PluginsService.java", "license": "apache-2.0", "size": 28221 }
[ "org.apache.lucene.analysis.util.CharFilterFactory", "org.apache.lucene.analysis.util.TokenFilterFactory", "org.apache.lucene.analysis.util.TokenizerFactory", "org.apache.lucene.codecs.Codec", "org.apache.lucene.codecs.DocValuesFormat", "org.apache.lucene.codecs.PostingsFormat" ]
import org.apache.lucene.analysis.util.CharFilterFactory; import org.apache.lucene.analysis.util.TokenFilterFactory; import org.apache.lucene.analysis.util.TokenizerFactory; import org.apache.lucene.codecs.Codec; import org.apache.lucene.codecs.DocValuesFormat; import org.apache.lucene.codecs.PostingsFormat;
import org.apache.lucene.analysis.util.*; import org.apache.lucene.codecs.*;
[ "org.apache.lucene" ]
org.apache.lucene;
2,264,221
public Set<Artifact> artifactClosureOf(Iterable<Artifact> artifacts) { Set<Artifact> visited = new LinkedHashSet<>(); List<Artifact> toVisit = Lists.newArrayList(artifacts); while (!toVisit.isEmpty()) { Artifact current = toVisit.remove(0); if (!visited.add(current)) { continue; ...
Set<Artifact> function(Iterable<Artifact> artifacts) { Set<Artifact> visited = new LinkedHashSet<>(); List<Artifact> toVisit = Lists.newArrayList(artifacts); while (!toVisit.isEmpty()) { Artifact current = toVisit.remove(0); if (!visited.add(current)) { continue; } Action generatingAction = actionGraph.getGeneratingAct...
/** * Returns the closure over the input files of a set of artifacts. */
Returns the closure over the input files of a set of artifacts
artifactClosureOf
{ "repo_name": "wakashige/bazel", "path": "src/test/java/com/google/devtools/build/lib/actions/util/ActionsTestUtil.java", "license": "apache-2.0", "size": 18348 }
[ "com.google.common.collect.Iterables", "com.google.common.collect.Lists", "com.google.devtools.build.lib.actions.Action", "com.google.devtools.build.lib.actions.Artifact", "java.util.LinkedHashSet", "java.util.List", "java.util.Set" ]
import com.google.common.collect.Iterables; import com.google.common.collect.Lists; import com.google.devtools.build.lib.actions.Action; import com.google.devtools.build.lib.actions.Artifact; import java.util.LinkedHashSet; import java.util.List; import java.util.Set;
import com.google.common.collect.*; import com.google.devtools.build.lib.actions.*; import java.util.*;
[ "com.google.common", "com.google.devtools", "java.util" ]
com.google.common; com.google.devtools; java.util;
785,480
EReference getColumn_Cells();
EReference getColumn_Cells();
/** * Returns the meta object for the reference list '{@link org.obeonetwork.dsl.connectfour.Column#getCells <em>Cells</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the reference list '<em>Cells</em>'. * @see org.obeonetwork.dsl.connectfour.Column#getCells() *...
Returns the meta object for the reference list '<code>org.obeonetwork.dsl.connectfour.Column#getCells Cells</code>'.
getColumn_Cells
{ "repo_name": "ejuliot/PlayWithSirius", "path": "connectfour/plugins/org.obeonetwork.dsl.connectfour/src/org/obeonetwork/dsl/connectfour/ConnectfourPackage.java", "license": "epl-1.0", "size": 25290 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
210,576
@Nonnegative public int collectUnfreshPeers() { long now = System.currentTimeMillis(); int count = 0; for (TrackedPeer peer : peers.values()) { if (!peer.isFresh(now, getPeerExpiryInterval())) { peers.remove(TorrentUtils.toHex(peer.getPeerId()), peer); ...
int function() { long now = System.currentTimeMillis(); int count = 0; for (TrackedPeer peer : peers.values()) { if (!peer.isFresh(now, getPeerExpiryInterval())) { peers.remove(TorrentUtils.toHex(peer.getPeerId()), peer); count++; } } return count; }
/** * Remove unfresh peers from this torrent. * * <p> * Collect and remove all non-fresh peers from this torrent. This is * usually called by the periodic peer collector of the BitTorrent tracker. * </p> */
Remove unfresh peers from this torrent. Collect and remove all non-fresh peers from this torrent. This is usually called by the periodic peer collector of the BitTorrent tracker.
collectUnfreshPeers
{ "repo_name": "letroll/TtorrentAndroid", "path": "app/src/main/java/fr/letroll/ttorrentandroid/tracker/TrackedTorrent.java", "license": "apache-2.0", "size": 10687 }
[ "fr.letroll.ttorrentandroid.common.TorrentUtils" ]
import fr.letroll.ttorrentandroid.common.TorrentUtils;
import fr.letroll.ttorrentandroid.common.*;
[ "fr.letroll.ttorrentandroid" ]
fr.letroll.ttorrentandroid;
910,915
public Configuration copy() throws IOException { JsonNode treeCopy = yamlMapper.valueToTree(this).deepCopy(); return yamlMapper.treeToValue(treeCopy, Configuration.class); }
Configuration function() throws IOException { JsonNode treeCopy = yamlMapper.valueToTree(this).deepCopy(); return yamlMapper.treeToValue(treeCopy, Configuration.class); }
/** * Make a copy of this configuration object. */
Make a copy of this configuration object
copy
{ "repo_name": "ViDA-NYU/ache", "path": "ache/src/main/java/achecrawler/config/Configuration.java", "license": "apache-2.0", "size": 6462 }
[ "com.fasterxml.jackson.databind.JsonNode", "java.io.IOException" ]
import com.fasterxml.jackson.databind.JsonNode; import java.io.IOException;
import com.fasterxml.jackson.databind.*; import java.io.*;
[ "com.fasterxml.jackson", "java.io" ]
com.fasterxml.jackson; java.io;
666,273
private void write(final String str) { try { this.os.write(str.getBytes()); } catch (final IOException e) { throw new BotError(e); } }
void function(final String str) { try { this.os.write(str.getBytes()); } catch (final IOException e) { throw new BotError(e); } }
/** * Write the specified string, without a carriage return and line feed. * * @param str * The String to write. */
Write the specified string, without a carriage return and line feed
write
{ "repo_name": "Crespo911/encog-java-core", "path": "src/main/java/org/encog/util/http/FormUtility.java", "license": "apache-2.0", "size": 7086 }
[ "java.io.IOException", "org.encog.bot.BotError" ]
import java.io.IOException; import org.encog.bot.BotError;
import java.io.*; import org.encog.bot.*;
[ "java.io", "org.encog.bot" ]
java.io; org.encog.bot;
438,714
@Deprecated @Override public ActiveSpan log(long timestampMicroseconds, String eventName, Object payload) { return this; }
ActiveSpan function(long timestampMicroseconds, String eventName, Object payload) { return this; }
/** * Don't support logging with payload. */
Don't support logging with payload
log
{ "repo_name": "zhangkewei/sky-walking", "path": "apm-application-toolkit/apm-toolkit-opentracing/src/main/java/org/skywalking/apm/toolkit/opentracing/SkywalkingActiveSpan.java", "license": "apache-2.0", "size": 3382 }
[ "io.opentracing.ActiveSpan" ]
import io.opentracing.ActiveSpan;
import io.opentracing.*;
[ "io.opentracing" ]
io.opentracing;
694,581
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); String formatted = format.format(date); view.setText(formatted); }
SimpleDateFormat format = new SimpleDateFormat(STR); String formatted = format.format(date); view.setText(formatted); }
/** * Simple binding adapter to convert long timestamp to a human-readable date. * @param view * @param date */
Simple binding adapter to convert long timestamp to a human-readable date
setText
{ "repo_name": "google/spline", "path": "app/src/main/java/com/android/example/spline/bindingadapter/FileBindingAdapters.java", "license": "apache-2.0", "size": 1253 }
[ "java.text.SimpleDateFormat" ]
import java.text.SimpleDateFormat;
import java.text.*;
[ "java.text" ]
java.text;
1,663,712
@SuppressWarnings("ReturnOfCollectionOrArrayField") protected List<String> getConfigurationsToCreate() { return confClassnames; }
@SuppressWarnings(STR) List<String> function() { return confClassnames; }
/** * Override point: Get a list of configuration classes to create. * @return the array of configs to attempt to create. If any are off the * classpath, that is logged */
Override point: Get a list of configuration classes to create
getConfigurationsToCreate
{ "repo_name": "xiao-chen/hadoop", "path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/service/launcher/ServiceLauncher.java", "license": "apache-2.0", "size": 34752 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
13,189
public static JBBPOut BeginBin() { return new JBBPOut(new ByteArrayOutputStream(), DEFAULT_BYTE_ORDER, DEFAULT_BIT_ORDER); }
static JBBPOut function() { return new JBBPOut(new ByteArrayOutputStream(), DEFAULT_BYTE_ORDER, DEFAULT_BIT_ORDER); }
/** * Start a DSL session for default parameters and inside byte array stream. * * @return the new DSL session generated with the default parameters and * inside byte array stream. */
Start a DSL session for default parameters and inside byte array stream
BeginBin
{ "repo_name": "raydac/java-binary-block-parser", "path": "jbbp/src/main/java/com/igormaznitsa/jbbp/io/JBBPOut.java", "license": "apache-2.0", "size": 39215 }
[ "java.io.ByteArrayOutputStream" ]
import java.io.ByteArrayOutputStream;
import java.io.*;
[ "java.io" ]
java.io;
1,514,526
void setResponse(Message param, CellScanner cells, Throwable errorThrowable, String error);
void setResponse(Message param, CellScanner cells, Throwable errorThrowable, String error);
/** * Set the response resulting from this RPC call. * @param param The result message as response. * @param cells The CellScanner that possibly carries the payload. * @param errorThrowable The error Throwable resulting from the call. * @param error Extra error message. */
Set the response resulting from this RPC call
setResponse
{ "repo_name": "JingchengDu/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcCall.java", "license": "apache-2.0", "size": 3987 }
[ "org.apache.hadoop.hbase.CellScanner", "org.apache.hadoop.hbase.shaded.com.google.protobuf.Message" ]
import org.apache.hadoop.hbase.CellScanner; import org.apache.hadoop.hbase.shaded.com.google.protobuf.Message;
import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.shaded.com.google.protobuf.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
160,723
public void setStatusString(String status) { setStatus(EnumResourceStatus.valueOf(status.toUpperCase(Locale.ROOT))); } private Equipment(Parcel in) { setId(in.readInt()); setName(in.readString()); setStatusString(in.readString()); setDescription(in.readString()); }
void function(String status) { setStatus(EnumResourceStatus.valueOf(status.toUpperCase(Locale.ROOT))); } Equipment(Parcel in) { setId(in.readInt()); setName(in.readString()); function(in.readString()); setDescription(in.readString()); }
/** * Set the status as String value. * @param status */
Set the status as String value
setStatusString
{ "repo_name": "marcusfelipetm/jemf", "path": "src/br/ufrj/ppgi/jemf/mobile/bean/Equipment.java", "license": "gpl-3.0", "size": 4606 }
[ "android.os.Parcel", "br.ufrj.ppgi.jemf.core.coordination.EnumResourceStatus", "java.util.Locale" ]
import android.os.Parcel; import br.ufrj.ppgi.jemf.core.coordination.EnumResourceStatus; import java.util.Locale;
import android.os.*; import br.ufrj.ppgi.jemf.core.coordination.*; import java.util.*;
[ "android.os", "br.ufrj.ppgi", "java.util" ]
android.os; br.ufrj.ppgi; java.util;
2,819,922
protected final Map<String, MemberDescriptor<E>> getMembers() { return this.members; }
final Map<String, MemberDescriptor<E>> function() { return this.members; }
/** * Gets the value for the members field. * * @return The value for the members field. */
Gets the value for the members field
getMembers
{ "repo_name": "lunarray-org/model-descriptor", "path": "src/main/java/org/lunarray/model/descriptor/builder/annotation/base/builders/entity/AbstractEntityDescriptorBuilder.java", "license": "lgpl-3.0", "size": 14756 }
[ "java.util.Map", "org.lunarray.model.descriptor.model.member.MemberDescriptor" ]
import java.util.Map; import org.lunarray.model.descriptor.model.member.MemberDescriptor;
import java.util.*; import org.lunarray.model.descriptor.model.member.*;
[ "java.util", "org.lunarray.model" ]
java.util; org.lunarray.model;
1,039,943
public void test_toString() { int[] pos = { 0, 1, 1000, Integer.MAX_VALUE, (Integer.MAX_VALUE - 1) }; SSLEngineResult.Status [] enS = SSLEngineResult.Status.values(); SSLEngineResult.HandshakeStatus [] enHS = SSLEngineResult.HandshakeStatus.values(); for (int ...
void function() { int[] pos = { 0, 1, 1000, Integer.MAX_VALUE, (Integer.MAX_VALUE - 1) }; SSLEngineResult.Status [] enS = SSLEngineResult.Status.values(); SSLEngineResult.HandshakeStatus [] enHS = SSLEngineResult.HandshakeStatus.values(); for (int i = 0; i < enS.length; i++) { for (int j = 0; j < enHS.length; j++) { fo...
/** * Test for <code>toString()</code> method */
Test for <code>toString()</code> method
test_toString
{ "repo_name": "mirego/j2objc", "path": "jre_emul/android/platform/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/SSLEngineResultTest.java", "license": "apache-2.0", "size": 8348 }
[ "javax.net.ssl.SSLEngineResult" ]
import javax.net.ssl.SSLEngineResult;
import javax.net.ssl.*;
[ "javax.net" ]
javax.net;
1,775,771
@Nullable @Optional @Input String getMinHeapSize();
@Nullable @Optional String getMinHeapSize();
/** * Returns the minimum heap size for the process, if any. * * @return The minimum heap size. Returns null if the default minimum heap size should be used. */
Returns the minimum heap size for the process, if any
getMinHeapSize
{ "repo_name": "lsmaira/gradle", "path": "subprojects/core-api/src/main/java/org/gradle/process/JavaForkOptions.java", "license": "apache-2.0", "size": 8888 }
[ "javax.annotation.Nullable", "org.gradle.api.tasks.Optional" ]
import javax.annotation.Nullable; import org.gradle.api.tasks.Optional;
import javax.annotation.*; import org.gradle.api.tasks.*;
[ "javax.annotation", "org.gradle.api" ]
javax.annotation; org.gradle.api;
2,250,388
private void initializePanels() { // Adding Select data category pane treeViewScrollPane = new JScrollPane(dataCategoryPanel); treeViewScrollPane.getViewport().setBackground(Color.WHITE); treeViewScrollPane.setPreferredSize(new Dimension(250, 200)); treeViewScrollPane.se...
void function() { treeViewScrollPane = new JScrollPane(dataCategoryPanel); treeViewScrollPane.getViewport().setBackground(Color.WHITE); treeViewScrollPane.setPreferredSize(new Dimension(250, 200)); treeViewScrollPane.setBorder(null); stackedBox.addBox(STR, treeViewScrollPane, SELECT_DATA_CATEGORY, false); dataFilterPan...
/** * This method initialzse the different UI panels and panes. */
This method initialzse the different UI panels and panes
initializePanels
{ "repo_name": "NCIP/cab2b", "path": "software/cab2b/src/java/client/edu/wustl/cab2b/client/ui/experiment/ExperimentStackBox.java", "license": "bsd-3-clause", "size": 41479 }
[ "edu.wustl.cab2b.client.ui.controls.Cab2bPanel", "edu.wustl.cab2b.client.ui.controls.RiverLayout", "edu.wustl.cab2b.client.ui.controls.sheet.ColumnFilterVerticalConsole", "java.awt.Color", "java.awt.Dimension", "javax.swing.BorderFactory", "javax.swing.JScrollPane" ]
import edu.wustl.cab2b.client.ui.controls.Cab2bPanel; import edu.wustl.cab2b.client.ui.controls.RiverLayout; import edu.wustl.cab2b.client.ui.controls.sheet.ColumnFilterVerticalConsole; import java.awt.Color; import java.awt.Dimension; import javax.swing.BorderFactory; import javax.swing.JScrollPane;
import edu.wustl.cab2b.client.ui.controls.*; import edu.wustl.cab2b.client.ui.controls.sheet.*; import java.awt.*; import javax.swing.*;
[ "edu.wustl.cab2b", "java.awt", "javax.swing" ]
edu.wustl.cab2b; java.awt; javax.swing;
1,439,365
default Stream<? extends RegisteredService> getAllServicesStream() { return getAllServices().stream(); }
default Stream<? extends RegisteredService> getAllServicesStream() { return getAllServices().stream(); }
/** * Gets services stream. * <p> * The returning stream may be bound to an IO channel (such as database connection), * so it should be properly closed after usage. * * @return the services stream */
Gets services stream. The returning stream may be bound to an IO channel (such as database connection), so it should be properly closed after usage
getAllServicesStream
{ "repo_name": "philliprower/cas", "path": "api/cas-server-core-api-services/src/main/java/org/apereo/cas/services/ServicesManager.java", "license": "apache-2.0", "size": 5073 }
[ "java.util.stream.Stream" ]
import java.util.stream.Stream;
import java.util.stream.*;
[ "java.util" ]
java.util;
762,173
//------------------------------------------------------------------------- public static void writeCurveGroup(File file, CurveGroup... groups) { try (Writer writer = new OutputStreamWriter(new FileOutputStream(file), StandardCharsets.UTF_8)) { writeCurveGroup(writer, groups); } catch (IOException ex...
static void function(File file, CurveGroup... groups) { try (Writer writer = new OutputStreamWriter(new FileOutputStream(file), StandardCharsets.UTF_8)) { writeCurveGroup(writer, groups); } catch (IOException ex) { throw new UncheckedIOException(ex); } }
/** * Writes the curve group in a CSV format to a file. * * @param file the file * @param groups the curve groups */
Writes the curve group in a CSV format to a file
writeCurveGroup
{ "repo_name": "ChinaQuants/Strata", "path": "modules/loader/src/main/java/com/opengamma/strata/loader/csv/CurveGroupDefinitionCsvLoader.java", "license": "apache-2.0", "size": 12545 }
[ "com.opengamma.strata.market.curve.CurveGroup", "java.io.File", "java.io.FileOutputStream", "java.io.IOException", "java.io.OutputStreamWriter", "java.io.UncheckedIOException", "java.io.Writer", "java.nio.charset.StandardCharsets" ]
import com.opengamma.strata.market.curve.CurveGroup; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStreamWriter; import java.io.UncheckedIOException; import java.io.Writer; import java.nio.charset.StandardCharsets;
import com.opengamma.strata.market.curve.*; import java.io.*; import java.nio.charset.*;
[ "com.opengamma.strata", "java.io", "java.nio" ]
com.opengamma.strata; java.io; java.nio;
1,907,236
@Aspect(advice = org.support.project.ormapping.transaction.Transaction.class) public void delete(String serviceName) { DBUserPool pool = Container.getComp(DBUserPool.class); Integer user = (Integer) pool.getUser(); delete(user, serviceName); }
@Aspect(advice = org.support.project.ormapping.transaction.Transaction.class) void function(String serviceName) { DBUserPool pool = Container.getComp(DBUserPool.class); Integer user = (Integer) pool.getUser(); delete(user, serviceName); }
/** * Delete. * if delete flag is exists, the data is logical delete. * @param serviceName serviceName */
Delete. if delete flag is exists, the data is logical delete
delete
{ "repo_name": "support-project/knowledge", "path": "src/main/java/org/support/project/knowledge/dao/gen/GenServiceConfigsDao.java", "license": "apache-2.0", "size": 16811 }
[ "org.support.project.aop.Aspect", "org.support.project.di.Container", "org.support.project.ormapping.common.DBUserPool" ]
import org.support.project.aop.Aspect; import org.support.project.di.Container; import org.support.project.ormapping.common.DBUserPool;
import org.support.project.aop.*; import org.support.project.di.*; import org.support.project.ormapping.common.*;
[ "org.support.project" ]
org.support.project;
1,291,149
@Override public void write(byte[] b, int off, int len) throws IOException { long start = range.getFirstBytePos(); Long end = range.getLastBytePos(); if (pos + len >= start && (end == null || pos <= end)) { long skipStart = Math.max(0, start - pos); long newOff = ...
void function(byte[] b, int off, int len) throws IOException { long start = range.getFirstBytePos(); Long end = range.getLastBytePos(); if (pos + len >= start && (end == null pos <= end)) { long skipStart = Math.max(0, start - pos); long newOff = off + skipStart; long newLen = len - skipStart; if (end != null) { newLen...
/** * Writes the subset of the bytes that are within the range. * * @param b The bytes to write. * @param off The offset to start at. * @param len The number of bytes to write. * @throws IOException Thrown if there was a problem writing to the stream. */
Writes the subset of the bytes that are within the range
write
{ "repo_name": "MadMarty/madsonic-server-5.1", "path": "madsonic-main/src/main/java/org/madsonic/io/RangeOutputStream.java", "license": "gpl-3.0", "size": 3157 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,968,397
public ResourceService getResourceService() { return resourceService; }
ResourceService function() { return resourceService; }
/** * Returns the resource remote service. * * @return the resource remote service */
Returns the resource remote service
getResourceService
{ "repo_name": "fraunhoferfokus/govapps", "path": "data-portlet/src/main/java/de/fraunhofer/fokus/movepla/service/base/EntitlementLocalServiceBaseImpl.java", "license": "bsd-3-clause", "size": 42460 }
[ "com.liferay.portal.service.ResourceService" ]
import com.liferay.portal.service.ResourceService;
import com.liferay.portal.service.*;
[ "com.liferay.portal" ]
com.liferay.portal;
2,476,738
public Properties asProperties() { Properties properties = new Properties(); set(properties, "service", getService()); set(properties, "max_timeout", getMaxTimeout()); set(properties, "default_jta_timeout", getDefaultJtaTimeout()); set(properties, "max_actives", getMaxActives()); set(properties, "enable_...
Properties function() { Properties properties = new Properties(); set(properties, STR, getService()); set(properties, STR, getMaxTimeout()); set(properties, STR, getDefaultJtaTimeout()); set(properties, STR, getMaxActives()); set(properties, STR, isEnableLogging()); set(properties, STR, getTransactionManagerUniqueName(...
/** * Returns the properties as a {@link Properties} object that can be used with * Atomikos. * @return the properties */
Returns the properties as a <code>Properties</code> object that can be used with Atomikos
asProperties
{ "repo_name": "shangyi0102/spring-boot", "path": "spring-boot/src/main/java/org/springframework/boot/jta/atomikos/AtomikosProperties.java", "license": "apache-2.0", "size": 12875 }
[ "java.util.Properties" ]
import java.util.Properties;
import java.util.*;
[ "java.util" ]
java.util;
2,257,194
public Builder setSSLConf(Configuration sslCnf) { this.sslConf = sslCnf; return this; }
Builder function(Configuration sslCnf) { this.sslConf = sslCnf; return this; }
/** * Specify the SSL configuration to load. This API provides an alternative * to keyStore/keyPassword/trustStore. */
Specify the SSL configuration to load. This API provides an alternative to keyStore/keyPassword/trustStore
setSSLConf
{ "repo_name": "soumabrata-chakraborty/hadoop", "path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/http/HttpServer2.java", "license": "apache-2.0", "size": 58537 }
[ "org.apache.hadoop.conf.Configuration" ]
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.conf.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
2,253,532
@Test public void testCreateClassLoaderTwiceSameCachedData() { String expectedDexName = WebApkCommonUtils.getRuntimeDexName(REMOTE_DEX_VERSION); HostBrowserClassLoader.createClassLoader(mContext, mRemoteContext, mMockDexLoader, null); verifyDexLoaderLoadCall(expectedDexName); Moc...
void function() { String expectedDexName = WebApkCommonUtils.getRuntimeDexName(REMOTE_DEX_VERSION); HostBrowserClassLoader.createClassLoader(mContext, mRemoteContext, mMockDexLoader, null); verifyDexLoaderLoadCall(expectedDexName); Mockito.reset(mMockDexLoader); HostBrowserClassLoader.createClassLoader(mContext, mRemot...
/** * Test that HostBrowserClassLoader#deleteCachedDexes() is not called if nothing has changed * between calls to HostBrowserClassLoader#createClassLoader(). */
Test that HostBrowserClassLoader#deleteCachedDexes() is not called if nothing has changed between calls to HostBrowserClassLoader#createClassLoader()
testCreateClassLoaderTwiceSameCachedData
{ "repo_name": "ric2b/Vivaldi-browser", "path": "chromium/chrome/android/webapk/shell_apk/junit/src/org/chromium/webapk/shell_apk/HostBrowserClassLoaderTest.java", "license": "bsd-3-clause", "size": 6431 }
[ "java.io.File", "org.chromium.webapk.lib.common.WebApkCommonUtils", "org.mockito.Mockito" ]
import java.io.File; import org.chromium.webapk.lib.common.WebApkCommonUtils; import org.mockito.Mockito;
import java.io.*; import org.chromium.webapk.lib.common.*; import org.mockito.*;
[ "java.io", "org.chromium.webapk", "org.mockito" ]
java.io; org.chromium.webapk; org.mockito;
285,470
private SocketAndStreams getSocketAndStreams(SocketDestination destination) throws IOException { ByteArray keyBytes = new ByteArray(ByteUtils.getBytes(MetadataStore.SERVER_STATE_KEY, "UTF-8")); VAdminProto....
SocketAndStreams function(SocketDestination destination) throws IOException { ByteArray keyBytes = new ByteArray(ByteUtils.getBytes(MetadataStore.SERVER_STATE_KEY, "UTF-8")); VAdminProto.VoldemortAdminRequest request = VAdminProto.VoldemortAdminRequest.newBuilder() .setType(VAdminProto.AdminRequestType.GET_METADATA) .s...
/** * tests socket connection by sending a get metadata request * * @throws IOException */
tests socket connection by sending a get metadata request
getSocketAndStreams
{ "repo_name": "bitti/voldemort", "path": "src/java/voldemort/client/protocol/admin/AdminClient.java", "license": "apache-2.0", "size": 288293 }
[ "com.google.protobuf.ByteString", "java.io.EOFException", "java.io.IOException" ]
import com.google.protobuf.ByteString; import java.io.EOFException; import java.io.IOException;
import com.google.protobuf.*; import java.io.*;
[ "com.google.protobuf", "java.io" ]
com.google.protobuf; java.io;
229,126
public double score(Iterator<LabelPair<L>> iter);
double function(Iterator<LabelPair<L>> iter);
/** * Calculates score. * * @param iter Iterator that supplies pairs of truth values and predicated. * @return Score. */
Calculates score
score
{ "repo_name": "alexzaitzev/ignite", "path": "modules/ml/src/main/java/org/apache/ignite/ml/selection/scoring/metric/Metric.java", "license": "apache-2.0", "size": 1285 }
[ "java.util.Iterator", "org.apache.ignite.ml.selection.scoring.LabelPair" ]
import java.util.Iterator; import org.apache.ignite.ml.selection.scoring.LabelPair;
import java.util.*; import org.apache.ignite.ml.selection.scoring.*;
[ "java.util", "org.apache.ignite" ]
java.util; org.apache.ignite;
2,431,208
public static boolean isExactSegmentLabel(Map map) { Boolean bool = (Boolean) map.get(EXACTSEGMENTRELATIVE); if (bool != null) return bool.booleanValue(); return false; }
static boolean function(Map map) { Boolean bool = (Boolean) map.get(EXACTSEGMENTRELATIVE); if (bool != null) return bool.booleanValue(); return false; }
/** * Returns whether the exact segment is worked out for placement of labels * along edges for the specified cell. * * @param map * the attribute map for the cell being tested for this * condition. * @return whether or not exact segments should be calculated on this cell */
Returns whether the exact segment is worked out for placement of labels along edges for the specified cell
isExactSegmentLabel
{ "repo_name": "Baltasarq/Gia", "path": "src/JGraph/src/org/jgraph/graph/GraphConstants.java", "license": "mit", "size": 48823 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,183,872
public void onItemStateChanged(@NonNull K key, boolean selected) { }
void function(@NonNull K key, boolean selected) { }
/** * Called when the state of an item has been changed. */
Called when the state of an item has been changed
onItemStateChanged
{ "repo_name": "aosp-mirror/platform_frameworks_support", "path": "recyclerview-selection/src/main/java/androidx/recyclerview/selection/SelectionTracker.java", "license": "apache-2.0", "size": 31952 }
[ "androidx.annotation.NonNull" ]
import androidx.annotation.NonNull;
import androidx.annotation.*;
[ "androidx.annotation" ]
androidx.annotation;
981,377
@Deprecated public static <K, V> Multimap<K, V> unmodifiableMultimap(ImmutableMultimap<K, V> delegate) { return checkNotNull(delegate); } private static class UnmodifiableMultimap<K, V> extends ForwardingMultimap<K, V> implements Serializable { final Multimap<K, V> delegate; transient Collect...
static <K, V> Multimap<K, V> function(ImmutableMultimap<K, V> delegate) { return checkNotNull(delegate); } private static class UnmodifiableMultimap<K, V> extends ForwardingMultimap<K, V> implements Serializable { final Multimap<K, V> delegate; transient Collection<Entry<K, V>> entries; transient Multiset<K> keys; tran...
/** * Simply returns its argument. * * @deprecated no need to use this * @since 10.0 */
Simply returns its argument
unmodifiableMultimap
{ "repo_name": "paulmartel/voltdb", "path": "third_party/java/src/com/google_voltpatches/common/collect/Multimaps.java", "license": "agpl-3.0", "size": 79260 }
[ "com.google_voltpatches.common.base.Preconditions", "java.io.Serializable", "java.util.Collection", "java.util.Map", "java.util.Set" ]
import com.google_voltpatches.common.base.Preconditions; import java.io.Serializable; import java.util.Collection; import java.util.Map; import java.util.Set;
import com.google_voltpatches.common.base.*; import java.io.*; import java.util.*;
[ "com.google_voltpatches.common", "java.io", "java.util" ]
com.google_voltpatches.common; java.io; java.util;
733,601
return new BigInteger(new StringBuilder().append(n).reverse().toString()); }
return new BigInteger(new StringBuilder().append(n).reverse().toString()); }
/** * Reverses the number {@param n}. * * @param n * @return the reverse of the number {@param n}. */
Reverses the number n
getReverse
{ "repo_name": "ramswaroop/Algorithms-and-Data-Structures-in-Java", "path": "src/main/java/com/rampatra/misc/ReverseAndAdd.java", "license": "mit", "size": 2818 }
[ "java.math.BigInteger" ]
import java.math.BigInteger;
import java.math.*;
[ "java.math" ]
java.math;
1,563,778
public RunListBuilder addRecipes(String... recipes) { addAll(list, transform(Arrays.asList(checkNotNull(recipes, "recipes")), new Function<String, String>() {
RunListBuilder function(String... recipes) { addAll(list, transform(Arrays.asList(checkNotNull(recipes, STR)), new Function<String, String>() {
/** * Add the following recipes to the run list */
Add the following recipes to the run list
addRecipes
{ "repo_name": "jclouds/legacy-jclouds-chef", "path": "core/src/main/java/org/jclouds/chef/util/RunListBuilder.java", "license": "apache-2.0", "size": 2552 }
[ "com.google.common.base.Function", "com.google.common.collect.Iterables", "com.google.common.collect.Lists", "java.util.Arrays" ]
import com.google.common.base.Function; import com.google.common.collect.Iterables; import com.google.common.collect.Lists; import java.util.Arrays;
import com.google.common.base.*; import com.google.common.collect.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
2,603,391
public List<Element> getDescriptor();
List<Element> function();
/** * Returns a descriptor data stream (DC/NSSESS/...) * * @return */
Returns a descriptor data stream (DC/NSSESS/...)
getDescriptor
{ "repo_name": "proarc/proarc", "path": "proarc-common/src/main/java/cz/cas/lib/proarc/common/export/desa/structure/IDesaElement.java", "license": "gpl-3.0", "size": 3909 }
[ "java.util.List", "org.w3c.dom.Element" ]
import java.util.List; import org.w3c.dom.Element;
import java.util.*; import org.w3c.dom.*;
[ "java.util", "org.w3c.dom" ]
java.util; org.w3c.dom;
220,464
private void cmd_button() { log.config("Activity=" + m_activity); if (m_activity == null) return; // MWFNode node = m_activity.getNode(); if (MWFNode.ACTION_UserWindow.equals(node.getAction())) { int AD_Window_ID = node.getAD_Window_ID(); // Explicit Window String ColumnName = m_acti...
void function() { log.config(STR + m_activity); if (m_activity == null) return; MWFNode node = m_activity.getNode(); if (MWFNode.ACTION_UserWindow.equals(node.getAction())) { int AD_Window_ID = node.getAD_Window_ID(); String ColumnName = m_activity.getPO().get_TableName() + "_ID"; int Record_ID = m_activity.getRecord_I...
/** * Answer Button */
Answer Button
cmd_button
{ "repo_name": "arthurmelo88/palmetalADP", "path": "adempiere_360/client/src/org/compiere/apps/wf/WFActivity.java", "license": "gpl-2.0", "size": 25927 }
[ "java.util.logging.Level", "org.compiere.apps.AEnv", "org.compiere.apps.AWindow", "org.compiere.apps.form.FormFrame", "org.compiere.model.MQuery", "org.compiere.wf.MWFNode" ]
import java.util.logging.Level; import org.compiere.apps.AEnv; import org.compiere.apps.AWindow; import org.compiere.apps.form.FormFrame; import org.compiere.model.MQuery; import org.compiere.wf.MWFNode;
import java.util.logging.*; import org.compiere.apps.*; import org.compiere.apps.form.*; import org.compiere.model.*; import org.compiere.wf.*;
[ "java.util", "org.compiere.apps", "org.compiere.model", "org.compiere.wf" ]
java.util; org.compiere.apps; org.compiere.model; org.compiere.wf;
2,772,324
public String logout() { FacesContext.getCurrentInstance().getExternalContext().invalidateSession(); FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, "Abmeldung erfolgreich!", "Abmeldung erfolgreich!")); return "/login"; }
String function() { FacesContext.getCurrentInstance().getExternalContext().invalidateSession(); FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, STR, STR)); return STR; }
/** * This method is called when the logout link, specified in the * template.xhtml file and therefore available on every page, is clicked. * The session is invalidated, the user is returned to the start page and a * info message is displayed. * * @return The login page. */
This method is called when the logout link, specified in the template.xhtml file and therefore available on every page, is clicked. The session is invalidated, the user is returned to the start page and a info message is displayed
logout
{ "repo_name": "Walti91/stab", "path": "src/main/java/controller/AuthenticationController.java", "license": "gpl-3.0", "size": 3609 }
[ "javax.faces.application.FacesMessage", "javax.faces.context.FacesContext" ]
import javax.faces.application.FacesMessage; import javax.faces.context.FacesContext;
import javax.faces.application.*; import javax.faces.context.*;
[ "javax.faces" ]
javax.faces;
2,244,985
public String findUserMachineId(UserId userId) { if ( userId == null ) return null; Jedis jedis = JedisFactory.getJedis(); String machineBytes = jedis.hget(userId.toString(), H_MACHINE_KEY); return machineBytes; }
String function(UserId userId) { if ( userId == null ) return null; Jedis jedis = JedisFactory.getJedis(); String machineBytes = jedis.hget(userId.toString(), H_MACHINE_KEY); return machineBytes; }
/** * Find the user's machine id by his/her userId * @param userId * @return */
Find the user's machine id by his/her userId
findUserMachineId
{ "repo_name": "wangqi/gameserver", "path": "server/src/main/java/com/xinqihd/sns/gameserver/session/SessionManager.java", "license": "apache-2.0", "size": 17163 }
[ "com.xinqihd.sns.gameserver.entity.user.UserId", "com.xinqihd.sns.gameserver.jedis.Jedis", "com.xinqihd.sns.gameserver.jedis.JedisFactory" ]
import com.xinqihd.sns.gameserver.entity.user.UserId; import com.xinqihd.sns.gameserver.jedis.Jedis; import com.xinqihd.sns.gameserver.jedis.JedisFactory;
import com.xinqihd.sns.gameserver.entity.user.*; import com.xinqihd.sns.gameserver.jedis.*;
[ "com.xinqihd.sns" ]
com.xinqihd.sns;
1,874,538
private void doAsynchronousAck(String ack) { if (ConditionalCompilationControls.TESTHARNESS) { final String ASYNCRESPONSEDELAYCOUNTDOWN = "org.warlock.spine.asyncresponsedelaycountdown"; String prop = System.getProperty(ASYNCRESPONSEDELAYCOUNTDOWN); if (prop != null &...
void function(String ack) { if (ConditionalCompilationControls.TESTHARNESS) { final String ASYNCRESPONSEDELAYCOUNTDOWN = STR; String prop = System.getProperty(ASYNCRESPONSEDELAYCOUNTDOWN); if (prop != null && prop.trim().toLowerCase().equals("y")) { long asynchronousResponseDelay = 0; final String ASYNCHRONOUSRESPONSED...
/** * Create and return an asynchronous ebXML acknowledgment. * * @param ack */
Create and return an asynchronous ebXML acknowledgment
doAsynchronousAck
{ "repo_name": "DamianJMurphy/SpineTools-Java", "path": "SpineTools-Java/src/org/warlock/spine/connection/SpineMessageHandler.java", "license": "apache-2.0", "size": 21227 }
[ "java.net.Socket", "org.warlock.spine.logging.SpineToolsLogger", "org.warlock.spine.messaging.EbXmlAcknowledgment" ]
import java.net.Socket; import org.warlock.spine.logging.SpineToolsLogger; import org.warlock.spine.messaging.EbXmlAcknowledgment;
import java.net.*; import org.warlock.spine.logging.*; import org.warlock.spine.messaging.*;
[ "java.net", "org.warlock.spine" ]
java.net; org.warlock.spine;
1,772,240
protected int getZoneFromChannelUID(String channelUID) { int zone = 0; Matcher matcher = PioneerAvrBindingConstants.GROUP_CHANNEL_ZONE_PATTERN.matcher(channelUID); if (matcher.find()) { zone = Integer.valueOf(matcher.group(1)); } return zone; }
int function(String channelUID) { int zone = 0; Matcher matcher = PioneerAvrBindingConstants.GROUP_CHANNEL_ZONE_PATTERN.matcher(channelUID); if (matcher.find()) { zone = Integer.valueOf(matcher.group(1)); } return zone; }
/** * Return the zone from the given channelUID. * * Return 0 if the zone cannot be extracted from the channelUID. * * @param channelUID * @return */
Return the zone from the given channelUID. Return 0 if the zone cannot be extracted from the channelUID
getZoneFromChannelUID
{ "repo_name": "georgeerhan/openhab2-addons", "path": "addons/binding/org.openhab.binding.pioneeravr/src/main/java/org/openhab/binding/pioneeravr/internal/handler/AbstractAvrHandler.java", "license": "epl-1.0", "size": 12770 }
[ "java.util.regex.Matcher", "org.openhab.binding.pioneeravr.PioneerAvrBindingConstants" ]
import java.util.regex.Matcher; import org.openhab.binding.pioneeravr.PioneerAvrBindingConstants;
import java.util.regex.*; import org.openhab.binding.pioneeravr.*;
[ "java.util", "org.openhab.binding" ]
java.util; org.openhab.binding;
2,701,403
public List<ElementArticle> getArticlesInJournal(ElementJournal journal, int year) throws IOException { checkYear(year); return getMatchingValuesInTag("journal", journal.getValue(), "year", String.valueOf(year), "title", "article", ElementArticle.class); }
List<ElementArticle> function(ElementJournal journal, int year) throws IOException { checkYear(year); return getMatchingValuesInTag(STR, journal.getValue(), "year", String.valueOf(year), "title", STR, ElementArticle.class); }
/** * Returns a list of all articles that appeared in the given journal in the given year. Derived from DBLP. * @param journal * @param year * @return * @throws IOException */
Returns a list of all articles that appeared in the given journal in the given year. Derived from DBLP
getArticlesInJournal
{ "repo_name": "prasser/bibliometrics", "path": "src/de/linearbits/bibliometrics/Bibliometrics.java", "license": "epl-1.0", "size": 8368 }
[ "java.io.IOException", "java.util.List" ]
import java.io.IOException; import java.util.List;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
511,402
@Override protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); }
void function(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); }
/** * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing * the children that can be created under this object. <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */
This adds <code>org.eclipse.emf.edit.command.CommandParameter</code>s describing the children that can be created under this object.
collectNewChildDescriptors
{ "repo_name": "enterpriseDomain/ClassMaker", "path": "bundles/org.enterprisedomain.classmaker.edit/src/org/enterprisedomain/classmaker/provider/EMFPluginItemProvider.java", "license": "apache-2.0", "size": 3804 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,260,389
public WorkflowDetails getWorkflowDetails(String workflowId) throws WorkflowException { checkNotNull(workflowId, "workflowId is null"); try { return workflowsClient.showWorkflow(workflowId); } catch (RuntimeException e) { throw new WorkflowException(e); } }
WorkflowDetails function(String workflowId) throws WorkflowException { checkNotNull(workflowId, STR); try { return workflowsClient.showWorkflow(workflowId); } catch (RuntimeException e) { throw new WorkflowException(e); } }
/** * Gets details about a given workflow. * * @param workflowId * The id of the workflow. * @return A details object for this workflow. * @throws WorkflowException * If there was an issue getting the details of the workflow. */
Gets details about a given workflow
getWorkflowDetails
{ "repo_name": "phac-nml/irida", "path": "src/main/java/ca/corefacility/bioinformatics/irida/pipeline/upload/galaxy/GalaxyWorkflowService.java", "license": "apache-2.0", "size": 5734 }
[ "ca.corefacility.bioinformatics.irida.exceptions.WorkflowException", "com.github.jmchilton.blend4j.galaxy.beans.WorkflowDetails", "com.google.common.base.Preconditions" ]
import ca.corefacility.bioinformatics.irida.exceptions.WorkflowException; import com.github.jmchilton.blend4j.galaxy.beans.WorkflowDetails; import com.google.common.base.Preconditions;
import ca.corefacility.bioinformatics.irida.exceptions.*; import com.github.jmchilton.blend4j.galaxy.beans.*; import com.google.common.base.*;
[ "ca.corefacility.bioinformatics", "com.github.jmchilton", "com.google.common" ]
ca.corefacility.bioinformatics; com.github.jmchilton; com.google.common;
1,304,474
public final Throwable getException() { int s = status & DONE_MASK; return ((s >= NORMAL) ? null : (s == CANCELLED) ? new CancellationException() : getThrowableException()); } /** * Completes this task abnormally, and if not already aborted or * ...
final Throwable function() { int s = status & DONE_MASK; return ((s >= NORMAL) ? null : (s == CANCELLED) ? new CancellationException() : getThrowableException()); } /** * Completes this task abnormally, and if not already aborted or * cancelled, causes it to throw the given exception upon * {@code join} and related ope...
/** * Returns the exception thrown by the base computation, or a * {@code CancellationException} if cancelled, or {@code null} if * none or if the method has not yet completed. * * @return the exception, or {@code null} if none */
Returns the exception thrown by the base computation, or a CancellationException if cancelled, or null if none or if the method has not yet completed
getException
{ "repo_name": "molecule-labs/molecule", "path": "molecule-core/src/main/java/molecule/jsr166y/ForkJoinTask.java", "license": "apache-2.0", "size": 61050 }
[ "java.util.concurrent.CancellationException" ]
import java.util.concurrent.CancellationException;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
2,314,100
public boolean isEditAvailable() { return SpringUtils.isAclPermissionGranted(workingAgreement, BasePermission.WRITE); }
boolean function() { return SpringUtils.isAclPermissionGranted(workingAgreement, BasePermission.WRITE); }
/** * Whether or not edit button is available for user * * @return true if user can edit current object */
Whether or not edit button is available for user
isEditAvailable
{ "repo_name": "terrex/tntconcept-materials-testing", "path": "src/main/java/com/autentia/intra/bean/admin/WorkingAgreementBean.java", "license": "gpl-2.0", "size": 14936 }
[ "com.autentia.intra.util.SpringUtils", "org.acegisecurity.acls.domain.BasePermission" ]
import com.autentia.intra.util.SpringUtils; import org.acegisecurity.acls.domain.BasePermission;
import com.autentia.intra.util.*; import org.acegisecurity.acls.domain.*;
[ "com.autentia.intra", "org.acegisecurity.acls" ]
com.autentia.intra; org.acegisecurity.acls;
1,422,091
public void insert(Vgrdetailproductcategory dto);
void function(Vgrdetailproductcategory dto);
/** * Method 'insert' * * @param dto */
Method 'insert'
insert
{ "repo_name": "rmage/gnvc-ims", "path": "src/java/com/app/wms/engine/db/dao/VgrdetailproductcategoryDao.java", "license": "lgpl-3.0", "size": 4497 }
[ "com.app.wms.engine.db.dto.Vgrdetailproductcategory" ]
import com.app.wms.engine.db.dto.Vgrdetailproductcategory;
import com.app.wms.engine.db.dto.*;
[ "com.app.wms" ]
com.app.wms;
1,100,861
public String getJobFlowBatchJobName(Workflow workflow);
String function(Workflow workflow);
/** * Get name of Batch Flow Job specified for the current workflow. * Returns null if not found. * @return */
Get name of Batch Flow Job specified for the current workflow. Returns null if not found
getJobFlowBatchJobName
{ "repo_name": "WASP-System/central", "path": "wasp-core/src/main/java/edu/yu/einstein/wasp/service/WorkflowService.java", "license": "agpl-3.0", "size": 3359 }
[ "edu.yu.einstein.wasp.model.Workflow" ]
import edu.yu.einstein.wasp.model.Workflow;
import edu.yu.einstein.wasp.model.*;
[ "edu.yu.einstein" ]
edu.yu.einstein;
1,842,059
public void setMultiplyRate (BigDecimal MultiplyRate);
void function (BigDecimal MultiplyRate);
/** Set Multiply Rate. * Rate to multiple the source by to calculate the target. */
Set Multiply Rate. Rate to multiple the source by to calculate the target
setMultiplyRate
{ "repo_name": "geneos/adempiere", "path": "base/src/org/compiere/model/I_C_Conversion_Rate.java", "license": "gpl-2.0", "size": 6605 }
[ "java.math.BigDecimal" ]
import java.math.BigDecimal;
import java.math.*;
[ "java.math" ]
java.math;
433,828
@Before public void prepareTestDatabase() { // START SNIPPET: beforeTest deleteFileOrDirectory( testDatabasePath ); graphDb = new EmbeddedGraphDatabase( testDatabasePath.getAbsolutePath() ); // END SNIPPET: beforeTest }
void function() { deleteFileOrDirectory( testDatabasePath ); graphDb = new EmbeddedGraphDatabase( testDatabasePath.getAbsolutePath() ); }
/** * Create temporary database for each unit test. * <p/> * This will delete any existing database prior to creating a new one. */
Create temporary database for each unit test. This will delete any existing database prior to creating a new one
prepareTestDatabase
{ "repo_name": "neo4j-attic/examples", "path": "src/test/java/org/neo4j/examples/Neo4jBasicTest.java", "license": "apache-2.0", "size": 3493 }
[ "org.neo4j.kernel.EmbeddedGraphDatabase" ]
import org.neo4j.kernel.EmbeddedGraphDatabase;
import org.neo4j.kernel.*;
[ "org.neo4j.kernel" ]
org.neo4j.kernel;
702,833
private static void verifyInputs(RankingExpression expression, ImportedMlModel model, RankProfile profile, QueryProfileRegistry queryProfiles) { Set<String> functionNames = new HashSet<>(); addFunctionNamesIn(expression.getRoot(), functionNames, model); f...
static void function(RankingExpression expression, ImportedMlModel model, RankProfile profile, QueryProfileRegistry queryProfiles) { Set<String> functionNames = new HashSet<>(); addFunctionNamesIn(expression.getRoot(), functionNames, model); for (String functionName : functionNames) { Optional<TensorType> requiredType ...
/** * Verify that the inputs declared in the given expression exists in the given rank profile as functions, * and return tensors of the correct types. */
Verify that the inputs declared in the given expression exists in the given rank profile as functions, and return tensors of the correct types
verifyInputs
{ "repo_name": "vespa-engine/vespa", "path": "config-model/src/main/java/com/yahoo/vespa/model/ml/ConvertedModel.java", "license": "apache-2.0", "size": 36590 }
[ "ai.vespa.rankingexpression.importer.configmodelview.ImportedMlModel", "com.yahoo.search.query.profile.QueryProfileRegistry", "com.yahoo.searchdefinition.RankProfile", "com.yahoo.searchlib.rankingexpression.RankingExpression", "com.yahoo.tensor.TensorType", "java.util.HashSet", "java.util.Optional", "...
import ai.vespa.rankingexpression.importer.configmodelview.ImportedMlModel; import com.yahoo.search.query.profile.QueryProfileRegistry; import com.yahoo.searchdefinition.RankProfile; import com.yahoo.searchlib.rankingexpression.RankingExpression; import com.yahoo.tensor.TensorType; import java.util.HashSet; import java...
import ai.vespa.rankingexpression.importer.configmodelview.*; import com.yahoo.search.query.profile.*; import com.yahoo.searchdefinition.*; import com.yahoo.searchlib.rankingexpression.*; import com.yahoo.tensor.*; import java.util.*;
[ "ai.vespa.rankingexpression", "com.yahoo.search", "com.yahoo.searchdefinition", "com.yahoo.searchlib", "com.yahoo.tensor", "java.util" ]
ai.vespa.rankingexpression; com.yahoo.search; com.yahoo.searchdefinition; com.yahoo.searchlib; com.yahoo.tensor; java.util;
2,905,809
public void decrementAndGetTestLogic(SimpleAtomicLong simpleAtomicLong, long preValue, long resultValue, long postValue) { long pre = simpleAtomicLong.get(); long result = simpleAtomicLong.decrementAndGet(); long post = simpleAtomicLong.get(); ...
void function(SimpleAtomicLong simpleAtomicLong, long preValue, long resultValue, long postValue) { long pre = simpleAtomicLong.get(); long result = simpleAtomicLong.decrementAndGet(); long post = simpleAtomicLong.get(); assertEquals(pre - 1, result); assertEquals(result, post); compareResults(pre, preValue, result, re...
/** * The Logic of testing decrementAndGet * * @param simpleAtomicLong * The SimpleAtomicLong to be tested * @param preValue * The expected 'pre' value * @param resultValue * The expected 'result' value * @param postValue * ...
The Logic of testing decrementAndGet
decrementAndGetTestLogic
{ "repo_name": "mbabic/POSA", "path": "src/hw1/SimpleAtomicLongSingleThreadedTest.java", "license": "unlicense", "size": 7683 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,388,630
public void setPaint(Paint pPaint) { if (pPaint == null) throw new IllegalArgumentException("pPaint argument cannot be null"); paint = pPaint; }
void function(Paint pPaint) { if (pPaint == null) throw new IllegalArgumentException(STR); paint = pPaint; }
/** * Sets a new {@link Paint}-element. * * @param pPaint * The new element */
Sets a new <code>Paint</code>-element
setPaint
{ "repo_name": "dakuenne/TrafficJamDroid-App", "path": "src/org/traffic/jamdroid/views/overlays/DrawableOverlayItem.java", "license": "gpl-3.0", "size": 6741 }
[ "android.graphics.Paint" ]
import android.graphics.Paint;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
1,376,775
public void fireEvent(final Class listenerType) { final Set<String> existing = new HashSet<>(); while (true) { final MutableInteger newCount = MutableInteger.of(0); madpc.forEachBeanType(listenerType, name -> { if (existing.add(name)) { // name not found, fire! newCount.value++; final...
void function(final Class listenerType) { final Set<String> existing = new HashSet<>(); while (true) { final MutableInteger newCount = MutableInteger.of(0); madpc.forEachBeanType(listenerType, name -> { if (existing.add(name)) { newCount.value++; final Object listener = lookupComponent(name); if (listener != null) { Ma...
/** * Fires the Madvoc event. * Warning: since event handlers may register more handlers, we * must collect first the list of components that matches the type * and then to execute. */
Fires the Madvoc event. Warning: since event handlers may register more handlers, we must collect first the list of components that matches the type and then to execute
fireEvent
{ "repo_name": "mosoft521/jodd", "path": "jodd-madvoc/src/main/java/jodd/madvoc/component/MadvocContainer.java", "license": "bsd-2-clause", "size": 7563 }
[ "java.util.HashSet", "java.util.Set" ]
import java.util.HashSet; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,802,014
public void destroyAll() { Set<String> set = new HashSet<String>(cache.keySet()); for (String key : set) { destroyKey(key); } }
void function() { Set<String> set = new HashSet<String>(cache.keySet()); for (String key : set) { destroyKey(key); } }
/** * clear and destroy all {@link ReferenceConfig} in the cache. */
clear and destroy all <code>ReferenceConfig</code> in the cache
destroyAll
{ "repo_name": "dadarom/dubbo", "path": "dubbo-config/dubbo-config-api/src/main/java/com/alibaba/dubbo/config/utils/ReferenceConfigCache.java", "license": "apache-2.0", "size": 5500 }
[ "java.util.HashSet", "java.util.Set" ]
import java.util.HashSet; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,229,520
List<String[]> getSpeechFormatDescriptions();
List<String[]> getSpeechFormatDescriptions();
/** * Returns a list of all the speech formats in this debate format, with descriptions. * @return An <code>ArrayList</code> of <code>String</code> arrays. Each * <code>String</code> array has two elements. The first element is * the speech type reference. The second element is a sho...
Returns a list of all the speech formats in this debate format, with descriptions
getSpeechFormatDescriptions
{ "repo_name": "czlee/debatekeeper", "path": "app/src/main/java/net/czlee/debatekeeper/debateformat/DebateFormatInfo.java", "license": "gpl-3.0", "size": 3354 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,712,670
Document.Role getClassDocumentRole(String classId, String documentId) throws DataAccessException;
Document.Role getClassDocumentRole(String classId, String documentId) throws DataAccessException;
/** * Retrieves a class' document role if it is associated with a document. * * @param classId The class' unique identifier. * * @param documentId The document's unique identifier. * * @return The class' role for some document or null if the class is not * associated with the document. * * ...
Retrieves a class' document role if it is associated with a document
getClassDocumentRole
{ "repo_name": "HaiJiaoXinHeng/server-1", "path": "src/org/ohmage/query/IClassDocumentQueries.java", "license": "apache-2.0", "size": 1762 }
[ "org.ohmage.domain.Document", "org.ohmage.exception.DataAccessException" ]
import org.ohmage.domain.Document; import org.ohmage.exception.DataAccessException;
import org.ohmage.domain.*; import org.ohmage.exception.*;
[ "org.ohmage.domain", "org.ohmage.exception" ]
org.ohmage.domain; org.ohmage.exception;
2,630,209
public boolean isDefault(Label environment) { checkInitialized(); return defaults.contains(environment); }
boolean function(Label environment) { checkInitialized(); return defaults.contains(environment); }
/** * Determines whether or not an environment is a default. Returns false if the environment doesn't * belong to this group. */
Determines whether or not an environment is a default. Returns false if the environment doesn't belong to this group
isDefault
{ "repo_name": "twitter-forks/bazel", "path": "src/main/java/com/google/devtools/build/lib/packages/EnvironmentLabels.java", "license": "apache-2.0", "size": 7087 }
[ "com.google.devtools.build.lib.cmdline.Label" ]
import com.google.devtools.build.lib.cmdline.Label;
import com.google.devtools.build.lib.cmdline.*;
[ "com.google.devtools" ]
com.google.devtools;
1,102,218
public static ArrayList<String> convertArrayToList(String[] array) { ArrayList<String> elemList = new ArrayList<String>(); for (String element : array) { elemList.add(element); } return elemList; }
static ArrayList<String> function(String[] array) { ArrayList<String> elemList = new ArrayList<String>(); for (String element : array) { elemList.add(element); } return elemList; }
/** * Convert array to list of objects. * * @param array * @return */
Convert array to list of objects
convertArrayToList
{ "repo_name": "VicCebedo/SeabedOHM", "path": "src/com/seabed/util/Utilities.java", "license": "gpl-2.0", "size": 4871 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
416,499
public void appendStringContent(StringBuilder sb) { sb.append(sbuf, 1, sizeCache - 2); } /** * make sense for those types of token:<br/> * {@link MySQLToken#USR_VAR}: e.g. "@var1", "@'mary''s'";<br/> * {@link MySQLToken#SYS_VAR}: e.g. "var2";<br/> * {@link MySQLToken#LIT...
void function(StringBuilder sb) { sb.append(sbuf, 1, sizeCache - 2); } /** * make sense for those types of token:<br/> * {@link MySQLToken#USR_VAR}: e.g. "@var1", STR;<br/> * {@link MySQLToken#SYS_VAR}: e.g. "var2";<br/> * {@link MySQLToken#LITERAL_CHARS}, {@link MySQLToken#LITERAL_NCHARS}: e.g. * STR;<br/> * {@link My...
/** * if {@link #stringValue()} returns "'abc\\'d'", then "abc\\'d" is appended */
if <code>#stringValue()</code> returns "'abc\\'d'", then "abc\\'d" is appended
appendStringContent
{ "repo_name": "xloye/tddl5", "path": "tddl-parser/src/main/java/com/alibaba/cobar/parser/recognizer/mysql/lexer/SQLLexer.java", "license": "apache-2.0", "size": 38765 }
[ "com.alibaba.cobar.parser.recognizer.mysql.MySQLToken" ]
import com.alibaba.cobar.parser.recognizer.mysql.MySQLToken;
import com.alibaba.cobar.parser.recognizer.mysql.*;
[ "com.alibaba.cobar" ]
com.alibaba.cobar;
611,879
public static void copyRecursively(File src, File dest) throws IOException { Assert.isTrue(src != null && (src.isDirectory() || src.isFile()), "Source File must denote a directory or file"); Assert.notNull(dest, "Destination File must not be null"); doCopyRecursively(src, dest); }
static void function(File src, File dest) throws IOException { Assert.isTrue(src != null && (src.isDirectory() src.isFile()), STR); Assert.notNull(dest, STR); doCopyRecursively(src, dest); }
/** * Recursively copy the contents of the {@code src} file/directory * to the {@code dest} file/directory. * * @param src the source directory * @param dest the destination directory * @throws java.io.IOException in the case of I/O errors */
Recursively copy the contents of the src file/directory to the dest file/directory
copyRecursively
{ "repo_name": "blademainer/common_utils", "path": "common_helper/src/main/java/com/xiongyingqi/util/FileSystemUtils.java", "license": "apache-2.0", "size": 3471 }
[ "java.io.File", "java.io.IOException" ]
import java.io.File; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
407,940
public static void setClusterId(FileSystem fs, Path rootdir, ClusterId clusterId, int wait) throws IOException { while (true) { try { Path idFile = new Path(rootdir, HConstants.CLUSTER_ID_FILE_NAME); Path tempIdFile = new Path(rootdir, HConstants.HBASE_TEMP_DIRECTORY + Path.S...
static void function(FileSystem fs, Path rootdir, ClusterId clusterId, int wait) throws IOException { while (true) { try { Path idFile = new Path(rootdir, HConstants.CLUSTER_ID_FILE_NAME); Path tempIdFile = new Path(rootdir, HConstants.HBASE_TEMP_DIRECTORY + Path.SEPARATOR + HConstants.CLUSTER_ID_FILE_NAME); FSDataOutp...
/** * Writes a new unique identifier for this cluster to the "hbase.id" file * in the HBase root directory * @param fs the root directory FileSystem * @param rootdir the path to the HBase root directory * @param clusterId the unique identifier to store * @param wait how long (in milliseconds) to wait ...
Writes a new unique identifier for this cluster to the "hbase.id" file in the HBase root directory
setClusterId
{ "repo_name": "andrewmains12/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java", "license": "apache-2.0", "size": 77341 }
[ "java.io.IOException", "java.io.InterruptedIOException", "org.apache.hadoop.fs.FSDataOutputStream", "org.apache.hadoop.fs.FileSystem", "org.apache.hadoop.fs.Path", "org.apache.hadoop.hbase.ClusterId", "org.apache.hadoop.hbase.HConstants", "org.apache.hadoop.util.StringUtils" ]
import java.io.IOException; import java.io.InterruptedIOException; import org.apache.hadoop.fs.FSDataOutputStream; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.ClusterId; import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.util.StringUtils;
import java.io.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.util.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
2,804,461
protected ResourceLocation getEntityTexture(EntitySlime entity) { return SLIME_TEXTURES; }
ResourceLocation function(EntitySlime entity) { return SLIME_TEXTURES; }
/** * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture. */
Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture
getEntityTexture
{ "repo_name": "boredherobrine13/morefuelsmod-1.10", "path": "build/tmp/recompileMc/sources/net/minecraft/client/renderer/entity/RenderSlime.java", "license": "lgpl-2.1", "size": 2017 }
[ "net.minecraft.entity.monster.EntitySlime", "net.minecraft.util.ResourceLocation" ]
import net.minecraft.entity.monster.EntitySlime; import net.minecraft.util.ResourceLocation;
import net.minecraft.entity.monster.*; import net.minecraft.util.*;
[ "net.minecraft.entity", "net.minecraft.util" ]
net.minecraft.entity; net.minecraft.util;
591,416
public IScope scope_MParameterValueAssignment_parameter(MSwPackageProvidedInterface pswi, EReference reference) { if (pswi.getSwinterface() == null || pswi.getSwinterface().eIsProxy() == true) { return IScope.NULLSCOPE; } Set<MParameter> params = new HashSet<MParameter>(); for (MSwInterface es...
IScope function(MSwPackageProvidedInterface pswi, EReference reference) { if (pswi.getSwinterface() == null pswi.getSwinterface().eIsProxy() == true) { return IScope.NULLSCOPE; } Set<MParameter> params = new HashSet<MParameter>(); for (MSwInterface eswi : pswi.getSwinterface().getExtends()) { params.addAll(mesputil.get...
/** * Provides the scope for the parameters whose values can be assigned * when a software interface is provided by a software package. * * @param pswi the software interface that is being provided. * @param reference the object representing the reference within the * given class. * @return the sc...
Provides the scope for the parameters whose values can be assigned when a software interface is provided by a software package
scope_MParameterValueAssignment_parameter
{ "repo_name": "parraman/micobs", "path": "mesp/es.uah.aut.srg.micobs.mesp.editor.swp/src/es/uah/aut/srg/micobs/mesp/lang/scoping/SWPScopeProvider.java", "license": "epl-1.0", "size": 45945 }
[ "es.uah.aut.srg.micobs.common.MParameter", "es.uah.aut.srg.micobs.mesp.mespswi.MSwInterface", "es.uah.aut.srg.micobs.mesp.mespswp.MSwPackageProvidedInterface", "java.util.HashSet", "java.util.Set", "org.eclipse.emf.ecore.EReference", "org.eclipse.xtext.scoping.IScope" ]
import es.uah.aut.srg.micobs.common.MParameter; import es.uah.aut.srg.micobs.mesp.mespswi.MSwInterface; import es.uah.aut.srg.micobs.mesp.mespswp.MSwPackageProvidedInterface; import java.util.HashSet; import java.util.Set; import org.eclipse.emf.ecore.EReference; import org.eclipse.xtext.scoping.IScope;
import es.uah.aut.srg.micobs.common.*; import es.uah.aut.srg.micobs.mesp.mespswi.*; import es.uah.aut.srg.micobs.mesp.mespswp.*; import java.util.*; import org.eclipse.emf.ecore.*; import org.eclipse.xtext.scoping.*;
[ "es.uah.aut", "java.util", "org.eclipse.emf", "org.eclipse.xtext" ]
es.uah.aut; java.util; org.eclipse.emf; org.eclipse.xtext;
2,320,460
public void onGuiClosed() { Keyboard.enableRepeatEvents(false); }
void function() { Keyboard.enableRepeatEvents(false); }
/** * Called when the screen is unloaded. Used to disable keyboard repeat events */
Called when the screen is unloaded. Used to disable keyboard repeat events
onGuiClosed
{ "repo_name": "Ubiquitous-Spice/Modjam-3", "path": "src/main/java/com/github/ubiquitousspice/mobjam/gamemodehack/HackedCreateWorld.java", "license": "lgpl-3.0", "size": 17185 }
[ "org.lwjgl.input.Keyboard" ]
import org.lwjgl.input.Keyboard;
import org.lwjgl.input.*;
[ "org.lwjgl.input" ]
org.lwjgl.input;
1,048,823
public RunOmhSim setSortedSimSchemaNames(List<String> sortedSimSchemaNames) { this.sortedSimSchemaNames = sortedSimSchemaNames; return this; }
RunOmhSim function(List<String> sortedSimSchemaNames) { this.sortedSimSchemaNames = sortedSimSchemaNames; return this; }
/** * Sets the sorted sim schema names. * * @param sortedSimSchemaNames the sorted sim schema names * @return the run omh sim */
Sets the sorted sim schema names
setSortedSimSchemaNames
{ "repo_name": "petezybrick/iote2e", "path": "iote2e-tests/src/main/java/com/pzybrick/iote2e/tests/omh/RunOmhSim.java", "license": "apache-2.0", "size": 11362 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,255,175
public static String createDateTimeAndFormat(double value) { if (Double.isNaN(value)) { return MISSING_DATE; } else { DATE_TIME_FORMAT.get().setTimeZone(getPreferredTimeZone()); return DATE_TIME_FORMAT.get().format(new Date((long) value)); } }
static String function(double value) { if (Double.isNaN(value)) { return MISSING_DATE; } else { DATE_TIME_FORMAT.get().setTimeZone(getPreferredTimeZone()); return DATE_TIME_FORMAT.get().format(new Date((long) value)); } }
/** * Format double value as a short datetime string. If value is NaN, returns * {@value #MISSING_DATE}. * * @param value * the value to be formatted as datetime * @return a short datetime string or {@value #MISSING_DATE} if value was NaN * @since 6.1.1 */
Format double value as a short datetime string. If value is NaN, returns #MISSING_DATE
createDateTimeAndFormat
{ "repo_name": "aborg0/rapidminer-studio", "path": "src/main/java/com/rapidminer/tools/Tools.java", "license": "agpl-3.0", "size": 76542 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
2,847,229
public T secureXML(String secureTag, Map<String, String> namespaces, boolean secureTagContents) { XMLSecurityDataFormat xsdf = new XMLSecurityDataFormat(secureTag, namespaces, secureTagContents); return dataFormat(xsdf); }
T function(String secureTag, Map<String, String> namespaces, boolean secureTagContents) { XMLSecurityDataFormat xsdf = new XMLSecurityDataFormat(secureTag, namespaces, secureTagContents); return dataFormat(xsdf); }
/** * Uses the XML Security data format */
Uses the XML Security data format
secureXML
{ "repo_name": "jarst/camel", "path": "camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java", "license": "apache-2.0", "size": 39484 }
[ "java.util.Map", "org.apache.camel.model.dataformat.XMLSecurityDataFormat" ]
import java.util.Map; import org.apache.camel.model.dataformat.XMLSecurityDataFormat;
import java.util.*; import org.apache.camel.model.dataformat.*;
[ "java.util", "org.apache.camel" ]
java.util; org.apache.camel;
332,957
private void notifySomethingIsPlaying(final PlayerType.GetActivePlayersReturnType getActivePlayersResult, final PlayerType.PropertyValue getPropertiesResult, final ListType.ItemsAll getItemResult, ...
void function(final PlayerType.GetActivePlayersReturnType getActivePlayersResult, final PlayerType.PropertyValue getPropertiesResult, final ListType.ItemsAll getItemResult, PlayerEventsObserver observer) { if (getPropertiesResult.speed == 0) { observer.playerOnPause(getActivePlayersResult, getPropertiesResult, getItemR...
/** * Something is playing or paused, notify a specific observer * Always notifies the observer, and doesn't save results in last call * @param getActivePlayersResult * @param getPropertiesResult * @param getItemResult * @param observer Specific observer */
Something is playing or paused, notify a specific observer Always notifies the observer, and doesn't save results in last call
notifySomethingIsPlaying
{ "repo_name": "jtdor/Kore", "path": "app/src/main/java/org/xbmc/kore/host/HostConnectionObserver.java", "license": "apache-2.0", "size": 34282 }
[ "org.xbmc.kore.jsonrpc.type.ListType", "org.xbmc.kore.jsonrpc.type.PlayerType" ]
import org.xbmc.kore.jsonrpc.type.ListType; import org.xbmc.kore.jsonrpc.type.PlayerType;
import org.xbmc.kore.jsonrpc.type.*;
[ "org.xbmc.kore" ]
org.xbmc.kore;
2,290,380
private void checkContainsAll(List<String> list) { List<String> additionalList = new ArrayList<>(); String substring; for (String depCode : list) { if (depCode.contains("\\")) { for (int index = 0; index != depCode.length(); index++) { index = ...
void function(List<String> list) { List<String> additionalList = new ArrayList<>(); String substring; for (String depCode : list) { if (depCode.contains("\\")) { for (int index = 0; index != depCode.length(); index++) { index = depCode.indexOf("\\", index); if (index == -1) { break; } substring = depCode.substring(0, i...
/** * Method for check and complement list of department codes. * @param list original list */
Method for check and complement list of department codes
checkContainsAll
{ "repo_name": "PavelZubaha/pzubaha", "path": "chapter_003/src/main/java/pzubaha/collection/catalog/DepartmentSort.java", "license": "apache-2.0", "size": 2902 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,212,085
@Nullable public static Element getFirstChild(@NotNull final Element el, @NotNull final String childName) { final NodeList childNodes = el.getChildNodes(); final int count = childNodes.getLength(); for (int i = 0; i < count; i++) { final Node node = childNodes.item(i); ...
@Nullable static Element function(@NotNull final Element el, @NotNull final String childName) { final NodeList childNodes = el.getChildNodes(); final int count = childNodes.getLength(); for (int i = 0; i < count; i++) { final Node node = childNodes.item(i); if (node.getNodeType() == ELEMENT_NODE && node.getNodeName().e...
/** Convenience helper method for getting the first child of an element that is an element with a specific name. * @param el element to get child of * @param childName name of child element to get * @return child element or <code>null</code> if no such child element */
Convenience helper method for getting the first child of an element that is an element with a specific name
getFirstChild
{ "repo_name": "christianhujer/japi", "path": "historic2/src/prj/net/sf/japi/xml/NodeListIterator.java", "license": "lgpl-3.0", "size": 4400 }
[ "javax.xml.xpath.XPath", "javax.xml.xpath.XPathExpressionException", "org.jetbrains.annotations.NotNull", "org.jetbrains.annotations.Nullable", "org.w3c.dom.Element", "org.w3c.dom.Node", "org.w3c.dom.NodeList" ]
import javax.xml.xpath.XPath; import javax.xml.xpath.XPathExpressionException; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList;
import javax.xml.xpath.*; import org.jetbrains.annotations.*; import org.w3c.dom.*;
[ "javax.xml", "org.jetbrains.annotations", "org.w3c.dom" ]
javax.xml; org.jetbrains.annotations; org.w3c.dom;
583,998
protected void regenerateOutput(final ResultItem item) { SwingWorker worker;
void function(final ResultItem item) { SwingWorker worker;
/** * Regenerates the output. * * @param item the result item to use */
Regenerates the output
regenerateOutput
{ "repo_name": "waikato-datamining/adams-base", "path": "adams-weka/src/main/java/adams/gui/tools/wekainvestigator/tab/ClassifyTab.java", "license": "gpl-3.0", "size": 37828 }
[ "javax.swing.SwingWorker" ]
import javax.swing.SwingWorker;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
1,917,516
protected void initializeEditingDomain() { // Create an adapter factory that yields item providers. // adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE); adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory()); ...
void function() { adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory()); adapterFactory.addAdapterFactory(new UmlTraceItemProviderAdapterFactory()); adapterFactory.addAdapterFactory(new EcoreItemProviderAdapterFactory()); adapterFactory.addAdapterFactory(new UMLItemProviderAdapterFactory()); adapte...
/** * This sets up the editing domain for the model editor. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This sets up the editing domain for the model editor.
initializeEditingDomain
{ "repo_name": "ujhelyiz/EMF-IncQuery-Examples", "path": "papyrus-uml/hu.bme.mit.examples.uml.trace.model.editor/src/UmlTrace/presentation/UmlTraceEditor.java", "license": "epl-1.0", "size": 66822 }
[ "org.eclipse.emf.ecore.provider.EcoreItemProviderAdapterFactory", "org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory", "org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory", "org.eclipse.uml2.uml.edit.providers.UMLItemProviderAdapterFactory" ]
import org.eclipse.emf.ecore.provider.EcoreItemProviderAdapterFactory; import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory; import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory; import org.eclipse.uml2.uml.edit.providers.UMLItemProviderAdapterFactory;
import org.eclipse.emf.ecore.provider.*; import org.eclipse.emf.edit.provider.*; import org.eclipse.emf.edit.provider.resource.*; import org.eclipse.uml2.uml.edit.providers.*;
[ "org.eclipse.emf", "org.eclipse.uml2" ]
org.eclipse.emf; org.eclipse.uml2;
1,049,833
private JMenuItem getSaveMenuItem() { if (saveMenuItem == null) { saveMenuItem = new JMenuItem(); saveMenuItem.addActionListener(getSaveAction()); } return saveMenuItem; }
JMenuItem function() { if (saveMenuItem == null) { saveMenuItem = new JMenuItem(); saveMenuItem.addActionListener(getSaveAction()); } return saveMenuItem; }
/** * This method initializes jMenuItem * @return javax.swing.JMenuItem * @uml.property name="saveMenuItem" */
This method initializes jMenuItem
getSaveMenuItem
{ "repo_name": "sanyaade-mediadev/vars", "path": "vars-query/src/main/java/vars/query/ui/QueryResultsFrame.java", "license": "lgpl-2.1", "size": 15384 }
[ "javax.swing.JMenuItem" ]
import javax.swing.JMenuItem;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
2,334,257
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity e) { super.setRotationAngles(f, f1, f2, f3, f4, f5, e); }
void function(float f, float f1, float f2, float f3, float f4, float f5, Entity e) { super.setRotationAngles(f, f1, f2, f3, f4, f5, e); }
/** * Sets the model's various rotation angles. For bipeds, par1 and par2 are * used for animating the movement of arms and legs, where par1 represents * the time(so that arms and legs swing back and forth) and par2 represents * how "far" arms and legs can swing at most. */
Sets the model's various rotation angles. For bipeds, par1 and par2 are used for animating the movement of arms and legs, where par1 represents the time(so that arms and legs swing back and forth) and par2 represents how "far" arms and legs can swing at most
setRotationAngles
{ "repo_name": "GollumTeam/AtlanteanMillenaire", "path": "src/main/java/com/gollum/atlanteanmillenaire/client/model/ceramic/ModelBathroomSink.java", "license": "gpl-2.0", "size": 5892 }
[ "net.minecraft.entity.Entity" ]
import net.minecraft.entity.Entity;
import net.minecraft.entity.*;
[ "net.minecraft.entity" ]
net.minecraft.entity;
1,245,040
public static boolean isCategoryAccessible(final int categoryId) { return isCategoryAccessible(SessionFacade.getUserSession().getUserId(), categoryId); }
static boolean function(final int categoryId) { return isCategoryAccessible(SessionFacade.getUserSession().getUserId(), categoryId); }
/** * Check if some category is accessible. * A call to @link #isCategoryAccessible(int, int) is made, using the * return of <code>SessionFacade.getUserSession().getUserId()</code> * as argument for the "userId" parameter. * * @param categoryId The category id to check for access rights * @return <code>t...
Check if some category is accessible. A call to @link #isCategoryAccessible(int, int) is made, using the return of <code>SessionFacade.getUserSession().getUserId()</code> as argument for the "userId" parameter
isCategoryAccessible
{ "repo_name": "javadan/jforum", "path": "src/main/java/net/jforum/repository/ForumRepository.java", "license": "bsd-3-clause", "size": 28127 }
[ "net.jforum.SessionFacade" ]
import net.jforum.SessionFacade;
import net.jforum.*;
[ "net.jforum" ]
net.jforum;
1,466,687
@Override public String toString() { return RuntimeDelegate.getInstance().createHeaderDelegate(RestconfMediaType.class).toString(this); }
String function() { return RuntimeDelegate.getInstance().createHeaderDelegate(RestconfMediaType.class).toString(this); }
/** * Convert the media type to a string suitable for use as the value of a * corresponding HTTP header. * * @return a string version of the media type. */
Convert the media type to a string suitable for use as the value of a corresponding HTTP header
toString
{ "repo_name": "cboling/onos-restconf-providers", "path": "protocols/restconf/api/src/main/java/org/onosproject/restconf/RestconfMediaType.java", "license": "apache-2.0", "size": 13547 }
[ "javax.ws.rs.ext.RuntimeDelegate" ]
import javax.ws.rs.ext.RuntimeDelegate;
import javax.ws.rs.ext.*;
[ "javax.ws" ]
javax.ws;
17,140
@Before public void setUp() throws Exception { less = createLessInstance(); equal1 = createEqualInstance(); equal2 = createEqualInstance(); greater = createGreaterInstance(); // We want these assertions to yield errors, not failures. try { assertNotNull("createLessInstance() returned null", less); ...
void function() throws Exception { less = createLessInstance(); equal1 = createEqualInstance(); equal2 = createEqualInstance(); greater = createGreaterInstance(); try { assertNotNull(STR, less); assertNotNull(STR, equal1); assertNotNull(STR, equal2); assertNotNull(STR, greater); assertEquals(STR, less.getClass(), equal...
/** * Sets up the test fixture. * * @throws Exception */
Sets up the test fixture
setUp
{ "repo_name": "fharias/purplecore", "path": "jpos/src/test/java/org/jpos/testhelpers/ComparabilityTestCase.java", "license": "agpl-3.0", "size": 6358 }
[ "junit.framework.AssertionFailedError", "org.junit.Assert" ]
import junit.framework.AssertionFailedError; import org.junit.Assert;
import junit.framework.*; import org.junit.*;
[ "junit.framework", "org.junit" ]
junit.framework; org.junit;
248,939
void retypeColumn(ColumnSchema oldCol, ColumnSchema newCol) { boolean allowed = true; int oldType = oldCol.getDataType().typeCode; int newType = newCol.getDataType().typeCode; if (!table.isEmpty(session) && oldType != newType) { allowed = newCol....
void retypeColumn(ColumnSchema oldCol, ColumnSchema newCol) { boolean allowed = true; int oldType = oldCol.getDataType().typeCode; int newType = newCol.getDataType().typeCode; if (!table.isEmpty(session) && oldType != newType) { allowed = newCol.getDataType().canConvertFrom(oldCol.getDataType()); switch (oldType) { cas...
/** * Allows changing the type or addition of an IDENTITY sequence. * * @param oldCol Column * @param newCol Column */
Allows changing the type or addition of an IDENTITY sequence
retypeColumn
{ "repo_name": "kobronson/cs-voltdb", "path": "src/hsqldb19b3/org/hsqldb_voltpatches/TableWorks.java", "license": "agpl-3.0", "size": 43321 }
[ "org.hsqldb_voltpatches.lib.ArrayUtil" ]
import org.hsqldb_voltpatches.lib.ArrayUtil;
import org.hsqldb_voltpatches.lib.*;
[ "org.hsqldb_voltpatches.lib" ]
org.hsqldb_voltpatches.lib;
2,555,244
private void init(OutputStream out, String encoding) throws UnsupportedEncodingException, IOException { internalOut = new OutputStreamWriter(out, encoding); // Write the proper BOM if they specified a Unicode encoding. // NOTE: Creating an OutputStreamWriter with encoding "UTF-16" DOES // DOES...
void function(OutputStream out, String encoding) throws UnsupportedEncodingException, IOException { internalOut = new OutputStreamWriter(out, encoding); if ("UTF-8".equals(encoding)) { if (getWriteUtf8BOM()) { out.write(UTF8_BOM, 0, UTF8_BOM.length); } } else if (STR.equals(encoding)) { out.write(UTF16LE_BOM, 0, UTF16L...
/** * Initializes the internal output stream and writes the BOM if the * specified encoding is a Unicode encoding. * * @param out The output stream we are writing. * @param encoding The encoding in which to write. * @throws UnsupportedEncodingException If the specified encoding isn't * supp...
Initializes the internal output stream and writes the BOM if the specified encoding is a Unicode encoding
init
{ "repo_name": "curiosag/ftc", "path": "RSyntaxTextArea/src/main/java/org/fife/io/UnicodeWriter.java", "license": "gpl-3.0", "size": 7741 }
[ "java.io.IOException", "java.io.OutputStream", "java.io.OutputStreamWriter", "java.io.UnsupportedEncodingException" ]
import java.io.IOException; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.io.UnsupportedEncodingException;
import java.io.*;
[ "java.io" ]
java.io;
1,511,511
public void testStepLargerThanRange() { final List callLog = new ArrayList(); final Closure closure = new RecordingClosure(callLog); final Range range = createRange(1, 5); range.step(6, closure); assertEquals("wrong number of calls to closure", 1, callLog.size()); a...
void function() { final List callLog = new ArrayList(); final Closure closure = new RecordingClosure(callLog); final Range range = createRange(1, 5); range.step(6, closure); assertEquals(STR, 1, callLog.size()); assertEquals(STR, createValue(1), callLog.get(0)); final List stepList = range.step(6); assertEquals(STR, 1,...
/** * Tests stepping backwards through a range with a step size greater than the range size. */
Tests stepping backwards through a range with a step size greater than the range size
testStepLargerThanRange
{ "repo_name": "jwagenleitner/incubator-groovy", "path": "src/test/groovy/lang/NumberRangeTestCase.java", "license": "apache-2.0", "size": 25516 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,928,354
public void addType(final PluginType type) { types.add(type); }
void function(final PluginType type) { types.add(type); }
/** * Adds the specified type. * * @param type * the specified type */
Adds the specified type
addType
{ "repo_name": "daima/solo-spring", "path": "src/main/java/org/b3log/solo/module/event/AbstractPlugin.java", "license": "apache-2.0", "size": 14490 }
[ "org.b3log.solo.frame.plugin.PluginType" ]
import org.b3log.solo.frame.plugin.PluginType;
import org.b3log.solo.frame.plugin.*;
[ "org.b3log.solo" ]
org.b3log.solo;
864,459
interface AwsEcsComponentBuilder extends ComponentBuilder<ECSComponent> { default AwsEcsComponentBuilder autoDiscoverClient( boolean autoDiscoverClient) { doSetProperty("autoDiscoverClient", autoDiscoverClient); return this; }
interface AwsEcsComponentBuilder extends ComponentBuilder<ECSComponent> { default AwsEcsComponentBuilder autoDiscoverClient( boolean autoDiscoverClient) { doSetProperty(STR, autoDiscoverClient); return this; }
/** * Setting the autoDiscoverClient mechanism, if true, the component will * look for a client instance in the registry automatically otherwise it * will skip that checking. * * The option is a: <code>boolean</code> type. * * Default: true * Gro...
Setting the autoDiscoverClient mechanism, if true, the component will look for a client instance in the registry automatically otherwise it will skip that checking. The option is a: <code>boolean</code> type. Default: true Group: common
autoDiscoverClient
{ "repo_name": "nicolaferraro/camel", "path": "core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/AwsEcsComponentBuilderFactory.java", "license": "apache-2.0", "size": 10565 }
[ "org.apache.camel.builder.component.ComponentBuilder", "org.apache.camel.component.aws.ecs.ECSComponent" ]
import org.apache.camel.builder.component.ComponentBuilder; import org.apache.camel.component.aws.ecs.ECSComponent;
import org.apache.camel.builder.component.*; import org.apache.camel.component.aws.ecs.*;
[ "org.apache.camel" ]
org.apache.camel;
391,081
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; bindingGroup = new org.jdesktop.beansbinding.BindingGroup(); setOpaque(false); ...
@SuppressWarnings(STR) void function() { java.awt.GridBagConstraints gridBagConstraints; bindingGroup = new org.jdesktop.beansbinding.BindingGroup(); setOpaque(false); setLayout(new java.awt.GridBagLayout()); lblName.setText(NbBundle.getMessage( DoCalibrationVisualPanelMetadata.class, STR)); gridBagConstraints = new ja...
/** * This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The * content of this method is always regenerated by the Form Editor. */
content of this method is always regenerated by the Form Editor
initComponents
{ "repo_name": "cismet/cids-custom-sudplan", "path": "src/main/java/de/cismet/cids/custom/sudplan/hydrology/DoCalibrationVisualPanelMetadata.java", "license": "lgpl-3.0", "size": 5851 }
[ "org.openide.util.NbBundle" ]
import org.openide.util.NbBundle;
import org.openide.util.*;
[ "org.openide.util" ]
org.openide.util;
241,297