method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
public void startElement(QName element, XMLAttributes attributes, Augmentations augs) throws XNIException { if (!resolveXPointer(element, attributes, augs, XPointerPart.EVENT_ELEMENT_START)) { // xml:base and xml:lang processing if (fFixupBase) { ...
void function(QName element, XMLAttributes attributes, Augmentations augs) throws XNIException { if (!resolveXPointer(element, attributes, augs, XPointerPart.EVENT_ELEMENT_START)) { if (fFixupBase) { processXMLBaseAttributes(attributes); } if (fFixupLang) { processXMLLangAttributes(attributes); } fNamespaceContext.setC...
/** * The start of an element. * * @param element The name of the element. * @param attributes The element attributes. * @param augs Additional information that may include infoset augmentations * * @exception XNIException * Thrown b...
The start of an element
startElement
{ "repo_name": "RackerWilliams/xercesj", "path": "src/org/apache/xerces/xpointer/XPointerHandler.java", "license": "apache-2.0", "size": 46718 }
[ "org.apache.xerces.xni.Augmentations", "org.apache.xerces.xni.QName", "org.apache.xerces.xni.XMLAttributes", "org.apache.xerces.xni.XNIException" ]
import org.apache.xerces.xni.Augmentations; import org.apache.xerces.xni.QName; import org.apache.xerces.xni.XMLAttributes; import org.apache.xerces.xni.XNIException;
import org.apache.xerces.xni.*;
[ "org.apache.xerces" ]
org.apache.xerces;
330,708
@Test public void testLdifEntryChangeTypeModDnNoControl() throws Exception { String ldif = "changetype: moddn\n" + "newrdn: cn=app2\n" + "deleteoldrdn: 1\n"; LdifEntry ldifEntry1 = new LdifEntry( "cn=app1,ou=applications,ou=conf,dc=apache,dc=org",...
void function() throws Exception { String ldif = STR + STR + STR; LdifEntry ldifEntry1 = new LdifEntry( STR, ldif ); ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream out = new ObjectOutputStream( baos ); ldifEntry1.writeExternal( out ); ObjectInputStream in = null; byte[] data = baos.toByteA...
/** * Test a ModDn changeType LdifEntry with no control */
Test a ModDn changeType LdifEntry with no control
testLdifEntryChangeTypeModDnNoControl
{ "repo_name": "darranl/directory-shared", "path": "ldap/model/src/test/java/org/apache/directory/api/ldap/model/ldif/LdifEntrySerializationTest.java", "license": "apache-2.0", "size": 16825 }
[ "java.io.ByteArrayInputStream", "java.io.ByteArrayOutputStream", "java.io.ObjectInputStream", "java.io.ObjectOutputStream", "org.apache.directory.api.ldap.model.ldif.LdifEntry", "org.junit.Assert" ]
import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import org.apache.directory.api.ldap.model.ldif.LdifEntry; import org.junit.Assert;
import java.io.*; import org.apache.directory.api.ldap.model.ldif.*; import org.junit.*;
[ "java.io", "org.apache.directory", "org.junit" ]
java.io; org.apache.directory; org.junit;
293,339
public Map<String, String> getTenantDomainMappings(String tenantDomain, String apiType) throws APIManagementException { return APIUtil.getDomainMappings(tenantDomain, apiType); }
Map<String, String> function(String tenantDomain, String apiType) throws APIManagementException { return APIUtil.getDomainMappings(tenantDomain, apiType); }
/** * Returns a list of pre-defined # {@link org.wso2.carbon.apimgt.api.model.Tier} in the system. * * @return Map<String, String> */
Returns a list of pre-defined # <code>org.wso2.carbon.apimgt.api.model.Tier</code> in the system
getTenantDomainMappings
{ "repo_name": "bhathiya/test", "path": "components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/AbstractAPIManager.java", "license": "apache-2.0", "size": 110558 }
[ "java.util.Map", "org.wso2.carbon.apimgt.api.APIManagementException", "org.wso2.carbon.apimgt.impl.utils.APIUtil" ]
import java.util.Map; import org.wso2.carbon.apimgt.api.APIManagementException; import org.wso2.carbon.apimgt.impl.utils.APIUtil;
import java.util.*; import org.wso2.carbon.apimgt.api.*; import org.wso2.carbon.apimgt.impl.utils.*;
[ "java.util", "org.wso2.carbon" ]
java.util; org.wso2.carbon;
1,606,977
public static <T extends BaseDbo> T from(JsonObject jobj, Class<T> clazz) { if (LOGGER.isDebugEnabled()) { LOGGER.debug("Parsing Dbo Class<"+clazz.getName()+"> from JSON="+jobj.toString()); } return Global.getInstance().getGson().fromJson(jobj, clazz); }
static <T extends BaseDbo> T function(JsonObject jobj, Class<T> clazz) { if (LOGGER.isDebugEnabled()) { LOGGER.debug(STR+clazz.getName()+STR+jobj.toString()); } return Global.getInstance().getGson().fromJson(jobj, clazz); }
/** * Parse JsonObject and build BaseDbo type from it * @param jobj JsonObject * @param clazz Class of T * @param <T> type of BaseDbo * @return Object of type BaseDbo populated with data from JsonObject */
Parse JsonObject and build BaseDbo type from it
from
{ "repo_name": "achacha/SomeWebCardGame", "path": "src/main/java/org/achacha/base/db/BaseDbo.java", "license": "mit", "size": 2747 }
[ "com.google.gson.JsonObject", "org.achacha.base.global.Global" ]
import com.google.gson.JsonObject; import org.achacha.base.global.Global;
import com.google.gson.*; import org.achacha.base.global.*;
[ "com.google.gson", "org.achacha.base" ]
com.google.gson; org.achacha.base;
2,831,441
@Override protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); newChildDescriptors.add (createChildParameter (MakingOfPackage.Literals.STORY__DAYS, MakingOfFactory.eINSTANCE.createDay...
void function(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); newChildDescriptors.add (createChildParameter (MakingOfPackage.Literals.STORY__DAYS, MakingOfFactory.eINSTANCE.createDay())); }
/** * 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": "ObeoNetwork/Conference-Designer", "path": "plugins/fr.obeo.conference.edit/src/conference/makingOf/provider/StoryItemProvider.java", "license": "epl-1.0", "size": 6286 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
1,084,327
// TODO(nickreid): This isn't really equality based. Use a different name. public void isEqualIncludingJsDocTo(Node expected) { isEqualToInternal(expected, true); }
void function(Node expected) { isEqualToInternal(expected, true); }
/** * Compare the node-trees of actual and expected. * * <p>The per-node comparison ignores: * * <ul> * <li>Types * <li>Side-effects * </ul> */
Compare the node-trees of actual and expected. The per-node comparison ignores: Types Side-effects
isEqualIncludingJsDocTo
{ "repo_name": "vobruba-martin/closure-compiler", "path": "src/com/google/javascript/rhino/testing/NodeSubject.java", "license": "apache-2.0", "size": 13685 }
[ "com.google.javascript.rhino.Node" ]
import com.google.javascript.rhino.Node;
import com.google.javascript.rhino.*;
[ "com.google.javascript" ]
com.google.javascript;
779,073
public static void updateLog4jConfiguration(Class<?> targetClass, String log4jFileName) throws IOException { Properties originalProperties = loadLog4jFileFromResource(targetClass, log4jFileName); LogManager.resetConfiguration(); PropertyConfigurator.configure(originalProperties); }
static void function(Class<?> targetClass, String log4jFileName) throws IOException { Properties originalProperties = loadLog4jFileFromResource(targetClass, log4jFileName); LogManager.resetConfiguration(); PropertyConfigurator.configure(originalProperties); }
/** * Update the log4j configuration by loading the specified log4jFileName as a resource from the classpath of the * targetClass. * * @param targetClass the target class used to get the original log4j configuration file as a resource * @param log4jFileName the custom log4j configuration properties file ...
Update the log4j configuration by loading the specified log4jFileName as a resource from the classpath of the targetClass
updateLog4jConfiguration
{ "repo_name": "sahilTakiar/gobblin", "path": "gobblin-utility/src/main/java/gobblin/util/logs/Log4jConfigurationHelper.java", "license": "apache-2.0", "size": 3684 }
[ "java.io.IOException", "java.util.Properties", "org.apache.log4j.LogManager", "org.apache.log4j.PropertyConfigurator" ]
import java.io.IOException; import java.util.Properties; import org.apache.log4j.LogManager; import org.apache.log4j.PropertyConfigurator;
import java.io.*; import java.util.*; import org.apache.log4j.*;
[ "java.io", "java.util", "org.apache.log4j" ]
java.io; java.util; org.apache.log4j;
322,958
public HTable createTable(byte[] tableName, byte[] family, int numVersions) throws IOException { return createTable(tableName, new byte[][]{family}, numVersions); }
HTable function(byte[] tableName, byte[] family, int numVersions) throws IOException { return createTable(tableName, new byte[][]{family}, numVersions); }
/** * Create a table. * @param tableName * @param family * @param numVersions * @return An HTable instance for the created table. * @throws IOException */
Create a table
createTable
{ "repo_name": "SeekerResource/hbase", "path": "hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java", "license": "apache-2.0", "size": 145665 }
[ "java.io.IOException", "org.apache.hadoop.hbase.client.HTable" ]
import java.io.IOException; import org.apache.hadoop.hbase.client.HTable;
import java.io.*; import org.apache.hadoop.hbase.client.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
16,725
private static void setChannel(String channel) { Prefs.setAppChannel(channel); }
static void function(String channel) { Prefs.setAppChannel(channel); }
/** * Sets the distribution channel for the app into SharedPreferences */
Sets the distribution channel for the app into SharedPreferences
setChannel
{ "repo_name": "reproio/apps-android-wikipedia", "path": "wikipedia/src/main/java/org/wikipedia/Utils.java", "license": "apache-2.0", "size": 23229 }
[ "org.wikipedia.settings.Prefs" ]
import org.wikipedia.settings.Prefs;
import org.wikipedia.settings.*;
[ "org.wikipedia.settings" ]
org.wikipedia.settings;
1,942,602
@Override protected void sendReply(InternalDistributedMember member, int procId, DistributionManager dm, ReplyException ex, PartitionedRegion pr, long startTime) { // if there was an exception, then throw out any data if (ex != null) { this.outStream = null; this.replyMsgNum ...
void function(InternalDistributedMember member, int procId, DistributionManager dm, ReplyException ex, PartitionedRegion pr, long startTime) { if (ex != null) { this.outStream = null; this.replyMsgNum = 0; this.replyLastMsg = true; } if (this.replyLastMsg) { if (pr != null && startTime > 0) { pr.getPrStats().endPartiti...
/** * send a reply message. This is in a method so that subclasses can override the reply message * type * * @see PutMessage#sendReply */
send a reply message. This is in a method so that subclasses can override the reply message type
sendReply
{ "repo_name": "davinash/geode", "path": "geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/StreamingPartitionOperation.java", "license": "apache-2.0", "size": 18724 }
[ "org.apache.geode.distributed.internal.DistributionManager", "org.apache.geode.distributed.internal.ReplyException", "org.apache.geode.distributed.internal.membership.InternalDistributedMember", "org.apache.geode.internal.cache.PartitionedRegion" ]
import org.apache.geode.distributed.internal.DistributionManager; import org.apache.geode.distributed.internal.ReplyException; import org.apache.geode.distributed.internal.membership.InternalDistributedMember; import org.apache.geode.internal.cache.PartitionedRegion;
import org.apache.geode.distributed.internal.*; import org.apache.geode.distributed.internal.membership.*; import org.apache.geode.internal.cache.*;
[ "org.apache.geode" ]
org.apache.geode;
2,064,493
static boolean removeAllImpl(Set<?> set, Iterator<?> iterator) { boolean changed = false; while (iterator.hasNext()) { changed |= set.remove(iterator.next()); } return changed; }
static boolean removeAllImpl(Set<?> set, Iterator<?> iterator) { boolean changed = false; while (iterator.hasNext()) { changed = set.remove(iterator.next()); } return changed; }
/** * Remove each element in an iterable from a set. */
Remove each element in an iterable from a set
removeAllImpl
{ "repo_name": "minji-kim/calcite", "path": "core/src/main/java/org/apache/calcite/util/CompatibleGuava11.java", "license": "apache-2.0", "size": 14010 }
[ "java.util.Iterator", "java.util.Set" ]
import java.util.Iterator; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,181,624
private File getDirectory(final ILocalAudioObject song, final File destinationBaseFolder) { // Get base folder or the first folder if there is any error File baseFolder = null; for (File folder : this.folders) { String filePath = getFileManager().getFolderPath(song); String folderParentPath = folder.g...
File function(final ILocalAudioObject song, final File destinationBaseFolder) { File baseFolder = null; for (File folder : this.folders) { String filePath = getFileManager().getFolderPath(song); String folderParentPath = folder.getParentFile() != null ? FileUtils .getPath(folder.getParentFile()) : null; if (filePath !=...
/** * Prepares the directory structure in which the song will be written. * * @param song * Song to be written * @param destinationBaseFolder * Destination path * @return Returns the directory structure with full path where the file * will be written */
Prepares the directory structure in which the song will be written
getDirectory
{ "repo_name": "PDavid/aTunes", "path": "aTunes/src/main/java/net/sourceforge/atunes/kernel/modules/process/ImportFilesProcess.java", "license": "gpl-2.0", "size": 9846 }
[ "java.io.File", "net.sourceforge.atunes.model.ILocalAudioObject", "net.sourceforge.atunes.utils.FileNameUtils", "net.sourceforge.atunes.utils.FileUtils", "net.sourceforge.atunes.utils.StringUtils" ]
import java.io.File; import net.sourceforge.atunes.model.ILocalAudioObject; import net.sourceforge.atunes.utils.FileNameUtils; import net.sourceforge.atunes.utils.FileUtils; import net.sourceforge.atunes.utils.StringUtils;
import java.io.*; import net.sourceforge.atunes.model.*; import net.sourceforge.atunes.utils.*;
[ "java.io", "net.sourceforge.atunes" ]
java.io; net.sourceforge.atunes;
2,911,838
public SkyframeExecutor getSkyframeExecutor() { return skyframeExecutor; }
SkyframeExecutor function() { return skyframeExecutor; }
/** * Returns the skyframe executor. */
Returns the skyframe executor
getSkyframeExecutor
{ "repo_name": "Krasnyanskiy/bazel", "path": "src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java", "license": "apache-2.0", "size": 68285 }
[ "com.google.devtools.build.lib.skyframe.SkyframeExecutor" ]
import com.google.devtools.build.lib.skyframe.SkyframeExecutor;
import com.google.devtools.build.lib.skyframe.*;
[ "com.google.devtools" ]
com.google.devtools;
1,257,489
public static double getMoney(String name) throws UserDoesNotExistException { User user = getUserByName(name); if (user == null) { throw new UserDoesNotExistException(name); } // Use UserData to avoid calls to iConomy and Register return ((UserData)user).getMoney(); }
static double function(String name) throws UserDoesNotExistException { User user = getUserByName(name); if (user == null) { throw new UserDoesNotExistException(name); } return ((UserData)user).getMoney(); }
/** * Returns the balance of a user * @param name Name of the user * @return balance * @throws UserDoesNotExistException */
Returns the balance of a user
getMoney
{ "repo_name": "AkintudnesServer/essentials", "path": "Essentials/src/com/earth2me/essentials/api/Economy.java", "license": "gpl-3.0", "size": 8461 }
[ "com.earth2me.essentials.User", "com.earth2me.essentials.UserData" ]
import com.earth2me.essentials.User; import com.earth2me.essentials.UserData;
import com.earth2me.essentials.*;
[ "com.earth2me.essentials" ]
com.earth2me.essentials;
487,135
public synchronized void createJarFile() throws IOException { //Retrieve dependencies automatically addDependencies(); // Temporary buffer for the stream copy final byte[] buf = new byte[128]; // Check if output file is valid if (this.outputFile == null) { throw new IOException("Output file is null"...
synchronized void function() throws IOException { addDependencies(); final byte[] buf = new byte[128]; if (this.outputFile == null) { throw new IOException(STR); } if (this.outputFile.exists()) { this.outputFile.delete(); } try ( JarOutputStream jos = new JarOutputStream(new FileOutputStream(this.outputFile), new Manif...
/** * Creates a jar file which contains the previously added class. The content of the jar file is written to * <code>outputFile</code> which has been provided to the constructor. If <code>outputFile</code> already exists, it * is overwritten by this operation. * * @throws IOException * thrown if a...
Creates a jar file which contains the previously added class. The content of the jar file is written to <code>outputFile</code> which has been provided to the constructor. If <code>outputFile</code> already exists, it is overwritten by this operation
createJarFile
{ "repo_name": "WangTaoTheTonic/flink", "path": "flink-runtime/src/main/java/org/apache/flink/runtime/util/JarFileCreator.java", "license": "apache-2.0", "size": 6304 }
[ "java.io.FileOutputStream", "java.io.IOException", "java.io.InputStream", "java.util.Iterator", "java.util.jar.JarEntry", "java.util.jar.JarOutputStream", "java.util.jar.Manifest" ]
import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.util.Iterator; import java.util.jar.JarEntry; import java.util.jar.JarOutputStream; import java.util.jar.Manifest;
import java.io.*; import java.util.*; import java.util.jar.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,964,871
public void setEJsonDataResult(EJsonDataResult result) { this.result = result; }
void function(EJsonDataResult result) { this.result = result; }
/** * set ejson data object. * * @param result * EJsonDataResult */
set ejson data object
setEJsonDataResult
{ "repo_name": "sdgdsffdsfff/configcenter-1", "path": "src/main/java/com/baidu/cc/web/action/EnvironmentSaveActionBase.java", "license": "apache-2.0", "size": 7389 }
[ "com.baidu.lego.web.spi.EJsonDataResult" ]
import com.baidu.lego.web.spi.EJsonDataResult;
import com.baidu.lego.web.spi.*;
[ "com.baidu.lego" ]
com.baidu.lego;
1,969,879
public String convertStringToPseudoLoc(String string) { StringBuilder sb = new StringBuilder(); if (!Strings.isNullOrEmpty(string)) { String str = convertAsciiToDiacritics(string); sb.append(expand(str)); sb.insert(0, '⟦'); sb.append('⟧'); } ...
String function(String string) { StringBuilder sb = new StringBuilder(); if (!Strings.isNullOrEmpty(string)) { String str = convertAsciiToDiacritics(string); sb.append(expand(str)); sb.insert(0, '⟦'); sb.append('⟧'); } return sb.toString(); }
/** * Pseudo localize a string depending expansion factor and bracket option. * * @param string string to be pseudo localized * @return pseudo localized string */
Pseudo localize a string depending expansion factor and bracket option
convertStringToPseudoLoc
{ "repo_name": "box/mojito", "path": "webapp/src/main/java/com/box/l10n/mojito/pseudoloc/PseudoLocalization.java", "license": "apache-2.0", "size": 7877 }
[ "com.google.common.base.Strings" ]
import com.google.common.base.Strings;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
2,783,903
public static AsymmetricKeyParameter createKey( byte[] privateKeyInfoData) throws IOException { return createKey( PrivateKeyInfo.getInstance( ASN1Object.fromByteArray(privateKeyInfoData))); }
static AsymmetricKeyParameter function( byte[] privateKeyInfoData) throws IOException { return createKey( PrivateKeyInfo.getInstance( ASN1Object.fromByteArray(privateKeyInfoData))); }
/** * Create a private key parameter from a PKCS8 PrivateKeyInfo encoding. * * @param privateKeyInfoData the PrivateKeyInfo encoding * @return a suitable private key parameter * @throws IOException on an error decoding the key */
Create a private key parameter from a PKCS8 PrivateKeyInfo encoding
createKey
{ "repo_name": "lynnlyc/for-honeynet-reviewers", "path": "CallbackDroid/android-environment/src/bouncycastle/src/main/java/org/bouncycastle/crypto/util/PrivateKeyFactory.java", "license": "gpl-3.0", "size": 8571 }
[ "java.io.IOException", "org.bouncycastle.asn1.ASN1Object", "org.bouncycastle.asn1.pkcs.PrivateKeyInfo", "org.bouncycastle.crypto.params.AsymmetricKeyParameter" ]
import java.io.IOException; import org.bouncycastle.asn1.ASN1Object; import org.bouncycastle.asn1.pkcs.PrivateKeyInfo; import org.bouncycastle.crypto.params.AsymmetricKeyParameter;
import java.io.*; import org.bouncycastle.asn1.*; import org.bouncycastle.asn1.pkcs.*; import org.bouncycastle.crypto.params.*;
[ "java.io", "org.bouncycastle.asn1", "org.bouncycastle.crypto" ]
java.io; org.bouncycastle.asn1; org.bouncycastle.crypto;
2,511,032
@Deprecated RootCallTarget createCallTarget(RootNode rootNode);
RootCallTarget createCallTarget(RootNode rootNode);
/** * Creates a new call target for a given root node if none exists. Otherwise, the existing call * target is returned. * * @param rootNode the root node whose * {@link RootNode#execute(com.oracle.truffle.api.frame.VirtualFrame)} method * represents the entry point ...
Creates a new call target for a given root node if none exists. Otherwise, the existing call target is returned
createCallTarget
{ "repo_name": "smarr/Truffle", "path": "truffle/src/com.oracle.truffle.api/src/com/oracle/truffle/api/TruffleRuntime.java", "license": "gpl-2.0", "size": 9223 }
[ "com.oracle.truffle.api.nodes.RootNode" ]
import com.oracle.truffle.api.nodes.RootNode;
import com.oracle.truffle.api.nodes.*;
[ "com.oracle.truffle" ]
com.oracle.truffle;
2,193,902
HistoryEvent createHistoricVariableCreateEvt(VariableInstanceEntity variableInstance, VariableScope sourceVariableScope);
HistoryEvent createHistoricVariableCreateEvt(VariableInstanceEntity variableInstance, VariableScope sourceVariableScope);
/** * Creates the history event fired when a variable is <strong>created</strong>. * * @param variableInstance the runtime variable instance * @param the scope to which the variable is linked * @return the history event */
Creates the history event fired when a variable is created
createHistoricVariableCreateEvt
{ "repo_name": "falko/camunda-bpm-platform", "path": "engine/src/main/java/org/camunda/bpm/engine/impl/history/producer/HistoryEventProducer.java", "license": "apache-2.0", "size": 10808 }
[ "org.camunda.bpm.engine.delegate.VariableScope", "org.camunda.bpm.engine.impl.history.event.HistoryEvent", "org.camunda.bpm.engine.impl.persistence.entity.VariableInstanceEntity" ]
import org.camunda.bpm.engine.delegate.VariableScope; import org.camunda.bpm.engine.impl.history.event.HistoryEvent; import org.camunda.bpm.engine.impl.persistence.entity.VariableInstanceEntity;
import org.camunda.bpm.engine.delegate.*; import org.camunda.bpm.engine.impl.history.event.*; import org.camunda.bpm.engine.impl.persistence.entity.*;
[ "org.camunda.bpm" ]
org.camunda.bpm;
2,091,060
public static String hexDump(ChannelBuffer buffer) { return hexDump(buffer, buffer.readerIndex(), buffer.readableBytes()); }
static String function(ChannelBuffer buffer) { return hexDump(buffer, buffer.readerIndex(), buffer.readableBytes()); }
/** * Returns a <a href="http://en.wikipedia.org/wiki/Hex_dump">hex dump</a> * of the specified buffer's readable bytes. */
Returns a hex dump of the specified buffer's readable bytes
hexDump
{ "repo_name": "nyankosama/simple-netty-source", "path": "src/main/java/org/jboss/netty/buffer/impl/ChannelBuffers.java", "license": "apache-2.0", "size": 39250 }
[ "org.jboss.netty.buffer.ChannelBuffer" ]
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.*;
[ "org.jboss.netty" ]
org.jboss.netty;
2,044,531
public void addRunOnCloseCallback(final Runnable runnable) { if (_closeCallbacks == null) { _closeCallbacks = new ArrayList<Runnable>(); } _closeCallbacks.add(runnable); }
void function(final Runnable runnable) { if (_closeCallbacks == null) { _closeCallbacks = new ArrayList<Runnable>(); } _closeCallbacks.add(runnable); }
/** * let classes pass callbacks to be run when we are closing * * @param runnable */
let classes pass callbacks to be run when we are closing
addRunOnCloseCallback
{ "repo_name": "debrief/debrief", "path": "info.limpet.stackedcharts.ui/src/info/limpet/stackedcharts/ui/view/StackedChartsView.java", "license": "epl-1.0", "size": 27445 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
1,566,779
private void validateConstructor(final Constructor<Object> ctr, final Object... args) { this.checkForViolations( this.validator .forExecutables() .validateConstructorParameters( ctr, args ) );...
void function(final Constructor<Object> ctr, final Object... args) { this.checkForViolations( this.validator .forExecutables() .validateConstructorParameters( ctr, args ) ); }
/** * Validates constructor parameters. * @param ctr Constructor at pointcut * @param args Parameters of the method */
Validates constructor parameters
validateConstructor
{ "repo_name": "54uso/jcabi-aspects", "path": "src/main/java/com/jcabi/aspects/aj/MethodValidator.java", "license": "bsd-3-clause", "size": 7343 }
[ "java.lang.reflect.Constructor" ]
import java.lang.reflect.Constructor;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
1,974,546
public synchronized T getClassLoadService(String className, Class<? extends BaseClassLoadService> serviceBaseInterface) { ClassLoadServiceElement clsElementFound = null; ClassLoadServiceElement clsElementLocal = null; String howFound = null; int nServicesKnown = 0; int nServicesNew = 0; ...
synchronized T function(String className, Class<? extends BaseClassLoadService> serviceBaseInterface) { ClassLoadServiceElement clsElementFound = null; ClassLoadServiceElement clsElementLocal = null; String howFound = null; int nServicesKnown = 0; int nServicesNew = 0; int dollarPos = className.indexOf("$"); if (dollar...
/** * Return the class load service for the specified class. * * @param className the class name * @param serviceBaseInterface the type of the service, specified by the interface * @return the class load service */
Return the class load service for the specified class
getClassLoadService
{ "repo_name": "EnFlexIT/AgentWorkbench", "path": "eclipseProjects/org.agentgui/bundles/de.enflexit.common/src/de/enflexit/common/classLoadService/AbstractClassLoadServiceUtilityImpl.java", "license": "lgpl-2.1", "size": 32942 }
[ "java.util.Vector", "org.osgi.framework.Bundle" ]
import java.util.Vector; import org.osgi.framework.Bundle;
import java.util.*; import org.osgi.framework.*;
[ "java.util", "org.osgi.framework" ]
java.util; org.osgi.framework;
12,030
public int countAllProgressMarks() { return (int) DatabaseUtils.queryNumEntries(helper.getReadableDatabase(), Db.TABLE_ProgressMark, Db.ProgressMark.ari + " != 0"); }
int function() { return (int) DatabaseUtils.queryNumEntries(helper.getReadableDatabase(), Db.TABLE_ProgressMark, Db.ProgressMark.ari + STR); }
/** * Count the number of progress marks that are not empty. * (Empty ones will have an ari of 0. They will be excluded.) */
Count the number of progress marks that are not empty. (Empty ones will have an ari of 0. They will be excluded.)
countAllProgressMarks
{ "repo_name": "yukuku/androidbible", "path": "Alkitab/src/main/java/yuku/alkitab/base/storage/InternalDb.java", "license": "apache-2.0", "size": 69809 }
[ "android.database.DatabaseUtils" ]
import android.database.DatabaseUtils;
import android.database.*;
[ "android.database" ]
android.database;
764,039
public Map<String, String> readMacros() throws IOException { Map<String, Module> modules = readMacroModules(); Map<String, String> moduleSources = new HashMap<>(); for (Map.Entry<String, Module> entry : modules.entrySet()) { moduleSources.put(entry.getKey(), entry.getValue().getC...
Map<String, String> function() throws IOException { Map<String, Module> modules = readMacroModules(); Map<String, String> moduleSources = new HashMap<>(); for (Map.Entry<String, Module> entry : modules.entrySet()) { moduleSources.put(entry.getKey(), entry.getValue().getContent()); } return moduleSources; }
/** * Reads all macros from all modules of the opened office file. * @return All the macros and their contents * * @since 3.15-beta2 */
Reads all macros from all modules of the opened office file
readMacros
{ "repo_name": "lamsfoundation/lams", "path": "3rdParty_sources/poi/org/apache/poi/poifs/macros/VBAMacroReader.java", "license": "gpl-2.0", "size": 35841 }
[ "java.io.IOException", "java.util.HashMap", "java.util.Map", "org.apache.poi.poifs.filesystem.Entry" ]
import java.io.IOException; import java.util.HashMap; import java.util.Map; import org.apache.poi.poifs.filesystem.Entry;
import java.io.*; import java.util.*; import org.apache.poi.poifs.filesystem.*;
[ "java.io", "java.util", "org.apache.poi" ]
java.io; java.util; org.apache.poi;
717,628
EReference getproductionschema2petrinetMaterial_r9_ChangeAttributeActivity();
EReference getproductionschema2petrinetMaterial_r9_ChangeAttributeActivity();
/** * Returns the meta object for the reference '{@link de.mdelab.mltgg.productionschema2petrinet.generated.productionschema2petrinetMaterial_r9#getChangeAttributeActivity <em>Change Attribute Activity</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the reference '<em>Cha...
Returns the meta object for the reference '<code>de.mdelab.mltgg.productionschema2petrinet.generated.productionschema2petrinetMaterial_r9#getChangeAttributeActivity Change Attribute Activity</code>'.
getproductionschema2petrinetMaterial_r9_ChangeAttributeActivity
{ "repo_name": "Somae/mdsd-factory-project", "path": "transformation/de.mdelab.languages.productionschema2petrinet/src-gen/de/mdelab/mltgg/productionschema2petrinet/generated/GeneratedPackage.java", "license": "gpl-3.0", "size": 283384 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,551,757
@Override public DBSelectorSupplier persistencyReader() { return this.database.getSelectorSupplier(); }
DBSelectorSupplier function() { return this.database.getSelectorSupplier(); }
/** * Returns the DBSelectorSupplier that can be used during the extraction run to obtain * a DBSelector instance. * * @return DBSelectorSupplier instance used obtain a DBSelector. */
Returns the DBSelectorSupplier that can be used during the extraction run to obtain a DBSelector instance
persistencyReader
{ "repo_name": "silvanheller/cineast", "path": "src/org/vitrivr/cineast/core/config/IngestConfig.java", "license": "mit", "size": 9994 }
[ "org.vitrivr.cineast.core.db.DBSelectorSupplier" ]
import org.vitrivr.cineast.core.db.DBSelectorSupplier;
import org.vitrivr.cineast.core.db.*;
[ "org.vitrivr.cineast" ]
org.vitrivr.cineast;
1,793,968
@Override public void writeFromObjectIntoRow(Object object, AbstractRecord row, AbstractSession session, WriteType writeType) { // for each xmlField on this mapping if(this.isReadOnly()) { return; } for (Iterator fieldIt = getFields().iterator(); fieldIt.hasNext();) {...
void function(Object object, AbstractRecord row, AbstractSession session, WriteType writeType) { if(this.isReadOnly()) { return; } for (Iterator fieldIt = getFields().iterator(); fieldIt.hasNext();) { XMLField xmlField = (XMLField) fieldIt.next(); ContainerPolicy cp = getContainerPolicy(); Object collection = getAttrib...
/** * INTERNAL: * Write the attribute value from the object to the row. */
Write the attribute value from the object to the row
writeFromObjectIntoRow
{ "repo_name": "RallySoftware/eclipselink.runtime", "path": "foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/oxm/mappings/XMLCollectionReferenceMapping.java", "license": "epl-1.0", "size": 23980 }
[ "java.util.ArrayList", "java.util.Iterator", "javax.xml.namespace.QName", "org.eclipse.persistence.internal.queries.ContainerPolicy", "org.eclipse.persistence.internal.sessions.AbstractRecord", "org.eclipse.persistence.internal.sessions.AbstractSession", "org.eclipse.persistence.oxm.XMLField" ]
import java.util.ArrayList; import java.util.Iterator; import javax.xml.namespace.QName; import org.eclipse.persistence.internal.queries.ContainerPolicy; import org.eclipse.persistence.internal.sessions.AbstractRecord; import org.eclipse.persistence.internal.sessions.AbstractSession; import org.eclipse.persistence.oxm....
import java.util.*; import javax.xml.namespace.*; import org.eclipse.persistence.internal.queries.*; import org.eclipse.persistence.internal.sessions.*; import org.eclipse.persistence.oxm.*;
[ "java.util", "javax.xml", "org.eclipse.persistence" ]
java.util; javax.xml; org.eclipse.persistence;
2,049,536
protected static int peek(CharBuffer cb) { int c = read(cb); unread(cb); return c; }
static int function(CharBuffer cb) { int c = read(cb); unread(cb); return c; }
/** * Read the next char, but then unread it. * * @param cb * char buffer containing text to read * * @see #read(CharBuffer) * @see #unread(CharBuffer) */
Read the next char, but then unread it
peek
{ "repo_name": "Nastel/tnt4j-streams", "path": "tnt4j-streams-core/src/main/java/com/jkoolcloud/tnt4j/streams/utils/CharBufferParser.java", "license": "apache-2.0", "size": 10779 }
[ "java.nio.CharBuffer" ]
import java.nio.CharBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
930,912
public void _write(OutputStream output) { output.write_short(value); }
void function(OutputStream output) { output.write_short(value); }
/** * Marshals to <code>output</code> the value in * this <code>ShortHolder</code> object. * * @param output the OutputStream which will contain the CDR formatted data. */
Marshals to <code>output</code> the value in this <code>ShortHolder</code> object
_write
{ "repo_name": "wangsongpeng/jdk-src", "path": "src/main/java/org/omg/CORBA/ShortHolder.java", "license": "apache-2.0", "size": 3102 }
[ "org.omg.CORBA" ]
import org.omg.CORBA;
import org.omg.*;
[ "org.omg" ]
org.omg;
634,424
default JBPMEndpointBuilder statuses(List<String> statuses) { setProperty("statuses", statuses); return this; }
default JBPMEndpointBuilder statuses(List<String> statuses) { setProperty(STR, statuses); return this; }
/** * The list of status to use when filtering tasks. * * The option is a: <code>java.util.List&lt;java.lang.String&gt;</code> * type. * * Group: filter */
The list of status to use when filtering tasks. The option is a: <code>java.util.List&lt;java.lang.String&gt;</code> type. Group: filter
statuses
{ "repo_name": "Fabryprog/camel", "path": "core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/JBPMEndpointBuilderFactory.java", "license": "apache-2.0", "size": 63283 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,467,165
public void testChangingPages() throws Throwable { final ViewPager pager = (ViewPager) getActivity().findViewById( id.vp_pages); assertEquals(0, pager.getCurrentItem()); ui(() -> pager.setCurrentItem(1, true)); assertEquals(1, pager.getCurrentItem()); ui(() -> pag...
void function() throws Throwable { final ViewPager pager = (ViewPager) getActivity().findViewById( id.vp_pages); assertEquals(0, pager.getCurrentItem()); ui(() -> pager.setCurrentItem(1, true)); assertEquals(1, pager.getCurrentItem()); ui(() -> pager.setCurrentItem(0, true)); assertEquals(0, pager.getCurrentItem()); }
/** * Verify changing pages between gist files * * @throws Throwable */
Verify changing pages between gist files
testChangingPages
{ "repo_name": "KishorAndroid/PocketHub", "path": "app/src/androidTest/java/com/github/pockethub/android/tests/gist/GistFilesViewActivityTest.java", "license": "apache-2.0", "size": 2791 }
[ "android.support.v4.view.ViewPager" ]
import android.support.v4.view.ViewPager;
import android.support.v4.view.*;
[ "android.support" ]
android.support;
956,296
public T language(String language, String expression) { LanguageExpression exp = new LanguageExpression(language, expression); setExpressionType(exp); return result; } // Properties // -------------------------------------------------------------------------
T function(String language, String expression) { LanguageExpression exp = new LanguageExpression(language, expression); setExpressionType(exp); return result; }
/** * Evaluates a given language name with the expression text * * @param language the name of the language * @param expression the expression in the given language * @return the builder to continue processing the DSL */
Evaluates a given language name with the expression text
language
{ "repo_name": "acartapanis/camel", "path": "camel-core/src/main/java/org/apache/camel/builder/ExpressionClauseSupport.java", "license": "apache-2.0", "size": 38841 }
[ "org.apache.camel.model.language.LanguageExpression" ]
import org.apache.camel.model.language.LanguageExpression;
import org.apache.camel.model.language.*;
[ "org.apache.camel" ]
org.apache.camel;
939,665
private void metricCollectionIntervalChanged() { // It's safer to pull directly from the database than to // use the measurement schedule event, since we may have // missed a prior measurement schedule event. List derivedMeas = getMeasurementsCollecting(); ...
void function() { List derivedMeas = getMeasurementsCollecting(); for (Iterator iter = derivedMeas.iterator(); iter.hasNext();) { Measurement meas = (Measurement) iter.next(); int mid = meas.getId().intValue(); MeasurementZeventSource srcId = new MeasurementZeventSource(mid); if (!_srcId2CollectionInterval.containsKey(...
/** * Process the collection interval change. */
Process the collection interval change
metricCollectionIntervalChanged
{ "repo_name": "cc14514/hq6", "path": "hq-server/src/main/java/org/hyperic/hq/measurement/galerts/MeasurementGtrigger.java", "license": "unlicense", "size": 35232 }
[ "java.util.Iterator", "java.util.List", "org.hyperic.hq.measurement.server.session.Measurement", "org.hyperic.hq.measurement.server.session.MeasurementZevent" ]
import java.util.Iterator; import java.util.List; import org.hyperic.hq.measurement.server.session.Measurement; import org.hyperic.hq.measurement.server.session.MeasurementZevent;
import java.util.*; import org.hyperic.hq.measurement.server.session.*;
[ "java.util", "org.hyperic.hq" ]
java.util; org.hyperic.hq;
236,948
RenderedImage decodeAsRenderedImage() throws IOException;
RenderedImage decodeAsRenderedImage() throws IOException;
/** * Returns a RenderedImage that contains the decoded contents of the * SeekableStream associated with this ImageDecoder. Only * the first page of a multi-page image is decoded. */
Returns a RenderedImage that contains the decoded contents of the SeekableStream associated with this ImageDecoder. Only the first page of a multi-page image is decoded
decodeAsRenderedImage
{ "repo_name": "shyamalschandra/flex-sdk", "path": "modules/thirdparty/batik/sources/org/apache/flex/forks/batik/ext/awt/image/codec/util/ImageDecoder.java", "license": "apache-2.0", "size": 3557 }
[ "java.awt.image.RenderedImage", "java.io.IOException" ]
import java.awt.image.RenderedImage; import java.io.IOException;
import java.awt.image.*; import java.io.*;
[ "java.awt", "java.io" ]
java.awt; java.io;
1,747,983
public static final String formatFileString(Info info) { return formatFileString(info.getTemplateName(), info.getLine(), info.getColumn()); }
static final String function(Info info) { return formatFileString(info.getTemplateName(), info.getLine(), info.getColumn()); }
/** * Simply creates a string that formats the template filename with line number * and column. We use this routine to provide a cosistent format for displaying * file errors. */
Simply creates a string that formats the template filename with line number and column. We use this routine to provide a cosistent format for displaying file errors
formatFileString
{ "repo_name": "diydyq/velocity-engine", "path": "velocity-engine-core/src/main/java/org/apache/velocity/runtime/log/Log.java", "license": "apache-2.0", "size": 8158 }
[ "org.apache.velocity.util.introspection.Info" ]
import org.apache.velocity.util.introspection.Info;
import org.apache.velocity.util.introspection.*;
[ "org.apache.velocity" ]
org.apache.velocity;
2,298,255
public static MouseEvent toAwtMouseEvent(org.eclipse.swt.events.MouseEvent event) { int button = MouseEvent.NOBUTTON; switch (event.button) { case 1: button = MouseEvent.BUTTON1; break; case 2: button = MouseEvent.BUTTON2; break; case 3: button = MouseEvent.BUTTON3; break; ...
static MouseEvent function(org.eclipse.swt.events.MouseEvent event) { int button = MouseEvent.NOBUTTON; switch (event.button) { case 1: button = MouseEvent.BUTTON1; break; case 2: button = MouseEvent.BUTTON2; break; case 3: button = MouseEvent.BUTTON3; break; } int modifiers = 0; if ((event.stateMask & SWT.CTRL) != 0) ...
/** * Creates an AWT <code>MouseEvent</code> from a swt event. * This method helps passing SWT mouse event to awt components. * @param event The swt event. * @return A AWT mouse event based on the given SWT event. */
Creates an AWT <code>MouseEvent</code> from a swt event. This method helps passing SWT mouse event to awt components
toAwtMouseEvent
{ "repo_name": "ilyessou/jfreechart", "path": "swt/org/jfree/experimental/swt/SWTUtils.java", "license": "lgpl-2.1", "size": 18372 }
[ "java.awt.event.InputEvent", "java.awt.event.MouseEvent" ]
import java.awt.event.InputEvent; import java.awt.event.MouseEvent;
import java.awt.event.*;
[ "java.awt" ]
java.awt;
1,573,234
public int opaqueEnabledOptions() { return Integer.parseInt(OspfParameters.OPAQUE_ENABLED_OPTION_VALUE, 2); }
int function() { return Integer.parseInt(OspfParameters.OPAQUE_ENABLED_OPTION_VALUE, 2); }
/** * Gets the opaque enabled options value. * * @return opaque enabled options value */
Gets the opaque enabled options value
opaqueEnabledOptions
{ "repo_name": "LorenzReinhart/ONOSnew", "path": "protocols/ospf/ctl/src/main/java/org/onosproject/ospf/controller/area/OspfAreaImpl.java", "license": "apache-2.0", "size": 27792 }
[ "org.onosproject.ospf.protocol.util.OspfParameters" ]
import org.onosproject.ospf.protocol.util.OspfParameters;
import org.onosproject.ospf.protocol.util.*;
[ "org.onosproject.ospf" ]
org.onosproject.ospf;
1,488,248
public ArrayList<String> listPublishedAdvices(int limit) { DBCollection col = mongoDB.getCollection(GENERATED_COL); ArrayList<String> ret = null; DBCursor cursor; if (limit > 0) { cursor = col.find().sort(new BasicDBObject("issueDate", -1)).limit(limit); } else { ...
ArrayList<String> function(int limit) { DBCollection col = mongoDB.getCollection(GENERATED_COL); ArrayList<String> ret = null; DBCursor cursor; if (limit > 0) { cursor = col.find().sort(new BasicDBObject(STR, -1)).limit(limit); } else { cursor = col.find().sort(new BasicDBObject(STR, -1)); } if (null != cursor) { ret =...
/** * Gets a list of the n last published advices. * @param limit number of advices to get * @return list of the n last published advices */
Gets a list of the n last published advices
listPublishedAdvices
{ "repo_name": "mxabierto/avisos", "path": "src/main/java/mx/org/cedn/avisosconagua/mongo/MongoInterface.java", "license": "mit", "size": 17005 }
[ "com.mongodb.BasicDBObject", "com.mongodb.DBCollection", "com.mongodb.DBCursor", "com.mongodb.DBObject", "java.util.ArrayList" ]
import com.mongodb.BasicDBObject; import com.mongodb.DBCollection; import com.mongodb.DBCursor; import com.mongodb.DBObject; import java.util.ArrayList;
import com.mongodb.*; import java.util.*;
[ "com.mongodb", "java.util" ]
com.mongodb; java.util;
2,619,301
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<Flux<ByteBuffer>>> redeployWithResponseAsync( String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs);
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<Flux<ByteBuffer>>> redeployWithResponseAsync( String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs);
/** * Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them * back on. * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the VM scale set. * @param vmInstanceIDs A list of virtual machi...
Shuts down all the virtual machines in the virtual machine scale set, moves them to a new node, and powers them back on
redeployWithResponseAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanagerhybrid/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachineScaleSetsClient.java", "license": "mit", "size": 129320 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.resourcemanager.compute.models.VirtualMachineScaleSetVMInstanceIDs", "java.nio.ByteBuffer" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.resourcemanager.compute.models.VirtualMachineScaleSetVMInstanceIDs; import java.nio.ByteBuffer;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.compute.models.*; import java.nio.*;
[ "com.azure.core", "com.azure.resourcemanager", "java.nio" ]
com.azure.core; com.azure.resourcemanager; java.nio;
445,818
private static Optional<ConfiguredTargetKey> findExecutionPlatformForToolchains( ImmutableSet<ToolchainTypeInfo> requiredToolchainTypes, ImmutableList<ConfiguredTargetKey> availableExecutionPlatformKeys, Table<ConfiguredTargetKey, ToolchainTypeInfo, Label> resolvedToolchains) { for (ConfiguredTa...
static Optional<ConfiguredTargetKey> function( ImmutableSet<ToolchainTypeInfo> requiredToolchainTypes, ImmutableList<ConfiguredTargetKey> availableExecutionPlatformKeys, Table<ConfiguredTargetKey, ToolchainTypeInfo, Label> resolvedToolchains) { for (ConfiguredTargetKey executionPlatformKey : availableExecutionPlatformK...
/** * Finds the first platform from {@code availableExecutionPlatformKeys} that is present in {@code * resolvedToolchains} and has all required toolchain types. */
Finds the first platform from availableExecutionPlatformKeys that is present in resolvedToolchains and has all required toolchain types
findExecutionPlatformForToolchains
{ "repo_name": "aehlig/bazel", "path": "src/main/java/com/google/devtools/build/lib/skyframe/ToolchainResolutionFunction.java", "license": "apache-2.0", "size": 22620 }
[ "com.google.common.collect.ImmutableList", "com.google.common.collect.ImmutableSet", "com.google.common.collect.Table", "com.google.devtools.build.lib.analysis.platform.ToolchainTypeInfo", "com.google.devtools.build.lib.cmdline.Label", "java.util.Map", "java.util.Optional" ]
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Table; import com.google.devtools.build.lib.analysis.platform.ToolchainTypeInfo; import com.google.devtools.build.lib.cmdline.Label; import java.util.Map; import java.util.Optional;
import com.google.common.collect.*; import com.google.devtools.build.lib.analysis.platform.*; import com.google.devtools.build.lib.cmdline.*; import java.util.*;
[ "com.google.common", "com.google.devtools", "java.util" ]
com.google.common; com.google.devtools; java.util;
2,081,719
// [lyn, 2014/10/27] added formJson for upgrading public void loadBlocksContent(String formJson, String blocksContent) { LoadStatus loadStat = new LoadStatus(); loadStatusMap.put(formName, loadStat); if (blocksInited(formName)) { OdeLog.log("Loading blocks content for " + formName); loadBloc...
void function(String formJson, String blocksContent) { LoadStatus loadStat = new LoadStatus(); loadStatusMap.put(formName, loadStat); if (blocksInited(formName)) { OdeLog.log(STR + formName); loadBlocksContentNow(formName, formJson, blocksContent); } else { OdeLog.log(STR + formName + STR); pendingBlocksContentMap.put(...
/** * Load the blocks described by blocksContent into the blocks workspace. * * @param blocksContent XML description of a blocks workspace in format expected by Blockly */
Load the blocks described by blocksContent into the blocks workspace
loadBlocksContent
{ "repo_name": "tvomf/appinventor-mapps", "path": "appinventor/appengine/src/com/google/appinventor/client/editor/youngandroid/BlocklyPanel.java", "license": "apache-2.0", "size": 37923 }
[ "com.google.appinventor.client.output.OdeLog" ]
import com.google.appinventor.client.output.OdeLog;
import com.google.appinventor.client.output.*;
[ "com.google.appinventor" ]
com.google.appinventor;
952,973
private String makeApiCall(String artistName, String songTitle) throws IOException, JSONException { HttpsURLConnection apiCall = null; try { // build query // e.g. https://lyrics.wikia.com/api.php?func=getSong&artist=The%20Beatle&song=Girl&fmt=realjson Uri link = ...
String function(String artistName, String songTitle) throws IOException, JSONException { HttpsURLConnection apiCall = null; try { Uri link = new Uri.Builder() .scheme("https") .authority(STR) .path(STR) .appendQueryParameter("func", STR) .appendQueryParameter("fmt", STR) .appendQueryParameter(STR, artistName) .appendQu...
/** * First call */
First call
makeApiCall
{ "repo_name": "vanilla-music/vanilla-music-lyrics-search", "path": "app/src/main/java/com/kanedias/vanilla/lyrics/LyricWikiEngine.java", "license": "gpl-3.0", "size": 5895 }
[ "android.net.Uri", "com.kanedias.vanilla.plugins.PluginUtils", "java.io.IOException", "java.io.InputStream", "java.util.zip.GZIPInputStream", "javax.net.ssl.HttpsURLConnection", "org.json.JSONException", "org.json.JSONObject" ]
import android.net.Uri; import com.kanedias.vanilla.plugins.PluginUtils; import java.io.IOException; import java.io.InputStream; import java.util.zip.GZIPInputStream; import javax.net.ssl.HttpsURLConnection; import org.json.JSONException; import org.json.JSONObject;
import android.net.*; import com.kanedias.vanilla.plugins.*; import java.io.*; import java.util.zip.*; import javax.net.ssl.*; import org.json.*;
[ "android.net", "com.kanedias.vanilla", "java.io", "java.util", "javax.net", "org.json" ]
android.net; com.kanedias.vanilla; java.io; java.util; javax.net; org.json;
1,824,977
public PrintWriter getLogWriter() { if (logWriter == null) { logWriter = new PrintWriter(System.out); } return logWriter; }
PrintWriter function() { if (logWriter == null) { logWriter = new PrintWriter(System.out); } return logWriter; }
/** * Get the value of logWriter. * @return value of logWriter. */
Get the value of logWriter
getLogWriter
{ "repo_name": "optivo-org/commons-dbcp", "path": "src/java/org/apache/commons/dbcp/datasources/InstanceKeyDataSource.java", "license": "apache-2.0", "size": 29845 }
[ "java.io.PrintWriter" ]
import java.io.PrintWriter;
import java.io.*;
[ "java.io" ]
java.io;
1,306,716
@Override protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); newChildDescriptors.add (createChildParameter (DeclarationPackage.Literals.USE_CLAUSE_DECLARATION__USE, VhdlFactory.eINSTANCE.c...
void function(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); newChildDescriptors.add (createChildParameter (DeclarationPackage.Literals.USE_CLAUSE_DECLARATION__USE, VhdlFactory.eINSTANCE.createNameList())); newChildDescriptors.add (createChildPara...
/** * 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": "mlanoe/x-vhdl", "path": "plugins/net.mlanoe.language.vhdl.edit/src-gen/net/mlanoe/language/vhdl/declaration/provider/UseClauseDeclarationItemProvider.java", "license": "gpl-3.0", "size": 6513 }
[ "java.util.Collection", "net.mlanoe.language.vhdl.VhdlFactory", "net.mlanoe.language.vhdl.declaration.DeclarationPackage", "net.mlanoe.language.vhdl.expression.ExpressionFactory" ]
import java.util.Collection; import net.mlanoe.language.vhdl.VhdlFactory; import net.mlanoe.language.vhdl.declaration.DeclarationPackage; import net.mlanoe.language.vhdl.expression.ExpressionFactory;
import java.util.*; import net.mlanoe.language.vhdl.*; import net.mlanoe.language.vhdl.declaration.*; import net.mlanoe.language.vhdl.expression.*;
[ "java.util", "net.mlanoe.language" ]
java.util; net.mlanoe.language;
2,902,721
public static GraphicsDocument loadDocument(File file) throws Exception { return (GraphicsDocument) Document.loadDocument(file); }
static GraphicsDocument function(File file) throws Exception { return (GraphicsDocument) Document.loadDocument(file); }
/** * Creates an GraphicsDocument from the OpenDocument provided by a File. * * <p> * GraphicsDocument relies on the file being available for read access over * the whole lifecycle of GraphicsDocument. * </p> * * <p> * If the resource stream is not a ODF graphics document, ClassCastException * mig...
Creates an GraphicsDocument from the OpenDocument provided by a File. GraphicsDocument relies on the file being available for read access over the whole lifecycle of GraphicsDocument. If the resource stream is not a ODF graphics document, ClassCastException might be thrown.
loadDocument
{ "repo_name": "jbjonesjr/geoproponis", "path": "external/simple-odf-0.8.1-incubating-sources/org/odftoolkit/simple/GraphicsDocument.java", "license": "gpl-2.0", "size": 7079 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,505,852
public void sendEnterCombat() { super.sendEnterCombat(); this.connection.sendPacket(new SPacketCombatEvent(this.getCombatTracker(), SPacketCombatEvent.Event.ENTER_COMBAT)); }
void function() { super.sendEnterCombat(); this.connection.sendPacket(new SPacketCombatEvent(this.getCombatTracker(), SPacketCombatEvent.Event.ENTER_COMBAT)); }
/** * Sends an ENTER_COMBAT packet to the client */
Sends an ENTER_COMBAT packet to the client
sendEnterCombat
{ "repo_name": "F1r3w477/CustomWorldGen", "path": "build/tmp/recompileMc/sources/net/minecraft/entity/player/EntityPlayerMP.java", "license": "lgpl-3.0", "size": 50878 }
[ "net.minecraft.network.play.server.SPacketCombatEvent" ]
import net.minecraft.network.play.server.SPacketCombatEvent;
import net.minecraft.network.play.server.*;
[ "net.minecraft.network" ]
net.minecraft.network;
1,488,001
@NotNull() public ResultCode getResultCode() { return ldapException.getResultCode(); }
@NotNull() ResultCode function() { return ldapException.getResultCode(); }
/** * Retrieves the result code for this LDAP exception. * * @return The result code for this LDAP exception. */
Retrieves the result code for this LDAP exception
getResultCode
{ "repo_name": "UnboundID/ldapsdk", "path": "src/com/unboundid/ldap/sdk/LDAPRuntimeException.java", "license": "gpl-2.0", "size": 6776 }
[ "com.unboundid.util.NotNull" ]
import com.unboundid.util.NotNull;
import com.unboundid.util.*;
[ "com.unboundid.util" ]
com.unboundid.util;
933,323
public NavigableMap<byte[], NavigableMap<byte[], NavigableMap<Long, byte[]>>> getMap() { if (this.familyMap != null) { return this.familyMap; } if(isEmpty()) { return null; } this.familyMap = new TreeMap<>(Bytes.BYTES_COMPARATOR); for(Cell kv : this.cells) { byte [] family = ...
NavigableMap<byte[], NavigableMap<byte[], NavigableMap<Long, byte[]>>> function() { if (this.familyMap != null) { return this.familyMap; } if(isEmpty()) { return null; } this.familyMap = new TreeMap<>(Bytes.BYTES_COMPARATOR); for(Cell kv : this.cells) { byte [] family = CellUtil.cloneFamily(kv); NavigableMap<byte[], Na...
/** * Map of families to all versions of its qualifiers and values. * <p> * Returns a three level Map of the form: * <code>Map&amp;family,Map&lt;qualifier,Map&lt;timestamp,value>>></code> * <p> * Note: All other map returning methods make use of this map internally. * @return map from families to q...
Map of families to all versions of its qualifiers and values. Returns a three level Map of the form: <code>Map&amp;family,Map&lt;qualifier,Map&lt;timestamp,value>>></code> Note: All other map returning methods make use of this map internally
getMap
{ "repo_name": "drewpope/hbase", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/client/Result.java", "license": "apache-2.0", "size": 26865 }
[ "java.util.NavigableMap", "java.util.TreeMap", "org.apache.hadoop.hbase.Cell", "org.apache.hadoop.hbase.CellUtil", "org.apache.hadoop.hbase.util.Bytes" ]
import java.util.NavigableMap; import java.util.TreeMap; import org.apache.hadoop.hbase.Cell; import org.apache.hadoop.hbase.CellUtil; import org.apache.hadoop.hbase.util.Bytes;
import java.util.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.util.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
134,119
public static <E> ResettableListIterator<E> loopingListIterator(final List<E> list) { if (list == null) { throw new NullPointerException("List must not be null"); } return new LoopingListIterator<E>(list); } // org.w3c.dom.NodeList iterators //-----------------------...
static <E> ResettableListIterator<E> function(final List<E> list) { if (list == null) { throw new NullPointerException(STR); } return new LoopingListIterator<E>(list); } /** * Gets an {@link Iterator} that wraps the specified {@link NodeList}. * The returned {@link Iterator} can be used for a single iteration. * * @par...
/** * Gets an iterator that loops continuously over the supplied list. * <p> * The iterator will only stop looping if the remove method is called * enough times to empty the list, or if the list is empty to start with. * * @param <E> the element type * @param list the list to iterat...
Gets an iterator that loops continuously over the supplied list. The iterator will only stop looping if the remove method is called enough times to empty the list, or if the list is empty to start with
loopingListIterator
{ "repo_name": "krivachy/compgs03_mutation_testing", "path": "src/main/java/org/apache/commons/collections4/IteratorUtils.java", "license": "apache-2.0", "size": 45184 }
[ "java.util.Iterator", "java.util.List", "org.apache.commons.collections4.iterators.LoopingListIterator", "org.w3c.dom.NodeList" ]
import java.util.Iterator; import java.util.List; import org.apache.commons.collections4.iterators.LoopingListIterator; import org.w3c.dom.NodeList;
import java.util.*; import org.apache.commons.collections4.iterators.*; import org.w3c.dom.*;
[ "java.util", "org.apache.commons", "org.w3c.dom" ]
java.util; org.apache.commons; org.w3c.dom;
1,606,798
public void setBorderWidth(int borderWidth) { // resets callback setBorderWidth((WidthCallback<DatasetContext>) null); // stores value setValue(Dataset.CommonProperty.BORDER_WIDTH, borderWidth); }
void function(int borderWidth) { setBorderWidth((WidthCallback<DatasetContext>) null); setValue(Dataset.CommonProperty.BORDER_WIDTH, borderWidth); }
/** * Sets the width of the line in pixels. * * @param borderWidth the width of the line in pixels. */
Sets the width of the line in pixels
setBorderWidth
{ "repo_name": "pepstock-org/Charba", "path": "src/org/pepstock/charba/client/data/LiningDataset.java", "license": "apache-2.0", "size": 98572 }
[ "org.pepstock.charba.client.callbacks.DatasetContext", "org.pepstock.charba.client.callbacks.WidthCallback" ]
import org.pepstock.charba.client.callbacks.DatasetContext; import org.pepstock.charba.client.callbacks.WidthCallback;
import org.pepstock.charba.client.callbacks.*;
[ "org.pepstock.charba" ]
org.pepstock.charba;
1,511,902
public void openConfirmationWindowDeleteAction(final T clickedItem) { final Set<T> itemsToBeDeleted = getItemsForDeletion(clickedItem); final int itemsToBeDeletedSize = itemsToBeDeleted.size(); final String clickedItemName = entityNameGenerator.apply(clickedItem); final String confi...
void function(final T clickedItem) { final Set<T> itemsToBeDeleted = getItemsForDeletion(clickedItem); final int itemsToBeDeletedSize = itemsToBeDeleted.size(); final String clickedItemName = entityNameGenerator.apply(clickedItem); final String confirmationCaption = i18n.getMessage(STR, localizedEntityTypeSing); final ...
/** * Open confirmation pop up window for delete action * * @param clickedItem * Item selected for deletion */
Open confirmation pop up window for delete action
openConfirmationWindowDeleteAction
{ "repo_name": "eclipse/hawkbit", "path": "hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/common/grid/support/DeleteSupport.java", "license": "epl-1.0", "size": 8029 }
[ "com.vaadin.ui.UI", "java.util.Set", "org.eclipse.hawkbit.ui.common.ConfirmationDialog", "org.eclipse.hawkbit.ui.utils.UIMessageIdProvider", "org.springframework.util.StringUtils" ]
import com.vaadin.ui.UI; import java.util.Set; import org.eclipse.hawkbit.ui.common.ConfirmationDialog; import org.eclipse.hawkbit.ui.utils.UIMessageIdProvider; import org.springframework.util.StringUtils;
import com.vaadin.ui.*; import java.util.*; import org.eclipse.hawkbit.ui.common.*; import org.eclipse.hawkbit.ui.utils.*; import org.springframework.util.*;
[ "com.vaadin.ui", "java.util", "org.eclipse.hawkbit", "org.springframework.util" ]
com.vaadin.ui; java.util; org.eclipse.hawkbit; org.springframework.util;
531,131
@RequestMapping("getNVCL2_0_Logs.do") public ModelAndView getNVCL2_0_Logs(@RequestParam("serviceUrl") String serviceUrl, @RequestParam("datasetId") String datasetId, @RequestParam(required = false, value = "mosaicService") Boolean forMosaicService) { List<GetLogCollectionResp...
@RequestMapping(STR) ModelAndView function(@RequestParam(STR) String serviceUrl, @RequestParam(STR) String datasetId, @RequestParam(required = false, value = STR) Boolean forMosaicService) { List<GetLogCollectionResponse> responseObjs = null; try { responseObjs = dataService2_0.getLogCollection(serviceUrl, datasetId, f...
/** * Gets the list of logs for given NVCL dataset from the specified NVCL dataservice url. * * @param serviceUrl * The URL of an NVCL Data service * @param datasetId * The unique ID of a dataset * @return */
Gets the list of logs for given NVCL dataset from the specified NVCL dataservice url
getNVCL2_0_Logs
{ "repo_name": "joshvote/AuScope-Portal", "path": "src/main/java/org/auscope/portal/server/web/controllers/NVCLController.java", "license": "gpl-3.0", "size": 38059 }
[ "java.util.List", "org.auscope.portal.server.domain.nvcldataservice.GetLogCollectionResponse", "org.springframework.web.bind.annotation.RequestMapping", "org.springframework.web.bind.annotation.RequestParam", "org.springframework.web.servlet.ModelAndView" ]
import java.util.List; import org.auscope.portal.server.domain.nvcldataservice.GetLogCollectionResponse; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.servlet.ModelAndView;
import java.util.*; import org.auscope.portal.server.domain.nvcldataservice.*; import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.*;
[ "java.util", "org.auscope.portal", "org.springframework.web" ]
java.util; org.auscope.portal; org.springframework.web;
2,545,597
private static void addSrcFiles(final File baseDir, final File dir, final List remoteFiles) { final File[] files = dir.listFiles(); for (int i = 0; i < files.length; i++) { if (files[i].isDirectory()) { addSrcFiles(baseDir, files[i], remoteFiles); } els...
static void function(final File baseDir, final File dir, final List remoteFiles) { final File[] files = dir.listFiles(); for (int i = 0; i < files.length; i++) { if (files[i].isDirectory()) { addSrcFiles(baseDir, files[i], remoteFiles); } else { final String path = getRelativePath(baseDir, dir); final String filename =...
/** * Adds all files in a directory and it's sub directories to the remote file * list. * * @param baseDir * Base directory. * @param dir * Directory inside the base directory or one of it's sub * directories. * @param remoteFiles ...
Adds all files in a directory and it's sub directories to the remote file list
addSrcFiles
{ "repo_name": "fuinorg/kickstart4j", "path": "src/main/java/org/fuin/kickstart4j/ConfigUpdater.java", "license": "lgpl-3.0", "size": 12813 }
[ "java.io.File", "java.net.MalformedURLException", "java.util.List" ]
import java.io.File; import java.net.MalformedURLException; import java.util.List;
import java.io.*; import java.net.*; import java.util.*;
[ "java.io", "java.net", "java.util" ]
java.io; java.net; java.util;
181,575
@Test void testGroupByDaySortLimit() { final String sql = "select \"brand_name\"," + " floor(\"timestamp\" to DAY) as d," + " sum(\"unit_sales\") as s\n" + "from \"foodmart\"\n" + "group by \"brand_name\", floor(\"timestamp\" to DAY)\n" + "order by s desc limit 30"; fin...
@Test void testGroupByDaySortLimit() { final String sql = STRbrand_name\"," + STRtimestamp\STR + STRunit_sales\STR + STRfoodmart\"\n" + STRbrand_name\STRtimestamp\STR + STR; final String druidQueryPart1 = STR; final String druidQueryPart2 = STR + STR + STR + STR + STR; final String explain = STR + STR + STR + STR; sql(...
/** Test case for * <a href="https://issues.apache.org/jira/browse/CALCITE-1579">[CALCITE-1579] * Druid adapter: wrong semantics of groupBy query limit with * granularity</a>. * * <p>Before CALCITE-1579 was fixed, this would use a "groupBy" query but * wrongly try to use a {@code limitSpec} to sort an...
Test case for [CALCITE-1579] Druid adapter: wrong semantics of groupBy query limit with granularity. Before CALCITE-1579 was fixed, this would use a "groupBy" query but wrongly try to use a limitSpec to sort and filter. (A "topN" query
testGroupByDaySortLimit
{ "repo_name": "jcamachor/calcite", "path": "druid/src/test/java/org/apache/calcite/test/DruidAdapter2IT.java", "license": "apache-2.0", "size": 201537 }
[ "org.junit.jupiter.api.Test" ]
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.*;
[ "org.junit.jupiter" ]
org.junit.jupiter;
2,228,620
static public String unquoteString(String s, boolean removeExtremes) throws ParseException { if (removeExtremes) { if (s.charAt(0) != '@' || s.charAt(s.length() - 1) != '@') throw new ParseException("bad quoted string:" + s); s = s.subst...
static String function(String s, boolean removeExtremes) throws ParseException { if (removeExtremes) { if (s.charAt(0) != '@' s.charAt(s.length() - 1) != '@') throw new ParseException(STR + s); s = s.substring(1, s.length() - 1); } Pattern pat = Pattern.compile("@@"); return pat.matcher(s).replaceAll("@"); }
/** * Unquote a string quoted in RCS style. * * @param s * the quoted string. * @param removeExtremes * Determines if the enclosing @ quotes should be removed. * @return s the string unquoted. */
Unquote a string quoted in RCS style
unquoteString
{ "repo_name": "tarzanek/jrcs", "path": "src/java/org/suigeneris/jrcs/rcs/Archive.java", "license": "lgpl-2.1", "size": 52938 }
[ "java.util.regex.Pattern", "org.suigeneris.jrcs.rcs.parse.ParseException" ]
import java.util.regex.Pattern; import org.suigeneris.jrcs.rcs.parse.ParseException;
import java.util.regex.*; import org.suigeneris.jrcs.rcs.parse.*;
[ "java.util", "org.suigeneris.jrcs" ]
java.util; org.suigeneris.jrcs;
2,796,373
EventMetric intentSubmittedEventMetric();
EventMetric intentSubmittedEventMetric();
/** * Gets the Event Metric for the intent INSTALL_REQ events. * * @return the Event Metric for the intent INSTALL_REQ events */
Gets the Event Metric for the intent INSTALL_REQ events
intentSubmittedEventMetric
{ "repo_name": "maxkondr/onos-porta", "path": "apps/metrics/src/main/java/org/onosproject/metrics/intent/IntentMetricsService.java", "license": "apache-2.0", "size": 2183 }
[ "org.onlab.metrics.EventMetric" ]
import org.onlab.metrics.EventMetric;
import org.onlab.metrics.*;
[ "org.onlab.metrics" ]
org.onlab.metrics;
2,817,338
public void setNumber(Number number) { this.number = number; }
void function(Number number) { this.number = number; }
/** * Missing description at method setNumber. * * @param number the Number. */
Missing description at method setNumber
setNumber
{ "repo_name": "NABUCCO/org.nabucco.business.organization", "path": "org.nabucco.business.organization.facade.message/src/main/gen/org/nabucco/business/organization/facade/message/produce/VendorProduceRq.java", "license": "epl-1.0", "size": 5383 }
[ "org.nabucco.framework.base.facade.datatype.Number" ]
import org.nabucco.framework.base.facade.datatype.Number;
import org.nabucco.framework.base.facade.datatype.*;
[ "org.nabucco.framework" ]
org.nabucco.framework;
1,456,235
@Test public void of_Strings_toFiles() throws IOException { // given String f1 = "src/test/resources/Thumbnailator/grid.png"; String f2 = "src/test/resources/Thumbnailator/grid.jpg"; // when Thumbnails.of(f1, f2) .size(50, 50) .toFiles(Rename.PREFIX_DOT_THUMBNAIL); // then ...
void function() throws IOException { String f1 = STR; String f2 = STR; Thumbnails.of(f1, f2) .size(50, 50) .toFiles(Rename.PREFIX_DOT_THUMBNAIL); File outFile1 = new File(STR); File outFile2 = new File(STR); outFile1.deleteOnExit(); outFile2.deleteOnExit(); BufferedImage fromFileImage1 = ImageIO.read(outFile1); Buffere...
/** * Test for the {@link Thumbnails.Builder} class where, * <ol> * <li>Thumbnails.of(String, String)</li> * <li>toFiles(Rename)</li> * </ol> * and the expected outcome is, * <ol> * <li>Two images are generated and written to a file whose name is * generated from the Rename object.</li> * ...
Test for the <code>Thumbnails.Builder</code> class where, Thumbnails.of(String, String) toFiles(Rename) and the expected outcome is, Two images are generated and written to a file whose name is generated from the Rename object.
of_Strings_toFiles
{ "repo_name": "passerby4j/thumbnailator", "path": "src/test/java/net/coobird/thumbnailator/ThumbnailsBuilderInputOutputTest.java", "license": "mit", "size": 303967 }
[ "java.awt.image.BufferedImage", "java.io.File", "java.io.IOException", "javax.imageio.ImageIO", "net.coobird.thumbnailator.name.Rename", "org.junit.Assert" ]
import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import javax.imageio.ImageIO; import net.coobird.thumbnailator.name.Rename; import org.junit.Assert;
import java.awt.image.*; import java.io.*; import javax.imageio.*; import net.coobird.thumbnailator.name.*; import org.junit.*;
[ "java.awt", "java.io", "javax.imageio", "net.coobird.thumbnailator", "org.junit" ]
java.awt; java.io; javax.imageio; net.coobird.thumbnailator; org.junit;
272,291
void createMutableModel(ClassLoaderScope selfClassLoaderScope, ClassLoaderScope baseClassLoaderScope);
void createMutableModel(ClassLoaderScope selfClassLoaderScope, ClassLoaderScope baseClassLoaderScope);
/** * Creates the mutable model for this project. */
Creates the mutable model for this project
createMutableModel
{ "repo_name": "blindpirate/gradle", "path": "subprojects/core/src/main/java/org/gradle/api/internal/project/ProjectState.java", "license": "apache-2.0", "size": 5049 }
[ "org.gradle.api.internal.initialization.ClassLoaderScope" ]
import org.gradle.api.internal.initialization.ClassLoaderScope;
import org.gradle.api.internal.initialization.*;
[ "org.gradle.api" ]
org.gradle.api;
2,525,961
public NodeList getXblDefinitions(Node n) { return AbstractNode.EMPTY_NODE_LIST; }
NodeList function(Node n) { return AbstractNode.EMPTY_NODE_LIST; }
/** * Get the xbl:definition elements currently binding an element. */
Get the xbl:definition elements currently binding an element
getXblDefinitions
{ "repo_name": "Squeegee/batik", "path": "sources/org/apache/batik/dom/xbl/GenericXBLManager.java", "license": "apache-2.0", "size": 4836 }
[ "org.apache.batik.dom.AbstractNode", "org.w3c.dom.Node", "org.w3c.dom.NodeList" ]
import org.apache.batik.dom.AbstractNode; import org.w3c.dom.Node; import org.w3c.dom.NodeList;
import org.apache.batik.dom.*; import org.w3c.dom.*;
[ "org.apache.batik", "org.w3c.dom" ]
org.apache.batik; org.w3c.dom;
1,515,695
@Override protected List<CmsSelectWidgetOption> parseSelectOptions( CmsObject cms, I_CmsWidgetDialog widgetDialog, I_CmsWidgetParameter param) { // only create options if not already done if (getSelectOptions() == null) { // parse widget configuration ...
List<CmsSelectWidgetOption> function( CmsObject cms, I_CmsWidgetDialog widgetDialog, I_CmsWidgetParameter param) { if (getSelectOptions() == null) { parseConfiguration(cms, widgetDialog); List<CmsSelectWidgetOption> result = new ArrayList<CmsSelectWidgetOption>(); if (isUseGroupNames()) { for (Iterator<String> i = getG...
/** * Returns the select options for the widget, generated from the configured input fields of the XML content.<p> * * @see org.opencms.widgets.A_CmsSelectWidget#parseSelectOptions(org.opencms.file.CmsObject, org.opencms.widgets.I_CmsWidgetDialog, org.opencms.widgets.I_CmsWidgetParameter) */
Returns the select options for the widget, generated from the configured input fields of the XML content
parseSelectOptions
{ "repo_name": "serrapos/opencms-core", "path": "src/org/opencms/widgets/CmsSelectGroupWidget.java", "license": "lgpl-2.1", "size": 10507 }
[ "java.util.ArrayList", "java.util.Iterator", "java.util.List", "org.opencms.file.CmsGroup", "org.opencms.file.CmsObject", "org.opencms.main.CmsException", "org.opencms.main.OpenCms" ]
import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.opencms.file.CmsGroup; import org.opencms.file.CmsObject; import org.opencms.main.CmsException; import org.opencms.main.OpenCms;
import java.util.*; import org.opencms.file.*; import org.opencms.main.*;
[ "java.util", "org.opencms.file", "org.opencms.main" ]
java.util; org.opencms.file; org.opencms.main;
1,604,307
public final void invokeLaterIfNeeded(@NotNull Runnable task) { if (isValidThread()) { count.incrementAndGet(); invokeSafely(task, 0); } else { invokeLater(task); } }
final void function(@NotNull Runnable task) { if (isValidThread()) { count.incrementAndGet(); invokeSafely(task, 0); } else { invokeLater(task); } }
/** * Invokes the specified task immediately if the current thread is valid, * or asynchronously after all pending tasks have been processed. * * @param task a task to execute on the valid thread */
Invokes the specified task immediately if the current thread is valid, or asynchronously after all pending tasks have been processed
invokeLaterIfNeeded
{ "repo_name": "xfournet/intellij-community", "path": "platform/platform-impl/src/com/intellij/util/concurrency/Invoker.java", "license": "apache-2.0", "size": 7631 }
[ "org.jetbrains.annotations.NotNull" ]
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.*;
[ "org.jetbrains.annotations" ]
org.jetbrains.annotations;
2,783,767
public JPanel getStats() { int total = 0; float totalValue = 0; float maxValue = 0; float minValue = 999999; for (String key : keys) { List<Integer> temp = data.get(key); for (Integer t : temp) { float f = t.intValue(); ...
JPanel function() { int total = 0; float totalValue = 0; float maxValue = 0; float minValue = 999999; for (String key : keys) { List<Integer> temp = data.get(key); for (Integer t : temp) { float f = t.intValue(); minValue = Math.min(f, minValue); maxValue = Math.max(f, maxValue); totalValue += f; total++; } } float ave...
/** * Get the stats panel. * * @return a newly created stats panel */
Get the stats panel
getStats
{ "repo_name": "johrstrom/cloud-meter", "path": "cloud-meter-core/src/main/java/org/apache/jmeter/reporters/FileReporter.java", "license": "apache-2.0", "size": 12413 }
[ "java.awt.GridBagConstraints", "java.awt.GridBagLayout", "java.awt.Insets", "java.text.DecimalFormat", "java.util.List", "javax.swing.JLabel", "javax.swing.JPanel" ]
import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.Insets; import java.text.DecimalFormat; import java.util.List; import javax.swing.JLabel; import javax.swing.JPanel;
import java.awt.*; import java.text.*; import java.util.*; import javax.swing.*;
[ "java.awt", "java.text", "java.util", "javax.swing" ]
java.awt; java.text; java.util; javax.swing;
38,241
public Writer getWriter(File file) throws IOException { return new FileWriter(file); }
Writer function(File file) throws IOException { return new FileWriter(file); }
/** * Get a writer for the given location * @param file the file to write to * @return the Writer to use. * @throws IOException on any error */
Get a writer for the given location
getWriter
{ "repo_name": "anshuiisc/storm-Allbolts-wiring", "path": "storm-core/src/jvm/org/apache/storm/daemon/supervisor/AdvancedFSOps.java", "license": "apache-2.0", "size": 13042 }
[ "java.io.File", "java.io.FileWriter", "java.io.IOException", "java.io.Writer" ]
import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.io.Writer;
import java.io.*;
[ "java.io" ]
java.io;
305,839
public void start() throws LifecycleException { // Validate and update our current component state if (started) throw new LifecycleException (sm.getString("certificatesValve.alreadyStarted")); started = true; if (debug >= 1) log("Starting"); ...
void function() throws LifecycleException { if (started) throw new LifecycleException (sm.getString(STR)); started = true; if (debug >= 1) log(STR); certificates = false; if (container instanceof Context) { Context context = (Context) container; LoginConfig loginConfig = context.getLoginConfig(); if (loginConfig != nul...
/** * Prepare for the beginning of active use of the public methods of this * component. This method should be called before any of the public * methods of this component are utilized. It should also send a * LifecycleEvent of type START_EVENT to any registered listeners. * * @exception ...
Prepare for the beginning of active use of the public methods of this component. This method should be called before any of the public methods of this component are utilized. It should also send a LifecycleEvent of type START_EVENT to any registered listeners
start
{ "repo_name": "devjin24/howtomcatworks", "path": "bookrefer/jakarta-tomcat-4.1.12-src/catalina/src/share/org/apache/catalina/valves/CertificatesValve.java", "license": "apache-2.0", "size": 20065 }
[ "org.apache.catalina.Context", "org.apache.catalina.Lifecycle", "org.apache.catalina.LifecycleException", "org.apache.catalina.deploy.LoginConfig" ]
import org.apache.catalina.Context; import org.apache.catalina.Lifecycle; import org.apache.catalina.LifecycleException; import org.apache.catalina.deploy.LoginConfig;
import org.apache.catalina.*; import org.apache.catalina.deploy.*;
[ "org.apache.catalina" ]
org.apache.catalina;
2,704,670
private static String getNullableInt(ResultSet rs, int index) throws SQLException { int value = rs.getInt(index); if (rs.wasNull()) { return "NULL"; //NON-NLS } else { return Integer.toString(value); } }
static String function(ResultSet rs, int index) throws SQLException { int value = rs.getInt(index); if (rs.wasNull()) { return "NULL"; } else { return Integer.toString(value); } }
/** * Return an integer from the ResultSet converted to String or NULL, by * checking ResultSet.wasNull() * * @param rs the ResultSet to work with * @param index the index into the ResultSet to work with * * @return the proper value, the integer, or NULL * * @throws SQLEx...
Return an integer from the ResultSet converted to String or NULL, by checking ResultSet.wasNull()
getNullableInt
{ "repo_name": "karlmortensen/autopsy", "path": "Core/src/org/sleuthkit/autopsy/casemodule/SingleUserCaseConverter.java", "license": "apache-2.0", "size": 50969 }
[ "java.sql.ResultSet", "java.sql.SQLException" ]
import java.sql.ResultSet; import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,763,598
public static void cleanDirectory(File directory) throws IOException { checkNotNull(directory, "directory"); guardIfWindows(FileUtils::cleanDirectoryInternal, directory); }
static void function(File directory) throws IOException { checkNotNull(directory, STR); guardIfWindows(FileUtils::cleanDirectoryInternal, directory); }
/** * Removes all files contained within a directory, without removing the directory itself. * * <p>This method is safe against other concurrent deletion attempts. * * @param directory The directory to remove all files from. * * @throws FileNotFoundException Thrown if the directory itself does not exist. ...
Removes all files contained within a directory, without removing the directory itself. This method is safe against other concurrent deletion attempts
cleanDirectory
{ "repo_name": "ueshin/apache-flink", "path": "flink-core/src/main/java/org/apache/flink/util/FileUtils.java", "license": "apache-2.0", "size": 19061 }
[ "java.io.File", "java.io.IOException", "org.apache.flink.util.Preconditions" ]
import java.io.File; import java.io.IOException; import org.apache.flink.util.Preconditions;
import java.io.*; import org.apache.flink.util.*;
[ "java.io", "org.apache.flink" ]
java.io; org.apache.flink;
2,284,041
@Test(expected = IOException.class) public void testAddJarThatDoesntExist() throws IOException { DistCache.addJarToDistributedCache(testConf, "/garbage/doesntexist.jar"); }
@Test(expected = IOException.class) void function() throws IOException { DistCache.addJarToDistributedCache(testConf, STR); }
/** * Tests that attempting to add the path to a jar that does not exist to the * configuration throws an exception. * * @throws IOException * If the added jar path does not exist. This exception is expected. */
Tests that attempting to add the path to a jar that does not exist to the configuration throws an exception
testAddJarThatDoesntExist
{ "repo_name": "rvs/crunch", "path": "crunch/src/test/java/org/apache/crunch/util/DistCacheTest.java", "license": "apache-2.0", "size": 5718 }
[ "java.io.IOException", "org.junit.Test" ]
import java.io.IOException; import org.junit.Test;
import java.io.*; import org.junit.*;
[ "java.io", "org.junit" ]
java.io; org.junit;
730,479
public Rectangle2D getPaintedBounds2D(){ if ((paint == null) || (shape == null)) return null; return shape.getBounds2D(); }
Rectangle2D function(){ if ((paint == null) (shape == null)) return null; return shape.getBounds2D(); }
/** * Returns the bounds of the area painted by this shape painter */
Returns the bounds of the area painted by this shape painter
getPaintedBounds2D
{ "repo_name": "Squeegee/batik", "path": "sources/org/apache/batik/gvt/FillShapePainter.java", "license": "apache-2.0", "size": 4261 }
[ "java.awt.geom.Rectangle2D" ]
import java.awt.geom.Rectangle2D;
import java.awt.geom.*;
[ "java.awt" ]
java.awt;
515,464
public static Process startPythonProcess(PythonEnvironment pythonEnv, List<String> commands) throws IOException { ProcessBuilder pythonProcessBuilder = new ProcessBuilder(); Map<String, String> env = pythonProcessBuilder.environment(); env.put("PYTHONPATH", pythonEnv.pythonPath); pythonEnv.systemEnv.forEach(...
static Process function(PythonEnvironment pythonEnv, List<String> commands) throws IOException { ProcessBuilder pythonProcessBuilder = new ProcessBuilder(); Map<String, String> env = pythonProcessBuilder.environment(); env.put(STR, pythonEnv.pythonPath); pythonEnv.systemEnv.forEach(env::put); commands.add(0, pythonEnv....
/** * Starts python process. * * @param pythonEnv the python Environment which will be in a process. * @param commands the commands that python process will execute. * @return the process represent the python process. * @throws IOException Thrown if an error occurred when python process start. */
Starts python process
startPythonProcess
{ "repo_name": "fhueske/flink", "path": "flink-python/src/main/java/org/apache/flink/client/python/PythonEnvUtils.java", "license": "apache-2.0", "size": 8106 }
[ "java.io.File", "java.io.IOException", "java.util.List", "java.util.Map" ]
import java.io.File; import java.io.IOException; import java.util.List; import java.util.Map;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
341,998
static void writeFloat(final DataOutputStream outputStream, final float value) throws IOException { final byte[] byteArray = floatToByteArray(value); outputStream.write(byteArray); }
static void writeFloat(final DataOutputStream outputStream, final float value) throws IOException { final byte[] byteArray = floatToByteArray(value); outputStream.write(byteArray); }
/** * Utility method for writing a float value to an outputStream. * Writes in Illumina (little-endian) format */
Utility method for writing a float value to an outputStream. Writes in Illumina (little-endian) format
writeFloat
{ "repo_name": "broadinstitute/picard", "path": "src/main/java/picard/arrays/illumina/InfiniumDataFile.java", "license": "mit", "size": 14175 }
[ "java.io.DataOutputStream", "java.io.IOException" ]
import java.io.DataOutputStream; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,615,543
protected boolean isReplaceAccepted(final String dataUri) { final byte[] bytes = dataUri.getBytes(StandardCharsets.UTF_8); final boolean exceedLimit = bytes.length >= SIZE_LIMIT; LOG.debug("dataUri size: {}KB, limit exceeded: {}", bytes.length / 1024, exceedLimit); return !exceedLimit; } /...
boolean function(final String dataUri) { final byte[] bytes = dataUri.getBytes(StandardCharsets.UTF_8); final boolean exceedLimit = bytes.length >= SIZE_LIMIT; LOG.debug(STR, bytes.length / 1024, exceedLimit); return !exceedLimit; } /** * {@inheritDoc}
/** * Similar to {@link CssDataUriPreProcessor#isReplaceAccepted(String)}, but decides whether the computed dataUri * should replace the image url. It is useful when you want to limit the dataUri size. By default the size of dataUri * is limited to 32KB (because IE8 has a 32KB limitation). * * @para...
Similar to <code>CssDataUriPreProcessor#isReplaceAccepted(String)</code>, but decides whether the computed dataUri should replace the image url. It is useful when you want to limit the dataUri size. By default the size of dataUri is limited to 32KB (because IE8 has a 32KB limitation)
isReplaceAccepted
{ "repo_name": "wro4j/wro4j", "path": "wro4j-core/src/main/java/ro/isdc/wro/model/resource/processor/impl/css/CssDataUriPreProcessor.java", "license": "apache-2.0", "size": 5234 }
[ "java.nio.charset.StandardCharsets" ]
import java.nio.charset.StandardCharsets;
import java.nio.charset.*;
[ "java.nio" ]
java.nio;
2,514,232
public Date getLoadDate() { return loadDate; }
Date function() { return loadDate; }
/** * Gets the loadDate attribute. * @return Returns the loadDate. */
Gets the loadDate attribute
getLoadDate
{ "repo_name": "ua-eas/ua-kfs-5.3", "path": "work/src/org/kuali/kfs/vnd/businessobject/DebarredVendorMatch.java", "license": "agpl-3.0", "size": 11562 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,560,831
public void test_loadFails() throws Exception { final String resource = "bigdata-rdf/src/test/com/bigdata/rdf/rio/broken.rdf"; final AbstractTripleStore store = getStore(); try { if(!(store.getIndexManager() instanceof AbstractScaleOutFederation)) { ...
void function() throws Exception { final String resource = STR; final AbstractTripleStore store = getStore(); try { if(!(store.getIndexManager() instanceof AbstractScaleOutFederation)) { log.warn(STR); return; } if (store.isQuads()) { log.warn(STR); return; } final AsynchronousStatementBufferFactory<BigdataStatement, F...
/** * Test with the "broken.rdf" data set (does not contain valid RDF). This * tests that the factory will shutdown correctly if there are processing * errors. * * @throws Exception */
Test with the "broken.rdf" data set (does not contain valid RDF). This tests that the factory will shutdown correctly if there are processing errors
test_loadFails
{ "repo_name": "rac021/blazegraph_1_5_3_cluster_2_nodes", "path": "bigdata-rdf/src/test/com/bigdata/rdf/rio/TestAsynchronousStatementBufferFactory.java", "license": "gpl-2.0", "size": 20038 }
[ "com.bigdata.rdf.model.BigdataStatement", "com.bigdata.rdf.store.AbstractTripleStore", "com.bigdata.service.AbstractScaleOutFederation", "java.io.File" ]
import com.bigdata.rdf.model.BigdataStatement; import com.bigdata.rdf.store.AbstractTripleStore; import com.bigdata.service.AbstractScaleOutFederation; import java.io.File;
import com.bigdata.rdf.model.*; import com.bigdata.rdf.store.*; import com.bigdata.service.*; import java.io.*;
[ "com.bigdata.rdf", "com.bigdata.service", "java.io" ]
com.bigdata.rdf; com.bigdata.service; java.io;
159,371
// [START add_complete_campaigns_using_batch_job] private String createBatchJob(BatchJobServiceClient batchJobServiceClient, long customerId) { BatchJobOperation operation = BatchJobOperation.newBuilder().setCreate(BatchJob.newBuilder().build()).build(); String batchJobResourceName = batchJo...
String function(BatchJobServiceClient batchJobServiceClient, long customerId) { BatchJobOperation operation = BatchJobOperation.newBuilder().setCreate(BatchJob.newBuilder().build()).build(); String batchJobResourceName = batchJobServiceClient .mutateBatchJob(Long.toString(customerId), operation) .getResult() .getResour...
/** * Creates a new mutate job for the specified customer ID. * * @param batchJobServiceClient the mutate job service client. * @param customerId the client customer ID. * @return the resource name of the created mutate job. */
Creates a new mutate job for the specified customer ID
createBatchJob
{ "repo_name": "googleads/google-ads-java", "path": "google-ads-examples/src/main/java/com/google/ads/googleads/examples/campaignmanagement/AddCompleteCampaignsUsingBatchJob.java", "license": "apache-2.0", "size": 24357 }
[ "com.google.ads.googleads.v10.resources.BatchJob", "com.google.ads.googleads.v10.services.BatchJobOperation", "com.google.ads.googleads.v10.services.BatchJobServiceClient" ]
import com.google.ads.googleads.v10.resources.BatchJob; import com.google.ads.googleads.v10.services.BatchJobOperation; import com.google.ads.googleads.v10.services.BatchJobServiceClient;
import com.google.ads.googleads.v10.resources.*; import com.google.ads.googleads.v10.services.*;
[ "com.google.ads" ]
com.google.ads;
2,412,234
public ISpaceObjectGenerator getRandomSOGenerator(SpaceObjectType pTargetType) { ISpaceObjectGenerator tGen = null; List<ISpaceObjectGenerator> tLst = null; try { switch (pTargetType) { case NonOreSchematic: tLst = _mSpaceStructureGenerators; break; case OreAsteroid: tLst = _mSpaceOb...
ISpaceObjectGenerator function(SpaceObjectType pTargetType) { ISpaceObjectGenerator tGen = null; List<ISpaceObjectGenerator> tLst = null; try { switch (pTargetType) { case NonOreSchematic: tLst = _mSpaceStructureGenerators; break; case OreAsteroid: tLst = _mSpaceObjectsGenerators; break; default: break; } if (tLst != n...
/**Internal function * Return a random generator for space objects */
Internal function Return a random generator for space objects
getRandomSOGenerator
{ "repo_name": "GTNewHorizons/GalacticGregGT5", "path": "src/main/java/bloodasp/galacticgreg/api/ModDimensionDef.java", "license": "gpl-2.0", "size": 14656 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,315,601
public Collection<Field> getVisibleFields() { return visibleFields; }
Collection<Field> function() { return visibleFields; }
/** * Gets only the visible fields. * No assumptions should be made about the order of the fields returned from this method. * To obtain the index of a field, call indexOf. */
Gets only the visible fields. No assumptions should be made about the order of the fields returned from this method. To obtain the index of a field, call indexOf
getVisibleFields
{ "repo_name": "Nasdaq/presto", "path": "presto-main/src/main/java/com/facebook/presto/sql/analyzer/RelationType.java", "license": "apache-2.0", "size": 6297 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
1,237,653
protected void onFileSelected(File file) { if (file != null) { if (file.isDirectory()) { replaceFragment(file); } else { finishWithResult(file); } } else { Toast.makeText(FileChooserActivity.this, R.string.error_selecting_file, Toast.LENGTH_SHORT).show(); } }
void function(File file) { if (file != null) { if (file.isDirectory()) { replaceFragment(file); } else { finishWithResult(file); } } else { Toast.makeText(FileChooserActivity.this, R.string.error_selecting_file, Toast.LENGTH_SHORT).show(); } }
/** * Called when the user selects a File * * @param file * The file that was selected */
Called when the user selects a File
onFileSelected
{ "repo_name": "HasanFaraaz/vtu-life-android", "path": "src/com/V4Creations/vtulife/afilechooser/FileChooserActivity.java", "license": "gpl-3.0", "size": 6405 }
[ "android.widget.Toast", "java.io.File" ]
import android.widget.Toast; import java.io.File;
import android.widget.*; import java.io.*;
[ "android.widget", "java.io" ]
android.widget; java.io;
1,475,681
public Map<String, String> toMap() { if (LOG.isTraceEnabled()) { String message=String.format("ENTRY"); LOG.trace(message); } Map<String, String> map=new HashMap<String, String>(); map.put(ExceptionIncident.DOCUMENT_ID, this.documentId); ...
Map<String, String> function() { if (LOG.isTraceEnabled()) { String message=String.format("ENTRY"); LOG.trace(message); } Map<String, String> map=new HashMap<String, String>(); map.put(ExceptionIncident.DOCUMENT_ID, this.documentId); map.put(ExceptionIncident.USER_EMAIL, this.userEmail); map.put(ExceptionIncident.USER_...
/** * This method return list of required information contained by the jsp in both * display and hidden properties. * * @return * <p>Example: * <code> * documentId, 2942084 * userEmail, someone@somewhere * userName, some name * componentFormName, Form that th...
This method return list of required information contained by the jsp in both display and hidden properties
toMap
{ "repo_name": "mztaylor/rice-git", "path": "rice-middleware/kns/src/main/java/org/kuali/rice/kns/web/struts/form/KualiExceptionIncidentForm.java", "license": "apache-2.0", "size": 11406 }
[ "java.util.HashMap", "java.util.Map", "org.kuali.rice.krad.exception.ExceptionIncident" ]
import java.util.HashMap; import java.util.Map; import org.kuali.rice.krad.exception.ExceptionIncident;
import java.util.*; import org.kuali.rice.krad.exception.*;
[ "java.util", "org.kuali.rice" ]
java.util; org.kuali.rice;
2,812,598
INetworkNode loginFromConfig();
INetworkNode loginFromConfig();
/** * Use the configuration supplied credentials to authenticate with in a Domain Authority * * @return */
Use the configuration supplied credentials to authenticate with in a Domain Authority
loginFromConfig
{ "repo_name": "EPapadopoulou/PersoNIS", "path": "api/java/internal/src/main/java/org/societies/api/internal/comm/ICommManagerController.java", "license": "bsd-2-clause", "size": 1652 }
[ "org.societies.api.identity.INetworkNode" ]
import org.societies.api.identity.INetworkNode;
import org.societies.api.identity.*;
[ "org.societies.api" ]
org.societies.api;
1,742,362
private DLPluginPackage preparePluginEnv(PackageInfo packageInfo, String dexPath) { //如果有缓存,则获取缓存的DLPluginPackage DLPluginPackage pluginPackage = mPackagesHolder.get(packageInfo.packageName); if (pluginPackage != null) { return pluginPackage; } DexClassLo...
DLPluginPackage function(PackageInfo packageInfo, String dexPath) { DLPluginPackage pluginPackage = mPackagesHolder.get(packageInfo.packageName); if (pluginPackage != null) { return pluginPackage; } DexClassLoader dexClassLoader = createDexClassLoader(dexPath); AssetManager assetManager = createAssetManager(dexPath); R...
/** * prepare plugin runtime env, has DexClassLoader, Resources, and so on. * * @param packageInfo * @param dexPath * @return */
prepare plugin runtime env, has DexClassLoader, Resources, and so on
preparePluginEnv
{ "repo_name": "Ztiany/CodeRepository", "path": "Android/HotPluginAndHotFix/DynamicLoadApk/lib/src/com/ryg/dynamicload/internal/DLPluginManager.java", "license": "apache-2.0", "size": 17600 }
[ "android.content.pm.PackageInfo", "android.content.res.AssetManager", "android.content.res.Resources" ]
import android.content.pm.PackageInfo; import android.content.res.AssetManager; import android.content.res.Resources;
import android.content.pm.*; import android.content.res.*;
[ "android.content" ]
android.content;
2,660,763
private void writeOutputBaseReadmeFile() { Preconditions.checkNotNull(getWorkspace()); Path outputBaseReadmeFile = getOutputBase().getRelative("README"); try { FileSystemUtils.writeIsoLatin1( outputBaseReadmeFile, "WORKSPACE: " + getWorkspace(), "", "The first...
void function() { Preconditions.checkNotNull(getWorkspace()); Path outputBaseReadmeFile = getOutputBase().getRelative(STR); try { FileSystemUtils.writeIsoLatin1( outputBaseReadmeFile, STR + getWorkspace(), STRThe first line of this file is intentionally easy to parse for variousSTRinteractive scripting and debugging pu...
/** * Generates a README file in the output base directory. This README file * contains the name of the workspace directory, so that users can figure out * which output base directory corresponds to which workspace. */
Generates a README file in the output base directory. This README file contains the name of the workspace directory, so that users can figure out which output base directory corresponds to which workspace
writeOutputBaseReadmeFile
{ "repo_name": "meteorcloudy/bazel", "path": "src/main/java/com/google/devtools/build/lib/runtime/BlazeWorkspace.java", "license": "apache-2.0", "size": 12120 }
[ "com.google.common.base.Preconditions", "com.google.devtools.build.lib.vfs.FileSystemUtils", "com.google.devtools.build.lib.vfs.Path" ]
import com.google.common.base.Preconditions; import com.google.devtools.build.lib.vfs.FileSystemUtils; import com.google.devtools.build.lib.vfs.Path;
import com.google.common.base.*; import com.google.devtools.build.lib.vfs.*;
[ "com.google.common", "com.google.devtools" ]
com.google.common; com.google.devtools;
1,715,561
public void readStream(final DataInput stream) throws IOException { final List<String> list = this.sortKey(); for (final String key : list) this.replaceValue(key, this.getType(key).readStream(stream)); } // *******************************************************************...
void function(final DataInput stream) throws IOException { final List<String> list = this.sortKey(); for (final String key : list) this.replaceValue(key, this.getType(key).readStream(stream)); }
/** * Read all the data from the stream * * @param stream * The input stream * @throws IOException * If there is a problem with the stream */
Read all the data from the stream
readStream
{ "repo_name": "Leviathan-Studio/MineIDE", "path": "core/src/main/java/com/leviathanstudio/mineide/data/DataManager.java", "license": "gpl-3.0", "size": 26975 }
[ "java.io.DataInput", "java.io.IOException", "java.util.List" ]
import java.io.DataInput; import java.io.IOException; import java.util.List;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
589,891
@Override public OptionalLong position() { //If all delegated tokens are empty then return empty if (trackingTokens.entrySet().stream().noneMatch(token -> token.getValue() != null && token.getValue().position().isPresent())) { return OptionalLong.empty(); } long sum...
OptionalLong function() { if (trackingTokens.entrySet().stream().noneMatch(token -> token.getValue() != null && token.getValue().position().isPresent())) { return OptionalLong.empty(); } long sumOfTokens = trackingTokens.values().stream() .filter(Objects::nonNull) .mapToLong(trackingToken -> trackingToken.position().or...
/** * Returns the sum of all positions of the constituent tracking tokens. * * @return Sum of all positions of the constituent tracking tokens. */
Returns the sum of all positions of the constituent tracking tokens
position
{ "repo_name": "krosenvold/AxonFramework", "path": "messaging/src/main/java/org/axonframework/eventhandling/MultiSourceTrackingToken.java", "license": "apache-2.0", "size": 9776 }
[ "java.util.Objects", "java.util.OptionalLong" ]
import java.util.Objects; import java.util.OptionalLong;
import java.util.*;
[ "java.util" ]
java.util;
1,775,493
public void setView(View view) { this.view = view; }
void function(View view) { this.view = view; }
/** * Set a simple view, i.e., one that does not need a StateGraph @see init * @param view in effect */
Set a simple view, i.e., one that does not need a StateGraph @see init
setView
{ "repo_name": "ddalton/xor", "path": "src/main/java/tools/xor/Settings.java", "license": "apache-2.0", "size": 46142 }
[ "tools.xor.view.View" ]
import tools.xor.view.View;
import tools.xor.view.*;
[ "tools.xor.view" ]
tools.xor.view;
743,301
BankFactory getBankFactory(); interface Literals { EClass SYSTEM_OF_RECORDS = eINSTANCE.getSystemOfRecords(); EAttribute SYSTEM_OF_RECORDS__ID = eINSTANCE.getSystemOfRecords_Id(); EAttribute SYSTEM_OF_RECORDS__NAME = eINSTANCE.getSystemOfRecords_Name(); EAttribute SYSTEM_OF_RECORDS__DESCRI...
BankFactory getBankFactory(); interface Literals { EClass SYSTEM_OF_RECORDS = eINSTANCE.getSystemOfRecords(); EAttribute SYSTEM_OF_RECORDS__ID = eINSTANCE.getSystemOfRecords_Id(); EAttribute SYSTEM_OF_RECORDS__NAME = eINSTANCE.getSystemOfRecords_Name(); EAttribute SYSTEM_OF_RECORDS__DESCRIPTION = eINSTANCE.getSystemOfR...
/** * Returns the factory that creates the instances of the model. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the factory that creates the instances of the model. * @generated */
Returns the factory that creates the instances of the model.
getBankFactory
{ "repo_name": "Nasdanika/examples", "path": "org.nasdanika.examples.bank/src/org/nasdanika/examples/bank/BankPackage.java", "license": "epl-1.0", "size": 69780 }
[ "org.eclipse.emf.ecore.EAttribute", "org.eclipse.emf.ecore.EClass", "org.eclipse.emf.ecore.EDataType", "org.eclipse.emf.ecore.EEnum", "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EAttribute; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EDataType; import org.eclipse.emf.ecore.EEnum; import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,165,148
private AuthorizedRepresentativeName getAuthorizedRep() { AuthorizedRepresentativeName authorizedRepresentativeName = AuthorizedRepresentativeName.Factory .newInstance(); DepartmentalPersonDto aorInfo = departmentalPersonService.getDepartmentalPerson(pdDoc); authorizedRepresentativeName.setAORName(globLib...
AuthorizedRepresentativeName function() { AuthorizedRepresentativeName authorizedRepresentativeName = AuthorizedRepresentativeName.Factory .newInstance(); DepartmentalPersonDto aorInfo = departmentalPersonService.getDepartmentalPerson(pdDoc); authorizedRepresentativeName.setAORName(globLibV20Generator.getHumanNameDataT...
/** * * This method returns authorizedRepresentativeName which contains * AORName,UserName * * @return AuthorizedRepresentativeName object with AORname and user name * details. */
This method returns authorizedRepresentativeName which contains AORName,UserName
getAuthorizedRep
{ "repo_name": "UniversityOfHawaiiORS/kc-s2sgen", "path": "coeus-s2sgen-impl/src/main/java/org/kuali/coeus/s2sgen/impl/generate/support/NasaPIandAORSupplementalDataSheetV1_0Generator.java", "license": "agpl-3.0", "size": 13944 }
[ "gov.grants.apply.forms.nasaPIandAORSupplementalDataSheetV10.NasaPIandAORSupplementalDataSheetDocument", "org.kuali.coeus.s2sgen.impl.person.DepartmentalPersonDto" ]
import gov.grants.apply.forms.nasaPIandAORSupplementalDataSheetV10.NasaPIandAORSupplementalDataSheetDocument; import org.kuali.coeus.s2sgen.impl.person.DepartmentalPersonDto;
import gov.grants.apply.forms.*; import org.kuali.coeus.s2sgen.impl.person.*;
[ "gov.grants.apply", "org.kuali.coeus" ]
gov.grants.apply; org.kuali.coeus;
2,575,180
public static String formatToCardinal(Date date) { int day = DateUtils.getDayOfMonth(date); String ordinalSuffix = NumberUtils.getOrdinalSuffix(day); StringBuilder builder = new StringBuilder(); builder.append(format(date, EEEEMMMM_DATE_FORMAT)); builder.append(" "); builder.append(day); builder.append...
static String function(Date date) { int day = DateUtils.getDayOfMonth(date); String ordinalSuffix = NumberUtils.getOrdinalSuffix(day); StringBuilder builder = new StringBuilder(); builder.append(format(date, EEEEMMMM_DATE_FORMAT)); builder.append(" "); builder.append(day); builder.append(ordinalSuffix); return builder....
/** * Transform the {@link Date} to a {@link String} with a format like Friday November 5th * * @param date The {@link Date} to be formatted * @return A String that represent the date with the pattern */
Transform the <code>Date</code> to a <code>String</code> with a format like Friday November 5th
formatToCardinal
{ "repo_name": "wskplho/jdroid", "path": "jdroid-java/src/main/java/com/jdroid/java/utils/DateUtils.java", "license": "apache-2.0", "size": 19335 }
[ "java.text.DateFormat", "java.util.Date" ]
import java.text.DateFormat; import java.util.Date;
import java.text.*; import java.util.*;
[ "java.text", "java.util" ]
java.text; java.util;
435,348
public void addDays(int numberOfDays) { this.calendar.add(Calendar.DAY_OF_MONTH, numberOfDays); }
void function(int numberOfDays) { this.calendar.add(Calendar.DAY_OF_MONTH, numberOfDays); }
/** * Adds days to the current date setting. * @param numberOfDays The number of days to add. */
Adds days to the current date setting
addDays
{ "repo_name": "idega/com.idega.core", "path": "src/java/com/idega/util/IWTimestamp.java", "license": "gpl-3.0", "size": 39740 }
[ "java.util.Calendar" ]
import java.util.Calendar;
import java.util.*;
[ "java.util" ]
java.util;
1,831,885
private ProductoPedido getProductoPedidoFromJSON(Object data) { JSONObject jsonObject = JSONObject.fromObject(data); ProductoPedido newProductoPedido = (ProductoPedido) JSONObject.toBean( jsonObject, ProductoPedido.class); return newProductoPedido; }
ProductoPedido function(Object data) { JSONObject jsonObject = JSONObject.fromObject(data); ProductoPedido newProductoPedido = (ProductoPedido) JSONObject.toBean( jsonObject, ProductoPedido.class); return newProductoPedido; }
/** * Transform json data format into ProductoPedido object * * @param data * - json data from request * @return */
Transform json data format into ProductoPedido object
getProductoPedidoFromJSON
{ "repo_name": "osmaroi/touchBar", "path": "touchbar/src/es/bootools/touchbar/converter/ProductoPedidoConverter.java", "license": "gpl-3.0", "size": 2325 }
[ "es.bootools.touchbar.model.ProductoPedido", "net.sf.json.JSONObject" ]
import es.bootools.touchbar.model.ProductoPedido; import net.sf.json.JSONObject;
import es.bootools.touchbar.model.*; import net.sf.json.*;
[ "es.bootools.touchbar", "net.sf.json" ]
es.bootools.touchbar; net.sf.json;
449,353
HashSet getGrantedClassNames(boolean andToPublic) throws HsqlException { return grantee.getGrantedClassNames(andToPublic); }
HashSet getGrantedClassNames(boolean andToPublic) throws HsqlException { return grantee.getGrantedClassNames(andToPublic); }
/** * Retrieves the distinct set of Java <code>Class</code> FQNs * for which this <code>User</code> object has been * granted <code>ALL</code> (the Class execution privilege). <p> * @param andToPublic if <code>true</code>, then the set includes the * names of classes accessible to this <...
Retrieves the distinct set of Java <code>Class</code> FQNs for which this <code>User</code> object has been granted <code>ALL</code> (the Class execution privilege).
getGrantedClassNames
{ "repo_name": "danielbejaranogonzalez/Mobile-Network-Designer", "path": "db/hsqldb/src/org/hsqldb/User.java", "license": "gpl-3.0", "size": 12917 }
[ "org.hsqldb.lib.HashSet" ]
import org.hsqldb.lib.HashSet;
import org.hsqldb.lib.*;
[ "org.hsqldb.lib" ]
org.hsqldb.lib;
1,630,611
void setLocalizer(Localizer localizer);
void setLocalizer(Localizer localizer);
/** * Sets the localizer which will be used to find property values. * * @param localizer * @since 1.3.0 */
Sets the localizer which will be used to find property values
setLocalizer
{ "repo_name": "afiantara/apache-wicket-1.5.7", "path": "src/wicket-core/src/main/java/org/apache/wicket/settings/IResourceSettings.java", "license": "apache-2.0", "size": 13654 }
[ "org.apache.wicket.Localizer" ]
import org.apache.wicket.Localizer;
import org.apache.wicket.*;
[ "org.apache.wicket" ]
org.apache.wicket;
443,984
public void connectionClosed(ConnectionEvent event) { PooledConnection pc = (PooledConnection) event.getSource(); // if this event occured becase we were validating, ignore it // otherwise return the connection to the pool. if (!validatingMap.containsKey(pc)) { Object inf...
void function(ConnectionEvent event) { PooledConnection pc = (PooledConnection) event.getSource(); if (!validatingMap.containsKey(pc)) { Object info = pcMap.get(pc); if (info == null) { throw new IllegalStateException(NO_KEY_MESSAGE); } try { _pool.returnObject(info); } catch (Exception e) { System.err.println(STR + ST...
/** * This will be called if the Connection returned by the getConnection * method came from a PooledConnection, and the user calls the close() * method of this connection object. What we need to do here is to * release this PooledConnection from our pool... */
This will be called if the Connection returned by the getConnection method came from a PooledConnection, and the user calls the close() method of this connection object. What we need to do here is to release this PooledConnection from our pool..
connectionClosed
{ "repo_name": "optivo-org/commons-dbcp-optivo", "path": "src/java/org/apache/commons/dbcp/datasources/CPDSConnectionFactory.java", "license": "apache-2.0", "size": 12724 }
[ "javax.sql.ConnectionEvent", "javax.sql.PooledConnection" ]
import javax.sql.ConnectionEvent; import javax.sql.PooledConnection;
import javax.sql.*;
[ "javax.sql" ]
javax.sql;
912,973
private static ConstructedTlvDataObject encodeBodyUptoCHR(int certificateProfileIdentifier, PublicKeyReference certificationAuthorityReference, ConstructedTlvDataObject publicKeyRepresentation, PublicKeyReference certificateHolderReference) { ConstructedTlvDataObject certificateBodyTlv = new ConstructedTl...
static ConstructedTlvDataObject function(int certificateProfileIdentifier, PublicKeyReference certificationAuthorityReference, ConstructedTlvDataObject publicKeyRepresentation, PublicKeyReference certificateHolderReference) { ConstructedTlvDataObject certificateBodyTlv = new ConstructedTlvDataObject(TAG_7F4E); Primitiv...
/** * This method returns the TLV encoding for a certificate body up to the certificate holder reference * due to common parameters of reduced and full body * @param certificateProfileIdentifier the certificate profile identifier * @param certificationAuthorityReference the certification authority reference *...
This method returns the TLV encoding for a certificate body up to the certificate holder reference due to common parameters of reduced and full body
encodeBodyUptoCHR
{ "repo_name": "halemmerich/de.persosim.simulator", "path": "de.persosim.simulator/src/de/persosim/simulator/crypto/certificates/CertificateUtils.java", "license": "gpl-3.0", "size": 12647 }
[ "de.persosim.simulator.tlv.ConstructedTlvDataObject", "de.persosim.simulator.tlv.PrimitiveTlvDataObject", "de.persosim.simulator.utils.Utils" ]
import de.persosim.simulator.tlv.ConstructedTlvDataObject; import de.persosim.simulator.tlv.PrimitiveTlvDataObject; import de.persosim.simulator.utils.Utils;
import de.persosim.simulator.tlv.*; import de.persosim.simulator.utils.*;
[ "de.persosim.simulator" ]
de.persosim.simulator;
1,685,744
public Enumeration listOptions() { Vector newVector = new Vector(3); newVector.addElement(new Option( "\tSets if binary attributes are to be coded as nominal ones.", "N", 0, "-N")); newVector.addElement(new Option( "\tFor each nominal value a new attribute is created, \n" + "\tnot only if there are...
Enumeration function() { Vector newVector = new Vector(3); newVector.addElement(new Option( STR, "N", 0, "-N")); newVector.addElement(new Option( STR + STR, "A", 0, "-A")); newVector.addElement(new Option( STR + STR + STR, "R", 1, STR)); newVector.addElement(new Option( STR, "V", 0, "-V")); return newVector.elements();...
/** * Returns an enumeration describing the available options. * * @return an enumeration of all the available options. */
Returns an enumeration describing the available options
listOptions
{ "repo_name": "castudil/TTOSOM", "path": "R/weka/filters/unsupervised/attribute/NominalToBinary.java", "license": "gpl-3.0", "size": 15992 }
[ "java.util.Enumeration", "java.util.Vector" ]
import java.util.Enumeration; import java.util.Vector;
import java.util.*;
[ "java.util" ]
java.util;
2,889,302
this.providers.clear(); for (Map.Entry<String, IPermissionTargetProvider> provider : providers.entrySet()) { this.providers.put(provider.getKey(), provider.getValue()); } }
this.providers.clear(); for (Map.Entry<String, IPermissionTargetProvider> provider : providers.entrySet()) { this.providers.put(provider.getKey(), provider.getValue()); } }
/** * Construct a new target provider registry and initialize it with the * supplied map of key -> provider pairs. * * @param providers */
Construct a new target provider registry and initialize it with the supplied map of key -> provider pairs
setProviders
{ "repo_name": "Jasig/SSP-Platform", "path": "uportal-war/src/main/java/org/jasig/portal/permission/target/PermissionTargetProviderRegistryImpl.java", "license": "apache-2.0", "size": 2134 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
458,152
public Entity getEntity(World world) { return handle.getEntityModifier(world).read(0); }
Entity function(World world) { return handle.getEntityModifier(world).read(0); }
/** * Retrieve the entity that will be spawned. * @param world - the current world of the entity. * @return The spawned entity. */
Retrieve the entity that will be spawned
getEntity
{ "repo_name": "codebucketdev/HoloAPI", "path": "src/com/comphenix/packetwrapper/WrapperPlayServerSpawnEntityLiving.java", "license": "gpl-3.0", "size": 7769 }
[ "org.bukkit.World", "org.bukkit.entity.Entity" ]
import org.bukkit.World; import org.bukkit.entity.Entity;
import org.bukkit.*; import org.bukkit.entity.*;
[ "org.bukkit", "org.bukkit.entity" ]
org.bukkit; org.bukkit.entity;
1,886,271
public void setAmount(final ScaleTwoDecimal amount) { this.amount = amount; }
void function(final ScaleTwoDecimal amount) { this.amount = amount; }
/** * Sets the amount attribute value. * @param amount The amount to set. */
Sets the amount attribute value
setAmount
{ "repo_name": "mukadder/kc", "path": "coeus-impl/src/main/java/org/kuali/kra/award/paymentreports/specialapproval/approvedequipment/AwardApprovedEquipment.java", "license": "agpl-3.0", "size": 6198 }
[ "org.kuali.coeus.sys.api.model.ScaleTwoDecimal" ]
import org.kuali.coeus.sys.api.model.ScaleTwoDecimal;
import org.kuali.coeus.sys.api.model.*;
[ "org.kuali.coeus" ]
org.kuali.coeus;
2,265,333