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 boolean isTypeWifi(Context context) { NetworkInfo networkInfo = Connection.getActiveNetworkInfo(context); return (networkInfo != null && networkInfo.isConnected() && networkInfo.getType() == ConnectivityManager.TYPE_WIFI); }
static boolean function(Context context) { NetworkInfo networkInfo = Connection.getActiveNetworkInfo(context); return (networkInfo != null && networkInfo.isConnected() && networkInfo.getType() == ConnectivityManager.TYPE_WIFI); }
/** * <p>Checks if there is connectivity to WIFI, when active, all data traffic will use this network. * <code>isTypeWifi</code> automatically calls <code>isConnected()</code> to guarantees that * connectivity exists.</p> * * @param context of an Application, Activity, Service or IntentService....
Checks if there is connectivity to WIFI, when active, all data traffic will use this network. <code>isTypeWifi</code> automatically calls <code>isConnected()</code> to guarantees that connectivity exists
isTypeWifi
{ "repo_name": "alkathirikhalid/connection", "path": "app/src/main/java/com/alkathirikhalid/connection/network/Connection.java", "license": "apache-2.0", "size": 10594 }
[ "android.content.Context", "android.net.ConnectivityManager", "android.net.NetworkInfo" ]
import android.content.Context; import android.net.ConnectivityManager; import android.net.NetworkInfo;
import android.content.*; import android.net.*;
[ "android.content", "android.net" ]
android.content; android.net;
1,035,298
public Map<String,ConfigKey<?>> getConfigKeys() { return Collections.unmodifiableMap(value(configKeys)); }
Map<String,ConfigKey<?>> function() { return Collections.unmodifiableMap(value(configKeys)); }
/** * ConfigKeys available on this entity. */
ConfigKeys available on this entity
getConfigKeys
{ "repo_name": "neykov/incubator-brooklyn", "path": "core/src/main/java/brooklyn/entity/basic/EntityDynamicType.java", "license": "apache-2.0", "size": 22893 }
[ "java.util.Collections", "java.util.Map" ]
import java.util.Collections; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,134,402
int baseDamage = atackee.calculateIncomingDamage(attacker.calculateOutgoingDamage()); int deviation = atackee.calculateIncomingDeviation(baseDamage, attacker.calculateOutgoingDeviation(baseDamage)); if (deviation > 0) baseDamage += new Random().nextInt(deviation); ...
int baseDamage = atackee.calculateIncomingDamage(attacker.calculateOutgoingDamage()); int deviation = atackee.calculateIncomingDeviation(baseDamage, attacker.calculateOutgoingDeviation(baseDamage)); if (deviation > 0) baseDamage += new Random().nextInt(deviation); return Math.max(0, baseDamage); }
/** * Calculate the damage that should be done when an entity attacks another * entity. * * @param attacker The entity which is performing the attack * @param atackee The entity that is being attacked * * @return The amount of damage that should be done to the attacked entity...
Calculate the damage that should be done when an entity attacks another entity
calculateAttackPower
{ "repo_name": "bendude56/Dungeonman", "path": "src/main/java/com/bendude56/dungeonman/entity/AIController.java", "license": "gpl-3.0", "size": 7556 }
[ "java.util.Random" ]
import java.util.Random;
import java.util.*;
[ "java.util" ]
java.util;
2,001,163
@Nonnull public java.util.List<com.microsoft.graph.options.FunctionOption> getFunctionOptions() { final ArrayList<com.microsoft.graph.options.FunctionOption> result = new ArrayList<>(); if(this.number != null) { result.add(new com.microsoft.graph.options.FunctionOption("number", numb...
java.util.List<com.microsoft.graph.options.FunctionOption> function() { final ArrayList<com.microsoft.graph.options.FunctionOption> result = new ArrayList<>(); if(this.number != null) { result.add(new com.microsoft.graph.options.FunctionOption(STR, number)); } return result; }
/** * Gets the functions options from the properties that have been set * @return a list of function options for the request */
Gets the functions options from the properties that have been set
getFunctionOptions
{ "repo_name": "microsoftgraph/msgraph-sdk-java", "path": "src/main/java/com/microsoft/graph/models/WorkbookFunctionsAsinhParameterSet.java", "license": "mit", "size": 3412 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
596,391
public static String getRequestID() { return UUID.randomUUID().toString(); }
static String function() { return UUID.randomUUID().toString(); }
/** * Returns a random Request ID. * * Request ID is returned to the client as well as flows through the system * facilitating debugging on why a certain request failed. * * @return String random request ID */
Returns a random Request ID. Request ID is returned to the client as well as flows through the system facilitating debugging on why a certain request failed
getRequestID
{ "repo_name": "xiao-chen/hadoop", "path": "hadoop-ozone/objectstore-service/src/main/java/org/apache/hadoop/ozone/OzoneRestUtils.java", "license": "apache-2.0", "size": 6983 }
[ "java.util.UUID" ]
import java.util.UUID;
import java.util.*;
[ "java.util" ]
java.util;
312,696
public static String getStringFromClipboard() { Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard(); Transferable paste = clipboard.getContents(null); if (paste == null) { return null; } try { return (String) paste.getTransferData(DataFlavor.stringFlavor); } catch (Except...
static String function() { Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard(); Transferable paste = clipboard.getContents(null); if (paste == null) { return null; } try { return (String) paste.getTransferData(DataFlavor.stringFlavor); } catch (Exception ex) { return null; } }
/** * Reads a string from system clipboard. */
Reads a string from system clipboard
getStringFromClipboard
{ "repo_name": "wsldl123292/jodd", "path": "jodd-core/src/main/java/jodd/util/ClipboardUtil.java", "license": "bsd-3-clause", "size": 1110 }
[ "java.awt.Toolkit", "java.awt.datatransfer.Clipboard", "java.awt.datatransfer.DataFlavor", "java.awt.datatransfer.Transferable" ]
import java.awt.Toolkit; import java.awt.datatransfer.Clipboard; import java.awt.datatransfer.DataFlavor; import java.awt.datatransfer.Transferable;
import java.awt.*; import java.awt.datatransfer.*;
[ "java.awt" ]
java.awt;
26,914
public void characters(char ch[], int start, int len) throws SAXException { }
void function(char ch[], int start, int len) throws SAXException { }
/** * Receive notification of character data. * * @param ch The characters from the XML document. * @param start The start position in the array. * @param len The number of characters to read from the array. */
Receive notification of character data
characters
{ "repo_name": "apache/cocoon", "path": "core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/xml/AbstractXMLConsumer.java", "license": "apache-2.0", "size": 6682 }
[ "org.xml.sax.SAXException" ]
import org.xml.sax.SAXException;
import org.xml.sax.*;
[ "org.xml.sax" ]
org.xml.sax;
1,936,258
@Test public void testAccumulatorsAndMetricsForwarding() throws Exception { final JobVertexID jid1 = new JobVertexID(); final JobVertexID jid2 = new JobVertexID(); JobVertex v1 = new JobVertex("v1", jid1); JobVertex v2 = new JobVertex("v2", jid2); SchedulerBase schedule...
void function() throws Exception { final JobVertexID jid1 = new JobVertexID(); final JobVertexID jid2 = new JobVertexID(); JobVertex v1 = new JobVertex("v1", jid1); JobVertex v2 = new JobVertex("v2", jid2); SchedulerBase scheduler = setupScheduler(v1, 1, v2, 1); ExecutionGraph graph = scheduler.getExecutionGraph(); Map...
/** * Verifies that {@link SchedulerNG#updateTaskExecutionState(TaskExecutionState)} updates the * accumulators and metrics for an execution that failed or was canceled. */
Verifies that <code>SchedulerNG#updateTaskExecutionState(TaskExecutionState)</code> updates the accumulators and metrics for an execution that failed or was canceled
testAccumulatorsAndMetricsForwarding
{ "repo_name": "tillrohrmann/flink", "path": "flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/DefaultExecutionGraphDeploymentTest.java", "license": "apache-2.0", "size": 30099 }
[ "java.util.HashMap", "java.util.Map", "org.apache.flink.api.common.accumulators.Accumulator", "org.apache.flink.api.common.accumulators.IntCounter", "org.apache.flink.runtime.accumulators.AccumulatorSnapshot", "org.apache.flink.runtime.execution.ExecutionState", "org.apache.flink.runtime.jobgraph.JobVer...
import java.util.HashMap; import java.util.Map; import org.apache.flink.api.common.accumulators.Accumulator; import org.apache.flink.api.common.accumulators.IntCounter; import org.apache.flink.runtime.accumulators.AccumulatorSnapshot; import org.apache.flink.runtime.execution.ExecutionState; import org.apache.flink.run...
import java.util.*; import org.apache.flink.api.common.accumulators.*; import org.apache.flink.runtime.accumulators.*; import org.apache.flink.runtime.execution.*; import org.apache.flink.runtime.jobgraph.*; import org.apache.flink.runtime.scheduler.*; import org.apache.flink.runtime.taskmanager.*; import org.junit.*;
[ "java.util", "org.apache.flink", "org.junit" ]
java.util; org.apache.flink; org.junit;
364,641
@Source("dialog.gss") @Import(value = {I_CmsInputCss.class}) I_CmsDialogCss dialogCss();
@Source(STR) @Import(value = {I_CmsInputCss.class}) I_CmsDialogCss dialogCss();
/** * Access method.<p> * * @return the dialog CSS */
Access method
dialogCss
{ "repo_name": "alkacon/opencms-core", "path": "src-gwt/org/opencms/gwt/client/ui/css/I_CmsLayoutBundle.java", "license": "lgpl-2.1", "size": 52204 }
[ "com.google.gwt.resources.client.CssResource" ]
import com.google.gwt.resources.client.CssResource;
import com.google.gwt.resources.client.*;
[ "com.google.gwt" ]
com.google.gwt;
2,869,532
TWorkItemLock tWorkItemLock = null; try { tWorkItemLock = retrieveByPK(objectID); } catch(Exception e) { //no logging because this can happen quite oft LOGGER.debug("Loading of a workItemLockBean by primary key " + objectID + " failed with " + e.getMessage()); LOGGER.debug(Ex...
TWorkItemLock tWorkItemLock = null; try { tWorkItemLock = retrieveByPK(objectID); } catch(Exception e) { LOGGER.debug(STR + objectID + STR + e.getMessage()); LOGGER.debug(ExceptionUtils.getStackTrace(e)); } if (tWorkItemLock!=null) { return tWorkItemLock.getBean(); } return null; }
/** * Loads a workItemLockBean by primary key * @param objectID * @return */
Loads a workItemLockBean by primary key
loadByPrimaryKey
{ "repo_name": "trackplus/Genji", "path": "src/main/java/com/aurel/track/persist/TWorkItemLockPeer.java", "license": "gpl-3.0", "size": 6799 }
[ "org.apache.commons.lang3.exception.ExceptionUtils" ]
import org.apache.commons.lang3.exception.ExceptionUtils;
import org.apache.commons.lang3.exception.*;
[ "org.apache.commons" ]
org.apache.commons;
2,750,553
public void start(GridCacheSharedContext<K, V> cctx) throws IgniteCheckedException;
void function(GridCacheSharedContext<K, V> cctx) throws IgniteCheckedException;
/** * Starts manager. * * @param cctx Context. * @throws IgniteCheckedException If failed. */
Starts manager
start
{ "repo_name": "irudyak/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheSharedManager.java", "license": "apache-2.0", "size": 1904 }
[ "org.apache.ignite.IgniteCheckedException" ]
import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.*;
[ "org.apache.ignite" ]
org.apache.ignite;
22,868
public com.mozu.api.contracts.customer.CustomerAttributeCollection getAccountAttributes(Integer accountId, Integer startIndex, Integer pageSize, String sortBy, String filter, String responseFields) throws Exception { MozuClient<com.mozu.api.contracts.customer.CustomerAttributeCollection> client = com.mozu.api.cli...
com.mozu.api.contracts.customer.CustomerAttributeCollection function(Integer accountId, Integer startIndex, Integer pageSize, String sortBy, String filter, String responseFields) throws Exception { MozuClient<com.mozu.api.contracts.customer.CustomerAttributeCollection> client = com.mozu.api.clients.commerce.customer.ac...
/** * Retrieves the list of customer account attributes. * <p><pre><code> * CustomerAttribute customerattribute = new CustomerAttribute(); * CustomerAttributeCollection customerAttributeCollection = customerattribute.getAccountAttributes( accountId, startIndex, pageSize, sortBy, filter, responseFields); ...
Retrieves the list of customer account attributes. <code><code> CustomerAttribute customerattribute = new CustomerAttribute(); CustomerAttributeCollection customerAttributeCollection = customerattribute.getAccountAttributes( accountId, startIndex, pageSize, sortBy, filter, responseFields); </code></code>
getAccountAttributes
{ "repo_name": "bhewett/mozu-java", "path": "mozu-javaasync-core/src/main/java/com/mozu/api/resources/commerce/customer/accounts/CustomerAttributeResource.java", "license": "mit", "size": 20192 }
[ "com.mozu.api.MozuClient" ]
import com.mozu.api.MozuClient;
import com.mozu.api.*;
[ "com.mozu.api" ]
com.mozu.api;
1,147,517
public boolean loadSegment(final DataSegment segment) throws SegmentLoadingException { final Segment adapter; try { adapter = segmentLoader.getSegment(segment); } catch (SegmentLoadingException e) { try { segmentLoader.cleanup(segment); } catch (SegmentLoadingExceptio...
boolean function(final DataSegment segment) throws SegmentLoadingException { final Segment adapter; try { adapter = segmentLoader.getSegment(segment); } catch (SegmentLoadingException e) { try { segmentLoader.cleanup(segment); } catch (SegmentLoadingException e1) { } throw e; } if (adapter == null) { throw new SegmentL...
/** * Load a single segment. * * @param segment segment to load * * @return true if the segment was newly loaded, false if it was already loaded * * @throws SegmentLoadingException if the segment cannot be loaded */
Load a single segment
loadSegment
{ "repo_name": "friedhardware/druid", "path": "server/src/main/java/io/druid/server/coordination/ServerManager.java", "license": "apache-2.0", "size": 17035 }
[ "com.google.common.collect.Ordering", "io.druid.segment.ReferenceCountingSegment", "io.druid.segment.Segment", "io.druid.segment.loading.SegmentLoadingException", "io.druid.timeline.DataSegment", "io.druid.timeline.VersionedIntervalTimeline", "io.druid.timeline.partition.PartitionHolder" ]
import com.google.common.collect.Ordering; import io.druid.segment.ReferenceCountingSegment; import io.druid.segment.Segment; import io.druid.segment.loading.SegmentLoadingException; import io.druid.timeline.DataSegment; import io.druid.timeline.VersionedIntervalTimeline; import io.druid.timeline.partition.PartitionHol...
import com.google.common.collect.*; import io.druid.segment.*; import io.druid.segment.loading.*; import io.druid.timeline.*; import io.druid.timeline.partition.*;
[ "com.google.common", "io.druid.segment", "io.druid.timeline" ]
com.google.common; io.druid.segment; io.druid.timeline;
1,193,946
public static JSONArray getJSONArray(JSONObject jsonObject, String key, JSONArray defaultValue) { if (jsonObject == null || StringUtils.isEmpty(key)) { return defaultValue; } try { return jsonObject.getJSONArray(key); } catch (JSONException e) { i...
static JSONArray function(JSONObject jsonObject, String key, JSONArray defaultValue) { if (jsonObject == null StringUtils.isEmpty(key)) { return defaultValue; } try { return jsonObject.getJSONArray(key); } catch (JSONException e) { if (isPrintException) { e.printStackTrace(); } return defaultValue; } }
/** * get JSONArray from jsonObject * * @param jsonObject * @param key * @param defaultValue * @return <ul> * <li>if jsonObject is null, return defaultValue</li> * <li>if key is null or empty, return defaultValue</li> * <li>if {@link JSONObject#getJS...
get JSONArray from jsonObject
getJSONArray
{ "repo_name": "Alexander0024/alexsophialib", "path": "AlexsophiaLib/src/com/alexsophia/alexsophialib/util/json/JSONUtils.java", "license": "gpl-2.0", "size": 26833 }
[ "com.alexsophia.alexsophialib.util.datsstructure.StringUtils", "org.json.JSONArray", "org.json.JSONException", "org.json.JSONObject" ]
import com.alexsophia.alexsophialib.util.datsstructure.StringUtils; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject;
import com.alexsophia.alexsophialib.util.datsstructure.*; import org.json.*;
[ "com.alexsophia.alexsophialib", "org.json" ]
com.alexsophia.alexsophialib; org.json;
1,975,823
public List<RegionOpeningState> sendRegionOpen(ServerName server, List<Triple<HRegionInfo, Integer, List<ServerName>>> regionOpenInfos) throws IOException { AdminService.BlockingInterface admin = getRsAdmin(server); if (admin == null) { LOG.warn("Attempting to send OPEN RPC to server " + server....
List<RegionOpeningState> function(ServerName server, List<Triple<HRegionInfo, Integer, List<ServerName>>> regionOpenInfos) throws IOException { AdminService.BlockingInterface admin = getRsAdmin(server); if (admin == null) { LOG.warn(STR + server.toString() + STR); return null; } OpenRegionRequest request = RequestConve...
/** * Sends an OPEN RPC to the specified server to open the specified region. * <p> * Open should not fail but can if server just crashed. * <p> * @param server server to open a region * @param regionOpenInfos info of a list of regions to open * @return a list of region opening states */
Sends an OPEN RPC to the specified server to open the specified region. Open should not fail but can if server just crashed.
sendRegionOpen
{ "repo_name": "grokcoder/pbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java", "license": "apache-2.0", "size": 42882 }
[ "com.google.protobuf.ServiceException", "java.io.IOException", "java.util.List", "org.apache.hadoop.hbase.HRegionInfo", "org.apache.hadoop.hbase.ServerName", "org.apache.hadoop.hbase.protobuf.ProtobufUtil", "org.apache.hadoop.hbase.protobuf.RequestConverter", "org.apache.hadoop.hbase.protobuf.Response...
import com.google.protobuf.ServiceException; import java.io.IOException; import java.util.List; import org.apache.hadoop.hbase.HRegionInfo; import org.apache.hadoop.hbase.ServerName; import org.apache.hadoop.hbase.protobuf.ProtobufUtil; import org.apache.hadoop.hbase.protobuf.RequestConverter; import org.apache.hadoop....
import com.google.protobuf.*; import java.io.*; import java.util.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.protobuf.*; import org.apache.hadoop.hbase.protobuf.generated.*; import org.apache.hadoop.hbase.regionserver.*; import org.apache.hadoop.hbase.util.*;
[ "com.google.protobuf", "java.io", "java.util", "org.apache.hadoop" ]
com.google.protobuf; java.io; java.util; org.apache.hadoop;
2,384,748
Publisher<BsonValue> decrypt(BsonBinary value);
Publisher<BsonValue> decrypt(BsonBinary value);
/** * Decrypt the given value. * * @param value the value to decrypt, which must be of subtype 6 * @return a Publisher containing the decrypted value */
Decrypt the given value
decrypt
{ "repo_name": "rozza/mongo-java-driver", "path": "driver-reactive-streams/src/main/com/mongodb/reactivestreams/client/vault/ClientEncryption.java", "license": "apache-2.0", "size": 2665 }
[ "org.bson.BsonBinary", "org.bson.BsonValue", "org.reactivestreams.Publisher" ]
import org.bson.BsonBinary; import org.bson.BsonValue; import org.reactivestreams.Publisher;
import org.bson.*; import org.reactivestreams.*;
[ "org.bson", "org.reactivestreams" ]
org.bson; org.reactivestreams;
2,418,191
private void processClientMetricsUpdateMessage(TcpDiscoveryClientMetricsUpdateMessage msg) { assert msg.client(); ClientMessageWorker wrk = clientMsgWorkers.get(msg.creatorNodeId()); if (wrk != null) wrk.metrics(msg.metrics()); else if (log.isDeb...
void function(TcpDiscoveryClientMetricsUpdateMessage msg) { assert msg.client(); ClientMessageWorker wrk = clientMsgWorkers.get(msg.creatorNodeId()); if (wrk != null) wrk.metrics(msg.metrics()); else if (log.isDebugEnabled()) log.debug(STR + msg); }
/** * Processes client metrics update message. * * @param msg Client metrics update message. */
Processes client metrics update message
processClientMetricsUpdateMessage
{ "repo_name": "SomeFire/ignite", "path": "modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java", "license": "apache-2.0", "size": 319423 }
[ "org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryClientMetricsUpdateMessage" ]
import org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryClientMetricsUpdateMessage;
import org.apache.ignite.spi.discovery.tcp.messages.*;
[ "org.apache.ignite" ]
org.apache.ignite;
2,653,631
@Override public boolean accepts(InputStream stream, DataCategory category) { if (!category.equals(DataCategory.NETWORK)) { return false; } try { return checkHeader(stream); } catch (IOException e) { logger.error("Error while checking header", e); return false; } }
boolean function(InputStream stream, DataCategory category) { if (!category.equals(DataCategory.NETWORK)) { return false; } try { return checkHeader(stream); } catch (IOException e) { logger.error(STR, e); return false; } }
/** * Indicates which streams the SBMLFileFilter accepts. */
Indicates which streams the SBMLFileFilter accepts
accepts
{ "repo_name": "tpfau/cy3sbml", "path": "src/main/java/org/cy3sbml/SBMLFileFilter.java", "license": "lgpl-3.0", "size": 2542 }
[ "java.io.IOException", "java.io.InputStream", "org.cytoscape.io.DataCategory" ]
import java.io.IOException; import java.io.InputStream; import org.cytoscape.io.DataCategory;
import java.io.*; import org.cytoscape.io.*;
[ "java.io", "org.cytoscape.io" ]
java.io; org.cytoscape.io;
176,690
public static List<String> getContValueRules() { return contValues; }
static List<String> function() { return contValues; }
/** * Method that returns rule numbers invlolving modification of collection values. * @return List containing rules numbers involving container values. */
Method that returns rule numbers invlolving modification of collection values
getContValueRules
{ "repo_name": "SSEHUB/EASyProducer", "path": "Plugins/Reasoner/Drools/de.uni_hildesheim.sse.reasoning.drools/src/net/ssehub/easy/reasoning/drools/DroolsImpliesEvaluator.java", "license": "apache-2.0", "size": 46238 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
291,470
@Override @SuppressWarnings("rawtypes") public List getPossibleCreatures(EnumCreatureType par1EnumCreatureType, int par2, int par3, int par4) { BiomeGenBase var5 = worldObj.getBiomeGenForCoords(par2, par4); return var5 == null ? null : var5 == AbyssalCraft.Wastelands && par1EnumCreatureType == EnumCreatureTyp...
@SuppressWarnings(STR) List function(EnumCreatureType par1EnumCreatureType, int par2, int par3, int par4) { BiomeGenBase var5 = worldObj.getBiomeGenForCoords(par2, par4); return var5 == null ? null : var5 == AbyssalCraft.Wastelands && par1EnumCreatureType == EnumCreatureType.monster && scatteredFeatureGenerator.hasStru...
/** * Returns a list of creatures of the specified type that can spawn at the given location. */
Returns a list of creatures of the specified type that can spawn at the given location
getPossibleCreatures
{ "repo_name": "Lovin000/AbyssalCraft", "path": "src/main/java/com/shinoow/abyssalcraft/common/world/ChunkProviderAbyss.java", "license": "apache-2.0", "size": 16223 }
[ "com.shinoow.abyssalcraft.AbyssalCraft", "java.util.List", "net.minecraft.entity.EnumCreatureType", "net.minecraft.world.biome.BiomeGenBase" ]
import com.shinoow.abyssalcraft.AbyssalCraft; import java.util.List; import net.minecraft.entity.EnumCreatureType; import net.minecraft.world.biome.BiomeGenBase;
import com.shinoow.abyssalcraft.*; import java.util.*; import net.minecraft.entity.*; import net.minecraft.world.biome.*;
[ "com.shinoow.abyssalcraft", "java.util", "net.minecraft.entity", "net.minecraft.world" ]
com.shinoow.abyssalcraft; java.util; net.minecraft.entity; net.minecraft.world;
2,010,831
private List<String> removeNonWorksiteMembersFromUserIds(List<String> userIds, String worksiteId) { List<String> worksiteMemberIds = new ArrayList<String>(); Site site = sakaiProxy.getSite(worksiteId); if (null == site) { log.error("Unable to receive worksite with id: " + worksiteId); } else { Se...
List<String> function(List<String> userIds, String worksiteId) { List<String> worksiteMemberIds = new ArrayList<String>(); Site site = sakaiProxy.getSite(worksiteId); if (null == site) { log.error(STR + worksiteId); } else { Set<Member> members = sakaiProxy.getSite(worksiteId).getMembers(); for (Member member : members...
/** * Remove any non-worksite members from list of user ids. * * @param userIds * @param worksiteId * @return a list of matching worksite member user ids. */
Remove any non-worksite members from list of user ids
removeNonWorksiteMembersFromUserIds
{ "repo_name": "harfalm/Sakai-10.1", "path": "profile2/impl/src/java/org/sakaiproject/profile2/logic/ProfileSearchLogicImpl.java", "license": "apache-2.0", "size": 9520 }
[ "java.util.ArrayList", "java.util.List", "java.util.Set", "org.sakaiproject.authz.api.Member", "org.sakaiproject.site.api.Site" ]
import java.util.ArrayList; import java.util.List; import java.util.Set; import org.sakaiproject.authz.api.Member; import org.sakaiproject.site.api.Site;
import java.util.*; import org.sakaiproject.authz.api.*; import org.sakaiproject.site.api.*;
[ "java.util", "org.sakaiproject.authz", "org.sakaiproject.site" ]
java.util; org.sakaiproject.authz; org.sakaiproject.site;
2,823,960
ModbusRequest request; switch (functionCode) { case Modbus.READ_COILS: request = new ReadCoilsRequest(); break; case Modbus.READ_INPUT_DISCRETES: request = new ReadInputDiscretesRequest(); break; case Modbus.REA...
ModbusRequest request; switch (functionCode) { case Modbus.READ_COILS: request = new ReadCoilsRequest(); break; case Modbus.READ_INPUT_DISCRETES: request = new ReadInputDiscretesRequest(); break; case Modbus.READ_MULTIPLE_REGISTERS: request = new ReadMultipleRegistersRequest(); break; case Modbus.READ_INPUT_REGISTERS: ...
/** * Factory method creating the required specialized <tt>ModbusRequest</tt> * instance. * * @param functionCode the function code of the request as <tt>int</tt>. * * @return a ModbusRequest instance specific for the given function type. */
Factory method creating the required specialized ModbusRequest instance
createModbusRequest
{ "repo_name": "j123b567/j2mod", "path": "src/main/java/com/ghgande/j2mod/modbus/msg/ModbusRequest.java", "license": "apache-2.0", "size": 5936 }
[ "com.ghgande.j2mod.modbus.Modbus" ]
import com.ghgande.j2mod.modbus.Modbus;
import com.ghgande.j2mod.modbus.*;
[ "com.ghgande.j2mod" ]
com.ghgande.j2mod;
669,175
public void setQueries(Map<String, List<DatabaseQuery>> queries) { this.queries = queries; }
void function(Map<String, List<DatabaseQuery>> queries) { this.queries = queries; }
/** * INTERNAL: * Set the named queries. */
Set the named queries
setQueries
{ "repo_name": "gameduell/eclipselink.runtime", "path": "foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/sessions/AbstractSession.java", "license": "epl-1.0", "size": 198170 }
[ "java.util.List", "java.util.Map", "org.eclipse.persistence.queries.DatabaseQuery" ]
import java.util.List; import java.util.Map; import org.eclipse.persistence.queries.DatabaseQuery;
import java.util.*; import org.eclipse.persistence.queries.*;
[ "java.util", "org.eclipse.persistence" ]
java.util; org.eclipse.persistence;
1,015,763
public Node clonePropsFrom(Node other) { Preconditions.checkState(this.propListHead == null, "Node has existing properties."); this.propListHead = other.propListHead; return this; }
Node function(Node other) { Preconditions.checkState(this.propListHead == null, STR); this.propListHead = other.propListHead; return this; }
/** * Clone the properties from the provided node without copying * the property object. The receiving node may not have any * existing properties. * @param other The node to clone properties from. * @return this node. */
Clone the properties from the provided node without copying the property object. The receiving node may not have any existing properties
clonePropsFrom
{ "repo_name": "redforks/closure-compiler", "path": "src/com/google/javascript/rhino/Node.java", "license": "apache-2.0", "size": 85845 }
[ "com.google.common.base.Preconditions" ]
import com.google.common.base.Preconditions;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
2,684,165
int getNumReportedRegions(TableName table, QuotaSnapshotStore<TableName> tableStore) throws IOException { return Iterables.size(tableStore.filterBySubject(table)); }
int getNumReportedRegions(TableName table, QuotaSnapshotStore<TableName> tableStore) throws IOException { return Iterables.size(tableStore.filterBySubject(table)); }
/** * Computes the number of regions reported for a table. */
Computes the number of regions reported for a table
getNumReportedRegions
{ "repo_name": "vincentpoon/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/QuotaObserverChore.java", "license": "apache-2.0", "size": 30828 }
[ "java.io.IOException", "org.apache.hadoop.hbase.TableName", "org.apache.hadoop.hbase.shaded.com.google.common.collect.Iterables" ]
import java.io.IOException; import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.shaded.com.google.common.collect.Iterables;
import java.io.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.shaded.com.google.common.collect.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
526,247
protected Node exitTokenDeclaration(Production node) throws ParseException { return node; }
Node function(Production node) throws ParseException { return node; }
/** * Called when exiting a parse tree node. * * @param node the node being exited * * @return the node to add to the parse tree, or * null if no parse tree should be created * * @throws ParseException if the node analysis discovered errors */
Called when exiting a parse tree node
exitTokenDeclaration
{ "repo_name": "runner-mei/mibble", "path": "src/main/java/net/percederberg/grammatica/GrammarAnalyzer.java", "license": "gpl-2.0", "size": 36326 }
[ "net.percederberg.grammatica.parser.Node", "net.percederberg.grammatica.parser.ParseException", "net.percederberg.grammatica.parser.Production" ]
import net.percederberg.grammatica.parser.Node; import net.percederberg.grammatica.parser.ParseException; import net.percederberg.grammatica.parser.Production;
import net.percederberg.grammatica.parser.*;
[ "net.percederberg.grammatica" ]
net.percederberg.grammatica;
2,618,307
public static final double getSubelementDouble( final Element element, final String element_name) throws Exception { String s = getSubelementString(element, element_name); if (s.length() < 1) throw new Exception("No number found for tag '" + element_name + "'"); return D...
static final double function( final Element element, final String element_name) throws Exception { String s = getSubelementString(element, element_name); if (s.length() < 1) throw new Exception(STR + element_name + "'"); return Double.parseDouble(s); }
/** Locate a sub-element tagged 'name', return its double value. * * Will only go one level down, not seach the whole tree. * * @param element Element where to start looking. May be null. * @param element_name Name of sub-element to locate. * * @return Returns number found in the sub-ele...
Locate a sub-element tagged 'name', return its double value. Will only go one level down, not seach the whole tree
getSubelementDouble
{ "repo_name": "css-iter/cs-studio", "path": "applications/apputil/apputil-plugins/org.csstudio.apputil/src/org/csstudio/apputil/xml/DOMHelper.java", "license": "epl-1.0", "size": 10883 }
[ "org.w3c.dom.Element" ]
import org.w3c.dom.Element;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
1,342,987
protected void finalize() { try { close(); } catch (SQLException e) { } }
void function() { try { close(); } catch (SQLException e) { } }
/** * The default implementation simply attempts to silently {@link * #close() close()} this <code>Connection</code> */
The default implementation simply attempts to silently <code>#close() close()</code> this <code>Connection</code>
finalize
{ "repo_name": "ferquies/2dam", "path": "AD/Tema 2/hsqldb-2.3.1/hsqldb/src/org/hsqldb/jdbc/JDBCConnection.java", "license": "gpl-3.0", "size": 155881 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
804,656
public static <T extends CharSequence> T eachMatch(T self, CharSequence regex, @ClosureParams(value=FromString.class, options={"List<String>","String[]"}) Closure closure) { eachMatch(self.toString(), regex.toString(), closure); return self; }
static <T extends CharSequence> T function(T self, CharSequence regex, @ClosureParams(value=FromString.class, options={STR,STR}) Closure closure) { eachMatch(self.toString(), regex.toString(), closure); return self; }
/** * Process each regex group matched substring of the given CharSequence. If the closure * parameter takes one argument, an array with all match groups is passed to it. * If the closure takes as many arguments as there are match groups, then each * parameter will be one match group. * * ...
Process each regex group matched substring of the given CharSequence. If the closure parameter takes one argument, an array with all match groups is passed to it. If the closure takes as many arguments as there are match groups, then each parameter will be one match group
eachMatch
{ "repo_name": "bsideup/incubator-groovy", "path": "src/main/org/codehaus/groovy/runtime/StringGroovyMethods.java", "license": "apache-2.0", "size": 141076 }
[ "groovy.lang.Closure", "groovy.transform.stc.ClosureParams", "groovy.transform.stc.FromString" ]
import groovy.lang.Closure; import groovy.transform.stc.ClosureParams; import groovy.transform.stc.FromString;
import groovy.lang.*; import groovy.transform.stc.*;
[ "groovy.lang", "groovy.transform.stc" ]
groovy.lang; groovy.transform.stc;
2,264,711
@Test public void serializesWasCreatedForAppExtension() throws Exception { ImmutableMap.Builder<PBXTarget, Path> targetToProjectPathMapBuilder = ImmutableMap.builder(); PBXTarget rootTarget = new PBXNativeTarget("rootRule"); rootTarget.setGlobalID("rootGID"); rootTarget.setProductReference( ...
void function() throws Exception { ImmutableMap.Builder<PBXTarget, Path> targetToProjectPathMapBuilder = ImmutableMap.builder(); PBXTarget rootTarget = new PBXNativeTarget(STR); rootTarget.setGlobalID(STR); rootTarget.setProductReference( new PBXFileReference( STR, STR, PBXReference.SourceTree.BUILT_PRODUCTS_DIR, Optio...
/** * Include `wasCreatedForAppExtension` when true. * * @throws Exception */
Include `wasCreatedForAppExtension` when true
serializesWasCreatedForAppExtension
{ "repo_name": "rmaz/buck", "path": "test/com/facebook/buck/features/apple/project/SchemeGeneratorTest.java", "license": "apache-2.0", "size": 54180 }
[ "com.facebook.buck.apple.xcode.XCScheme", "com.facebook.buck.apple.xcode.xcodeproj.PBXFileReference", "com.facebook.buck.apple.xcode.xcodeproj.PBXNativeTarget", "com.facebook.buck.apple.xcode.xcodeproj.PBXReference", "com.facebook.buck.apple.xcode.xcodeproj.PBXTarget", "com.facebook.buck.apple.xcode.xcode...
import com.facebook.buck.apple.xcode.XCScheme; import com.facebook.buck.apple.xcode.xcodeproj.PBXFileReference; import com.facebook.buck.apple.xcode.xcodeproj.PBXNativeTarget; import com.facebook.buck.apple.xcode.xcodeproj.PBXReference; import com.facebook.buck.apple.xcode.xcodeproj.PBXTarget; import com.facebook.buck....
import com.facebook.buck.apple.xcode.*; import com.facebook.buck.apple.xcode.xcodeproj.*; import com.google.common.collect.*; import java.nio.file.*; import java.util.*; import javax.xml.parsers.*; import javax.xml.xpath.*; import org.w3c.dom.*;
[ "com.facebook.buck", "com.google.common", "java.nio", "java.util", "javax.xml", "org.w3c.dom" ]
com.facebook.buck; com.google.common; java.nio; java.util; javax.xml; org.w3c.dom;
2,396,676
private static Optional<File> expandFilename(String filename, String dir) { if ((filename == null) || filename.isEmpty()) { return Optional.empty(); } String name = filename; File file = new File(name); if (file.exists() || (dir == null)) { return O...
static Optional<File> function(String filename, String dir) { if ((filename == null) filename.isEmpty()) { return Optional.empty(); } String name = filename; File file = new File(name); if (file.exists() (dir == null)) { return Optional.of(file); } if (dir.endsWith(OS.FILE_SEPARATOR)) { name = dir + name; } else { name...
/** * Converts a relative filename to an absolute one, if necessary. Returns * null if the file does not exist. */
Converts a relative filename to an absolute one, if necessary. Returns null if the file does not exist
expandFilename
{ "repo_name": "bartsch-dev/jabref", "path": "src/main/java/org/jabref/logic/util/io/FileUtil.java", "license": "mit", "size": 16282 }
[ "java.io.File", "java.util.Optional" ]
import java.io.File; import java.util.Optional;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,672,279
private void ensureCtx(InitialContext ctx, String name) throws NamingException { try { ctx.bind(name, new InitialContext()); } catch (NameAlreadyBoundException e) { // this is ok } }
void function(InitialContext ctx, String name) throws NamingException { try { ctx.bind(name, new InitialContext()); } catch (NameAlreadyBoundException e) { } }
/** * Ensure that the given name is bound to a context. * @param ctx * @param name * @throws NamingException */
Ensure that the given name is bound to a context
ensureCtx
{ "repo_name": "kunallimaye/apiman", "path": "manager/test/api/src/main/java/io/apiman/manager/test/server/ManagerApiTestServer.java", "license": "apache-2.0", "size": 14817 }
[ "javax.naming.InitialContext", "javax.naming.NameAlreadyBoundException", "javax.naming.NamingException" ]
import javax.naming.InitialContext; import javax.naming.NameAlreadyBoundException; import javax.naming.NamingException;
import javax.naming.*;
[ "javax.naming" ]
javax.naming;
2,425,975
public Point[] getSelectedStepLocations() { List<Point> points = new ArrayList<>(); for ( StepMeta stepMeta : getSelectedSteps() ) { Point p = stepMeta.getLocation(); points.add( new Point( p.x, p.y ) ); // explicit copy of location } return points.toArray( new Point[points.size()] ); ...
Point[] function() { List<Point> points = new ArrayList<>(); for ( StepMeta stepMeta : getSelectedSteps() ) { Point p = stepMeta.getLocation(); points.add( new Point( p.x, p.y ) ); } return points.toArray( new Point[points.size()] ); }
/** * Get an array of all the selected step locations. * * @return The selected step locations. */
Get an array of all the selected step locations
getSelectedStepLocations
{ "repo_name": "dkincade/pentaho-kettle", "path": "engine/src/main/java/org/pentaho/di/trans/TransMeta.java", "license": "apache-2.0", "size": 227503 }
[ "java.util.ArrayList", "java.util.List", "org.pentaho.di.core.gui.Point", "org.pentaho.di.trans.step.StepMeta" ]
import java.util.ArrayList; import java.util.List; import org.pentaho.di.core.gui.Point; import org.pentaho.di.trans.step.StepMeta;
import java.util.*; import org.pentaho.di.core.gui.*; import org.pentaho.di.trans.step.*;
[ "java.util", "org.pentaho.di" ]
java.util; org.pentaho.di;
634,966
private JButton makeToolButton(String label, String iconName, ActionListener listener) { URL imageURL = this.getClass().getClassLoader().getResource( propertiesBundle.getStringProperty("directory.images") + iconName); if (imageURL == null) {...
JButton function(String label, String iconName, ActionListener listener) { URL imageURL = this.getClass().getClassLoader().getResource( propertiesBundle.getStringProperty(STR) + iconName); if (imageURL == null) { imageURL = Thread.currentThread().getContextClassLoader() .getResource( propertiesBundle .getStringProperty...
/** * Makes the JButton from the parameters given. * * @param label * The label of the button. * @param iconName * The name of the image for the button. * @param listener * The actionlistener for that button. * @return The construct...
Makes the JButton from the parameters given
makeToolButton
{ "repo_name": "moegyver/mJeliot", "path": "Jeliot/src/jeliot/gui/CodeEditor2.java", "license": "mit", "size": 37178 }
[ "java.awt.Insets", "java.awt.event.ActionListener", "javax.swing.AbstractButton", "javax.swing.ImageIcon", "javax.swing.JButton" ]
import java.awt.Insets; import java.awt.event.ActionListener; import javax.swing.AbstractButton; import javax.swing.ImageIcon; import javax.swing.JButton;
import java.awt.*; import java.awt.event.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
484,468
protected void dealScalarParameter( ScalarParameter element, Module module ) { Expression tmpValue = (Expression) element.getLocalProperty( module, IAbstractScalarParameterModel.VALUE_EXPR_PROP ); String value = null; if ( tmpValue != null ) value = tmpValue.getStringExpression( ); if ( value != nul...
void function( ScalarParameter element, Module module ) { Expression tmpValue = (Expression) element.getLocalProperty( module, IAbstractScalarParameterModel.VALUE_EXPR_PROP ); String value = null; if ( tmpValue != null ) value = tmpValue.getStringExpression( ); if ( value != null ) handleBoundsForValue( element, module...
/** * Creates bound columns for the scalar parameter. * * @param element * the scalar parameter * @param module * the root of the scalar parameter */
Creates bound columns for the scalar parameter
dealScalarParameter
{ "repo_name": "sguan-actuate/birt", "path": "model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/util/BoundColumnsMgr.java", "license": "epl-1.0", "size": 25123 }
[ "org.eclipse.birt.report.model.api.Expression", "org.eclipse.birt.report.model.core.Module", "org.eclipse.birt.report.model.elements.ScalarParameter", "org.eclipse.birt.report.model.elements.interfaces.IAbstractScalarParameterModel" ]
import org.eclipse.birt.report.model.api.Expression; import org.eclipse.birt.report.model.core.Module; import org.eclipse.birt.report.model.elements.ScalarParameter; import org.eclipse.birt.report.model.elements.interfaces.IAbstractScalarParameterModel;
import org.eclipse.birt.report.model.api.*; import org.eclipse.birt.report.model.core.*; import org.eclipse.birt.report.model.elements.*; import org.eclipse.birt.report.model.elements.interfaces.*;
[ "org.eclipse.birt" ]
org.eclipse.birt;
2,718,973
@SuppressWarnings("unchecked") public static <T> T createInstance(Configuration conf, String configuredClassName, String defaultValue, Class<T> type) { String className = conf.get(configuredClassName, defaultValue); try { Class<?> clusterResolverClass = conf.getClassByName(className); if ...
@SuppressWarnings(STR) static <T> T function(Configuration conf, String configuredClassName, String defaultValue, Class<T> type) { String className = conf.get(configuredClassName, defaultValue); try { Class<?> clusterResolverClass = conf.getClassByName(className); if (type.isAssignableFrom(clusterResolverClass)) { retu...
/** * Helper method to create instances of Object using the class name specified * in the configuration object. * * @param conf the yarn configuration * @param configuredClassName the configuration provider key * @param defaultValue the default implementation class * @param type the required interf...
Helper method to create instances of Object using the class name specified in the configuration object
createInstance
{ "repo_name": "JingchengDu/hadoop", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/federation/utils/FederationStateStoreFacade.java", "license": "apache-2.0", "size": 23616 }
[ "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.util.ReflectionUtils", "org.apache.hadoop.yarn.exceptions.YarnRuntimeException" ]
import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.util.ReflectionUtils; import org.apache.hadoop.yarn.exceptions.YarnRuntimeException;
import org.apache.hadoop.conf.*; import org.apache.hadoop.util.*; import org.apache.hadoop.yarn.exceptions.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
2,424,938
private FileBlockInfo generateFileBlockInfo(LockedInodePath inodePath, BlockInfo blockInfo) throws FileDoesNotExistException { InodeFileView file = inodePath.getInodeFile(); FileBlockInfo fileBlockInfo = new FileBlockInfo(); fileBlockInfo.setBlockInfo(blockInfo); fileBlockInfo.setUfsLocations(ne...
FileBlockInfo function(LockedInodePath inodePath, BlockInfo blockInfo) throws FileDoesNotExistException { InodeFileView file = inodePath.getInodeFile(); FileBlockInfo fileBlockInfo = new FileBlockInfo(); fileBlockInfo.setBlockInfo(blockInfo); fileBlockInfo.setUfsLocations(new ArrayList<>()); long offset = file.getBlock...
/** * Generates a {@link FileBlockInfo} object from internal metadata. This adds file information to * the block, such as the file offset, and additional UFS locations for the block. * * @param inodePath the file the block is a part of * @param blockInfo the {@link BlockInfo} to generate the {@link FileB...
Generates a <code>FileBlockInfo</code> object from internal metadata. This adds file information to the block, such as the file offset, and additional UFS locations for the block
generateFileBlockInfo
{ "repo_name": "PasaLab/tachyon", "path": "core/server/master/src/main/java/alluxio/master/file/DefaultFileSystemMaster.java", "license": "apache-2.0", "size": 150549 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
626,793
protected List<Group> getGroups(List<String> principals) { if (null != principals && !principals.isEmpty()) { Set<Role> registeredRoles = RoleRegistry.get().getRegisteredRoles(); if (null != registeredRoles && !registeredRoles.isEmpty()) { List<Group> result = new...
List<Group> function(List<String> principals) { if (null != principals && !principals.isEmpty()) { Set<Role> registeredRoles = RoleRegistry.get().getRegisteredRoles(); if (null != registeredRoles && !registeredRoles.isEmpty()) { List<Group> result = new LinkedList<Group>(); for (String role : principals) { if (null == ...
/** * For a given collection of principal names, return the Role instances for the ones * that are considered roles, so the ones that exist on the RoleRegistry. */
For a given collection of principal names, return the Role instances for the ones that are considered roles, so the ones that exist on the RoleRegistry
getGroups
{ "repo_name": "ederign/uberfire", "path": "uberfire-backend/uberfire-backend-server/src/main/java/org/uberfire/backend/server/security/adapter/GroupAdapterAuthorizationSource.java", "license": "apache-2.0", "size": 6459 }
[ "java.util.Collections", "java.util.LinkedList", "java.util.List", "java.util.Set", "org.jboss.errai.security.shared.api.Group", "org.jboss.errai.security.shared.api.GroupImpl", "org.jboss.errai.security.shared.api.Role", "org.uberfire.backend.server.security.RoleRegistry" ]
import java.util.Collections; import java.util.LinkedList; import java.util.List; import java.util.Set; import org.jboss.errai.security.shared.api.Group; import org.jboss.errai.security.shared.api.GroupImpl; import org.jboss.errai.security.shared.api.Role; import org.uberfire.backend.server.security.RoleRegistry;
import java.util.*; import org.jboss.errai.security.shared.api.*; import org.uberfire.backend.server.security.*;
[ "java.util", "org.jboss.errai", "org.uberfire.backend" ]
java.util; org.jboss.errai; org.uberfire.backend;
2,744,177
private static RegionDefinition createRegion(String string) { RegionDefinitionImpl impl = new RegionDefinitionImpl(); impl.setIdentifier(string); impl.getFields().add(createField(string + "Field1")); impl.getFields().add(createField(string + "Field2")); return impl; }
static RegionDefinition function(String string) { RegionDefinitionImpl impl = new RegionDefinitionImpl(); impl.setIdentifier(string); impl.getFields().add(createField(string + STR)); impl.getFields().add(createField(string + STR)); return impl; }
/** * Creates the region. * * @param string * the string * @return the region definition */
Creates the region
createRegion
{ "repo_name": "SirmaITT/conservation-space-1.7.0", "path": "docker/sirma-platform/platform/seip-parent/platform/emf-semantic/emf-semantic-impl/src/test/java/com/sirma/itt/emf/semantic/definitions/SemanticPropertyRegisterTest.java", "license": "lgpl-3.0", "size": 5130 }
[ "com.sirma.itt.seip.definition.RegionDefinition", "com.sirma.itt.seip.definition.model.RegionDefinitionImpl" ]
import com.sirma.itt.seip.definition.RegionDefinition; import com.sirma.itt.seip.definition.model.RegionDefinitionImpl;
import com.sirma.itt.seip.definition.*; import com.sirma.itt.seip.definition.model.*;
[ "com.sirma.itt" ]
com.sirma.itt;
2,856,740
@NonNull private static String getNEWS_COLOR(@NonNull Context context) { if (newsColor == null) { newsColor = context.getResources().getString(R.string.ca_sto_news_color); } return newsColor; } @Nullable private static String newsTargetAuthority = null;
static String function(@NonNull Context context) { if (newsColor == null) { newsColor = context.getResources().getString(R.string.ca_sto_news_color); } return newsColor; } private static String newsTargetAuthority = null;
/** * Override if multiple {@link CaSTOProvider} implementations in same app. */
Override if multiple <code>CaSTOProvider</code> implementations in same app
getNEWS_COLOR
{ "repo_name": "mtransitapps/commons-android", "path": "src/main/java/org/mtransit/android/commons/provider/CaSTOProvider.java", "license": "apache-2.0", "size": 27866 }
[ "android.content.Context", "androidx.annotation.NonNull" ]
import android.content.Context; import androidx.annotation.NonNull;
import android.content.*; import androidx.annotation.*;
[ "android.content", "androidx.annotation" ]
android.content; androidx.annotation;
157,741
@Test public void traceExceptionAndFormattedStringWithSingleLong() { RuntimeException exception = new RuntimeException(); logger.tracef(exception, "Hello %d!", 42L); if (traceEnabled) { verify(provider).log(eq(2), isNull(), eq(Level.TRACE), same(exception), any(PrintfStyleFormatter.class), eq("Hello %d!"...
void function() { RuntimeException exception = new RuntimeException(); logger.tracef(exception, STR, 42L); if (traceEnabled) { verify(provider).log(eq(2), isNull(), eq(Level.TRACE), same(exception), any(PrintfStyleFormatter.class), eq(STR), eq(42L)); } else { verify(provider, never()).log(anyInt(), anyString(), any(), ...
/** * Verifies that an exception and a formatted string with a single long argument will be logged correctly at * {@link Level#TRACE TRACE} level. */
Verifies that an exception and a formatted string with a single long argument will be logged correctly at <code>Level#TRACE TRACE</code> level
traceExceptionAndFormattedStringWithSingleLong
{ "repo_name": "pmwmedia/tinylog", "path": "jboss-tinylog/src/test/java/org/tinylog/jboss/TinylogLoggerTest.java", "license": "apache-2.0", "size": 189291 }
[ "org.mockito.ArgumentMatchers", "org.mockito.Mockito", "org.tinylog.Level", "org.tinylog.format.PrintfStyleFormatter" ]
import org.mockito.ArgumentMatchers; import org.mockito.Mockito; import org.tinylog.Level; import org.tinylog.format.PrintfStyleFormatter;
import org.mockito.*; import org.tinylog.*; import org.tinylog.format.*;
[ "org.mockito", "org.tinylog", "org.tinylog.format" ]
org.mockito; org.tinylog; org.tinylog.format;
1,061,103
@ApiOperation(value = "Create flow loop", response = FlowLoopResponse.class) @PostMapping(value = "/{flow_id}/loops") @ResponseStatus(HttpStatus.OK) public CompletableFuture<FlowLoopResponse> createFlowLoop(@PathVariable(name = "flow_id") String flowId, ...
@ApiOperation(value = STR, response = FlowLoopResponse.class) @PostMapping(value = STR) @ResponseStatus(HttpStatus.OK) CompletableFuture<FlowLoopResponse> function(@PathVariable(name = STR) String flowId, @RequestBody FlowLoopPayload flowLoopPayload) { return flowService.createFlowLoop(flowId, flowLoopPayload.getSwitch...
/** * Create flow loop. * * @param flowId flow id * @param flowLoopPayload parameters for flow loop * @return created flow loop */
Create flow loop
createFlowLoop
{ "repo_name": "jonvestal/open-kilda", "path": "src-java/northbound-service/northbound/src/main/java/org/openkilda/northbound/controller/v2/FlowControllerV2.java", "license": "apache-2.0", "size": 9280 }
[ "io.swagger.annotations.ApiOperation", "java.util.concurrent.CompletableFuture", "org.openkilda.northbound.dto.v2.flows.FlowLoopPayload", "org.openkilda.northbound.dto.v2.flows.FlowLoopResponse", "org.springframework.http.HttpStatus", "org.springframework.web.bind.annotation.PathVariable", "org.springfr...
import io.swagger.annotations.ApiOperation; import java.util.concurrent.CompletableFuture; import org.openkilda.northbound.dto.v2.flows.FlowLoopPayload; import org.openkilda.northbound.dto.v2.flows.FlowLoopResponse; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.PathVariable;...
import io.swagger.annotations.*; import java.util.concurrent.*; import org.openkilda.northbound.dto.v2.flows.*; import org.springframework.http.*; import org.springframework.web.bind.annotation.*;
[ "io.swagger.annotations", "java.util", "org.openkilda.northbound", "org.springframework.http", "org.springframework.web" ]
io.swagger.annotations; java.util; org.openkilda.northbound; org.springframework.http; org.springframework.web;
2,877,002
protected void showTabs() { if (getPageCount() > 1) { setPageText(0, getString("_UI_SelectionPage_label")); if (getContainer() instanceof CTabFolder) { ((CTabFolder)getContainer()).setTabHeight(SWT.DEFAULT); Point point = getContainer().getSize(); getContainer().setSize(point.x, point.y - 6); ...
void function() { if (getPageCount() > 1) { setPageText(0, getString(STR)); if (getContainer() instanceof CTabFolder) { ((CTabFolder)getContainer()).setTabHeight(SWT.DEFAULT); Point point = getContainer().getSize(); getContainer().setSize(point.x, point.y - 6); } } }
/** * If there is more than one page in the multi-page editor part, * this shows the tabs at the bottom. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
If there is more than one page in the multi-page editor part, this shows the tabs at the bottom.
showTabs
{ "repo_name": "mlanoe/x-vhdl", "path": "plugins/net.mlanoe.language.vhdl.editor/src-gen/net/mlanoe/language/vhdl/expression/presentation/ExpressionEditor.java", "license": "gpl-3.0", "size": 55367 }
[ "org.eclipse.swt.custom.CTabFolder", "org.eclipse.swt.graphics.Point" ]
import org.eclipse.swt.custom.CTabFolder; import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.custom.*; import org.eclipse.swt.graphics.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
1,738,674
public String getOutput(Map<String, String> params) { try { return fetch(params).getOutput(); } catch (Exception e) { System.err.println(e.getMessage()); System.exit(1); return null; } }
String function(Map<String, String> params) { try { return fetch(params).getOutput(); } catch (Exception e) { System.err.println(e.getMessage()); System.exit(1); return null; } }
/** * Fetch the output from the topmost category (sometimes called the pattern). * * @param params key/value parameters that might influence the selection. * @return Random pattern selected by data value. */
Fetch the output from the topmost category (sometimes called the pattern)
getOutput
{ "repo_name": "samguyjones/blurb", "path": "src/main/java/com/jolyjonesfamily/blurb/BlurbCatalog.java", "license": "gpl-2.0", "size": 3926 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,291,715
Date getLastMailSyncDate(String userId) throws UserNotFoundException, NotMailSyncException;
Date getLastMailSyncDate(String userId) throws UserNotFoundException, NotMailSyncException;
/** * Returns last mail sync date. * * @param userId affected user id. * * @return last mail sync date. * @throws UserNotFoundException exception if no user found for specified userId. * @throws NotMailSyncException exception last mail sync date is null. */
Returns last mail sync date
getLastMailSyncDate
{ "repo_name": "SergejMeister/intellijob", "path": "src/main/java/com/intellijob/controllers/UserController.java", "license": "apache-2.0", "size": 3654 }
[ "com.intellijob.exceptions.NotMailSyncException", "com.intellijob.exceptions.UserNotFoundException", "java.util.Date" ]
import com.intellijob.exceptions.NotMailSyncException; import com.intellijob.exceptions.UserNotFoundException; import java.util.Date;
import com.intellijob.exceptions.*; import java.util.*;
[ "com.intellijob.exceptions", "java.util" ]
com.intellijob.exceptions; java.util;
1,434,905
public void install(JEditorPane editor);
void function(JEditorPane editor);
/** * Called to install the component on an editor * @param editor */
Called to install the component on an editor
install
{ "repo_name": "zqq90/webit-editor", "path": "src/main/java/jsyntaxpane/components/SyntaxComponent.java", "license": "bsd-3-clause", "size": 1658 }
[ "javax.swing.JEditorPane" ]
import javax.swing.JEditorPane;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
2,585,884
public static <T> HDFSFileSink<T, AvroKey<T>, NullWritable> toAvro(String path, Class<T> cls, Configuration conf) { return toAvro(path, AvroCoder.of(cls), conf); } // ====...
static <T> HDFSFileSink<T, AvroKey<T>, NullWritable> function(String path, Class<T> cls, Configuration conf) { return toAvro(path, AvroCoder.of(cls), conf); }
/** * Helper to create Avro sink given {@link Class}. Keep in mind that configuration * object is altered to enable Avro output. */
Helper to create Avro sink given <code>Class</code>. Keep in mind that configuration object is altered to enable Avro output
toAvro
{ "repo_name": "chamikaramj/incubator-beam", "path": "sdks/java/io/hdfs/src/main/java/org/apache/beam/sdk/io/hdfs/HDFSFileSink.java", "license": "apache-2.0", "size": 17386 }
[ "org.apache.avro.mapred.AvroKey", "org.apache.beam.sdk.coders.AvroCoder", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.io.NullWritable" ]
import org.apache.avro.mapred.AvroKey; import org.apache.beam.sdk.coders.AvroCoder; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.io.NullWritable;
import org.apache.avro.mapred.*; import org.apache.beam.sdk.coders.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.io.*;
[ "org.apache.avro", "org.apache.beam", "org.apache.hadoop" ]
org.apache.avro; org.apache.beam; org.apache.hadoop;
1,804,610
public BatchOptions precision(final TimeUnit precision) { BatchOptions clone = getClone(); clone.precision = precision; return clone; }
BatchOptions function(final TimeUnit precision) { BatchOptions clone = getClone(); clone.precision = precision; return clone; }
/** * Set the time precision to use for the whole batch. If unspecified, will default to {@link TimeUnit#NANOSECONDS}. * @param precision sets the precision to use * @return the BatchOptions instance to be able to use it in a fluent manner. */
Set the time precision to use for the whole batch. If unspecified, will default to <code>TimeUnit#NANOSECONDS</code>
precision
{ "repo_name": "influxdb/influxdb-java", "path": "src/main/java/org/influxdb/BatchOptions.java", "license": "mit", "size": 6422 }
[ "java.util.concurrent.TimeUnit" ]
import java.util.concurrent.TimeUnit;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
2,891,154
public void writeValue (String name, Object value, Class knownType, Class elementType) { try { writer.name(name); } catch (IOException ex) { throw new SerializationException(ex); } writeValue(value, knownType, elementType); }
void function (String name, Object value, Class knownType, Class elementType) { try { writer.name(name); } catch (IOException ex) { throw new SerializationException(ex); } writeValue(value, knownType, elementType); }
/** Writes the value as a field on the current JSON object, writing the class of the object if it differs from the specified * known type. The specified element type is used as the default type for collections. * @param value May be null. * @param knownType May be null if the type is unknown. * @param elementTy...
Writes the value as a field on the current JSON object, writing the class of the object if it differs from the specified known type. The specified element type is used as the default type for collections
writeValue
{ "repo_name": "lordjone/libgdx", "path": "gdx/src/com/badlogic/gdx/utils/Json.java", "license": "apache-2.0", "size": 37317 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
203,016
public Promise<T> fulfillInAsync(final Callable<T> task, Executor executor) { executor.execute(() -> { try { fulfill(task.call()); } catch (Exception ex) { fulfillExceptionally(ex); } }); return this; }
Promise<T> function(final Callable<T> task, Executor executor) { executor.execute(() -> { try { fulfill(task.call()); } catch (Exception ex) { fulfillExceptionally(ex); } }); return this; }
/** * Executes the task using the executor in other thread and fulfills the promise returned * once the task completes either successfully or with an exception. * * @param task the task that will provide the value to fulfill the promise. * @param executor the executor in which the task should be run. ...
Executes the task using the executor in other thread and fulfills the promise returned once the task completes either successfully or with an exception
fulfillInAsync
{ "repo_name": "Crossy147/java-design-patterns", "path": "promise/src/main/java/com/iluwatar/promise/Promise.java", "license": "mit", "size": 6330 }
[ "java.util.concurrent.Callable", "java.util.concurrent.Executor" ]
import java.util.concurrent.Callable; import java.util.concurrent.Executor;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
2,385,121
AzureRegions azureRegion();
AzureRegions azureRegion();
/** * Gets Supported Azure regions for Cognitive Services endpoints. Possible values include: 'westus', 'westeurope', 'southeastasia', 'eastus2', 'westcentralus'. * * @return the azureRegion value. */
Gets Supported Azure regions for Cognitive Services endpoints. Possible values include: 'westus', 'westeurope', 'southeastasia', 'eastus2', 'westcentralus'
azureRegion
{ "repo_name": "martinsawicki/azure-sdk-for-java", "path": "cognitiveservices/azure-language/src/main/java/com/microsoft/azure/cognitiveservices/language/TextAnalyticsAPI.java", "license": "mit", "size": 15538 }
[ "com.microsoft.azure.cognitiveservices.language.models.AzureRegions" ]
import com.microsoft.azure.cognitiveservices.language.models.AzureRegions;
import com.microsoft.azure.cognitiveservices.language.models.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
2,390,051
ModulesService modulesService = ModulesServiceFactory.getModulesService(); List<String> versionListInString = new ArrayList<>(modulesService.getVersions(null)); // null == default module List<Version> versionList = new ArrayList<>(); for (String versionInString : versionListInString) { ...
ModulesService modulesService = ModulesServiceFactory.getModulesService(); List<String> versionListInString = new ArrayList<>(modulesService.getVersions(null)); List<Version> versionList = new ArrayList<>(); for (String versionInString : versionListInString) { versionList.add(new Version(versionInString)); } versionLis...
/** * Gets all available versions. */
Gets all available versions
getAvailableVersions
{ "repo_name": "LiHaoTan/teammates", "path": "src/main/java/teammates/common/util/GaeVersionApi.java", "license": "gpl-2.0", "size": 2576 }
[ "com.google.appengine.api.modules.ModulesService", "com.google.appengine.api.modules.ModulesServiceFactory", "java.util.ArrayList", "java.util.List" ]
import com.google.appengine.api.modules.ModulesService; import com.google.appengine.api.modules.ModulesServiceFactory; import java.util.ArrayList; import java.util.List;
import com.google.appengine.api.modules.*; import java.util.*;
[ "com.google.appengine", "java.util" ]
com.google.appengine; java.util;
2,841,830
private int getLevel(String letter){ if(Objects.equals("B", letter)){ return 1; }else if(Objects.equals("C", letter) || Objects.equals("S", letter)){ return 2; }else { return 0; } }
int function(String letter){ if(Objects.equals("B", letter)){ return 1; }else if(Objects.equals("C", letter) Objects.equals("S", letter)){ return 2; }else { return 0; } }
/** * Sets the level of the alert data sent to the Server * @param letter : the first letter if the data sent by the Aidevig device * @return int corresponding to the level according to the user's bracelet data */
Sets the level of the alert data sent to the Server
getLevel
{ "repo_name": "Aidevig/Android", "path": "mobile/src/main/java/com/dty/gosafe/connection/BluetoothManager.java", "license": "apache-2.0", "size": 22005 }
[ "java.util.Objects" ]
import java.util.Objects;
import java.util.*;
[ "java.util" ]
java.util;
1,832,670
SocketAddress getRemoteAddress();
SocketAddress getRemoteAddress();
/** * Returns remote address of the client. */
Returns remote address of the client
getRemoteAddress
{ "repo_name": "ronenhamias/socketio", "path": "src/main/java/io/servicefabric/socketio/ISession.java", "license": "apache-2.0", "size": 2494 }
[ "java.net.SocketAddress" ]
import java.net.SocketAddress;
import java.net.*;
[ "java.net" ]
java.net;
1,948,012
public static Document getManifestDocument() throws ParserConfigurationException { DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder documentBuilder; documentBuilder = documentBuilderFactory.newDocumentBuilder(); return documentBuil...
static Document function() throws ParserConfigurationException { DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder documentBuilder; documentBuilder = documentBuilderFactory.newDocumentBuilder(); return documentBuilder.newDocument(); }
/** * Returns a blank document. * * @return org.w3c.dom.Document object * @throws ParserConfigurationException throws when fail to build a new xml document */
Returns a blank document
getManifestDocument
{ "repo_name": "wso2/carbon-maven-plugins", "path": "carbon-feature-plugin/src/main/java/org/wso2/maven/p2/utils/P2Utils.java", "license": "apache-2.0", "size": 8805 }
[ "javax.xml.parsers.DocumentBuilder", "javax.xml.parsers.DocumentBuilderFactory", "javax.xml.parsers.ParserConfigurationException", "org.w3c.dom.Document" ]
import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import org.w3c.dom.Document;
import javax.xml.parsers.*; import org.w3c.dom.*;
[ "javax.xml", "org.w3c.dom" ]
javax.xml; org.w3c.dom;
1,820,970
@Inline private static void putfieldStoreBarrierHelper(Assembler asm, BaselineCompilerImpl compiler, GPR offset, int locationMetadata, NormalMethod barrier) { // on entry the java stack contains... |object|value| asm.emitPUSH_Reg(offset); asm.emitPUSH_Imm...
static void function(Assembler asm, BaselineCompilerImpl compiler, GPR offset, int locationMetadata, NormalMethod barrier) { asm.emitPUSH_Reg(offset); asm.emitPUSH_Imm(locationMetadata); MethodReference method = barrier.getMemberRef().asMethodReference(); compiler.genParameterRegisterLoad(method, false); genNullCheck(a...
/** * Private helper method for primitive putfields * * @param asm the assembler to generate the code in * @param compiler the compiler instance to ensure correct parameter passing * @param offset the register holding the offset of the field * @param locationMetadata meta-data about the location * ...
Private helper method for primitive putfields
putfieldStoreBarrierHelper
{ "repo_name": "CodeOffloading/JikesRVM-CCO", "path": "jikesrvm-3.1.3/rvm/src/org/jikesrvm/compilers/baseline/ia32/Barriers.java", "license": "epl-1.0", "size": 26452 }
[ "org.jikesrvm.ArchitectureSpecific", "org.jikesrvm.classloader.MethodReference", "org.jikesrvm.classloader.NormalMethod", "org.jikesrvm.runtime.Magic" ]
import org.jikesrvm.ArchitectureSpecific; import org.jikesrvm.classloader.MethodReference; import org.jikesrvm.classloader.NormalMethod; import org.jikesrvm.runtime.Magic;
import org.jikesrvm.*; import org.jikesrvm.classloader.*; import org.jikesrvm.runtime.*;
[ "org.jikesrvm", "org.jikesrvm.classloader", "org.jikesrvm.runtime" ]
org.jikesrvm; org.jikesrvm.classloader; org.jikesrvm.runtime;
418,599
public ModelDistribution<VectorWritable> createModelDistribution(Configuration conf) { ClassLoader ccl = Thread.currentThread().getContextClassLoader(); AbstractVectorModelDistribution modelDistribution; try { modelDistribution = ClassUtils.instantiateAs(modelFactory, AbstractVectorModelDistribution...
ModelDistribution<VectorWritable> function(Configuration conf) { ClassLoader ccl = Thread.currentThread().getContextClassLoader(); AbstractVectorModelDistribution modelDistribution; try { modelDistribution = ClassUtils.instantiateAs(modelFactory, AbstractVectorModelDistribution.class); Class<? extends Vector> vcl = ccl...
/** * Create an instance of AbstractVectorModelDistribution from the given command line arguments * * @param conf * the Configuration */
Create an instance of AbstractVectorModelDistribution from the given command line arguments
createModelDistribution
{ "repo_name": "genericDataCompany/hsandbox", "path": "common/mahout-distribution-0.7-hadoop1/core/src/main/java/org/apache/mahout/clustering/dirichlet/models/DistributionDescription.java", "license": "apache-2.0", "size": 4319 }
[ "java.lang.reflect.Constructor", "java.lang.reflect.InvocationTargetException", "org.apache.hadoop.conf.Configuration", "org.apache.mahout.clustering.ModelDistribution", "org.apache.mahout.common.ClassUtils", "org.apache.mahout.common.distance.DistanceMeasure", "org.apache.mahout.math.Vector", "org.ap...
import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import org.apache.hadoop.conf.Configuration; import org.apache.mahout.clustering.ModelDistribution; import org.apache.mahout.common.ClassUtils; import org.apache.mahout.common.distance.DistanceMeasure; import org.apache.mahout.mat...
import java.lang.reflect.*; import org.apache.hadoop.conf.*; import org.apache.mahout.clustering.*; import org.apache.mahout.common.*; import org.apache.mahout.common.distance.*; import org.apache.mahout.math.*;
[ "java.lang", "org.apache.hadoop", "org.apache.mahout" ]
java.lang; org.apache.hadoop; org.apache.mahout;
1,895,920
public void selectedToAvailable(Object value) { if (isSorted) { SortedListModel selectedModel = (SortedListModel) selectedList .getModel(); SortedListModel availableModel = (SortedListModel) availableList .getModel(); availableModel.addElement(value); selectedModel.removeElement(value); } ...
void function(Object value) { if (isSorted) { SortedListModel selectedModel = (SortedListModel) selectedList .getModel(); SortedListModel availableModel = (SortedListModel) availableList .getModel(); availableModel.addElement(value); selectedModel.removeElement(value); } else { DefaultListModel selectedModel = (Default...
/** * Puts the input value in the left list. * * @param value * Value. */
Puts the input value in the left list
selectedToAvailable
{ "repo_name": "sing-group/BEW", "path": "plugins_src/bew/es/uvigo/ei/sing/bew/view/panels/ListsPanel.java", "license": "gpl-3.0", "size": 8948 }
[ "es.uvigo.ei.sing.bew.tables.models.SortedListModel", "javax.swing.DefaultListModel" ]
import es.uvigo.ei.sing.bew.tables.models.SortedListModel; import javax.swing.DefaultListModel;
import es.uvigo.ei.sing.bew.tables.models.*; import javax.swing.*;
[ "es.uvigo.ei", "javax.swing" ]
es.uvigo.ei; javax.swing;
644,512
protected void doMkWorkspace(WebdavRequest request, WebdavResponse response, DavResource resource) throws DavException, IOException { if (resource.exists()) { AbstractWebdavServlet.log.warn("Cannot create a new workspace. Resource already exists."); r...
void function(WebdavRequest request, WebdavResponse response, DavResource resource) throws DavException, IOException { if (resource.exists()) { AbstractWebdavServlet.log.warn(STR); response.sendError(DavServletResponse.SC_FORBIDDEN); return; } DavResource parentResource = resource.getCollection(); if (parentResource ==...
/** * The MKWORKSPACE method * * @param request * @param response * @param resource * @throws DavException * @throws IOException */
The MKWORKSPACE method
doMkWorkspace
{ "repo_name": "SylvesterAbreu/jackrabbit", "path": "jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/server/AbstractWebdavServlet.java", "license": "apache-2.0", "size": 51686 }
[ "java.io.IOException", "org.apache.jackrabbit.webdav.DavException", "org.apache.jackrabbit.webdav.DavResource", "org.apache.jackrabbit.webdav.DavServletResponse", "org.apache.jackrabbit.webdav.WebdavRequest", "org.apache.jackrabbit.webdav.WebdavResponse", "org.apache.jackrabbit.webdav.version.DeltaVReso...
import java.io.IOException; import org.apache.jackrabbit.webdav.DavException; import org.apache.jackrabbit.webdav.DavResource; import org.apache.jackrabbit.webdav.DavServletResponse; import org.apache.jackrabbit.webdav.WebdavRequest; import org.apache.jackrabbit.webdav.WebdavResponse; import org.apache.jackrabbit.webda...
import java.io.*; import org.apache.jackrabbit.webdav.*; import org.apache.jackrabbit.webdav.version.*;
[ "java.io", "org.apache.jackrabbit" ]
java.io; org.apache.jackrabbit;
2,785,937
public static TransactionPoint findLastTransactionPoint(File rootPath) { File dir = new File(rootPath, ArecaFileConstants.TRANSACTION_FILE); if (! FileSystemManager.exists(dir)) { return null; } String[] transactionPoints = FileSystemManager.list(dir); if (transactionPoints != null) { Arrays...
static TransactionPoint function(File rootPath) { File dir = new File(rootPath, ArecaFileConstants.TRANSACTION_FILE); if (! FileSystemManager.exists(dir)) { return null; } String[] transactionPoints = FileSystemManager.list(dir); if (transactionPoints != null) { Arrays.sort(transactionPoints, new FileNameComparator());...
/** * Find the last valid transaction point in the root directory */
Find the last valid transaction point in the root directory
findLastTransactionPoint
{ "repo_name": "wintonBy/areca-backup-release-mirror", "path": "src/com/application/areca/metadata/transaction/TransactionPoint.java", "license": "gpl-2.0", "size": 11787 }
[ "com.application.areca.ArecaFileConstants", "java.io.File", "java.util.Arrays" ]
import com.application.areca.ArecaFileConstants; import java.io.File; import java.util.Arrays;
import com.application.areca.*; import java.io.*; import java.util.*;
[ "com.application.areca", "java.io", "java.util" ]
com.application.areca; java.io; java.util;
1,620,248
private Integer getPivotRow(SimplexTableau tableau, final int col) { // create a list of all the rows that tie for the lowest score in the minimum ratio test List<Integer> minRatioPositions = new ArrayList<Integer>(); double minRatio = Double.MAX_VALUE; for (int i = tableau.getNumObj...
Integer function(SimplexTableau tableau, final int col) { List<Integer> minRatioPositions = new ArrayList<Integer>(); double minRatio = Double.MAX_VALUE; for (int i = tableau.getNumObjectiveFunctions(); i < tableau.getHeight(); i++) { final double rhs = tableau.getEntry(i, tableau.getWidth() - 1); final double entry = ...
/** * Returns the row with the minimum ratio as given by the minimum ratio test (MRT). * * @param tableau Simple tableau for the problem. * @param col Column to test the ratio of (see {@link #getPivotColumn(SimplexTableau)}). * @return the row with the minimum ratio. */
Returns the row with the minimum ratio as given by the minimum ratio test (MRT)
getPivotRow
{ "repo_name": "charles-cooper/idylfin", "path": "src/org/apache/commons/math3/optim/linear/SimplexSolver.java", "license": "apache-2.0", "size": 9909 }
[ "java.util.ArrayList", "java.util.List", "org.apache.commons.math3.util.Precision" ]
import java.util.ArrayList; import java.util.List; import org.apache.commons.math3.util.Precision;
import java.util.*; import org.apache.commons.math3.util.*;
[ "java.util", "org.apache.commons" ]
java.util; org.apache.commons;
2,755,325
static void compileArrayStoreBarrierInt(Assembler asm, BaselineCompilerImpl compiler) { arayStoreBarrierHelper(asm, compiler, Entrypoints.intArrayWriteBarrierMethod); }
static void compileArrayStoreBarrierInt(Assembler asm, BaselineCompilerImpl compiler) { arayStoreBarrierHelper(asm, compiler, Entrypoints.intArrayWriteBarrierMethod); }
/** * Generate code to perform a iastore barrier. On entry the stack holds: * arrayRef, index, value. * * @param asm the assembler to generate the code in * @param compiler the compiler instance to ensure correct parameter passing */
Generate code to perform a iastore barrier. On entry the stack holds: arrayRef, index, value
compileArrayStoreBarrierInt
{ "repo_name": "CodeOffloading/JikesRVM-CCO", "path": "jikesrvm-3.1.3/rvm/src/org/jikesrvm/compilers/baseline/ia32/Barriers.java", "license": "epl-1.0", "size": 26452 }
[ "org.jikesrvm.ArchitectureSpecific", "org.jikesrvm.runtime.Entrypoints" ]
import org.jikesrvm.ArchitectureSpecific; import org.jikesrvm.runtime.Entrypoints;
import org.jikesrvm.*; import org.jikesrvm.runtime.*;
[ "org.jikesrvm", "org.jikesrvm.runtime" ]
org.jikesrvm; org.jikesrvm.runtime;
418,594
public ValueModel[] getRhoCorrelations() { return rhoCorrelations; }
ValueModel[] function() { return rhoCorrelations; }
/** * gets the <code>rhoCorrelations</code> of this <code>PbBlank</code>. * * @pre this <code>PbBlank</code> exists @post returns the * <code>rhoCorrelations</code> of this <code>PbBlank</code> * * @return <code>ValueModel[]</code> - this <code>PbBlank</code>'s * <code>rhoCorrelations...
gets the <code>rhoCorrelations</code> of this <code>PbBlank</code>
getRhoCorrelations
{ "repo_name": "bowring/ET_Redux", "path": "src/main/java/org/earthtime/UPb_Redux/pbBlanks/PbBlank.java", "license": "apache-2.0", "size": 21463 }
[ "org.earthtime.UPb_Redux" ]
import org.earthtime.UPb_Redux;
import org.earthtime.*;
[ "org.earthtime" ]
org.earthtime;
1,302,873
EReference getTupleExp_TuplePart();
EReference getTupleExp_TuplePart();
/** * Returns the meta object for the containment reference list '{@link anatlyzer.atlext.OCL.TupleExp#getTuplePart <em>Tuple Part</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the containment reference list '<em>Tuple Part</em>'. * @see anatlyzer.atlext.OCL.TupleExp#...
Returns the meta object for the containment reference list '<code>anatlyzer.atlext.OCL.TupleExp#getTuplePart Tuple Part</code>'.
getTupleExp_TuplePart
{ "repo_name": "jesusc/anatlyzer", "path": "plugins/anatlyzer.atl.typing/src-gen/anatlyzer/atlext/OCL/OCLPackage.java", "license": "epl-1.0", "size": 484377 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,621,557
@Test public void testGetToken_MissingRequiredParameter() throws Exception { TokenEndpoint tokenEndpoint = HereAccount.getTokenEndpoint( ApacheHttpClientProvider.builder().build(), new OAuth1ClientCredentialsProvider(url, accessKeyId, accessKeySecret)); ...
void function() throws Exception { TokenEndpoint tokenEndpoint = HereAccount.getTokenEndpoint( ApacheHttpClientProvider.builder().build(), new OAuth1ClientCredentialsProvider(url, accessKeyId, accessKeySecret)); AccessTokenRequest missingParameterRequest = new AccessTokenRequest(null) {
/** * Confirms MissingRequiredParameter => AccessTokenException whose * ErrorResponse object has error="invalid_request", so clients * could potentially write code against the RFC6749 using these * business objects. * * @throws Exception if an unexpected Exception is thrown by the test...
Confirms MissingRequiredParameter => AccessTokenException whose ErrorResponse object has error="invalid_request", so clients could potentially write code against the RFC6749 using these business objects
testGetToken_MissingRequiredParameter
{ "repo_name": "kenmccracken/here-aaa-java-sdk", "path": "here-oauth-client/src/test/java/com/here/account/oauth2/HereAccountTest.java", "license": "apache-2.0", "size": 15240 }
[ "com.here.account.auth.OAuth1ClientCredentialsProvider", "com.here.account.http.apache.ApacheHttpClientProvider" ]
import com.here.account.auth.OAuth1ClientCredentialsProvider; import com.here.account.http.apache.ApacheHttpClientProvider;
import com.here.account.auth.*; import com.here.account.http.apache.*;
[ "com.here.account" ]
com.here.account;
1,512,105
public void replaceHeader(String name, byte[] value) { if (name.length() > 255) { throw new IllegalArgumentException("name may not exceed 255 bytes in length."); } if (value.length > 65535) { throw new IllegalArgumentException("value may not exceed 65535 bytes in len...
void function(String name, byte[] value) { if (name.length() > 255) { throw new IllegalArgumentException(STR); } if (value.length > 65535) { throw new IllegalArgumentException(STR); } Logging.logCheckedFiner(LOG, STR, name, "(", name.length(), STR, value.length, STR); Header newHeader = new Header(name, value); ListIte...
/** * Replace a header. Replaces all existing headers with the same name. * * @param name The header name. The UTF-8 encoded representation of this * name may not be longer than 255 bytes. * @param value The value for the header. May not exceed 65535 bytes in * length. */
Replace a header. Replaces all existing headers with the same name
replaceHeader
{ "repo_name": "johnjianfang/jxse", "path": "src/main/java/net/jxta/impl/endpoint/msgframing/MessagePackageHeader.java", "license": "apache-2.0", "size": 18832 }
[ "java.util.ListIterator", "net.jxta.logging.Logging" ]
import java.util.ListIterator; import net.jxta.logging.Logging;
import java.util.*; import net.jxta.logging.*;
[ "java.util", "net.jxta.logging" ]
java.util; net.jxta.logging;
1,158,407
public void setDocumentService(DocumentService documentService) { this.documentService = documentService; }
void function(DocumentService documentService) { this.documentService = documentService; }
/** * Sets the documentService attribute value. * @param documentService The documentService to set. */
Sets the documentService attribute value
setDocumentService
{ "repo_name": "jwillia/kc-old1", "path": "coeus-impl/src/main/java/org/kuali/coeus/propdev/impl/budget/ProposalBudgetServiceImpl.java", "license": "agpl-3.0", "size": 15456 }
[ "org.kuali.rice.krad.service.DocumentService" ]
import org.kuali.rice.krad.service.DocumentService;
import org.kuali.rice.krad.service.*;
[ "org.kuali.rice" ]
org.kuali.rice;
14,140
@Test public void testSLLocalEnvEntry_Character_InvalidValue() throws Exception { SLLa ejb1 = fhome1.create(); try { // The test case looks for a environment variable named "envCharacterBlankValue". Character tempCharacter = ejb1.getCharacterEnvVar("envCharacterBlankValue...
void function() throws Exception { SLLa ejb1 = fhome1.create(); try { Character tempCharacter = ejb1.getCharacterEnvVar(STR); fail(STR + tempCharacter); } catch (NamingException ne) { svLogger.info(STR + ne.getClass().getName()); } Character tempCharacter = ejb1.getCharacterEnvVar(STR); assertEquals(STR, tempCharacter....
/** * (ive21) Test an env-entry of type Character with an invalid value. */
(ive21) Test an env-entry of type Character with an invalid value
testSLLocalEnvEntry_Character_InvalidValue
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.ws.ejbcontainer.legacy_fat/test-applications/EJB2XLocalSpecWeb.war/src/com/ibm/ejb2x/base/spec/sll/web/SLLocalImplEnvEntryServlet.java", "license": "epl-1.0", "size": 40905 }
[ "com.ibm.ejb2x.base.spec.sll.ejb.SLLa", "javax.naming.NamingException", "org.junit.Assert" ]
import com.ibm.ejb2x.base.spec.sll.ejb.SLLa; import javax.naming.NamingException; import org.junit.Assert;
import com.ibm.ejb2x.base.spec.sll.ejb.*; import javax.naming.*; import org.junit.*;
[ "com.ibm.ejb2x", "javax.naming", "org.junit" ]
com.ibm.ejb2x; javax.naming; org.junit;
2,433,410
@Override public void onActivityResult(int requestCode, int resultCode, Intent data) { if (resultCode == Activity.RESULT_OK) { // Fill the list view with the strings the recognizer thought it could have heard ArrayList<String> matches = data.getStringArrayListExtra(RecognizerInte...
void function(int requestCode, int resultCode, Intent data) { if (resultCode == Activity.RESULT_OK) { ArrayList<String> matches = data.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS); returnSpeechResults(matches); } else { this.callbackContext.error(Integer.toString(resultCode)); } super.onActivityResult(reques...
/** * Handle the results from the recognition activity. */
Handle the results from the recognition activity
onActivityResult
{ "repo_name": "ozkanpala/VoiceRecognizer", "path": "VoiceRecognizer.java", "license": "mit", "size": 5504 }
[ "android.app.Activity", "android.content.Intent", "android.speech.RecognizerIntent", "java.util.ArrayList" ]
import android.app.Activity; import android.content.Intent; import android.speech.RecognizerIntent; import java.util.ArrayList;
import android.app.*; import android.content.*; import android.speech.*; import java.util.*;
[ "android.app", "android.content", "android.speech", "java.util" ]
android.app; android.content; android.speech; java.util;
34,823
@Path("{clusterName}/alert_groups") public AlertGroupService getAlertGroups( @Context javax.ws.rs.core.Request request, @PathParam("clusterName") String clusterName) { hasPermission(Request.Type.valueOf(request.getMethod()), clusterName); return new AlertGroupService(clusterName); }
@Path(STR) AlertGroupService function( @Context javax.ws.rs.core.Request request, @PathParam(STR) String clusterName) { hasPermission(Request.Type.valueOf(request.getMethod()), clusterName); return new AlertGroupService(clusterName); }
/** * Gets the alert group service. * * @param request * the request. * @param clusterName * the cluster name. * @return the alert group service. */
Gets the alert group service
getAlertGroups
{ "repo_name": "zouzhberk/ambaridemo", "path": "demo-server/src/main/java/org/apache/ambari/server/api/services/ClusterService.java", "license": "apache-2.0", "size": 23921 }
[ "javax.ws.rs.Path", "javax.ws.rs.PathParam", "javax.ws.rs.core.Context" ]
import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.core.Context;
import javax.ws.rs.*; import javax.ws.rs.core.*;
[ "javax.ws" ]
javax.ws;
2,841,100
protected void printError(String type, SAXParseException ex) { StringBuffer sb = new StringBuffer("[" + type + "] "); String systemId = ex.getSystemId(); if (systemId != null) { int index = systemId.lastIndexOf('/'); if (index != -1) { systemId = s...
void function(String type, SAXParseException ex) { StringBuffer sb = new StringBuffer("[" + type + STR); String systemId = ex.getSystemId(); if (systemId != null) { int index = systemId.lastIndexOf('/'); if (index != -1) { systemId = systemId.substring(index + 1); } sb.append(systemId); } sb.append(':').append(ex.getLi...
/** * Prints the error message. * * @param type * @param ex */
Prints the error message
printError
{ "repo_name": "green-vulcano/gv-engine", "path": "gvengine/gvbase/src/main/java/it/greenvulcano/util/xml/ErrHandler.java", "license": "lgpl-3.0", "size": 2765 }
[ "org.xml.sax.SAXParseException" ]
import org.xml.sax.SAXParseException;
import org.xml.sax.*;
[ "org.xml.sax" ]
org.xml.sax;
1,463,218
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) { if (cmd.getName().equalsIgnoreCase("drivebackup")) { if (args.length > 0) { switch (args[0].toLowerCase()) { case "v": version(sender); ...
boolean function(CommandSender sender, Command cmd, String label, String[] args) { if (cmd.getName().equalsIgnoreCase(STR)) { if (args.length > 0) { switch (args[0].toLowerCase()) { case "v": version(sender); break; case STR: if (hasPerm(sender, STR)) { reloadConfig(sender); } break; case STR: if (hasPerm(sender, STR))...
/** * Command executor * * @param sender Player who sent command * @param cmd Command that was sent * @param label Command alias that was used * @param args Arguments that followed command * @return true if successful */
Command executor
onCommand
{ "repo_name": "Ratismal/DriveBackup", "path": "src/main/java/ratismal/drivebackup/handler/CommandHandler.java", "license": "mit", "size": 4767 }
[ "org.bukkit.command.Command", "org.bukkit.command.CommandSender" ]
import org.bukkit.command.Command; import org.bukkit.command.CommandSender;
import org.bukkit.command.*;
[ "org.bukkit.command" ]
org.bukkit.command;
1,729,201
private UserAndGroupUpdates getUserAndGroupUpdates(Serializable value, Collection<? extends IdentityLink> links) { Collection<NodeRef> actors = getNodes(value); List<String> users = new ArrayList<String>(); List<String> groups = new ArrayList<String>(); for (NodeRef actor ...
UserAndGroupUpdates function(Serializable value, Collection<? extends IdentityLink> links) { Collection<NodeRef> actors = getNodes(value); List<String> users = new ArrayList<String>(); List<String> groups = new ArrayList<String>(); for (NodeRef actor : actors) { String authorityName = authorityManager.getAuthorityName(...
/** * Returns a DTO containing the users and groups to add and the links to remove. * * @param value Serializable * @param links Collection<? extends IdentityLink> * @return UserAndGroupUpdates */
Returns a DTO containing the users and groups to add and the links to remove
getUserAndGroupUpdates
{ "repo_name": "Alfresco/alfresco-repository", "path": "src/main/java/org/alfresco/repo/workflow/activiti/properties/ActivitiPooledActorsPropertyHandler.java", "license": "lgpl-3.0", "size": 8787 }
[ "java.io.Serializable", "java.util.ArrayList", "java.util.Collection", "java.util.LinkedList", "java.util.List", "org.activiti.engine.task.IdentityLink", "org.activiti.engine.task.IdentityLinkType", "org.alfresco.service.cmr.repository.NodeRef" ]
import java.io.Serializable; import java.util.ArrayList; import java.util.Collection; import java.util.LinkedList; import java.util.List; import org.activiti.engine.task.IdentityLink; import org.activiti.engine.task.IdentityLinkType; import org.alfresco.service.cmr.repository.NodeRef;
import java.io.*; import java.util.*; import org.activiti.engine.task.*; import org.alfresco.service.cmr.repository.*;
[ "java.io", "java.util", "org.activiti.engine", "org.alfresco.service" ]
java.io; java.util; org.activiti.engine; org.alfresco.service;
1,754,000
public double getSpeedRpm() { return 60/_counter.getPeriod(); } ITable _table;
double function() { return 60/_counter.getPeriod(); } ITable _table;
/** * Gets the speed in RPM * @return the speed... in RPM */
Gets the speed in RPM
getSpeedRpm
{ "repo_name": "FRCTeam3737/CompetitionCode2013", "path": "src/org/usfirst/Rotoraptors/utilities/hardware/OpticalTachometer.java", "license": "bsd-3-clause", "size": 2717 }
[ "edu.wpi.first.wpilibj.tables.ITable" ]
import edu.wpi.first.wpilibj.tables.ITable;
import edu.wpi.first.wpilibj.tables.*;
[ "edu.wpi.first" ]
edu.wpi.first;
1,170,687
public boolean isTooLong() { return this.length() > Utilities.MAX_PAYLOAD_LENGTH; }
boolean function() { return this.length() > Utilities.MAX_PAYLOAD_LENGTH; }
/** * Returns true if the payload built so far is larger than * the size permitted by Apple (which is 256 bytes). * * @return true if the result payload is too long */
Returns true if the payload built so far is larger than the size permitted by Apple (which is 256 bytes)
isTooLong
{ "repo_name": "SinnerSchraderMobileMirrors/java-apns", "path": "src/main/java/com/notnoop/apns/PayloadBuilder.java", "license": "bsd-3-clause", "size": 13478 }
[ "com.notnoop.apns.internal.Utilities" ]
import com.notnoop.apns.internal.Utilities;
import com.notnoop.apns.internal.*;
[ "com.notnoop.apns" ]
com.notnoop.apns;
2,298,322
@SuppressWarnings("unchecked") public List<AbstractMetaItem<?>> fetchMetaItems(Class clazz) throws NoConnectionException, ClientCertificateInvalidException { return fetchMetaItems(clazz, RestManager.DEFAULT_RETRY_COUNT); }
@SuppressWarnings(STR) List<AbstractMetaItem<?>> function(Class clazz) throws NoConnectionException, ClientCertificateInvalidException { return fetchMetaItems(clazz, RestManager.DEFAULT_RETRY_COUNT); }
/** * Tries to fetch the up-to-createDate meta-data information from the server. Defaults to 3 * retries. * * @param clazz the Class of the meta-data to be fetched. Must be specified within the * treeCaches Map. * @return the fetched List of meta-data items or <b>null</b> if t...
Tries to fetch the up-to-createDate meta-data information from the server. Defaults to 3 retries
fetchMetaItems
{ "repo_name": "OlyNet/olydorfapp", "path": "app/src/main/java/eu/olynet/olydorfapp/resource/RestManager.java", "license": "gpl-3.0", "size": 12074 }
[ "eu.olynet.olydorfapp.model.AbstractMetaItem", "java.util.List" ]
import eu.olynet.olydorfapp.model.AbstractMetaItem; import java.util.List;
import eu.olynet.olydorfapp.model.*; import java.util.*;
[ "eu.olynet.olydorfapp", "java.util" ]
eu.olynet.olydorfapp; java.util;
2,256,548
boolean canAddToWatchList(@NonNull Geocache cache);
boolean canAddToWatchList(@NonNull Geocache cache);
/** * Restrict the caches or circumstances when to add a cache to the watchlist. */
Restrict the caches or circumstances when to add a cache to the watchlist
canAddToWatchList
{ "repo_name": "Bananeweizen/cgeo", "path": "main/src/cgeo/geocaching/connector/capability/WatchListCapability.java", "license": "apache-2.0", "size": 862 }
[ "android.support.annotation.NonNull" ]
import android.support.annotation.NonNull;
import android.support.annotation.*;
[ "android.support" ]
android.support;
799,682
public SAML2HandlerResponse process(String samlResponse, HTTPContext httpContext, Set<SAML2Handler> handlers, Lock chainLock) throws ProcessingException, IOException, ParsingException, ConfigurationException { SAML2Response saml2Response = new SAML2Response(); SAMLDocumentHolder documentHolde...
SAML2HandlerResponse function(String samlResponse, HTTPContext httpContext, Set<SAML2Handler> handlers, Lock chainLock) throws ProcessingException, IOException, ParsingException, ConfigurationException { SAML2Response saml2Response = new SAML2Response(); SAMLDocumentHolder documentHolder = null; SAML2Object samlObject ...
/** * Process the message * @param samlResponse * @param httpContext * @param handlers * @param chainLock a lock that needs to be used to process the chain of handlers * @return * @throws ProcessingException * @throws IOException * @throws ParsingException * @throws Configuration...
Process the message
process
{ "repo_name": "taylor-project/taylor-picketlink-2.0.3", "path": "federation/picketlink-web/src/main/java/org/picketlink/identity/federation/web/process/ServiceProviderSAMLResponseProcessor.java", "license": "gpl-2.0", "size": 8986 }
[ "java.io.IOException", "java.io.InputStream", "java.security.PublicKey", "java.util.HashMap", "java.util.Map", "java.util.Set", "java.util.concurrent.locks.Lock", "org.picketlink.identity.federation.api.saml.v2.response.SAML2Response", "org.picketlink.identity.federation.core.ErrorCodes", "org.pic...
import java.io.IOException; import java.io.InputStream; import java.security.PublicKey; import java.util.HashMap; import java.util.Map; import java.util.Set; import java.util.concurrent.locks.Lock; import org.picketlink.identity.federation.api.saml.v2.response.SAML2Response; import org.picketlink.identity.federation.co...
import java.io.*; import java.security.*; import java.util.*; import java.util.concurrent.locks.*; import org.picketlink.identity.federation.api.saml.v2.response.*; import org.picketlink.identity.federation.core.*; import org.picketlink.identity.federation.core.exceptions.*; import org.picketlink.identity.federation.co...
[ "java.io", "java.security", "java.util", "org.picketlink.identity" ]
java.io; java.security; java.util; org.picketlink.identity;
232,085
public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof TimePeriodValues)) { return false; } if (!super.equals(obj)) { return false; } TimePeriodValues that = (TimePeriodValues) o...
boolean function(Object obj) { if (obj == this) { return true; } if (!(obj instanceof TimePeriodValues)) { return false; } if (!super.equals(obj)) { return false; } TimePeriodValues that = (TimePeriodValues) obj; if (!ObjectUtilities.equal(this.getDomainDescription(), that.getDomainDescription())) { return false; } if ...
/** * Tests the series for equality with another object. * * @param obj the object (<code>null</code> permitted). * * @return <code>true</code> or <code>false</code>. */
Tests the series for equality with another object
equals
{ "repo_name": "ilyessou/jfreechart", "path": "source/org/jfree/data/time/TimePeriodValues.java", "license": "lgpl-2.1", "size": 18651 }
[ "org.jfree.chart.util.ObjectUtilities" ]
import org.jfree.chart.util.ObjectUtilities;
import org.jfree.chart.util.*;
[ "org.jfree.chart" ]
org.jfree.chart;
109,334
protected static JMethod getter(FieldOutline fieldOutline) { final JDefinedClass theClass = fieldOutline.parent().implClass; final String publicName = fieldOutline.getPropertyInfo().getName(true); final JMethod getgetter = theClass.getMethod("get" + publicName, NONE); if (getgetter !...
static JMethod function(FieldOutline fieldOutline) { final JDefinedClass theClass = fieldOutline.parent().implClass; final String publicName = fieldOutline.getPropertyInfo().getName(true); final JMethod getgetter = theClass.getMethod("get" + publicName, NONE); if (getgetter != null) { return getgetter; } else { final J...
/** * Borrowed this code from jaxb-commons project * * @param fieldOutline reference to a field * @return Getter for the given field or null */
Borrowed this code from jaxb-commons project
getter
{ "repo_name": "borismarin/jaxb-visitor", "path": "src/main/java/com/massfords/jaxb/ClassDiscoverer.java", "license": "apache-2.0", "size": 8112 }
[ "com.sun.codemodel.JDefinedClass", "com.sun.codemodel.JMethod", "com.sun.tools.xjc.outline.FieldOutline" ]
import com.sun.codemodel.JDefinedClass; import com.sun.codemodel.JMethod; import com.sun.tools.xjc.outline.FieldOutline;
import com.sun.codemodel.*; import com.sun.tools.xjc.outline.*;
[ "com.sun.codemodel", "com.sun.tools" ]
com.sun.codemodel; com.sun.tools;
2,132,539
public void writeVLong(long i) throws IOException { assert i >= 0; while ((i & ~0x7F) != 0) { writeByte((byte) ((i & 0x7f) | 0x80)); i >>>= 7; } writeByte((byte) i); }
void function(long i) throws IOException { assert i >= 0; while ((i & ~0x7F) != 0) { writeByte((byte) ((i & 0x7f) 0x80)); i >>>= 7; } writeByte((byte) i); }
/** * Writes an long in a variable-length format. Writes between one and nine * bytes. Smaller values take fewer bytes. Negative numbers are not * supported. */
Writes an long in a variable-length format. Writes between one and nine bytes. Smaller values take fewer bytes. Negative numbers are not supported
writeVLong
{ "repo_name": "iamjakob/elasticsearch", "path": "core/src/main/java/org/elasticsearch/common/io/stream/StreamOutput.java", "license": "apache-2.0", "size": 19083 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,353,409
private static class ToTable implements NamedJavaFunction { // -- Static methods @SuppressWarnings("unchecked") public static TypedJavaObject toTable(Map<?, ?> map) { return new LuaMap((Map<Object, Object>) map); }
static class ToTable implements NamedJavaFunction { @SuppressWarnings(STR) public static TypedJavaObject function(Map<?, ?> map) { return new LuaMap((Map<Object, Object>) map); }
/** * Returns a table-like Lua value for the specified map. */
Returns a table-like Lua value for the specified map
toTable
{ "repo_name": "buksy/jnlua", "path": "src/main/java/com/naef/jnlua/JavaModule.java", "license": "mit", "size": 19835 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,875,172
if (e.equals(Operator.NOT_EQUAL)) { return Operator.EQUAL; } else if (e.equals(Operator.EQUAL)) { return Operator.NOT_EQUAL; } else if (e.equals(Operator.GREATER)) { return Operator.LESS_OR_EQUAL; } else if (e.equals(Operator.LESS)) { return Operator.GREATER_OR_EQUAL; } else if (e.equals(O...
if (e.equals(Operator.NOT_EQUAL)) { return Operator.EQUAL; } else if (e.equals(Operator.EQUAL)) { return Operator.NOT_EQUAL; } else if (e.equals(Operator.GREATER)) { return Operator.LESS_OR_EQUAL; } else if (e.equals(Operator.LESS)) { return Operator.GREATER_OR_EQUAL; } else if (e.equals(Operator.GREATER_OR_EQUAL)) { r...
/** * Takes the given operator e, and returns a reversed version of it. * * @return operator */
Takes the given operator e, and returns a reversed version of it
getReversedOperator
{ "repo_name": "bobmcwhirter/drools", "path": "drools-verifier/src/main/java/org/drools/verifier/report/components/MissingRange.java", "license": "apache-2.0", "size": 1565 }
[ "org.drools.base.evaluators.Operator" ]
import org.drools.base.evaluators.Operator;
import org.drools.base.evaluators.*;
[ "org.drools.base" ]
org.drools.base;
2,653,514
public void disconnect() { if (transport != null) { try { transport.disconnect(this); } catch (IOException ignored) { } } }
void function() { if (transport != null) { try { transport.disconnect(this); } catch (IOException ignored) { } } }
/** * Immediately closes the socket connection if it's currently held by this * engine. Use this to interrupt an in-flight request from any thread. It's * the caller's responsibility to close the request body and response body * streams; otherwise resources may be leaked. */
Immediately closes the socket connection if it's currently held by this engine. Use this to interrupt an in-flight request from any thread. It's the caller's responsibility to close the request body and response body streams; otherwise resources may be leaked
disconnect
{ "repo_name": "rohanpatel2602/okhttp", "path": "okhttp/src/main/java/com/squareup/okhttp/internal/http/HttpEngine.java", "license": "apache-2.0", "size": 33629 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,189,668
public List<Note> getRandomNoteset(HashMap<Integer, List<Note>> notesets) { List<Note> notes = new LinkedList<Note>(); // get random noteset Random random = new Random(); List<Integer> keys = new ArrayList<Integer>(notesets.keySet()); Integer randomKey = keys.get(random.next...
List<Note> function(HashMap<Integer, List<Note>> notesets) { List<Note> notes = new LinkedList<Note>(); Random random = new Random(); List<Integer> keys = new ArrayList<Integer>(notesets.keySet()); Integer randomKey = keys.get(random.nextInt(keys.size())); notes = notesets.get(randomKey); return notes; }
/** * Get a random noteset from a HashMap of notesets. * * @param notesets HashMap of notesets from which to choose. * @return List of notes related to chosen noteset. */
Get a random noteset from a HashMap of notesets
getRandomNoteset
{ "repo_name": "datanets/kanjoto", "path": "kanjoto-android/src/summea/kanjoto/activity/GenerateMusicActivity.java", "license": "mit", "size": 41696 }
[ "java.util.ArrayList", "java.util.HashMap", "java.util.LinkedList", "java.util.List", "java.util.Random" ]
import java.util.ArrayList; import java.util.HashMap; import java.util.LinkedList; import java.util.List; import java.util.Random;
import java.util.*;
[ "java.util" ]
java.util;
253,583
protected void spawnCompanion(Player player, Location location) { // Older versions of the server require custom names to only apply to Living Entities //Bukkit.getLogger().info("DEBUG: spawning compantion at " + location); if (!islandCompanion.isEmpty() && location != null) { Ra...
void function(Player player, Location location) { if (!islandCompanion.isEmpty() && location != null) { Random rand = new Random(); int randomNum = rand.nextInt(islandCompanion.size()); EntityType type = islandCompanion.get(randomNum); if (type != null) { LivingEntity companion = (LivingEntity) location.getWorld().spaw...
/** * Spawns a random companion for the player with a random name at the location given * @param player * @param location */
Spawns a random companion for the player with a random name at the location given
spawnCompanion
{ "repo_name": "tastybento/acidisland", "path": "src/com/wasteofplastic/acidisland/schematics/Schematic.java", "license": "gpl-2.0", "size": 81150 }
[ "java.util.Random", "org.bukkit.Location", "org.bukkit.entity.EntityType", "org.bukkit.entity.LivingEntity", "org.bukkit.entity.Player" ]
import java.util.Random; import org.bukkit.Location; import org.bukkit.entity.EntityType; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Player;
import java.util.*; import org.bukkit.*; import org.bukkit.entity.*;
[ "java.util", "org.bukkit", "org.bukkit.entity" ]
java.util; org.bukkit; org.bukkit.entity;
872,207
Set<Entity> commit(CommitContext context);
Set<Entity> commit(CommitContext context);
/** * Commits a collection of new or detached entity instances to the storage. * @return set of committed instances */
Commits a collection of new or detached entity instances to the storage
commit
{ "repo_name": "cuba-platform/cuba", "path": "modules/core/src/com/haulmont/cuba/core/app/DataStore.java", "license": "apache-2.0", "size": 2317 }
[ "com.haulmont.cuba.core.entity.Entity", "com.haulmont.cuba.core.global.CommitContext", "java.util.Set" ]
import com.haulmont.cuba.core.entity.Entity; import com.haulmont.cuba.core.global.CommitContext; import java.util.Set;
import com.haulmont.cuba.core.entity.*; import com.haulmont.cuba.core.global.*; import java.util.*;
[ "com.haulmont.cuba", "java.util" ]
com.haulmont.cuba; java.util;
2,029,461
public List<ProjectInnovationContributingOrganization> findAll();
List<ProjectInnovationContributingOrganization> function();
/** * This method gets a list of projectInnovationContributingOrganization that are active * * @return a list from ProjectInnovationContributingOrganization null if no exist records */
This method gets a list of projectInnovationContributingOrganization that are active
findAll
{ "repo_name": "CCAFS/MARLO", "path": "marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/ProjectInnovationContributingOrganizationManager.java", "license": "gpl-3.0", "size": 4153 }
[ "java.util.List", "org.cgiar.ccafs.marlo.data.model.ProjectInnovationContributingOrganization" ]
import java.util.List; import org.cgiar.ccafs.marlo.data.model.ProjectInnovationContributingOrganization;
import java.util.*; import org.cgiar.ccafs.marlo.data.model.*;
[ "java.util", "org.cgiar.ccafs" ]
java.util; org.cgiar.ccafs;
2,648,051
//@Test public void testTridentReach() { System.out.println("\n\n\n!!!!!!!!!!!!!!Begin !!!!!!!!!!!!!!\n\n\n" + Thread.currentThread().getStackTrace()[1].getMethodName()); TridentReach.test(); System.out.println("\n\n\n!!!!!!!!!!!!!!End !!!!!!!!!!!!!!\n\n\n" ...
System.out.println(STR + Thread.currentThread().getStackTrace()[1].getMethodName()); TridentReach.test(); System.out.println(STR + Thread.currentThread().getStackTrace()[1].getMethodName()); }
/** * replaced by unit test. */
replaced by unit test
testTridentReach
{ "repo_name": "alibaba/jstorm", "path": "example/sequence-split-merge/src/test/java/org/apache/storm/starter/TestTrident.java", "license": "apache-2.0", "size": 4198 }
[ "org.apache.storm.starter.trident.TridentReach" ]
import org.apache.storm.starter.trident.TridentReach;
import org.apache.storm.starter.trident.*;
[ "org.apache.storm" ]
org.apache.storm;
825,721
private static void deleteTestDatabase(URL dbUrl, String dbPath) { if( dbUrl != null ) { new File(dbUrl.getPath()).delete(); } new File(dbPath + ".h2.db").delete(); }
static void function(URL dbUrl, String dbPath) { if( dbUrl != null ) { new File(dbUrl.getPath()).delete(); } new File(dbPath + STR).delete(); }
/** * This method deletes the test database file. * @param dbUrl * @param dbPath */
This method deletes the test database file
deleteTestDatabase
{ "repo_name": "mrietveld/gimcrack", "path": "gimcrack-marshalling/src/main/java/org/gimcrack/marshalling/MarshallingDBUtil.java", "license": "apache-2.0", "size": 7885 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
394,209
@Test public void testFindAllTables() { // given Long tableNumber = 101L; TableEto table = this.tablemanagement.findTable(tableNumber); // when List<TableEto> allTables = this.tablemanagement.findAllTables(); // then assertThat(allTables).isNotNull(); assertThat(allTables).isNotEm...
void function() { Long tableNumber = 101L; TableEto table = this.tablemanagement.findTable(tableNumber); List<TableEto> allTables = this.tablemanagement.findAllTables(); assertThat(allTables).isNotNull(); assertThat(allTables).isNotEmpty(); assertThat(allTables).hasOnlyElementsOfType(TableEto.class); assertThat(allTabl...
/** * This test method finds all tables currently in the database and checks if a specific one is in the retrieved list. */
This test method finds all tables currently in the database and checks if a specific one is in the retrieved list
testFindAllTables
{ "repo_name": "elyamad/oasp4j", "path": "samples/core/src/test/java/io/oasp/gastronomy/restaurant/tablemanagement/logic/impl/TablemanagementTest.java", "license": "apache-2.0", "size": 7378 }
[ "io.oasp.gastronomy.restaurant.tablemanagement.logic.api.to.TableEto", "java.util.List" ]
import io.oasp.gastronomy.restaurant.tablemanagement.logic.api.to.TableEto; import java.util.List;
import io.oasp.gastronomy.restaurant.tablemanagement.logic.api.to.*; import java.util.*;
[ "io.oasp.gastronomy", "java.util" ]
io.oasp.gastronomy; java.util;
1,122,551
private void defineStacktraceConfig(ServletContext sc) { String stacktrace = sc.getInitParameter(Constants.Options.STACKTRACE_LENGTH); if (stacktrace == null) { stacktrace = DEFAULTSTACKTRACE; } else { logger.debug("Read '{}' option in web.xml : '{}'.", Constants.Options.STACKTRACE_LENGTH, stacktrac...
void function(ServletContext sc) { String stacktrace = sc.getInitParameter(Constants.Options.STACKTRACE_LENGTH); if (stacktrace == null) { stacktrace = DEFAULTSTACKTRACE; } else { logger.debug(STR, Constants.Options.STACKTRACE_LENGTH, stacktrace); } int stacktracelenght = Integer.parseInt(stacktrace); logger.debug(STR,...
/** * Read in web.xml the optional STACKTRACE_LENGTH config and set it in OcelotConfiguration * @param sc */
Read in web.xml the optional STACKTRACE_LENGTH config and set it in OcelotConfiguration
defineStacktraceConfig
{ "repo_name": "antoinesd/ocelot", "path": "ocelot-web/src/main/java/org/ocelotds/web/ContextListener.java", "license": "mpl-2.0", "size": 7435 }
[ "javax.servlet.ServletContext", "org.ocelotds.Constants" ]
import javax.servlet.ServletContext; import org.ocelotds.Constants;
import javax.servlet.*; import org.ocelotds.*;
[ "javax.servlet", "org.ocelotds" ]
javax.servlet; org.ocelotds;
1,846,920
void deleteAll(Collection<TModel> models, DatabaseWrapper databaseWrapper);
void deleteAll(Collection<TModel> models, DatabaseWrapper databaseWrapper);
/** * Updates a {@link Collection} of models in the DB. * * @param models The {@link Collection} of models to save. * @param databaseWrapper The manually specified wrapper */
Updates a <code>Collection</code> of models in the DB
deleteAll
{ "repo_name": "mickele/DBFlow", "path": "dbflow/src/main/java/com/raizlabs/android/dbflow/structure/InternalAdapter.java", "license": "mit", "size": 6525 }
[ "com.raizlabs.android.dbflow.structure.database.DatabaseWrapper", "java.util.Collection" ]
import com.raizlabs.android.dbflow.structure.database.DatabaseWrapper; import java.util.Collection;
import com.raizlabs.android.dbflow.structure.database.*; import java.util.*;
[ "com.raizlabs.android", "java.util" ]
com.raizlabs.android; java.util;
760,958
@Override public void renderImage( @Nonnull final RenderImage image, final int x, final int y, final int width, final int height, @Nonnull final Color color, final float scale) { log.fine("renderImage()"); final GL2 gl = GLContext.getCurrentGL().getGL2(); if (!currentTexturing) { gl.gl...
void function( @Nonnull final RenderImage image, final int x, final int y, final int width, final int height, @Nonnull final Color color, final float scale) { log.fine(STR); final GL2 gl = GLContext.getCurrentGL().getGL2(); if (!currentTexturing) { gl.glEnable(GL.GL_TEXTURE_2D); currentTexturing = true; } gl.glPushMatr...
/** * Render the image using the given Box to specify the render attributes. * * @param x x * @param y y * @param width width * @param height height * @param color color * @param scale scale */
Render the image using the given Box to specify the render attributes
renderImage
{ "repo_name": "atomixnmc/nifty-gui", "path": "nifty-renderer-jogl/src/main/java/de/lessvoid/nifty/renderer/jogl/render/JoglRenderDevice.java", "license": "bsd-2-clause", "size": 14378 }
[ "com.jogamp.opengl.GLContext", "de.lessvoid.nifty.spi.render.RenderImage", "de.lessvoid.nifty.tools.Color", "javax.annotation.Nonnull" ]
import com.jogamp.opengl.GLContext; import de.lessvoid.nifty.spi.render.RenderImage; import de.lessvoid.nifty.tools.Color; import javax.annotation.Nonnull;
import com.jogamp.opengl.*; import de.lessvoid.nifty.spi.render.*; import de.lessvoid.nifty.tools.*; import javax.annotation.*;
[ "com.jogamp.opengl", "de.lessvoid.nifty", "javax.annotation" ]
com.jogamp.opengl; de.lessvoid.nifty; javax.annotation;
1,401,661
public static void setVersion(FileSystem fs, Path rootdir) throws IOException { setVersion(fs, rootdir, HConstants.FILE_SYSTEM_VERSION, 0, HConstants.DEFAULT_VERSION_FILE_WRITE_ATTEMPTS); }
static void function(FileSystem fs, Path rootdir) throws IOException { setVersion(fs, rootdir, HConstants.FILE_SYSTEM_VERSION, 0, HConstants.DEFAULT_VERSION_FILE_WRITE_ATTEMPTS); }
/** * Sets version of file system * * @param fs filesystem object * @param rootdir hbase root * @throws IOException e */
Sets version of file system
setVersion
{ "repo_name": "baishuo/hbase-1.0.0-cdh5.4.7_baishuo", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java", "license": "apache-2.0", "size": 71457 }
[ "java.io.IOException", "org.apache.hadoop.fs.FileSystem", "org.apache.hadoop.fs.Path", "org.apache.hadoop.hbase.HConstants" ]
import java.io.IOException; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.HConstants;
import java.io.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hbase.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
904,302
private String[] parseCompositeURL() { if (!urlParsed || urlReset) { try { if (URISupport.isCompositeURI(brokerURL)) { CompositeData compositeData = URISupport.parseComposite(brokerURL); URI[] compositeURIs = compositeData.getComponents(); if (compositeURIs.length > 1) { individualBroke...
String[] function() { if (!urlParsed urlReset) { try { if (URISupport.isCompositeURI(brokerURL)) { CompositeData compositeData = URISupport.parseComposite(brokerURL); URI[] compositeURIs = compositeData.getComponents(); if (compositeURIs.length > 1) { individualBrokerURLs = new String[compositeURIs.length]; for (int i=...
/** * Attempts to parse the set brokerURL into it's individual URL pieces. If the URL is not a * composite URL this method returns null. * @return the array of individual URLs as strings parsed from the current brokerURL. */
Attempts to parse the set brokerURL into it's individual URL pieces. If the URL is not a composite URL this method returns null
parseCompositeURL
{ "repo_name": "deleidos/digitaledge-platform", "path": "commons-core/src/main/java/com/deleidos/rtws/commons/net/jms/RoundRobinJMSConnectionFactory.java", "license": "apache-2.0", "size": 20449 }
[ "java.net.URISyntaxException", "org.apache.activemq.util.URISupport" ]
import java.net.URISyntaxException; import org.apache.activemq.util.URISupport;
import java.net.*; import org.apache.activemq.util.*;
[ "java.net", "org.apache.activemq" ]
java.net; org.apache.activemq;
960,774
private Set<ObjectId> readSyncRegistrationsFromPrefs() { Set<String> savedTypes = new InvalidationPreferences(this).getSavedSyncedTypes(); if (savedTypes == null) return Collections.emptySet(); return ModelTypeHelper.notificationTypesToObjectIds(savedTypes); }
Set<ObjectId> function() { Set<String> savedTypes = new InvalidationPreferences(this).getSavedSyncedTypes(); if (savedTypes == null) return Collections.emptySet(); return ModelTypeHelper.notificationTypesToObjectIds(savedTypes); }
/** * Reads the saved sync types from storage (if any) and returns a set containing the * corresponding object ids. */
Reads the saved sync types from storage (if any) and returns a set containing the corresponding object ids
readSyncRegistrationsFromPrefs
{ "repo_name": "CapOM/ChromiumGStreamerBackend", "path": "components/invalidation/impl/android/java/src/org/chromium/components/invalidation/InvalidationClientService.java", "license": "bsd-3-clause", "size": 20842 }
[ "com.google.ipc.invalidation.external.client.types.ObjectId", "java.util.Collections", "java.util.Set", "org.chromium.sync.ModelTypeHelper", "org.chromium.sync.notifier.InvalidationPreferences" ]
import com.google.ipc.invalidation.external.client.types.ObjectId; import java.util.Collections; import java.util.Set; import org.chromium.sync.ModelTypeHelper; import org.chromium.sync.notifier.InvalidationPreferences;
import com.google.ipc.invalidation.external.client.types.*; import java.util.*; import org.chromium.sync.*; import org.chromium.sync.notifier.*;
[ "com.google.ipc", "java.util", "org.chromium.sync" ]
com.google.ipc; java.util; org.chromium.sync;
1,710,038
public static PlaceholderFragment newInstance(int sectionNumber) { PlaceholderFragment fragment = new PlaceholderFragment(); Bundle args = new Bundle(); args.putInt(ARG_SECTION_NUMBER, sectionNumber); fragment.setArguments(args); return fragment; ...
static PlaceholderFragment function(int sectionNumber) { PlaceholderFragment fragment = new PlaceholderFragment(); Bundle args = new Bundle(); args.putInt(ARG_SECTION_NUMBER, sectionNumber); fragment.setArguments(args); return fragment; } public PlaceholderFragment() { }
/** * Returns a new instance of this fragment for the given section * number. */
Returns a new instance of this fragment for the given section number
newInstance
{ "repo_name": "realtime-framework/realtime-news-android", "path": "app/src/main/java/co/realtime/realtimenews/HomeActivity.java", "license": "mit", "size": 16989 }
[ "android.os.Bundle" ]
import android.os.Bundle;
import android.os.*;
[ "android.os" ]
android.os;
2,380,303
@Auditable(parameters = {"sitePreset", "shortName"}) SiteInfo createSite(String sitePreset, String shortName, String title, String description, SiteVisibility visibility);
@Auditable(parameters = {STR, STR}) SiteInfo createSite(String sitePreset, String shortName, String title, String description, SiteVisibility visibility);
/** * Create a new site. * * @param sitePreset site preset name * @param shortName site short name, must be unique * @param title site title * @param description site description * @param visibility site visibility (public|moderated|private) * @return...
Create a new site
createSite
{ "repo_name": "Kast0rTr0y/community-edition", "path": "projects/repository/source/java/org/alfresco/service/cmr/site/SiteService.java", "license": "lgpl-3.0", "size": 23601 }
[ "org.alfresco.service.Auditable" ]
import org.alfresco.service.Auditable;
import org.alfresco.service.*;
[ "org.alfresco.service" ]
org.alfresco.service;
2,235,871
private static Set<DetailAST> getAllTokensWhichAreEqualToCurrent(DetailAST ast, DetailAST token, int endLineNumber) { DetailAST vertex = ast; final Set<DetailAST> result = Sets.newHashSet(); final Deque<DetailAST> stack = Q...
static Set<DetailAST> function(DetailAST ast, DetailAST token, int endLineNumber) { DetailAST vertex = ast; final Set<DetailAST> result = Sets.newHashSet(); final Deque<DetailAST> stack = Queues.newArrayDeque(); while (vertex != null !stack.isEmpty()) { if (!stack.isEmpty()) { vertex = stack.pop(); } while (vertex != n...
/** * Collects all tokens which are equal to current token starting with the current ast node and * which line number is lower or equal to the end line number. * @param ast ast node. * @param token token. * @param endLineNumber end line number. * @return a set of tokens which are equal to ...
Collects all tokens which are equal to current token starting with the current ast node and which line number is lower or equal to the end line number
getAllTokensWhichAreEqualToCurrent
{ "repo_name": "baratali/checkstyle", "path": "src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/RequireThisCheck.java", "license": "lgpl-2.1", "size": 48604 }
[ "com.google.common.collect.Queues", "com.google.common.collect.Sets", "com.puppycrawl.tools.checkstyle.api.DetailAST", "java.util.Deque", "java.util.Set" ]
import com.google.common.collect.Queues; import com.google.common.collect.Sets; import com.puppycrawl.tools.checkstyle.api.DetailAST; import java.util.Deque; import java.util.Set;
import com.google.common.collect.*; import com.puppycrawl.tools.checkstyle.api.*; import java.util.*;
[ "com.google.common", "com.puppycrawl.tools", "java.util" ]
com.google.common; com.puppycrawl.tools; java.util;
67,015