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
private void consumeFieldValue( final Tokenizer tokenizer, final ExtensionRegistry extensionRegistry, final MessageReflection.MergeTarget target, final FieldDescriptor field, final ExtensionRegistry.ExtensionInfo extension) throws ParseException { Object value =...
void function( final Tokenizer tokenizer, final ExtensionRegistry extensionRegistry, final MessageReflection.MergeTarget target, final FieldDescriptor field, final ExtensionRegistry.ExtensionInfo extension) throws ParseException { Object value = null; if (field.getJavaType() == FieldDescriptor.JavaType.MESSAGE) { final...
/** * Parse a single field value from {@code tokenizer} and merge it into * {@code builder}. */
Parse a single field value from tokenizer and merge it into builder
consumeFieldValue
{ "repo_name": "brengarajalu/GrpcAPI", "path": "protobuf/protobuf-3.0.0-alpha-2/java/src/main/java/com/google/protobuf/TextFormat.java", "license": "bsd-3-clause", "size": 67686 }
[ "com.google.protobuf.Descriptors" ]
import com.google.protobuf.Descriptors;
import com.google.protobuf.*;
[ "com.google.protobuf" ]
com.google.protobuf;
2,554,368
boolean isValidToCreate(String src, INodesInPath iip) throws SnapshotAccessControlException { String srcs = normalizePath(src); return srcs.startsWith("/") && !srcs.endsWith("/") && iip.getLastINode() == null; }
boolean isValidToCreate(String src, INodesInPath iip) throws SnapshotAccessControlException { String srcs = normalizePath(src); return srcs.startsWith("/") && !srcs.endsWith("/") && iip.getLastINode() == null; }
/** * Check whether the filepath could be created * @throws SnapshotAccessControlException if path is in RO snapshot */
Check whether the filepath could be created
isValidToCreate
{ "repo_name": "GeLiXin/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java", "license": "apache-2.0", "size": 72241 }
[ "org.apache.hadoop.hdfs.protocol.SnapshotAccessControlException" ]
import org.apache.hadoop.hdfs.protocol.SnapshotAccessControlException;
import org.apache.hadoop.hdfs.protocol.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
373,932
public InputPort<Object> getConsole(String name, DAG dag, String prefix) { // hack to output to HTTP based on actual environment ConsoleOutputOperator oper = dag.addOperator(name, ConsoleOutputOperator.class); oper.setStringFormat(prefix + ": %s"); return oper.input; }
InputPort<Object> function(String name, DAG dag, String prefix) { ConsoleOutputOperator oper = dag.addOperator(name, ConsoleOutputOperator.class); oper.setStringFormat(prefix + STR); return oper.input; }
/** * Get console for output operator. * @param name Operator name * @param dag Application DAG graph. * @return input port for console output. */
Get console for output operator
getConsole
{ "repo_name": "brightchen/apex-malhar", "path": "demos/yahoofinance/src/main/java/com/datatorrent/demos/yahoofinance/YahooFinanceApplication.java", "license": "apache-2.0", "size": 15118 }
[ "com.datatorrent.api.Operator", "com.datatorrent.lib.io.ConsoleOutputOperator" ]
import com.datatorrent.api.Operator; import com.datatorrent.lib.io.ConsoleOutputOperator;
import com.datatorrent.api.*; import com.datatorrent.lib.io.*;
[ "com.datatorrent.api", "com.datatorrent.lib" ]
com.datatorrent.api; com.datatorrent.lib;
2,665,818
private boolean isCategoryWeightEnabled() { return (this.configuredCategoryType == GbCategoryType.WEIGHTED_CATEGORY) ? true : false; }
boolean function() { return (this.configuredCategoryType == GbCategoryType.WEIGHTED_CATEGORY) ? true : false; }
/** * Helper to determine if weightings are enabled * * @return */
Helper to determine if weightings are enabled
isCategoryWeightEnabled
{ "repo_name": "Fudan-University/sakai", "path": "gradebookng/tool/src/java/org/sakaiproject/gradebookng/tool/panels/InstructorGradeSummaryGradesPanel.java", "license": "apache-2.0", "size": 6342 }
[ "org.sakaiproject.gradebookng.business.GbCategoryType" ]
import org.sakaiproject.gradebookng.business.GbCategoryType;
import org.sakaiproject.gradebookng.business.*;
[ "org.sakaiproject.gradebookng" ]
org.sakaiproject.gradebookng;
2,450,079
private void updateBucketAccessControlList() { try { AccessControlList bucketACL = s3ServiceMulti.getS3Service().getBucketAcl(currentSelectedBucket); AccessControlList updatedBucketACL = AccessControlDialog.showDialog( ownerFrame, new S3Bucket[] {currentS...
void function() { try { AccessControlList bucketACL = s3ServiceMulti.getS3Service().getBucketAcl(currentSelectedBucket); AccessControlList updatedBucketACL = AccessControlDialog.showDialog( ownerFrame, new S3Bucket[] {currentSelectedBucket}, bucketACL, this); if (updatedBucketACL != null) { currentSelectedBucket.setAcl...
/** * Updates the ACL settings for the currently selected bucket. */
Updates the ACL settings for the currently selected bucket
updateBucketAccessControlList
{ "repo_name": "hyperic/jets3t", "path": "src/org/jets3t/apps/cockpit/Cockpit.java", "license": "apache-2.0", "size": 142137 }
[ "org.jets3t.apps.cockpit.gui.AccessControlDialog", "org.jets3t.gui.ErrorDialog", "org.jets3t.service.acl.AccessControlList", "org.jets3t.service.model.S3Bucket" ]
import org.jets3t.apps.cockpit.gui.AccessControlDialog; import org.jets3t.gui.ErrorDialog; import org.jets3t.service.acl.AccessControlList; import org.jets3t.service.model.S3Bucket;
import org.jets3t.apps.cockpit.gui.*; import org.jets3t.gui.*; import org.jets3t.service.acl.*; import org.jets3t.service.model.*;
[ "org.jets3t.apps", "org.jets3t.gui", "org.jets3t.service" ]
org.jets3t.apps; org.jets3t.gui; org.jets3t.service;
1,473,729
@Test public void testSetId() { Order order = new Order(0l); assertTrue(order.setId(15l)); }
void function() { Order order = new Order(0l); assertTrue(order.setId(15l)); }
/** * Test id should be assigned */
Test id should be assigned
testSetId
{ "repo_name": "Aula13/A-WMS", "path": "test/org/wms/model/order/OrderUnitTest.java", "license": "cc0-1.0", "size": 10463 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,467,843
public static ThrottleType toThrottleType(final QuotaProtos.ThrottleType proto) { switch (proto) { case REQUEST_NUMBER: return ThrottleType.REQUEST_NUMBER; case REQUEST_SIZE: return ThrottleType.REQUEST_SIZE; case REQUEST_CAPACITY_UNIT: return ThrottleType.REQUEST_CAPACIT...
static ThrottleType function(final QuotaProtos.ThrottleType proto) { switch (proto) { case REQUEST_NUMBER: return ThrottleType.REQUEST_NUMBER; case REQUEST_SIZE: return ThrottleType.REQUEST_SIZE; case REQUEST_CAPACITY_UNIT: return ThrottleType.REQUEST_CAPACITY_UNIT; case WRITE_NUMBER: return ThrottleType.WRITE_NUMBER; ...
/** * Convert a protocol buffer ThrottleType to a client ThrottleType * * @param proto * @return the converted client ThrottleType */
Convert a protocol buffer ThrottleType to a client ThrottleType
toThrottleType
{ "repo_name": "ultratendency/hbase", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/ProtobufUtil.java", "license": "apache-2.0", "size": 132790 }
[ "org.apache.hadoop.hbase.quotas.ThrottleType", "org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos" ]
import org.apache.hadoop.hbase.quotas.ThrottleType; import org.apache.hadoop.hbase.shaded.protobuf.generated.QuotaProtos;
import org.apache.hadoop.hbase.quotas.*; import org.apache.hadoop.hbase.shaded.protobuf.generated.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
2,562,109
private double evaluate(final svm_parameter param, final svm_problem prob, final double[] target) { int totalCorrect = 0; final ErrorCalculation error = new ErrorCalculation(); if ((param.svm_type == svm_parameter.EPSILON_SVR) || (param.svm_type == svm_parameter.NU_SVR)) { for (int i = 0; i < prob....
double function(final svm_parameter param, final svm_problem prob, final double[] target) { int totalCorrect = 0; final ErrorCalculation error = new ErrorCalculation(); if ((param.svm_type == svm_parameter.EPSILON_SVR) (param.svm_type == svm_parameter.NU_SVR)) { for (int i = 0; i < prob.l; i++) { final double ideal = p...
/** * Evaluate the error for the specified model. * * @param param * The params for the SVN. * @param prob * The problem to evaluate. * @param target * The output values from the SVN. * @return The calculated error. */
Evaluate the error for the specified model
evaluate
{ "repo_name": "Crespo911/encog-java-core", "path": "src/main/java/org/encog/ml/svm/training/SVMTrain.java", "license": "apache-2.0", "size": 6152 }
[ "org.encog.mathutil.error.ErrorCalculation", "org.encog.util.Format" ]
import org.encog.mathutil.error.ErrorCalculation; import org.encog.util.Format;
import org.encog.mathutil.error.*; import org.encog.util.*;
[ "org.encog.mathutil", "org.encog.util" ]
org.encog.mathutil; org.encog.util;
1,751,720
@Generated @Selector("setProximityMonitoringEnabled:") public native void setProximityMonitoringEnabled(boolean value);
@Selector(STR) native void function(boolean value);
/** * default is NO */
default is NO
setProximityMonitoringEnabled
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/uikit/UIDevice.java", "license": "apache-2.0", "size": 7982 }
[ "org.moe.natj.objc.ann.Selector" ]
import org.moe.natj.objc.ann.Selector;
import org.moe.natj.objc.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
2,638,505
@Override public String getAsText() { Date value = (Date) getValue(); DateFormat dateFormat = this.dateFormat; if(dateFormat == null) dateFormat = TIMEFORMAT; return (value != null ? dateFormat.format(value) : ""); }
String function() { Date value = (Date) getValue(); DateFormat dateFormat = this.dateFormat; if(dateFormat == null) dateFormat = TIMEFORMAT; return (value != null ? dateFormat.format(value) : ""); }
/** * Format the Date as String, using the specified DateFormat. */
Format the Date as String, using the specified DateFormat
getAsText
{ "repo_name": "qujianlin/oshop", "path": "src/me/xiaoy/core/binder/DateTimeEditor.java", "license": "apache-2.0", "size": 2052 }
[ "java.text.DateFormat", "java.util.Date" ]
import java.text.DateFormat; import java.util.Date;
import java.text.*; import java.util.*;
[ "java.text", "java.util" ]
java.text; java.util;
872,985
public void buildConnectivityGraph(int k) throws Exception{ //counting computed results int count=0; //nodes polled from queues List<Map<String, SteinerNode>> processedNodes= new ArrayList<Map<String, SteinerNode>>(); List<Map<String, SteinerNode>> processedNodesHelper= new ArrayLi...
void function(int k) throws Exception{ int count=0; List<Map<String, SteinerNode>> processedNodes= new ArrayList<Map<String, SteinerNode>>(); List<Map<String, SteinerNode>> processedNodesHelper= new ArrayList<Map<String, SteinerNode>>(); List<HashMap<String, Integer>> recursesForNodesInQueue = new ArrayList<HashMap<Str...
/** * finds the top-k interconnections by exploiting the BANKS technique * @param k number of interconnections to be retrieved * @throws Exception */
finds the top-k interconnections by exploiting the BANKS technique
buildConnectivityGraph
{ "repo_name": "rpiotti/Web-Karma", "path": "karma-common/src/main/java/edu/isi/karma/modeling/steiner/topk/BANKSfromMM.java", "license": "apache-2.0", "size": 15385 }
[ "java.util.ArrayList", "java.util.HashMap", "java.util.List", "java.util.Map", "java.util.Queue" ]
import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Queue;
import java.util.*;
[ "java.util" ]
java.util;
2,492,900
private void notifyListeners(UserAdminEvent event) { Object[] services = userAdminTrackerListener.getServices(); if (services != null) { for (int i = 0; i < services.length; i++) { UserAdminListener listener = ((UserAdminListener) services[i...
void function(UserAdminEvent event) { Object[] services = userAdminTrackerListener.getServices(); if (services != null) { for (int i = 0; i < services.length; i++) { UserAdminListener listener = ((UserAdminListener) services[i]); listener.roleChanged(event); } } }
/** * Notifying UserAdminListeners about change made to roles. * * @param event @see org.osgi.service.useradmin.UserAdminEvent */
Notifying UserAdminListeners about change made to roles
notifyListeners
{ "repo_name": "boneman1231/org.apache.felix", "path": "trunk/useradmin/src/main/java/org/apache/felix/useradmin/impl/UserAdminEventDispatcherImpl.java", "license": "apache-2.0", "size": 7430 }
[ "org.osgi.service.useradmin.UserAdminEvent", "org.osgi.service.useradmin.UserAdminListener" ]
import org.osgi.service.useradmin.UserAdminEvent; import org.osgi.service.useradmin.UserAdminListener;
import org.osgi.service.useradmin.*;
[ "org.osgi.service" ]
org.osgi.service;
1,124,483
private void processWidget(ISensorWidget widget) { //if the title attribute is not provided, gets the name attribute instead if(widget.getType() == TAG_TYPE.ATTRIBUTE && widget.getName().equals("name") && !isTitleProvided) { anchorHref.setText(widget.getValue("name", true)); } else if(widget.getType() == TA...
void function(ISensorWidget widget) { if(widget.getType() == TAG_TYPE.ATTRIBUTE && widget.getName().equals("name") && !isTitleProvided) { anchorHref.setText(widget.getValue("name", true)); } else if(widget.getType() == TAG_TYPE.ATTRIBUTE && widget.getName().equals("title")) { anchorHref.setText(widget.getValue("title",...
/** * Process widget. * * @param widget the widget */
Process widget
processWidget
{ "repo_name": "mdhsl/SMLEditor", "path": "src/com/sensia/tools/client/swetools/editors/sensorml/panels/widgets/sml/component/SMLSensorXLinkComponentWidget.java", "license": "mpl-2.0", "size": 4075 }
[ "com.sensia.tools.client.swetools.editors.sensorml.panels.widgets.ISensorWidget", "com.sensia.tools.client.swetools.editors.sensorml.utils.Utils" ]
import com.sensia.tools.client.swetools.editors.sensorml.panels.widgets.ISensorWidget; import com.sensia.tools.client.swetools.editors.sensorml.utils.Utils;
import com.sensia.tools.client.swetools.editors.sensorml.panels.widgets.*; import com.sensia.tools.client.swetools.editors.sensorml.utils.*;
[ "com.sensia.tools" ]
com.sensia.tools;
589,919
private static CcLinkParams collectCcLinkParams(RuleContext context, CcCommon common, boolean linkingStatically, boolean linkShared) { CcLinkParams.Builder builder = CcLinkParams.builder(linkingStatically, linkShared); if (isLinkShared(context)) { // CcLinkingOutputs is empty because this target ...
static CcLinkParams function(RuleContext context, CcCommon common, boolean linkingStatically, boolean linkShared) { CcLinkParams.Builder builder = CcLinkParams.builder(linkingStatically, linkShared); if (isLinkShared(context)) { builder.addCcLibrary(context, common, false, CcLinkingOutputs.EMPTY); } else { builder.addT...
/** * Collect link parameters from the transitive closure. */
Collect link parameters from the transitive closure
collectCcLinkParams
{ "repo_name": "charlieaustin/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/cpp/CcBinary.java", "license": "apache-2.0", "size": 32039 }
[ "com.google.devtools.build.lib.analysis.RuleConfiguredTarget", "com.google.devtools.build.lib.analysis.RuleContext" ]
import com.google.devtools.build.lib.analysis.RuleConfiguredTarget; import com.google.devtools.build.lib.analysis.RuleContext;
import com.google.devtools.build.lib.analysis.*;
[ "com.google.devtools" ]
com.google.devtools;
2,763,027
@Override public void cascadeDiscoverAndPersistUnregisteredNewObjects(Object object, Map newObjects, Map unregisteredExistingObjects, Map visitedObjects, UnitOfWorkImpl uow, Set cascadeErrors) { if (containerPolicy.isMappedKeyMapPolicy()){ Object values = getAttributeValueFromObject(object);...
void function(Object object, Map newObjects, Map unregisteredExistingObjects, Map visitedObjects, UnitOfWorkImpl uow, Set cascadeErrors) { if (containerPolicy.isMappedKeyMapPolicy()){ Object values = getAttributeValueFromObject(object); if (values != null){ Object iterator = containerPolicy.iteratorFor(values); while (...
/** * INTERNAL: * Cascade discover and persist new objects during commit. */
Cascade discover and persist new objects during commit
cascadeDiscoverAndPersistUnregisteredNewObjects
{ "repo_name": "RallySoftware/eclipselink.runtime", "path": "foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/mappings/DirectMapMapping.java", "license": "epl-1.0", "size": 56004 }
[ "java.util.Map", "java.util.Set", "org.eclipse.persistence.internal.sessions.UnitOfWorkImpl" ]
import java.util.Map; import java.util.Set; import org.eclipse.persistence.internal.sessions.UnitOfWorkImpl;
import java.util.*; import org.eclipse.persistence.internal.sessions.*;
[ "java.util", "org.eclipse.persistence" ]
java.util; org.eclipse.persistence;
920,911
public void hereNow(String[] channels, String[] channelGroups, boolean state, boolean uuids, Callback callback) { final Callback cb = getWrappedCallback(callback); Hashtable parameters = PubnubUtil.hashtableClone(params); ArrayList urlArgs = new ArrayList(); ...
void function(String[] channels, String[] channelGroups, boolean state, boolean uuids, Callback callback) { final Callback cb = getWrappedCallback(callback); Hashtable parameters = PubnubUtil.hashtableClone(params); ArrayList urlArgs = new ArrayList(); urlArgs.add(getPubnubUrl()); urlArgs.add("v2"); urlArgs.add(STR); u...
/** * Read presence information from a channel or a channel group * * @param channels array * @param channelGroups array * @param state state enabled ? * @param uuids enable / disable returning uuids in response ? * @param callback object of sub class of Call...
Read presence information from a channel or a channel group
hereNow
{ "repo_name": "NizarBoussarsar/java", "path": "java/srcPubnubApi/com/pubnub/api/PubnubCore.java", "license": "mit", "size": 93411 }
[ "java.util.ArrayList", "java.util.Hashtable" ]
import java.util.ArrayList; import java.util.Hashtable;
import java.util.*;
[ "java.util" ]
java.util;
2,652,450
public static String optimizerPlanAsJSON(Plan plan) throws Exception { final int parallelism = plan.getDefaultParallelism() == ExecutionConfig.PARALLELISM_DEFAULT ? 1 : plan.getDefaultParallelism(); Optimizer pc = new Optimizer(new DataStatistics(), new Configuration()); pc.setDefaultParallelism(parallelism);...
static String function(Plan plan) throws Exception { final int parallelism = plan.getDefaultParallelism() == ExecutionConfig.PARALLELISM_DEFAULT ? 1 : plan.getDefaultParallelism(); Optimizer pc = new Optimizer(new DataStatistics(), new Configuration()); pc.setDefaultParallelism(parallelism); OptimizedPlan op = pc.compi...
/** * Creates a JSON representation of the given dataflow's execution plan. * * @param plan The dataflow plan. * @return The dataflow's execution plan, as a JSON string. * @throws Exception Thrown, if the optimization process that creates the execution plan failed. */
Creates a JSON representation of the given dataflow's execution plan
optimizerPlanAsJSON
{ "repo_name": "zimmermatt/flink", "path": "flink-clients/src/main/java/org/apache/flink/client/LocalExecutor.java", "license": "apache-2.0", "size": 10233 }
[ "org.apache.flink.api.common.ExecutionConfig", "org.apache.flink.api.common.Plan", "org.apache.flink.configuration.Configuration", "org.apache.flink.optimizer.DataStatistics", "org.apache.flink.optimizer.Optimizer", "org.apache.flink.optimizer.plan.OptimizedPlan", "org.apache.flink.optimizer.plandump.Pl...
import org.apache.flink.api.common.ExecutionConfig; import org.apache.flink.api.common.Plan; import org.apache.flink.configuration.Configuration; import org.apache.flink.optimizer.DataStatistics; import org.apache.flink.optimizer.Optimizer; import org.apache.flink.optimizer.plan.OptimizedPlan; import org.apache.flink.o...
import org.apache.flink.api.common.*; import org.apache.flink.configuration.*; import org.apache.flink.optimizer.*; import org.apache.flink.optimizer.plan.*; import org.apache.flink.optimizer.plandump.*;
[ "org.apache.flink" ]
org.apache.flink;
705,597
private String getLog(final boolean syncthingLog) { Process process = null; try { ProcessBuilder pb; if (syncthingLog) { pb = new ProcessBuilder("/system/bin/logcat", "-t", "300", "-s", "SyncthingNativeCode"); } else { pb = new Proc...
String function(final boolean syncthingLog) { Process process = null; try { ProcessBuilder pb; if (syncthingLog) { pb = new ProcessBuilder(STR, "-t", "300", "-s", STR); } else { pb = new ProcessBuilder(STR, "-t", "300", "'*'"); } pb.redirectErrorStream(true); process = pb.start(); BufferedReader bufferedReader = new Bu...
/** * Queries logcat to obtain a log. * * @param syncthingLog Filter on Syncthing's native messages. */
Queries logcat to obtain a log
getLog
{ "repo_name": "veniosg/syncthing-android", "path": "src/main/java/com/nutomic/syncthingandroid/activities/LogActivity.java", "license": "mpl-2.0", "size": 5118 }
[ "java.io.BufferedReader", "java.io.InputStreamReader" ]
import java.io.BufferedReader; import java.io.InputStreamReader;
import java.io.*;
[ "java.io" ]
java.io;
1,997,770
@Test (timeout=60000) public void testDiffReport2() throws Exception { Path subsub1 = new Path(sub1, "subsub1"); Path subsubsub1 = new Path(subsub1, "subsubsub1"); hdfs.mkdirs(subsubsub1); modifyAndCreateSnapshot(subsubsub1, new Path[]{sub1}); // delete subsub1 hdfs.delete(subsub1, true...
@Test (timeout=60000) void function() throws Exception { Path subsub1 = new Path(sub1, STR); Path subsubsub1 = new Path(subsub1, STR); hdfs.mkdirs(subsubsub1); modifyAndCreateSnapshot(subsubsub1, new Path[]{sub1}); hdfs.delete(subsub1, true); verifyDiffReport(sub1, "s0", "s2", new DiffReportEntry(DiffType.MODIFY, DFSUt...
/** * Make changes under a sub-directory, then delete the sub-directory. Make * sure the diff report computation correctly retrieve the diff from the * deleted sub-directory. */
Make changes under a sub-directory, then delete the sub-directory. Make sure the diff report computation correctly retrieve the diff from the deleted sub-directory
testDiffReport2
{ "repo_name": "tseen/Federated-HDFS", "path": "tseenliu/FedHDFS-hadoop-src/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestSnapshotDiffReport.java", "license": "apache-2.0", "size": 20878 }
[ "org.apache.hadoop.fs.Path", "org.apache.hadoop.hdfs.DFSUtil", "org.apache.hadoop.hdfs.protocol.SnapshotDiffReport", "org.junit.Test" ]
import org.apache.hadoop.fs.Path; import org.apache.hadoop.hdfs.DFSUtil; import org.apache.hadoop.hdfs.protocol.SnapshotDiffReport; import org.junit.Test;
import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.*; import org.apache.hadoop.hdfs.protocol.*; import org.junit.*;
[ "org.apache.hadoop", "org.junit" ]
org.apache.hadoop; org.junit;
2,293,622
private boolean writeNewEntryBaseRecord(boolean async) throws IOException { if (this.wroteNewEntryBase) { return false; } this.wroteNewEntryBase = true; long newEntryBase = getOplogSet().getOplogEntryId(); OpState saved = this.opState; try { this.opState = new OpState(); thi...
boolean function(boolean async) throws IOException { if (this.wroteNewEntryBase) { return false; } this.wroteNewEntryBase = true; long newEntryBase = getOplogSet().getOplogEntryId(); OpState saved = this.opState; try { this.opState = new OpState(); this.opState.initialize(newEntryBase); writeOpLogBytes(this.crf, async,...
/** * Write a OPLOG_NEW_ENTRY_BASE_ID to this oplog. Must be called before any OPLOG_NEW_ENTRY_0ID * records are written to this oplog. */
Write a OPLOG_NEW_ENTRY_BASE_ID to this oplog. Must be called before any OPLOG_NEW_ENTRY_0ID records are written to this oplog
writeNewEntryBaseRecord
{ "repo_name": "masaki-yamakawa/geode", "path": "geode-core/src/main/java/org/apache/geode/internal/cache/Oplog.java", "license": "apache-2.0", "size": 283772 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,278,767
void save(Collection<BasePreferencePortable<? extends BasePreference<?>>> portablePreferences, PreferenceScope scope, Command successCallback, ParameterizedCommand<Throwable> errorCallback);
void save(Collection<BasePreferencePortable<? extends BasePreference<?>>> portablePreferences, PreferenceScope scope, Command successCallback, ParameterizedCommand<Throwable> errorCallback);
/** * Saves all preferences passed, following the passed scope resolution strategy. * @param portablePreferences Preference instances to be saved. * @param scope Custom scope inside which the preference should be saved. * @param successCallback Success callback that indicates that the preference was...
Saves all preferences passed, following the passed scope resolution strategy
save
{ "repo_name": "karreiro/uberfire", "path": "uberfire-preferences/uberfire-preferences-api/src/main/java/org/uberfire/preferences/shared/bean/PreferenceBeanStore.java", "license": "apache-2.0", "size": 7603 }
[ "java.util.Collection", "org.uberfire.mvp.Command", "org.uberfire.mvp.ParameterizedCommand", "org.uberfire.preferences.shared.PreferenceScope" ]
import java.util.Collection; import org.uberfire.mvp.Command; import org.uberfire.mvp.ParameterizedCommand; import org.uberfire.preferences.shared.PreferenceScope;
import java.util.*; import org.uberfire.mvp.*; import org.uberfire.preferences.shared.*;
[ "java.util", "org.uberfire.mvp", "org.uberfire.preferences" ]
java.util; org.uberfire.mvp; org.uberfire.preferences;
1,634,988
private void notifyLeave(DetailAST ast, AstState astState) { final Collection<AbstractCheck> visitors = getListOfChecks(ast, astState); if (visitors != null) { for (AbstractCheck check : visitors) { check.leaveToken(ast); } } }
void function(DetailAST ast, AstState astState) { final Collection<AbstractCheck> visitors = getListOfChecks(ast, astState); if (visitors != null) { for (AbstractCheck check : visitors) { check.leaveToken(ast); } } }
/** * Notify checks that leaving a node. * @param ast * the node to notify for * @param astState state of AST. */
Notify checks that leaving a node
notifyLeave
{ "repo_name": "jochenvdv/checkstyle", "path": "src/main/java/com/puppycrawl/tools/checkstyle/TreeWalker.java", "license": "lgpl-2.1", "size": 27138 }
[ "com.puppycrawl.tools.checkstyle.api.AbstractCheck", "com.puppycrawl.tools.checkstyle.api.DetailAST", "java.util.Collection" ]
import com.puppycrawl.tools.checkstyle.api.AbstractCheck; import com.puppycrawl.tools.checkstyle.api.DetailAST; import java.util.Collection;
import com.puppycrawl.tools.checkstyle.api.*; import java.util.*;
[ "com.puppycrawl.tools", "java.util" ]
com.puppycrawl.tools; java.util;
1,028,525
public DBCompound getCompound(String ID, ParameterSet parameters) throws IOException { URL entryURL = new URL(massBankEntryAddress + ID); // Retrieve data logger.finest("Querying URL " + entryURL); String massBankEntry = InetUtils.retrieveData(entryURL); String compoundName = null; ...
DBCompound function(String ID, ParameterSet parameters) throws IOException { URL entryURL = new URL(massBankEntryAddress + ID); logger.finest(STR + entryURL); String massBankEntry = InetUtils.retrieveData(entryURL); String compoundName = null; String compoundFormula = null; URL structure2DURL = null; URL structure3DURL...
/** * This method retrieves the details about the compound * */
This method retrieves the details about the compound
getCompound
{ "repo_name": "du-lab/mzmine2", "path": "src/main/java/net/sf/mzmine/modules/peaklistmethods/identification/onlinedbsearch/databases/MassBankJapanGateway.java", "license": "gpl-2.0", "size": 5131 }
[ "java.io.IOException", "java.util.regex.Matcher", "java.util.regex.Pattern", "net.sf.mzmine.modules.peaklistmethods.identification.onlinedbsearch.DBCompound", "net.sf.mzmine.parameters.ParameterSet", "net.sf.mzmine.util.InetUtils" ]
import java.io.IOException; import java.util.regex.Matcher; import java.util.regex.Pattern; import net.sf.mzmine.modules.peaklistmethods.identification.onlinedbsearch.DBCompound; import net.sf.mzmine.parameters.ParameterSet; import net.sf.mzmine.util.InetUtils;
import java.io.*; import java.util.regex.*; import net.sf.mzmine.modules.peaklistmethods.identification.onlinedbsearch.*; import net.sf.mzmine.parameters.*; import net.sf.mzmine.util.*;
[ "java.io", "java.util", "net.sf.mzmine" ]
java.io; java.util; net.sf.mzmine;
1,267,673
geogig.command(InitOp.class).call(); masterCommit1 = commitAllowEmpty("masterCommit1"); masterCommit2 = commitAllowEmpty("masterCommit2"); Ref branch = geogig.command(BranchCreateOp.class).setName("BRANCH") .setSource(masterCommit2.getId().toString()).setAutoCheckout(true).call...
geogig.command(InitOp.class).call(); masterCommit1 = commitAllowEmpty(STR); masterCommit2 = commitAllowEmpty(STR); Ref branch = geogig.command(BranchCreateOp.class).setName(STR) .setSource(masterCommit2.getId().toString()).setAutoCheckout(true).call(); assertEquals(masterCommit2.getId(), branch.getObjectId()); branchCo...
/** * <pre> * <code> * HEAD * / * masterCommit1 masterCommit2 master...
<code> <code> HEAD masterCommit1 masterCommit2 masterCommit3 mergeCommit masterCommit4 o----------------o----------------o-------------o--------------o \ \ o------------------------o branchCommit1 branchCommit2 \ BRANCH </code> </code>
setUpInternal
{ "repo_name": "marcusthebrown/geogig", "path": "src/core/src/test/java/org/locationtech/geogig/test/integration/RevParseIntegrationTest.java", "license": "bsd-3-clause", "size": 10784 }
[ "com.google.common.collect.ImmutableList", "org.locationtech.geogig.api.CommitBuilder", "org.locationtech.geogig.api.Ref", "org.locationtech.geogig.api.plumbing.UpdateRef", "org.locationtech.geogig.api.porcelain.BranchCreateOp", "org.locationtech.geogig.api.porcelain.CheckoutOp", "org.locationtech.geogi...
import com.google.common.collect.ImmutableList; import org.locationtech.geogig.api.CommitBuilder; import org.locationtech.geogig.api.Ref; import org.locationtech.geogig.api.plumbing.UpdateRef; import org.locationtech.geogig.api.porcelain.BranchCreateOp; import org.locationtech.geogig.api.porcelain.CheckoutOp; import or...
import com.google.common.collect.*; import org.locationtech.geogig.api.*; import org.locationtech.geogig.api.plumbing.*; import org.locationtech.geogig.api.porcelain.*;
[ "com.google.common", "org.locationtech.geogig" ]
com.google.common; org.locationtech.geogig;
2,816,370
public static synchronized void setConfigSettings(String moduleName, Map<String, String> settings) { if (!configExists(moduleName)) { makeConfigFile(moduleName); Logger.getLogger(ModuleSettings.class.getName()).log(Level.INFO, "File did not exist. Created file [" + moduleName + ".pro...
static synchronized void function(String moduleName, Map<String, String> settings) { if (!configExists(moduleName)) { makeConfigFile(moduleName); Logger.getLogger(ModuleSettings.class.getName()).log(Level.INFO, STR + moduleName + STR); } try { Properties props = fetchProperties(moduleName); for (Map.Entry<String, Strin...
/** * Sets the given properties file to the given setting map. * * @param moduleName - The name of the module to be written to. * @param settings - The mapping of all key:value pairs of settings to add * to the config. */
Sets the given properties file to the given setting map
setConfigSettings
{ "repo_name": "eXcomm/autopsy", "path": "Core/src/org/sleuthkit/autopsy/coreutils/ModuleSettings.java", "license": "apache-2.0", "size": 10686 }
[ "java.io.File", "java.io.FileOutputStream", "java.io.IOException", "java.util.Map", "java.util.Properties", "java.util.logging.Level" ]
import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.util.Map; import java.util.Properties; import java.util.logging.Level;
import java.io.*; import java.util.*; import java.util.logging.*;
[ "java.io", "java.util" ]
java.io; java.util;
22,454
@Test public void testDifferentUrlsTemporarySessionAndStatelessPage() { TestPageRenderer renderer = new TestPageRenderer(handler); renderer.redirectToBuffer = true; renderer.sessionTemporary = true; renderer.pageStateless = true; when(urlRenderer.getBaseUrl()).thenReturn(Url.parse("a")); when(request...
void function() { TestPageRenderer renderer = new TestPageRenderer(handler); renderer.redirectToBuffer = true; renderer.sessionTemporary = true; renderer.pageStateless = true; when(urlRenderer.getBaseUrl()).thenReturn(Url.parse("a")); when(requestCycle.mapUrlFor(eq(handler))).thenReturn(Url.parse("b")); renderer.respon...
/** * Tests that when target URL is different and session is temporary and page is stateless this * is special case when page is stateless but there is no session so we can't render it to * buffer */
Tests that when target URL is different and session is temporary and page is stateless this is special case when page is stateless but there is no session so we can't render it to buffer
testDifferentUrlsTemporarySessionAndStatelessPage
{ "repo_name": "topicusonderwijs/wicket", "path": "wicket-core/src/test/java/org/apache/wicket/request/handler/render/WebPageRendererTest.java", "license": "apache-2.0", "size": 29371 }
[ "org.apache.wicket.request.Url", "org.mockito.Mockito" ]
import org.apache.wicket.request.Url; import org.mockito.Mockito;
import org.apache.wicket.request.*; import org.mockito.*;
[ "org.apache.wicket", "org.mockito" ]
org.apache.wicket; org.mockito;
2,554,436
public Block[] getBlocksInArea(Location loc, int height, int radius, Material type) { List<Block> blocks = new ArrayList<Block>(); //Height for (int y = 0; y < height; y++) { for (int x = -radius; x <= radius; x++) { for (int z = -radius; z...
Block[] function(Location loc, int height, int radius, Material type) { List<Block> blocks = new ArrayList<Block>(); for (int y = 0; y < height; y++) { for (int x = -radius; x <= radius; x++) { for (int z = -radius; z <= radius; z++) { Block checkBlock = loc.getBlock().getRelative(x, y, z); if (checkBlock.getType().equ...
/** * Get all the blocks in a specific area centered around the Location passed in * * @param loc Center of the search area * @param height how many blocks up to check * @param radius of the search (cubic search radius) * @param type of Material to search for * * @return all...
Get all the blocks in a specific area centered around the Location passed in
getBlocksInArea
{ "repo_name": "Di3mex/ExtraHardMode", "path": "src/main/java/com/extrahardmode/module/BlockModule.java", "license": "agpl-3.0", "size": 16450 }
[ "java.util.ArrayList", "java.util.List", "org.bukkit.Location", "org.bukkit.Material", "org.bukkit.block.Block" ]
import java.util.ArrayList; import java.util.List; import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.block.Block;
import java.util.*; import org.bukkit.*; import org.bukkit.block.*;
[ "java.util", "org.bukkit", "org.bukkit.block" ]
java.util; org.bukkit; org.bukkit.block;
1,736,480
public ExtensionElement removeExtension(String elementName, String namespace) { String key = XmppStringUtils.generateKey(elementName, namespace); synchronized (packetExtensions) { return packetExtensions.remove(key); } }
ExtensionElement function(String elementName, String namespace) { String key = XmppStringUtils.generateKey(elementName, namespace); synchronized (packetExtensions) { return packetExtensions.remove(key); } }
/** * Remove the stanza(/packet) extension with the given elementName and namespace. * * @param elementName * @param namespace * @return the removed stanza(/packet) extension or null. */
Remove the stanza(/packet) extension with the given elementName and namespace
removeExtension
{ "repo_name": "esl/Smack", "path": "smack-core/src/main/java/org/jivesoftware/smack/packet/Stanza.java", "license": "apache-2.0", "size": 17470 }
[ "org.jxmpp.util.XmppStringUtils" ]
import org.jxmpp.util.XmppStringUtils;
import org.jxmpp.util.*;
[ "org.jxmpp.util" ]
org.jxmpp.util;
2,133,304
void registerCommand(Command command);
void registerCommand(Command command);
/** * Registers the command with the underlying API. * * @param command the command to be registered, cannot be null */
Registers the command with the underlying API
registerCommand
{ "repo_name": "Featherblade/VoxelGunsmith", "path": "src/main/java/com/voxelplugineering/voxelsniper/service/command/CommandRegistrar.java", "license": "mit", "size": 1652 }
[ "com.voxelplugineering.voxelsniper.commands.Command" ]
import com.voxelplugineering.voxelsniper.commands.Command;
import com.voxelplugineering.voxelsniper.commands.*;
[ "com.voxelplugineering.voxelsniper" ]
com.voxelplugineering.voxelsniper;
147,781
@Test public void testPublicCloneable() { DefaultTableXYDataset d1 = new DefaultTableXYDataset(); assertTrue(d1 instanceof PublicCloneable); }
void function() { DefaultTableXYDataset d1 = new DefaultTableXYDataset(); assertTrue(d1 instanceof PublicCloneable); }
/** * Verify that this class implements {@link PublicCloneable}. */
Verify that this class implements <code>PublicCloneable</code>
testPublicCloneable
{ "repo_name": "raincs13/phd", "path": "tests/org/jfree/data/xy/DefaultTableXYDatasetTest.java", "license": "lgpl-2.1", "size": 6676 }
[ "org.jfree.util.PublicCloneable", "org.junit.Assert" ]
import org.jfree.util.PublicCloneable; import org.junit.Assert;
import org.jfree.util.*; import org.junit.*;
[ "org.jfree.util", "org.junit" ]
org.jfree.util; org.junit;
482,398
public List<NodeTypeDefinition> readAllNodeTypes() { CachedNode nodeTypes = nodeTypesNode(); List<NodeTypeDefinition> defns = new ArrayList<NodeTypeDefinition>(); for (ChildReference ref : nodeTypes.getChildReferences(system)) { CachedNode nodeType = system.getNode(ref); ...
List<NodeTypeDefinition> function() { CachedNode nodeTypes = nodeTypesNode(); List<NodeTypeDefinition> defns = new ArrayList<NodeTypeDefinition>(); for (ChildReference ref : nodeTypes.getChildReferences(system)) { CachedNode nodeType = system.getNode(ref); defns.add(readNodeTypeDefinition(nodeType)); } return defns; }
/** * Read from system storage all of the node type definitions. * * @return the node types as read from the system storage */
Read from system storage all of the node type definitions
readAllNodeTypes
{ "repo_name": "flownclouds/modeshape", "path": "modeshape-jcr/src/main/java/org/modeshape/jcr/SystemContent.java", "license": "apache-2.0", "size": 71800 }
[ "java.util.ArrayList", "java.util.List", "javax.jcr.nodetype.NodeTypeDefinition", "org.modeshape.jcr.cache.CachedNode", "org.modeshape.jcr.cache.ChildReference" ]
import java.util.ArrayList; import java.util.List; import javax.jcr.nodetype.NodeTypeDefinition; import org.modeshape.jcr.cache.CachedNode; import org.modeshape.jcr.cache.ChildReference;
import java.util.*; import javax.jcr.nodetype.*; import org.modeshape.jcr.cache.*;
[ "java.util", "javax.jcr", "org.modeshape.jcr" ]
java.util; javax.jcr; org.modeshape.jcr;
2,507,559
@Test public final void testCreateXBeeExceptionMessageNull() { // Setup the resources for the test. String message = null; // Call the method under test. XBeeException e = new XBeeException(message); // Verify the result. assertThat("Created 'XBeeException' does not have the expected message", ...
final void function() { String message = null; XBeeException e = new XBeeException(message); assertThat(STR, e.getMessage(), is(equalTo(message))); assertThat(STR, e.getCause(), is(nullValue(Throwable.class))); }
/** * Test method for {@link com.digi.xbee.api.exceptions.XBeeException#XBeeException(String)}. */
Test method for <code>com.digi.xbee.api.exceptions.XBeeException#XBeeException(String)</code>
testCreateXBeeExceptionMessageNull
{ "repo_name": "digidotcom/XBeeJavaLibrary", "path": "library/src/test/java/com/digi/xbee/api/exceptions/XBeeExceptionTest.java", "license": "mpl-2.0", "size": 7610 }
[ "org.hamcrest.core.Is", "org.junit.Assert" ]
import org.hamcrest.core.Is; import org.junit.Assert;
import org.hamcrest.core.*; import org.junit.*;
[ "org.hamcrest.core", "org.junit" ]
org.hamcrest.core; org.junit;
2,468,362
public T caseDependentAxis(final DependentAxis object) { return null; }
T function(final DependentAxis object) { return null; }
/** * Returns the result of interpreting the object as an instance of * '<em>Dependent Axis</em>'. <!-- begin-user-doc --> This implementation * returns null; returning a non-null result will terminate the switch. <!-- * end-user-doc --> * * @param object the target of the switch. * @return the result of ...
Returns the result of interpreting the object as an instance of 'Dependent Axis'. This implementation returns null; returning a non-null result will terminate the switch.
caseDependentAxis
{ "repo_name": "debrief/debrief", "path": "info.limpet.stackedcharts.model/src/info/limpet/stackedcharts/model/util/StackedchartsSwitch.java", "license": "epl-1.0", "size": 20487 }
[ "info.limpet.stackedcharts.model.DependentAxis" ]
import info.limpet.stackedcharts.model.DependentAxis;
import info.limpet.stackedcharts.model.*;
[ "info.limpet.stackedcharts" ]
info.limpet.stackedcharts;
628,459
@After public void tearDown() { em.remove(em.find(Person.class, "1")); em.remove(em.find(Person.class, "2")); em.remove(em.find(Person.class, "3")); em.remove(em.find(Person.class, "4")); em.close(); emf.close(); }
void function() { em.remove(em.find(Person.class, "1")); em.remove(em.find(Person.class, "2")); em.remove(em.find(Person.class, "3")); em.remove(em.find(Person.class, "4")); em.close(); emf.close(); }
/** * Tear down. */
Tear down
tearDown
{ "repo_name": "impetus-opensource/Kundera", "path": "src/kundera-cassandra/cassandra-core/src/test/java/com/impetus/client/esindexer/CassandraESAggregationTest.java", "license": "apache-2.0", "size": 2978 }
[ "com.impetus.kundera.query.Person" ]
import com.impetus.kundera.query.Person;
import com.impetus.kundera.query.*;
[ "com.impetus.kundera" ]
com.impetus.kundera;
380,137
@Indexable(type = IndexableType.DELETE) public benefit_rating_lkp deletebenefit_rating_lkp(long id) throws PortalException, SystemException { return benefit_rating_lkpPersistence.remove(id); }
@Indexable(type = IndexableType.DELETE) benefit_rating_lkp function(long id) throws PortalException, SystemException { return benefit_rating_lkpPersistence.remove(id); }
/** * Deletes the benefit_rating_lkp with the primary key from the database. Also notifies the appropriate model listeners. * * @param id the primary key of the benefit_rating_lkp * @return the benefit_rating_lkp that was removed * @throws PortalException if a benefit_rating_lkp with the primary key could not...
Deletes the benefit_rating_lkp with the primary key from the database. Also notifies the appropriate model listeners
deletebenefit_rating_lkp
{ "repo_name": "iucn-whp/world-heritage-outlook", "path": "portlets/iucn-dbservice-portlet/docroot/WEB-INF/src/com/iucn/whp/dbservice/service/base/benefit_rating_lkpLocalServiceBaseImpl.java", "license": "gpl-2.0", "size": 175742 }
[ "com.liferay.portal.kernel.exception.PortalException", "com.liferay.portal.kernel.exception.SystemException", "com.liferay.portal.kernel.search.Indexable", "com.liferay.portal.kernel.search.IndexableType" ]
import com.liferay.portal.kernel.exception.PortalException; import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.kernel.search.Indexable; import com.liferay.portal.kernel.search.IndexableType;
import com.liferay.portal.kernel.exception.*; import com.liferay.portal.kernel.search.*;
[ "com.liferay.portal" ]
com.liferay.portal;
1,159,831
public static MdscDictionaryPool getInstance() { if ( instance == null ) { instance = new MdscDictionaryPool(); } return instance; } //--------------------------------------------- private final DictionaryManager abbreviationDictionaryManager; privat...
static MdscDictionaryPool function() { if ( instance == null ) { instance = new MdscDictionaryPool(); } return instance; } private final DictionaryManager abbreviationDictionaryManager; private final DictionarySet abbreviationDictionaries; private final DictionaryManager wordDictionaryManager; private final DictionaryS...
/** * Retrieves the instance of this class. * @return the instance of this class */
Retrieves the instance of this class
getInstance
{ "repo_name": "sjbutler/nominal", "path": "src/main/java/uk/ac/open/crc/nominal/rules/MdscDictionaryPool.java", "license": "apache-2.0", "size": 3546 }
[ "uk.ac.open.crc.mdsc.AbbreviationDictionaryManager", "uk.ac.open.crc.mdsc.AcronymDictionaryManager", "uk.ac.open.crc.mdsc.DictionaryManager", "uk.ac.open.crc.mdsc.DictionarySet", "uk.ac.open.crc.mdsc.NormalisedDictionaryManager", "uk.ac.open.crc.mdsc.NormalisedIso3166DictionaryManager" ]
import uk.ac.open.crc.mdsc.AbbreviationDictionaryManager; import uk.ac.open.crc.mdsc.AcronymDictionaryManager; import uk.ac.open.crc.mdsc.DictionaryManager; import uk.ac.open.crc.mdsc.DictionarySet; import uk.ac.open.crc.mdsc.NormalisedDictionaryManager; import uk.ac.open.crc.mdsc.NormalisedIso3166DictionaryManager;
import uk.ac.open.crc.mdsc.*;
[ "uk.ac.open" ]
uk.ac.open;
884,300
public ResourceLocalService getResourceLocalService() { return resourceLocalService; }
ResourceLocalService function() { return resourceLocalService; }
/** * Returns the resource local service. * * @return the resource local service */
Returns the resource local service
getResourceLocalService
{ "repo_name": "fraunhoferfokus/govapps", "path": "data-portlet/src/main/java/de/fraunhofer/fokus/movepla/service/base/RelatedApplicationsServiceBaseImpl.java", "license": "bsd-3-clause", "size": 32904 }
[ "com.liferay.portal.service.ResourceLocalService" ]
import com.liferay.portal.service.ResourceLocalService;
import com.liferay.portal.service.*;
[ "com.liferay.portal" ]
com.liferay.portal;
2,213,228
public void commitResource(ContentResourceEdit edit) throws OverQuotaException, ServerOverloadException { commitResource(edit, NotificationService.NOTI_OPTIONAL); } // commitResource
void function(ContentResourceEdit edit) throws OverQuotaException, ServerOverloadException { commitResource(edit, NotificationService.NOTI_OPTIONAL); }
/** * Commit the changes made, and release the lock. The Object is disabled, and not to be used after this call. * * @param edit * The ContentResourceEdit object to commit. * @exception OverQuotaException * if this would result in being over quota (the edit is then cancled). * @exceptio...
Commit the changes made, and release the lock. The Object is disabled, and not to be used after this call
commitResource
{ "repo_name": "marktriggs/nyu-sakai-10.4", "path": "kernel/kernel-impl/src/main/java/org/sakaiproject/content/impl/BaseContentService.java", "license": "apache-2.0", "size": 426240 }
[ "org.sakaiproject.content.api.ContentResourceEdit", "org.sakaiproject.event.api.NotificationService", "org.sakaiproject.exception.OverQuotaException", "org.sakaiproject.exception.ServerOverloadException" ]
import org.sakaiproject.content.api.ContentResourceEdit; import org.sakaiproject.event.api.NotificationService; import org.sakaiproject.exception.OverQuotaException; import org.sakaiproject.exception.ServerOverloadException;
import org.sakaiproject.content.api.*; import org.sakaiproject.event.api.*; import org.sakaiproject.exception.*;
[ "org.sakaiproject.content", "org.sakaiproject.event", "org.sakaiproject.exception" ]
org.sakaiproject.content; org.sakaiproject.event; org.sakaiproject.exception;
2,109,283
VpcPeeringConnectionCollection getRequestedVpcPeeringConnections( DescribeVpcPeeringConnectionsRequest request);
VpcPeeringConnectionCollection getRequestedVpcPeeringConnections( DescribeVpcPeeringConnectionsRequest request);
/** * Retrieves the RequestedVpcPeeringConnections collection referenced by * this resource. */
Retrieves the RequestedVpcPeeringConnections collection referenced by this resource
getRequestedVpcPeeringConnections
{ "repo_name": "smartpcr/aws-sdk-java-resources", "path": "aws-resources-ec2/src/main/java/com/amazonaws/resources/ec2/Vpc.java", "license": "apache-2.0", "size": 28564 }
[ "com.amazonaws.services.ec2.model.DescribeVpcPeeringConnectionsRequest" ]
import com.amazonaws.services.ec2.model.DescribeVpcPeeringConnectionsRequest;
import com.amazonaws.services.ec2.model.*;
[ "com.amazonaws.services" ]
com.amazonaws.services;
1,920,995
private static void ensureDimensionMatches(final int expected, final GridExtent extent) throws MismatchedDimensionException { if (extent != null) { final int dimension = extent.getDimension(); if (dimension != expected) { throw new MismatchedDimensionException(Errors....
static void function(final int expected, final GridExtent extent) throws MismatchedDimensionException { if (extent != null) { final int dimension = extent.getDimension(); if (dimension != expected) { throw new MismatchedDimensionException(Errors.format( Errors.Keys.MismatchedDimension_3, STR, expected, dimension)); } }...
/** * Ensures that the given dimension is equals to the expected value. If not, throws an exception. * This method assumes that the argument name is {@code "extent"}. * * @param extent the extent to validate, or {@code null} if none. * @param expected the expected number of dimension. ...
Ensures that the given dimension is equals to the expected value. If not, throws an exception. This method assumes that the argument name is "extent"
ensureDimensionMatches
{ "repo_name": "apache/sis", "path": "core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridGeometry.java", "license": "apache-2.0", "size": 98612 }
[ "org.apache.sis.util.resources.Errors", "org.opengis.geometry.MismatchedDimensionException" ]
import org.apache.sis.util.resources.Errors; import org.opengis.geometry.MismatchedDimensionException;
import org.apache.sis.util.resources.*; import org.opengis.geometry.*;
[ "org.apache.sis", "org.opengis.geometry" ]
org.apache.sis; org.opengis.geometry;
2,606,041
public static UserStoreCountRetriever getCounterInstanceForDomain(String domain) throws UserStoreCounterException { if (StringUtils.isEmpty(domain)) { domain = IdentityUtil.getPrimaryDomainName(); } RealmConfiguration realmConfiguration = getUserStoreList().get(domain); ...
static UserStoreCountRetriever function(String domain) throws UserStoreCounterException { if (StringUtils.isEmpty(domain)) { domain = IdentityUtil.getPrimaryDomainName(); } RealmConfiguration realmConfiguration = getUserStoreList().get(domain); if (realmConfiguration != null && realmConfiguration.getUserStoreProperty(c...
/** * Create an instance of the given count retriever class * * @param domain * @return * @throws UserStoreCounterException */
Create an instance of the given count retriever class
getCounterInstanceForDomain
{ "repo_name": "PasinduTennage/carbon-identity-framework", "path": "components/user-store/org.wso2.carbon.identity.user.store.count/src/main/java/org/wso2/carbon/identity/user/store/count/util/UserStoreCountUtils.java", "license": "apache-2.0", "size": 9797 }
[ "org.apache.commons.lang.StringUtils", "org.wso2.carbon.identity.core.util.IdentityUtil", "org.wso2.carbon.identity.user.store.count.UserStoreCountRetriever", "org.wso2.carbon.identity.user.store.count.exception.UserStoreCounterException", "org.wso2.carbon.identity.user.store.count.internal.UserStoreCountDa...
import org.apache.commons.lang.StringUtils; import org.wso2.carbon.identity.core.util.IdentityUtil; import org.wso2.carbon.identity.user.store.count.UserStoreCountRetriever; import org.wso2.carbon.identity.user.store.count.exception.UserStoreCounterException; import org.wso2.carbon.identity.user.store.count.internal.Us...
import org.apache.commons.lang.*; import org.wso2.carbon.identity.core.util.*; import org.wso2.carbon.identity.user.store.count.*; import org.wso2.carbon.identity.user.store.count.exception.*; import org.wso2.carbon.identity.user.store.count.internal.*; import org.wso2.carbon.user.api.*;
[ "org.apache.commons", "org.wso2.carbon" ]
org.apache.commons; org.wso2.carbon;
2,109,451
UserGridJob removeUserJob(UserGridJob job) throws ServiceException;
UserGridJob removeUserJob(UserGridJob job) throws ServiceException;
/** * Remove the given job from the Grid (if necessary) and from the job * database. */
Remove the given job from the Grid (if necessary) and from the job database
removeUserJob
{ "repo_name": "sguazt/dcsj-sharegrid-portal", "path": "src/java/it/unipmn/di/dcs/sharegrid/web/service/IGridJobExecutionService.java", "license": "gpl-3.0", "size": 4434 }
[ "it.unipmn.di.dcs.sharegrid.web.model.UserGridJob" ]
import it.unipmn.di.dcs.sharegrid.web.model.UserGridJob;
import it.unipmn.di.dcs.sharegrid.web.model.*;
[ "it.unipmn.di" ]
it.unipmn.di;
773,669
public void simulate(CardList<T> cardList, Agent<T> agent, int numberOfGames) { simulate(cardList, agent, numberOfGames, this.defaultSkipDrawStep); }
void function(CardList<T> cardList, Agent<T> agent, int numberOfGames) { simulate(cardList, agent, numberOfGames, this.defaultSkipDrawStep); }
/** * Simulates the specified number of games, skipping the first draw step if * {@link #isDefaultSkipDrawStep()} returns true * * @param cardList * the list of cards that makes up the library * @param agent * the agent observing and controlling the game ...
Simulates the specified number of games, skipping the first draw step if <code>#isDefaultSkipDrawStep()</code> returns true
simulate
{ "repo_name": "GoldfishMTG/simulation", "path": "src/org/goldfishmtg/simulation/SimulationService.java", "license": "mit", "size": 7242 }
[ "org.goldfishmtg.cards.CardList" ]
import org.goldfishmtg.cards.CardList;
import org.goldfishmtg.cards.*;
[ "org.goldfishmtg.cards" ]
org.goldfishmtg.cards;
2,056,489
@Test public void testOrderOfConditions() throws Exception { PigServer pigServer = new PigServer(Util.getLocalTestMode()); Data data = resetData(pigServer); data.set("foo", tuple(1), tuple(5), tuple(10), tuple(15), ...
void function() throws Exception { PigServer pigServer = new PigServer(Util.getLocalTestMode()); Data data = resetData(pigServer); data.set("foo", tuple(1), tuple(5), tuple(10), tuple(15), tuple(20), tuple(25), tuple(30) ); pigServer.registerQuery(STR); pigServer.registerQuery(STR + STR + STR + STR + STR + STR + ");");...
/** * Verify that CASE statement preserves the order of conditions. * @throws Exception */
Verify that CASE statement preserves the order of conditions
testOrderOfConditions
{ "repo_name": "netxillon/pig", "path": "test/org/apache/pig/test/TestCase.java", "license": "apache-2.0", "size": 14532 }
[ "java.util.List", "junit.framework.Assert", "org.apache.pig.PigServer", "org.apache.pig.builtin.mock.Storage", "org.apache.pig.data.Tuple" ]
import java.util.List; import junit.framework.Assert; import org.apache.pig.PigServer; import org.apache.pig.builtin.mock.Storage; import org.apache.pig.data.Tuple;
import java.util.*; import junit.framework.*; import org.apache.pig.*; import org.apache.pig.builtin.mock.*; import org.apache.pig.data.*;
[ "java.util", "junit.framework", "org.apache.pig" ]
java.util; junit.framework; org.apache.pig;
1,674,380
public static String string(ObjectNode node, String name) { return node.path(name).asText(); }
static String function(ObjectNode node, String name) { return node.path(name).asText(); }
/** * Returns the specified node property as a string. * * @param node object node * @param name property name * @return property as a string */
Returns the specified node property as a string
string
{ "repo_name": "sdnwiselab/onos", "path": "core/api/src/main/java/org/onosproject/ui/JsonUtils.java", "license": "apache-2.0", "size": 4550 }
[ "com.fasterxml.jackson.databind.node.ObjectNode" ]
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.fasterxml.jackson.databind.node.*;
[ "com.fasterxml.jackson" ]
com.fasterxml.jackson;
38,184
public CmsUser getResponsible() { return m_responsible; }
CmsUser function() { return m_responsible; }
/** * Returns the responsible.<p> * * @return the responsible */
Returns the responsible
getResponsible
{ "repo_name": "it-tavis/opencms-core", "path": "src/org/opencms/notification/CmsContentNotification.java", "license": "lgpl-2.1", "size": 18853 }
[ "org.opencms.file.CmsUser" ]
import org.opencms.file.CmsUser;
import org.opencms.file.*;
[ "org.opencms.file" ]
org.opencms.file;
2,634,804
@Override public boolean equals(final Object aThat) { Object proxyThat = aThat; if ( this == aThat ) { return true; } if (aThat instanceof HibernateProxy) { // narrow down the proxy to the class we are dealing with. try { proxyThat = ((HibernateProxy) aThat).getHibernateLazyInitialize...
boolean function(final Object aThat) { Object proxyThat = aThat; if ( this == aThat ) { return true; } if (aThat instanceof HibernateProxy) { try { proxyThat = ((HibernateProxy) aThat).getHibernateLazyInitializer().getImplementation(); } catch (org.hibernate.ObjectNotFoundException e) { return false; } } if (aThat == n...
/** Equals implementation. * @see java.lang.Object#equals(java.lang.Object) * @param aThat Object to compare with * @return true/false */
Equals implementation
equals
{ "repo_name": "rpgm/mi15", "path": "rpgm/modules/repository/src/main/java/org/yarlithub/yschool/repository/model/obj/yschool/Division.java", "license": "apache-2.0", "size": 7146 }
[ "org.hibernate.proxy.HibernateProxy" ]
import org.hibernate.proxy.HibernateProxy;
import org.hibernate.proxy.*;
[ "org.hibernate.proxy" ]
org.hibernate.proxy;
2,349,833
private SuffixTreeNode search(SuffixTreeNode startNode, List<String> suffix, int pathIndex) { if (suffix.isEmpty()) { throw new IllegalArgumentException( "Empty suffix. Probably no valid simple suffix tree exists for the input."); } Collection<SuffixTreeNode> children = start...
SuffixTreeNode function(SuffixTreeNode startNode, List<String> suffix, int pathIndex) { if (suffix.isEmpty()) { throw new IllegalArgumentException( STR); } Collection<SuffixTreeNode> children = startNode.children; for (SuffixTreeNode child : children) { if (child.incomingEdge.label.equals(suffix.get(0))) { child.incomi...
/** * Metodo auxiliar para addSuffix(). Busca en que nodo del arbol debe empezar * a desarrollar la nueva rama. Para ello, recorre el arbol buscando * coincidencias ya existentes. */
Metodo auxiliar para addSuffix(). Busca en que nodo del arbol debe empezar a desarrollar la nueva rama. Para ello, recorre el arbol buscando coincidencias ya existentes
search
{ "repo_name": "MrJavo94/SuffixTree", "path": "src/compactSuffixTree/SuffixTreeNode.java", "license": "mit", "size": 3532 }
[ "java.util.Collection", "java.util.List" ]
import java.util.Collection; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,151,384
@ServiceMethod(returns = ReturnType.SINGLE) public MachineExtensionInner get(String resourceGroupName, String machineName, String extensionName) { return getAsync(resourceGroupName, machineName, extensionName).block(); }
@ServiceMethod(returns = ReturnType.SINGLE) MachineExtensionInner function(String resourceGroupName, String machineName, String extensionName) { return getAsync(resourceGroupName, machineName, extensionName).block(); }
/** * The operation to get the extension. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param machineName The name of the machine containing the extension. * @param extensionName The name of the machine extension. * @throws IllegalArgumentExc...
The operation to get the extension
get
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/hybridcompute/azure-resourcemanager-hybridcompute/src/main/java/com/azure/resourcemanager/hybridcompute/implementation/MachineExtensionsClientImpl.java", "license": "mit", "size": 74820 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.resourcemanager.hybridcompute.fluent.models.MachineExtensionInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.hybridcompute.fluent.models.MachineExtensionInner;
import com.azure.core.annotation.*; import com.azure.resourcemanager.hybridcompute.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
2,569,974
public AchievementUser find(UserId userId, AchievementId achievementId) throws DataOperationException { return this.achievementUserDao.find(userId, achievementId); }
AchievementUser function(UserId userId, AchievementId achievementId) throws DataOperationException { return this.achievementUserDao.find(userId, achievementId); }
/** * Finds a user's achievement record. * * @param userId * The user to look up. * @param achievementId * The achievement to look up. * @return The user's achievement progress, may be null. * @throws DataOperationException * If the query could not be executed. */
Finds a user's achievement record
find
{ "repo_name": "efsavage/ajah", "path": "ajah-achievement/src/main/java/com/ajah/user/achievement/data/AchievementUserManager.java", "license": "apache-2.0", "size": 8016 }
[ "com.ajah.spring.jdbc.err.DataOperationException", "com.ajah.user.UserId", "com.ajah.user.achievement.AchievementId", "com.ajah.user.achievement.AchievementUser" ]
import com.ajah.spring.jdbc.err.DataOperationException; import com.ajah.user.UserId; import com.ajah.user.achievement.AchievementId; import com.ajah.user.achievement.AchievementUser;
import com.ajah.spring.jdbc.err.*; import com.ajah.user.*; import com.ajah.user.achievement.*;
[ "com.ajah.spring", "com.ajah.user" ]
com.ajah.spring; com.ajah.user;
2,634,061
EAttribute getMSensor_CallbackPeriod();
EAttribute getMSensor_CallbackPeriod();
/** * Returns the meta object for the attribute '{@link org.openhab.binding.tinkerforge.internal.model.MSensor#getCallbackPeriod <em>Callback Period</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Callback Period</em>'. * @see org.openhab.binding...
Returns the meta object for the attribute '<code>org.openhab.binding.tinkerforge.internal.model.MSensor#getCallbackPeriod Callback Period</code>'.
getMSensor_CallbackPeriod
{ "repo_name": "noushadali/openhab", "path": "bundles/binding/org.openhab.binding.tinkerforge/src/main/java/org/openhab/binding/tinkerforge/internal/model/ModelPackage.java", "license": "gpl-3.0", "size": 247420 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,609,331
public static Sail getInstance(final Configuration conf) throws AccumuloException, AccumuloSecurityException, RyaDAOException, InferenceEngineException, SailException { requireNonNull(conf); return getRyaSail(conf); }
static Sail function(final Configuration conf) throws AccumuloException, AccumuloSecurityException, RyaDAOException, InferenceEngineException, SailException { requireNonNull(conf); return getRyaSail(conf); }
/** * Creates an instance of {@link Sail} that is attached to a Rya instance. * * @param conf - Configures how the Sail object will be constructed. (not null) * @return A {@link Sail} object that is backed by a Rya datastore. * @throws SailException The object could not be created. */
Creates an instance of <code>Sail</code> that is attached to a Rya instance
getInstance
{ "repo_name": "apache/incubator-rya", "path": "extras/indexing/src/main/java/org/apache/rya/sail/config/RyaSailFactory.java", "license": "apache-2.0", "size": 13307 }
[ "java.util.Objects", "org.apache.accumulo.core.client.AccumuloException", "org.apache.accumulo.core.client.AccumuloSecurityException", "org.apache.hadoop.conf.Configuration", "org.apache.rya.api.persist.RyaDAOException", "org.apache.rya.rdftriplestore.inference.InferenceEngineException", "org.eclipse.rd...
import java.util.Objects; import org.apache.accumulo.core.client.AccumuloException; import org.apache.accumulo.core.client.AccumuloSecurityException; import org.apache.hadoop.conf.Configuration; import org.apache.rya.api.persist.RyaDAOException; import org.apache.rya.rdftriplestore.inference.InferenceEngineException; i...
import java.util.*; import org.apache.accumulo.core.client.*; import org.apache.hadoop.conf.*; import org.apache.rya.api.persist.*; import org.apache.rya.rdftriplestore.inference.*; import org.eclipse.rdf4j.sail.*;
[ "java.util", "org.apache.accumulo", "org.apache.hadoop", "org.apache.rya", "org.eclipse.rdf4j" ]
java.util; org.apache.accumulo; org.apache.hadoop; org.apache.rya; org.eclipse.rdf4j;
1,248,496
private void parseAndAssert(boolean addRandomFields) throws IOException { XContentType xContentType = randomFrom(XContentType.values()); final ToXContent.Params params = new ToXContent.MapParams(singletonMap(RestSearchAction.TYPED_KEYS_PARAM, "true")); Aggregations aggregations = createTestI...
void function(boolean addRandomFields) throws IOException { XContentType xContentType = randomFrom(XContentType.values()); final ToXContent.Params params = new ToXContent.MapParams(singletonMap(RestSearchAction.TYPED_KEYS_PARAM, "true")); Aggregations aggregations = createTestInstance(); BytesReference originalBytes = ...
/** * Test that parsing works for a randomly created Aggregations object with a * randomized aggregation tree. The test randomly chooses an * {@link XContentType}, randomizes the order of the {@link XContent} fields * and randomly sets the `humanReadable` flag when rendering the * {@link XConte...
Test that parsing works for a randomly created Aggregations object with a randomized aggregation tree. The test randomly chooses an <code>XContentType</code>, randomizes the order of the <code>XContent</code> fields and randomly sets the `humanReadable` flag when rendering the <code>XContent</code>
parseAndAssert
{ "repo_name": "gfyoung/elasticsearch", "path": "server/src/test/java/org/elasticsearch/search/aggregations/AggregationsTests.java", "license": "apache-2.0", "size": 16328 }
[ "java.io.IOException", "java.util.function.Predicate", "org.elasticsearch.common.bytes.BytesReference", "org.elasticsearch.common.xcontent.ToXContent", "org.elasticsearch.common.xcontent.XContentHelper", "org.elasticsearch.common.xcontent.XContentParser", "org.elasticsearch.common.xcontent.XContentType"...
import java.io.IOException; import java.util.function.Predicate; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.xcontent.ToXContent; import org.elasticsearch.common.xcontent.XContentHelper; import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.common.xc...
import java.io.*; import java.util.function.*; import org.elasticsearch.common.bytes.*; import org.elasticsearch.common.xcontent.*; import org.elasticsearch.rest.action.search.*; import org.elasticsearch.search.aggregations.*; import org.elasticsearch.test.*; import org.elasticsearch.test.hamcrest.*;
[ "java.io", "java.util", "org.elasticsearch.common", "org.elasticsearch.rest", "org.elasticsearch.search", "org.elasticsearch.test" ]
java.io; java.util; org.elasticsearch.common; org.elasticsearch.rest; org.elasticsearch.search; org.elasticsearch.test;
2,654,775
public void testAddTransactionLineToDocument() throws Exception { LOG.info("testAddTransactionLineToDocument() entered."); CashDecreaseDocument cashDecreaseDocument = createCashDecreaseDocumentDocument(); processFeeTransactionsServiceImpl.setDocumentOverviewAndDetails(cashDecreaseDocume...
void function() throws Exception { LOG.info(STR); CashDecreaseDocument cashDecreaseDocument = createCashDecreaseDocumentDocument(); processFeeTransactionsServiceImpl.setDocumentOverviewAndDetails(cashDecreaseDocument, feeMethod1.getName()); EndowmentSourceTransactionLine line = (EndowmentSourceTransactionLine) Endowmen...
/** * test to validate addTransactionLineToDocument method in the impl class. * * @see org.kuali.kfs.module.endow.batch.service.impl.ProcessFeeTransactionsServiceImpl#addTransactionLineToDocument(CashDecreaseDocument, * org.kuali.kfs.module.endow.businessobject.EndowmentSourceTransactionLi...
test to validate addTransactionLineToDocument method in the impl class
testAddTransactionLineToDocument
{ "repo_name": "ua-eas/ua-kfs-5.3", "path": "test/unit/src/org/kuali/kfs/module/endow/batch/service/impl/ProcessFeeTransactionsServiceImplTest.java", "license": "agpl-3.0", "size": 31001 }
[ "org.kuali.kfs.module.endow.businessobject.EndowmentSourceTransactionLine", "org.kuali.kfs.module.endow.document.CashDecreaseDocument", "org.kuali.kfs.module.endow.fixture.EndowmentTransactionLineFixture" ]
import org.kuali.kfs.module.endow.businessobject.EndowmentSourceTransactionLine; import org.kuali.kfs.module.endow.document.CashDecreaseDocument; import org.kuali.kfs.module.endow.fixture.EndowmentTransactionLineFixture;
import org.kuali.kfs.module.endow.businessobject.*; import org.kuali.kfs.module.endow.document.*; import org.kuali.kfs.module.endow.fixture.*;
[ "org.kuali.kfs" ]
org.kuali.kfs;
1,004,755
public void setCookieHandler(CookieHandler cookieHandler) { this.cookieHandler = cookieHandler; }
void function(CookieHandler cookieHandler) { this.cookieHandler = cookieHandler; }
/** * Configure a cookie handler to maintain a HTTP session */
Configure a cookie handler to maintain a HTTP session
setCookieHandler
{ "repo_name": "objectiser/camel", "path": "components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowEndpoint.java", "license": "apache-2.0", "size": 20551 }
[ "org.apache.camel.http.common.cookie.CookieHandler" ]
import org.apache.camel.http.common.cookie.CookieHandler;
import org.apache.camel.http.common.cookie.*;
[ "org.apache.camel" ]
org.apache.camel;
1,856,005
public static void setContext(Context context) { ContextUtil.context = context; }
static void function(Context context) { ContextUtil.context = context; }
/** * Method that allow to set context with the actual context. * * @param context the context to be "store". */
Method that allow to set context with the actual context
setContext
{ "repo_name": "GreenBlueBit/android-xpreader", "path": "app/src/main/java/uk/projectchronos/xplorationreader/utils/ContextUtil.java", "license": "apache-2.0", "size": 710 }
[ "android.content.Context" ]
import android.content.Context;
import android.content.*;
[ "android.content" ]
android.content;
1,812,648
public static Attachment fromBinaryBytes( byte[] bytes, MediaType mediaType ) { if( !mediaType.isBinary() ) { throw new IllegalArgumentException( "MediaType must be binary" ); } return new Attachment(BaseEncoding.base64().encode( bytes ), mediaType, null ); }
static Attachment function( byte[] bytes, MediaType mediaType ) { if( !mediaType.isBinary() ) { throw new IllegalArgumentException( STR ); } return new Attachment(BaseEncoding.base64().encode( bytes ), mediaType, null ); }
/** * Creates an attachment from a given array of bytes. * The bytes will be Base64 encoded. * @throws java.lang.IllegalArgumentException if mediaType is not binary */
Creates an attachment from a given array of bytes. The bytes will be Base64 encoded
fromBinaryBytes
{ "repo_name": "TNG/JGiven", "path": "jgiven-core/src/main/java/com/tngtech/jgiven/attachment/Attachment.java", "license": "apache-2.0", "size": 8966 }
[ "com.google.common.io.BaseEncoding" ]
import com.google.common.io.BaseEncoding;
import com.google.common.io.*;
[ "com.google.common" ]
com.google.common;
2,067,251
public void setStrokingColor(int r, int g, int b) throws IOException { if (isOutside255Interval(r) || isOutside255Interval(g) || isOutside255Interval(b)) { throw new IllegalArgumentException("Parameters must be within 0..255, but are " + String.format("(%d,%d,%d)"...
void function(int r, int g, int b) throws IOException { if (isOutside255Interval(r) isOutside255Interval(g) isOutside255Interval(b)) { throw new IllegalArgumentException(STR + String.format(STR, r, g, b)); } writeOperand(r / 255f); writeOperand(g / 255f); writeOperand(b / 255f); writeOperator("RG"); }
/** * Set the stroking color in the DeviceRGB color space. Range is 0..255. * * @param r The red value * @param g The green value. * @param b The blue value. * @throws IOException If an IO error occurs while writing to the stream. * @throws IllegalArgumentException If the parameters a...
Set the stroking color in the DeviceRGB color space. Range is 0..255
setStrokingColor
{ "repo_name": "mdamt/pdfbox", "path": "pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageContentStream.java", "license": "apache-2.0", "size": 73880 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
97,409
public static <E> ListOrderedSet<E> listOrderedSet(final List<E> list) { if (list == null) { throw new NullPointerException("List must not be null"); } CollectionUtils.filter(list, UniquePredicate.uniquePredicate()); final Set<E> set = new HashSet<E>(list); retur...
static <E> ListOrderedSet<E> function(final List<E> list) { if (list == null) { throw new NullPointerException(STR); } CollectionUtils.filter(list, UniquePredicate.uniquePredicate()); final Set<E> set = new HashSet<E>(list); return new ListOrderedSet<E>(set, list); } public ListOrderedSet() { super(new HashSet<E>()); s...
/** * Factory method to create an ordered set using the supplied list to retain order. * <p> * A <code>HashSet</code> is used for the set behaviour. * <p> * NOTE: If the list contains duplicates, the duplicates are removed, * altering the specified list. * * @param <E> the elemen...
Factory method to create an ordered set using the supplied list to retain order. A <code>HashSet</code> is used for the set behaviour. altering the specified list
listOrderedSet
{ "repo_name": "AffogatoLang/Moka", "path": "lib/Apache_Commons_Collections/src/main/java/org/apache/commons/collections4/set/ListOrderedSet.java", "license": "bsd-3-clause", "size": 13389 }
[ "java.util.ArrayList", "java.util.HashSet", "java.util.List", "java.util.Set", "org.apache.commons.collections4.CollectionUtils", "org.apache.commons.collections4.functors.UniquePredicate" ]
import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.functors.UniquePredicate;
import java.util.*; import org.apache.commons.collections4.*; import org.apache.commons.collections4.functors.*;
[ "java.util", "org.apache.commons" ]
java.util; org.apache.commons;
2,636,881
private T getPointFromLargestNumberCluster(final Collection<? extends Cluster<T>> clusters) throws ConvergenceException { int maxNumber = 0; Cluster<T> selected = null; for (final Cluster<T> cluster : clusters) { // get the number of points of the current cluster ...
T function(final Collection<? extends Cluster<T>> clusters) throws ConvergenceException { int maxNumber = 0; Cluster<T> selected = null; for (final Cluster<T> cluster : clusters) { final int number = cluster.getPoints().size(); if (number > maxNumber) { maxNumber = number; selected = cluster; } } if (selected == null) ...
/** * Get a random point from the {@link Cluster} with the largest number of points * * @param clusters the {@link Cluster}s to search * @return a random point from the selected cluster * @throws ConvergenceException if clusters are all empty */
Get a random point from the <code>Cluster</code> with the largest number of points
getPointFromLargestNumberCluster
{ "repo_name": "tbepler/seq-svm", "path": "src/org/apache/commons/math3/ml/clustering/KMeansPlusPlusClusterer.java", "license": "mit", "size": 21644 }
[ "java.util.Collection", "java.util.List", "org.apache.commons.math3.exception.ConvergenceException", "org.apache.commons.math3.exception.util.LocalizedFormats" ]
import java.util.Collection; import java.util.List; import org.apache.commons.math3.exception.ConvergenceException; import org.apache.commons.math3.exception.util.LocalizedFormats;
import java.util.*; import org.apache.commons.math3.exception.*; import org.apache.commons.math3.exception.util.*;
[ "java.util", "org.apache.commons" ]
java.util; org.apache.commons;
2,229,322
public String processSignup() { // TODO ??? need to check if we have covered the case for people, who // have only view permission; we need // to disable everything in that page SignupMeetingWrapper meetingWrapper=null; try{ meetingWrapper = (SignupMeetingWrapper) meetingTable.getRowData(); } ...
String function() { SignupMeetingWrapper meetingWrapper=null; try{ meetingWrapper = (SignupMeetingWrapper) meetingTable.getRowData(); } catch (Exception ex){ setSignupMeetings(null); return MAIN_EVENTS_LIST_PAGE_URL; } Permission permission = meetingWrapper.getMeeting().getPermission(); try { if (permission.isUpdate())...
/** * This is a JSF action call method by UI to navigate to view the specific * event/meeting page. * * @return an action outcome string. */
This is a JSF action call method by UI to navigate to view the specific event/meeting page
processSignup
{ "repo_name": "noondaysun/sakai", "path": "signup/tool/src/java/org/sakaiproject/signup/tool/jsf/SignupMeetingsBean.java", "license": "apache-2.0", "size": 34804 }
[ "org.sakaiproject.signup.logic.Permission" ]
import org.sakaiproject.signup.logic.Permission;
import org.sakaiproject.signup.logic.*;
[ "org.sakaiproject.signup" ]
org.sakaiproject.signup;
827,360
public static <T> Stream<T> pruneNull(List<T> xs) { if (xs == null) return empty(); return pruneNull(xs.stream()); }
static <T> Stream<T> function(List<T> xs) { if (xs == null) return empty(); return pruneNull(xs.stream()); }
/** * Removes all {@code null}'s from the list; if the list itself is * {@code null}, then the empty stream is returned. * @param <T> any type. * @param xs the list to cleanse. * @return the cleansed stream. */
Removes all null's from the list; if the list itself is null, then the empty stream is returned
pruneNull
{ "repo_name": "c0c0n3/ome-smuggler", "path": "components/util/src/main/java/util/sequence/Streams.java", "license": "gpl-3.0", "size": 13182 }
[ "java.util.List", "java.util.stream.Stream" ]
import java.util.List; import java.util.stream.Stream;
import java.util.*; import java.util.stream.*;
[ "java.util" ]
java.util;
2,268,379
@ApiModelProperty(required = true, value = "folder_id integer") public Integer getFolderId() { return folderId; }
@ApiModelProperty(required = true, value = STR) Integer function() { return folderId; }
/** * folder_id integer * * @return folderId **/
folder_id integer
getFolderId
{ "repo_name": "burberius/eve-esi", "path": "src/main/java/net/troja/eve/esi/model/CharacterBookmarkFoldersResponse.java", "license": "apache-2.0", "size": 3302 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
1,886,005
KeyRange getRange() { return range; }
KeyRange getRange() { return range; }
/** * Returns the range for this cursor. */
Returns the range for this cursor
getRange
{ "repo_name": "EvilMcJerkface/jessy", "path": "lib/berkeleydb_core/src/com/sleepycat/collections/DataCursor.java", "license": "mit", "size": 27871 }
[ "com.sleepycat.util.keyrange.KeyRange" ]
import com.sleepycat.util.keyrange.KeyRange;
import com.sleepycat.util.keyrange.*;
[ "com.sleepycat.util" ]
com.sleepycat.util;
1,211,208
public boolean isFluidEqual(ItemStack other) { if (other == null) { return false; } if (other.getItem() instanceof IFluidContainerItem) { return isFluidEqual(((IFluidContainerItem) other.getItem()).getFluid(other)); } return isFlu...
boolean function(ItemStack other) { if (other == null) { return false; } if (other.getItem() instanceof IFluidContainerItem) { return isFluidEqual(((IFluidContainerItem) other.getItem()).getFluid(other)); } return isFluidEqual(FluidContainerRegistry.getFluidForFilledItem(other)); }
/** * Determines if the FluidIDs and NBT Tags are equal compared to a registered container * ItemStack. This does not check amounts. * * @param other * The ItemStack for comparison * @return true if the Fluids (IDs and NBT Tags) are the same */
Determines if the FluidIDs and NBT Tags are equal compared to a registered container ItemStack. This does not check amounts
isFluidEqual
{ "repo_name": "CrafterKina/MinecraftForge", "path": "src/main/java/net/minecraftforge/fluids/FluidStack.java", "license": "lgpl-2.1", "size": 6050 }
[ "net.minecraft.item.ItemStack" ]
import net.minecraft.item.ItemStack;
import net.minecraft.item.*;
[ "net.minecraft.item" ]
net.minecraft.item;
2,166,765
protected static PaymentMethodApi getPaymentMethodAvailabilityFromAPI(String paymentMethod) throws PayUException, ConnectionException { // The api key and api login are not needed return getPaymentMethodAvailabilityFromAPILogic(paymentMethod, null, null); }
static PaymentMethodApi function(String paymentMethod) throws PayUException, ConnectionException { return getPaymentMethodAvailabilityFromAPILogic(paymentMethod, null, null); }
/** * Makes a get payment method availability request * * @param paymentMethod * @return * @throws PayUException * @throws ConnectionException */
Makes a get payment method availability request
getPaymentMethodAvailabilityFromAPI
{ "repo_name": "juanalvarez123/payu-latam-java-payments-sdk", "path": "src/main/java/com/payu/sdk/PayUPayments.java", "license": "mit", "size": 21798 }
[ "com.payu.sdk.exceptions.ConnectionException", "com.payu.sdk.exceptions.PayUException", "com.payu.sdk.model.PaymentMethodApi" ]
import com.payu.sdk.exceptions.ConnectionException; import com.payu.sdk.exceptions.PayUException; import com.payu.sdk.model.PaymentMethodApi;
import com.payu.sdk.exceptions.*; import com.payu.sdk.model.*;
[ "com.payu.sdk" ]
com.payu.sdk;
838,034
public int compareNextTo(Composite composite) throws IOException { return nameDeserializer.compareNextTo(composite); }
int function(Composite composite) throws IOException { return nameDeserializer.compareNextTo(composite); }
/** * Compare the provided composite to the next atom to read on disk. * * This will not read/deserialize the whole atom but only what is necessary for the * comparison. Whenever we know what to do with this atom (read it or skip it), * readNext or skipNext should be called. */
Compare the provided composite to the next atom to read on disk. This will not read/deserialize the whole atom but only what is necessary for the comparison. Whenever we know what to do with this atom (read it or skip it), readNext or skipNext should be called
compareNextTo
{ "repo_name": "lynchlee/play-jmx", "path": "src/main/java/org/apache/cassandra/db/AtomDeserializer.java", "license": "apache-2.0", "size": 4695 }
[ "java.io.IOException", "org.apache.cassandra.db.composites.Composite" ]
import java.io.IOException; import org.apache.cassandra.db.composites.Composite;
import java.io.*; import org.apache.cassandra.db.composites.*;
[ "java.io", "org.apache.cassandra" ]
java.io; org.apache.cassandra;
409,308
public SubResource subnet() { return this.subnet; }
SubResource function() { return this.subnet; }
/** * Get reference to the subnet resource. * * @return the subnet value */
Get reference to the subnet resource
subnet
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2019_11_01/src/main/java/com/microsoft/azure/management/network/v2019_11_01/ApplicationGatewayFrontendIPConfiguration.java", "license": "mit", "size": 5890 }
[ "com.microsoft.azure.SubResource" ]
import com.microsoft.azure.SubResource;
import com.microsoft.azure.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
430,226
T visitNotExpr(@NotNull ExpressionParser.NotExprContext ctx);
T visitNotExpr(@NotNull ExpressionParser.NotExprContext ctx);
/** * Visit a parse tree produced by {@link ExpressionParser#notExpr}. * @param ctx the parse tree * @return the visitor result */
Visit a parse tree produced by <code>ExpressionParser#notExpr</code>
visitNotExpr
{ "repo_name": "isa-group/aml", "path": "src/main/java/es/us/isa/aml/parsers/expression/ExpressionVisitor.java", "license": "gpl-3.0", "size": 7283 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
1,303,866
private LocationPath buildLocationPath( Vector stepsVector ) throws XPathException { int size = stepsVector.size(); check(size!=0); Step[] steps = new Step[size]; stepsVector.copyInto(steps); stepsVector.removeAllElements(); return new LocationPath(steps); ...
LocationPath function( Vector stepsVector ) throws XPathException { int size = stepsVector.size(); check(size!=0); Step[] steps = new Step[size]; stepsVector.copyInto(steps); stepsVector.removeAllElements(); return new LocationPath(steps); }
/** * Used by the {@link #parseExpression(NamespaceContext)} method * to build a {@link LocationPath} object from the accumulated * {@link Step}s. */
Used by the <code>#parseExpression(NamespaceContext)</code> method to build a <code>LocationPath</code> object from the accumulated <code>Step</code>s
buildLocationPath
{ "repo_name": "ronsigal/xerces", "path": "src/org/apache/xerces/impl/xpath/XPath.java", "license": "apache-2.0", "size": 87002 }
[ "java.util.Vector" ]
import java.util.Vector;
import java.util.*;
[ "java.util" ]
java.util;
2,000,527
@FIXVersion(introduced = "5.0SP1") public DerivativeInstrument getDerivativeInstrument() { throw new UnsupportedOperationException(getUnsupportedTagMessage()); }
@FIXVersion(introduced = STR) DerivativeInstrument function() { throw new UnsupportedOperationException(getUnsupportedTagMessage()); }
/** * Message field getter. * @return field value */
Message field getter
getDerivativeInstrument
{ "repo_name": "marvisan/HadesFIX", "path": "Model/src/main/java/net/hades/fix/message/comp/DerivativeSecurityDefinition.java", "license": "gpl-3.0", "size": 16158 }
[ "net.hades.fix.message.anno.FIXVersion" ]
import net.hades.fix.message.anno.FIXVersion;
import net.hades.fix.message.anno.*;
[ "net.hades.fix" ]
net.hades.fix;
1,322,574
default BeanstalkEndpointConsumerBuilder timeUnit(TimeUnit timeUnit) { doSetProperty("timeUnit", timeUnit); return this; }
default BeanstalkEndpointConsumerBuilder timeUnit(TimeUnit timeUnit) { doSetProperty(STR, timeUnit); return this; }
/** * Time unit for initialDelay and delay options. * * The option is a: <code>java.util.concurrent.TimeUnit</code> type. * * Group: scheduler */
Time unit for initialDelay and delay options. The option is a: <code>java.util.concurrent.TimeUnit</code> type. Group: scheduler
timeUnit
{ "repo_name": "objectiser/camel", "path": "core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/BeanstalkEndpointBuilderFactory.java", "license": "apache-2.0", "size": 47686 }
[ "java.util.concurrent.TimeUnit" ]
import java.util.concurrent.TimeUnit;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
2,596,357
for (Object item : selection){ if (item instanceof EditPart) { EditPart part = (EditPart)item; if (part.getModel() instanceof ANode){ ANode mainNode = JSSCompoundCommand.getMainNode((ANode)part.getModel()); if (mainNode != null) return JSSCompoundCommand.isRefreshEventsIgnored(mainNode); } ...
for (Object item : selection){ if (item instanceof EditPart) { EditPart part = (EditPart)item; if (part.getModel() instanceof ANode){ ANode mainNode = JSSCompoundCommand.getMainNode((ANode)part.getModel()); if (mainNode != null) return JSSCompoundCommand.isRefreshEventsIgnored(mainNode); } } } return false; }
/** * Take a node from the selection check if for its model the refresh is ignored * or not * * @param selection actual selection * @return true if the refresh is ignored, false otherwise */
Take a node from the selection check if for its model the refresh is ignored or not
isRefreshIgnored
{ "repo_name": "OpenSoftwareSolutions/PDFReporter-Studio", "path": "com.jaspersoft.studio/src/com/jaspersoft/studio/editor/gef/selection/JSelectionManager.java", "license": "lgpl-3.0", "size": 4882 }
[ "com.jaspersoft.studio.JSSCompoundCommand", "com.jaspersoft.studio.model.ANode", "org.eclipse.gef.EditPart" ]
import com.jaspersoft.studio.JSSCompoundCommand; import com.jaspersoft.studio.model.ANode; import org.eclipse.gef.EditPart;
import com.jaspersoft.studio.*; import com.jaspersoft.studio.model.*; import org.eclipse.gef.*;
[ "com.jaspersoft.studio", "org.eclipse.gef" ]
com.jaspersoft.studio; org.eclipse.gef;
1,174,511
void setHiddenChildProceduresForOffering(String offering, Collection<String> procedures);
void setHiddenChildProceduresForOffering(String offering, Collection<String> procedures);
/** * Sets the hidden child procedures for the specified offering. To create a * sensor system for SOS 2.0. * * @param offering * the offering * @param procedures * the procedures */
Sets the hidden child procedures for the specified offering. To create a sensor system for SOS 2.0
setHiddenChildProceduresForOffering
{ "repo_name": "shane-axiom/SOS", "path": "core/api/src/main/java/org/n52/sos/cache/WritableContentCache.java", "license": "gpl-2.0", "size": 47509 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
302,857
public String getSIDs(List<Integer> sequencesSize) { StringBuilder builder = new StringBuilder(); // We do an AND with the bitmap of the item and this bitmap for (int bitK = bitmap.nextSetBit(0); bitK >= 0; bitK = bitmap.nextSetBit(bitK+1)) { // find the sid of this bit int sid = bitToSID(bitK, se...
String function(List<Integer> sequencesSize) { StringBuilder builder = new StringBuilder(); for (int bitK = bitmap.nextSetBit(0); bitK >= 0; bitK = bitmap.nextSetBit(bitK+1)) { int sid = bitToSID(bitK, sequencesSize); builder.append(" " + sid); } return builder.toString(); }
/** * Get the list of sids corresponding to this bitmap as a string * @param sequencesSize the list of sequence length to know how many bits are allocated to each sequence * @return a string */
Get the list of sids corresponding to this bitmap as a string
getSIDs
{ "repo_name": "DeOlSo/ADC2015_De", "path": "SequentialPatternMining/src/spmf/spam/Bitmap.java", "license": "gpl-3.0", "size": 7592 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
454,105
Action newA = ActionFactoryTest.createAction(UserTestUtils.createUser("testUser", UserTestUtils.createOrg("testOrg" + this.getClass().getSimpleName())), ActionFactory.TYPE_KICKSTART_INITIATE); Long id = newA.getId(); Action a = ActionFactory.lookupById(id); assertNotNull...
Action newA = ActionFactoryTest.createAction(UserTestUtils.createUser(STR, UserTestUtils.createOrg(STR + this.getClass().getSimpleName())), ActionFactory.TYPE_KICKSTART_INITIATE); Long id = newA.getId(); Action a = ActionFactory.lookupById(id); assertNotNull(a); assertTrue(a instanceof KickstartInitiateAction); Kicksta...
/** * Test fetching a KickstartAction * @throws Exception */
Test fetching a KickstartAction
testLookupKickstartAction
{ "repo_name": "xkollar/spacewalk", "path": "java/code/src/com/redhat/rhn/domain/action/kickstart/test/KickstartActionTest.java", "license": "gpl-2.0", "size": 4891 }
[ "com.redhat.rhn.domain.action.Action", "com.redhat.rhn.domain.action.ActionFactory", "com.redhat.rhn.domain.action.kickstart.KickstartAction", "com.redhat.rhn.domain.action.kickstart.KickstartInitiateAction", "com.redhat.rhn.domain.action.test.ActionFactoryTest", "com.redhat.rhn.testing.UserTestUtils" ]
import com.redhat.rhn.domain.action.Action; import com.redhat.rhn.domain.action.ActionFactory; import com.redhat.rhn.domain.action.kickstart.KickstartAction; import com.redhat.rhn.domain.action.kickstart.KickstartInitiateAction; import com.redhat.rhn.domain.action.test.ActionFactoryTest; import com.redhat.rhn.testing.U...
import com.redhat.rhn.domain.action.*; import com.redhat.rhn.domain.action.kickstart.*; import com.redhat.rhn.domain.action.test.*; import com.redhat.rhn.testing.*;
[ "com.redhat.rhn" ]
com.redhat.rhn;
2,329,170
@Test public void testSearchEmptyBaseDn() throws Exception { LdapContext ctx = getWiredContext( getLdapServer() ); SearchControls controls = new SearchControls(); controls.setSearchScope( SearchControls.OBJECT_SCOPE ); controls.setTimeLimit( 10 ); try { ...
void function() throws Exception { LdapContext ctx = getWiredContext( getLdapServer() ); SearchControls controls = new SearchControls(); controls.setSearchScope( SearchControls.OBJECT_SCOPE ); controls.setTimeLimit( 10 ); try { controls = new SearchControls(); controls.setSearchScope( SearchControls.SUBTREE_SCOPE ); co...
/** * Test a search with the empty "" baseDN */
Test a search with the empty "" baseDN
testSearchEmptyBaseDn
{ "repo_name": "drankye/directory-server", "path": "server-integ/src/test/java/org/apache/directory/server/operations/search/SearchIT.java", "license": "apache-2.0", "size": 68868 }
[ "javax.naming.InvalidNameException", "javax.naming.NamingEnumeration", "javax.naming.NamingException", "javax.naming.directory.SearchControls", "javax.naming.directory.SearchResult", "javax.naming.ldap.LdapContext", "org.apache.directory.server.integ.ServerIntegrationUtils", "org.junit.Assert" ]
import javax.naming.InvalidNameException; import javax.naming.NamingEnumeration; import javax.naming.NamingException; import javax.naming.directory.SearchControls; import javax.naming.directory.SearchResult; import javax.naming.ldap.LdapContext; import org.apache.directory.server.integ.ServerIntegrationUtils; import or...
import javax.naming.*; import javax.naming.directory.*; import javax.naming.ldap.*; import org.apache.directory.server.integ.*; import org.junit.*;
[ "javax.naming", "org.apache.directory", "org.junit" ]
javax.naming; org.apache.directory; org.junit;
2,376,768
public static ColumnStructProto convert(ColumnStruct col) { ColumnStructProto.Builder colProto = ColumnStructProto.newBuilder(); colProto.setColumnName(col.getColumnName()); colProto.setFamilyName(col.getFamilyName()); colProto.setTableName(col.getTableName()); if (col.getDataType() != null) { ...
static ColumnStructProto function(ColumnStruct col) { ColumnStructProto.Builder colProto = ColumnStructProto.newBuilder(); colProto.setColumnName(col.getColumnName()); colProto.setFamilyName(col.getFamilyName()); colProto.setTableName(col.getTableName()); if (col.getDataType() != null) { colProto.setDataType(DataType.c...
/** * Convert ColumnActionProto to ColumnAction. * * @param col * @return */
Convert ColumnActionProto to ColumnAction
convert
{ "repo_name": "fengshao0907/wasp", "path": "src/main/java/com/alibaba/wasp/plan/action/ColumnStruct.java", "license": "apache-2.0", "size": 5353 }
[ "com.alibaba.wasp.DataType", "com.alibaba.wasp.protobuf.generated.MetaProtos", "com.google.protobuf.ByteString" ]
import com.alibaba.wasp.DataType; import com.alibaba.wasp.protobuf.generated.MetaProtos; import com.google.protobuf.ByteString;
import com.alibaba.wasp.*; import com.alibaba.wasp.protobuf.generated.*; import com.google.protobuf.*;
[ "com.alibaba.wasp", "com.google.protobuf" ]
com.alibaba.wasp; com.google.protobuf;
1,267,949
@ServiceMethod(returns = ReturnType.SINGLE) private Mono<PagedResponse<JobInner>> listSinglePageAsync( String resourceGroupName, String accountName, String transformName, String filter, String orderby, Context context) { if (this.client.getEndpoint() == nu...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<PagedResponse<JobInner>> function( String resourceGroupName, String accountName, String transformName, String filter, String orderby, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (this.client.ge...
/** * Lists all of the Jobs for the Transform. * * @param resourceGroupName The name of the resource group within the Azure subscription. * @param accountName The Media Services account name. * @param transformName The Transform name. * @param filter Restricts the set of items returned. ...
Lists all of the Jobs for the Transform
listSinglePageAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/mediaservices/azure-resourcemanager-mediaservices/src/main/java/com/azure/resourcemanager/mediaservices/implementation/JobsClientImpl.java", "license": "mit", "size": 66903 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedResponse", "com.azure.core.http.rest.PagedResponseBase", "com.azure.core.util.Context", "com.azure.resourcemanager.mediaservices.fluent.models.JobInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.util.Context; import com.azure.resourcemanager.mediaservices.fluent.models.JobInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.mediaservices.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
299,443
public static Directive getVelocimacro( String vmName, String templateName ) { return RuntimeSingleton.getVelocimacro( vmName, templateName ); }
static Directive function( String vmName, String templateName ) { return RuntimeSingleton.getVelocimacro( vmName, templateName ); }
/** * Returns the appropriate VelocimacroProxy object if strVMname * is a valid current Velocimacro. * * @param vmName Name of velocimacro requested * @param templateName The template from which the macro is requested. * @return A VelocimacroProxy object for the macro. */
Returns the appropriate VelocimacroProxy object if strVMname is a valid current Velocimacro
getVelocimacro
{ "repo_name": "gogamoga/velocity-engine-1.6.4", "path": "src/java/org/apache/velocity/runtime/Runtime.java", "license": "apache-2.0", "size": 17907 }
[ "org.apache.velocity.runtime.directive.Directive" ]
import org.apache.velocity.runtime.directive.Directive;
import org.apache.velocity.runtime.directive.*;
[ "org.apache.velocity" ]
org.apache.velocity;
95,523
protected final Coverage doOperation( final String operationName, final Coverage source, final String argumentName1, final Object argumentValue1, final String argumentName2, final Object argumentValue2, final String argumentName3, ...
final Coverage function( final String operationName, final Coverage source, final String argumentName1, final Object argumentValue1, final String argumentName2, final Object argumentValue2, final String argumentName3, final Object argumentValue3) throws OperationNotFoundException, InvalidParameterNameException, Coverag...
/** * Applies a process operation with three parameters. This is a helper method for implementation * of various convenience methods in this class. * * @param operationName Name of the operation to be applied to the coverage. * @param source The source coverage. * @param argumentName1 The ...
Applies a process operation with three parameters. This is a helper method for implementation of various convenience methods in this class
doOperation
{ "repo_name": "geotools/geotools", "path": "modules/library/coverage/src/main/java/org/geotools/coverage/processing/Operations.java", "license": "lgpl-2.1", "size": 44693 }
[ "org.opengis.coverage.Coverage", "org.opengis.coverage.processing.Operation", "org.opengis.coverage.processing.OperationNotFoundException", "org.opengis.parameter.InvalidParameterNameException", "org.opengis.parameter.ParameterValueGroup" ]
import org.opengis.coverage.Coverage; import org.opengis.coverage.processing.Operation; import org.opengis.coverage.processing.OperationNotFoundException; import org.opengis.parameter.InvalidParameterNameException; import org.opengis.parameter.ParameterValueGroup;
import org.opengis.coverage.*; import org.opengis.coverage.processing.*; import org.opengis.parameter.*;
[ "org.opengis.coverage", "org.opengis.parameter" ]
org.opengis.coverage; org.opengis.parameter;
1,668,533
@Override public void reset(ActionMapping mapping, HttpServletRequest request) { initialise(); }
void function(ActionMapping mapping, HttpServletRequest request) { initialise(); }
/** * Reset the form to the initial state * * @param mapping the mapping * @param request the request */
Reset the form to the initial state
reset
{ "repo_name": "zebrafishmine/intermine", "path": "intermine/web/main/src/org/intermine/web/struts/TableExportForm.java", "license": "lgpl-2.1", "size": 3885 }
[ "javax.servlet.http.HttpServletRequest", "org.apache.struts.action.ActionMapping" ]
import javax.servlet.http.HttpServletRequest; import org.apache.struts.action.ActionMapping;
import javax.servlet.http.*; import org.apache.struts.action.*;
[ "javax.servlet", "org.apache.struts" ]
javax.servlet; org.apache.struts;
47,846
protected Stream<FrameworkMethod> sortTestMethods(Stream<FrameworkMethod> methods) { if (!shouldSortTestMethodsDeterministically()) { return methods; } return methods.sorted( comparing((FrameworkMethod method) -> method.getName().hashCode()) .thenComparing(FrameworkMethod::getNa...
Stream<FrameworkMethod> function(Stream<FrameworkMethod> methods) { if (!shouldSortTestMethodsDeterministically()) { return methods; } return methods.sorted( comparing((FrameworkMethod method) -> method.getName().hashCode()) .thenComparing(FrameworkMethod::getName)); }
/** * Sort test methods (across different TestMethodProcessors). * * <p>This should be deterministic. The order should not change, even when tests are added/removed * or between releases. */
Sort test methods (across different TestMethodProcessors). This should be deterministic. The order should not change, even when tests are added/removed or between releases
sortTestMethods
{ "repo_name": "google/TestParameterInjector", "path": "junit4/src/main/java/com/google/testing/junit/testparameterinjector/PluggableTestRunner.java", "license": "apache-2.0", "size": 15564 }
[ "java.util.Comparator", "java.util.stream.Stream", "org.junit.runners.model.FrameworkMethod" ]
import java.util.Comparator; import java.util.stream.Stream; import org.junit.runners.model.FrameworkMethod;
import java.util.*; import java.util.stream.*; import org.junit.runners.model.*;
[ "java.util", "org.junit.runners" ]
java.util; org.junit.runners;
1,742,087
public static StructMember read(InputStream istream) { try { StructMember value = new StructMember(); value.name = istream.read_string(); value.type = TypeCodeHelper.read(istream); value.type_def = IDLTypeHelper.read(istream); return value; } catch (UserEx...
static StructMember function(InputStream istream) { try { StructMember value = new StructMember(); value.name = istream.read_string(); value.type = TypeCodeHelper.read(istream); value.type_def = IDLTypeHelper.read(istream); return value; } catch (UserException ex) { MARSHAL m = new MARSHAL(); m.minor = Minor.UserExcept...
/** * Read the StructMember from the input stream. */
Read the StructMember from the input stream
read
{ "repo_name": "shaotuanchen/sunflower_exp", "path": "tools/source/gcc-4.2.4/libjava/classpath/org/omg/CORBA/StructMemberHelper.java", "license": "bsd-3-clause", "size": 5366 }
[ "org.omg.CORBA" ]
import org.omg.CORBA;
import org.omg.*;
[ "org.omg" ]
org.omg;
2,128,955
interface WithTags { WithCreate withTags(Map<String, String> tags); } interface WithCreate extends Creatable<ResourceGroup>, DefinitionStages.WithManagedBy, DefinitionStages.WithProperties, DefinitionStages.WithTags { } } interface Update e...
interface WithTags { WithCreate withTags(Map<String, String> tags); } interface WithCreate extends Creatable<ResourceGroup>, DefinitionStages.WithManagedBy, DefinitionStages.WithProperties, DefinitionStages.WithTags { } } interface Update extends Appliable<ResourceGroup>, UpdateStages.WithManagedBy, UpdateStages.WithNa...
/** * Specifies tags. * @param tags the tags parameter value * @return the next definition stage */
Specifies tags
withTags
{ "repo_name": "navalev/azure-sdk-for-java", "path": "sdk/resources/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/resources/v2019_05_01/ResourceGroup.java", "license": "mit", "size": 6296 }
[ "com.microsoft.azure.arm.model.Appliable", "com.microsoft.azure.arm.model.Creatable", "java.util.Map" ]
import com.microsoft.azure.arm.model.Appliable; import com.microsoft.azure.arm.model.Creatable; import java.util.Map;
import com.microsoft.azure.arm.model.*; import java.util.*;
[ "com.microsoft.azure", "java.util" ]
com.microsoft.azure; java.util;
2,234,349
public void testConstructor5() { Integer[] ints = new Integer[SIZE]; for (int i = 0; i < SIZE - 1; ++i) ints[i] = new Integer(i); try { new ConcurrentLinkedDeque(Arrays.asList(ints)); shouldThrow(); } catch (NullPointerException success) {} }
void function() { Integer[] ints = new Integer[SIZE]; for (int i = 0; i < SIZE - 1; ++i) ints[i] = new Integer(i); try { new ConcurrentLinkedDeque(Arrays.asList(ints)); shouldThrow(); } catch (NullPointerException success) {} }
/** * Initializing from Collection with some null elements throws NPE */
Initializing from Collection with some null elements throws NPE
testConstructor5
{ "repo_name": "md-5/jdk10", "path": "test/jdk/java/util/concurrent/tck/ConcurrentLinkedDequeTest.java", "license": "gpl-2.0", "size": 32225 }
[ "java.util.Arrays", "java.util.concurrent.ConcurrentLinkedDeque" ]
import java.util.Arrays; import java.util.concurrent.ConcurrentLinkedDeque;
import java.util.*; import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,384,976
@Test public void testConsultMeasurementsByObservationPeriod() throws Exception { MeasurementList measurementList = sessionController .consultObservationPeriodMeasurements(PERIOD1_ID, null, null, session); List<Measurement> measurements = measurementList.getMeasurements(); assertEquals(2, measureme...
void function() throws Exception { MeasurementList measurementList = sessionController .consultObservationPeriodMeasurements(PERIOD1_ID, null, null, session); List<Measurement> measurements = measurementList.getMeasurements(); assertEquals(2, measurements.size()); assertTrue(containsMeasurement(measurements, measuremen...
/** * Tests the happy-case of a consult measurement use case (with * ObservationPeriod). */
Tests the happy-case of a consult measurement use case (with ObservationPeriod)
testConsultMeasurementsByObservationPeriod
{ "repo_name": "hip4/patmon1", "path": "src/server/src/test/java/ch/bfh/ti/sed/patmon1/server/usecase/ConsultMeasurementIntegrationTest.java", "license": "apache-2.0", "size": 13016 }
[ "ch.bfh.ti.sed.patmon1.ws.Measurement", "ch.bfh.ti.sed.patmon1.ws.MeasurementList", "java.util.List", "org.junit.Assert" ]
import ch.bfh.ti.sed.patmon1.ws.Measurement; import ch.bfh.ti.sed.patmon1.ws.MeasurementList; import java.util.List; import org.junit.Assert;
import ch.bfh.ti.sed.patmon1.ws.*; import java.util.*; import org.junit.*;
[ "ch.bfh.ti", "java.util", "org.junit" ]
ch.bfh.ti; java.util; org.junit;
1,760,479
public void clip(Shape s) { if (_clip == null) { setClip(s); } else { Area area = new Area(_clip); area.intersect(new Area(s)); setClip(area); } }
void function(Shape s) { if (_clip == null) { setClip(s); } else { Area area = new Area(_clip); area.intersect(new Area(s)); setClip(area); } }
/** * Intersects the current clip with the interior of the specified Shape and * sets the clip to the resulting intersection. */
Intersects the current clip with the interior of the specified Shape and sets the clip to the resulting intersection
clip
{ "repo_name": "aletheia/jSOAM", "path": "modules/utils/src/main/java/soam/utils/EpsGraphics.java", "license": "gpl-3.0", "size": 42585 }
[ "java.awt.Shape", "java.awt.geom.Area" ]
import java.awt.Shape; import java.awt.geom.Area;
import java.awt.*; import java.awt.geom.*;
[ "java.awt" ]
java.awt;
1,172,227
@Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); // Draw translucent background for the cropped area. drawBackground(canvas); if (mCropWindowHandler.showGuidelines()) { // Determines whether guidelines should be drawn or not if (mG...
void function(Canvas canvas) { super.onDraw(canvas); drawBackground(canvas); if (mCropWindowHandler.showGuidelines()) { if (mGuidelines == CropImageView.Guidelines.ON) { drawGuidelines(canvas); } else if (mGuidelines == CropImageView.Guidelines.ON_TOUCH && mMoveHandler != null) { drawGuidelines(canvas); } } drawBorders...
/** * Draw crop overview by drawing background over image not in the cripping area, then borders and guidelines. */
Draw crop overview by drawing background over image not in the cripping area, then borders and guidelines
onDraw
{ "repo_name": "woniukeji/jianguo", "path": "cropper/src/main/java/com/theartofdev/edmodo/cropper/CropOverlayView.java", "license": "apache-2.0", "size": 35724 }
[ "android.graphics.Canvas" ]
import android.graphics.Canvas;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
437,690
Optional<String> getDetailedDescription();
Optional<String> getDetailedDescription();
/** * Get a detailed description of the database. * * @return an optional long description of the database */
Get a detailed description of the database
getDetailedDescription
{ "repo_name": "rmetzger/flink", "path": "flink-table/flink-table-common/src/main/java/org/apache/flink/table/catalog/CatalogPartition.java", "license": "apache-2.0", "size": 1807 }
[ "java.util.Optional" ]
import java.util.Optional;
import java.util.*;
[ "java.util" ]
java.util;
821,376
public void onAttachedToRecyclerView(@NonNull RecyclerView recyclerView) { }
void function(@NonNull RecyclerView recyclerView) { }
/** * Called by RecyclerView when it starts observing this Adapter. * <p> * Keep in mind that same adapter may be observed by multiple RecyclerViews. * * @param recyclerView The RecyclerView instance which started observing this adapter. * @see #onDetachedFromRecycl...
Called by RecyclerView when it starts observing this Adapter. Keep in mind that same adapter may be observed by multiple RecyclerViews
onAttachedToRecyclerView
{ "repo_name": "aosp-mirror/platform_frameworks_support", "path": "v7/recyclerview/src/main/java/androidx/recyclerview/widget/RecyclerView.java", "license": "apache-2.0", "size": 582575 }
[ "androidx.annotation.NonNull" ]
import androidx.annotation.NonNull;
import androidx.annotation.*;
[ "androidx.annotation" ]
androidx.annotation;
1,942,970
Map<String, Props> fetchProjectProperties(int projectId, int version) throws ProjectManagerException;
Map<String, Props> fetchProjectProperties(int projectId, int version) throws ProjectManagerException;
/** * Fetch all project properties */
Fetch all project properties
fetchProjectProperties
{ "repo_name": "chengren311/azkaban", "path": "azkaban-common/src/main/java/azkaban/project/ProjectLoader.java", "license": "apache-2.0", "size": 7102 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
696,772
public void writeRetval(OutputStream out, Object retVal) { retvalWriter.write(out, RemoteObjectSubstitutionManager.writeReplaceRemote(retVal)); }
void function(OutputStream out, Object retVal) { retvalWriter.write(out, RemoteObjectSubstitutionManager.writeReplaceRemote(retVal)); }
/** * Marshals into an output stream the return value of the method. * * @param out a CDR output stream * @param retVal the value to be written. */
Marshals into an output stream the return value of the method
writeRetval
{ "repo_name": "xasx/wildfly", "path": "iiop-openjdk/src/main/java/org/wildfly/iiop/openjdk/rmi/marshal/strategy/SkeletonStrategy.java", "license": "lgpl-2.1", "size": 10040 }
[ "org.jboss.javax.rmi.RemoteObjectSubstitutionManager", "org.omg.CORBA_2_3" ]
import org.jboss.javax.rmi.RemoteObjectSubstitutionManager; import org.omg.CORBA_2_3;
import org.jboss.javax.rmi.*; import org.omg.*;
[ "org.jboss.javax", "org.omg" ]
org.jboss.javax; org.omg;
363,713
public static String stringifyException(Throwable e) { StringWriter stm = new StringWriter(); PrintWriter wrt = new PrintWriter(stm); e.printStackTrace(wrt); wrt.close(); return stm.toString(); }
static String function(Throwable e) { StringWriter stm = new StringWriter(); PrintWriter wrt = new PrintWriter(stm); e.printStackTrace(wrt); wrt.close(); return stm.toString(); }
/** * Make a string representation of the exception. * @param e The exception to stringify * @return A string with exception name and call stack. */
Make a string representation of the exception
stringifyException
{ "repo_name": "tseen/Federated-HDFS", "path": "tseenliu/FedHDFS-hadoop-src/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/StringUtils.java", "license": "apache-2.0", "size": 32091 }
[ "java.io.PrintWriter", "java.io.StringWriter" ]
import java.io.PrintWriter; import java.io.StringWriter;
import java.io.*;
[ "java.io" ]
java.io;
1,718,972
@Nonnull public static PsiClassType getJavaLangThrowable(@Nonnull PsiManager manager, @Nonnull GlobalSearchScope resolveScope) { return getTypeByName(JavaClassNames.JAVA_LANG_THROWABLE, manager.getProject(), resolveScope); }
static PsiClassType function(@Nonnull PsiManager manager, @Nonnull GlobalSearchScope resolveScope) { return getTypeByName(JavaClassNames.JAVA_LANG_THROWABLE, manager.getProject(), resolveScope); }
/** * Returns the class type for the java.lang.Throwable class. * * @param manager the PSI manager used to create the class type. * @param resolveScope the scope in which the class is searched. * @return the class instance. */
Returns the class type for the java.lang.Throwable class
getJavaLangThrowable
{ "repo_name": "consulo/consulo-java", "path": "java-psi-api/src/main/java/com/intellij/psi/PsiType.java", "license": "apache-2.0", "size": 12462 }
[ "com.intellij.psi.search.GlobalSearchScope", "javax.annotation.Nonnull" ]
import com.intellij.psi.search.GlobalSearchScope; import javax.annotation.Nonnull;
import com.intellij.psi.search.*; import javax.annotation.*;
[ "com.intellij.psi", "javax.annotation" ]
com.intellij.psi; javax.annotation;
99,585
public void start() throws IOException { setupServerSocket(50); // The listener reference is released upon shutdown(). if (listener == null) { listener = new Thread(this, "XML-RPC Weblistener"); // Not marked as daemon thread since run directly via main(). listener.start(); } }
void function() throws IOException { setupServerSocket(50); if (listener == null) { listener = new Thread(this, STR); listener.start(); } }
/** * Spawns a new thread which binds this server to the port it's * configured to accept connections on. * * @see #run() * @throws IOException Binding the server socket failed. */
Spawns a new thread which binds this server to the port it's configured to accept connections on
start
{ "repo_name": "mmohan01/ReFactory", "path": "data/apachexmlrpc/apachexmlrpc-3.1.1/xmlrpc-3.1.1/server/src/main/java/org/apache/xmlrpc/webserver/WebServer.java", "license": "mit", "size": 12701 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,205,547
private void root(Annotation label) { if(label != null) { Root value = (Root)label; String real = type.getSimpleName(); String text = real; if(value != null) { text = value.name(); if(isEmpty(text)) { text = Reflector.getName(real); ...
void function(Annotation label) { if(label != null) { Root value = (Root)label; String real = type.getSimpleName(); String text = real; if(value != null) { text = value.name(); if(isEmpty(text)) { text = Reflector.getName(real); } strict = value.strict(); root = value; name = text; } } }
/** * This is used to set the optional <code>Root</code> annotation for * the class. The root can only be set once, so if a super type also * has a root annotation define it must be ignored. * * @param label this is the label used to define the root */
This is used to set the optional <code>Root</code> annotation for the class. The root can only be set once, so if a super type also has a root annotation define it must be ignored
root
{ "repo_name": "sn00py2/SimpleXMLLegacy", "path": "src/org/simpleframework/xml/core/DetailScanner.java", "license": "apache-2.0", "size": 17290 }
[ "java.lang.annotation.Annotation", "org.simpleframework.xml.Root" ]
import java.lang.annotation.Annotation; import org.simpleframework.xml.Root;
import java.lang.annotation.*; import org.simpleframework.xml.*;
[ "java.lang", "org.simpleframework.xml" ]
java.lang; org.simpleframework.xml;
587,424
public Person getPersonById(String personId) throws WWException { PersonGraphQLQuery queryObject = PersonGraphQLQuery.buildPersonQueryById(personId); return getPersonWithQuery(queryObject); }
Person function(String personId) throws WWException { PersonGraphQLQuery queryObject = PersonGraphQLQuery.buildPersonQueryById(personId); return getPersonWithQuery(queryObject); }
/** * Simplified access method, to load GraphQL query for getting Person by ID or "me" if personId is blank * * @param personId * String, WWS id of the Person to return * @return Person for relevant ID * @throws WWException * containing an error message, if the request was unsucces...
Simplified access method, to load GraphQL query for getting Person by ID or "me" if personId is blank
getPersonById
{ "repo_name": "OpenCode4Workspace/Watson-Work-Services-Java-SDK", "path": "wws-api/src/main/java/org/opencode4workspace/endpoints/WWGraphQLEndpoint.java", "license": "apache-2.0", "size": 21961 }
[ "org.opencode4workspace.WWException", "org.opencode4workspace.bo.Person", "org.opencode4workspace.builders.PersonGraphQLQuery" ]
import org.opencode4workspace.WWException; import org.opencode4workspace.bo.Person; import org.opencode4workspace.builders.PersonGraphQLQuery;
import org.opencode4workspace.*; import org.opencode4workspace.bo.*; import org.opencode4workspace.builders.*;
[ "org.opencode4workspace", "org.opencode4workspace.bo", "org.opencode4workspace.builders" ]
org.opencode4workspace; org.opencode4workspace.bo; org.opencode4workspace.builders;
2,026,221
public void redirectRelative(String relativePath, HttpServletRequest request, HttpServletResponse response) throws IOException { KeycloakUriBuilder builder = KeycloakUriBuilder.fromUri(request.getRequestURL().toString()) .replacePath(request.getContextPath()) .replaceQuery...
void function(String relativePath, HttpServletRequest request, HttpServletResponse response) throws IOException { KeycloakUriBuilder builder = KeycloakUriBuilder.fromUri(request.getRequestURL().toString()) .replacePath(request.getContextPath()) .replaceQuery(null) .path(relativePath); String redirect = builder.toTempla...
/** * Start the process of obtaining an access token by redirecting the browser * to the authentication server * * @param relativePath path relative to context root you want auth server to redirect back to * @param request * @param response * @throws IOException */
Start the process of obtaining an access token by redirecting the browser to the authentication server
redirectRelative
{ "repo_name": "anaerobic/keycloak", "path": "integration/servlet-oauth-client/src/main/java/org/keycloak/servlet/ServletOAuthClient.java", "license": "apache-2.0", "size": 7162 }
[ "java.io.IOException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse", "org.keycloak.util.KeycloakUriBuilder" ]
import java.io.IOException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.keycloak.util.KeycloakUriBuilder;
import java.io.*; import javax.servlet.http.*; import org.keycloak.util.*;
[ "java.io", "javax.servlet", "org.keycloak.util" ]
java.io; javax.servlet; org.keycloak.util;
249,216
public RandomVariableInterface getValue(double x) { RandomVariableInterface powerOfX = new RandomVariable(1.0); RandomVariableInterface valueNumerator = coefficientsNumerator[0]; for (int i = 1; i<coefficientsNumerator.length;i++) { powerOfX = powerOfX.mult(x); valueNumerator = valueNumera...
RandomVariableInterface function(double x) { RandomVariableInterface powerOfX = new RandomVariable(1.0); RandomVariableInterface valueNumerator = coefficientsNumerator[0]; for (int i = 1; i<coefficientsNumerator.length;i++) { powerOfX = powerOfX.mult(x); valueNumerator = valueNumerator.addProduct(coefficientsNumerator[...
/** * Returns the value for a given arguments. * * @param x Given argument. * @return Returns the value for the given argument. */
Returns the value for a given arguments
getValue
{ "repo_name": "BBreiden/finmath-lib", "path": "src/main/java/net/finmath/analytic/interpolation/RationalFunctionInterpolation.java", "license": "apache-2.0", "size": 12537 }
[ "net.finmath.interpolation.RationalFunctionInterpolation", "net.finmath.montecarlo.RandomVariable", "net.finmath.stochastic.RandomVariableInterface" ]
import net.finmath.interpolation.RationalFunctionInterpolation; import net.finmath.montecarlo.RandomVariable; import net.finmath.stochastic.RandomVariableInterface;
import net.finmath.interpolation.*; import net.finmath.montecarlo.*; import net.finmath.stochastic.*;
[ "net.finmath.interpolation", "net.finmath.montecarlo", "net.finmath.stochastic" ]
net.finmath.interpolation; net.finmath.montecarlo; net.finmath.stochastic;
1,121,891