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 remember(String preferenceKey) { StringBuffer value = new StringBuffer(); value.append("x=").append(topLeft.x).append(",") .append("y=").append(topLeft.y).append(",") .append("width=").append(extent.width).append(",") .append("height=").append(extent.height); ...
void function(String preferenceKey) { StringBuffer value = new StringBuffer(); value.append("x=").append(topLeft.x).append(",") .append("y=").append(topLeft.y).append(",") .append(STR).append(extent.width).append(",") .append(STR).append(extent.height); Main.pref.put(preferenceKey, value.toString()); }
/** * Remembers a window geometry under a specific preference key * * @param preferenceKey the preference key */
Remembers a window geometry under a specific preference key
remember
{ "repo_name": "jonathanrcarter/divv-amsterdam-parkingapi", "path": "src-josm/org/openstreetmap/josm/tools/WindowGeometry.java", "license": "gpl-2.0", "size": 14394 }
[ "org.openstreetmap.josm.Main" ]
import org.openstreetmap.josm.Main;
import org.openstreetmap.josm.*;
[ "org.openstreetmap.josm" ]
org.openstreetmap.josm;
781,041
public HLMarkingHLAPI getContainerHLMarkingHLAPI(){ if(item.getContainerHLMarking() == null) return null; return new HLMarkingHLAPI(item.getContainerHLMarking()); }
HLMarkingHLAPI function(){ if(item.getContainerHLMarking() == null) return null; return new HLMarkingHLAPI(item.getContainerHLMarking()); }
/** * This accessor automatically encapsulate an element of the current object. * WARNING : this creates a new object in memory. * @return : null if the element is null */
This accessor automatically encapsulate an element of the current object. WARNING : this creates a new object in memory
getContainerHLMarkingHLAPI
{ "repo_name": "lhillah/pnmlframework", "path": "pnmlFw-HLPN/src/fr/lip6/move/pnml/hlpn/booleans/hlapi/AndHLAPI.java", "license": "epl-1.0", "size": 108259 }
[ "fr.lip6.move.pnml.hlpn.hlcorestructure.hlapi.HLMarkingHLAPI" ]
import fr.lip6.move.pnml.hlpn.hlcorestructure.hlapi.HLMarkingHLAPI;
import fr.lip6.move.pnml.hlpn.hlcorestructure.hlapi.*;
[ "fr.lip6.move" ]
fr.lip6.move;
1,464,969
public boolean isNameNodeUp(int nnIndex) { NameNode nameNode = getNN(nnIndex).nameNode; if (nameNode == null) { return false; } long[] sizes; sizes = NameNodeAdapter.getStats(nameNode.getNamesystem()); boolean isUp = false; synchronized (this) { isUp = ((!nameNode.isInSafeMode(...
boolean function(int nnIndex) { NameNode nameNode = getNN(nnIndex).nameNode; if (nameNode == null) { return false; } long[] sizes; sizes = NameNodeAdapter.getStats(nameNode.getNamesystem()); boolean isUp = false; synchronized (this) { isUp = ((!nameNode.isInSafeMode() !waitSafeMode) && sizes[ClientProtocol.GET_STATS_CA...
/** * Returns true if the NameNode is running and is out of Safe Mode * or if waiting for safe mode is disabled. */
Returns true if the NameNode is running and is out of Safe Mode or if waiting for safe mode is disabled
isNameNodeUp
{ "repo_name": "soumabrata-chakraborty/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/MiniDFSCluster.java", "license": "apache-2.0", "size": 113960 }
[ "org.apache.hadoop.hdfs.protocol.ClientProtocol", "org.apache.hadoop.hdfs.server.namenode.NameNode", "org.apache.hadoop.hdfs.server.namenode.NameNodeAdapter" ]
import org.apache.hadoop.hdfs.protocol.ClientProtocol; import org.apache.hadoop.hdfs.server.namenode.NameNode; import org.apache.hadoop.hdfs.server.namenode.NameNodeAdapter;
import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.server.namenode.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
350,493
private void cacheStream() { try { File fi = getTemproralCacheFile(); if (fi.exists()) { if (!fi.delete()) { throw new IllegalStateException("Cannot delete file " + fi.getAbsolutePath() + "!"); } } try (FileO...
void function() { try { File fi = getTemproralCacheFile(); if (fi.exists()) { if (!fi.delete()) { throw new IllegalStateException(STR + fi.getAbsolutePath() + "!"); } } try (FileOutputStream fout = new FileOutputStream(fi); InputStream in = grabStream()) { byte[] buffer = new byte[DEFAULT_BUFFER_SIZE]; int n; while (-1...
/** * Save a copy in the local cache - in case remote source is not available in future. */
Save a copy in the local cache - in case remote source is not available in future
cacheStream
{ "repo_name": "etirelli/drools", "path": "drools-core/src/main/java/org/drools/core/io/impl/UrlResource.java", "license": "apache-2.0", "size": 14360 }
[ "java.io.File", "java.io.FileOutputStream", "java.io.InputStream" ]
import java.io.File; import java.io.FileOutputStream; import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
936,606
public Map<String, List<NameValueBean>> getPrivilegesforPrefix(String prefix) { Map<String, List<NameValueBean>> map = new HashMap<String, List<NameValueBean>>(); for(Entry<String, BitSet> entry : privilegeMap.entrySet()) { if(entry.getKey().startsWith(prefix)) { List<NameValueBean> privi...
Map<String, List<NameValueBean>> function(String prefix) { Map<String, List<NameValueBean>> map = new HashMap<String, List<NameValueBean>>(); for(Entry<String, BitSet> entry : privilegeMap.entrySet()) { if(entry.getKey().startsWith(prefix)) { List<NameValueBean> privileges = getPrivilegeNames(entry.getValue()); if(!pri...
/** * get the ids and privileges where ids start with the given prefix * * @param prefix * @return */
get the ids and privileges where ids start with the given prefix
getPrivilegesforPrefix
{ "repo_name": "NCIP/cab2b", "path": "software/dependencies/commonpackage/HEAD_TAG_10_Jan_2007_RELEASE_BRANCH_FOR_V11/src/edu/wustl/common/security/PrivilegeCache.java", "license": "bsd-3-clause", "size": 20309 }
[ "edu.wustl.common.beans.NameValueBean", "java.util.BitSet", "java.util.HashMap", "java.util.List", "java.util.Map" ]
import edu.wustl.common.beans.NameValueBean; import java.util.BitSet; import java.util.HashMap; import java.util.List; import java.util.Map;
import edu.wustl.common.beans.*; import java.util.*;
[ "edu.wustl.common", "java.util" ]
edu.wustl.common; java.util;
602,209
public Cursor selectAllStreams(int siteId) { // Query the database. String where = DbOpenHelper.STREAMS_SITE_KEY + " = " + String.valueOf(siteId); Cursor cursor = mDB.query(DbOpenHelper.STREAMS_TABLE_NAME, STREAM_COLUMNS, where, null, null, null, DbOpenHelper.STREAMS_REMO...
Cursor function(int siteId) { String where = DbOpenHelper.STREAMS_SITE_KEY + STR + String.valueOf(siteId); Cursor cursor = mDB.query(DbOpenHelper.STREAMS_TABLE_NAME, STREAM_COLUMNS, where, null, null, null, DbOpenHelper.STREAMS_REMOTE_ID_KEY); return cursor; }
/** Get a cursor to all the streams for this site. * * Remember to close() the returned cursor when you're done with it! */
Get a cursor to all the streams for this site. Remember to close() the returned cursor when you're done with it
selectAllStreams
{ "repo_name": "cknave/nectroid", "path": "src/com/kvance/Nectroid/DbDataHelper.java", "license": "gpl-3.0", "size": 11747 }
[ "android.database.Cursor" ]
import android.database.Cursor;
import android.database.*;
[ "android.database" ]
android.database;
1,133,725
PreferencesView getPreferencesView() { if (this.preferencesView == null) { // store the trigger in the context so the preferences pages have access to it; // and put it in the view so the dialog OK button has access to it BufferedPropertyValueModel.Trigger bufferTrigger =...
PreferencesView getPreferencesView() { if (this.preferencesView == null) { BufferedPropertyValueModel.Trigger bufferTrigger = new BufferedPropertyValueModel.Trigger(); PreferencesContext context = new FrameworkPreferencesContext(this, bufferTrigger); this.preferencesView = new PreferencesView(this.buildRootPreferencesN...
/** * Postpone building the preferences view until it is first needed. */
Postpone building the preferences view until it is first needed
getPreferencesView
{ "repo_name": "RallySoftware/eclipselink.runtime", "path": "utils/eclipselink.utils.workbench/framework/source/org/eclipse/persistence/tools/workbench/framework/internal/FrameworkApplication.java", "license": "epl-1.0", "size": 38299 }
[ "org.eclipse.persistence.tools.workbench.framework.context.PreferencesContext", "org.eclipse.persistence.tools.workbench.uitools.app.BufferedPropertyValueModel" ]
import org.eclipse.persistence.tools.workbench.framework.context.PreferencesContext; import org.eclipse.persistence.tools.workbench.uitools.app.BufferedPropertyValueModel;
import org.eclipse.persistence.tools.workbench.framework.context.*; import org.eclipse.persistence.tools.workbench.uitools.app.*;
[ "org.eclipse.persistence" ]
org.eclipse.persistence;
1,905,331
@Override protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); }
void function(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); }
/** * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children * that can be created under this object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds <code>org.eclipse.emf.edit.command.CommandParameter</code>s describing the children that can be created under this object.
collectNewChildDescriptors
{ "repo_name": "KAMP-Research/KAMP4APS", "path": "edu.kit.ipd.sdq.kamp4aps.model.fieldofactivityannotations.edit/src/edu/kit/ipd/sdq/kamp4aps/model/fieldofactivityannotations/provider/ModuleStockListItemProvider.java", "license": "apache-2.0", "size": 3773 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,448,790
public UserRegistry getUserRegistry(String userName, String password, int tenantId, String chroot) throws RegistryException { String concatenatedChroot = RegistryUtils.concatenateChroot(this.chroot, chroot); return new UserRegistry(userName, pa...
UserRegistry function(String userName, String password, int tenantId, String chroot) throws RegistryException { String concatenatedChroot = RegistryUtils.concatenateChroot(this.chroot, chroot); return new UserRegistry(userName, password, tenantId, embeddedRegistry, realmService, concatenatedChroot); }
/** * Creates UserRegistry instances for normal users. Applications should use this method to * create UserRegistry instances, unless there is a specific need documented in other methods. * User name and the password will be authenticated by the EmbeddedRegistry before creating the * requested UserR...
Creates UserRegistry instances for normal users. Applications should use this method to create UserRegistry instances, unless there is a specific need documented in other methods. User name and the password will be authenticated by the EmbeddedRegistry before creating the requested UserRegistry instance
getUserRegistry
{ "repo_name": "maheshika/carbon4-kernel", "path": "core/org.wso2.carbon.registry.core/src/main/java/org/wso2/carbon/registry/core/jdbc/EmbeddedRegistryService.java", "license": "apache-2.0", "size": 23554 }
[ "org.wso2.carbon.registry.core.exceptions.RegistryException", "org.wso2.carbon.registry.core.session.UserRegistry", "org.wso2.carbon.registry.core.utils.RegistryUtils" ]
import org.wso2.carbon.registry.core.exceptions.RegistryException; import org.wso2.carbon.registry.core.session.UserRegistry; import org.wso2.carbon.registry.core.utils.RegistryUtils;
import org.wso2.carbon.registry.core.exceptions.*; import org.wso2.carbon.registry.core.session.*; import org.wso2.carbon.registry.core.utils.*;
[ "org.wso2.carbon" ]
org.wso2.carbon;
302,177
private static byte[] getColValue(Result result, String colName) { byte[][] colArray = Bytes.toByteArrays(colName.split(":")); return result.getValue(colArray[0], colArray[1]); }
static byte[] function(Result result, String colName) { byte[][] colArray = Bytes.toByteArrays(colName.split(":")); return result.getValue(colArray[0], colArray[1]); }
/** * Helper to deal with fetching a result based on a cf:colname string spec * @param result * @param colName * @return */
Helper to deal with fetching a result based on a cf:colname string spec
getColValue
{ "repo_name": "rekhajoshm/pig", "path": "test/org/apache/pig/test/TestHBaseStorage.java", "license": "apache-2.0", "size": 48196 }
[ "org.apache.hadoop.hbase.client.Result", "org.apache.hadoop.hbase.util.Bytes" ]
import org.apache.hadoop.hbase.client.Result; import org.apache.hadoop.hbase.util.Bytes;
import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.util.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
2,553,968
Algorithm getAlgorithm(String publicKey);
Algorithm getAlgorithm(String publicKey);
/** * Build a verification algorithm based on the supplied public key. * @param publicKey the public key in PEM format * @return the verification algorithm */
Build a verification algorithm based on the supplied public key
getAlgorithm
{ "repo_name": "RADAR-CNS/ManagementPortal", "path": "radar-auth/src/main/java/org/radarcns/auth/token/validation/TokenValidationAlgorithm.java", "license": "apache-2.0", "size": 799 }
[ "com.auth0.jwt.algorithms.Algorithm" ]
import com.auth0.jwt.algorithms.Algorithm;
import com.auth0.jwt.algorithms.*;
[ "com.auth0.jwt" ]
com.auth0.jwt;
2,492,108
protected void setFigurePositionFromTextPosition(Rectangle rect) { setFigurePositionFromTextPosition(rect, 1); }
void function(Rectangle rect) { setFigurePositionFromTextPosition(rect, 1); }
/** * Adjust the figure's position in relation to the position of the text control * Assumes a square target working area. * @param rect the working area of the figure to modify */
Adjust the figure's position in relation to the position of the text control Assumes a square target working area
setFigurePositionFromTextPosition
{ "repo_name": "archimatetool/archi", "path": "com.archimatetool.editor/src/com/archimatetool/editor/diagram/figures/AbstractTextControlContainerFigure.java", "license": "mit", "size": 11564 }
[ "org.eclipse.draw2d.geometry.Rectangle" ]
import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.draw2d.geometry.*;
[ "org.eclipse.draw2d" ]
org.eclipse.draw2d;
2,591,143
void verifyNotificationsForFailedPut() { Set<String> blobIdsVisited = new HashSet<>(); for (MockServer mockServer : mockServerLayout.getMockServers()) { for (Map.Entry<String, StoredBlob> blobEntry : mockServer.getBlobs().entrySet()) { if (blobIdsVisited.add(blobEntry.getKey())) { ...
void verifyNotificationsForFailedPut() { Set<String> blobIdsVisited = new HashSet<>(); for (MockServer mockServer : mockServerLayout.getMockServers()) { for (Map.Entry<String, StoredBlob> blobEntry : mockServer.getBlobs().entrySet()) { if (blobIdsVisited.add(blobEntry.getKey())) { StoredBlob blob = blobEntry.getValue()...
/** * Verify that onBlobCreated notifications were created for the data chunks of a failed put. */
Verify that onBlobCreated notifications were created for the data chunks of a failed put
verifyNotificationsForFailedPut
{ "repo_name": "xiahome/ambry", "path": "ambry-router/src/test/java/com.github.ambry.router/PutManagerTest.java", "license": "apache-2.0", "size": 45694 }
[ "com.github.ambry.messageformat.BlobProperties", "com.github.ambry.notification.NotificationBlobType", "java.util.HashSet", "java.util.Map", "java.util.Random", "java.util.Set", "org.junit.Assert" ]
import com.github.ambry.messageformat.BlobProperties; import com.github.ambry.notification.NotificationBlobType; import java.util.HashSet; import java.util.Map; import java.util.Random; import java.util.Set; import org.junit.Assert;
import com.github.ambry.messageformat.*; import com.github.ambry.notification.*; import java.util.*; import org.junit.*;
[ "com.github.ambry", "java.util", "org.junit" ]
com.github.ambry; java.util; org.junit;
857,410
@Override public boolean isOrderDeterministic() { if ( ! super.isOrderDeterministic()) { return false; } IndexScanPlanNode index_scan = (IndexScanPlanNode) getInlinePlanNode(PlanNodeType.INDEXSCAN); assert(index_scan != null); if ( ! index_scan.isO...
boolean function() { if ( ! super.isOrderDeterministic()) { return false; } IndexScanPlanNode index_scan = (IndexScanPlanNode) getInlinePlanNode(PlanNodeType.INDEXSCAN); assert(index_scan != null); if ( ! index_scan.isOrderDeterministic()) { m_nondeterminismDetail = index_scan.m_nondeterminismDetail; return false; } re...
/** * Does the (sub)plan guarantee an identical result/effect when "replayed" * against the same database state, such as during replication or CL recovery. * @return */
Does the (sub)plan guarantee an identical result/effect when "replayed" against the same database state, such as during replication or CL recovery
isOrderDeterministic
{ "repo_name": "zheguang/voltdb", "path": "src/frontend/org/voltdb/plannodes/NestLoopIndexPlanNode.java", "license": "agpl-3.0", "size": 10173 }
[ "org.voltdb.types.PlanNodeType" ]
import org.voltdb.types.PlanNodeType;
import org.voltdb.types.*;
[ "org.voltdb.types" ]
org.voltdb.types;
904,208
private void abortOngoingTaskClusters(ITaskFilter taskFilter, IExceptionGenerator exceptionGenerator) throws HyracksException { for (ActivityCluster ac : jobRun.getActivityClusterGraph().getActivityClusterMap().values()) { if (!isPlanned(ac)) { continue; }...
void function(ITaskFilter taskFilter, IExceptionGenerator exceptionGenerator) throws HyracksException { for (ActivityCluster ac : jobRun.getActivityClusterGraph().getActivityClusterMap().values()) { if (!isPlanned(ac)) { continue; } TaskCluster[] taskClusters = getActivityClusterPlan(ac).getTaskClusters(); if (taskClus...
/** * Aborts ongoing task clusters. * * @param taskFilter, * selects tasks that should be directly marked as failed without doing the aborting RPC. * @param exceptionGenerator, * generates an exception for tasks that are directly marked as failed. */
Aborts ongoing task clusters
abortOngoingTaskClusters
{ "repo_name": "heriram/incubator-asterixdb", "path": "hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/executor/JobExecutor.java", "license": "apache-2.0", "size": 36295 }
[ "java.util.Collections", "org.apache.hyracks.api.exceptions.HyracksException", "org.apache.hyracks.api.job.ActivityCluster", "org.apache.hyracks.control.cc.job.TaskAttempt", "org.apache.hyracks.control.cc.job.TaskCluster", "org.apache.hyracks.control.cc.job.TaskClusterAttempt" ]
import java.util.Collections; import org.apache.hyracks.api.exceptions.HyracksException; import org.apache.hyracks.api.job.ActivityCluster; import org.apache.hyracks.control.cc.job.TaskAttempt; import org.apache.hyracks.control.cc.job.TaskCluster; import org.apache.hyracks.control.cc.job.TaskClusterAttempt;
import java.util.*; import org.apache.hyracks.api.exceptions.*; import org.apache.hyracks.api.job.*; import org.apache.hyracks.control.cc.job.*;
[ "java.util", "org.apache.hyracks" ]
java.util; org.apache.hyracks;
2,673,745
public void loadWorkspaceContents(InputStream is) throws BlockLoadingException { List<Block> newBlocks = BlocklyXmlHelper.loadFromXml(is, mBlockFactory); // Successfully deserialized. Update workspace. // TODO: (#22) Add proper variable support. // For now just save and restore the...
void function(InputStream is) throws BlockLoadingException { List<Block> newBlocks = BlocklyXmlHelper.loadFromXml(is, mBlockFactory); Set<String> vars = mVariableNameManager.getUsedNames(); mController.resetWorkspace(); for (String varName : vars) { mController.addVariable(varName); } mRootBlocks.addAll(newBlocks); mSt...
/** * Reads the workspace in from a XML stream. This will clear the workspace and replace it with * the contents of the xml. * * @param is The input stream to read from. * @throws BlockLoadingException If workspace was not loaded. May wrap an IOException or another * ...
Reads the workspace in from a XML stream. This will clear the workspace and replace it with the contents of the xml
loadWorkspaceContents
{ "repo_name": "Axe-Ishmael/Blockly", "path": "src/blocklylib-core/src/main/java/com/google/blockly/model/Workspace.java", "license": "apache-2.0", "size": 13689 }
[ "com.google.blockly.utils.BlockLoadingException", "com.google.blockly.utils.BlocklyXmlHelper", "java.io.InputStream", "java.util.List", "java.util.Set" ]
import com.google.blockly.utils.BlockLoadingException; import com.google.blockly.utils.BlocklyXmlHelper; import java.io.InputStream; import java.util.List; import java.util.Set;
import com.google.blockly.utils.*; import java.io.*; import java.util.*;
[ "com.google.blockly", "java.io", "java.util" ]
com.google.blockly; java.io; java.util;
913,923
public final DateList getDates(final Date seed, final Period period, final Value value) { return getDates(seed, period.getStart(), period.getEnd(), value, -1); }
final DateList function(final Date seed, final Period period, final Value value) { return getDates(seed, period.getStart(), period.getEnd(), value, -1); }
/** * Convenience method for retrieving recurrences in a specified period. * @param seed a seed date for generating recurrence instances * @param period the period of returned recurrence dates * @param value type of dates to generate * @return a list of dates */
Convenience method for retrieving recurrences in a specified period
getDates
{ "repo_name": "guywithnose/iCal4j", "path": "src/main/java/net/fortuna/ical4j/model/Recur.java", "license": "bsd-3-clause", "size": 42862 }
[ "net.fortuna.ical4j.model.parameter.Value" ]
import net.fortuna.ical4j.model.parameter.Value;
import net.fortuna.ical4j.model.parameter.*;
[ "net.fortuna.ical4j" ]
net.fortuna.ical4j;
1,555,716
private static boolean saveAPI(APIProvider apiProvider, API api, FileHostObject fileHostObject, boolean isNewApi) throws APIManagementException, FaultGatewaysException { boolean success = false; boolean isTenantFlowStarted = false; try { String tenantDomain = ...
static boolean function(APIProvider apiProvider, API api, FileHostObject fileHostObject, boolean isNewApi) throws APIManagementException, FaultGatewaysException { boolean success = false; boolean isTenantFlowStarted = false; try { String tenantDomain = MultitenantUtils.getTenantDomain(APIUtil.replaceEmailDomainBack(api...
/** * This method save or update the API object * * @param apiProvider * @param api * @param fileHostObject * @param isNewApi * @return true if the API was added successfully * @throws APIManagementException */
This method save or update the API object
saveAPI
{ "repo_name": "nuwand/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIProviderHostObject.java", "license": "apache-2.0", "size": 236142 }
[ "org.jaggeryjs.hostobjects.file.FileHostObject", "org.jaggeryjs.scriptengine.exceptions.ScriptException", "org.wso2.carbon.apimgt.api.APIManagementException", "org.wso2.carbon.apimgt.api.APIProvider", "org.wso2.carbon.apimgt.api.FaultGatewaysException", "org.wso2.carbon.apimgt.impl.utils.APIUtil", "org....
import org.jaggeryjs.hostobjects.file.FileHostObject; import org.jaggeryjs.scriptengine.exceptions.ScriptException; import org.wso2.carbon.apimgt.api.APIManagementException; import org.wso2.carbon.apimgt.api.APIProvider; import org.wso2.carbon.apimgt.api.FaultGatewaysException; import org.wso2.carbon.apimgt.impl.utils....
import org.jaggeryjs.hostobjects.file.*; import org.jaggeryjs.scriptengine.exceptions.*; import org.wso2.carbon.apimgt.api.*; import org.wso2.carbon.apimgt.impl.utils.*; import org.wso2.carbon.context.*; import org.wso2.carbon.utils.multitenancy.*;
[ "org.jaggeryjs.hostobjects", "org.jaggeryjs.scriptengine", "org.wso2.carbon" ]
org.jaggeryjs.hostobjects; org.jaggeryjs.scriptengine; org.wso2.carbon;
2,236,554
boolean labelAndContentOnSameLine(int labelHeight) { return labelHeight <= ScreenSkin.FONT_LABEL.getHeight(); }
boolean labelAndContentOnSameLine(int labelHeight) { return labelHeight <= ScreenSkin.FONT_LABEL.getHeight(); }
/** * Returns true if label and content can be placed on the same line. * If this function returns always false then content will be * always put on a new line in relation to label. * * @param labelHeight The height available for the label * @return true If label and content can be placed...
Returns true if label and content can be placed on the same line. If this function returns always false then content will be always put on a new line in relation to label
labelAndContentOnSameLine
{ "repo_name": "tommythorn/yari", "path": "shared/cacao-related/phoneme_feature/midp/src/highlevelui/lcdlf/lfjava/classes/javax/microedition/lcdui/ItemLFImpl.java", "license": "gpl-2.0", "size": 47456 }
[ "com.sun.midp.chameleon.skins.ScreenSkin" ]
import com.sun.midp.chameleon.skins.ScreenSkin;
import com.sun.midp.chameleon.skins.*;
[ "com.sun.midp" ]
com.sun.midp;
183,695
// [TARGET deleteAcl(String, Entity)] // [VARIABLE "my_unique_bucket"] public boolean deleteBucketAcl(String bucketName) { // [START deleteBucketAcl] boolean deleted = storage.deleteAcl(bucketName, User.ofAllAuthenticatedUsers()); if (deleted) { // the acl entry was deleted } else { //...
boolean function(String bucketName) { boolean deleted = storage.deleteAcl(bucketName, User.ofAllAuthenticatedUsers()); if (deleted) { } else { } return deleted; }
/** * Example of deleting the ACL entry for an entity on a bucket. */
Example of deleting the ACL entry for an entity on a bucket
deleteBucketAcl
{ "repo_name": "shinfan/gcloud-java", "path": "google-cloud-examples/src/main/java/com/google/cloud/examples/storage/snippets/StorageSnippets.java", "license": "apache-2.0", "size": 35762 }
[ "com.google.cloud.storage.Acl" ]
import com.google.cloud.storage.Acl;
import com.google.cloud.storage.*;
[ "com.google.cloud" ]
com.google.cloud;
184,736
private CategoryDataset createDataset() throws Exception { String[] series = null; // create the dataset... DefaultCategoryDataset dataset = new DefaultCategoryDataset(); // Look for a related data file... File data = new File(chartData); // Read the file, ...
CategoryDataset function() throws Exception { String[] series = null; DefaultCategoryDataset dataset = new DefaultCategoryDataset(); File data = new File(chartData); BufferedReader in = new BufferedReader( new FileReader(data) ); StringBuffer buf1 = new StringBuffer(); String line = null; int[] colOrder = null; int row...
/** * Returns a sample dataset. * @return The dataset. */
Returns a sample dataset
createDataset
{ "repo_name": "snavaneethan1/jaffa-framework", "path": "jaffa-components-printing/source/test/junit/org/jaffa/modules/printing/services/ImageDom.java", "license": "gpl-3.0", "size": 5636 }
[ "java.io.BufferedReader", "java.io.File", "java.io.FileReader", "org.jaffa.datatypes.Parser", "org.jfree.data.category.CategoryDataset", "org.jfree.data.category.DefaultCategoryDataset" ]
import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import org.jaffa.datatypes.Parser; import org.jfree.data.category.CategoryDataset; import org.jfree.data.category.DefaultCategoryDataset;
import java.io.*; import org.jaffa.datatypes.*; import org.jfree.data.category.*;
[ "java.io", "org.jaffa.datatypes", "org.jfree.data" ]
java.io; org.jaffa.datatypes; org.jfree.data;
1,525,732
@SuppressWarnings("unchecked") private Map<String, List<TokenMatch>> query(final String query) throws EvaluationException{ LOG.trace("queryFast( " + query + " )"); Map<String, List<TokenMatch>> result = null; if (query != null && 0 < query.length()) { try{ ...
@SuppressWarnings(STR) Map<String, List<TokenMatch>> function(final String query) throws EvaluationException{ LOG.trace(STR + query + STR); Map<String, List<TokenMatch>> result = null; if (query != null && 0 < query.length()) { try{ result = (Map<String, List<TokenMatch>>) CACHE_QUERY.getFromCache(query, REFRESH_PERIOD...
/** * Search solr and find out if the given tokens are company, firstname, lastname etc * @param query */
Search solr and find out if the given tokens are company, firstname, lastname etc
query
{ "repo_name": "michaelsembwever/Sesat", "path": "generic.sesam/query-evaluation/src/main/java/no/sesat/search/query/token/SolrTokenEvaluator.java", "license": "lgpl-3.0", "size": 13441 }
[ "com.opensymphony.oscache.base.NeedsRefreshException", "java.util.Collections", "java.util.HashMap", "java.util.List", "java.util.Map", "org.apache.solr.client.solrj.SolrServerException" ]
import com.opensymphony.oscache.base.NeedsRefreshException; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.solr.client.solrj.SolrServerException;
import com.opensymphony.oscache.base.*; import java.util.*; import org.apache.solr.client.solrj.*;
[ "com.opensymphony.oscache", "java.util", "org.apache.solr" ]
com.opensymphony.oscache; java.util; org.apache.solr;
81,417
@Override public void validate(Object target, Errors errors) { Gene gene = (Gene)target; // Centimorgan, if supplied, must be an integer. if (gene.getCentimorgan() != null) { Integer centimorgan = Utils.tryParseInt(gene.getCentimorgan()); if (centimorgan ...
void function(Object target, Errors errors) { Gene gene = (Gene)target; if (gene.getCentimorgan() != null) { Integer centimorgan = Utils.tryParseInt(gene.getCentimorgan()); if (centimorgan == null) { errors.rejectValue(STR, null, STR); } } if ((gene.getName() != null) && (gene.getName().trim().length() == 0)) { errors....
/** * Required for Validator implementation. * @param target target object to be validated * @param errors errors object */
Required for Validator implementation
validate
{ "repo_name": "InfraFrontier/CuratorialInterfaces", "path": "src/main/java/uk/ac/ebi/emma/validator/GeneValidator.java", "license": "apache-2.0", "size": 3041 }
[ "java.util.Iterator", "java.util.Set", "org.springframework.validation.Errors", "uk.ac.ebi.emma.entity.Gene", "uk.ac.ebi.emma.entity.GeneSynonym", "uk.ac.ebi.emma.util.Utils" ]
import java.util.Iterator; import java.util.Set; import org.springframework.validation.Errors; import uk.ac.ebi.emma.entity.Gene; import uk.ac.ebi.emma.entity.GeneSynonym; import uk.ac.ebi.emma.util.Utils;
import java.util.*; import org.springframework.validation.*; import uk.ac.ebi.emma.entity.*; import uk.ac.ebi.emma.util.*;
[ "java.util", "org.springframework.validation", "uk.ac.ebi" ]
java.util; org.springframework.validation; uk.ac.ebi;
2,854,533
public static Object getGrtClassInstance(String className, Object parent) { try { Class c = Class.forName(Grt.GrtPackagePrefix + className); Constructor con = c.getConstructor(new Class[] { Object.class }); GrtObject obj = (GrtObject) con .newInstance(new Object[] { parent }); return obj...
static Object function(String className, Object parent) { try { Class c = Class.forName(Grt.GrtPackagePrefix + className); Constructor con = c.getConstructor(new Class[] { Object.class }); GrtObject obj = (GrtObject) con .newInstance(new Object[] { parent }); return obj; } catch (Exception e) { return null; } }
/** * Return an GrtObject of the given class * * @param className * name of the class, e.g. db.oracle.table * @param parent * The parent object, if any * @return a new instance of the requested class or null if the class was * not found */
Return an GrtObject of the given class
getGrtClassInstance
{ "repo_name": "cyberbeat/mysql-gui-tools", "path": "common/source/java/com/mysql/grt/Grt.java", "license": "gpl-2.0", "size": 43113 }
[ "java.lang.Class", "java.lang.reflect.Constructor" ]
import java.lang.Class; import java.lang.reflect.Constructor;
import java.lang.*; import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
955,762
public String binaryToString(Object tempBinary) { return DateConverter.binaryToString(tempBinary, DBConstants.TIME_ONLY_FORMAT); }
String function(Object tempBinary) { return DateConverter.binaryToString(tempBinary, DBConstants.TIME_ONLY_FORMAT); }
/** * Convert this field's binary data to a string. * @param tempBinary The physical data convert to a string (must be the raw data class). * @return A display string representing this binary data. */
Convert this field's binary data to a string
binaryToString
{ "repo_name": "jbundle/jbundle", "path": "base/base/src/main/java/org/jbundle/base/field/TimeField.java", "license": "gpl-3.0", "size": 9163 }
[ "org.jbundle.base.field.convert.DateConverter", "org.jbundle.base.model.DBConstants" ]
import org.jbundle.base.field.convert.DateConverter; import org.jbundle.base.model.DBConstants;
import org.jbundle.base.field.convert.*; import org.jbundle.base.model.*;
[ "org.jbundle.base" ]
org.jbundle.base;
2,223,424
void serialize(DataTree dt, Map<Long, Integer> sessions, File name) throws IOException;
void serialize(DataTree dt, Map<Long, Integer> sessions, File name) throws IOException;
/** * persist the datatree and the sessions into a persistence storage * @param dt the datatree to be serialized * @param sessions * @throws IOException */
persist the datatree and the sessions into a persistence storage
serialize
{ "repo_name": "qorio/maestro", "path": "zookeeper/src/java/main/org/apache/zookeeper/server/persistence/SnapShot.java", "license": "apache-2.0", "size": 2193 }
[ "java.io.File", "java.io.IOException", "java.util.Map", "org.apache.zookeeper.server.DataTree" ]
import java.io.File; import java.io.IOException; import java.util.Map; import org.apache.zookeeper.server.DataTree;
import java.io.*; import java.util.*; import org.apache.zookeeper.server.*;
[ "java.io", "java.util", "org.apache.zookeeper" ]
java.io; java.util; org.apache.zookeeper;
1,367,189
@Override public String getText(Object object) { String label = ((ProcedureDeclaration)object).getId(); return label == null || label.length() == 0 ? getString("_UI_ProcedureDeclaration_type") : getString("_UI_ProcedureDeclaration_type") + " " + label; }
String function(Object object) { String label = ((ProcedureDeclaration)object).getId(); return label == null label.length() == 0 ? getString(STR) : getString(STR) + " " + label; }
/** * This returns the label text for the adapted class. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This returns the label text for the adapted class.
getText
{ "repo_name": "mlanoe/x-vhdl", "path": "plugins/net.mlanoe.language.vhdl.edit/src-gen/net/mlanoe/language/vhdl/declaration/provider/ProcedureDeclarationItemProvider.java", "license": "gpl-3.0", "size": 2871 }
[ "net.mlanoe.language.vhdl.declaration.ProcedureDeclaration" ]
import net.mlanoe.language.vhdl.declaration.ProcedureDeclaration;
import net.mlanoe.language.vhdl.declaration.*;
[ "net.mlanoe.language" ]
net.mlanoe.language;
2,572,813
public synchronized float getProgress() throws IOException { if (start == end) { return 0.0f; } else { return Math.min(1.0f, (getFilePosition() - start) / (float)(end - start)); } }
synchronized float function() throws IOException { if (start == end) { return 0.0f; } else { return Math.min(1.0f, (getFilePosition() - start) / (float)(end - start)); } }
/** * Get the progress within the split */
Get the progress within the split
getProgress
{ "repo_name": "GeLiXin/hadoop", "path": "hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/LineRecordReader.java", "license": "apache-2.0", "size": 10262 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
721,769
public List<JRVariable> getVariablesList() { return mainDesignDataset.getVariablesList(); }
List<JRVariable> function() { return mainDesignDataset.getVariablesList(); }
/** * Gets a list of report variables. */
Gets a list of report variables
getVariablesList
{ "repo_name": "aleatorio12/ProVentasConnector", "path": "jasperreports-6.2.1-project/jasperreports-6.2.1/src/net/sf/jasperreports/engine/design/JasperDesign.java", "license": "gpl-3.0", "size": 34070 }
[ "java.util.List", "net.sf.jasperreports.engine.JRVariable" ]
import java.util.List; import net.sf.jasperreports.engine.JRVariable;
import java.util.*; import net.sf.jasperreports.engine.*;
[ "java.util", "net.sf.jasperreports" ]
java.util; net.sf.jasperreports;
449,313
protected void setQueueSearchAlgorithm(QueueSearchAlgorithm<O, T> algorithm) { algorithm.setReverseEnqueueOrder(true); super.setQueueSearchAlgorithm(algorithm); }
void function(QueueSearchAlgorithm<O, T> algorithm) { algorithm.setReverseEnqueueOrder(true); super.setQueueSearchAlgorithm(algorithm); }
/** * Allows different queue search algorithms to replace the default one. This overidden method ensures that it * expands it successor nodes in reverse, which provides a more intuituve left-to-right goal checking order, through * the LIFO statck. * * @param algorithm The search algorithm to us...
Allows different queue search algorithms to replace the default one. This overidden method ensures that it expands it successor nodes in reverse, which provides a more intuituve left-to-right goal checking order, through the LIFO statck
setQueueSearchAlgorithm
{ "repo_name": "rupertlssmith/lojix", "path": "lojix/search/src/main/com/thesett/aima/search/util/uninformed/DepthFirstSearch.java", "license": "apache-2.0", "size": 2934 }
[ "com.thesett.aima.search.spi.QueueSearchAlgorithm" ]
import com.thesett.aima.search.spi.QueueSearchAlgorithm;
import com.thesett.aima.search.spi.*;
[ "com.thesett.aima" ]
com.thesett.aima;
2,751,052
List<IdmIdentityRoleValidRequestDto> findAllValidFrom(ZonedDateTime from);
List<IdmIdentityRoleValidRequestDto> findAllValidFrom(ZonedDateTime from);
/** * Method find all {@link IdmIdentityRoleValidRequestDto} that can be process from {@value from} given in parameter. * @param from * @return */
Method find all <code>IdmIdentityRoleValidRequestDto</code> that can be process from from given in parameter
findAllValidFrom
{ "repo_name": "bcvsolutions/CzechIdMng", "path": "Realization/backend/core/core-api/src/main/java/eu/bcvsolutions/idm/core/api/service/IdmIdentityRoleValidRequestService.java", "license": "mit", "size": 2015 }
[ "eu.bcvsolutions.idm.core.api.dto.IdmIdentityRoleValidRequestDto", "java.time.ZonedDateTime", "java.util.List" ]
import eu.bcvsolutions.idm.core.api.dto.IdmIdentityRoleValidRequestDto; import java.time.ZonedDateTime; import java.util.List;
import eu.bcvsolutions.idm.core.api.dto.*; import java.time.*; import java.util.*;
[ "eu.bcvsolutions.idm", "java.time", "java.util" ]
eu.bcvsolutions.idm; java.time; java.util;
1,055,534
void setBlockingSupplierRegistry(BlockingSupplierRegistry registry);
void setBlockingSupplierRegistry(BlockingSupplierRegistry registry);
/** * Set the registry from where the supplied instance is requested before returned it. * * @param registry the registry from where the supplied instance is requested. */
Set the registry from where the supplied instance is requested before returned it
setBlockingSupplierRegistry
{ "repo_name": "javabits/yar", "path": "yar-guice-osgi/src/main/java/org/javabits/yar/guice/osgi/BlockingSupplierRegistryAware.java", "license": "apache-2.0", "size": 561 }
[ "org.javabits.yar.BlockingSupplierRegistry" ]
import org.javabits.yar.BlockingSupplierRegistry;
import org.javabits.yar.*;
[ "org.javabits.yar" ]
org.javabits.yar;
1,189,324
@Test public void testFailedNodes1() throws Exception { try { final int FAIL_ORDER = 3; nodeSpi.set(createFailedNodeSpi(FAIL_ORDER)); final Ignite ignite0 = startGrid(0); nodeSpi.set(createFailedNodeSpi(FAIL_ORDER)); startGrid(1); ...
void function() throws Exception { try { final int FAIL_ORDER = 3; nodeSpi.set(createFailedNodeSpi(FAIL_ORDER)); final Ignite ignite0 = startGrid(0); nodeSpi.set(createFailedNodeSpi(FAIL_ORDER)); startGrid(1); nodeSpi.set(createFailedNodeSpi(FAIL_ORDER)); Ignite ignite2 = startGrid(2); assertEquals(2, ignite2.cluster()...
/** * Coordinator is added in failed list during node start. * * @throws Exception If failed. */
Coordinator is added in failed list during node start
testFailedNodes1
{ "repo_name": "ascherbakoff/ignite", "path": "modules/core/src/test/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySelfTest.java", "license": "apache-2.0", "size": 86464 }
[ "org.apache.ignite.Ignite" ]
import org.apache.ignite.Ignite;
import org.apache.ignite.*;
[ "org.apache.ignite" ]
org.apache.ignite;
2,034,405
@Test public void testPartialRamMapScaling() throws Exception { // Explicit set resources for container long maxContainerRam = 10L * Constants.GB; // Explicit set component ram map long boltRam = 4L * Constants.GB; topologyConfig.setContainerMaxRamHint(maxContainerRam); topologyConfig.setCo...
void function() throws Exception { long maxContainerRam = 10L * Constants.GB; long boltRam = 4L * Constants.GB; topologyConfig.setContainerMaxRamHint(maxContainerRam); topologyConfig.setComponentRam(BOLT_NAME, boltRam); TopologyAPI.Topology topologyExplicitRamMap = getTopology(spoutParallelism, boltParallelism, topolog...
/** * Test the scenario ram map config is partially set and scaling is requested */
Test the scenario ram map config is partially set and scaling is requested
testPartialRamMapScaling
{ "repo_name": "wangli1426/heron", "path": "heron/packing/tests/java/com/twitter/heron/packing/binpacking/FirstFitDecreasingPackingTest.java", "license": "apache-2.0", "size": 29785 }
[ "com.twitter.heron.api.generated.TopologyAPI", "com.twitter.heron.packing.AssertPacking", "com.twitter.heron.spi.common.Constants", "com.twitter.heron.spi.packing.PackingPlan", "java.util.HashMap", "java.util.Map", "org.junit.Assert" ]
import com.twitter.heron.api.generated.TopologyAPI; import com.twitter.heron.packing.AssertPacking; import com.twitter.heron.spi.common.Constants; import com.twitter.heron.spi.packing.PackingPlan; import java.util.HashMap; import java.util.Map; import org.junit.Assert;
import com.twitter.heron.api.generated.*; import com.twitter.heron.packing.*; import com.twitter.heron.spi.common.*; import com.twitter.heron.spi.packing.*; import java.util.*; import org.junit.*;
[ "com.twitter.heron", "java.util", "org.junit" ]
com.twitter.heron; java.util; org.junit;
1,424,027
Set<Apo_TypedP<?>> getPropertyOptions();
Set<Apo_TypedP<?>> getPropertyOptions();
/** * Returns all property options. * @return all property options, empty array if none added */
Returns all property options
getPropertyOptions
{ "repo_name": "vdmeer/skb-java-interfaces", "path": "src/main/java/de/vandermeer/skb/interfaces/application/IsApplication.java", "license": "apache-2.0", "size": 14161 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
621,882
public static Collection<Object[]> getKieBaseConfigurations() { final List<EngineTestConfiguration> engineTestConfigurations = Arrays.stream(EngineTestConfiguration.values()) .filter(config -> (TEST_WITH_ALPHA_NETWORK || config != EngineTestConfiguration.ALPHA_NETWORK_COMPILER_TRUE) ...
static Collection<Object[]> function() { final List<EngineTestConfiguration> engineTestConfigurations = Arrays.stream(EngineTestConfiguration.values()) .filter(config -> (TEST_WITH_ALPHA_NETWORK config != EngineTestConfiguration.ALPHA_NETWORK_COMPILER_TRUE) && config != EngineTestConfiguration.EQUALITY_MODE) .collect(C...
/** * Prepares collection of KieBaseTestConfiguration. * @return Collection of KieBaseTestConfiguration for parameterized tests. */
Prepares collection of KieBaseTestConfiguration
getKieBaseConfigurations
{ "repo_name": "jomarko/drools", "path": "drools-test-coverage/test-suite/src/test/java/org/drools/testcoverage/common/util/TestParametersUtil.java", "license": "apache-2.0", "size": 16422 }
[ "java.util.Arrays", "java.util.Collection", "java.util.List", "java.util.stream.Collectors" ]
import java.util.Arrays; import java.util.Collection; import java.util.List; import java.util.stream.Collectors;
import java.util.*; import java.util.stream.*;
[ "java.util" ]
java.util;
989,659
public FeatureCursor queryFeatures(boolean distinct, BoundingBox boundingBox, Projection projection, String where) { return queryFeatures(distinct, boundingBox, projection, where, null); }
FeatureCursor function(boolean distinct, BoundingBox boundingBox, Projection projection, String where) { return queryFeatures(distinct, boundingBox, projection, where, null); }
/** * Query for Features within the bounding box in the provided projection * * @param distinct distinct row * @param boundingBox bounding box * @param projection projection of the provided bounding box * @param where where clause * @return feature cursor * @since 4.0.0...
Query for Features within the bounding box in the provided projection
queryFeatures
{ "repo_name": "ngageoint/geopackage-android", "path": "geopackage-sdk/src/main/java/mil/nga/geopackage/extension/nga/index/FeatureTableIndex.java", "license": "mit", "size": 276322 }
[ "mil.nga.geopackage.BoundingBox", "mil.nga.geopackage.features.user.FeatureCursor", "mil.nga.proj.Projection" ]
import mil.nga.geopackage.BoundingBox; import mil.nga.geopackage.features.user.FeatureCursor; import mil.nga.proj.Projection;
import mil.nga.geopackage.*; import mil.nga.geopackage.features.user.*; import mil.nga.proj.*;
[ "mil.nga.geopackage", "mil.nga.proj" ]
mil.nga.geopackage; mil.nga.proj;
347,075
@Test public void testWriteMBeanInfo() { try { int arraySize = 5; MBeanAttributeInfo mBeanAttrInfo = null; mBeanAttrInfo = new MBeanAttributeInfo( TEST_MBEAN_ATTR_INFO_NAME, TEST_MBEAN_ATTR_INFO_TYPE, ...
void function() { try { int arraySize = 5; MBeanAttributeInfo mBeanAttrInfo = null; mBeanAttrInfo = new MBeanAttributeInfo( TEST_MBEAN_ATTR_INFO_NAME, TEST_MBEAN_ATTR_INFO_TYPE, TEST_MBEAN_ATTR_INFO_DESCRIPTION, TEST_MBEAN_ATTR_INFO_READABLE, TEST_MBEAN_ATTR_INFO_WRITABLE, TEST_MBEAN_ATTR_INFO_ISIS, createDescriptor())...
/** * Test method for {@link com.ibm.ws.jmx.connector.converter.JSONConverter#writeMBeanInfo(java.io.OutputStream, com.ibm.ws.jmx.connector.datatypes.MBeanInfoWrapper)}. */
Test method for <code>com.ibm.ws.jmx.connector.converter.JSONConverter#writeMBeanInfo(java.io.OutputStream, com.ibm.ws.jmx.connector.datatypes.MBeanInfoWrapper)</code>
testWriteMBeanInfo
{ "repo_name": "kgibm/open-liberty", "path": "dev/com.ibm.ws.jmx.connector.client.rest/test/com/ibm/ws/jmx/connector/converter/JSONConverterTest.java", "license": "epl-1.0", "size": 140666 }
[ "com.ibm.ws.jmx.connector.datatypes.MBeanInfoWrapper", "java.io.ByteArrayOutputStream", "java.util.HashMap", "javax.management.MBeanAttributeInfo", "javax.management.MBeanConstructorInfo", "javax.management.MBeanInfo", "javax.management.MBeanNotificationInfo", "javax.management.MBeanOperationInfo", ...
import com.ibm.ws.jmx.connector.datatypes.MBeanInfoWrapper; import java.io.ByteArrayOutputStream; import java.util.HashMap; import javax.management.MBeanAttributeInfo; import javax.management.MBeanConstructorInfo; import javax.management.MBeanInfo; import javax.management.MBeanNotificationInfo; import javax.management....
import com.ibm.ws.jmx.connector.datatypes.*; import java.io.*; import java.util.*; import javax.management.*; import org.junit.*;
[ "com.ibm.ws", "java.io", "java.util", "javax.management", "org.junit" ]
com.ibm.ws; java.io; java.util; javax.management; org.junit;
1,650,709
private long selectGeneByChromsomeCriteria(int k) { List<Gene> genes = new ArrayList<Gene>(); StringBuffer sbSqlClause = new StringBuffer("_val like '"); sbSqlClause.append("%"); sbSqlClause.append(config.getChromosomeCriteria().getCriteria().get(k)); sbSqlClause.append("%'"...
long function(int k) { List<Gene> genes = new ArrayList<Gene>(); StringBuffer sbSqlClause = new StringBuffer(STR); sbSqlClause.append("%"); sbSqlClause.append(config.getChromosomeCriteria().getCriteria().get(k)); sbSqlClause.append("%'"); IgniteCache<Long, Gene> cache = ignite.cache(GAGridConstants.GENE_CACHE); SqlQuer...
/** * method assumes ChromosomeCriteria is set. * * @param k Gene index in Chromosome. * @return Primary key of Gene */
method assumes ChromosomeCriteria is set
selectGeneByChromsomeCriteria
{ "repo_name": "irudyak/ignite", "path": "modules/ml/src/main/java/org/apache/ignite/ml/genetic/MutateTask.java", "license": "apache-2.0", "size": 5954 }
[ "java.util.ArrayList", "java.util.List", "javax.cache.Cache", "org.apache.ignite.IgniteCache", "org.apache.ignite.cache.query.QueryCursor", "org.apache.ignite.cache.query.SqlQuery", "org.apache.ignite.ml.genetic.parameter.GAGridConstants" ]
import java.util.ArrayList; import java.util.List; import javax.cache.Cache; import org.apache.ignite.IgniteCache; import org.apache.ignite.cache.query.QueryCursor; import org.apache.ignite.cache.query.SqlQuery; import org.apache.ignite.ml.genetic.parameter.GAGridConstants;
import java.util.*; import javax.cache.*; import org.apache.ignite.*; import org.apache.ignite.cache.query.*; import org.apache.ignite.ml.genetic.parameter.*;
[ "java.util", "javax.cache", "org.apache.ignite" ]
java.util; javax.cache; org.apache.ignite;
1,248,937
public T put(final Class<?> key, final T value) { ConcurrentHashMap<String, T> container = getClassLoaderCache(key.getClassLoader(), true); return container.put(key(key), value); }
T function(final Class<?> key, final T value) { ConcurrentHashMap<String, T> container = getClassLoaderCache(key.getClassLoader(), true); return container.put(key(key), value); }
/** * Puts value into cache. * * @param key the class that will be used as the value's key * @param value the value that should be stored in cache * @return value previously stored in cache for this key, or {@code null} if none */
Puts value into cache
put
{ "repo_name": "danjee/hedgehog", "path": "hedgehog-core/src/main/java/ro/fortsoft/hedgehog/ClassMetaCache.java", "license": "apache-2.0", "size": 3504 }
[ "java.util.concurrent.ConcurrentHashMap" ]
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,650,165
public static int getDistance(Rect source, Rect dest, int direction) { // TODO: implement this int sX, sY; // source x, y int dX, dY; // dest x, y switch (direction) { case View.FOCUS_RIGHT: sX = source.right; sY = source.top + source.height() / 2; dX = dest.left; dY = dest.top + dest.height(...
static int function(Rect source, Rect dest, int direction) { int sX, sY; int dX, dY; switch (direction) { case View.FOCUS_RIGHT: sX = source.right; sY = source.top + source.height() / 2; dX = dest.left; dY = dest.top + dest.height() / 2; break; case View.FOCUS_DOWN: sX = source.left + source.width() / 2; sY = source.bo...
/** * What is the distance between the source and destination rectangles given * the direction of focus navigation between them? The direction basically * helps figure out more quickly what is self evident by the relationship * between the rects... * * @param source * the source rectangle * ...
What is the distance between the source and destination rectangles given the direction of focus navigation between them? The direction basically helps figure out more quickly what is self evident by the relationship between the rects..
getDistance
{ "repo_name": "junchenChow/exciting-app", "path": "mohosupportlib/src/main/java/it/sephiroth/android/library/widget/AbsHListView.java", "license": "apache-2.0", "size": 177577 }
[ "android.graphics.Rect", "android.view.View" ]
import android.graphics.Rect; import android.view.View;
import android.graphics.*; import android.view.*;
[ "android.graphics", "android.view" ]
android.graphics; android.view;
689,810
public int removeFromMap(GPMapView mapView, String id) { Layers layers = mapView.map().layers(); int index = 0; for (Layer layer : layers) { if (layer instanceof IGpLayer) { IGpLayer gpLayer = (IGpLayer) layer; if (gpLayer.getId().equals(id)) { ...
int function(GPMapView mapView, String id) { Layers layers = mapView.map().layers(); int index = 0; for (Layer layer : layers) { if (layer instanceof IGpLayer) { IGpLayer gpLayer = (IGpLayer) layer; if (gpLayer.getId().equals(id)) { layers.remove(index); return index; } } index++; } return -1; }
/** * Remove the current layer from the map view. * * @return the position the layer had or -1 if the layer could not be found. */
Remove the current layer from the map view
removeFromMap
{ "repo_name": "geopaparazzi/geopaparazzi", "path": "geopaparazzi_map/src/main/java/eu/geopaparazzi/map/layers/LayerManager.java", "license": "gpl-3.0", "size": 36901 }
[ "eu.geopaparazzi.map.GPMapView", "eu.geopaparazzi.map.layers.interfaces.IGpLayer", "org.oscim.layers.Layer", "org.oscim.map.Layers" ]
import eu.geopaparazzi.map.GPMapView; import eu.geopaparazzi.map.layers.interfaces.IGpLayer; import org.oscim.layers.Layer; import org.oscim.map.Layers;
import eu.geopaparazzi.map.*; import eu.geopaparazzi.map.layers.interfaces.*; import org.oscim.layers.*; import org.oscim.map.*;
[ "eu.geopaparazzi.map", "org.oscim.layers", "org.oscim.map" ]
eu.geopaparazzi.map; org.oscim.layers; org.oscim.map;
1,495,316
public int size(PersistentStore store);
int function(PersistentStore store);
/** * Returns the node count. */
Returns the node count
size
{ "repo_name": "malin1993ml/h-store", "path": "src/hsqldb19b3/org/hsqldb/index/Index.java", "license": "gpl-3.0", "size": 9862 }
[ "org.hsqldb.persist.PersistentStore" ]
import org.hsqldb.persist.PersistentStore;
import org.hsqldb.persist.*;
[ "org.hsqldb.persist" ]
org.hsqldb.persist;
705,660
private RealCoords getDataCoords(final Display<?> d, final int x, final int y) { if (!(d instanceof ImageDisplay)) return null; final ImageDisplay imageDisplay = (ImageDisplay) d; final ImageCanvas canvas = imageDisplay.getCanvas(); return canvas.panelToDataCoords(new IntCoords(x, y)); }
RealCoords function(final Display<?> d, final int x, final int y) { if (!(d instanceof ImageDisplay)) return null; final ImageDisplay imageDisplay = (ImageDisplay) d; final ImageCanvas canvas = imageDisplay.getCanvas(); return canvas.panelToDataCoords(new IntCoords(x, y)); }
/** * Gets the coordinates in <em>data</em> space for the given (x, y) pixel * coordinates. */
Gets the coordinates in data space for the given (x, y) pixel coordinates
getDataCoords
{ "repo_name": "imagej/imagej-ui-swing", "path": "src/main/java/net/imagej/ui/swing/overlay/AbstractJHotDrawAdapter.java", "license": "bsd-2-clause", "size": 8391 }
[ "net.imagej.display.ImageCanvas", "net.imagej.display.ImageDisplay", "org.scijava.display.Display", "org.scijava.util.IntCoords", "org.scijava.util.RealCoords" ]
import net.imagej.display.ImageCanvas; import net.imagej.display.ImageDisplay; import org.scijava.display.Display; import org.scijava.util.IntCoords; import org.scijava.util.RealCoords;
import net.imagej.display.*; import org.scijava.display.*; import org.scijava.util.*;
[ "net.imagej.display", "org.scijava.display", "org.scijava.util" ]
net.imagej.display; org.scijava.display; org.scijava.util;
160,425
public boolean hasAllFactors( LoptJoinTree joinTree, BitSet factorsNeeded) { return BitSets.contains(BitSets.of(joinTree.getTreeOrder()), factorsNeeded); }
boolean function( LoptJoinTree joinTree, BitSet factorsNeeded) { return BitSets.contains(BitSets.of(joinTree.getTreeOrder()), factorsNeeded); }
/** * Returns true if a join tree contains all factors required * * @param joinTree join tree to be examined * @param factorsNeeded bitmap of factors required * * @return true if join tree contains all required factors */
Returns true if a join tree contains all factors required
hasAllFactors
{ "repo_name": "minji-kim/calcite", "path": "core/src/main/java/org/apache/calcite/rel/rules/LoptMultiJoin.java", "license": "apache-2.0", "size": 27444 }
[ "java.util.BitSet", "org.apache.calcite.util.BitSets" ]
import java.util.BitSet; import org.apache.calcite.util.BitSets;
import java.util.*; import org.apache.calcite.util.*;
[ "java.util", "org.apache.calcite" ]
java.util; org.apache.calcite;
1,523,827
public static String getTextFileContent(String vfsFilename, String charSetName) throws IOException { InputStream inputStream = getInputStream(vfsFilename); InputStreamReader reader = new InputStreamReader(inputStream, charSetName); int c; StringBuffer stringBuffer = new Stri...
static String function(String vfsFilename, String charSetName) throws IOException { InputStream inputStream = getInputStream(vfsFilename); InputStreamReader reader = new InputStreamReader(inputStream, charSetName); int c; StringBuffer stringBuffer = new StringBuffer(); while ( (c=reader.read())!=-1) stringBuffer.append...
/** * Read a text file (like an XML document). WARNING DO NOT USE FOR DATA FILES. * * @param vfsFilename the filename or URL to read from * @param charSetName the character set of the string (UTF-8, ISO8859-1, etc) * @return The content of the file as a String * @throws IOException...
Read a text file (like an XML document). WARNING DO NOT USE FOR DATA FILES
getTextFileContent
{ "repo_name": "ontometrics/ontokettle", "path": "src/be/ibridge/kettle/core/vfs/KettleVFS.java", "license": "lgpl-2.1", "size": 5754 }
[ "java.io.IOException", "java.io.InputStream", "java.io.InputStreamReader" ]
import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader;
import java.io.*;
[ "java.io" ]
java.io;
1,409,498
public static HTableDescriptor cloneTableSchema(final HTableDescriptor snapshotTableDescriptor, final byte[] tableName) throws IOException { HTableDescriptor htd = new HTableDescriptor(tableName); for (HColumnDescriptor hcd: snapshotTableDescriptor.getColumnFamilies()) { htd.addFamily(hcd); } ...
static HTableDescriptor function(final HTableDescriptor snapshotTableDescriptor, final byte[] tableName) throws IOException { HTableDescriptor htd = new HTableDescriptor(tableName); for (HColumnDescriptor hcd: snapshotTableDescriptor.getColumnFamilies()) { htd.addFamily(hcd); } return htd; }
/** * Create a new table descriptor cloning the snapshot table schema. * * @param snapshotTableDescriptor * @param tableName * @return cloned table descriptor * @throws IOException */
Create a new table descriptor cloning the snapshot table schema
cloneTableSchema
{ "repo_name": "algarecu/hbase-0.94.8-qod", "path": "target/hbase-0.94.8/hbase-0.94.8/src/main/java/org/apache/hadoop/hbase/snapshot/RestoreSnapshotHelper.java", "license": "apache-2.0", "size": 23216 }
[ "java.io.IOException", "org.apache.hadoop.hbase.HColumnDescriptor", "org.apache.hadoop.hbase.HTableDescriptor" ]
import java.io.IOException; import org.apache.hadoop.hbase.HColumnDescriptor; import org.apache.hadoop.hbase.HTableDescriptor;
import java.io.*; import org.apache.hadoop.hbase.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
203,417
@SuppressWarnings("unchecked") // yaml.load API returns raw Map public static Map<String, Object> loadStream(InputStream inputStream) { LOG.fine("Reading config stream"); Yaml yaml = new Yaml(); Map<Object, Object> propsYaml = (Map<Object, Object>) yaml.load(inputStream); LOG.fine("Successfully rea...
@SuppressWarnings(STR) static Map<String, Object> function(InputStream inputStream) { LOG.fine(STR); Yaml yaml = new Yaml(); Map<Object, Object> propsYaml = (Map<Object, Object>) yaml.load(inputStream); LOG.fine(STR); Map<String, Object> typedMap = new HashMap<>(); for (Object key: propsYaml.keySet()) { typedMap.put(ke...
/** * Load config from the given YAML stream * * @param inputStream the name of YAML stream to read * * @return Map, contains the key value pairs of config */
Load config from the given YAML stream
loadStream
{ "repo_name": "mycFelix/heron", "path": "heron/common/src/java/org/apache/heron/common/config/ConfigReader.java", "license": "apache-2.0", "size": 3653 }
[ "java.io.InputStream", "java.util.HashMap", "java.util.Map", "org.yaml.snakeyaml.Yaml" ]
import java.io.InputStream; import java.util.HashMap; import java.util.Map; import org.yaml.snakeyaml.Yaml;
import java.io.*; import java.util.*; import org.yaml.snakeyaml.*;
[ "java.io", "java.util", "org.yaml.snakeyaml" ]
java.io; java.util; org.yaml.snakeyaml;
1,371,144
LdapSyntaxRegistry getLdapSyntaxRegistry();
LdapSyntaxRegistry getLdapSyntaxRegistry();
/** * Get an immutable reference on the LdapSyntax registry * * @return A reference to the LdapSyntax registry. */
Get an immutable reference on the LdapSyntax registry
getLdapSyntaxRegistry
{ "repo_name": "darranl/directory-shared", "path": "ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/SchemaManager.java", "license": "apache-2.0", "size": 27568 }
[ "org.apache.directory.api.ldap.model.schema.registries.LdapSyntaxRegistry" ]
import org.apache.directory.api.ldap.model.schema.registries.LdapSyntaxRegistry;
import org.apache.directory.api.ldap.model.schema.registries.*;
[ "org.apache.directory" ]
org.apache.directory;
731,909
@Override protected int getContentBytesLength() { return Utf8Helper.getBytesLength(urlString) + Utf8Helper.getBytesLength(targetString) + 2; }
int function() { return Utf8Helper.getBytesLength(urlString) + Utf8Helper.getBytesLength(targetString) + 2; }
/** * Gets the length of action converted to bytes * * @return Length */
Gets the length of action converted to bytes
getContentBytesLength
{ "repo_name": "Djamana/jpexs-decompiler", "path": "libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/swf3/ActionGetURL.java", "license": "gpl-3.0", "size": 4878 }
[ "com.jpexs.helpers.Helper", "com.jpexs.helpers.utf8.Utf8Helper" ]
import com.jpexs.helpers.Helper; import com.jpexs.helpers.utf8.Utf8Helper;
import com.jpexs.helpers.*; import com.jpexs.helpers.utf8.*;
[ "com.jpexs.helpers" ]
com.jpexs.helpers;
1,147,180
public Observable<ServiceResponse<Page<VirtualNetworkInner>>> listSinglePageAsync() { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); }
Observable<ServiceResponse<Page<VirtualNetworkInner>>> function() { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException(STR); }
/** * Gets all virtual networks in a subscription. * * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList&lt;VirtualNetworkInner&gt; object wrapped in {@link ServiceResponse} if successful. */
Gets all virtual networks in a subscription
listSinglePageAsync
{ "repo_name": "navalev/azure-sdk-for-java", "path": "sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/VirtualNetworksInner.java", "license": "mit", "size": 98691 }
[ "com.microsoft.azure.Page", "com.microsoft.rest.ServiceResponse" ]
import com.microsoft.azure.Page; import com.microsoft.rest.ServiceResponse;
import com.microsoft.azure.*; import com.microsoft.rest.*;
[ "com.microsoft.azure", "com.microsoft.rest" ]
com.microsoft.azure; com.microsoft.rest;
368,097
private void setLastFeature(final AbstractNewFeature lastFeature) { if (lastFeature == null) { mniSearchShowLastFeature1.setIcon(null); mniSearchShowLastFeature1.setEnabled(false); mniSearchRedo1.setIcon(null); mniSearchRedo1.setEnabled(false); mni...
void function(final AbstractNewFeature lastFeature) { if (lastFeature == null) { mniSearchShowLastFeature1.setIcon(null); mniSearchShowLastFeature1.setEnabled(false); mniSearchRedo1.setIcon(null); mniSearchRedo1.setEnabled(false); mniSearchBuffer1.setEnabled(false); } else { switch (lastFeature.getGeometryType()) { cas...
/** * DOCUMENT ME! * * @param lastFeature DOCUMENT ME! */
DOCUMENT ME
setLastFeature
{ "repo_name": "cismet/cismap-plugin", "path": "src/main/java/de/cismet/cismap/navigatorplugin/GeoSearchMenu.java", "license": "lgpl-3.0", "size": 14407 }
[ "de.cismet.cismap.commons.features.AbstractNewFeature" ]
import de.cismet.cismap.commons.features.AbstractNewFeature;
import de.cismet.cismap.commons.features.*;
[ "de.cismet.cismap" ]
de.cismet.cismap;
2,460,032
private void mergeGlobalConfigToTaskConfig(List<TaskConfig> tasks, GlobalConfig global) { for (TaskConfig taskConfig : tasks) { if (taskConfig.getOnResult().isEmpty()) { taskConfig.setOnResult(global.getOnResult()); } taskConfig.getTaskParams().put(Monitor...
void function(List<TaskConfig> tasks, GlobalConfig global) { for (TaskConfig taskConfig : tasks) { if (taskConfig.getOnResult().isEmpty()) { taskConfig.setOnResult(global.getOnResult()); } taskConfig.getTaskParams().put(MonitoringConstants.DEFAULT_TENANT_KEY, global.getTenant()); } }
/** * Merge following global parameters into TaskConfig * - onResult * - tenantConfig * */
Merge following global parameters into TaskConfig - onResult - tenantConfig
mergeGlobalConfigToTaskConfig
{ "repo_name": "kasunbg/carbon-deployment-monitor", "path": "deployment-monitor-core/src/main/java/org/wso2/deployment/monitor/core/Launcher.java", "license": "apache-2.0", "size": 7441 }
[ "java.util.List", "org.wso2.deployment.monitor.core.model.GlobalConfig", "org.wso2.deployment.monitor.core.model.TaskConfig" ]
import java.util.List; import org.wso2.deployment.monitor.core.model.GlobalConfig; import org.wso2.deployment.monitor.core.model.TaskConfig;
import java.util.*; import org.wso2.deployment.monitor.core.model.*;
[ "java.util", "org.wso2.deployment" ]
java.util; org.wso2.deployment;
2,901,028
synchronized public long startForwarding(LearnerHandler handler, long lastSeenZxid) { // Queue up any outstanding requests enabling the receipt of // new requests if (lastProposed > lastSeenZxid) { for (Proposal p : toBeApplied) { if (p.packet.getZxid(...
synchronized long function(LearnerHandler handler, long lastSeenZxid) { if (lastProposed > lastSeenZxid) { for (Proposal p : toBeApplied) { if (p.packet.getZxid() <= lastSeenZxid) { continue; } handler.queuePacket(p.packet); QuorumPacket qp = new QuorumPacket(Leader.COMMIT, p.packet .getZxid(), null, null); handler.que...
/** * lets the leader know that a follower is capable of following and is done * syncing * * @param handler handler of the follower * @return last proposed zxid * @throws InterruptedException */
lets the leader know that a follower is capable of following and is done syncing
startForwarding
{ "repo_name": "ralgond/paxoskeeper", "path": "src/java/main/org/apache/zookeeper/server/quorum/Leader.java", "license": "apache-2.0", "size": 52899 }
[ "java.util.ArrayList", "java.util.Collections", "java.util.List", "org.apache.zookeeper.server.quorum.QuorumPeer" ]
import java.util.ArrayList; import java.util.Collections; import java.util.List; import org.apache.zookeeper.server.quorum.QuorumPeer;
import java.util.*; import org.apache.zookeeper.server.quorum.*;
[ "java.util", "org.apache.zookeeper" ]
java.util; org.apache.zookeeper;
2,569,259
private void assertPhase(@Nullable ReplicationTask task, String phase) { assertPhase(task, equalTo(phase)); }
void function(@Nullable ReplicationTask task, String phase) { assertPhase(task, equalTo(phase)); }
/** * If the task is non-null this asserts that the phrase matches. */
If the task is non-null this asserts that the phrase matches
assertPhase
{ "repo_name": "gmarz/elasticsearch", "path": "core/src/test/java/org/elasticsearch/action/support/replication/TransportReplicationActionTests.java", "license": "apache-2.0", "size": 56085 }
[ "org.elasticsearch.common.Nullable", "org.hamcrest.Matchers" ]
import org.elasticsearch.common.Nullable; import org.hamcrest.Matchers;
import org.elasticsearch.common.*; import org.hamcrest.*;
[ "org.elasticsearch.common", "org.hamcrest" ]
org.elasticsearch.common; org.hamcrest;
2,194,979
public static int getDaysDistance(Date date1, Date date2) { double reduce = 1000 * 60 * 60 * 24; long distMili = Math.abs(Math.round(Math.floor(date1.getTime() / reduce) - Math.floor(date2.getTime() / reduce))); return (int) Math.round(distMili); }
static int function(Date date1, Date date2) { double reduce = 1000 * 60 * 60 * 24; long distMili = Math.abs(Math.round(Math.floor(date1.getTime() / reduce) - Math.floor(date2.getTime() / reduce))); return (int) Math.round(distMili); }
/** * get the distance between 2 dates in day * * @param date1 * @param date2 * @return */
get the distance between 2 dates in day
getDaysDistance
{ "repo_name": "Javlo/javlo", "path": "src/main/java/org/javlo/helper/TimeHelper.java", "license": "lgpl-3.0", "size": 11719 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,812,486
public void evaluateExpressionInBackground(ScriptingExpressionType expression, Task task, OperationResult parentResult) throws SchemaException { OperationResult result = parentResult.createSubresult(DOT_CLASS + "evaluateExpressionInBackground"); if (!task.isTransient()) { throw new Illeg...
void function(ScriptingExpressionType expression, Task task, OperationResult parentResult) throws SchemaException { OperationResult result = parentResult.createSubresult(DOT_CLASS + STR); if (!task.isTransient()) { throw new IllegalStateException(STR); } if (task.getHandlerUri() != null) { throw new IllegalStateExcepti...
/** * Asynchronously executes any scripting expression. * * @param expression Expression to be executed. * @param task Task in context of which the script should execute. The task should be "clean", i.e. * (1) transient, (2) without any handler. This method puts the task into backgr...
Asynchronously executes any scripting expression
evaluateExpressionInBackground
{ "repo_name": "rpudil/midpoint", "path": "model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/scripting/ScriptingExpressionEvaluator.java", "license": "apache-2.0", "size": 13418 }
[ "com.evolveum.midpoint.schema.constants.SchemaConstants", "com.evolveum.midpoint.schema.result.OperationResult", "com.evolveum.midpoint.task.api.Task", "com.evolveum.midpoint.util.exception.SchemaException", "com.evolveum.midpoint.xml.ns._public.model.scripting_3.ExecuteScriptType", "com.evolveum.midpoint...
import com.evolveum.midpoint.schema.constants.SchemaConstants; import com.evolveum.midpoint.schema.result.OperationResult; import com.evolveum.midpoint.task.api.Task; import com.evolveum.midpoint.util.exception.SchemaException; import com.evolveum.midpoint.xml.ns._public.model.scripting_3.ExecuteScriptType; import com....
import com.evolveum.midpoint.schema.constants.*; import com.evolveum.midpoint.schema.result.*; import com.evolveum.midpoint.task.api.*; import com.evolveum.midpoint.util.exception.*; import com.evolveum.midpoint.xml.ns._public.model.scripting_3.*;
[ "com.evolveum.midpoint" ]
com.evolveum.midpoint;
1,752,943
@Test public void testFileAppendersLevelFilterAndThresholdFilter() { testFactory.prepareLogDir("target/logs/rotate"); Logger logger = testFactory.newRootLogger("classpath:io/bootique/logback/test-file-appenders-filter-level-threshold.yml"); logger.debug("debug-log-to-file"); log...
void function() { testFactory.prepareLogDir(STR); Logger logger = testFactory.newRootLogger(STR); logger.debug(STR); logger.info(STR); logger.warn(STR); testFactory.stop(); Map<String, String[]> thresholdLogContents = testFactory.loglines(STR, STR); assertEquals(1, thresholdLogContents.size()); String[] lines = thresho...
/** * Checks file appenders with LevelFilter and ThresholdFilter * Each appender with one filter */
Checks file appenders with LevelFilter and ThresholdFilter Each appender with one filter
testFileAppendersLevelFilterAndThresholdFilter
{ "repo_name": "nhl/bootique-logback", "path": "bootique-logback/src/test/java/io/bootique/logback/LogbackFiltersIT.java", "license": "apache-2.0", "size": 5321 }
[ "ch.qos.logback.classic.Logger", "java.util.Arrays", "java.util.Map", "org.junit.Assert" ]
import ch.qos.logback.classic.Logger; import java.util.Arrays; import java.util.Map; import org.junit.Assert;
import ch.qos.logback.classic.*; import java.util.*; import org.junit.*;
[ "ch.qos.logback", "java.util", "org.junit" ]
ch.qos.logback; java.util; org.junit;
2,442,242
public void handleEntityVelocity(S12PacketEntityVelocity packetIn) { PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController); Entity entity = this.clientWorldController.getEntityByID(packetIn.getEntityID()); if (entity != null) { entity.setVelocit...
void function(S12PacketEntityVelocity packetIn) { PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController); Entity entity = this.clientWorldController.getEntityByID(packetIn.getEntityID()); if (entity != null) { entity.setVelocity((double)packetIn.getMotionX() / 8000.0D, (double)packetIn.getMotionY()...
/** * Sets the velocity of the specified entity to the specified value */
Sets the velocity of the specified entity to the specified value
handleEntityVelocity
{ "repo_name": "tomtomtom09/CampCraft", "path": "build/tmp/recompileMc/sources/net/minecraft/client/network/NetHandlerPlayClient.java", "license": "gpl-3.0", "size": 95487 }
[ "net.minecraft.entity.Entity", "net.minecraft.network.PacketThreadUtil", "net.minecraft.network.play.server.S12PacketEntityVelocity" ]
import net.minecraft.entity.Entity; import net.minecraft.network.PacketThreadUtil; import net.minecraft.network.play.server.S12PacketEntityVelocity;
import net.minecraft.entity.*; import net.minecraft.network.*; import net.minecraft.network.play.server.*;
[ "net.minecraft.entity", "net.minecraft.network" ]
net.minecraft.entity; net.minecraft.network;
2,106,785
@ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<NetworkInterfaceIpConfigurationInner> list( String resourceGroupName, String networkInterfaceName, Context context);
@ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<NetworkInterfaceIpConfigurationInner> list( String resourceGroupName, String networkInterfaceName, Context context);
/** * Get all ip configurations in a network interface. * * @param resourceGroupName The name of the resource group. * @param networkInterfaceName The name of the network interface. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if ...
Get all ip configurations in a network interface
list
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanagerhybrid/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/NetworkInterfaceIpConfigurationsClient.java", "license": "mit", "size": 6641 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedIterable", "com.azure.core.util.Context", "com.azure.resourcemanager.network.fluent.models.NetworkInterfaceIpConfigurationInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; import com.azure.resourcemanager.network.fluent.models.NetworkInterfaceIpConfigurationInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.network.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
799,031
public static String operatorToString(Operator operator) { String string = ""; switch (operator) { case EQUALS: string = "="; break; case NOT_EQUALS: string = "!="; break; case GREATER_THAN: string = ">"; ...
static String function(Operator operator) { String string = STR=STR!=STR>STR>=STR<STR<=STR><"; break; default: string = operator.name(); break; } return string; }
/** * Convert the {@code operator} to a string representation. * * @param operator * @return the operator string */
Convert the operator to a string representation
operatorToString
{ "repo_name": "kylycht/concourse", "path": "concourse-driver-java/src/main/java/com/cinchapi/concourse/util/Convert.java", "license": "apache-2.0", "size": 33574 }
[ "com.cinchapi.concourse.thrift.Operator" ]
import com.cinchapi.concourse.thrift.Operator;
import com.cinchapi.concourse.thrift.*;
[ "com.cinchapi.concourse" ]
com.cinchapi.concourse;
1,445,426
@BetaApi("A restructuring of stub classes is planned, so this may break in the future") public static final MessagesV1Beta3Client create(MessagesV1Beta3Stub stub) { return new MessagesV1Beta3Client(stub); } protected MessagesV1Beta3Client(MessagesV1Beta3Settings settings) throws IOException { this.s...
@BetaApi(STR) static final MessagesV1Beta3Client function(MessagesV1Beta3Stub stub) { return new MessagesV1Beta3Client(stub); } protected MessagesV1Beta3Client(MessagesV1Beta3Settings settings) throws IOException { this.settings = settings; this.stub = ((MessagesV1Beta3StubSettings) settings.getStubSettings()).createSt...
/** * Constructs an instance of MessagesV1Beta3Client, using the given stub for making calls. This is * for advanced usage - prefer using create(MessagesV1Beta3Settings). */
Constructs an instance of MessagesV1Beta3Client, using the given stub for making calls. This is for advanced usage - prefer using create(MessagesV1Beta3Settings)
create
{ "repo_name": "googleapis/java-dataflow", "path": "google-cloud-dataflow/src/main/java/com/google/dataflow/v1beta3/MessagesV1Beta3Client.java", "license": "apache-2.0", "size": 15093 }
[ "com.google.api.core.BetaApi", "com.google.dataflow.v1beta3.stub.MessagesV1Beta3Stub", "com.google.dataflow.v1beta3.stub.MessagesV1Beta3StubSettings", "java.io.IOException" ]
import com.google.api.core.BetaApi; import com.google.dataflow.v1beta3.stub.MessagesV1Beta3Stub; import com.google.dataflow.v1beta3.stub.MessagesV1Beta3StubSettings; import java.io.IOException;
import com.google.api.core.*; import com.google.dataflow.v1beta3.stub.*; import java.io.*;
[ "com.google.api", "com.google.dataflow", "java.io" ]
com.google.api; com.google.dataflow; java.io;
1,521,130
public void exportScores(OutputStream outputStream) throws IOException { exportScores(outputStream, "\t"); }
void function(OutputStream outputStream) throws IOException { exportScores(outputStream, "\t"); }
/** * Export the scores in tab-delimited (one per line) UTF-8 format. */
Export the scores in tab-delimited (one per line) UTF-8 format
exportScores
{ "repo_name": "RobAltena/deeplearning4j", "path": "deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/optimize/listeners/CollectScoresIterationListener.java", "license": "apache-2.0", "size": 7193 }
[ "java.io.IOException", "java.io.OutputStream" ]
import java.io.IOException; import java.io.OutputStream;
import java.io.*;
[ "java.io" ]
java.io;
1,579,137
static XMLStreamReader getXMLStreamReader(InputStream entityStream) { InputStream in = new BufferedInputStream(entityStream, 2048); try { XMLInputFactory factory = XMLInputFactory.newInstance(); return factory.createXMLStreamReader(in); } catch (XMLStreamExc...
static XMLStreamReader getXMLStreamReader(InputStream entityStream) { InputStream in = new BufferedInputStream(entityStream, 2048); try { XMLInputFactory factory = XMLInputFactory.newInstance(); return factory.createXMLStreamReader(in); } catch (XMLStreamException e) { throw new ExceptionAdapter(e); } }
/** * FIXME Comment this * * @param entityStream * @return */
FIXME Comment this
getXMLStreamReader
{ "repo_name": "psakar/Resteasy", "path": "integration-tests/test-all-jaxb/src/test/java/org/jboss/resteasy/test/providers/jaxb/XMLStreamFactory.java", "license": "apache-2.0", "size": 1482 }
[ "java.io.BufferedInputStream", "java.io.InputStream", "javax.xml.stream.XMLInputFactory", "javax.xml.stream.XMLStreamException", "javax.xml.stream.XMLStreamReader", "org.jboss.resteasy.core.ExceptionAdapter" ]
import java.io.BufferedInputStream; import java.io.InputStream; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import org.jboss.resteasy.core.ExceptionAdapter;
import java.io.*; import javax.xml.stream.*; import org.jboss.resteasy.core.*;
[ "java.io", "javax.xml", "org.jboss.resteasy" ]
java.io; javax.xml; org.jboss.resteasy;
1,725,487
@SafeVarargs public static <T> Predicate<T> or(@NonNull Predicate<T>... predicates) { return Stream.of(predicates).reduce(Predicate::or).orElse(x -> false); }
static <T> Predicate<T> function(@NonNull Predicate<T>... predicates) { return Stream.of(predicates).reduce(Predicate::or).orElse(x -> false); }
/** * Logically {@code or}s given set of predicate. */
Logically ors given set of predicate
or
{ "repo_name": "icgc-dcc/dcc-common", "path": "dcc-common-core/src/main/java/org/icgc/dcc/common/core/util/function/Predicates.java", "license": "gpl-3.0", "size": 3429 }
[ "java.util.function.Predicate", "java.util.stream.Stream" ]
import java.util.function.Predicate; import java.util.stream.Stream;
import java.util.function.*; import java.util.stream.*;
[ "java.util" ]
java.util;
2,715,123
public void updateEntityAttributes(Map data) throws RemoteException;
void function(Map data) throws RemoteException;
/** * Updates some or all of the properties of the entity. */
Updates some or all of the properties of the entity
updateEntityAttributes
{ "repo_name": "apache/tapestry4", "path": "examples/VlibBeans/src/java/org/apache/tapestry/vlib/ejb/IEntityBean.java", "license": "apache-2.0", "size": 1244 }
[ "java.rmi.RemoteException", "java.util.Map" ]
import java.rmi.RemoteException; import java.util.Map;
import java.rmi.*; import java.util.*;
[ "java.rmi", "java.util" ]
java.rmi; java.util;
1,554,900
public boolean updateSeekerRol(String user, String rol) throws SQLException { String[] fields = new String[1]; fields[0] = "ID_ROL"; Object[] oneValue = new Object[1]; oneValue[0] = getRol(rol); if (existSeeker(user)) { PersistentOperations.update(connection, "...
boolean function(String user, String rol) throws SQLException { String[] fields = new String[1]; fields[0] = STR; Object[] oneValue = new Object[1]; oneValue[0] = getRol(rol); if (existSeeker(user)) { PersistentOperations.update(connection, STR, fields, oneValue, STR, user); return true; } return false; }
/** * Actualiza el rol del usuario * * @param user usuario a actualizar * @param rol nombre del nuevo rol * * @return true si lo actualizó, de lo contrario devuelve false * * @throws SQLException si ocurre alguna SQLException ...
Actualiza el rol del usuario
updateSeekerRol
{ "repo_name": "jcrcano/DrakkarKeel", "path": "Modules/DrakkarStern/src/drakkar/stern/tracker/persistent/SeekerDB.java", "license": "gpl-2.0", "size": 17388 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,819,991
public List<Annotation> listDocumentsAnnotations(String toplevelCorpusName, boolean withRootCorpus);
List<Annotation> function(String toplevelCorpusName, boolean withRootCorpus);
/** * Retrieves all metadata of a corpus including all subcorpora and documents. * * @param toplevelCorpusName Determines the root corpus. * @param withRootCorpus If true, the annotations of the root corpus are * included. * @return list of annotations. It is possible that some values are null. */
Retrieves all metadata of a corpus including all subcorpora and documents
listDocumentsAnnotations
{ "repo_name": "pixeldrama/ANNIS", "path": "annis-service/src/main/java/annis/dao/AnnisDao.java", "license": "apache-2.0", "size": 11267 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
396,488
public void testRestoreDeletedItemsAsNonAdminUser() throws Exception { AuthenticationUtil.setFullyAuthenticatedUser(USER_ONE); String restoreUrl = getArchiveUrl(user2_DeletedTestNode.getStoreRef()) + "/" + user2_DeletedTestNode.getId(); String jsonString = new JSONStringer().obje...
void function() throws Exception { AuthenticationUtil.setFullyAuthenticatedUser(USER_ONE); String restoreUrl = getArchiveUrl(user2_DeletedTestNode.getStoreRef()) + "/" + user2_DeletedTestNode.getId(); String jsonString = new JSONStringer().object().key(STR).value(STRapplication/jsonSTRUnexpectedly found more than 1 ite...
/** * This test method restores some deleted nodes from the archive store for the current user. */
This test method restores some deleted nodes from the archive store for the current user
testRestoreDeletedItemsAsNonAdminUser
{ "repo_name": "nguyentienlong/community-edition", "path": "projects/remote-api/source/test-java/org/alfresco/repo/web/scripts/archive/NodeArchiveServiceRestApiTest.java", "license": "lgpl-3.0", "size": 31297 }
[ "org.alfresco.repo.security.authentication.AuthenticationUtil", "org.json.JSONStringer" ]
import org.alfresco.repo.security.authentication.AuthenticationUtil; import org.json.JSONStringer;
import org.alfresco.repo.security.authentication.*; import org.json.*;
[ "org.alfresco.repo", "org.json" ]
org.alfresco.repo; org.json;
2,370,507
public PotentialStep findFirstStep(final String step) { log.debug("Attempt to find the first step matching <{}>", step);
PotentialStep function(final String step) { log.debug(STR, step);
/** * Returns the first {@link PotentialStep} found that match the step, ordered by priority. * Be careful that there can be several other {@link PotentialStep}s that fulfill the step too. * * @param step * @return */
Returns the first <code>PotentialStep</code> found that match the step, ordered by priority. Be careful that there can be several other <code>PotentialStep</code>s that fulfill the step too
findFirstStep
{ "repo_name": "Arnauld/jbehave-eclipse-plugin", "path": "src/org/technbolts/jbehave/eclipse/util/StepLocator.java", "license": "mit", "size": 7093 }
[ "org.technbolts.jbehave.eclipse.PotentialStep" ]
import org.technbolts.jbehave.eclipse.PotentialStep;
import org.technbolts.jbehave.eclipse.*;
[ "org.technbolts.jbehave" ]
org.technbolts.jbehave;
387,951
@MXBeanDescription("Coordinator node ID.") @Override @Nullable public UUID getCoordinator();
@MXBeanDescription(STR) @Override @Nullable UUID function();
/** * Gets current coordinator. * * @return Gets current coordinator. */
Gets current coordinator
getCoordinator
{ "repo_name": "ilantukh/ignite", "path": "modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/TcpDiscoverySpiMBean.java", "license": "apache-2.0", "size": 8612 }
[ "org.apache.ignite.mxbean.MXBeanDescription", "org.jetbrains.annotations.Nullable" ]
import org.apache.ignite.mxbean.MXBeanDescription; import org.jetbrains.annotations.Nullable;
import org.apache.ignite.mxbean.*; import org.jetbrains.annotations.*;
[ "org.apache.ignite", "org.jetbrains.annotations" ]
org.apache.ignite; org.jetbrains.annotations;
443,076
@Override protected mxConnectionHandler createConnectionHandler() { return new ConceptGraphConnectionHandler(this); }
mxConnectionHandler function() { return new ConceptGraphConnectionHandler(this); }
/** * mxConnectionHandler is responsible for connecting the Nodes with edges. * We override the mxConnectionHandler for Concept Graph Editor, so as the user * needs to press the Control Button for creating and edge. */
mxConnectionHandler is responsible for connecting the Nodes with edges. We override the mxConnectionHandler for Concept Graph Editor, so as the user needs to press the Control Button for creating and edge
createConnectionHandler
{ "repo_name": "tsiakmaki/jcropeditor", "path": "src/edu/teilar/jcropeditor/swing/ConceptGraphComponent.java", "license": "gpl-3.0", "size": 6489 }
[ "edu.teilar.jcropeditor.swing.handler.ConceptGraphConnectionHandler" ]
import edu.teilar.jcropeditor.swing.handler.ConceptGraphConnectionHandler;
import edu.teilar.jcropeditor.swing.handler.*;
[ "edu.teilar.jcropeditor" ]
edu.teilar.jcropeditor;
458,820
public Drawable getBuiltInDrawable() { return getBuiltInDrawable(0, 0, false, 0, 0, FLAG_SYSTEM); } /** * Obtain a drawable for the specified built-in static system wallpaper. * * @param which The {@code FLAG_*} identifier of a valid wallpaper type. Throws * IllegalArgument...
Drawable function() { return getBuiltInDrawable(0, 0, false, 0, 0, FLAG_SYSTEM); } /** * Obtain a drawable for the specified built-in static system wallpaper. * * @param which The {@code FLAG_*} identifier of a valid wallpaper type. Throws * IllegalArgumentException if an invalid wallpaper is requested. * @return A Dra...
/** * Obtain a drawable for the built-in static system wallpaper. */
Obtain a drawable for the built-in static system wallpaper
getBuiltInDrawable
{ "repo_name": "xorware/android_frameworks_base", "path": "core/java/android/app/WallpaperManager.java", "license": "apache-2.0", "size": 69580 }
[ "android.graphics.drawable.Drawable" ]
import android.graphics.drawable.Drawable;
import android.graphics.drawable.*;
[ "android.graphics" ]
android.graphics;
1,550,386
protected void actionPerformed(Pair<String, String> frameworkAndTestName, boolean isDebugMode) { final StatusNotification notification = new StatusNotification("Running Tests...", PROGRESS, FLOAT_MODE); notificationManager.notify(notification); TestExecutionContext context = createTestExe...
void function(Pair<String, String> frameworkAndTestName, boolean isDebugMode) { final StatusNotification notification = new StatusNotification(STR, PROGRESS, FLOAT_MODE); notificationManager.notify(notification); TestExecutionContext context = createTestExecutionContext( frameworkAndTestName, testDetector.getContextTyp...
/** * Runs an action. * * @param frameworkAndTestName contains name of the test framework and test methods * @param isDebugMode is {@code true} if the action uses for debugging */
Runs an action
actionPerformed
{ "repo_name": "akervern/che", "path": "plugins/plugin-testing/che-plugin-testing-ide/src/main/java/org/eclipse/che/plugin/testing/ide/action/RunDebugTestAbstractAction.java", "license": "epl-1.0", "size": 8771 }
[ "org.eclipse.che.api.core.jsonrpc.commons.JsonRpcPromise", "org.eclipse.che.api.testing.shared.TestExecutionContext", "org.eclipse.che.api.testing.shared.TestLaunchResult", "org.eclipse.che.ide.api.notification.StatusNotification", "org.eclipse.che.ide.util.Pair", "org.eclipse.che.plugin.testing.ide.model...
import org.eclipse.che.api.core.jsonrpc.commons.JsonRpcPromise; import org.eclipse.che.api.testing.shared.TestExecutionContext; import org.eclipse.che.api.testing.shared.TestLaunchResult; import org.eclipse.che.ide.api.notification.StatusNotification; import org.eclipse.che.ide.util.Pair; import org.eclipse.che.plugin....
import org.eclipse.che.api.core.jsonrpc.commons.*; import org.eclipse.che.api.testing.shared.*; import org.eclipse.che.ide.api.notification.*; import org.eclipse.che.ide.util.*; import org.eclipse.che.plugin.testing.ide.model.*;
[ "org.eclipse.che" ]
org.eclipse.che;
1,641,907
@Override public Principal authenticate(X509Certificate[] certs) { String username = null; if (certs != null && certs.length >0) { username = certs[0].getSubjectDN().getName(); } if (isLocked(username)) { // Trying to authenticate a locked user is an auto...
Principal function(X509Certificate[] certs) { String username = null; if (certs != null && certs.length >0) { username = certs[0].getSubjectDN().getName(); } if (isLocked(username)) { registerAuthFailure(username); log.warn(sm.getString(STR, username)); return null; } Principal authenticatedUser = super.authenticate(ce...
/** * Return the Principal associated with the specified chain of X509 * client certificates. If there is none, return <code>null</code>. * * @param certs Array of client certificates, with the first one in * the array being the certificate of the client itself. */
Return the Principal associated with the specified chain of X509 client certificates. If there is none, return <code>null</code>
authenticate
{ "repo_name": "plumer/codana", "path": "tomcat_files/7.0.61/LockOutRealm.java", "license": "mit", "size": 14856 }
[ "java.security.Principal", "java.security.cert.X509Certificate" ]
import java.security.Principal; import java.security.cert.X509Certificate;
import java.security.*; import java.security.cert.*;
[ "java.security" ]
java.security;
871,913
synchronized public String addJob(ControlledJob aJob) { String id = this.getNextJobID(); aJob.setJobID(id); aJob.setJobState(State.WAITING); jobsInProgress.add(aJob); return id; }
synchronized String function(ControlledJob aJob) { String id = this.getNextJobID(); aJob.setJobID(id); aJob.setJobState(State.WAITING); jobsInProgress.add(aJob); return id; }
/** * Add a new controlled job. * @param aJob the new controlled job */
Add a new controlled job
addJob
{ "repo_name": "bitmybytes/hadoop", "path": "hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/jobcontrol/JobControl.java", "license": "apache-2.0", "size": 10530 }
[ "org.apache.hadoop.mapreduce.lib.jobcontrol.ControlledJob" ]
import org.apache.hadoop.mapreduce.lib.jobcontrol.ControlledJob;
import org.apache.hadoop.mapreduce.lib.jobcontrol.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
519,133
public static void emitStoreProcessor(VM_Assembler asm, byte base, Offset offset) { asm.emitMOV_RegDisp_Reg(base, offset, PROCESSOR_REGISTER); }
static void function(VM_Assembler asm, byte base, Offset offset) { asm.emitMOV_RegDisp_Reg(base, offset, PROCESSOR_REGISTER); }
/** * Emit an instruction sequence to store a pointer to the current VM_Processor * object at a location defined by [base]+offset * * @param asm assembler object * @param base number of base register * @param offset offset */
Emit an instruction sequence to store a pointer to the current VM_Processor object at a location defined by [base]+offset
emitStoreProcessor
{ "repo_name": "rmcilroy/HeraJVM", "path": "rvm/src/org/jikesrvm/ia32/VM_ProcessorLocalState.java", "license": "epl-1.0", "size": 6233 }
[ "org.vmmagic.unboxed.Offset" ]
import org.vmmagic.unboxed.Offset;
import org.vmmagic.unboxed.*;
[ "org.vmmagic.unboxed" ]
org.vmmagic.unboxed;
1,409,102
public List<SourceDestValidation> getAdditionalValidations() { if ((source.getRuntimeMappings() == null || source.getRuntimeMappings().isEmpty()) == false) { SourceDestValidation validation = new SourceDestValidator.RemoteClusterMinimumVersionValidation( FIELD...
List<SourceDestValidation> function() { if ((source.getRuntimeMappings() == null source.getRuntimeMappings().isEmpty()) == false) { SourceDestValidation validation = new SourceDestValidator.RemoteClusterMinimumVersionValidation( FIELD_CAPS_RUNTIME_MAPPINGS_INTRODUCED_VERSION, STR); return Collections.singletonList(vali...
/** * Determines the minimum version of a cluster in multi-cluster setup that is needed to successfully run this transform config. * * @return version */
Determines the minimum version of a cluster in multi-cluster setup that is needed to successfully run this transform config
getAdditionalValidations
{ "repo_name": "robin13/elasticsearch", "path": "x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/transform/transforms/TransformConfig.java", "license": "apache-2.0", "size": 29835 }
[ "java.util.Collections", "java.util.List", "org.elasticsearch.xpack.core.common.validation.SourceDestValidator" ]
import java.util.Collections; import java.util.List; import org.elasticsearch.xpack.core.common.validation.SourceDestValidator;
import java.util.*; import org.elasticsearch.xpack.core.common.validation.*;
[ "java.util", "org.elasticsearch.xpack" ]
java.util; org.elasticsearch.xpack;
237,864
public static <E,T> IterableReadProtocol<E,Option<T>> option(ReadProtocol<E,T> inner) { return OptionProtocol.read(inner); }
static <E,T> IterableReadProtocol<E,Option<T>> function(ReadProtocol<E,T> inner) { return OptionProtocol.read(inner); }
/** * Reads a nested protocol optionally, representing it by a {@link io.vavr.control.Option}. */
Reads a nested protocol optionally, representing it by a <code>io.vavr.control.Option</code>
option
{ "repo_name": "Tradeshift/ts-reaktive", "path": "ts-reaktive-marshal/src/main/java/com/tradeshift/reaktive/marshal/Protocol.java", "license": "mit", "size": 10747 }
[ "com.tradeshift.reaktive.marshal.IterableProtocol", "io.vavr.control.Option" ]
import com.tradeshift.reaktive.marshal.IterableProtocol; import io.vavr.control.Option;
import com.tradeshift.reaktive.marshal.*; import io.vavr.control.*;
[ "com.tradeshift.reaktive", "io.vavr.control" ]
com.tradeshift.reaktive; io.vavr.control;
2,628,794
private static Deque<String> expandArguments(List<String> args) throws IOException { Deque<String> expanded = new ArrayDeque<>(args.size()); for (String arg : args) { expandArgument(expanded, arg); } return expanded; }
static Deque<String> function(List<String> args) throws IOException { Deque<String> expanded = new ArrayDeque<>(args.size()); for (String arg : args) { expandArgument(expanded, arg); } return expanded; }
/** * Pre-processes an argument list, expanding options @filename to read in the content of the file * and add it to the list of arguments. * * @param args the List of arguments to pre-process. * @return the List of pre-processed arguments. * @throws java.io.IOException if one of the files containing ...
Pre-processes an argument list, expanding options @filename to read in the content of the file and add it to the list of arguments
expandArguments
{ "repo_name": "dslomov/bazel", "path": "src/java_tools/buildjar/java/com/google/devtools/build/buildjar/OptionsParser.java", "license": "apache-2.0", "size": 14893 }
[ "java.io.IOException", "java.util.ArrayDeque", "java.util.Deque", "java.util.List" ]
import java.io.IOException; import java.util.ArrayDeque; import java.util.Deque; import java.util.List;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
657,820
public void setBinary(String path) { binary = checkNotNull(path); }
void function(String path) { binary = checkNotNull(path); }
/** * Sets the path to the Chrome executable. This path should exist on the * machine which will launch Chrome. The path should either be absolute or * relative to the location of running ChromeDriver server. * * @param path Path to Chrome executable. */
Sets the path to the Chrome executable. This path should exist on the machine which will launch Chrome. The path should either be absolute or relative to the location of running ChromeDriver server
setBinary
{ "repo_name": "thanhpete/selenium", "path": "java/client/src/org/openqa/selenium/chrome/ChromeOptions.java", "license": "apache-2.0", "size": 8601 }
[ "com.google.common.base.Preconditions" ]
import com.google.common.base.Preconditions;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
2,712,204
boolean checkAttributes(ExportPkg ep) { if (!checkMandatory(ep.mandatory)) { return false; } if (!okPackageVersion(ep.version) || (bundleSymbolicName != null && !bundleSymbolicName.equals(ep.bpkgs.bg.symbolicName)) || (bundleRange != null && !bundleRange....
boolean checkAttributes(ExportPkg ep) { if (!checkMandatory(ep.mandatory)) { return false; } if (!okPackageVersion(ep.version) (bundleSymbolicName != null && !bundleSymbolicName.equals(ep.bpkgs.bg.symbolicName)) (bundleRange != null && !bundleRange.includes(ep.bpkgs.bg.version))) { return false; } for (final Entry<Stri...
/** * Check that all package attributes match. * * @param ep Exported package. * @return True if okay, otherwise false. */
Check that all package attributes match
checkAttributes
{ "repo_name": "cnoelle/knopflerfish_framework", "path": "src/main/java/org/knopflerfish/framework/ImportPkg.java", "license": "bsd-3-clause", "size": 15557 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,730,531
@Override public void notifyChanged(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(NumericUnaryExpression.class)) { case ExpressionPackage.NUMERIC_UNARY_EXPRESSION__OPERATOR: fireNotifyChanged(new ViewerNotification(notification, notification.getNot...
void function(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(NumericUnaryExpression.class)) { case ExpressionPackage.NUMERIC_UNARY_EXPRESSION__OPERATOR: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); return; } super.notifyC...
/** * This handles model notifications by calling {@link #updateChildren} to update any cached * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This handles model notifications by calling <code>#updateChildren</code> to update any cached children and by creating a viewer notification, which it passes to <code>#fireNotifyChanged</code>.
notifyChanged
{ "repo_name": "smadelenat/CapellaModeAutomata", "path": "Language/ExpressionLanguage/com.thalesgroup.trt.mde.vp.expression.model.edit/src/com/thalesgroup/trt/mde/vp/expression/expression/provider/NumericUnaryExpressionItemProvider.java", "license": "epl-1.0", "size": 7421 }
[ "com.thalesgroup.trt.mde.vp.expression.expression.ExpressionPackage", "com.thalesgroup.trt.mde.vp.expression.expression.NumericUnaryExpression", "org.eclipse.emf.common.notify.Notification", "org.eclipse.emf.edit.provider.ViewerNotification" ]
import com.thalesgroup.trt.mde.vp.expression.expression.ExpressionPackage; import com.thalesgroup.trt.mde.vp.expression.expression.NumericUnaryExpression; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.edit.provider.ViewerNotification;
import com.thalesgroup.trt.mde.vp.expression.expression.*; import org.eclipse.emf.common.notify.*; import org.eclipse.emf.edit.provider.*;
[ "com.thalesgroup.trt", "org.eclipse.emf" ]
com.thalesgroup.trt; org.eclipse.emf;
328,844
public static final SourceModel.Expr quartile(SourceModel.Expr list, SourceModel.Expr q) { return SourceModel.Expr.Application.make( new SourceModel.Expr[] {SourceModel.Expr.Var.make(Functions.quartile), list, q}); } public static final QualifiedName quartile = QualifiedName.make(CA...
static final SourceModel.Expr function(SourceModel.Expr list, SourceModel.Expr q) { return SourceModel.Expr.Application.make( new SourceModel.Expr[] {SourceModel.Expr.Var.make(Functions.quartile), list, q}); } static final QualifiedName function = QualifiedName.make(CAL_Summary.MODULE_NAME, STR);
/** * Helper binding method for function: quartile. * @param list * @param q * @return the SourceModule.expr representing an application of quartile */
Helper binding method for function: quartile
quartile
{ "repo_name": "levans/Open-Quark", "path": "src/CAL_Libraries/src/org/openquark/cal/module/Cal/Utilities/CAL_Summary.java", "license": "bsd-3-clause", "size": 33128 }
[ "org.openquark.cal.compiler.QualifiedName", "org.openquark.cal.compiler.SourceModel" ]
import org.openquark.cal.compiler.QualifiedName; import org.openquark.cal.compiler.SourceModel;
import org.openquark.cal.compiler.*;
[ "org.openquark.cal" ]
org.openquark.cal;
970,505
private static void downLoadData( String saveFileName, InputStream inputStream, Number contentLength, HttpServletRequest request, HttpServletResponse response){ Date beginDate = now(); String length =...
static void function( String saveFileName, InputStream inputStream, Number contentLength, HttpServletRequest request, HttpServletResponse response){ Date beginDate = now(); String length = FileUtil.formatSize(contentLength.longValue()); LOGGER.info(STR, saveFileName, length); try{ OutputStream outputStream = response.g...
/** * Down load data. * * @param saveFileName * the save file name * @param inputStream * the input stream * @param contentLength * the content length * @param request * the request * @param response * the...
Down load data
downLoadData
{ "repo_name": "venusdrogon/feilong-servlet", "path": "src/main/java/com/feilong/servlet/http/ResponseDownloadUtil.java", "license": "apache-2.0", "size": 15174 }
[ "com.feilong.core.UncheckedIOException", "com.feilong.core.date.DateExtensionUtil", "com.feilong.core.date.DateUtil", "com.feilong.io.FileUtil", "com.feilong.io.IOWriteUtil", "java.io.IOException", "java.io.InputStream", "java.io.OutputStream", "java.util.Date", "javax.servlet.http.HttpServletRequ...
import com.feilong.core.UncheckedIOException; import com.feilong.core.date.DateExtensionUtil; import com.feilong.core.date.DateUtil; import com.feilong.io.FileUtil; import com.feilong.io.IOWriteUtil; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.Date; import javax...
import com.feilong.core.*; import com.feilong.core.date.*; import com.feilong.io.*; import java.io.*; import java.util.*; import javax.servlet.http.*; import org.apache.commons.lang3.*;
[ "com.feilong.core", "com.feilong.io", "java.io", "java.util", "javax.servlet", "org.apache.commons" ]
com.feilong.core; com.feilong.io; java.io; java.util; javax.servlet; org.apache.commons;
2,586,760
@JSStaticFunction public static void setOutputCompressorClass(final Context ctx, final Scriptable thisObj, final Object[] args, final Function func) { FileOutputFormatHelper.setOutputCompressorClass(FileOutputFormat.class, ctx, thisObj, args); }
static void function(final Context ctx, final Scriptable thisObj, final Object[] args, final Function func) { FileOutputFormatHelper.setOutputCompressorClass(FileOutputFormat.class, ctx, thisObj, args); }
/** * Java wrapper for {@link FileOutputFormat#setOutputCompressorClass(org.apache.hadoop.mapreduce.Job, Class)}. * * @param ctx the JavaScript context * @param thisObj the 'this' object * @param args the function arguments * @param func the function being called */
Java wrapper for <code>FileOutputFormat#setOutputCompressorClass(org.apache.hadoop.mapreduce.Job, Class)</code>
setOutputCompressorClass
{ "repo_name": "apigee/lembos", "path": "src/main/java/io/apigee/lembos/node/types/FileOutputFormatWrap.java", "license": "apache-2.0", "size": 6603 }
[ "org.apache.hadoop.mapreduce.lib.output.FileOutputFormat", "org.mozilla.javascript.Context", "org.mozilla.javascript.Function", "org.mozilla.javascript.Scriptable" ]
import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat; import org.mozilla.javascript.Context; import org.mozilla.javascript.Function; import org.mozilla.javascript.Scriptable;
import org.apache.hadoop.mapreduce.lib.output.*; import org.mozilla.javascript.*;
[ "org.apache.hadoop", "org.mozilla.javascript" ]
org.apache.hadoop; org.mozilla.javascript;
1,715,587
EClass getTopLevelSimpleType();
EClass getTopLevelSimpleType();
/** * Returns the meta object for class '{@link org.w3._2001.schema.TopLevelSimpleType <em>Top Level Simple Type</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>Top Level Simple Type</em>'. * @see org.w3._2001.schema.TopLevelSimpleType * @generated */
Returns the meta object for class '<code>org.w3._2001.schema.TopLevelSimpleType Top Level Simple Type</code>'.
getTopLevelSimpleType
{ "repo_name": "geotools/geotools", "path": "modules/ogc/net.opengis.wps/src/org/w3/_2001/schema/SchemaPackage.java", "license": "lgpl-2.1", "size": 433240 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,878,637
ServiceResponse<Void> deleteOrder(String orderId) throws ServiceException, IOException, IllegalArgumentException;
ServiceResponse<Void> deleteOrder(String orderId) throws ServiceException, IOException, IllegalArgumentException;
/** * Delete purchase order by ID. * For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors. * * @param orderId ID of the order that needs to be deleted * @throws ServiceException exception thrown from REST call * @throws IOExce...
Delete purchase order by ID. For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors
deleteOrder
{ "repo_name": "xingwu1/autorest", "path": "Samples/petstore/Java/SwaggerPetstore.java", "license": "mit", "size": 35698 }
[ "com.microsoft.rest.ServiceException", "com.microsoft.rest.ServiceResponse", "java.io.IOException" ]
import com.microsoft.rest.ServiceException; import com.microsoft.rest.ServiceResponse; import java.io.IOException;
import com.microsoft.rest.*; import java.io.*;
[ "com.microsoft.rest", "java.io" ]
com.microsoft.rest; java.io;
1,510,986
public void testFTPConnect() throws Exception { logger.debug("Start testFTPConnect"); FTPClient ftp = connectClient(); try { int reply = ftp.getReplyCode(); if (!FTPReply.isPositiveCompletion(reply)) { fail(...
void function() throws Exception { logger.debug(STR); FTPClient ftp = connectClient(); try { int reply = ftp.getReplyCode(); if (!FTPReply.isPositiveCompletion(reply)) { fail(STR); } boolean login = ftp.login(USER_ADMIN, PASSWORD_ADMIN); assertTrue(STR, login); } finally { ftp.disconnect(); } }
/** * Simple test that connects to the inbuilt ftp server and logs on * * @throws Exception */
Simple test that connects to the inbuilt ftp server and logs on
testFTPConnect
{ "repo_name": "nguyentienlong/community-edition", "path": "projects/repository/source/test-java/org/alfresco/filesys/FTPServerTest.java", "license": "lgpl-3.0", "size": 33348 }
[ "org.apache.commons.net.ftp.FTPClient", "org.apache.commons.net.ftp.FTPReply" ]
import org.apache.commons.net.ftp.FTPClient; import org.apache.commons.net.ftp.FTPReply;
import org.apache.commons.net.ftp.*;
[ "org.apache.commons" ]
org.apache.commons;
899,567
// <editor-fold defaultstate="collapsed" desc="sweepFthenV"> @AutoGUIAnnotation( DescriptionForUser = "<html>Measures the impedance for frequency<br>sweeps at each DC bias volatge.</html>", ParameterNames = {"Start Frequency [Hz] { [20, 20e6] }", "Stop Frequency [Hz] { [20, 20e6] }", ...
@AutoGUIAnnotation( DescriptionForUser = STR, ParameterNames = {STR, STR, STR, STR, STR, STR, STR, STR, STR, STR}, DefaultValues = {"2000STR3000STR100STRfalseSTR-0.5STR0.5STR1STRfalseSTR250", STR}, ToolTips = {STRSTR<html>Frequency difference or number of steps per decade<br>if logarithmic sweep is selected</html>", ST...
/** * Sweeps the frequency for all given DC biases and stores the impedance in units * set by the circuit mode. * * @param FreqStart Start Frequency * @param FreqStop Stop Frequency * @param FreqInc Increment in Frequency respectively number of points per * decade. See <code>U...
Sweeps the frequency for all given DC biases and stores the impedance in units set by the circuit mode
SweepFthenV
{ "repo_name": "amadeobellotti/Microwave-Analyzer", "path": "Microwave Analyzer/icontrol~subversion/Icontrol_JUnitTests/Icontrol/src/icontrol/drivers/instruments/Agilent/AgilentE4980A.java", "license": "gpl-2.0", "size": 31424 }
[ "java.io.IOException", "java.util.logging.Level" ]
import java.io.IOException; import java.util.logging.Level;
import java.io.*; import java.util.logging.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,994,507
public Color getColor (double value,double min, double max) { if (colors[0] == null) makeColors(); int percentage = (int)((100 * (value-min)) / (max-min)); if (percentage > 100) percentage = 100; if (percentage < 1) percentage = 1; return colors[percentage-1]; }
Color function (double value,double min, double max) { if (colors[0] == null) makeColors(); int percentage = (int)((100 * (value-min)) / (max-min)); if (percentage > 100) percentage = 100; if (percentage < 1) percentage = 1; return colors[percentage-1]; }
/** * Gets a colour from the gradient * * @param value The value for which you want a colour * @param min The minimum value in the gradient * @param max The maximum value in the gradient * @return A colour from the appropriate part of the gradient */
Gets a colour from the gradient
getColor
{ "repo_name": "scptest/scpb", "path": "uk/ac/babraham/BamQC/Utilities/HotColdColourGradient.java", "license": "gpl-3.0", "size": 4588 }
[ "java.awt.Color" ]
import java.awt.Color;
import java.awt.*;
[ "java.awt" ]
java.awt;
2,733,605
public static MozuClient<List<com.mozu.api.contracts.customer.Transaction>> getTransactionsClient(Integer accountId) throws Exception { MozuUrl url = com.mozu.api.urls.commerce.customer.accounts.TransactionUrl.getTransactionsUrl(accountId); String verb = "GET"; Class<?> clz = new ArrayList<com.mozu.api.contra...
static MozuClient<List<com.mozu.api.contracts.customer.Transaction>> function(Integer accountId) throws Exception { MozuUrl url = com.mozu.api.urls.commerce.customer.accounts.TransactionUrl.getTransactionsUrl(accountId); String verb = "GET"; Class<?> clz = new ArrayList<com.mozu.api.contracts.customer.Transaction>(){}....
/** * Retrieves a list of transactions associated with the customer account specified in the request. * <p><pre><code> * MozuClient<List<com.mozu.api.contracts.customer.Transaction>> mozuClient=GetTransactionsClient( accountId); * client.setBaseAddress(url); * client.executeRequest(); * Transaction transact...
Retrieves a list of transactions associated with the customer account specified in the request. <code><code> MozuClient> mozuClient=GetTransactionsClient( accountId); client.setBaseAddress(url); client.executeRequest(); Transaction transaction = client.Result(); </code></code>
getTransactionsClient
{ "repo_name": "bhewett/mozu-java", "path": "mozu-java-core/src/main/java/com/mozu/api/clients/commerce/customer/accounts/TransactionClient.java", "license": "mit", "size": 5548 }
[ "com.mozu.api.MozuClient", "com.mozu.api.MozuClientFactory", "com.mozu.api.MozuUrl", "java.util.ArrayList", "java.util.List" ]
import com.mozu.api.MozuClient; import com.mozu.api.MozuClientFactory; import com.mozu.api.MozuUrl; import java.util.ArrayList; import java.util.List;
import com.mozu.api.*; import java.util.*;
[ "com.mozu.api", "java.util" ]
com.mozu.api; java.util;
2,061,376
public void updateQuestionPool(QuestionPoolFacade questionpool, Map assessmentMap) { String title = ((String)assessmentMap.get("title")); questionpool.setDescription((String)assessmentMap.get("description")); //questionpool.setLastModifiedById("Sakai Import"); questionpool.setLastModified(...
void function(QuestionPoolFacade questionpool, Map assessmentMap) { String title = ((String)assessmentMap.get("title")); questionpool.setDescription((String)assessmentMap.get(STR)); questionpool.setLastModified(new Date()); questionpool.setOrganizationName((String)assessmentMap.get(STR)); questionpool.setObjectives((St...
/** * Update questionpool from the extracted properties. * Note: you need to do a save when you are done. * @param questionpool, which will be persisted * @param assessmentMap, the extracted properties */
Update questionpool from the extracted properties. Note: you need to do a save when you are done
updateQuestionPool
{ "repo_name": "bzhouduke123/sakai", "path": "samigo/samigo-qti/src/java/org/sakaiproject/tool/assessment/qti/helper/ExtractionHelper.java", "license": "apache-2.0", "size": 112467 }
[ "java.util.Date", "java.util.Map", "org.sakaiproject.tool.assessment.facade.QuestionPoolFacade" ]
import java.util.Date; import java.util.Map; import org.sakaiproject.tool.assessment.facade.QuestionPoolFacade;
import java.util.*; import org.sakaiproject.tool.assessment.facade.*;
[ "java.util", "org.sakaiproject.tool" ]
java.util; org.sakaiproject.tool;
1,389,524
private Map<MStringList, String> covertToMapMStringList(Map<List<String>, String> mMap) { Map<MStringList, String> map = null; if (mMap != null) { map = new HashMap<>(); Set<List<String>> keys = mMap.keySet(); for (List<String> key : keys) { map.put(new MStringList(key), mMap.get(key...
Map<MStringList, String> function(Map<List<String>, String> mMap) { Map<MStringList, String> map = null; if (mMap != null) { map = new HashMap<>(); Set<List<String>> keys = mMap.keySet(); for (List<String> key : keys) { map.put(new MStringList(key), mMap.get(key)); } } return map; }
/** * Covert a Map to a MStringList Map */
Covert a Map to a MStringList Map
covertToMapMStringList
{ "repo_name": "sankarh/hive", "path": "standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java", "license": "apache-2.0", "size": 604660 }
[ "java.util.HashMap", "java.util.List", "java.util.Map", "java.util.Set", "org.apache.hadoop.hive.metastore.model.MStringList" ]
import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; import org.apache.hadoop.hive.metastore.model.MStringList;
import java.util.*; import org.apache.hadoop.hive.metastore.model.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
2,208,859
public boolean supportsANSI92FullSQL() throws SQLException { return false; }
boolean function() throws SQLException { return false; }
/** * Is the ANSI92 full SQL grammar supported? * * @return true if so * @throws SQLException DOCUMENT ME! */
Is the ANSI92 full SQL grammar supported
supportsANSI92FullSQL
{ "repo_name": "hongliangpan/manydesigns.cn", "path": "trunk/portofino-database/mysql.src/com/mysql/jdbc/DatabaseMetaData.java", "license": "lgpl-3.0", "size": 275823 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,356,946
private double readDoubleCharacteristics(DAOProxy dao, String path, double defaultValue, boolean silent) { assert (path != null); double retVal = defaultValue; try { retVal = dao.get_double(path); } catch (Throwable th) { CoreException ce = new CoreException("Failed to read '"+path+"' field on...
double function(DAOProxy dao, String path, double defaultValue, boolean silent) { assert (path != null); double retVal = defaultValue; try { retVal = dao.get_double(path); } catch (Throwable th) { CoreException ce = new CoreException(STR+path+STR+dao+"'.", th); if (!silent) reportException(ce); } return retVal; }
/** * Reads DAO (CDB access) of double type. * * @param path path to be read non-<code>null</code>. * @param dao DAO on which to perform read request. * @param silent do not complain, if characteristics not found. * @return double value read, <code>0.0</code> on failure. */
Reads DAO (CDB access) of double type
readDoubleCharacteristics
{ "repo_name": "csrg-utfsm/acscb", "path": "LGPL/CommonSoftware/jmanager/src/com/cosylab/acs/maci/manager/ManagerImpl.java", "license": "mit", "size": 309850 }
[ "com.cosylab.acs.maci.CoreException", "com.cosylab.cdb.client.DAOProxy" ]
import com.cosylab.acs.maci.CoreException; import com.cosylab.cdb.client.DAOProxy;
import com.cosylab.acs.maci.*; import com.cosylab.cdb.client.*;
[ "com.cosylab.acs", "com.cosylab.cdb" ]
com.cosylab.acs; com.cosylab.cdb;
2,046,912
public static String transToString(final TransitionTarget from, final TransitionTarget to, final Transition transition, String event) { StringBuffer buf = new StringBuffer("("); buf.append("event = ").append(event); buf.append(", cond = ").append(transition.getCond()); bu...
static String function(final TransitionTarget from, final TransitionTarget to, final Transition transition, String event) { StringBuffer buf = new StringBuffer("("); buf.append(STR).append(event); buf.append(STR).append(transition.getCond()); buf.append(STR).append(getTTPath(from)); buf.append(STR).append(getTTPath(to)...
/** * Create a human readable log view of this transition. * * @param from The source TransitionTarget * @param to The destination TransitionTarget * @param transition The Transition that is taken * @param event The event name triggering the transition * @return String The human reada...
Create a human readable log view of this transition
transToString
{ "repo_name": "mohanaraosv/commons-scxml", "path": "src/main/java/org/apache/commons/scxml2/env/LogUtils.java", "license": "apache-2.0", "size": 2619 }
[ "org.apache.commons.scxml2.model.Transition", "org.apache.commons.scxml2.model.TransitionTarget" ]
import org.apache.commons.scxml2.model.Transition; import org.apache.commons.scxml2.model.TransitionTarget;
import org.apache.commons.scxml2.model.*;
[ "org.apache.commons" ]
org.apache.commons;
1,028,755
private static boolean arrayMemberEquals(final Class<?> componentType, final Object o1, final Object o2) { if (componentType.isAnnotation()) { return annotationArrayMemberEquals((Annotation[]) o1, (Annotation[]) o2); } if (componentType.equals(Byte.TYPE)) { return Arr...
static boolean function(final Class<?> componentType, final Object o1, final Object o2) { if (componentType.isAnnotation()) { return annotationArrayMemberEquals((Annotation[]) o1, (Annotation[]) o2); } if (componentType.equals(Byte.TYPE)) { return Arrays.equals((byte[]) o1, (byte[]) o2); } if (componentType.equals(Shor...
/** * Helper method for comparing two objects of an array type. * * @param componentType the component type of the array * @param o1 the first object * @param o2 the second object * @return a flag whether these objects are equal */
Helper method for comparing two objects of an array type
arrayMemberEquals
{ "repo_name": "chaoyi66/commons-lang", "path": "src/main/java/org/apache/commons/lang3/AnnotationUtils.java", "license": "apache-2.0", "size": 13878 }
[ "java.lang.annotation.Annotation", "java.util.Arrays" ]
import java.lang.annotation.Annotation; import java.util.Arrays;
import java.lang.annotation.*; import java.util.*;
[ "java.lang", "java.util" ]
java.lang; java.util;
1,936,878
protected IgniteInternalCache<Object, Object> getSystemCache(final Ignite ignite, final String cacheName) { return ((IgniteKernal) ignite).context().cache().cache(cacheName); }
IgniteInternalCache<Object, Object> function(final Ignite ignite, final String cacheName) { return ((IgniteKernal) ignite).context().cache().cache(cacheName); }
/** * Extract system cache from kernal. * * @param ignite Ignite instance. * @param cacheName System cache name. * @return Internal cache instance. */
Extract system cache from kernal
getSystemCache
{ "repo_name": "afinka77/ignite", "path": "modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteTxConfigCacheSelfTest.java", "license": "apache-2.0", "size": 9558 }
[ "org.apache.ignite.Ignite", "org.apache.ignite.internal.IgniteKernal" ]
import org.apache.ignite.Ignite; import org.apache.ignite.internal.IgniteKernal;
import org.apache.ignite.*; import org.apache.ignite.internal.*;
[ "org.apache.ignite" ]
org.apache.ignite;
834,941
@Override protected void recursiveGenerate(World world, int chunkX, int chunkZ, int par4, int par5, Block[] blocks) { if (this.rand.nextInt(400) == 0) { range = 32; double x = chunkX * 16 + this.rand.nextInt(16); //Random r = new Random(world.getSeed()); double y = 80; double z = chunkZ...
void function(World world, int chunkX, int chunkZ, int par4, int par5, Block[] blocks) { if (this.rand.nextInt(400) == 0) { range = 32; double x = chunkX * 16 + this.rand.nextInt(16); double y = 80; double z = chunkZ * 16 + this.rand.nextInt(16); float var15 = this.rand.nextFloat() * (float)Math.PI * 2.0F; float var16 ...
/** * Recursively called by generate() (generate) and optionally by itself. */
Recursively called by generate() (generate) and optionally by itself
recursiveGenerate
{ "repo_name": "AnodeCathode/TFCraft", "path": "src/Common/com/bioxx/tfc/WorldGen/MapGen/MapGenRiverRavine.java", "license": "gpl-3.0", "size": 6332 }
[ "net.minecraft.block.Block", "net.minecraft.world.World" ]
import net.minecraft.block.Block; import net.minecraft.world.World;
import net.minecraft.block.*; import net.minecraft.world.*;
[ "net.minecraft.block", "net.minecraft.world" ]
net.minecraft.block; net.minecraft.world;
2,763,874