method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
public static String makeOverrideClasspath(AppConfig appConf) { String[] overrides = appConf.overrideJars(); if (overrides == null) return null; ArrayList<String> cp = new ArrayList<String>(); for (String fname : overrides) { Path p = new Path(fname); ...
static String function(AppConfig appConf) { String[] overrides = appConf.overrideJars(); if (overrides == null) return null; ArrayList<String> cp = new ArrayList<String>(); for (String fname : overrides) { Path p = new Path(fname); cp.add(p.getName()); } return StringUtils.join(":", cp); }
/** * Create the override classpath, which will be added to * HADOOP_CLASSPATH at runtime by the controller job. */
Create the override classpath, which will be added to HADOOP_CLASSPATH at runtime by the controller job
makeOverrideClasspath
{ "repo_name": "cloudera/hcatalog", "path": "webhcat/svr/src/main/java/org/apache/hcatalog/templeton/LauncherDelegator.java", "license": "apache-2.0", "size": 7027 }
[ "java.util.ArrayList", "org.apache.hadoop.fs.Path", "org.apache.hadoop.util.StringUtils" ]
import java.util.ArrayList; import org.apache.hadoop.fs.Path; import org.apache.hadoop.util.StringUtils;
import java.util.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.util.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
448,052
public Builder key(CreditCurveDataKey key) { JodaBeanUtils.notNull(key, "key"); this._key = key; return this; }
Builder function(CreditCurveDataKey key) { JodaBeanUtils.notNull(key, "key"); this._key = key; return this; }
/** * Sets the {@code key} property in the builder. * @param key the new value, not null * @return this, for chaining, not null */
Sets the key property in the builder
key
{ "repo_name": "ChinaQuants/OG-Platform", "path": "sesame/sesame-engine/src/main/java/com/opengamma/sesame/marketdata/CreditCurveDataId.java", "license": "apache-2.0", "size": 11649 }
[ "com.opengamma.financial.analytics.isda.credit.CreditCurveDataKey", "org.joda.beans.JodaBeanUtils" ]
import com.opengamma.financial.analytics.isda.credit.CreditCurveDataKey; import org.joda.beans.JodaBeanUtils;
import com.opengamma.financial.analytics.isda.credit.*; import org.joda.beans.*;
[ "com.opengamma.financial", "org.joda.beans" ]
com.opengamma.financial; org.joda.beans;
1,351,677
static public JettyResponseListener checkResponseCode(final JettyResponseListener responseListener) throws IOException { final int rc = responseListener.getStatus(); if (rc < 200 || rc >= 300) { throw new HttpException(rc, "Status Code=" + rc + ", ...
static JettyResponseListener function(final JettyResponseListener responseListener) throws IOException { final int rc = responseListener.getStatus(); if (rc < 200 rc >= 300) { throw new HttpException(rc, STR + rc + STR + responseListener.getReason() + STR + responseListener.getResponseBody()); } if (log.isDebugEnabled(...
/** * Throw an exception if the status code does not indicate success. * * @param inputStreamResponseListener * The response. * * @return The response. * * @throws IOException */
Throw an exception if the status code does not indicate success
checkResponseCode
{ "repo_name": "smalyshev/blazegraph", "path": "bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/client/RemoteRepository.java", "license": "gpl-2.0", "size": 80051 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,609,860
String getProperty(String name, String defaultValue) { // the name we're given is the least qualified part of the name. We // construct the full property name // using the protocol (either "nntp" or "nntp-post"). String fullName = "mail." + protocol + "." + name; return Sessi...
String getProperty(String name, String defaultValue) { String fullName = "mail." + protocol + "." + name; return SessionUtil.getProperty(session, fullName, defaultValue); }
/** * Get a property associated with this mail session. Returns the provided * default if it doesn't exist. * * @param name * The name of the property. * @param defaultValue * The default value to return if the property doesn't exist. * * @return The ...
Get a property associated with this mail session. Returns the provided default if it doesn't exist
getProperty
{ "repo_name": "apache/geronimo-javamail", "path": "geronimo-javamail_1.3.1/geronimo-javamail_1.3.1_provider/src/main/java/org/apache/geronimo/javamail/transport/nntp/NNTPConnection.java", "license": "apache-2.0", "size": 39028 }
[ "org.apache.geronimo.mail.util.SessionUtil" ]
import org.apache.geronimo.mail.util.SessionUtil;
import org.apache.geronimo.mail.util.*;
[ "org.apache.geronimo" ]
org.apache.geronimo;
2,253,264
@VisibleForTesting boolean ensureAudioPermissionGranted( WindowAndroid windowAndroid, @VoiceInteractionSource int source) { if (windowAndroid.hasPermission(Manifest.permission.RECORD_AUDIO)) return true; // If we don't have permission and also can't ask, then there's no more work le...
boolean ensureAudioPermissionGranted( WindowAndroid windowAndroid, @VoiceInteractionSource int source) { if (windowAndroid.hasPermission(Manifest.permission.RECORD_AUDIO)) return true; if (!windowAndroid.canRequestPermission(Manifest.permission.RECORD_AUDIO)) { mDelegate.updateMicButtonState(); return false; } Permissi...
/** * Requests the audio permission and resolves the voice recognition request if necessary. * * @param windowAndroid Used to request audio permissions from the Android system. * @param source The source of the mic button click, used to record metrics. * @return Whether audio permissions are gr...
Requests the audio permission and resolves the voice recognition request if necessary
ensureAudioPermissionGranted
{ "repo_name": "endlessm/chromium-browser", "path": "chrome/android/java/src/org/chromium/chrome/browser/omnibox/voice/VoiceRecognitionHandler.java", "license": "bsd-3-clause", "size": 20825 }
[ "android.content.pm.PackageManager", "org.chromium.ui.base.PermissionCallback", "org.chromium.ui.base.WindowAndroid" ]
import android.content.pm.PackageManager; import org.chromium.ui.base.PermissionCallback; import org.chromium.ui.base.WindowAndroid;
import android.content.pm.*; import org.chromium.ui.base.*;
[ "android.content", "org.chromium.ui" ]
android.content; org.chromium.ui;
2,206,346
User findUser(String username, String password);
User findUser(String username, String password);
/** * find user * @param username * @param password * @return user */
find user
findUser
{ "repo_name": "brandonbai/SmartMonitor", "path": "Server/src/main/java/com/github/brandonbai/smartmonitor/service/UserService.java", "license": "apache-2.0", "size": 739 }
[ "com.github.brandonbai.smartmonitor.pojo.User" ]
import com.github.brandonbai.smartmonitor.pojo.User;
import com.github.brandonbai.smartmonitor.pojo.*;
[ "com.github.brandonbai" ]
com.github.brandonbai;
457,237
protected boolean shouldOutputHeader(String headerName, Object headerValue, Exchange exchange) { return headerFilterStrategy == null || !headerFilterStrategy.applyFilterToCamelHeaders(headerName, headerValue, exchange); }
boolean function(String headerName, Object headerValue, Exchange exchange) { return headerFilterStrategy == null !headerFilterStrategy.applyFilterToCamelHeaders(headerName, headerValue, exchange); }
/** * Strategy to allow filtering of headers which are put on the JMS message * <p/> * <b>Note</b>: Currently only supports sending java identifiers as keys */
Strategy to allow filtering of headers which are put on the JMS message Note: Currently only supports sending java identifiers as keys
shouldOutputHeader
{ "repo_name": "nicolaferraro/camel", "path": "components/camel-sjms/src/main/java/org/apache/camel/component/sjms/jms/JmsBinding.java", "license": "apache-2.0", "size": 28465 }
[ "org.apache.camel.Exchange" ]
import org.apache.camel.Exchange;
import org.apache.camel.*;
[ "org.apache.camel" ]
org.apache.camel;
560,361
public static List<NodeDetails> allNodes() { // TODO: figure out what to return instead of event List<NodeDetails> nodeList = new ArrayList<>(); nodeList.add(standardNodeDetails()); nodeList.add(standardNodeDetails()); nodeList.add(standardNodeDetails()); node...
static List<NodeDetails> function() { List<NodeDetails> nodeList = new ArrayList<>(); nodeList.add(standardNodeDetails()); nodeList.add(standardNodeDetails()); nodeList.add(standardNodeDetails()); nodeList.add(standardNodeDetails()); return null; }
/** * Test fixture to create several {@link NodeDetails Nodes} and return a * list of {@link NodeDetails NodeDetails}. * * @return returns the details of the requested object. */
Test fixture to create several <code>NodeDetails Nodes</code> and return a list of <code>NodeDetails NodeDetails</code>
allNodes
{ "repo_name": "VT-Visionarium/osnap", "path": "src/test/java/edu/vt/arc/vis/osnap/rest/controllers/fixtures/DataFixture.java", "license": "apache-2.0", "size": 10434 }
[ "edu.vt.arc.vis.osnap.events.graph.NodeDetails", "java.util.ArrayList", "java.util.List" ]
import edu.vt.arc.vis.osnap.events.graph.NodeDetails; import java.util.ArrayList; import java.util.List;
import edu.vt.arc.vis.osnap.events.graph.*; import java.util.*;
[ "edu.vt.arc", "java.util" ]
edu.vt.arc; java.util;
526,000
static void processQueue(ReferenceQueue<Class<?>> queue, ConcurrentMap<? extends WeakReference<Class<?>>, ?> map) { Reference<? extends Class<?>> ref; while((ref = queue.poll()) != null) { map.remove(ref); } } ...
static void processQueue(ReferenceQueue<Class<?>> queue, ConcurrentMap<? extends WeakReference<Class<?>>, ?> map) { Reference<? extends Class<?>> ref; while((ref = queue.poll()) != null) { map.remove(ref); } } static class WeakClassKey extends WeakReference<Class<?>> { private final int hash; WeakClassKey(Class<?> cl, ...
/** * Removes from the specified map any keys that have been enqueued * on the specified reference queue. */
Removes from the specified map any keys that have been enqueued on the specified reference queue
processQueue
{ "repo_name": "isaacl/openjdk-jdk", "path": "src/share/classes/java/io/ObjectStreamClass.java", "license": "gpl-2.0", "size": 88024 }
[ "java.lang.ref.Reference", "java.lang.ref.ReferenceQueue", "java.lang.ref.WeakReference", "java.util.concurrent.ConcurrentMap" ]
import java.lang.ref.Reference; import java.lang.ref.ReferenceQueue; import java.lang.ref.WeakReference; import java.util.concurrent.ConcurrentMap;
import java.lang.ref.*; import java.util.concurrent.*;
[ "java.lang", "java.util" ]
java.lang; java.util;
1,268,196
public static Block fromFieldBlocks(boolean[] rowIsNull, Block[] fieldBlocks) { requireNonNull(rowIsNull, "rowIsNull is null"); int[] fieldBlockOffsets = new int[rowIsNull.length + 1]; for (int position = 0; position < rowIsNull.length; position++) { fieldBlockOffsets[positio...
static Block function(boolean[] rowIsNull, Block[] fieldBlocks) { requireNonNull(rowIsNull, STR); int[] fieldBlockOffsets = new int[rowIsNull.length + 1]; for (int position = 0; position < rowIsNull.length; position++) { fieldBlockOffsets[position + 1] = fieldBlockOffsets[position] + (rowIsNull[position] ? 0 : 1); } va...
/** * Create a row block directly from columnar nulls and field blocks. */
Create a row block directly from columnar nulls and field blocks
fromFieldBlocks
{ "repo_name": "yuananf/presto", "path": "presto-spi/src/main/java/com/facebook/presto/spi/block/RowBlock.java", "license": "apache-2.0", "size": 6696 }
[ "java.util.Objects" ]
import java.util.Objects;
import java.util.*;
[ "java.util" ]
java.util;
1,817,944
public BAMTaskSummaryQueryBuilder taskStatus(Status... status);
BAMTaskSummaryQueryBuilder function(Status... status);
/** * Specify one or more task statuses to use as a criteria. * @param status one or more task statuses * @return The current query builder instance */
Specify one or more task statuses to use as a criteria
taskStatus
{ "repo_name": "droolsjbpm/jbpm", "path": "jbpm-human-task/jbpm-human-task-audit/src/main/java/org/jbpm/services/task/audit/BAMTaskSummaryQueryBuilder.java", "license": "apache-2.0", "size": 5704 }
[ "org.kie.api.task.model.Status" ]
import org.kie.api.task.model.Status;
import org.kie.api.task.model.*;
[ "org.kie.api" ]
org.kie.api;
826,324
public void refreshNodesForcefully() { for (Entry<NodeId, RMNode> entry : rmContext.getRMNodes().entrySet()) { if (entry.getValue().getState() == NodeState.DECOMMISSIONING) { this.rmContext.getDispatcher().getEventHandler().handle( new RMNodeEvent(entry.getKey(), RMNodeEventType.DECOMMIS...
void function() { for (Entry<NodeId, RMNode> entry : rmContext.getRMNodes().entrySet()) { if (entry.getValue().getState() == NodeState.DECOMMISSIONING) { this.rmContext.getDispatcher().getEventHandler().handle( new RMNodeEvent(entry.getKey(), RMNodeEventType.DECOMMISSION)); } } }
/** * Forcefully decommission the nodes if they are in DECOMMISSIONING state */
Forcefully decommission the nodes if they are in DECOMMISSIONING state
refreshNodesForcefully
{ "repo_name": "gilv/hadoop", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/NodesListManager.java", "license": "apache-2.0", "size": 11167 }
[ "java.util.Map", "org.apache.hadoop.yarn.api.records.NodeId", "org.apache.hadoop.yarn.api.records.NodeState", "org.apache.hadoop.yarn.server.resourcemanager.rmnode.RMNode", "org.apache.hadoop.yarn.server.resourcemanager.rmnode.RMNodeEvent", "org.apache.hadoop.yarn.server.resourcemanager.rmnode.RMNodeEvent...
import java.util.Map; import org.apache.hadoop.yarn.api.records.NodeId; import org.apache.hadoop.yarn.api.records.NodeState; import org.apache.hadoop.yarn.server.resourcemanager.rmnode.RMNode; import org.apache.hadoop.yarn.server.resourcemanager.rmnode.RMNodeEvent; import org.apache.hadoop.yarn.server.resourcemanager.r...
import java.util.*; import org.apache.hadoop.yarn.api.records.*; import org.apache.hadoop.yarn.server.resourcemanager.rmnode.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
128,004
public static MozuClient<com.mozu.api.contracts.commerceruntime.orders.Order> removeAdjustmentClient(String orderId) throws Exception { return removeAdjustmentClient( orderId, null, null); }
static MozuClient<com.mozu.api.contracts.commerceruntime.orders.Order> function(String orderId) throws Exception { return removeAdjustmentClient( orderId, null, null); }
/** * Removes a price adjustment from the specified order. * <p><pre><code> * MozuClient<com.mozu.api.contracts.commerceruntime.orders.Order> mozuClient=RemoveAdjustmentClient( orderId); * client.setBaseAddress(url); * client.executeRequest(); * Order order = client.Result(); * </code></pre></p> * @para...
Removes a price adjustment from the specified order. <code><code> MozuClient mozuClient=RemoveAdjustmentClient( orderId); client.setBaseAddress(url); client.executeRequest(); Order order = client.Result(); </code></code>
removeAdjustmentClient
{ "repo_name": "sanjaymandadi/mozu-java", "path": "mozu-javaasync-core/src/main/java/com/mozu/api/clients/commerce/orders/AdjustmentClient.java", "license": "mit", "size": 12957 }
[ "com.mozu.api.MozuClient" ]
import com.mozu.api.MozuClient;
import com.mozu.api.*;
[ "com.mozu.api" ]
com.mozu.api;
261,233
@Test public void testExecute_1() throws Exception { TestPlanRunner testPlanRunner = new TestPlanRunner(new HDTestPlan(), 1, new TestHttpClient()); testPlanRunner.setHttpClient(null); TestStepContext testStepContext = new TestStepContext(new SleepTimeStep(), new Variables(), "", ...
void function() throws Exception { TestPlanRunner testPlanRunner = new TestPlanRunner(new HDTestPlan(), 1, new TestHttpClient()); testPlanRunner.setHttpClient(null); TestStepContext testStepContext = new TestStepContext(new SleepTimeStep(), new Variables(), STR", new TimerMap(), testPlanRunner); SleepTimeRunner fixture...
/** * Run the String execute() method test. * * @throws Exception * * @generatedBy CodePro at 12/16/14 5:53 PM */
Run the String execute() method test
testExecute_1
{ "repo_name": "kevinmcgoldrick/Tank", "path": "agent/apiharness/src/test/java/com/intuit/tank/runner/method/SleepTimeRunnerTest.java", "license": "epl-1.0", "size": 4101 }
[ "com.intuit.tank.harness.data.HDTestPlan", "com.intuit.tank.harness.data.SleepTimeStep", "com.intuit.tank.harness.test.data.Variables", "com.intuit.tank.runner.TestHttpClient", "com.intuit.tank.runner.TestPlanRunner", "com.intuit.tank.runner.TestStepContext", "org.junit.Assert" ]
import com.intuit.tank.harness.data.HDTestPlan; import com.intuit.tank.harness.data.SleepTimeStep; import com.intuit.tank.harness.test.data.Variables; import com.intuit.tank.runner.TestHttpClient; import com.intuit.tank.runner.TestPlanRunner; import com.intuit.tank.runner.TestStepContext; import org.junit.Assert;
import com.intuit.tank.harness.data.*; import com.intuit.tank.harness.test.data.*; import com.intuit.tank.runner.*; import org.junit.*;
[ "com.intuit.tank", "org.junit" ]
com.intuit.tank; org.junit;
2,577,144
@Function(name = "eval", arity = 1) public static Object eval(ExecutionContext cx, ExecutionContext caller, Object thisValue, Object source) { Realm realm = thisRealmValue(cx, thisValue, "Reflect.Realm.prototype.eval"); return IndirectEval(caller, realm,...
@Function(name = "eval", arity = 1) static Object function(ExecutionContext cx, ExecutionContext caller, Object thisValue, Object source) { Realm realm = thisRealmValue(cx, thisValue, STR); return IndirectEval(caller, realm, source); }
/** * 26.?.3.2 Reflect.Realm.prototype.eval (source) * * @param cx * the execution context * @param caller * the caller context * @param thisValue * the function this-value * @param source * ...
26.?.3.2 Reflect.Realm.prototype.eval (source)
eval
{ "repo_name": "anba/es6draft", "path": "src/main/java/com/github/anba/es6draft/runtime/objects/reflect/RealmPrototype.java", "license": "mit", "size": 15410 }
[ "com.github.anba.es6draft.runtime.ExecutionContext", "com.github.anba.es6draft.runtime.Realm", "com.github.anba.es6draft.runtime.internal.Properties", "com.github.anba.es6draft.runtime.objects.reflect.RealmConstructor" ]
import com.github.anba.es6draft.runtime.ExecutionContext; import com.github.anba.es6draft.runtime.Realm; import com.github.anba.es6draft.runtime.internal.Properties; import com.github.anba.es6draft.runtime.objects.reflect.RealmConstructor;
import com.github.anba.es6draft.runtime.*; import com.github.anba.es6draft.runtime.internal.*; import com.github.anba.es6draft.runtime.objects.reflect.*;
[ "com.github.anba" ]
com.github.anba;
1,511,155
public static HashMap<String, Object> randomComponentData() throws Exception { return DBTableTest.randomRowData("COMPONENTS"); }
static HashMap<String, Object> function() throws Exception { return DBTableTest.randomRowData(STR); }
/** * convenience method: create Random-Component-RowData * * @throws Exception * */
convenience method: create Random-Component-RowData
randomComponentData
{ "repo_name": "kgidev/maserJ", "path": "test/model/ObservationTest.java", "license": "apache-2.0", "size": 18348 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
1,823,049
@VisibleForTesting ImmutableList<String> createRenderLinesAtTime(long currentTimeMillis) { ImmutableList.Builder<String> lines = ImmutableList.builder(); // Print latest distributed build debug info lines if (buildStarted != null && buildStarted.isDistributedBuild()) { getDistBuildDebugInfo(lines...
ImmutableList<String> createRenderLinesAtTime(long currentTimeMillis) { ImmutableList.Builder<String> lines = ImmutableList.builder(); if (buildStarted != null && buildStarted.isDistributedBuild()) { getDistBuildDebugInfo(lines); } if (parseStarted.isEmpty() && parseFinished.isEmpty()) { logEventPair( STR, Optional.emp...
/** * Creates a list of lines to be rendered at a given time. * @param currentTimeMillis The time in ms to use when computing elapsed times. */
Creates a list of lines to be rendered at a given time
createRenderLinesAtTime
{ "repo_name": "darkforestzero/buck", "path": "src/com/facebook/buck/event/listener/SuperConsoleEventBusListener.java", "license": "apache-2.0", "size": 33128 }
[ "com.google.common.base.Joiner", "com.google.common.collect.ImmutableList", "com.google.common.collect.Lists", "java.util.List", "java.util.Optional" ]
import com.google.common.base.Joiner; import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; import java.util.List; import java.util.Optional;
import com.google.common.base.*; import com.google.common.collect.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
2,229,481
private void dumpBlockMeta(Block block, PrintWriter out) { List<DatanodeDescriptor> containingNodes = new ArrayList<DatanodeDescriptor>(); List<DatanodeStorageInfo> containingLiveReplicasNodes = new ArrayList<DatanodeStorageInfo>(); NumberReplicas numReplic...
void function(Block block, PrintWriter out) { List<DatanodeDescriptor> containingNodes = new ArrayList<DatanodeDescriptor>(); List<DatanodeStorageInfo> containingLiveReplicasNodes = new ArrayList<DatanodeStorageInfo>(); NumberReplicas numReplicas = new NumberReplicas(); chooseSourceDatanodes(getStoredBlock(block), cont...
/** * Dump the metadata for the given block in a human-readable * form. */
Dump the metadata for the given block in a human-readable form
dumpBlockMeta
{ "repo_name": "ronny-macmaster/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java", "license": "apache-2.0", "size": 186353 }
[ "java.io.PrintWriter", "java.util.ArrayList", "java.util.LinkedList", "java.util.List", "org.apache.hadoop.hdfs.protocol.Block" ]
import java.io.PrintWriter; import java.util.ArrayList; import java.util.LinkedList; import java.util.List; import org.apache.hadoop.hdfs.protocol.Block;
import java.io.*; import java.util.*; import org.apache.hadoop.hdfs.protocol.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
2,651,442
public void setUserDirectoryService(UserDirectoryService service) { m_userDirectoryService = service; } protected EventTrackingService m_eventTrackingService = null;
void function(UserDirectoryService service) { m_userDirectoryService = service; } protected EventTrackingService m_eventTrackingService = null;
/** * Dependency: UserDirectoryService. * * @param service * The UserDirectoryService. */
Dependency: UserDirectoryService
setUserDirectoryService
{ "repo_name": "harfalm/Sakai-10.1", "path": "presence/presence-impl/impl/src/java/org/sakaiproject/presence/impl/BasePresenceService.java", "license": "apache-2.0", "size": 21398 }
[ "org.sakaiproject.event.api.EventTrackingService", "org.sakaiproject.user.api.UserDirectoryService" ]
import org.sakaiproject.event.api.EventTrackingService; import org.sakaiproject.user.api.UserDirectoryService;
import org.sakaiproject.event.api.*; import org.sakaiproject.user.api.*;
[ "org.sakaiproject.event", "org.sakaiproject.user" ]
org.sakaiproject.event; org.sakaiproject.user;
1,200,766
public static String getBlockId(String shortBlockId) { String[] splitRecords = shortBlockId.split(CarbonCommonConstants.FILE_SEPARATOR); StringBuffer sb = new StringBuffer(); for (int i = 0; i < splitRecords.length; i++) { if (i == 0) { sb.append(PARTITION_PREFIX); sb.append(splitRec...
static String function(String shortBlockId) { String[] splitRecords = shortBlockId.split(CarbonCommonConstants.FILE_SEPARATOR); StringBuffer sb = new StringBuffer(); for (int i = 0; i < splitRecords.length; i++) { if (i == 0) { sb.append(PARTITION_PREFIX); sb.append(splitRecords[i]); } else if (i == 1) { sb.append(Carb...
/** * This method will append strings in path and return block id * * @param shortBlockId * @return blockId */
This method will append strings in path and return block id
getBlockId
{ "repo_name": "aniketadnaik/carbondataStreamIngest", "path": "core/src/main/java/org/apache/carbondata/core/util/path/CarbonTablePath.java", "license": "apache-2.0", "size": 25491 }
[ "org.apache.carbondata.core.constants.CarbonCommonConstants" ]
import org.apache.carbondata.core.constants.CarbonCommonConstants;
import org.apache.carbondata.core.constants.*;
[ "org.apache.carbondata" ]
org.apache.carbondata;
1,876,748
public void setDriverImplicitWait(int timeout) { manage().timeouts().implicitlyWait(timeout, TimeUnit.SECONDS); }
void function(int timeout) { manage().timeouts().implicitlyWait(timeout, TimeUnit.SECONDS); }
/** * Forces the driver to wait for passed number of seconds when looking up page elements before declaring that it * cannot find them. */
Forces the driver to wait for passed number of seconds when looking up page elements before declaring that it cannot find them
setDriverImplicitWait
{ "repo_name": "pbondoer/xwiki-platform", "path": "xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/XWikiWebDriver.java", "license": "lgpl-2.1", "size": 28802 }
[ "java.util.concurrent.TimeUnit" ]
import java.util.concurrent.TimeUnit;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
868,326
private static void phoneMnemonicsRecursive(String phoneNumber, int index, char[] partialMnemonic, List<String> result) { String[] keypad = { "0", "1", "ABC", "DEF", "GHI", "JKL", "MNO", "PQRS", "TUV", "WXYZ" }; if (index == phoneNumber.length()) { // all digits are processed, so add partialMnemo...
static void function(String phoneNumber, int index, char[] partialMnemonic, List<String> result) { String[] keypad = { "0", "1", "ABC", "DEF", "GHI", "JKL", "MNO", "PQRS", "TUV", "WXYZ" }; if (index == phoneNumber.length()) { result.add(new String(partialMnemonic)); } else { char key = phoneNumber.charAt(index); String...
/** * Recursively computes phone number mnemonics * * @param phoneNumber the phone number * @param index index of the currently processed digit * @param partialMnemonic character sequences that are already processed * @param result List of all possible mnemonics corresponding to the given phone number *...
Recursively computes phone number mnemonics
phoneMnemonicsRecursive
{ "repo_name": "murick/Algorithms", "path": "Java/src/main/java/recursion/phoneMnemonics/Solution1A.java", "license": "apache-2.0", "size": 2575 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
318,076
private void updateUIFromActivity(ActivitySummary as) { initNowView(); loadProperties(); ViewableActivitySummary vs = new ViewableActivitySummary(props, getResources(), as); // Coloured top bar alertLevelSummary.setText(vs.getAlertLevelSummary()); ((View)alertLevelSu...
void function(ActivitySummary as) { initNowView(); loadProperties(); ViewableActivitySummary vs = new ViewableActivitySummary(props, getResources(), as); alertLevelSummary.setText(vs.getAlertLevelSummary()); ((View)alertLevelSummary.getParent()).setBackgroundColor(vs.getColor()); disturbanceLevelValue.setText(vs.getDis...
/** * Called when the activity.txt has been successfully downloaded and parsed, to update the UI * with the information it contains. * @param as The parsed activity.txt */
Called when the activity.txt has been successfully downloaded and parsed, to update the UI with the information it contains
updateUIFromActivity
{ "repo_name": "aurora-watch-developers/AuroraWatchApp", "path": "app/src/main/java/org/aurorawatchdevs/aurorawatch/fragment/NowFragment.java", "license": "gpl-3.0", "size": 11835 }
[ "android.view.View", "org.aurorawatchdevs.aurorawatch.bean.ActivitySummary", "org.aurorawatchdevs.aurorawatch.bean.ViewableActivitySummary" ]
import android.view.View; import org.aurorawatchdevs.aurorawatch.bean.ActivitySummary; import org.aurorawatchdevs.aurorawatch.bean.ViewableActivitySummary;
import android.view.*; import org.aurorawatchdevs.aurorawatch.bean.*;
[ "android.view", "org.aurorawatchdevs.aurorawatch" ]
android.view; org.aurorawatchdevs.aurorawatch;
1,868,665
@Test public void startsOnDemandInstance() throws Exception { final Instance instance = Mockito.mock(Instance.class); Mockito.doReturn("1").when(instance).getInstanceId(); final Amazon amazon = Mockito.mock(Amazon.class); Mockito.doReturn(instance).when(amazon).runOnDemand(); ...
void function() throws Exception { final Instance instance = Mockito.mock(Instance.class); Mockito.doReturn("1").when(instance).getInstanceId(); final Amazon amazon = Mockito.mock(Amazon.class); Mockito.doReturn(instance).when(amazon).runOnDemand(); final Agent agent = new StartsEC2(amazon); final Talk talk = new Talk....
/** * StartsEC2 can start On-Demand Instance. * @throws Exception In case of error. */
StartsEC2 can start On-Demand Instance
startsOnDemandInstance
{ "repo_name": "joansmith/rultor", "path": "src/test/java/com/rultor/agents/ec2/StartsEC2Test.java", "license": "bsd-3-clause", "size": 2971 }
[ "com.amazonaws.services.ec2.model.Instance", "com.jcabi.matchers.XhtmlMatchers", "com.rultor.spi.Agent", "com.rultor.spi.Talk", "org.hamcrest.MatcherAssert", "org.mockito.Mockito", "org.xembly.Directives" ]
import com.amazonaws.services.ec2.model.Instance; import com.jcabi.matchers.XhtmlMatchers; import com.rultor.spi.Agent; import com.rultor.spi.Talk; import org.hamcrest.MatcherAssert; import org.mockito.Mockito; import org.xembly.Directives;
import com.amazonaws.services.ec2.model.*; import com.jcabi.matchers.*; import com.rultor.spi.*; import org.hamcrest.*; import org.mockito.*; import org.xembly.*;
[ "com.amazonaws.services", "com.jcabi.matchers", "com.rultor.spi", "org.hamcrest", "org.mockito", "org.xembly" ]
com.amazonaws.services; com.jcabi.matchers; com.rultor.spi; org.hamcrest; org.mockito; org.xembly;
1,598,695
public void showSettingsAlert() { AlertDialog.Builder alertDialog = new AlertDialog.Builder(mContext); // Setting Dialog Title alertDialog.setTitle("GPS is settings"); // Setting Dialog Message alertDialog.setMessage("GPS is not enabled. Do you want to go to settings menu?"...
void function() { AlertDialog.Builder alertDialog = new AlertDialog.Builder(mContext); alertDialog.setTitle(STR); alertDialog.setMessage(STR);
/** * Function to show settings alert dialog On pressing Settings button will * lauch Settings Options * */
Function to show settings alert dialog On pressing Settings button will lauch Settings Options
showSettingsAlert
{ "repo_name": "SumanBoss/GpsPlugin", "path": "src/android/GPSManager.java", "license": "mit", "size": 6050 }
[ "android.app.AlertDialog" ]
import android.app.AlertDialog;
import android.app.*;
[ "android.app" ]
android.app;
27,853
public Selector getSelector(String selector) { Selector ans; try { ans = QueryExpr(); if (!ans.mayBeBoolean()) ans.setType(Selector.INVALID); } catch (ParseException e) { // No FFDC code needed Object obj = null; ans = new LiteralImpl(obj); ans.setType(Selector....
Selector function(String selector) { Selector ans; try { ans = QueryExpr(); if (!ans.mayBeBoolean()) ans.setType(Selector.INVALID); } catch (ParseException e) { Object obj = null; ans = new LiteralImpl(obj); ans.setType(Selector.INVALID); } return ans; }
/** Return the Selector tree associated with a primed parser. * * @return a selector tree. If the parse was successful, the top node of the tree will * be of BOOLEAN type; otherwise, it will be of INVALID type. **/
Return the Selector tree associated with a primed parser
getSelector
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/matchspace/selector/impl/MatchParserImpl.java", "license": "epl-1.0", "size": 43339 }
[ "com.ibm.ws.sib.matchspace.Selector" ]
import com.ibm.ws.sib.matchspace.Selector;
import com.ibm.ws.sib.matchspace.*;
[ "com.ibm.ws" ]
com.ibm.ws;
1,692,548
public static void stopAnimations() { if (timer != null) { propertiesLock.lock(); try { timer.cancel(); timer = null; for (WeakReference<AnimatableProperty> pref : properties) { AnimatableProperty p = pref.get(); if (p != null) { p.finishAnimation(); p.interpolate = false; ...
static void function() { if (timer != null) { propertiesLock.lock(); try { timer.cancel(); timer = null; for (WeakReference<AnimatableProperty> pref : properties) { AnimatableProperty p = pref.get(); if (p != null) { p.finishAnimation(); p.interpolate = false; } } } finally { propertiesLock.unlock(); } } }
/** * Stop the animation. If the animation is stopped before all steps have * been performed, all properties snap to their designated final values. */
Stop the animation. If the animation is stopped before all steps have been performed, all properties snap to their designated final values
stopAnimations
{ "repo_name": "DataVizApril/parsets", "path": "edu/uncc/parsets/util/AnimatableProperty.java", "license": "bsd-3-clause", "size": 11731 }
[ "java.lang.ref.WeakReference" ]
import java.lang.ref.WeakReference;
import java.lang.ref.*;
[ "java.lang" ]
java.lang;
2,433,947
static Class<?>[] getSuperInterfaces(Class<?>[] childInterfaces) { List<Class<?>> allInterfaces = new ArrayList<Class<?>>(); for (Class<?> childInterface : childInterfaces) { if (VersionedProtocol.class.isAssignableFrom(childInterface)) { allInterfaces.add(childInterface); allInterf...
static Class<?>[] getSuperInterfaces(Class<?>[] childInterfaces) { List<Class<?>> allInterfaces = new ArrayList<Class<?>>(); for (Class<?> childInterface : childInterfaces) { if (VersionedProtocol.class.isAssignableFrom(childInterface)) { allInterfaces.add(childInterface); allInterfaces.addAll( Arrays.asList( getSuperI...
/** * Get all superInterfaces that extend VersionedProtocol * @param childInterfaces * @return the super interfaces that extend VersionedProtocol */
Get all superInterfaces that extend VersionedProtocol
getSuperInterfaces
{ "repo_name": "jaypatil/hadoop", "path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/RPC.java", "license": "gpl-3.0", "size": 35801 }
[ "java.util.ArrayList", "java.util.Arrays", "java.util.List" ]
import java.util.ArrayList; import java.util.Arrays; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,594,783
private void addIfNotInitialized(ListWriter list) { if (list.getValueCapacity() == 0) { emptyArrayWriters.add(list); } }
void function(ListWriter list) { if (list.getValueCapacity() == 0) { emptyArrayWriters.add(list); } }
/** * Checks that list has not been initialized and adds it to the emptyArrayWriters collection. * @param list ListWriter that should be checked */
Checks that list has not been initialized and adds it to the emptyArrayWriters collection
addIfNotInitialized
{ "repo_name": "bitblender/drill", "path": "exec/java-exec/src/main/java/org/apache/drill/exec/vector/complex/fn/JsonReader.java", "license": "apache-2.0", "size": 21088 }
[ "org.apache.drill.exec.vector.complex.writer.BaseWriter" ]
import org.apache.drill.exec.vector.complex.writer.BaseWriter;
import org.apache.drill.exec.vector.complex.writer.*;
[ "org.apache.drill" ]
org.apache.drill;
117,919
Property<String> getUrl();
Property<String> getUrl();
/** * The URL of this author. */
The URL of this author
getUrl
{ "repo_name": "gradle/gradle", "path": "subprojects/ivy/src/main/java/org/gradle/api/publish/ivy/IvyModuleDescriptorAuthor.java", "license": "apache-2.0", "size": 997 }
[ "org.gradle.api.provider.Property" ]
import org.gradle.api.provider.Property;
import org.gradle.api.provider.*;
[ "org.gradle.api" ]
org.gradle.api;
1,508,438
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public com.liferay.wsrp.model.WSRPProducer getWSRPProducer( long wsrpProducerId) throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException;
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true) com.liferay.wsrp.model.WSRPProducer function( long wsrpProducerId) throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException;
/** * Returns the w s r p producer with the primary key. * * @param wsrpProducerId the primary key of the w s r p producer * @return the w s r p producer * @throws PortalException if a w s r p producer with the primary key could not be found * @throws SystemException if a system exception occurred */
Returns the w s r p producer with the primary key
getWSRPProducer
{ "repo_name": "inbloom/datastore-portal", "path": "portlets/wsrp-portlet/docroot/WEB-INF/service/com/liferay/wsrp/service/WSRPProducerLocalService.java", "license": "apache-2.0", "size": 13011 }
[ "com.liferay.portal.kernel.exception.PortalException", "com.liferay.portal.kernel.exception.SystemException", "com.liferay.portal.kernel.transaction.Propagation", "com.liferay.portal.kernel.transaction.Transactional" ]
import com.liferay.portal.kernel.exception.PortalException; import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.kernel.transaction.Propagation; import com.liferay.portal.kernel.transaction.Transactional;
import com.liferay.portal.kernel.exception.*; import com.liferay.portal.kernel.transaction.*;
[ "com.liferay.portal" ]
com.liferay.portal;
2,560,037
private byte[] buildDiff(final Pic base, final Pic frame, final Pic last) { ByteArrayOutputStream stream; byte[] bytes; int width, height; int x, y, i; int p1, p2; int offset; boolean changed; stream = new ByteArrayOutputStream(); try ...
byte[] function(final Pic base, final Pic frame, final Pic last) { ByteArrayOutputStream stream; byte[] bytes; int width, height; int x, y, i; int p1, p2; int offset; boolean changed; stream = new ByteArrayOutputStream(); try { try { width = base.getWidth(); height = base.getHeight(); bytes = new byte[4]; for (y = 0; y...
/** * Builds a diff between two frames. For the 12th frame the last frame must * be specified, too so the diff also overwrites the changes made by tha * last frame. This is needed because Wasteland loops the frames 12-15. * * @param base * The base frame * @param frame ...
Builds a diff between two frames. For the 12th frame the last frame must be specified, too so the diff also overwrites the changes made by tha last frame. This is needed because Wasteland loops the frames 12-15
buildDiff
{ "repo_name": "delMar43/wlandsuite", "path": "src/main/java/de/ailis/wlandsuite/cpa/Cpa.java", "license": "mit", "size": 12112 }
[ "de.ailis.wlandsuite.pic.Pic", "java.io.ByteArrayOutputStream", "java.io.IOException" ]
import de.ailis.wlandsuite.pic.Pic; import java.io.ByteArrayOutputStream; import java.io.IOException;
import de.ailis.wlandsuite.pic.*; import java.io.*;
[ "de.ailis.wlandsuite", "java.io" ]
de.ailis.wlandsuite; java.io;
2,384,144
@SuppressWarnings("unchecked") public static <C extends GcdRingElem<C>> FactorAbstract<C> getImplementation(RingFactory<C> fac) { logger.info("factor factory = " + fac.getClass().getName()); //System.out.println("fac_o_ufd = " + fac.getClass().getName()); FactorAbstractufd = null; ...
@SuppressWarnings(STR) static <C extends GcdRingElem<C>> FactorAbstract<C> function(RingFactory<C> fac) { logger.info(STR + fac.getClass().getName()); FactorAbstractufd = null; AlgebraicNumberRing afac = null; ComplexRing cfac = null; QuotientRing qfac = null; GenPolynomialRing pfac = null; Object ofac = fac; if (ofac ...
/** * Determine suitable implementation of factorization algorithms, other * cases. * @param <C> coefficient type * @param fac RingFactory&lt;C&gt;. * @return factorization algorithm implementation. */
Determine suitable implementation of factorization algorithms, other cases
getImplementation
{ "repo_name": "breandan/java-algebra-system", "path": "src/edu/jas/ufd/FactorFactory.java", "license": "gpl-2.0", "size": 7312 }
[ "edu.jas.arith.BigInteger", "edu.jas.arith.BigRational", "edu.jas.arith.ModIntegerRing", "edu.jas.arith.ModLongRing", "edu.jas.poly.AlgebraicNumberRing", "edu.jas.poly.ComplexRing", "edu.jas.poly.GenPolynomialRing", "edu.jas.structure.GcdRingElem", "edu.jas.structure.RingFactory" ]
import edu.jas.arith.BigInteger; import edu.jas.arith.BigRational; import edu.jas.arith.ModIntegerRing; import edu.jas.arith.ModLongRing; import edu.jas.poly.AlgebraicNumberRing; import edu.jas.poly.ComplexRing; import edu.jas.poly.GenPolynomialRing; import edu.jas.structure.GcdRingElem; import edu.jas.structure.RingFa...
import edu.jas.arith.*; import edu.jas.poly.*; import edu.jas.structure.*;
[ "edu.jas.arith", "edu.jas.poly", "edu.jas.structure" ]
edu.jas.arith; edu.jas.poly; edu.jas.structure;
390,490
public static CommentBuilder theUser(final UserDetail user) { return new CommentBuilder().withUser(user); }
static CommentBuilder function(final UserDetail user) { return new CommentBuilder().withUser(user); }
/** * Gets a comment builder for the specified user. * @param user the user for which a comment builder is provided. * @return a comment builder. */
Gets a comment builder for the specified user
theUser
{ "repo_name": "auroreallibe/Silverpeas-Core", "path": "core-web/src/test-awaiting/java/com/silverpeas/comment/web/CommentTestResources.java", "license": "agpl-3.0", "size": 3052 }
[ "com.stratelia.webactiv.beans.admin.UserDetail" ]
import com.stratelia.webactiv.beans.admin.UserDetail;
import com.stratelia.webactiv.beans.admin.*;
[ "com.stratelia.webactiv" ]
com.stratelia.webactiv;
584,145
public static Command<Void> start() { return new Command<>("Profiler.start", ImmutableMap.of()); }
static Command<Void> function() { return new Command<>(STR, ImmutableMap.of()); }
/** * start Profiling process */
start Profiling process
start
{ "repo_name": "joshbruning/selenium", "path": "java/client/src/org/openqa/selenium/devtools/profiler/Profiler.java", "license": "apache-2.0", "size": 5576 }
[ "com.google.common.collect.ImmutableMap", "org.openqa.selenium.devtools.Command" ]
import com.google.common.collect.ImmutableMap; import org.openqa.selenium.devtools.Command;
import com.google.common.collect.*; import org.openqa.selenium.devtools.*;
[ "com.google.common", "org.openqa.selenium" ]
com.google.common; org.openqa.selenium;
2,742,176
JMenu createMenu(Map<String,javax.swing.Action> am) { JMenu res = new JMenu(name); for (JMenuItem item : createMenuItems(am)) { res.add(item); } return res; }
JMenu createMenu(Map<String,javax.swing.Action> am) { JMenu res = new JMenu(name); for (JMenuItem item : createMenuItems(am)) { res.add(item); } return res; }
/** * Creates menu from this config. * @param am string/action mapping * @return menu items */
Creates menu from this config
createMenu
{ "repo_name": "triathematician/blaise-app", "path": "blaise-app/src/main/java/com/googlecode/blaisemath/app/OptionMenuConfig.java", "license": "apache-2.0", "size": 6169 }
[ "java.util.Map", "javax.swing.Action", "javax.swing.JMenu", "javax.swing.JMenuItem" ]
import java.util.Map; import javax.swing.Action; import javax.swing.JMenu; import javax.swing.JMenuItem;
import java.util.*; import javax.swing.*;
[ "java.util", "javax.swing" ]
java.util; javax.swing;
40,115
@ServiceMethod(returns = ReturnType.SINGLE) public WorkflowTriggerCallbackUrlInner listContentCallbackUrl( String resourceGroupName, String integrationAccountName, String agreementName, GetCallbackUrlParameters listContentCallbackUrl) { return listContentCallbackUrlAsync(...
@ServiceMethod(returns = ReturnType.SINGLE) WorkflowTriggerCallbackUrlInner function( String resourceGroupName, String integrationAccountName, String agreementName, GetCallbackUrlParameters listContentCallbackUrl) { return listContentCallbackUrlAsync( resourceGroupName, integrationAccountName, agreementName, listConten...
/** * Get the content callback url. * * @param resourceGroupName The resource group name. * @param integrationAccountName The integration account name. * @param agreementName The integration account agreement name. * @param listContentCallbackUrl The callback url parameters. * @throws...
Get the content callback url
listContentCallbackUrl
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/logic/azure-resourcemanager-logic/src/main/java/com/azure/resourcemanager/logic/implementation/IntegrationAccountAgreementsClientImpl.java", "license": "mit", "size": 57468 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.resourcemanager.logic.fluent.models.WorkflowTriggerCallbackUrlInner", "com.azure.resourcemanager.logic.models.GetCallbackUrlParameters" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.logic.fluent.models.WorkflowTriggerCallbackUrlInner; import com.azure.resourcemanager.logic.models.GetCallbackUrlParameters;
import com.azure.core.annotation.*; import com.azure.resourcemanager.logic.fluent.models.*; import com.azure.resourcemanager.logic.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
2,472,527
private long getLong() throws IOException { st.nextToken(); if (st.ttype == StreamTokenizer.TT_WORD) return Long.parseLong(st.sval); else if (st.ttype == StreamTokenizer.TT_EOF) throw new EOFException("End-of-File encountered during parsing"); else ...
long function() throws IOException { st.nextToken(); if (st.ttype == StreamTokenizer.TT_WORD) return Long.parseLong(st.sval); else if (st.ttype == StreamTokenizer.TT_EOF) throw new EOFException(STR); else throw new IOException(STR); }
/** * Reads a long */
Reads a long
getLong
{ "repo_name": "jpalves/matrix-toolkits-java", "path": "src/main/java/no/uib/cipr/matrix/io/MatrixVectorReader.java", "license": "lgpl-3.0", "size": 21242 }
[ "java.io.EOFException", "java.io.IOException", "java.io.StreamTokenizer" ]
import java.io.EOFException; import java.io.IOException; import java.io.StreamTokenizer;
import java.io.*;
[ "java.io" ]
java.io;
1,777,748
public void setAirDay( Date airDay ) { this.airDay = airDay; }
void function( Date airDay ) { this.airDay = airDay; }
/** * Sets the airDay attribute of the Programme object * * @param airDay The new airDay value */
Sets the airDay attribute of the Programme object
setAirDay
{ "repo_name": "andybalaam/freeguide", "path": "src/freeguide/common/lib/fgspecific/data/TVProgramme.java", "license": "gpl-2.0", "size": 16014 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,773,868
@Override public void start( ResourceManagerId newResourceManagerId, Executor newMainThreadExecutor, ResourceActions newResourceActions) { LOG.debug("Starting the slot manager."); this.resourceManagerId = Preconditions.checkNotNull(newResourceManagerId); ...
void function( ResourceManagerId newResourceManagerId, Executor newMainThreadExecutor, ResourceActions newResourceActions) { LOG.debug(STR); this.resourceManagerId = Preconditions.checkNotNull(newResourceManagerId); mainThreadExecutor = Preconditions.checkNotNull(newMainThreadExecutor); resourceActions = Preconditions....
/** * Starts the slot manager with the given leader id and resource manager actions. * * @param newResourceManagerId to use for communication with the task managers * @param newMainThreadExecutor to use to run code in the ResourceManager's main thread * @param newResourceActions to use for reso...
Starts the slot manager with the given leader id and resource manager actions
start
{ "repo_name": "clarkyzl/flink", "path": "flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/DeclarativeSlotManager.java", "license": "apache-2.0", "size": 35381 }
[ "java.util.concurrent.Executor", "org.apache.flink.runtime.resourcemanager.ResourceManagerId", "org.apache.flink.util.Preconditions" ]
import java.util.concurrent.Executor; import org.apache.flink.runtime.resourcemanager.ResourceManagerId; import org.apache.flink.util.Preconditions;
import java.util.concurrent.*; import org.apache.flink.runtime.resourcemanager.*; import org.apache.flink.util.*;
[ "java.util", "org.apache.flink" ]
java.util; org.apache.flink;
1,102,130
public static TestCase getVAEMnistAnomaly() { return new TestCase() { { testName = "VAEMnistAnomaly"; testType = TestType.RANDOM_INIT; testPredictions = true; testUnsupervisedTraining = true; testTrainingCurves = fal...
static TestCase function() { return new TestCase() { { testName = STR; testType = TestType.RANDOM_INIT; testPredictions = true; testUnsupervisedTraining = true; testTrainingCurves = false; testParamsPostTraining = false; testGradients = false; testEvaluation = false; testOverfitting = false; unsupervisedTrainLayersMLN ...
/** * Basically: the MNIST VAE anomaly example */
Basically: the MNIST VAE anomaly example
getVAEMnistAnomaly
{ "repo_name": "RobAltena/deeplearning4j", "path": "deeplearning4j/dl4j-integration-tests/src/test/java/org/deeplearning4j/integration/testcases/UnsupervisedTestCases.java", "license": "apache-2.0", "size": 4939 }
[ "org.deeplearning4j.integration.TestCase" ]
import org.deeplearning4j.integration.TestCase;
import org.deeplearning4j.integration.*;
[ "org.deeplearning4j.integration" ]
org.deeplearning4j.integration;
2,666,850
public static TextEditorWordNavigationAction createTextEditorWordPreviousAction(ITextEditor editor, StyledText styledText) { TextEditorWordNavigationAction action = new TextEditorWordNavigationAction(editor, styledText, ITextEditorActionDefinitionIds.WORD_PREVIOUS, ST.WORD_PREVIOUS, false); // false = mov...
static TextEditorWordNavigationAction function(ITextEditor editor, StyledText styledText) { TextEditorWordNavigationAction action = new TextEditorWordNavigationAction(editor, styledText, ITextEditorActionDefinitionIds.WORD_PREVIOUS, ST.WORD_PREVIOUS, false); editor.setAction(action.getActionDefinitionId(), action); ret...
/** * Create a new Action for the WORD_PREVIOUS command, and connect it * to the given editor. * * @param editor * @param styledText * @return */
Create a new Action for the WORD_PREVIOUS command, and connect it to the given editor
createTextEditorWordPreviousAction
{ "repo_name": "cybersonic/org.cfeclipse.cfml", "path": "src/org/cfeclipse/cfml/editors/actions/TextEditorWordNavigationAction.java", "license": "mit", "size": 6777 }
[ "org.eclipse.swt.custom.StyledText", "org.eclipse.ui.texteditor.ITextEditor", "org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds" ]
import org.eclipse.swt.custom.StyledText; import org.eclipse.ui.texteditor.ITextEditor; import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
import org.eclipse.swt.custom.*; import org.eclipse.ui.texteditor.*;
[ "org.eclipse.swt", "org.eclipse.ui" ]
org.eclipse.swt; org.eclipse.ui;
1,996,328
BundleSet getBundleSet() throws ModelOperationException;
BundleSet getBundleSet() throws ModelOperationException;
/** * The method retrieves the {@link BundleSet} corresponding to the current BundableNode for when it is necessary to deploy it. * * @return the BundleSet corresponding to the current BundableNode * @throws ModelOperationException if any exceptions are thrown when retrieving the BundleSet */
The method retrieves the <code>BundleSet</code> corresponding to the current BundableNode for when it is necessary to deploy it
getBundleSet
{ "repo_name": "briandipalma/brjs", "path": "brjs-core/src/main/java/org/bladerunnerjs/api/BundlableNode.java", "license": "lgpl-3.0", "size": 4344 }
[ "org.bladerunnerjs.api.model.exception.ModelOperationException" ]
import org.bladerunnerjs.api.model.exception.ModelOperationException;
import org.bladerunnerjs.api.model.exception.*;
[ "org.bladerunnerjs.api" ]
org.bladerunnerjs.api;
1,980,119
public AbstractFunction findFunction(int id) { if (id >= 0) { if (id < _fun.length && ! (_fun[id] instanceof UndefinedFunction)) { return _fun[id]; } else { return null; } } return null; }
AbstractFunction function(int id) { if (id >= 0) { if (id < _fun.length && ! (_fun[id] instanceof UndefinedFunction)) { return _fun[id]; } else { return null; } } return null; }
/** * Returns the function with a given name. * * Compiled mode normally uses the _fun array directly, so this call * is rare. */
Returns the function with a given name. Compiled mode normally uses the _fun array directly, so this call is rare
findFunction
{ "repo_name": "dwango/quercus", "path": "src/main/java/com/caucho/quercus/env/Env.java", "license": "gpl-2.0", "size": 161703 }
[ "com.caucho.quercus.function.AbstractFunction", "com.caucho.quercus.program.UndefinedFunction" ]
import com.caucho.quercus.function.AbstractFunction; import com.caucho.quercus.program.UndefinedFunction;
import com.caucho.quercus.function.*; import com.caucho.quercus.program.*;
[ "com.caucho.quercus" ]
com.caucho.quercus;
246,714
public Observable<ServiceResponse<Page<OperationInner>>> listNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); }
Observable<ServiceResponse<Page<OperationInner>>> function(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException(STR); }
/** * Lists all of the available Cosmos DB Resource Provider operations. * ServiceResponse<PageImpl1<OperationInner>> * @param nextPageLink The NextLink from the previous successful call to List operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the ...
Lists all of the available Cosmos DB Resource Provider operations
listNextSinglePageAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/cosmos/mgmt-v2020_06_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_06_01_preview/implementation/OperationsInner.java", "license": "mit", "size": 13854 }
[ "com.microsoft.azure.Page", "com.microsoft.rest.ServiceResponse" ]
import com.microsoft.azure.Page; import com.microsoft.rest.ServiceResponse;
import com.microsoft.azure.*; import com.microsoft.rest.*;
[ "com.microsoft.azure", "com.microsoft.rest" ]
com.microsoft.azure; com.microsoft.rest;
2,173,463
public static UpdateEntityPacket create(Entity entity) { if (!(entity instanceof ISyncable)) { throw new IllegalArgumentException("You cannot use this packet to sync this entity. The entity has to implement ISyncable"); } UpdateEntityPacket packet = new UpdateEntityPacket(); ...
static UpdateEntityPacket function(Entity entity) { if (!(entity instanceof ISyncable)) { throw new IllegalArgumentException(STR); } UpdateEntityPacket packet = new UpdateEntityPacket(); packet.id = entity.getId(); packet.data = new CompoundNBT(); ((ISyncable) entity).writeFullUpdateToNBT(packet.data); return packet; }
/** * Create a sync packet for the given syncable entity containing the data from it's ISyncable implementation * * @param entity Has to implement ISyncable * @return */
Create a sync packet for the given syncable entity containing the data from it's ISyncable implementation
create
{ "repo_name": "TeamLapen/Vampirism", "path": "src/lib/java/de/teamlapen/lib/network/UpdateEntityPacket.java", "license": "lgpl-3.0", "size": 7956 }
[ "de.teamlapen.lib.lib.network.ISyncable", "net.minecraft.entity.Entity", "net.minecraft.nbt.CompoundNBT" ]
import de.teamlapen.lib.lib.network.ISyncable; import net.minecraft.entity.Entity; import net.minecraft.nbt.CompoundNBT;
import de.teamlapen.lib.lib.network.*; import net.minecraft.entity.*; import net.minecraft.nbt.*;
[ "de.teamlapen.lib", "net.minecraft.entity", "net.minecraft.nbt" ]
de.teamlapen.lib; net.minecraft.entity; net.minecraft.nbt;
1,883,132
public static void checkGLError(String tag, String label) { int error; while ((error = GLES20.glGetError()) != GLES20.GL_NO_ERROR) { Log.e(tag, label + ": glError " + error); throw new RuntimeException(label + ": glError " + error); } }
static void function(String tag, String label) { int error; while ((error = GLES20.glGetError()) != GLES20.GL_NO_ERROR) { Log.e(tag, label + STR + error); throw new RuntimeException(label + STR + error); } }
/** * Checks if we've had an error inside of OpenGL ES, and if so what that error is. * * @param label Label to report in case of error. * @throws RuntimeException If an OpenGL error is detected. */
Checks if we've had an error inside of OpenGL ES, and if so what that error is
checkGLError
{ "repo_name": "googlecreativelab/ar-drawing-java", "path": "app/src/main/java/com/googlecreativelab/drawar/rendering/ShaderUtil.java", "license": "apache-2.0", "size": 3444 }
[ "android.util.Log" ]
import android.util.Log;
import android.util.*;
[ "android.util" ]
android.util;
1,823,437
private static String formatResponse(HttpResponse response, String encoding) { if (null == response.getEntity()) { throw new ResponseFormatException("Bad response, getEntity() is null"); } try { String s = EntityUtils.toString(response.getEntity(), encoding); if (s == null) { throw new ...
static String function(HttpResponse response, String encoding) { if (null == response.getEntity()) { throw new ResponseFormatException(STR); } try { String s = EntityUtils.toString(response.getEntity(), encoding); if (s == null) { throw new ResponseFormatException(STR); } checkResponseCode(response.getStatusLine().getS...
/** * Converts server's response into String * * @param response Server's response * @return String */
Converts server's response into String
formatResponse
{ "repo_name": "bosik/diacomp", "path": "portable/comp-android/diacomp/src/main/java/org/bosik/diacomp/android/backend/common/webclient/WebClient.java", "license": "gpl-3.0", "size": 10368 }
[ "java.io.IOException", "org.apache.http.HttpResponse", "org.apache.http.util.EntityUtils", "org.bosik.diacomp.android.backend.common.webclient.exceptions.ResponseFormatException" ]
import java.io.IOException; import org.apache.http.HttpResponse; import org.apache.http.util.EntityUtils; import org.bosik.diacomp.android.backend.common.webclient.exceptions.ResponseFormatException;
import java.io.*; import org.apache.http.*; import org.apache.http.util.*; import org.bosik.diacomp.android.backend.common.webclient.exceptions.*;
[ "java.io", "org.apache.http", "org.bosik.diacomp" ]
java.io; org.apache.http; org.bosik.diacomp;
2,131,932
private BigDecimal getThirdPartyPromotionAmount(Locator<Object> locator, VenOrderItem venOrderItem, List<VenOrderItemAdjustment> adjustmentList){ BigDecimal thirdPartyPromotionAmount = new BigDecimal(0); try { VenPartyPromotionShareSessionEJBLocal partyPromotionShareHome = (VenPartyPromotionShareSessionEJB...
BigDecimal function(Locator<Object> locator, VenOrderItem venOrderItem, List<VenOrderItemAdjustment> adjustmentList){ BigDecimal thirdPartyPromotionAmount = new BigDecimal(0); try { VenPartyPromotionShareSessionEJBLocal partyPromotionShareHome = (VenPartyPromotionShareSessionEJBLocal) locator .lookupLocal(VenPartyPromo...
/** * Calculates the third party promotion amount for the order item * @param locator is a locator to use for EJB lookup * @param venOrderItem is the order item in question * @param adjustmentList is a list of the marginPromo * @return the third party promotion amount */
Calculates the third party promotion amount for the order item
getThirdPartyPromotionAmount
{ "repo_name": "yauritux/venice-legacy", "path": "Venice/Venice-Service/src/main/java/com/gdn/venice/facade/logistics/activity/SalesRecordGenerator.java", "license": "apache-2.0", "size": 32640 }
[ "com.djarum.raf.utilities.Locator", "com.gdn.venice.facade.VenPartyPromotionShareSessionEJBLocal", "com.gdn.venice.persistence.VenOrderItem", "com.gdn.venice.persistence.VenOrderItemAdjustment", "com.gdn.venice.persistence.VenPartyPromotionShare", "com.gdn.venice.util.VeniceConstants", "java.math.BigDec...
import com.djarum.raf.utilities.Locator; import com.gdn.venice.facade.VenPartyPromotionShareSessionEJBLocal; import com.gdn.venice.persistence.VenOrderItem; import com.gdn.venice.persistence.VenOrderItemAdjustment; import com.gdn.venice.persistence.VenPartyPromotionShare; import com.gdn.venice.util.VeniceConstants; imp...
import com.djarum.raf.utilities.*; import com.gdn.venice.facade.*; import com.gdn.venice.persistence.*; import com.gdn.venice.util.*; import java.math.*; import java.util.*; import javax.ejb.*;
[ "com.djarum.raf", "com.gdn.venice", "java.math", "java.util", "javax.ejb" ]
com.djarum.raf; com.gdn.venice; java.math; java.util; javax.ejb;
1,072,556
public static void distSumsToOne(Distribution d) { BigFraction sum = BigFraction.ZERO; for (int i = d.lowerBound(); i < d.upperBound(); ++i) { sum = sum.add(d.getProbability(i)); } assertEquals(BigFraction.ONE, sum); assertEquals(BigFraction.ONE, d.getCumulativeProbability(d.lowerBound())); assert...
static void function(Distribution d) { BigFraction sum = BigFraction.ZERO; for (int i = d.lowerBound(); i < d.upperBound(); ++i) { sum = sum.add(d.getProbability(i)); } assertEquals(BigFraction.ONE, sum); assertEquals(BigFraction.ONE, d.getCumulativeProbability(d.lowerBound())); assertEquals(BigFraction.ZERO, d.getCumu...
/** * <p> * Called from other tests. */
Called from other tests
distSumsToOne
{ "repo_name": "sizezero/dice-probabilities", "path": "tests/src/org/kleemann/diceprobabilities/distribution/SlowTest.java", "license": "mit", "size": 2698 }
[ "org.apache.commons.math3.fraction.BigFraction" ]
import org.apache.commons.math3.fraction.BigFraction;
import org.apache.commons.math3.fraction.*;
[ "org.apache.commons" ]
org.apache.commons;
1,112,771
@DELETE("list/{list_id}") Call<Status> delete( @Path("list_id") String listId );
@DELETE(STR) Call<Status> delete( @Path(STR) String listId );
/** * Delete a list. * <p> * <b>Requires an active Session.</b> * * @param listId A BaseList TMDb id.(<b>String</b>/Integer). */
Delete a list. Requires an active Session
delete
{ "repo_name": "ProIcons/tmdb-java", "path": "src/main/java/com/uwetrottmann/tmdb2/services/ListsService.java", "license": "unlicense", "size": 4976 }
[ "com.uwetrottmann.tmdb2.entities.Status" ]
import com.uwetrottmann.tmdb2.entities.Status;
import com.uwetrottmann.tmdb2.entities.*;
[ "com.uwetrottmann.tmdb2" ]
com.uwetrottmann.tmdb2;
2,634,626
switch (getComponentType(component)) { case PORT: return getPortPower(port, OpticalAnnotations.TARGET_POWER); case CHANNEL: return getChannelAttenuation(port, (OchSignal) component); default: return null; } }
switch (getComponentType(component)) { case PORT: return getPortPower(port, OpticalAnnotations.TARGET_POWER); case CHANNEL: return getChannelAttenuation(port, (OchSignal) component); default: return null; } }
/** * Obtains specified port/channel target power. * * @param port the port number * @param component the port component * @return target power value in .01 dBm */
Obtains specified port/channel target power
getTargetPower
{ "repo_name": "LorenzReinhart/ONOSnew", "path": "drivers/optical/src/main/java/org/onosproject/driver/optical/power/OplinkPowerConfigUtil.java", "license": "apache-2.0", "size": 21818 }
[ "org.onosproject.net.OchSignal", "org.onosproject.net.optical.OpticalAnnotations" ]
import org.onosproject.net.OchSignal; import org.onosproject.net.optical.OpticalAnnotations;
import org.onosproject.net.*; import org.onosproject.net.optical.*;
[ "org.onosproject.net" ]
org.onosproject.net;
2,713,542
@Override public void setFinancialObjectCode(String financialObjectCode) { super.setFinancialObjectCode(financialObjectCode); if (StringUtils.isBlank(getObjectTypeCode()) && !StringUtils.isBlank(getFinancialObjectCode())) { refreshReferenceObject("objectCode"); if (!Objec...
void function(String financialObjectCode) { super.setFinancialObjectCode(financialObjectCode); if (StringUtils.isBlank(getObjectTypeCode()) && !StringUtils.isBlank(getFinancialObjectCode())) { refreshReferenceObject(STR); if (!ObjectUtils.isNull(getObjectCode())) { setObjectTypeCode(getObjectCode().getFinancialObjectTy...
/** * Overridden to automatically set the object type code on the setting of the object code - if the object type code is blank * * @see org.kuali.kfs.sys.businessobject.AccountingLineBase#setFinancialObjectCode(java.lang.String) */
Overridden to automatically set the object type code on the setting of the object code - if the object type code is blank
setFinancialObjectCode
{ "repo_name": "quikkian-ua-devops/will-financials", "path": "kfs-core/src/main/java/org/kuali/kfs/fp/businessobject/VoucherSourceAccountingLine.java", "license": "agpl-3.0", "size": 3282 }
[ "org.apache.commons.lang.StringUtils", "org.kuali.kfs.krad.util.ObjectUtils" ]
import org.apache.commons.lang.StringUtils; import org.kuali.kfs.krad.util.ObjectUtils;
import org.apache.commons.lang.*; import org.kuali.kfs.krad.util.*;
[ "org.apache.commons", "org.kuali.kfs" ]
org.apache.commons; org.kuali.kfs;
1,098,216
Benchmark b = new Benchmark("nullsink"); b.mark("begin"); TextFileSource txt = new TextFileSource(HADOOP_DATA[0]); txt.open(); MemorySinkSource mem = new MemorySinkSource(); mem.open(); EventUtil.dumpAll(txt, mem); txt.close(); b.mark("disk_loaded");
Benchmark b = new Benchmark(STR); b.mark("begin"); TextFileSource txt = new TextFileSource(HADOOP_DATA[0]); txt.open(); MemorySinkSource mem = new MemorySinkSource(); mem.open(); EventUtil.dumpAll(txt, mem); txt.close(); b.mark(STR);
/** * Pipeline is: * * text -> mem * * mem -> ThriftEventSink -> ThriftEventSource -> NullSink */
Pipeline is: text -> mem mem -> ThriftEventSink -> ThriftEventSource -> NullSink
testThriftSend
{ "repo_name": "hammer/flume", "path": "src/javaperf/com/cloudera/flume/PerfThriftSinks.java", "license": "apache-2.0", "size": 5969 }
[ "com.cloudera.flume.core.EventUtil", "com.cloudera.flume.handlers.debug.MemorySinkSource", "com.cloudera.flume.handlers.debug.TextFileSource", "com.cloudera.util.Benchmark" ]
import com.cloudera.flume.core.EventUtil; import com.cloudera.flume.handlers.debug.MemorySinkSource; import com.cloudera.flume.handlers.debug.TextFileSource; import com.cloudera.util.Benchmark;
import com.cloudera.flume.core.*; import com.cloudera.flume.handlers.debug.*; import com.cloudera.util.*;
[ "com.cloudera.flume", "com.cloudera.util" ]
com.cloudera.flume; com.cloudera.util;
432,977
AuthorizationUtil.checkHasOneRoleIn(Role.APPLICATIONS_MANAGER); final Authentication auth = SecurityContextHolder.getContext().getAuthentication(); // check the topology template id to recover the related topology id String topologyId = null; if (request.getTopologyTemplateId() != null)...
AuthorizationUtil.checkHasOneRoleIn(Role.APPLICATIONS_MANAGER); final Authentication auth = SecurityContextHolder.getContext().getAuthentication(); String topologyId = null; if (request.getTopologyTemplateId() != null) { TopologyTemplate template = topologyService.getOrFailTopologyTemplate(request.getTopologyTemplateId...
/** * Create a new application in the system. * * @param request The new application to create. */
Create a new application in the system
create
{ "repo_name": "loicalbertin/alien4cloud", "path": "alien4cloud-rest-api/src/main/java/alien4cloud/rest/application/ApplicationController.java", "license": "apache-2.0", "size": 21946 }
[ "org.springframework.security.core.Authentication", "org.springframework.security.core.context.SecurityContextHolder" ]
import org.springframework.security.core.Authentication; import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.core.*; import org.springframework.security.core.context.*;
[ "org.springframework.security" ]
org.springframework.security;
2,062,298
this.url = new ConfigurationPropertyReader( configurationMap ) .property( EhcacheProperties.CONFIGURATION_RESOURCE_NAME, URL.class ) .withDefault( EhcacheConfiguration.class.getClassLoader().getResource( DEFAULT_CONFIG ) ) .getValue(); }
this.url = new ConfigurationPropertyReader( configurationMap ) .property( EhcacheProperties.CONFIGURATION_RESOURCE_NAME, URL.class ) .withDefault( EhcacheConfiguration.class.getClassLoader().getResource( DEFAULT_CONFIG ) ) .getValue(); }
/** * Initialize the internal values from the given {@link Map}. * * @param configurationMap The values to use as configuration */
Initialize the internal values from the given <code>Map</code>
initialize
{ "repo_name": "ZJaffee/hibernate-ogm", "path": "ehcache/src/main/java/org/hibernate/ogm/datastore/ehcache/configuration/impl/EhcacheConfiguration.java", "license": "lgpl-2.1", "size": 1548 }
[ "org.hibernate.ogm.datastore.ehcache.EhcacheProperties", "org.hibernate.ogm.util.configurationreader.spi.ConfigurationPropertyReader" ]
import org.hibernate.ogm.datastore.ehcache.EhcacheProperties; import org.hibernate.ogm.util.configurationreader.spi.ConfigurationPropertyReader;
import org.hibernate.ogm.datastore.ehcache.*; import org.hibernate.ogm.util.configurationreader.spi.*;
[ "org.hibernate.ogm" ]
org.hibernate.ogm;
634,840
@Test(expected = AssertionFailedError.class) public void testAssertReflectionEquals_rightNull() { assertReflectionEquals(testObjectAString, null); }
@Test(expected = AssertionFailedError.class) void function() { assertReflectionEquals(testObjectAString, null); }
/** * Test case for a null right-argument. */
Test case for a null right-argument
testAssertReflectionEquals_rightNull
{ "repo_name": "arteam/unitils", "path": "unitils-test/src/test/java/org/unitils/reflectionassert/ReflectionAssertTest.java", "license": "apache-2.0", "size": 8180 }
[ "junit.framework.AssertionFailedError", "org.junit.Test", "org.unitils.reflectionassert.ReflectionAssert" ]
import junit.framework.AssertionFailedError; import org.junit.Test; import org.unitils.reflectionassert.ReflectionAssert;
import junit.framework.*; import org.junit.*; import org.unitils.reflectionassert.*;
[ "junit.framework", "org.junit", "org.unitils.reflectionassert" ]
junit.framework; org.junit; org.unitils.reflectionassert;
1,847,397
public static void hasLength(String text, Supplier<String> messageSupplier) { if (!StringUtils.hasLength(text)) { throw new IllegalArgumentException(nullSafeGet(messageSupplier)); } }
static void function(String text, Supplier<String> messageSupplier) { if (!StringUtils.hasLength(text)) { throw new IllegalArgumentException(nullSafeGet(messageSupplier)); } }
/** * Assert that the given String is not empty; that is, * it must not be {@code null} and not the empty String. * <pre class="code"> * Assert.hasLength(name, () -&gt; "Name for account '" + account.getId() + "' must not be empty"); * </pre> * @param text the String to check * @param messageSupplier a su...
Assert that the given String is not empty; that is, it must not be null and not the empty String. Assert.hasLength(name, () -&gt; "Name for account '" + account.getId() + "' must not be empty"); </code>
hasLength
{ "repo_name": "nucleusbox/nucleus-project", "path": "nucleus-project-core/src/main/java/org/nucleusbox/util/Assert.java", "license": "apache-2.0", "size": 22180 }
[ "java.util.function.Supplier" ]
import java.util.function.Supplier;
import java.util.function.*;
[ "java.util" ]
java.util;
1,985,953
public String getAttributeValue(String attrName, Node parentNode) { String value = null; int maxDepth = maxValuePathDepth; for (int i = 0; i < maxDepth; i++) { if (attributeValueMap.containsKey(attrName)) { List<String> currentValue = attributeValueMap.get(attrName); if (currentValue != null...
String function(String attrName, Node parentNode) { String value = null; int maxDepth = maxValuePathDepth; for (int i = 0; i < maxDepth; i++) { if (attributeValueMap.containsKey(attrName)) { List<String> currentValue = attributeValueMap.get(attrName); if (currentValue != null && currentValue.size() > 1) { if (currentVa...
/** * Gets a named attribute value of a node if one exists. * * @param attrName : the attribute local name. The attribute object has not been constructed at this point. * @param parentNode : the parent Node object, allows a string representation of a relative path snippet of the * attribute to be cons...
Gets a named attribute value of a node if one exists
getAttributeValue
{ "repo_name": "mqsysadmin/dpdirect", "path": "src/main/java/org/dpdirect/schema/SchemaLoader.java", "license": "apache-2.0", "size": 34579 }
[ "java.util.List", "org.w3c.dom.Node" ]
import java.util.List; import org.w3c.dom.Node;
import java.util.*; import org.w3c.dom.*;
[ "java.util", "org.w3c.dom" ]
java.util; org.w3c.dom;
1,984,019
public boolean supportsOver(RexOver over) { return true; }
boolean function(RexOver over) { return true; }
/** * Indicates that the RDBMS can implement the given OVER clause * * @param over * @return True if the RDBMS can implement the given OVER clause. */
Indicates that the RDBMS can implement the given OVER clause
supportsOver
{ "repo_name": "dremio/dremio-oss", "path": "sabot/kernel/src/main/java/com/dremio/common/dialect/DremioSqlDialect.java", "license": "apache-2.0", "size": 17123 }
[ "org.apache.calcite.rex.RexOver" ]
import org.apache.calcite.rex.RexOver;
import org.apache.calcite.rex.*;
[ "org.apache.calcite" ]
org.apache.calcite;
54,046
public native int avformat_version(); public Pointer<Byte > avformat_configuration() { return (Pointer)Pointer.pointerToAddress(avformat_configuration$2(), Byte.class); }
native int avformat_version(); public Pointer<Byte > function() { return (Pointer)Pointer.pointerToAddress(avformat_configuration$2(), Byte.class); }
/** * Return the libavformat build-time configuration.<br> * Original signature : <code>char* avformat_configuration()</code><br> * <i>native declaration : ffmpeg_build/include/libavformat/avformat.h:468</i> */
Return the libavformat build-time configuration. Original signature : <code>char* avformat_configuration()</code> native declaration : ffmpeg_build/include/libavformat/avformat.h:468
avformat_configuration
{ "repo_name": "mutars/java_libav", "path": "wrapper/src/main/java/com/mutar/libav/bridge/avformat/AvformatLibrary.java", "license": "gpl-2.0", "size": 136321 }
[ "org.bridj.Pointer" ]
import org.bridj.Pointer;
import org.bridj.*;
[ "org.bridj" ]
org.bridj;
1,917,304
public static EClass getSegmentClass(EPackage ePackage, IDocSegmentMetaData idocSegmentMetaData) { // Check package to see if structure class has already been defined. EClassifier structureClass = ePackage.getEClassifier(idocSegmentMetaData.getName()); // Build Segment class if not already built. if (!(stru...
static EClass function(EPackage ePackage, IDocSegmentMetaData idocSegmentMetaData) { EClassifier structureClass = ePackage.getEClassifier(idocSegmentMetaData.getName()); if (!(structureClass instanceof EClass)) { structureClass = EcoreFactory.eINSTANCE.createEClass(); ePackage.getEClassifiers().add(structureClass); str...
/** * Gets and creates if necessary the class that represents the * <code>iDocSegmentMetaData</code> IDoc segment type. * * @param ePackage * - the package containing class. * @param idocSegmentMetaData * - the type of IDoc segment. * @return The class. */
Gets and creates if necessary the class that represents the <code>iDocSegmentMetaData</code> IDoc segment type
getSegmentClass
{ "repo_name": "DaemonSu/fuse-master", "path": "components/camel-sap/org.fusesource.camel.component.sap/src/org/fusesource/camel/component/sap/util/IDocUtil.java", "license": "apache-2.0", "size": 58577 }
[ "com.sap.conn.idoc.IDocSegmentMetaData", "org.eclipse.emf.ecore.EClass", "org.eclipse.emf.ecore.EClassifier", "org.eclipse.emf.ecore.EPackage", "org.eclipse.emf.ecore.EcoreFactory", "org.fusesource.camel.component.sap.model.idoc.IdocPackage" ]
import com.sap.conn.idoc.IDocSegmentMetaData; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EClassifier; import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.EcoreFactory; import org.fusesource.camel.component.sap.model.idoc.IdocPackage;
import com.sap.conn.idoc.*; import org.eclipse.emf.ecore.*; import org.fusesource.camel.component.sap.model.idoc.*;
[ "com.sap.conn", "org.eclipse.emf", "org.fusesource.camel" ]
com.sap.conn; org.eclipse.emf; org.fusesource.camel;
2,456,724
public Path getOutputDir() { return outputDir_; } /** * @param outputDir * @throws IOException * @see {@link #getOutputDir()}
Path function() { return outputDir_; } /** * @param outputDir * @throws IOException * @see {@link #getOutputDir()}
/** * Gets current default output direcotry set for this muxing tree. * @return output dir */
Gets current default output direcotry set for this muxing tree
getOutputDir
{ "repo_name": "hrnr/MatroskaBatch", "path": "common/src/main/java/cz/hrnr/matroskabatch/muxing/MuxingTree.java", "license": "mit", "size": 7661 }
[ "java.io.IOException", "java.nio.file.Path" ]
import java.io.IOException; import java.nio.file.Path;
import java.io.*; import java.nio.file.*;
[ "java.io", "java.nio" ]
java.io; java.nio;
2,647,733
@Test public void testByteArrayToUuid() { assertEquals( new UUID(0xFFFFFFFFFFFFFFFFL, 0xFFFFFFFFFFFFFFFFL), Conversion.byteArrayToUuid(new byte[]{ (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xf...
void function() { assertEquals( new UUID(0xFFFFFFFFFFFFFFFFL, 0xFFFFFFFFFFFFFFFFL), Conversion.byteArrayToUuid(new byte[]{ (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff, (b...
/** * Tests {@link Conversion#byteArrayToUuid(byte[], int)}. */
Tests <code>Conversion#byteArrayToUuid(byte[], int)</code>
testByteArrayToUuid
{ "repo_name": "apache/commons-lang", "path": "src/test/java/org/apache/commons/lang3/ConversionTest.java", "license": "apache-2.0", "size": 98680 }
[ "org.junit.jupiter.api.Assertions" ]
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.*;
[ "org.junit.jupiter" ]
org.junit.jupiter;
108,950
List<? extends Capacity> listTopConsumedResources(ListCapacityCmd cmd);
List<? extends Capacity> listTopConsumedResources(ListCapacityCmd cmd);
/** * list all the top consumed resources across different capacity types * * @param cmd * @return List of capacities */
list all the top consumed resources across different capacity types
listTopConsumedResources
{ "repo_name": "GabrielBrascher/cloudstack", "path": "api/src/main/java/com/cloud/server/ManagementService.java", "license": "apache-2.0", "size": 15307 }
[ "com.cloud.capacity.Capacity", "java.util.List", "org.apache.cloudstack.api.command.admin.resource.ListCapacityCmd" ]
import com.cloud.capacity.Capacity; import java.util.List; import org.apache.cloudstack.api.command.admin.resource.ListCapacityCmd;
import com.cloud.capacity.*; import java.util.*; import org.apache.cloudstack.api.command.admin.resource.*;
[ "com.cloud.capacity", "java.util", "org.apache.cloudstack" ]
com.cloud.capacity; java.util; org.apache.cloudstack;
244,575
public Event getScriptedEvent(ScriptingType st) { return scriptedEvents.get(st); }
Event function(ScriptingType st) { return scriptedEvents.get(st); }
/** * Returns the event associated with the given scripting type. * @param st A given scripting type. * @return The event associated with the given scripting type. */
Returns the event associated with the given scripting type
getScriptedEvent
{ "repo_name": "LaSEEB/LAIS1", "path": "src/org/laseeb/LAIS/LAISScript.java", "license": "gpl-3.0", "size": 3974 }
[ "org.laseeb.LAIS" ]
import org.laseeb.LAIS;
import org.laseeb.*;
[ "org.laseeb" ]
org.laseeb;
1,592,659
public void setHoverBorderDash(int... borderDash) { // resets callback setHoverBorderDash((BorderDashCallback<DatasetContext>) null); // stores value setArrayValue(Property.HOVER_BORDER_DASH, ArrayInteger.fromOrNull(borderDash)); }
void function(int... borderDash) { setHoverBorderDash((BorderDashCallback<DatasetContext>) null); setArrayValue(Property.HOVER_BORDER_DASH, ArrayInteger.fromOrNull(borderDash)); }
/** * Sets the line dash pattern used when stroking lines, using an array of values which specify alternating lengths of lines and gaps which describe the pattern, when element is * hovered. * * @param borderDash the line dash pattern used when stroking lines, using an array of values which specify alternating...
Sets the line dash pattern used when stroking lines, using an array of values which specify alternating lengths of lines and gaps which describe the pattern, when element is hovered
setHoverBorderDash
{ "repo_name": "pepstock-org/Charba", "path": "src/org/pepstock/charba/client/data/LiningDataset.java", "license": "apache-2.0", "size": 98572 }
[ "org.pepstock.charba.client.callbacks.BorderDashCallback", "org.pepstock.charba.client.callbacks.DatasetContext", "org.pepstock.charba.client.commons.ArrayInteger" ]
import org.pepstock.charba.client.callbacks.BorderDashCallback; import org.pepstock.charba.client.callbacks.DatasetContext; import org.pepstock.charba.client.commons.ArrayInteger;
import org.pepstock.charba.client.callbacks.*; import org.pepstock.charba.client.commons.*;
[ "org.pepstock.charba" ]
org.pepstock.charba;
1,511,930
public static void marshal(Profile profile, XMLStreamWriter writer) { try { writer.writeStartElement("shared-bags"); Map<String, InterMineBag> sharedBags = profile.getSharedBags(); for (Map.Entry<String, InterMineBag> entry : sharedBags.entrySet()) { write...
static void function(Profile profile, XMLStreamWriter writer) { try { writer.writeStartElement(STR); Map<String, InterMineBag> sharedBags = profile.getSharedBags(); for (Map.Entry<String, InterMineBag> entry : sharedBags.entrySet()) { writer.writeCharacters("\n"); writer.writeStartElement(STR); writer.writeAttribute("n...
/** * Convert the bags shared to the profile given in input and write XML to given writer. * * @param profile the profile which has been shared some bags * @param writer the XMLStreamWriter to write to */
Convert the bags shared to the profile given in input and write XML to given writer
marshal
{ "repo_name": "elsiklab/intermine", "path": "intermine/api/main/src/org/intermine/api/xml/SharedBagBinding.java", "license": "lgpl-2.1", "size": 3182 }
[ "java.util.Date", "java.util.Map", "javax.xml.stream.XMLStreamException", "javax.xml.stream.XMLStreamWriter", "org.intermine.api.profile.InterMineBag", "org.intermine.api.profile.Profile" ]
import java.util.Date; import java.util.Map; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; import org.intermine.api.profile.InterMineBag; import org.intermine.api.profile.Profile;
import java.util.*; import javax.xml.stream.*; import org.intermine.api.profile.*;
[ "java.util", "javax.xml", "org.intermine.api" ]
java.util; javax.xml; org.intermine.api;
2,619,023
public void addParameterAnnotation(int param, AnnotationValue annotationValue);
void function(int param, AnnotationValue annotationValue);
/** * Destructively add a parameter annotation. * * @param param * parameter (0 == first parameter) * @param annotationValue * an AnnotationValue representing a parameter annotation */
Destructively add a parameter annotation
addParameterAnnotation
{ "repo_name": "spotbugs/spotbugs", "path": "spotbugs/src/main/java/edu/umd/cs/findbugs/ba/XMethod.java", "license": "lgpl-2.1", "size": 6851 }
[ "edu.umd.cs.findbugs.classfile.analysis.AnnotationValue" ]
import edu.umd.cs.findbugs.classfile.analysis.AnnotationValue;
import edu.umd.cs.findbugs.classfile.analysis.*;
[ "edu.umd.cs" ]
edu.umd.cs;
1,178,932
private static ConditionExpressionExecutor parseNotEqualCompare(ExpressionExecutor leftExpressionExecutor, ExpressionExecutor rightExpressionExecutor) { switch (leftExpressionExecutor.getReturnType()) { case STRING: ...
static ConditionExpressionExecutor function(ExpressionExecutor leftExpressionExecutor, ExpressionExecutor rightExpressionExecutor) { switch (leftExpressionExecutor.getReturnType()) { case STRING: switch (rightExpressionExecutor.getReturnType()) { case STRING: return new NotEqualCompareConditionExpressionExecutorStringS...
/** * Create not equal Compare Condition Expression Executor which evaluates whether value of leftExpressionExecutor * is not equal to value of rightExpressionExecutor. * * @param leftExpressionExecutor left ExpressionExecutor * @param rightExpressionExecutor right ExpressionExecutor * @r...
Create not equal Compare Condition Expression Executor which evaluates whether value of leftExpressionExecutor is not equal to value of rightExpressionExecutor
parseNotEqualCompare
{ "repo_name": "codemogroup/siddhi", "path": "modules/siddhi-core/src/main/java/org/wso2/siddhi/core/util/parser/ExpressionParser.java", "license": "apache-2.0", "size": 99316 }
[ "org.wso2.siddhi.core.exception.OperationNotSupportedException", "org.wso2.siddhi.core.executor.ExpressionExecutor", "org.wso2.siddhi.core.executor.condition.ConditionExpressionExecutor", "org.wso2.siddhi.core.executor.condition.compare.notequal.NotEqualCompareConditionExpressionExecutorBoolBool", "org.wso2...
import org.wso2.siddhi.core.exception.OperationNotSupportedException; import org.wso2.siddhi.core.executor.ExpressionExecutor; import org.wso2.siddhi.core.executor.condition.ConditionExpressionExecutor; import org.wso2.siddhi.core.executor.condition.compare.notequal.NotEqualCompareConditionExpressionExecutorBoolBool; i...
import org.wso2.siddhi.core.exception.*; import org.wso2.siddhi.core.executor.*; import org.wso2.siddhi.core.executor.condition.*; import org.wso2.siddhi.core.executor.condition.compare.notequal.*;
[ "org.wso2.siddhi" ]
org.wso2.siddhi;
34,588
private static boolean isElseWithCurlyBraces(DetailAST ast) { return ast.getType() == TokenTypes.SLIST && ast.getChildCount() == 2 && isElse(ast.getParent()); }
static boolean function(DetailAST ast) { return ast.getType() == TokenTypes.SLIST && ast.getChildCount() == 2 && isElse(ast.getParent()); }
/** * Returns whether a token represents an SLIST as part of an ELSE * statement. * @param ast the token to check * @return whether the toke does represent an SLIST as part of an ELSE */
Returns whether a token represents an SLIST as part of an ELSE statement
isElseWithCurlyBraces
{ "repo_name": "rmswimkktt/checkstyle", "path": "src/main/java/com/puppycrawl/tools/checkstyle/utils/CheckUtils.java", "license": "lgpl-2.1", "size": 15926 }
[ "com.puppycrawl.tools.checkstyle.api.DetailAST", "com.puppycrawl.tools.checkstyle.api.TokenTypes" ]
import com.puppycrawl.tools.checkstyle.api.DetailAST; import com.puppycrawl.tools.checkstyle.api.TokenTypes;
import com.puppycrawl.tools.checkstyle.api.*;
[ "com.puppycrawl.tools" ]
com.puppycrawl.tools;
2,844,340
public static ChannelBuffer wrappedBuffer(ByteBuffer... buffers) { switch (buffers.length) { case 0: break; case 1: if (buffers[0].hasRemaining()) { return wrappedBuffer(buffers[0]); } break; default: ByteOrd...
static ChannelBuffer function(ByteBuffer... buffers) { switch (buffers.length) { case 0: break; case 1: if (buffers[0].hasRemaining()) { return wrappedBuffer(buffers[0]); } break; default: ByteOrder order = null; final List<ChannelBuffer> components = new ArrayList<ChannelBuffer>(buffers.length); for (ByteBuffer b: buf...
/** * Creates a new composite buffer which wraps the slices of the specified * NIO buffers without copying them. A modification on the content of the * specified buffers will be visible to the returned buffer. * * @throws IllegalArgumentException * if the specified buffers' endian...
Creates a new composite buffer which wraps the slices of the specified NIO buffers without copying them. A modification on the content of the specified buffers will be visible to the returned buffer
wrappedBuffer
{ "repo_name": "whg333/netty-3.2.5.Final", "path": "src/main/java/org/jboss/netty/buffer/ChannelBuffers.java", "license": "apache-2.0", "size": 42102 }
[ "java.nio.ByteBuffer", "java.nio.ByteOrder", "java.util.ArrayList", "java.util.List" ]
import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.util.ArrayList; import java.util.List;
import java.nio.*; import java.util.*;
[ "java.nio", "java.util" ]
java.nio; java.util;
790,487
private ColorPickerSwatch createColorSwatch(int colorPrimary, int colorPrimaryDark, int selectedColor) { ColorPickerSwatch view = new ColorPickerSwatch(getContext(), colorPrimary, colorPrimaryDark, colorPrimary == selectedColor, onColorSelectedListener); TableRow.LayoutParams params = new TableRow.L...
ColorPickerSwatch function(int colorPrimary, int colorPrimaryDark, int selectedColor) { ColorPickerSwatch view = new ColorPickerSwatch(getContext(), colorPrimary, colorPrimaryDark, colorPrimary == selectedColor, onColorSelectedListener); TableRow.LayoutParams params = new TableRow.LayoutParams(swatchLength, swatchLengt...
/** * Creates a color swatch. */
Creates a color swatch
createColorSwatch
{ "repo_name": "justplay1/Shoppist", "path": "presentation/src/main/java/com/justplay1/shoppist/features/settings/widget/themedialog/ColorPickerPalette.java", "license": "apache-2.0", "size": 6419 }
[ "android.widget.TableRow" ]
import android.widget.TableRow;
import android.widget.*;
[ "android.widget" ]
android.widget;
232,388
protected final String getExplainString(String rootPrefix, String prefix, TExplainLevel detailLevel) { StringBuilder expBuilder = new StringBuilder(); String detailPrefix = prefix; String filler; boolean printFiller = (detailLevel.ordinal() >= TExplainLevel.STANDARD.ordinal()); // Do not tr...
final String function(String rootPrefix, String prefix, TExplainLevel detailLevel) { StringBuilder expBuilder = new StringBuilder(); String detailPrefix = prefix; String filler; boolean printFiller = (detailLevel.ordinal() >= TExplainLevel.STANDARD.ordinal()); boolean traverseChildren = !children_.isEmpty() && !(this i...
/** * Generate the explain plan tree. The plan will be in the form of: * * root * | * |----child 3 * | limit:1 * | * |----child 2 * | limit:2 * | * child 1 * * The root node header line will be prefixed by rootPrefix and the remaining plan * output will be prefixed by...
Generate the explain plan tree. The plan will be in the form of: root | |----child 3 | limit:1 | |----child 2 | limit:2 | child 1 The root node header line will be prefixed by rootPrefix and the remaining plan output will be prefixed by prefix
getExplainString
{ "repo_name": "sql-zuiwanyuan/Impala", "path": "fe/src/main/java/com/cloudera/impala/planner/PlanNode.java", "license": "apache-2.0", "size": 20238 }
[ "com.cloudera.impala.analysis.TupleId", "com.cloudera.impala.common.PrintUtils", "com.cloudera.impala.thrift.TExplainLevel" ]
import com.cloudera.impala.analysis.TupleId; import com.cloudera.impala.common.PrintUtils; import com.cloudera.impala.thrift.TExplainLevel;
import com.cloudera.impala.analysis.*; import com.cloudera.impala.common.*; import com.cloudera.impala.thrift.*;
[ "com.cloudera.impala" ]
com.cloudera.impala;
718,640
public static ApproximateHistogram fromBytesSparse(ByteBuffer buf) { int size = buf.getInt(); int binCount = -1 * buf.getInt(); float[] positions = new float[size]; long[] bins = new long[size]; for (int i = 0; i < binCount; ++i) { positions[i] = buf.getFloat(); } for (int i = 0;...
static ApproximateHistogram function(ByteBuffer buf) { int size = buf.getInt(); int binCount = -1 * buf.getInt(); float[] positions = new float[size]; long[] bins = new long[size]; for (int i = 0; i < binCount; ++i) { positions[i] = buf.getFloat(); } for (int i = 0; i < binCount; ++i) { bins[i] = buf.getLong(); } float...
/** * Constructs an ApproximateHistogram object from the given dense byte-buffer representation * * @param buf ByteBuffer to construct an ApproximateHistogram from * * @return ApproximateHistogram constructed from the given ByteBuffer */
Constructs an ApproximateHistogram object from the given dense byte-buffer representation
fromBytesSparse
{ "repo_name": "penuel-leo/druid", "path": "extensions/histogram/src/main/java/io/druid/query/aggregation/histogram/ApproximateHistogram.java", "license": "apache-2.0", "size": 50264 }
[ "java.nio.ByteBuffer" ]
import java.nio.ByteBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
2,728,780
@RequiresPermission(Manifest.permission.ACCESS_WIFI_STATE) public static boolean isWifiConnected(@NonNull final Context context) { final WifiManager wiFiManager = (WifiManager) context.getApplicationContext().getSystemService(Context.WIFI_SERVICE); if (wiFiManager != null && wiFiManager.isWifiEn...
@RequiresPermission(Manifest.permission.ACCESS_WIFI_STATE) static boolean function(@NonNull final Context context) { final WifiManager wiFiManager = (WifiManager) context.getApplicationContext().getSystemService(Context.WIFI_SERVICE); if (wiFiManager != null && wiFiManager.isWifiEnabled()) { final WifiInfo wifiInfo = w...
/** * Checks if WiFi is enabled and connected to a network. * <b>Note</b>: This does not check access to the Internet. * * @param context Which context to use to check * @return {@code True} if WiFi is enabled and connected to a network, {@code false} otherwise */
Checks if WiFi is enabled and connected to a network. Note: This does not check access to the Internet
isWifiConnected
{ "repo_name": "milosmns/silly-android", "path": "sillyandroid/src/main/java/me/angrybyte/sillyandroid/SillyAndroid.java", "license": "apache-2.0", "size": 34840 }
[ "android.content.Context", "android.net.wifi.WifiInfo", "android.net.wifi.WifiManager", "android.support.annotation.NonNull", "android.support.annotation.RequiresPermission" ]
import android.content.Context; import android.net.wifi.WifiInfo; import android.net.wifi.WifiManager; import android.support.annotation.NonNull; import android.support.annotation.RequiresPermission;
import android.content.*; import android.net.wifi.*; import android.support.annotation.*;
[ "android.content", "android.net", "android.support" ]
android.content; android.net; android.support;
757,096
public DescribableList<ViewProperty,ViewPropertyDescriptor> getProperties() { // readResolve was the best place to do this, but for compatibility reasons, // this class can no longer have readResolve() (the mechanism itself isn't suitable for class hierarchy) // see JENKINS-9431 // ...
DescribableList<ViewProperty,ViewPropertyDescriptor> function() { synchronized (PropertyList.class) { if (properties == null) { properties = new PropertyList(this); } else { properties.setOwner(this); } return properties; } }
/** * Gets the view properties configured for this view. * @since 1.406 */
Gets the view properties configured for this view
getProperties
{ "repo_name": "ErikVerheul/jenkins", "path": "core/src/main/java/hudson/model/View.java", "license": "mit", "size": 51121 }
[ "hudson.util.DescribableList" ]
import hudson.util.DescribableList;
import hudson.util.*;
[ "hudson.util" ]
hudson.util;
1,401,997
Observable<ServiceResponse<Error>> postRequiredStringParameterWithServiceResponseAsync(String bodyParameter);
Observable<ServiceResponse<Error>> postRequiredStringParameterWithServiceResponseAsync(String bodyParameter);
/** * Test explicitly required string. Please put null and the client library should throw before the request is sent. * * @param bodyParameter the String value * @return the observable to the Error object */
Test explicitly required string. Please put null and the client library should throw before the request is sent
postRequiredStringParameterWithServiceResponseAsync
{ "repo_name": "anudeepsharma/autorest", "path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/requiredoptional/Explicits.java", "license": "mit", "size": 43451 }
[ "com.microsoft.rest.ServiceResponse" ]
import com.microsoft.rest.ServiceResponse;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
775,689
return new AbstractMethodInstruction(ClassInstanceCreationBuilder.builder() .setType(TypeAccessHelper.createClassTypeAccess(className)).build()); }
return new AbstractMethodInstruction(ClassInstanceCreationBuilder.builder() .setType(TypeAccessHelper.createClassTypeAccess(className)).build()); }
/** * Create a class instantiation instruction * * @param className * the name of the class to instantiate. * @return a new class instantiation instruction. */
Create a class instantiation instruction
createClassInstanciationInstruction
{ "repo_name": "awltech/eclipse-optimus", "path": "net.atos.optimus.m2m.javaxmi.parent/net.atos.optimus.m2m.javaxmi.operation/src/main/java/net/atos/optimus/m2m/javaxmi/operation/instructions/CallInstructionHelper.java", "license": "lgpl-3.0", "size": 6443 }
[ "net.atos.optimus.m2m.javaxmi.operation.accesses.TypeAccessHelper", "net.atos.optimus.m2m.javaxmi.operation.instructions.builders.elementary.ClassInstanceCreationBuilder" ]
import net.atos.optimus.m2m.javaxmi.operation.accesses.TypeAccessHelper; import net.atos.optimus.m2m.javaxmi.operation.instructions.builders.elementary.ClassInstanceCreationBuilder;
import net.atos.optimus.m2m.javaxmi.operation.accesses.*; import net.atos.optimus.m2m.javaxmi.operation.instructions.builders.elementary.*;
[ "net.atos.optimus" ]
net.atos.optimus;
2,032,974
private static String handleEscapedCharacters(String string) throws InvalidNameException { if (string.indexOf('\\') == -1) { return string; } boolean hasUTF8 = false; // whether a utf8 string has been found... int pos; // position of most recently found slash StringBuffer buffy = new StringBuff...
static String function(String string) throws InvalidNameException { if (string.indexOf('\\') == -1) { return string; } boolean hasUTF8 = false; int pos; StringBuffer buffy = new StringBuffer(string); try { pos = string.indexOf("\\"); while ( pos > -1) { if (pos == buffy.length()-1) { buffy.setCharAt(pos, ' '); } else {...
/** * handle ldap escaped characters as per rfc 2253 * In short - ',', '+', '=', '<', '>', '#', ';', '"' are escaped with * a backslash, and utf8 can be escaped as a hexpair backslash * */
handle ldap escaped characters as per rfc 2253 In short - ',', '+', '=', '', '#', ';', '"' are escaped with a backslash, and utf8 can be escaped as a hexpair backslash
handleEscapedCharacters
{ "repo_name": "idega/platform2", "path": "src/com/idega/core/ldap/client/naming/NameUtility.java", "license": "gpl-3.0", "size": 13543 }
[ "javax.naming.InvalidNameException" ]
import javax.naming.InvalidNameException;
import javax.naming.*;
[ "javax.naming" ]
javax.naming;
2,570,371
@Path("/{breweryId}") @GET @Produces("application/json") Brewery getBrewery(@PathParam("breweryId") int breweryId);
@Path(STR) @Produces(STR) Brewery getBrewery(@PathParam(STR) int breweryId);
/** * Returns full information about a single brewery. */
Returns full information about a single brewery
getBrewery
{ "repo_name": "apiman/apiman-studio", "path": "back-end/hub-codegen/src/test/resources/OpenApi2ThorntailTest/_expected_updateOnly/beer-api/src/main/java/org/example/api/Breweries.java", "license": "apache-2.0", "size": 1699 }
[ "javax.ws.rs.Path", "javax.ws.rs.PathParam", "javax.ws.rs.Produces", "org.example.api.beans.Brewery" ]
import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import org.example.api.beans.Brewery;
import javax.ws.rs.*; import org.example.api.beans.*;
[ "javax.ws", "org.example.api" ]
javax.ws; org.example.api;
2,769,229
public List<EntityRole> listCompositeEntityRoles(UUID appId, String versionId, UUID cEntityId) { return listCompositeEntityRolesWithServiceResponseAsync(appId, versionId, cEntityId).toBlocking().single().body(); }
List<EntityRole> function(UUID appId, String versionId, UUID cEntityId) { return listCompositeEntityRolesWithServiceResponseAsync(appId, versionId, cEntityId).toBlocking().single().body(); }
/** * Get all roles for a composite entity in a version of the application. * * @param appId The application ID. * @param versionId The version ID. * @param cEntityId The composite entity extractor ID. * @throws IllegalArgumentException thrown if parameters fail the validation * @thro...
Get all roles for a composite entity in a version of the application
listCompositeEntityRoles
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/cognitiveservices/ms-azure-cs-luis-authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java", "license": "mit", "size": 818917 }
[ "com.microsoft.azure.cognitiveservices.language.luis.authoring.models.EntityRole", "java.util.List" ]
import com.microsoft.azure.cognitiveservices.language.luis.authoring.models.EntityRole; import java.util.List;
import com.microsoft.azure.cognitiveservices.language.luis.authoring.models.*; import java.util.*;
[ "com.microsoft.azure", "java.util" ]
com.microsoft.azure; java.util;
2,213,475
public Integer getMinute() { return getFieldValue(Calendar.MINUTE); }
Integer function() { return getFieldValue(Calendar.MINUTE); }
/** * Returns the minute of the hour in the range 0-59 */
Returns the minute of the hour in the range 0-59
getMinute
{ "repo_name": "aemay2/hapi-fhir", "path": "hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/BaseDateTimeDt.java", "license": "apache-2.0", "size": 22667 }
[ "java.util.Calendar" ]
import java.util.Calendar;
import java.util.*;
[ "java.util" ]
java.util;
415,015
public static void e(String tag, String msg, Object... args) { if (sLevel > LEVEL_ERROR) { return; } if (args.length > 0) { msg = String.format(msg, args); } Log.e(tag, msg); }
static void function(String tag, String msg, Object... args) { if (sLevel > LEVEL_ERROR) { return; } if (args.length > 0) { msg = String.format(msg, args); } Log.e(tag, msg); }
/** * Send an ERROR log message * * @param tag * @param msg * @param args */
Send an ERROR log message
e
{ "repo_name": "ThinkmanWang/ThinkUtils", "path": "thinkutils/src/main/java/in/srain/cube/views/ptr/util/PtrCLog.java", "license": "gpl-3.0", "size": 6142 }
[ "android.util.Log" ]
import android.util.Log;
import android.util.*;
[ "android.util" ]
android.util;
1,266,036
@Override public SelectResults auxFilterEvaluate(ExecutionContext context, SelectResults intermediateResults) throws FunctionDomainException, TypeMismatchException, NameResolutionException, QueryInvocationTargetException { // evaluate the result set from the indexed values // using the int...
SelectResults function(ExecutionContext context, SelectResults intermediateResults) throws FunctionDomainException, TypeMismatchException, NameResolutionException, QueryInvocationTargetException { List sortedConditionsList = this.getCondtionsSortedOnIncreasingEstimatedIndexResultSize(context); Iterator i = sortedCondit...
/** * Asif : This function is always invoked on a DummyGroupJunction object * formed as a part of organization of operands of a GroupJunction . This also * guranatees that the operands are all of type CompiledComparison or * CompiledUndefined */
Asif : This function is always invoked on a DummyGroupJunction object formed as a part of organization of operands of a GroupJunction . This also guranatees that the operands are all of type CompiledComparison or CompiledUndefined
auxFilterEvaluate
{ "repo_name": "fengshao0907/incubator-geode", "path": "gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/AbstractGroupOrRangeJunction.java", "license": "apache-2.0", "size": 26191 }
[ "com.gemstone.gemfire.cache.query.FunctionDomainException", "com.gemstone.gemfire.cache.query.NameResolutionException", "com.gemstone.gemfire.cache.query.QueryInvocationTargetException", "com.gemstone.gemfire.cache.query.SelectResults", "com.gemstone.gemfire.cache.query.TypeMismatchException", "com.gemsto...
import com.gemstone.gemfire.cache.query.FunctionDomainException; import com.gemstone.gemfire.cache.query.NameResolutionException; import com.gemstone.gemfire.cache.query.QueryInvocationTargetException; import com.gemstone.gemfire.cache.query.SelectResults; import com.gemstone.gemfire.cache.query.TypeMismatchException; ...
import com.gemstone.gemfire.cache.query.*; import com.gemstone.gemfire.internal.*; import java.util.*;
[ "com.gemstone.gemfire", "java.util" ]
com.gemstone.gemfire; java.util;
1,208,607
protected JobDetail createJob(String content, Event event, boolean isStartEvent) { String jobIdentity = event.getICalUID() + (isStartEvent ? "_start" : "_end"); if (StringUtils.isBlank(content)) { logger.debug("content of job '{}' is empty -> no task will be created!", jobIdentity); ...
JobDetail function(String content, Event event, boolean isStartEvent) { String jobIdentity = event.getICalUID() + (isStartEvent ? STR : "_end"); if (StringUtils.isBlank(content)) { logger.debug(STR, jobIdentity); return null; } JobDetail job = newJob(ExecuteCommandJob.class).usingJobData(ExecuteCommandJob.JOB_DATA_CONT...
/** * Creates a new quartz-job with jobData <code>content</code> in the scheduler * group <code>GCAL_SCHEDULER_GROUP</code> if <code>content</code> is not * blank. * * @param content the set of commands to be executed by the * {@link ExecuteCommandJob} later on * @param eve...
Creates a new quartz-job with jobData <code>content</code> in the scheduler group <code>GCAL_SCHEDULER_GROUP</code> if <code>content</code> is not blank
createJob
{ "repo_name": "lewie/openhab", "path": "bundles/io/org.openhab.io.gcal/src/main/java/org/openhab/io/gcal/internal/GCalEventDownloader.java", "license": "epl-1.0", "size": 22767 }
[ "com.google.api.services.calendar.model.Event", "javax.annotation.meta.When", "org.apache.commons.lang.StringUtils", "org.openhab.io.gcal.internal.util.ExecuteCommandJob", "org.quartz.JobBuilder", "org.quartz.JobDetail" ]
import com.google.api.services.calendar.model.Event; import javax.annotation.meta.When; import org.apache.commons.lang.StringUtils; import org.openhab.io.gcal.internal.util.ExecuteCommandJob; import org.quartz.JobBuilder; import org.quartz.JobDetail;
import com.google.api.services.calendar.model.*; import javax.annotation.meta.*; import org.apache.commons.lang.*; import org.openhab.io.gcal.internal.util.*; import org.quartz.*;
[ "com.google.api", "javax.annotation", "org.apache.commons", "org.openhab.io", "org.quartz" ]
com.google.api; javax.annotation; org.apache.commons; org.openhab.io; org.quartz;
1,683,671
@Override public Annotation[] getAnnotations() { return AnnotationAccess.getAnnotations(this); }
@Override Annotation[] function() { return AnnotationAccess.getAnnotations(this); }
/** * Returns an array containing all the annotations of this class. If there are no annotations * then an empty array is returned. * * @see #getDeclaredAnnotations() */
Returns an array containing all the annotations of this class. If there are no annotations then an empty array is returned
getAnnotations
{ "repo_name": "indashnet/InDashNet.Open.UN2000", "path": "android/libcore/libart/src/main/java/java/lang/Class.java", "license": "apache-2.0", "size": 67908 }
[ "java.lang.annotation.Annotation" ]
import java.lang.annotation.Annotation;
import java.lang.annotation.*;
[ "java.lang" ]
java.lang;
1,163,066
@Override public String toString() { final StringBuilder buf = new StringBuilder(); buf.append("0x5455 Zip Extra Field: Flags="); buf.append(Integer.toBinaryString(ZipUtil.unsignedIntToSignedByte(flags))).append(" "); if (bit0_modifyTimePresent && modifyTime != null) { ...
String function() { final StringBuilder buf = new StringBuilder(); buf.append(STR); buf.append(Integer.toBinaryString(ZipUtil.unsignedIntToSignedByte(flags))).append(" "); if (bit0_modifyTimePresent && modifyTime != null) { final Date m = getModifyJavaTime(); buf.append(STR).append(m).append(STR); } if (bit1_accessTime...
/** * Returns a String representation of this class useful for * debugging purposes. * * @return A String representation of this class useful for * debugging purposes. */
Returns a String representation of this class useful for debugging purposes
toString
{ "repo_name": "apache/commons-compress", "path": "src/main/java/org/apache/commons/compress/archivers/zip/X5455_ExtendedTimestamp.java", "license": "apache-2.0", "size": 21539 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,038,456
private List<RowMetaAndData> splitFieldToRows( String testName, String stringToSplit, boolean isDelimiterRegex, String delimiter, String delimiterVariableValue ) { RowStepCollector rc = new RowStepCollector(); try { KettleEnvironment.init(); // Create a new transformation... TransMeta...
List<RowMetaAndData> function( String testName, String stringToSplit, boolean isDelimiterRegex, String delimiter, String delimiterVariableValue ) { RowStepCollector rc = new RowStepCollector(); try { KettleEnvironment.init(); TransMeta transMeta = new TransMeta(); transMeta.setName( STR ); PluginRegistry registry = Plu...
/** * Splits the "stringToSplit" with the passed "delimiter". The "delimiter" is assumed by this method to be a Kettle * variable. The parameter "delimiterVariableValue" should contain the variables value. * * The "isDelimiterRegex" parameter will process the use regex for pattern matching if true. * ...
Splits the "stringToSplit" with the passed "delimiter". The "delimiter" is assumed by this method to be a Kettle variable. The parameter "delimiterVariableValue" should contain the variables value. The "isDelimiterRegex" parameter will process the use regex for pattern matching if true
splitFieldToRows
{ "repo_name": "AliaksandrShuhayeu/pentaho-kettle", "path": "integration/src/it/java/org/pentaho/di/trans/steps/splitfieldtorows/SplitFieldToRowsIT.java", "license": "apache-2.0", "size": 11519 }
[ "java.util.List", "org.pentaho.di.core.KettleEnvironment", "org.pentaho.di.core.RowMetaAndData", "org.pentaho.di.core.plugins.PluginRegistry", "org.pentaho.di.core.plugins.StepPluginType", "org.pentaho.di.core.util.Utils", "org.pentaho.di.trans.RowStepCollector", "org.pentaho.di.trans.TransHopMeta", ...
import java.util.List; import org.pentaho.di.core.KettleEnvironment; import org.pentaho.di.core.RowMetaAndData; import org.pentaho.di.core.plugins.PluginRegistry; import org.pentaho.di.core.plugins.StepPluginType; import org.pentaho.di.core.util.Utils; import org.pentaho.di.trans.RowStepCollector; import org.pentaho.di...
import java.util.*; import org.pentaho.di.core.*; import org.pentaho.di.core.plugins.*; import org.pentaho.di.core.util.*; import org.pentaho.di.trans.*; import org.pentaho.di.trans.step.*; import org.pentaho.di.trans.steps.dummytrans.*; import org.pentaho.di.trans.steps.injector.*;
[ "java.util", "org.pentaho.di" ]
java.util; org.pentaho.di;
194,458
private String getOriginatingClass(Permission p) throws RecursivePermissionException { final Throwable t = new Throwable(); final StackTraceElement[] ste = t.getStackTrace(); for (StackTraceElement s : ste) { if (s.getClassName().contentEquals(thisClass) ...
String function(Permission p) throws RecursivePermissionException { final Throwable t = new Throwable(); final StackTraceElement[] ste = t.getStackTrace(); for (StackTraceElement s : ste) { if (s.getClassName().contentEquals(thisClass) && s.getMethodName().contentEquals(STR)) { throw new RecursivePermissionException();...
/** * returns the originating class name from the current stack trace. * * @param p * @return */
returns the originating class name from the current stack trace
getOriginatingClass
{ "repo_name": "GEOINT/permissionSnitch", "path": "src/main/java/org/geoint/security/SnitchSecurityManager.java", "license": "apache-2.0", "size": 5596 }
[ "java.security.Permission" ]
import java.security.Permission;
import java.security.*;
[ "java.security" ]
java.security;
1,326,188
public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { ActionErrors errors = new ActionErrors(); String submit = request.getParameter("submit"); // front end validation when save is clicked. if (submit != null) { ...
ActionErrors function(ActionMapping mapping, HttpServletRequest request) { ActionErrors errors = new ActionErrors(); String submit = request.getParameter(STR); if (submit != null) { if ((hostName== null) (hostName.length() < 1)) { errors.add(STR, new ActionError(STR)); } if ((appBase == null) (appBase.length() < 1)) { ...
/** * Validate the properties that have been set from this HTTP request, * and return an <code>ActionErrors</code> object that encapsulates any * validation errors that have been found. If no errors are found, return * <code>null</code> or an <code>ActionErrors</code> object with no * recorded...
Validate the properties that have been set from this HTTP request, and return an <code>ActionErrors</code> object that encapsulates any validation errors that have been found. If no errors are found, return <code>null</code> or an <code>ActionErrors</code> object with no recorded error messages
validate
{ "repo_name": "devjin24/howtomcatworks", "path": "bookrefer/jakarta-tomcat-4.1.12-src/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/host/HostForm.java", "license": "apache-2.0", "size": 12285 }
[ "javax.servlet.http.HttpServletRequest", "org.apache.struts.action.ActionError", "org.apache.struts.action.ActionErrors", "org.apache.struts.action.ActionMapping" ]
import javax.servlet.http.HttpServletRequest; import org.apache.struts.action.ActionError; import org.apache.struts.action.ActionErrors; 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;
1,884,161
protected File[] choosePathFile(CPMMain perfMain, String[] fileName, boolean folderOnly, boolean multipleFiles, String fileTitle, String...
File[] function(CPMMain perfMain, String[] fileName, boolean folderOnly, boolean multipleFiles, String fileTitle, String fileKey, int optionType) { File[] file = new File[1]; if (fileName == null fileName[0] == null) { String nameList = STRSTR\STR\" "; } chooser.setCurrentDirectory(tempFile[0]); chooser.setSelectedFile...
/************************************************************************** * Display a dialog that allows the user to select one or more files or a * folder * * @param perfMain * main class * * @param fileName * array of file names initially chosen (if an...
Display a dialog that allows the user to select one or more files or a folder
choosePathFile
{ "repo_name": "CACTUS-Mission/TRAPSat", "path": "TRAPSat_cFS/cfs/cfe/tools/perfutils-java/src/CFSPerformanceMonitor/CPMDialogHandler.java", "license": "mit", "size": 57337 }
[ "java.io.File", "javax.swing.JFileChooser", "javax.swing.JTextField" ]
import java.io.File; import javax.swing.JFileChooser; import javax.swing.JTextField;
import java.io.*; import javax.swing.*;
[ "java.io", "javax.swing" ]
java.io; javax.swing;
1,329,711
private File getServiceInterfaceJavaFileHandle() { return serviceInterfaceJavaFileHandle; }
File function() { return serviceInterfaceJavaFileHandle; }
/** * Returns rpc method's java file handle. * * @return java file handle */
Returns rpc method's java file handle
getServiceInterfaceJavaFileHandle
{ "repo_name": "VinodKumarS-Huawei/ietf96yang", "path": "utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/TempJavaServiceFragmentFiles.java", "license": "apache-2.0", "size": 14106 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
386,808
public void processTargets(TargetReport report);
void function(TargetReport report);
/** * Processes the targets * @param targets the processed targets * @see TargetReport */
Processes the targets
processTargets
{ "repo_name": "KHS-Robotics/DemonVision", "path": "src/org/usfirst/frc/team4342/vision/api/listeners/Listener.java", "license": "mit", "size": 426 }
[ "org.usfirst.frc.team4342.vision.api.target.TargetReport" ]
import org.usfirst.frc.team4342.vision.api.target.TargetReport;
import org.usfirst.frc.team4342.vision.api.target.*;
[ "org.usfirst.frc" ]
org.usfirst.frc;
2,487,056
@Override protected boolean onRequestFocusInDescendants(int direction, Rect previouslyFocusedRect) { int index; int increment; int end; int count = getChildCount(); if ((direction & FOCUS_FORWARD) != 0) { index...
boolean function(int direction, Rect previouslyFocusedRect) { int index; int increment; int end; int count = getChildCount(); if ((direction & FOCUS_FORWARD) != 0) { index = 0; increment = 1; end = count; } else { index = count - 1; increment = -1; end = -1; } for (int i = index; i != end; i += increment) { View child ...
/** * We only want the current page that is being shown to be focusable. */
We only want the current page that is being shown to be focusable
onRequestFocusInDescendants
{ "repo_name": "Zhangsongsong/GraduationPro", "path": "毕业设计/code/android/QLBundle/src/org/canson/view/verticalviewpager/VerticalViewPager.java", "license": "apache-2.0", "size": 108798 }
[ "android.graphics.Rect", "android.view.View" ]
import android.graphics.Rect; import android.view.View;
import android.graphics.*; import android.view.*;
[ "android.graphics", "android.view" ]
android.graphics; android.view;
122,611
@Operation(desc = "Resets the MessagesAcknowledged property", impact = MBeanOperationInfo.ACTION) void resetMessagesAcknowledged() throws Exception;
@Operation(desc = STR, impact = MBeanOperationInfo.ACTION) void resetMessagesAcknowledged() throws Exception;
/** * Resets the MessagesAdded property */
Resets the MessagesAdded property
resetMessagesAcknowledged
{ "repo_name": "kjniemi/activemq-artemis", "path": "artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/QueueControl.java", "license": "apache-2.0", "size": 32910 }
[ "javax.management.MBeanOperationInfo" ]
import javax.management.MBeanOperationInfo;
import javax.management.*;
[ "javax.management" ]
javax.management;
1,244,026
@Override public synchronized void doBuild() throws TorqueException { if ( isBuilt() ) { return; } dbMap = Torque.getDatabaseMap("track"); dbMap.addTable("TPROJECTTYPE"); TableMap tMap = dbMap.getTable("TPROJECTTYPE"); tMap.setJavaName("TProjectTy...
synchronized void function() throws TorqueException { if ( isBuilt() ) { return; } dbMap = Torque.getDatabaseMap("track"); dbMap.addTable(STR); TableMap tMap = dbMap.getTable(STR); tMap.setJavaName(STR); tMap.setOMClass( com.aurel.track.persist.TProjectType.class ); tMap.setPeerClass( com.aurel.track.persist.TProjectTy...
/** * The doBuild() method builds the DatabaseMap * * @throws TorqueException */
The doBuild() method builds the DatabaseMap
doBuild
{ "repo_name": "trackplus/Genji", "path": "src/main/java/com/aurel/track/persist/map/TProjectTypeMapBuilder.java", "license": "gpl-3.0", "size": 7082 }
[ "org.apache.torque.Torque", "org.apache.torque.TorqueException", "org.apache.torque.map.ColumnMap", "org.apache.torque.map.TableMap" ]
import org.apache.torque.Torque; import org.apache.torque.TorqueException; import org.apache.torque.map.ColumnMap; import org.apache.torque.map.TableMap;
import org.apache.torque.*; import org.apache.torque.map.*;
[ "org.apache.torque" ]
org.apache.torque;
2,705,818
public ByTopicRecordTranslator<K, V> forTopic(String topic, Func<ConsumerRecord<K, V>, List<Object>> func, Fields fields) { return forTopic(topic, new SimpleRecordTranslator<>(func, fields)); }
ByTopicRecordTranslator<K, V> function(String topic, Func<ConsumerRecord<K, V>, List<Object>> func, Fields fields) { return forTopic(topic, new SimpleRecordTranslator<>(func, fields)); }
/** * Configure a translator for a given topic with tuples to be emitted to the default stream. * @param topic the topic this should be used for * @param func extracts and turns them into a list of objects to be emitted * @param fields the names of the fields extracted * @return this to be able...
Configure a translator for a given topic with tuples to be emitted to the default stream
forTopic
{ "repo_name": "dke-knu/i2am", "path": "rdma-based-storm/external/storm-kafka-client/src/main/java/org/apache/storm/kafka/spout/ByTopicRecordTranslator.java", "license": "apache-2.0", "size": 6800 }
[ "java.util.List", "org.apache.kafka.clients.consumer.ConsumerRecord", "org.apache.storm.tuple.Fields" ]
import java.util.List; import org.apache.kafka.clients.consumer.ConsumerRecord; import org.apache.storm.tuple.Fields;
import java.util.*; import org.apache.kafka.clients.consumer.*; import org.apache.storm.tuple.*;
[ "java.util", "org.apache.kafka", "org.apache.storm" ]
java.util; org.apache.kafka; org.apache.storm;
151,333
@Test public void testDecodeSearchRequestExtensibleMatchMatchValueAlone() { byte[] asn1BER = new byte[] { 0x30, 0x43, 0x02, 0x01, 0x04, // messageID 0x63, 0x3E, 0x04, 0x1F, // ...
void function() { byte[] asn1BER = new byte[] { 0x30, 0x43, 0x02, 0x01, 0x04, 0x63, 0x3E, 0x04, 0x1F, 'u', 'i', 'd', '=', 'a', 'k', 'a', 'r', 'a', 's', 'u', 'l', 'u', ',', 'd', 'c', '=', 'e', 'x', 'a', 'm', 'p', 'l', 'e', ',', 'd', 'c', '=', 'c', 'o', 'm', 0x0A, 0x01, 0x01, 0x0A, 0x01, 0x03, 0x02, 0x01, 0x00, 0x02, 0x0...
/** * Test the decoding of a SearchRequest with an extensible match and a match * Value and nothing else */
Test the decoding of a SearchRequest with an extensible match and a match Value and nothing else
testDecodeSearchRequestExtensibleMatchMatchValueAlone
{ "repo_name": "darranl/directory-shared", "path": "ldap/codec/core/src/test/java/org/apache/directory/api/ldap/codec/search/SearchRequestMatchingRuleAssertionTest.java", "license": "apache-2.0", "size": 35330 }
[ "java.nio.ByteBuffer", "java.util.List", "org.apache.directory.api.asn1.DecoderException", "org.apache.directory.api.asn1.ber.Asn1Decoder", "org.apache.directory.api.ldap.codec.api.LdapMessageContainer", "org.apache.directory.api.ldap.codec.decorators.SearchRequestDecorator", "org.apache.directory.api.l...
import java.nio.ByteBuffer; import java.util.List; import org.apache.directory.api.asn1.DecoderException; import org.apache.directory.api.asn1.ber.Asn1Decoder; import org.apache.directory.api.ldap.codec.api.LdapMessageContainer; import org.apache.directory.api.ldap.codec.decorators.SearchRequestDecorator; import org.ap...
import java.nio.*; import java.util.*; import org.apache.directory.api.asn1.*; import org.apache.directory.api.asn1.ber.*; import org.apache.directory.api.ldap.codec.api.*; import org.apache.directory.api.ldap.codec.decorators.*; import org.apache.directory.api.ldap.model.filter.*; import org.apache.directory.api.ldap....
[ "java.nio", "java.util", "org.apache.directory", "org.junit" ]
java.nio; java.util; org.apache.directory; org.junit;
766,516
public void testCase18() { byte aBytes[] = {120, 34, 78, -23, -111, 45, 127, 23, 45, -3}; byte bBytes[] = {0}; byte rBytes[] = {120, 34, 78, -23, -111, 45, 127, 23, 45, -3}; int aSign = 1; int bSign = 0; BigInteger aNumber = new BigInteger(aSign, aBytes); ...
void function() { byte aBytes[] = {120, 34, 78, -23, -111, 45, 127, 23, 45, -3}; byte bBytes[] = {0}; byte rBytes[] = {120, 34, 78, -23, -111, 45, 127, 23, 45, -3}; int aSign = 1; int bSign = 0; BigInteger aNumber = new BigInteger(aSign, aBytes); BigInteger bNumber = new BigInteger(bSign, bBytes); BigInteger result = a...
/** * Subtract zero from a number. * The number is positive. */
Subtract zero from a number. The number is positive
testCase18
{ "repo_name": "shannah/cn1", "path": "Ports/iOSPort/xmlvm/apache-harmony-6.0-src-r991881/classlib/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerSubtractTest.java", "license": "gpl-2.0", "size": 21339 }
[ "java.math.BigInteger" ]
import java.math.BigInteger;
import java.math.*;
[ "java.math" ]
java.math;
737,002