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 MiniDrawer withOnMiniDrawerItemLongClickListener(FastAdapter.OnLongClickListener<IDrawerItem> onMiniDrawerItemLongClickListener) { this.mOnMiniDrawerItemLongClickListener = onMiniDrawerItemLongClickListener; return this; }
MiniDrawer function(FastAdapter.OnLongClickListener<IDrawerItem> onMiniDrawerItemLongClickListener) { this.mOnMiniDrawerItemLongClickListener = onMiniDrawerItemLongClickListener; return this; }
/** * Define an onLongClickListener for the MiniDrawer item adapter * * @param onMiniDrawerItemLongClickListener * @return */
Define an onLongClickListener for the MiniDrawer item adapter
withOnMiniDrawerItemLongClickListener
{ "repo_name": "mychaelgo/MaterialDrawer", "path": "library/src/main/java/com/mikepenz/materialdrawer/MiniDrawer.java", "license": "apache-2.0", "size": 17642 }
[ "com.mikepenz.fastadapter.FastAdapter", "com.mikepenz.materialdrawer.model.interfaces.IDrawerItem" ]
import com.mikepenz.fastadapter.FastAdapter; import com.mikepenz.materialdrawer.model.interfaces.IDrawerItem;
import com.mikepenz.fastadapter.*; import com.mikepenz.materialdrawer.model.interfaces.*;
[ "com.mikepenz.fastadapter", "com.mikepenz.materialdrawer" ]
com.mikepenz.fastadapter; com.mikepenz.materialdrawer;
1,200,656
public NestedSet<Artifact> getRuntimeInputs() { return this.runtimeInputs; }
NestedSet<Artifact> function() { return this.runtimeInputs; }
/** * Returns runtime inputs for this link action. */
Returns runtime inputs for this link action
getRuntimeInputs
{ "repo_name": "Asana/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/cpp/CppLinkActionBuilder.java", "license": "apache-2.0", "size": 70730 }
[ "com.google.devtools.build.lib.actions.Artifact", "com.google.devtools.build.lib.collect.nestedset.NestedSet" ]
import com.google.devtools.build.lib.actions.Artifact; import com.google.devtools.build.lib.collect.nestedset.NestedSet;
import com.google.devtools.build.lib.actions.*; import com.google.devtools.build.lib.collect.nestedset.*;
[ "com.google.devtools" ]
com.google.devtools;
255,083
RecoveryState recoveryState();
RecoveryState recoveryState();
/** * The last / on going recovery status. */
The last / on going recovery status
recoveryState
{ "repo_name": "arowla/elasticsearch", "path": "src/main/java/org/elasticsearch/index/gateway/IndexShardGateway.java", "license": "apache-2.0", "size": 1414 }
[ "org.elasticsearch.indices.recovery.RecoveryState" ]
import org.elasticsearch.indices.recovery.RecoveryState;
import org.elasticsearch.indices.recovery.*;
[ "org.elasticsearch.indices" ]
org.elasticsearch.indices;
1,394,265
public static byte[] objectToByteArray(Object obj) throws IOException { FastByteArrayOutputStream bos = new FastByteArrayOutputStream(); ObjectOutputStream oos = null; try { oos = new ObjectOutputStream(bos); oos.writeObject(obj); } finally { StreamUtil.close(oos); } return bos.toByteArray(); ...
static byte[] function(Object obj) throws IOException { FastByteArrayOutputStream bos = new FastByteArrayOutputStream(); ObjectOutputStream oos = null; try { oos = new ObjectOutputStream(bos); oos.writeObject(obj); } finally { StreamUtil.close(oos); } return bos.toByteArray(); }
/** * Serialize an object to byte array. */
Serialize an object to byte array
objectToByteArray
{ "repo_name": "vilmospapp/jodd", "path": "jodd-core/src/main/java/jodd/util/ObjectUtil.java", "license": "bsd-2-clause", "size": 5544 }
[ "java.io.IOException", "java.io.ObjectOutputStream" ]
import java.io.IOException; import java.io.ObjectOutputStream;
import java.io.*;
[ "java.io" ]
java.io;
1,527,668
private void validateAndAppendColumnName(CQLTranslator translator, StringBuilder queryBuilder, String b, Class<?> clazz) { String dataType = CassandraValidationClassMapper.getValidationClass(clazz, true); translator.appendColumnName(queryBuilder, b, translator.getCQLType(dataType)); ...
void function(CQLTranslator translator, StringBuilder queryBuilder, String b, Class<?> clazz) { String dataType = CassandraValidationClassMapper.getValidationClass(clazz, true); translator.appendColumnName(queryBuilder, b, translator.getCQLType(dataType)); queryBuilder.append(Constants.SPACE_COMMA); }
/** * Validate and append column name. * * @param translator * the translator * @param queryBuilder * the query builder * @param b * the b * @param clazz * the clazz */
Validate and append column name
validateAndAppendColumnName
{ "repo_name": "impetus-opensource/Kundera", "path": "src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/schemamanager/CassandraSchemaManager.java", "license": "apache-2.0", "size": 123023 }
[ "com.impetus.client.cassandra.thrift.CQLTranslator", "com.impetus.kundera.Constants" ]
import com.impetus.client.cassandra.thrift.CQLTranslator; import com.impetus.kundera.Constants;
import com.impetus.client.cassandra.thrift.*; import com.impetus.kundera.*;
[ "com.impetus.client", "com.impetus.kundera" ]
com.impetus.client; com.impetus.kundera;
28,677
public void removeAction(int tag, CocosNode target) { assert tag != Action.INVALID_TAG : "Invalid tag"; HashElement element = targets.get(target); if (element != null) { if (element.actions != null) { int limit = element.actions.size(); for (int i...
void function(int tag, CocosNode target) { assert tag != Action.INVALID_TAG : STR; HashElement element = targets.get(target); if (element != null) { if (element.actions != null) { int limit = element.actions.size(); for (int i = 0; i < limit; i++) { Action a = element.actions.get(i); if (a.getTag() == tag && a.getOrigi...
/** * Removes an action given its tag and the target */
Removes an action given its tag and the target
removeAction
{ "repo_name": "talenguyen/cocos2d-android", "path": "src/org/cocos2d/actions/ActionManager.java", "license": "bsd-3-clause", "size": 9041 }
[ "android.util.Log", "org.cocos2d.actions.base.Action", "org.cocos2d.nodes.CocosNode" ]
import android.util.Log; import org.cocos2d.actions.base.Action; import org.cocos2d.nodes.CocosNode;
import android.util.*; import org.cocos2d.actions.base.*; import org.cocos2d.nodes.*;
[ "android.util", "org.cocos2d.actions", "org.cocos2d.nodes" ]
android.util; org.cocos2d.actions; org.cocos2d.nodes;
1,277,242
@Override public void error(final Message msg, final Throwable t) { logWrapper.logIfEnabled(loggerName, Level.ERROR, null, msg, t); }
void function(final Message msg, final Throwable t) { logWrapper.logIfEnabled(loggerName, Level.ERROR, null, msg, t); }
/** * Logs the specified Message at the {@code Level.ERROR} level. * * @param msg the message string to be logged * @param t A Throwable or null. */
Logs the specified Message at the Level.ERROR level
error
{ "repo_name": "PurelyApplied/geode", "path": "geode-core/src/main/java/org/apache/geode/internal/logging/log4j/LogWriterLogger.java", "license": "apache-2.0", "size": 56907 }
[ "org.apache.logging.log4j.Level", "org.apache.logging.log4j.message.Message" ]
import org.apache.logging.log4j.Level; import org.apache.logging.log4j.message.Message;
import org.apache.logging.log4j.*; import org.apache.logging.log4j.message.*;
[ "org.apache.logging" ]
org.apache.logging;
2,215,571
List<SecurityTeam> getSecurityTeamsWhereGroupIsAdmin(PerunSession session, Group group) throws InternalErrorException;
List<SecurityTeam> getSecurityTeamsWhereGroupIsAdmin(PerunSession session, Group group) throws InternalErrorException;
/** * Returns all security teams where given group si SECURITYADMIN. * * @param session session * @param group group * @return list of all security teams where given group is SECURITYADMIN * @throws InternalErrorException */
Returns all security teams where given group si SECURITYADMIN
getSecurityTeamsWhereGroupIsAdmin
{ "repo_name": "stavamichal/perun", "path": "perun-core/src/main/java/cz/metacentrum/perun/core/implApi/GroupsManagerImplApi.java", "license": "bsd-2-clause", "size": 24729 }
[ "cz.metacentrum.perun.core.api.Group", "cz.metacentrum.perun.core.api.PerunSession", "cz.metacentrum.perun.core.api.SecurityTeam", "cz.metacentrum.perun.core.api.exceptions.InternalErrorException", "java.util.List" ]
import cz.metacentrum.perun.core.api.Group; import cz.metacentrum.perun.core.api.PerunSession; import cz.metacentrum.perun.core.api.SecurityTeam; import cz.metacentrum.perun.core.api.exceptions.InternalErrorException; import java.util.List;
import cz.metacentrum.perun.core.api.*; import cz.metacentrum.perun.core.api.exceptions.*; import java.util.*;
[ "cz.metacentrum.perun", "java.util" ]
cz.metacentrum.perun; java.util;
1,716,052
public static MozuClient<com.mozu.api.contracts.productruntime.DiscountValidationSummary> validateDiscountsClient(com.mozu.api.contracts.productruntime.DiscountSelections discountSelections, String productCode) throws Exception { return validateDiscountsClient( discountSelections, productCode, null, null, n...
static MozuClient<com.mozu.api.contracts.productruntime.DiscountValidationSummary> function(com.mozu.api.contracts.productruntime.DiscountSelections discountSelections, String productCode) throws Exception { return validateDiscountsClient( discountSelections, productCode, null, null, null, null, null); }
/** * Evaluates whether a collection of discounts specified in the request can be redeemed for the supplied product code. * <p><pre><code> * MozuClient<com.mozu.api.contracts.productruntime.DiscountValidationSummary> mozuClient=ValidateDiscountsClient( discountSelections, productCode); * client.setBaseAddr...
Evaluates whether a collection of discounts specified in the request can be redeemed for the supplied product code. <code><code> MozuClient mozuClient=ValidateDiscountsClient( discountSelections, productCode); client.setBaseAddress(url); client.executeRequest(); DiscountValidationSummary discountValidationSummary = cli...
validateDiscountsClient
{ "repo_name": "johngatti/mozu-java", "path": "mozu-javaasync-core/src/main/java/com/mozu/api/clients/commerce/catalog/storefront/ProductClient.java", "license": "mit", "size": 25579 }
[ "com.mozu.api.MozuClient" ]
import com.mozu.api.MozuClient;
import com.mozu.api.*;
[ "com.mozu.api" ]
com.mozu.api;
527,228
public @NonNull PlotQuery thatPasses(final @NonNull Predicate<Plot> predicate) { Preconditions.checkNotNull(predicate, "Predicate may not be null"); return this.addFilter(new PredicateFilter(predicate)); } /** * Specify the sorting strategy that will decide how to * sort the resul...
@NonNull PlotQuery function(final @NonNull Predicate<Plot> predicate) { Preconditions.checkNotNull(predicate, STR); return this.addFilter(new PredicateFilter(predicate)); } /** * Specify the sorting strategy that will decide how to * sort the results. This only matters if you use {@link #asList()}
/** * Query for plots that passes a given predicate * * @param predicate Predicate * @return The query instance */
Query for plots that passes a given predicate
thatPasses
{ "repo_name": "IntellectualSites/PlotSquared", "path": "Core/src/main/java/com/plotsquared/core/util/query/PlotQuery.java", "license": "gpl-3.0", "size": 15352 }
[ "com.google.common.base.Preconditions", "com.plotsquared.core.plot.Plot", "java.util.function.Predicate", "org.checkerframework.checker.nullness.qual.NonNull" ]
import com.google.common.base.Preconditions; import com.plotsquared.core.plot.Plot; import java.util.function.Predicate; import org.checkerframework.checker.nullness.qual.NonNull;
import com.google.common.base.*; import com.plotsquared.core.plot.*; import java.util.function.*; import org.checkerframework.checker.nullness.qual.*;
[ "com.google.common", "com.plotsquared.core", "java.util", "org.checkerframework.checker" ]
com.google.common; com.plotsquared.core; java.util; org.checkerframework.checker;
2,368,875
public DateTimeFormatterBuilder appendSecondOfMinute(int minDigits) { return appendDecimal(DateTimeFieldType.secondOfMinute(), minDigits, 2); }
DateTimeFormatterBuilder function(int minDigits) { return appendDecimal(DateTimeFieldType.secondOfMinute(), minDigits, 2); }
/** * Instructs the printer to emit a numeric secondOfMinute field. * * @param minDigits minimum number of digits to print * @return this DateTimeFormatterBuilder, for chaining */
Instructs the printer to emit a numeric secondOfMinute field
appendSecondOfMinute
{ "repo_name": "aparo/scalajs-joda", "path": "src/main/scala/org/joda/time/format/DateTimeFormatterBuilder.java", "license": "apache-2.0", "size": 99092 }
[ "org.joda.time.DateTimeFieldType" ]
import org.joda.time.DateTimeFieldType;
import org.joda.time.*;
[ "org.joda.time" ]
org.joda.time;
1,020,210
protected SocketAddress testableLocalSocketAddress() { return cnxn.getLocalSocketAddress(); }
SocketAddress function() { return cnxn.getLocalSocketAddress(); }
/** * Returns the local address to which the socket is bound. * THIS METHOD IS EXPECTED TO BE USED FOR TESTING ONLY!!! * * @since 3.3.0 * * @return ip address of the remote side of the connection or null if * not connected */
Returns the local address to which the socket is bound. THIS METHOD IS EXPECTED TO BE USED FOR TESTING ONLY!!
testableLocalSocketAddress
{ "repo_name": "sagarc/zookeeperGla", "path": "src/java/main/org/apache/zookeeper/ZooKeeper.java", "license": "apache-2.0", "size": 62549 }
[ "java.net.SocketAddress" ]
import java.net.SocketAddress;
import java.net.*;
[ "java.net" ]
java.net;
2,460,229
public void doFinalizeHide(RunData data) { SessionState state = ((JetspeedRunData)data).getPortletSessionState (((JetspeedRunData)data).getJs_peid ()); state.setAttribute(STATE_LIST_SELECTIONS, new TreeSet()); // cancel copy if there is one in progress if(! Boolean.FALSE.toString().equals(state...
void function(RunData data) { SessionState state = ((JetspeedRunData)data).getPortletSessionState (((JetspeedRunData)data).getJs_peid ()); state.setAttribute(STATE_LIST_SELECTIONS, new TreeSet()); if(! Boolean.FALSE.toString().equals(state.getAttribute (STATE_COPY_FLAG))) { initCopyContext(state); } if(! Boolean.FALSE....
/** * Hide the selected collection or resource items */
Hide the selected collection or resource items
doFinalizeHide
{ "repo_name": "noondaysun/sakai", "path": "content/content-tool/tool/src/java/org/sakaiproject/content/tool/ResourcesAction.java", "license": "apache-2.0", "size": 337685 }
[ "java.util.Hashtable", "java.util.Iterator", "java.util.List", "java.util.TreeSet", "java.util.Vector", "org.sakaiproject.cheftool.JetspeedRunData", "org.sakaiproject.cheftool.RunData", "org.sakaiproject.content.api.ContentCollectionEdit", "org.sakaiproject.content.api.ContentResourceEdit", "org.s...
import java.util.Hashtable; import java.util.Iterator; import java.util.List; import java.util.TreeSet; import java.util.Vector; import org.sakaiproject.cheftool.JetspeedRunData; import org.sakaiproject.cheftool.RunData; import org.sakaiproject.content.api.ContentCollectionEdit; import org.sakaiproject.content.api.Cont...
import java.util.*; import org.sakaiproject.cheftool.*; import org.sakaiproject.content.api.*; import org.sakaiproject.content.cover.*; import org.sakaiproject.entity.api.*; import org.sakaiproject.event.api.*; import org.sakaiproject.exception.*; import org.sakaiproject.util.*;
[ "java.util", "org.sakaiproject.cheftool", "org.sakaiproject.content", "org.sakaiproject.entity", "org.sakaiproject.event", "org.sakaiproject.exception", "org.sakaiproject.util" ]
java.util; org.sakaiproject.cheftool; org.sakaiproject.content; org.sakaiproject.entity; org.sakaiproject.event; org.sakaiproject.exception; org.sakaiproject.util;
2,312,289
private Enumeration getKeys(final Map map) { return new Enumerator(map.keySet().iterator()); }
Enumeration function(final Map map) { return new Enumerator(map.keySet().iterator()); }
/** * Returns an enumeration of the keys in the given map. * * @param map the map * @return an enumeration of the map's keys */
Returns an enumeration of the keys in the given map
getKeys
{ "repo_name": "jonathanaustin/wcomponents", "path": "wcomponents-core/src/main/java/com/github/bordertech/wcomponents/util/mock/servlet/MockHttpServletRequest.java", "license": "gpl-3.0", "size": 13959 }
[ "com.github.bordertech.wcomponents.util.Enumerator", "java.util.Enumeration", "java.util.Map" ]
import com.github.bordertech.wcomponents.util.Enumerator; import java.util.Enumeration; import java.util.Map;
import com.github.bordertech.wcomponents.util.*; import java.util.*;
[ "com.github.bordertech", "java.util" ]
com.github.bordertech; java.util;
2,867,097
static void doRss(StaplerRequest req, StaplerResponse rsp, List<LogRecord> logs) throws IOException, ServletException { // filter log records based on the log level String level = req.getParameter("level"); if(level!=null) { Level threshold = Level.parse(level); List...
static void doRss(StaplerRequest req, StaplerResponse rsp, List<LogRecord> logs) throws IOException, ServletException { String level = req.getParameter("level"); if(level!=null) { Level threshold = Level.parse(level); List<LogRecord> filtered = new ArrayList<LogRecord>(); for (LogRecord r : logs) { if(r.getLevel().intV...
/** * Renders the given log recorders as RSS. */
Renders the given log recorders as RSS
doRss
{ "repo_name": "stefanbrausch/hudson-main", "path": "core/src/main/java/hudson/logging/LogRecorderManager.java", "license": "mit", "size": 6236 }
[ "java.io.IOException", "java.util.ArrayList", "java.util.List", "java.util.logging.Level", "java.util.logging.LogRecord", "javax.servlet.ServletException", "org.kohsuke.stapler.StaplerRequest", "org.kohsuke.stapler.StaplerResponse" ]
import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.logging.Level; import java.util.logging.LogRecord; import javax.servlet.ServletException; import org.kohsuke.stapler.StaplerRequest; import org.kohsuke.stapler.StaplerResponse;
import java.io.*; import java.util.*; import java.util.logging.*; import javax.servlet.*; import org.kohsuke.stapler.*;
[ "java.io", "java.util", "javax.servlet", "org.kohsuke.stapler" ]
java.io; java.util; javax.servlet; org.kohsuke.stapler;
290,110
private static boolean areAdaptationCompatible( boolean codecIsAdaptive, Format first, Format second) { return first.sampleMimeType.equals(second.sampleMimeType) && first.rotationDegrees == second.rotationDegrees && (codecIsAdaptive || (first.width == second.width && first.height == second.h...
static boolean function( boolean codecIsAdaptive, Format first, Format second) { return first.sampleMimeType.equals(second.sampleMimeType) && first.rotationDegrees == second.rotationDegrees && (codecIsAdaptive (first.width == second.width && first.height == second.height)) && Util.areEqual(first.colorInfo, second.color...
/** * Returns whether a codec with suitable {@link CodecMaxValues} will support adaptation between * two {@link Format}s. * * @param codecIsAdaptive Whether the codec supports seamless resolution switches. * @param first The first format. * @param second The second format. * @return Whether the cod...
Returns whether a codec with suitable <code>CodecMaxValues</code> will support adaptation between two <code>Format</code>s
areAdaptationCompatible
{ "repo_name": "tntcrowd/ExoPlayer", "path": "library/core/src/main/java/com/google/android/exoplayer2/video/MediaCodecVideoRenderer.java", "license": "apache-2.0", "size": 53069 }
[ "com.google.android.exoplayer2.Format", "com.google.android.exoplayer2.util.Util" ]
import com.google.android.exoplayer2.Format; import com.google.android.exoplayer2.util.Util;
import com.google.android.exoplayer2.*; import com.google.android.exoplayer2.util.*;
[ "com.google.android" ]
com.google.android;
1,496,210
public static String[] tokenizeToStringArray( String str, String delimiters, boolean trimTokens, boolean ignoreEmptyTokens) { if (str == null) { return null; } StringTokenizer st = new StringTokenizer(str, delimiters); List tokens = new ArrayList(); w...
static String[] function( String str, String delimiters, boolean trimTokens, boolean ignoreEmptyTokens) { if (str == null) { return null; } StringTokenizer st = new StringTokenizer(str, delimiters); List tokens = new ArrayList(); while (st.hasMoreTokens()) { String token = st.nextToken(); if (trimTokens) { token = toke...
/** * Tokenize the given String into a String array via a StringTokenizer. * <p>The given delimiters string is supposed to consist of any number of * delimiter characters. Each of those characters can be used to separate * tokens. A delimiter is always a single character; for multi-character * ...
Tokenize the given String into a String array via a StringTokenizer. The given delimiters string is supposed to consist of any number of delimiter characters. Each of those characters can be used to separate tokens. A delimiter is always a single character; for multi-character delimiters, consider using <code>delimited...
tokenizeToStringArray
{ "repo_name": "baboune/compass", "path": "src/main/src/org/compass/core/util/StringUtils.java", "license": "apache-2.0", "size": 44669 }
[ "java.util.ArrayList", "java.util.List", "java.util.StringTokenizer" ]
import java.util.ArrayList; import java.util.List; import java.util.StringTokenizer;
import java.util.*;
[ "java.util" ]
java.util;
2,691,652
public void lifecycleEvent(LifecycleEvent event) { Lifecycle lifecycle = event.getLifecycle(); if (Lifecycle.START_EVENT.equals(event.getType())) { try { if (lifecycle instanceof Server) { MBeanFactory factory = new MBeanFactory(); ...
void function(LifecycleEvent event) { Lifecycle lifecycle = event.getLifecycle(); if (Lifecycle.START_EVENT.equals(event.getType())) { try { if (lifecycle instanceof Server) { MBeanFactory factory = new MBeanFactory(); factory.setContainer(lifecycle); createMBeans(factory); createMBeans((Server) lifecycle); } if( lifec...
/** * Primary entry point for startup and shutdown events. * * @param event The event that has occurred */
Primary entry point for startup and shutdown events
lifecycleEvent
{ "repo_name": "plumer/codana", "path": "tomcat_files/7.0.0/ServerLifecycleListener.java", "license": "mit", "size": 41715 }
[ "javax.management.MBeanException", "org.apache.catalina.Context", "org.apache.catalina.Globals", "org.apache.catalina.Lifecycle", "org.apache.catalina.LifecycleEvent", "org.apache.catalina.Server", "org.apache.catalina.Service", "org.apache.catalina.core.StandardContext" ]
import javax.management.MBeanException; import org.apache.catalina.Context; import org.apache.catalina.Globals; import org.apache.catalina.Lifecycle; import org.apache.catalina.LifecycleEvent; import org.apache.catalina.Server; import org.apache.catalina.Service; import org.apache.catalina.core.StandardContext;
import javax.management.*; import org.apache.catalina.*; import org.apache.catalina.core.*;
[ "javax.management", "org.apache.catalina" ]
javax.management; org.apache.catalina;
269,221
public AxisLocation getRangeAxisLocation(int index) { AxisLocation result = this.rangeAxisLocations.get(index); if (result == null) { result = AxisLocation.getOpposite(getRangeAxisLocation()); } return result; } /** * Sets the location for a range axis and s...
AxisLocation function(int index) { AxisLocation result = this.rangeAxisLocations.get(index); if (result == null) { result = AxisLocation.getOpposite(getRangeAxisLocation()); } return result; } /** * Sets the location for a range axis and sends a {@link PlotChangeEvent}
/** * Returns the location for a range axis. If this hasn't been set * explicitly, the method returns the location that is opposite to the * primary range axis location. * * @param index the axis index (must be &gt;= 0). * * @return The location (never {@code null}). * * @...
Returns the location for a range axis. If this hasn't been set explicitly, the method returns the location that is opposite to the primary range axis location
getRangeAxisLocation
{ "repo_name": "GitoMat/jfreechart", "path": "src/main/java/org/jfree/chart/plot/XYPlot.java", "license": "lgpl-2.1", "size": 197216 }
[ "org.jfree.chart.axis.AxisLocation", "org.jfree.chart.event.PlotChangeEvent" ]
import org.jfree.chart.axis.AxisLocation; import org.jfree.chart.event.PlotChangeEvent;
import org.jfree.chart.axis.*; import org.jfree.chart.event.*;
[ "org.jfree.chart" ]
org.jfree.chart;
1,415,351
@Test public void testManualHashAssignmentForIntermediateNodeInChain() throws Exception { StreamExecutionEnvironment env = StreamExecutionEnvironment.createLocalEnvironment(); env.setParallelism(4); env.addSource(new NoOpSourceFunction()) // Intermediate chained node .map(new NoOpMapFunction()).uid("...
void function() throws Exception { StreamExecutionEnvironment env = StreamExecutionEnvironment.createLocalEnvironment(); env.setParallelism(4); env.addSource(new NoOpSourceFunction()) .map(new NoOpMapFunction()).uid("map") .addSink(new NoOpSinkFunction()); env.getStreamGraph().getJobGraph(); }
/** * Tests that a manual hash for an intermediate chain node is accepted. */
Tests that a manual hash for an intermediate chain node is accepted
testManualHashAssignmentForIntermediateNodeInChain
{ "repo_name": "fanyon/flink", "path": "flink-streaming-java/src/test/java/org/apache/flink/streaming/graph/StreamingJobGraphGeneratorNodeHashTest.java", "license": "apache-2.0", "size": 18340 }
[ "org.apache.flink.streaming.api.environment.StreamExecutionEnvironment" ]
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
import org.apache.flink.streaming.api.environment.*;
[ "org.apache.flink" ]
org.apache.flink;
282,950
void uploadSampleText() { HaruFile file = new HaruFile(getFilesDir().getPath() + "/sample.txt"); file.saveInBackground(); }
void uploadSampleText() { HaruFile file = new HaruFile(getFilesDir().getPath() + STR); file.saveInBackground(); }
/** * Upload sample file to server. */
Upload sample file to server
uploadSampleText
{ "repo_name": "haruio/haru-sdk-android", "path": "test/src/main/java/com/haru/test/MainActivity.java", "license": "mit", "size": 5228 }
[ "com.haru.HaruFile" ]
import com.haru.HaruFile;
import com.haru.*;
[ "com.haru" ]
com.haru;
1,367,199
@Test public void testMergeDiscardsTimestamp() throws IOException, AmbigiuousStationNameException, ParseException, InterruptedException, NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException { final String street1 = "Björnson"; final String street2 = "Björnson (Berlin)"; ...
void function() throws IOException, AmbigiuousStationNameException, ParseException, InterruptedException, NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException { final String street1 = STR; final String street2 = STR; String[][] tmp1 = { { "15:29", STR, STR,STR } }; StationImpl stati...
/** * Merging a station with a timestamp older than the actual stations * timestamp should do nothing, but adding the line name to the list of * alternative names * @throws ParseException * @throws AmbigiuousStationNameException * @throws IOException * @throws InterruptedException * @throws SecurityExce...
Merging a station with a timestamp older than the actual stations timestamp should do nothing, but adding the line name to the list of alternative names
testMergeDiscardsTimestamp
{ "repo_name": "Timmeey/OeffiWatch", "path": "oeffiwatch/src/tests/java/de/timmeey/oeffiwatch/station/impl/StationImplTest.java", "license": "mit", "size": 11764 }
[ "de.timmeey.oeffiwatch.exception.AmbigiuousStationNameException", "de.timmeey.oeffiwatch.exception.ParseException", "de.timmeey.oeffiwatch.line.LineImplTest", "de.timmeey.oeffiwatch.util.parser.ParseResult", "java.io.IOException", "java.lang.reflect.Field", "java.time.temporal.ChronoUnit", "org.junit....
import de.timmeey.oeffiwatch.exception.AmbigiuousStationNameException; import de.timmeey.oeffiwatch.exception.ParseException; import de.timmeey.oeffiwatch.line.LineImplTest; import de.timmeey.oeffiwatch.util.parser.ParseResult; import java.io.IOException; import java.lang.reflect.Field; import java.time.temporal.Chrono...
import de.timmeey.oeffiwatch.exception.*; import de.timmeey.oeffiwatch.line.*; import de.timmeey.oeffiwatch.util.parser.*; import java.io.*; import java.lang.reflect.*; import java.time.temporal.*; import org.junit.*;
[ "de.timmeey.oeffiwatch", "java.io", "java.lang", "java.time", "org.junit" ]
de.timmeey.oeffiwatch; java.io; java.lang; java.time; org.junit;
828,770
private void removeWorker(final Worker worker) { log.info("Kaboom! Worker[%s] removed!", worker.getHost()); final ZkWorker zkWorker = zkWorkers.get(worker.getHost()); if (zkWorker != null) { try { scheduleTasksCleanupForWorker(worker.getHost(), getAssignedTasks(worker)); } cat...
void function(final Worker worker) { log.info(STR, worker.getHost()); final ZkWorker zkWorker = zkWorkers.get(worker.getHost()); if (zkWorker != null) { try { scheduleTasksCleanupForWorker(worker.getHost(), getAssignedTasks(worker)); } catch (Exception e) { throw Throwables.propagate(e); } finally { try { zkWorker.clos...
/** * When a ephemeral worker node disappears from ZK, incomplete running tasks will be retried by * the logic in the status listener. We still have to make sure there are no tasks assigned * to the worker but not yet running. * * @param worker - the removed worker */
When a ephemeral worker node disappears from ZK, incomplete running tasks will be retried by the logic in the status listener. We still have to make sure there are no tasks assigned to the worker but not yet running
removeWorker
{ "repo_name": "lcp0578/druid", "path": "indexing-service/src/main/java/io/druid/indexing/overlord/RemoteTaskRunner.java", "license": "apache-2.0", "size": 39088 }
[ "com.google.common.base.Throwables", "io.druid.indexing.worker.Worker" ]
import com.google.common.base.Throwables; import io.druid.indexing.worker.Worker;
import com.google.common.base.*; import io.druid.indexing.worker.*;
[ "com.google.common", "io.druid.indexing" ]
com.google.common; io.druid.indexing;
1,577,986
@Test public void testGroup8() throws Exception { policyFile = PolicyFile.setAdminOnServer1(ADMINGROUP); policyFile .addGroupsToUser("admin1", ADMINGROUP) .addRolesToGroup("group1", "analytics") .addGroupsToUser("user1", "group1") .addGroupsToUser("user2", "group1") ....
void function() throws Exception { policyFile = PolicyFile.setAdminOnServer1(ADMINGROUP); policyFile .addGroupsToUser(STR, ADMINGROUP) .addRolesToGroup(STR, STR) .addGroupsToUser("user1", STR) .addGroupsToUser("user2", STR) .addGroupsToUser("user3", STR); writePolicyFile(policyFile); Connection connection = context.cre...
/** * Tests that users with no privileges cannot list any tables **/
Tests that users with no privileges cannot list any tables
testGroup8
{ "repo_name": "intel-hadoop/incubator-sentry", "path": "sentry-tests/sentry-tests-hive/src/test/java/org/apache/sentry/tests/e2e/hive/TestUserManagement.java", "license": "apache-2.0", "size": 12773 }
[ "java.sql.Connection", "java.sql.Statement", "org.apache.sentry.provider.file.PolicyFile", "org.junit.Assert" ]
import java.sql.Connection; import java.sql.Statement; import org.apache.sentry.provider.file.PolicyFile; import org.junit.Assert;
import java.sql.*; import org.apache.sentry.provider.file.*; import org.junit.*;
[ "java.sql", "org.apache.sentry", "org.junit" ]
java.sql; org.apache.sentry; org.junit;
652,289
@Test() public void testRedefinedMatchingRuleWithOID() throws Exception { final File schemaDir = createTempDir(); final File schemaFile1 = new File(schemaDir, "01-first.ldif"); StaticUtils.writeFile(schemaFile1, minimalSchemaLines); final File schemaFile2 = new File(schemaDir, "second.l...
@Test() void function() throws Exception { final File schemaDir = createTempDir(); final File schemaFile1 = new File(schemaDir, STR); StaticUtils.writeFile(schemaFile1, minimalSchemaLines); final File schemaFile2 = new File(schemaDir, STR); StaticUtils.writeFile(schemaFile2, STR, STR, STR, STR, STR, STR + STR + STR); S...
/** * Tests the behavior for a duplicate matching rule definition that has the * same OID but a different name. * * @throws Exception If an unexpected problem occurs. */
Tests the behavior for a duplicate matching rule definition that has the same OID but a different name
testRedefinedMatchingRuleWithOID
{ "repo_name": "UnboundID/ldapsdk", "path": "tests/unit/src/com/unboundid/ldap/sdk/schema/SchemaValidatorTestCase.java", "license": "gpl-2.0", "size": 262381 }
[ "com.unboundid.util.StaticUtils", "java.io.File", "java.util.ArrayList", "java.util.List", "org.testng.annotations.Test" ]
import com.unboundid.util.StaticUtils; import java.io.File; import java.util.ArrayList; import java.util.List; import org.testng.annotations.Test;
import com.unboundid.util.*; import java.io.*; import java.util.*; import org.testng.annotations.*;
[ "com.unboundid.util", "java.io", "java.util", "org.testng.annotations" ]
com.unboundid.util; java.io; java.util; org.testng.annotations;
932,279
private String getImplName(Type type, boolean allowJreCollectionInterface) { Class<?> rawClass = getRawClass(type); String fqName = getFqParameterizedName(type); fqName = fqName.replaceAll(JsonArray.class.getCanonicalName(), ArrayList.class.getCanonicalName()); fqName = fqName.replac...
String function(Type type, boolean allowJreCollectionInterface) { Class<?> rawClass = getRawClass(type); String fqName = getFqParameterizedName(type); fqName = fqName.replaceAll(JsonArray.class.getCanonicalName(), ArrayList.class.getCanonicalName()); fqName = fqName.replaceAll(JsonStringMap.class.getCanonicalName() + "...
/** * Returns the fully-qualified type name using Java concrete implementation classes. * <p/> * For example, for JsonArray&lt;JsonStringMap&lt;Dto&gt;&gt;, this would return "ArrayList&lt;Map&lt;String, DtoImpl&gt;&gt;". */
Returns the fully-qualified type name using Java concrete implementation classes. For example, for JsonArray&lt;JsonStringMap&lt;Dto&gt;&gt;, this would return "ArrayList&lt;Map&lt;String, DtoImpl&gt;&gt;"
getImplName
{ "repo_name": "dhuebner/che", "path": "core/che-core-api-dto/src/main/java/org/eclipse/che/dto/generator/DtoImplServerTemplate.java", "license": "epl-1.0", "size": 50572 }
[ "java.lang.reflect.Type", "java.util.ArrayList", "java.util.HashMap", "java.util.List", "java.util.Map", "org.eclipse.che.dto.shared.JsonArray", "org.eclipse.che.dto.shared.JsonStringMap" ]
import java.lang.reflect.Type; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.eclipse.che.dto.shared.JsonArray; import org.eclipse.che.dto.shared.JsonStringMap;
import java.lang.reflect.*; import java.util.*; import org.eclipse.che.dto.shared.*;
[ "java.lang", "java.util", "org.eclipse.che" ]
java.lang; java.util; org.eclipse.che;
2,694,036
@Test public void testExecute_LS_Command() throws Exception { String command = "ls"; Result result = CommandExecutor.executeCommand(command); assertEquals(0, result.getExitVal()); assertNotNull(result); }
void function() throws Exception { String command = "ls"; Result result = CommandExecutor.executeCommand(command); assertEquals(0, result.getExitVal()); assertNotNull(result); }
/** * Run the Result executeCommand(String) method test. * * @throws Exception * the exception */
Run the Result executeCommand(String) method test
testExecute_LS_Command
{ "repo_name": "impetus-opensource/ankush", "path": "agent/src/test/java/com/impetus/ankush/agent/utils/CommandExecutorTest.java", "license": "lgpl-3.0", "size": 4757 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
1,749,774
public DhcpInfo getDhcpInfo() { enforceAccessPermission(); return mWifiStateMachine.syncGetDhcpInfo(); } /** * see {@link android.net.wifi.WifiManager#startWifi}
DhcpInfo function() { enforceAccessPermission(); return mWifiStateMachine.syncGetDhcpInfo(); } /** * see {@link android.net.wifi.WifiManager#startWifi}
/** * Return the DHCP-assigned addresses from the last successful DHCP request, * if any. * @return the DHCP information */
Return the DHCP-assigned addresses from the last successful DHCP request, if any
getDhcpInfo
{ "repo_name": "rex-xxx/mt6572_x201", "path": "frameworks/base/services/java/com/android/server/WifiService.java", "license": "gpl-2.0", "size": 85504 }
[ "android.net.DhcpInfo", "android.net.wifi.WifiManager" ]
import android.net.DhcpInfo; import android.net.wifi.WifiManager;
import android.net.*; import android.net.wifi.*;
[ "android.net" ]
android.net;
2,616,961
public void setData( Map<Object, Object> data ) { this.data = data; }
void function( Map<Object, Object> data ) { this.data = data; }
/** * Sets style specific values. This does NOT copy the data, it assigns it * directly to this Style. * * @param data Style specific values */
Sets style specific values. This does NOT copy the data, it assigns it directly to this Style
setData
{ "repo_name": "parallelsymmetry/cirrus", "path": "source/main/java/com/parallelsymmetry/cirrus/DefaultCirrusStyle.java", "license": "apache-2.0", "size": 24241 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,276,393
public void writeObject(PDFWriter out) throws IOException { long length = _path.getLength(); out.println("<< /Type /EmbeddedFile"); out.println(" /Length " + length); out.println(">>"); out.println("stream"); TempBuffer tb = TempBuffer.allocate(); byte []buffer = tb.getBuffer(); ...
void function(PDFWriter out) throws IOException { long length = _path.getLength(); out.println(STR); out.println(STR + length); out.println(">>"); out.println(STR); TempBuffer tb = TempBuffer.allocate(); byte []buffer = tb.getBuffer(); int sublen; InputStream is = _path.openRead(); while ((sublen = is.read(buffer, 0, b...
/** * Writes the object to the stream */
Writes the object to the stream
writeObject
{ "repo_name": "dwango/quercus", "path": "src/main/java/com/caucho/quercus/lib/pdf/PDFEmbeddedFile.java", "license": "gpl-2.0", "size": 2175 }
[ "com.caucho.vfs.TempBuffer", "java.io.IOException", "java.io.InputStream" ]
import com.caucho.vfs.TempBuffer; import java.io.IOException; import java.io.InputStream;
import com.caucho.vfs.*; import java.io.*;
[ "com.caucho.vfs", "java.io" ]
com.caucho.vfs; java.io;
187,776
public static boolean weakCompareAndSet(AtomicInteger ai, int expect, int update) { return Atomic.weakCompareAndSet(ai, expect, update); }
static boolean function(AtomicInteger ai, int expect, int update) { return Atomic.weakCompareAndSet(ai, expect, update); }
/** * Atomically sets the value to the given updated value * if the current value {@code ==} the expected value. * * <p>May <a href="package-summary.html#Spurious">fail spuriously</a> * and does not provide ordering guarantees, so is only rarely an * appropriate alternative to {@code compa...
Atomically sets the value to the given updated value if the current value == the expected value. May fail spuriously and does not provide ordering guarantees, so is only rarely an appropriate alternative to compareAndSet
weakCompareAndSet
{ "repo_name": "haitaoyao/btrace", "path": "src/share/classes/com/sun/btrace/BTraceUtils.java", "license": "gpl-2.0", "size": 234341 }
[ "java.util.concurrent.atomic.AtomicInteger" ]
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.*;
[ "java.util" ]
java.util;
1,733,917
public long skip(long n) throws IOException { if (_eof || n <= 0) return 0; long remaining = n; while (remaining > 0) { int length = (int)Math.min(_tbuffer.length, remaining); int sublen = read(_tbuffer, 0, length); if (sublen < 0) break; remaining -= sublen;...
long function(long n) throws IOException { if (_eof n <= 0) return 0; long remaining = n; while (remaining > 0) { int length = (int)Math.min(_tbuffer.length, remaining); int sublen = read(_tbuffer, 0, length); if (sublen < 0) break; remaining -= sublen; } return (n - remaining); }
/** * Skips over and discards n bytes. * @param n number of bytes to skip * @return actual number of bytes skipped */
Skips over and discards n bytes
skip
{ "repo_name": "smba/oak", "path": "quercus/src/main/java/com/caucho/quercus/lib/zlib/GZInputStream.java", "license": "lgpl-3.0", "size": 8454 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,292,215
ServiceFuture<Void> postOptionalStringHeaderAsync(final ServiceCallback<Void> serviceCallback);
ServiceFuture<Void> postOptionalStringHeaderAsync(final ServiceCallback<Void> serviceCallback);
/** * Test explicitly optional string. Please put a header 'headerParameter' =&gt; null. * * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceFuture} object */
Test explicitly optional string. Please put a header 'headerParameter' =&gt; null
postOptionalStringHeaderAsync
{ "repo_name": "anudeepsharma/autorest", "path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/requiredoptional/Explicits.java", "license": "mit", "size": 43451 }
[ "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
775,702
public Collection<V> getAdjacent(V v);
Collection<V> function(V v);
/** * Get adjacent vertices to the given vertex * @param v Vertex * @return All vertices directly connected to a given vertex */
Get adjacent vertices to the given vertex
getAdjacent
{ "repo_name": "jbpt/codebase", "path": "jbpt-core/src/main/java/org/jbpt/hypergraph/abs/IHyperGraph.java", "license": "lgpl-3.0", "size": 4366 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
1,400,139
public static byte getByteOnPosition(ByteBuffer byteBuffer, int pos) { return byteBuffer.get(pos); }
static byte function(ByteBuffer byteBuffer, int pos) { return byteBuffer.get(pos); }
/** * return the byte on the position of the byte buffer * * @param byteBuffer * byte buffer * @param pos * position * * @return byte */
return the byte on the position of the byte buffer
getByteOnPosition
{ "repo_name": "JuKu/libgdx-test-rpg", "path": "engine/src/main/java/com/jukusoft/libgdx/rpg/engine/utils/ByteUtils.java", "license": "apache-2.0", "size": 7460 }
[ "java.nio.ByteBuffer" ]
import java.nio.ByteBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
673,824
@Test(expected = UnsupportedOperationException.class) public void cantModifyTags() { final Set<String> tags = Sets.newHashSet("tag1", "tag2"); final ClusterCriteria cc = new ClusterCriteria(tags); cc.getTags().add("this should fail"); }
@Test(expected = UnsupportedOperationException.class) void function() { final Set<String> tags = Sets.newHashSet("tag1", "tag2"); final ClusterCriteria cc = new ClusterCriteria(tags); cc.getTags().add(STR); }
/** * Test to make sure clients can't modify the internal state. */
Test to make sure clients can't modify the internal state
cantModifyTags
{ "repo_name": "irontable/genie", "path": "genie-common/src/test/java/com/netflix/genie/common/dto/ClusterCriteriaUnitTests.java", "license": "apache-2.0", "size": 3310 }
[ "com.google.common.collect.Sets", "java.util.Set", "org.junit.Test" ]
import com.google.common.collect.Sets; import java.util.Set; import org.junit.Test;
import com.google.common.collect.*; import java.util.*; import org.junit.*;
[ "com.google.common", "java.util", "org.junit" ]
com.google.common; java.util; org.junit;
216,699
public void stopPolling(InsteonDevice d) { synchronized (m_pollQueue) { for (Iterator<PQEntry> i = m_pollQueue.iterator(); i.hasNext();) { if (i.next().getDevice().getAddress().equals(d.getAddress())) { i.remove(); logger.debug("stopped polling device {}", d); } } } }
void function(InsteonDevice d) { synchronized (m_pollQueue) { for (Iterator<PQEntry> i = m_pollQueue.iterator(); i.hasNext();) { if (i.next().getDevice().getAddress().equals(d.getAddress())) { i.remove(); logger.debug(STR, d); } } } }
/** * Start polling a given device * @param d reference to the device to be polled */
Start polling a given device
stopPolling
{ "repo_name": "Greblys/openhab", "path": "bundles/binding/org.openhab.binding.insteonplm/src/main/java/org/openhab/binding/insteonplm/internal/driver/Poller.java", "license": "epl-1.0", "size": 8270 }
[ "java.util.Iterator", "org.openhab.binding.insteonplm.internal.device.InsteonDevice" ]
import java.util.Iterator; import org.openhab.binding.insteonplm.internal.device.InsteonDevice;
import java.util.*; import org.openhab.binding.insteonplm.internal.device.*;
[ "java.util", "org.openhab.binding" ]
java.util; org.openhab.binding;
1,499,814
@Test public void testClone() { Graph graph = new Graph(); Node n1 = new Node("Lemma1", "POS1"); Node n2 = new Node("Lemma2", "POS2"); Node n3 = new Node("Lemma3", "POS3"); Edge e1 = new Edge("rel1", n1, n2); Edge e2 = new Edge("rel2", n2, n3); graph.addNode(n1); graph.addNode(n2); graph.add...
void function() { Graph graph = new Graph(); Node n1 = new Node(STR, "POS1"); Node n2 = new Node(STR, "POS2"); Node n3 = new Node(STR, "POS3"); Edge e1 = new Edge("rel1", n1, n2); Edge e2 = new Edge("rel2", n2, n3); graph.addNode(n1); graph.addNode(n2); graph.addNode(n3); graph.addEdge(e1); graph.addEdge(e2); graph.put...
/** * Cloning the graph. */
Cloning the graph
testClone
{ "repo_name": "marekrei/semgraph", "path": "src/sem/test/graph/GraphTest.java", "license": "agpl-3.0", "size": 7108 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
992,154
protected void addActivityEntry(String thing, String event, TopicInfo topic, PostInfo post, SiteInfo site, WebScriptRequest req, JSONObject json) { // We can only add activities against a site if (site == null) { logger.info("Unable to add activity entry for " + t...
void function(String thing, String event, TopicInfo topic, PostInfo post, SiteInfo site, WebScriptRequest req, JSONObject json) { if (site == null) { logger.info(STR + thing + " " + event + STR); return; } String page = req.getParameter("page"); if (page == null && json != null) { if (json.containsKey("page")) { page =...
/** * Generates an activity entry for the discussion item * * @param thing Either post or reply * @param event One of created, updated, deleted */
Generates an activity entry for the discussion item
addActivityEntry
{ "repo_name": "Alfresco/community-edition", "path": "projects/remote-api/source/java/org/alfresco/repo/web/scripts/discussion/AbstractDiscussionWebScript.java", "license": "lgpl-3.0", "size": 21436 }
[ "org.alfresco.service.cmr.discussion.PostInfo", "org.alfresco.service.cmr.discussion.TopicInfo", "org.alfresco.service.cmr.site.SiteInfo", "org.json.simple.JSONObject", "org.springframework.extensions.webscripts.WebScriptRequest" ]
import org.alfresco.service.cmr.discussion.PostInfo; import org.alfresco.service.cmr.discussion.TopicInfo; import org.alfresco.service.cmr.site.SiteInfo; import org.json.simple.JSONObject; import org.springframework.extensions.webscripts.WebScriptRequest;
import org.alfresco.service.cmr.discussion.*; import org.alfresco.service.cmr.site.*; import org.json.simple.*; import org.springframework.extensions.webscripts.*;
[ "org.alfresco.service", "org.json.simple", "org.springframework.extensions" ]
org.alfresco.service; org.json.simple; org.springframework.extensions;
96,086
public Set<String> getParameterNames() { if (info == null || info.parameters == null) { return ImmutableSet.of(); } return ImmutableSet.copyOf(info.parameters.keySet()); }
Set<String> function() { if (info == null info.parameters == null) { return ImmutableSet.of(); } return ImmutableSet.copyOf(info.parameters.keySet()); }
/** * Returns the set of names of the defined parameters. The iteration order * of the returned set is not the order in which parameters are defined. * * @return the set of names of the defined parameters. The returned set is * immutable. */
Returns the set of names of the defined parameters. The iteration order of the returned set is not the order in which parameters are defined
getParameterNames
{ "repo_name": "antz29/closure-compiler", "path": "src/com/google/javascript/rhino/JSDocInfo.java", "license": "apache-2.0", "size": 33529 }
[ "com.google.common.collect.ImmutableSet", "java.util.Set" ]
import com.google.common.collect.ImmutableSet; import java.util.Set;
import com.google.common.collect.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
1,027,941
private void addContributors(Document doc, Element oaiDc, GenericItem item) { for(ItemContributor itemContributor : item.getContributors()) { if(itemContributor.getContributor() == null ) { throw new IllegalStateException("contributor null"); } if( itemContributor.getContributor()...
void function(Document doc, Element oaiDc, GenericItem item) { for(ItemContributor itemContributor : item.getContributors()) { if(itemContributor.getContributor() == null ) { throw new IllegalStateException(STR); } if( itemContributor.getContributor().getContributorType() == null ) { throw new IllegalStateException(STR...
/** * Add contributor information. * * @param doc * @param oaiDc * @param item */
Add contributor information
addContributors
{ "repo_name": "nate-rcl/irplus", "path": "ir_service/src/edu/ur/ir/oai/metadata/provider/service/DefaultDublinCoreOaiMetadataProvider.java", "license": "apache-2.0", "size": 22192 }
[ "edu.ur.ir.item.GenericItem", "edu.ur.ir.item.ItemContributor", "edu.ur.ir.oai.OaiUtil", "org.w3c.dom.Document", "org.w3c.dom.Element", "org.w3c.dom.Text" ]
import edu.ur.ir.item.GenericItem; import edu.ur.ir.item.ItemContributor; import edu.ur.ir.oai.OaiUtil; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Text;
import edu.ur.ir.item.*; import edu.ur.ir.oai.*; import org.w3c.dom.*;
[ "edu.ur.ir", "org.w3c.dom" ]
edu.ur.ir; org.w3c.dom;
1,368,190
public static boolean makeDirs(String filePath) { String folderName = getFolderName(filePath); if (StringUtils.isEmpty(folderName)) { return false; } File folder = new File(folderName); return (folder.exists() && folder.isDirectory()) ? true : folder.mkdirs(); ...
static boolean function(String filePath) { String folderName = getFolderName(filePath); if (StringUtils.isEmpty(folderName)) { return false; } File folder = new File(folderName); return (folder.exists() && folder.isDirectory()) ? true : folder.mkdirs(); }
/** * Create the directory * * @param filePath * @return */
Create the directory
makeDirs
{ "repo_name": "umeitime/common", "path": "common-library/src/main/java/com/umeitime/common/tools/FileUtils.java", "license": "epl-1.0", "size": 11414 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,631,379
@NotAuditable FormService getFormService();
FormService getFormService();
/** * Get the form service (or null if one is not provided) * @deprecated This method has been deprecated as it would return a service that is not part of the public API. * The service itself is not deprecated, but access to it via the ServiceRegistry will be removed in the future. */
Get the form service (or null if one is not provided)
getFormService
{ "repo_name": "Alfresco/alfresco-repository", "path": "src/main/java/org/alfresco/service/ServiceRegistry.java", "license": "lgpl-3.0", "size": 28439 }
[ "org.alfresco.repo.forms.FormService" ]
import org.alfresco.repo.forms.FormService;
import org.alfresco.repo.forms.*;
[ "org.alfresco.repo" ]
org.alfresco.repo;
201,973
ConfigurationDto editConfiguration(ConfigurationDto configuration) throws ControlServiceException;
ConfigurationDto editConfiguration(ConfigurationDto configuration) throws ControlServiceException;
/** * Edits the configuration. * * @param configuration * the configuration * @return the configuration dto * @throws ControlServiceException * the control service exception */
Edits the configuration
editConfiguration
{ "repo_name": "forGGe/kaa", "path": "server/node/src/main/java/org/kaaproject/kaa/server/control/service/ControlService.java", "license": "apache-2.0", "size": 61702 }
[ "org.kaaproject.kaa.common.dto.ConfigurationDto", "org.kaaproject.kaa.server.control.service.exception.ControlServiceException" ]
import org.kaaproject.kaa.common.dto.ConfigurationDto; import org.kaaproject.kaa.server.control.service.exception.ControlServiceException;
import org.kaaproject.kaa.common.dto.*; import org.kaaproject.kaa.server.control.service.exception.*;
[ "org.kaaproject.kaa" ]
org.kaaproject.kaa;
2,449,607
public ExceptionTable copy(ConstPool newCp, Map classnames) { ExceptionTable et = new ExceptionTable(newCp); ConstPool srcCp = constPool; int len = size(); for (int i = 0; i < len; ++i) { ExceptionTableEntry e = (ExceptionTableEntry) entries.get(i); int type = srcCp.copy(e.catchType, newCp, classnames)...
ExceptionTable function(ConstPool newCp, Map classnames) { ExceptionTable et = new ExceptionTable(newCp); ConstPool srcCp = constPool; int len = size(); for (int i = 0; i < len; ++i) { ExceptionTableEntry e = (ExceptionTableEntry) entries.get(i); int type = srcCp.copy(e.catchType, newCp, classnames); et.add(e.startPc, ...
/** * Makes a copy of this <code>exception_table[]</code>. Class names are * replaced according to the given <code>Map</code> object. * * @param newCp * the constant pool table used by the new copy. * @param classnames * pairs of replaced and substituted class names. */
Makes a copy of this <code>exception_table[]</code>. Class names are replaced according to the given <code>Map</code> object
copy
{ "repo_name": "Dablakbandit/CustomEntitiesAPI", "path": "src/ja/bytecode/ExceptionTable.java", "license": "mit", "size": 8149 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,182,290
public TargetModuleID []getAvailableModules(String moduleType);
public TargetModuleID []getAvailableModules(String moduleType);
/** * Gets the current modules. */
Gets the current modules
getAvailableModules
{ "repo_name": "dlitz/resin", "path": "modules/resin/src/com/caucho/j2ee/deployclient/DeploymentProxyAPI.java", "license": "gpl-2.0", "size": 2038 }
[ "javax.enterprise.deploy.spi.TargetModuleID" ]
import javax.enterprise.deploy.spi.TargetModuleID;
import javax.enterprise.deploy.spi.*;
[ "javax.enterprise" ]
javax.enterprise;
1,613,537
public Intersection parse(String phrase) throws StcsParsingException { parseRegion(phrase); // Get the string within the opening and closing parentheses. int open = phrase.indexOf("("); int close = phrase.lastIndexOf(")"); if (open == -1 || close == -1) { ...
Intersection function(String phrase) throws StcsParsingException { parseRegion(phrase); int open = phrase.indexOf("("); int close = phrase.lastIndexOf(")"); if (open == -1 close == -1) { throw new StcsParsingException(STR + phrase); } String union = phrase.substring(open + 1, close).trim(); int index = 0; List<Region> ...
/** * Parses a String to a Intersection. * * @param phrase the String to parse. * @return Intersection value of the String. */
Parses a String to a Intersection
parse
{ "repo_name": "opencadc/dal", "path": "cadc-dali/src/main/java/ca/nrc/cadc/stc/util/IntersectionFormat.java", "license": "agpl-3.0", "size": 7898 }
[ "ca.nrc.cadc.stc.Intersection", "ca.nrc.cadc.stc.Region", "ca.nrc.cadc.stc.STC", "ca.nrc.cadc.stc.StcsParsingException", "java.util.ArrayList", "java.util.List" ]
import ca.nrc.cadc.stc.Intersection; import ca.nrc.cadc.stc.Region; import ca.nrc.cadc.stc.STC; import ca.nrc.cadc.stc.StcsParsingException; import java.util.ArrayList; import java.util.List;
import ca.nrc.cadc.stc.*; import java.util.*;
[ "ca.nrc.cadc", "java.util" ]
ca.nrc.cadc; java.util;
331,616
@Override public void setCursorName(String name) throws SQLException { try { debugCodeCall("setCursorName", name); checkClosed(); } catch (Exception e) { throw logAndConvert(e); } }
void function(String name) throws SQLException { try { debugCodeCall(STR, name); checkClosed(); } catch (Exception e) { throw logAndConvert(e); } }
/** * Sets the name of the cursor. This call is ignored. * * @param name ignored * @throws SQLException if this object is closed */
Sets the name of the cursor. This call is ignored
setCursorName
{ "repo_name": "ferquies/2dam", "path": "AD/Tema 2/h2/src/main/org/h2/jdbc/JdbcStatement.java", "license": "gpl-3.0", "size": 34682 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,900,222
public T caseBFalse(BFalse object) { return null; }
T function(BFalse object) { return null; }
/** * Returns the result of interpreting the object as an instance of '<em>BFalse</em>'. * <!-- begin-user-doc --> * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> * @param object the target of the switch. * @return the result of interpre...
Returns the result of interpreting the object as an instance of 'BFalse'. This implementation returns null; returning a non-null result will terminate the switch.
caseBFalse
{ "repo_name": "nhnghia/schora", "path": "src/fr/lri/schora/expr/util/ExprSwitch.java", "license": "gpl-2.0", "size": 21477 }
[ "fr.lri.schora.expr.BFalse" ]
import fr.lri.schora.expr.BFalse;
import fr.lri.schora.expr.*;
[ "fr.lri.schora" ]
fr.lri.schora;
1,117,394
protected void writeGraphicCtrlExt() throws IOException { out.write(0x21); // extension introducer out.write(0xf9); // GCE label out.write(4); // data block size int transp, disp; if (transparent == null) { transp = 0; disp = 0; // dispose = no action } else { transp = 1; disp = 2; // force c...
void function() throws IOException { out.write(0x21); out.write(0xf9); out.write(4); int transp, disp; if (transparent == null) { transp = 0; disp = 0; } else { transp = 1; disp = 2; } if (dispose >= 0) { disp = dispose & 7; } disp <<= 2; out.write(0 disp 0 transp); writeShort(delay); out.write(transIndex); out.write(0...
/** * Writes Graphic Control Extension */
Writes Graphic Control Extension
writeGraphicCtrlExt
{ "repo_name": "Banno/sbt-plantuml-plugin", "path": "src/main/java/net/sourceforge/plantuml/AnimatedGifEncoder.java", "license": "apache-2.0", "size": 33927 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,661,568
public void setDate(List<ANDSDate> date) { this.date = date; }
void function(List<ANDSDate> date) { this.date = date; }
/** * setDate * * Set the dates dates * * <pre> * Version Date Developer Description * 0.1 03/12/2012 Genevieve Turner(GT) Initial * </pre> * * @param date the date to set */
setDate Set the dates dates <code> Version Date Developer Description 0.1 03/12/2012 Genevieve Turner(GT) Initial </code>
setDate
{ "repo_name": "anu-doi/anudc", "path": "DataCommons/src/main/java/au/edu/anu/datacommons/ands/xml/Dates.java", "license": "gpl-3.0", "size": 3289 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
713,075
private static IntegerConfigValue daysPopulateHistoricalCache = new IntegerConfigValue("transitclock.cache.core.daysPopulateHistoricalCache", 0, "How many days data to read in to populate historical cache on start up."); public static boolean storeDataInDatabase() { return storeDataInDatabase.getValue(); ...
static IntegerConfigValue daysPopulateHistoricalCache = new IntegerConfigValue(STR, 0, STR); public static boolean function() { return storeDataInDatabase.getValue(); } static BooleanConfigValue function = new BooleanConfigValue(STR, true, STR + STR + STR + STR);
/** * When in playback mode or some other situations don't want to store * generated data such as arrivals/departures, events, and such to the * database because only debugging. * * @return */
When in playback mode or some other situations don't want to store generated data such as arrivals/departures, events, and such to the database because only debugging
storeDataInDatabase
{ "repo_name": "TheTransitClock/transitime", "path": "transitclock/src/main/java/org/transitclock/configData/CoreConfig.java", "license": "gpl-3.0", "size": 31328 }
[ "org.transitclock.config.BooleanConfigValue", "org.transitclock.config.IntegerConfigValue" ]
import org.transitclock.config.BooleanConfigValue; import org.transitclock.config.IntegerConfigValue;
import org.transitclock.config.*;
[ "org.transitclock.config" ]
org.transitclock.config;
2,043,238
public void testConcurrentRenames() throws Exception { for (int i = 0; i < REPEAT_CNT; i++) { final CyclicBarrier barrier = new CyclicBarrier(2); create(igfs, paths(DIR, SUBDIR, DIR_NEW), paths());
void function() throws Exception { for (int i = 0; i < REPEAT_CNT; i++) { final CyclicBarrier barrier = new CyclicBarrier(2); create(igfs, paths(DIR, SUBDIR, DIR_NEW), paths());
/** * Ensure file system consistency in case two concurrent rename requests are executed: A -> B and B -> A. * * @throws Exception If failed. */
Ensure file system consistency in case two concurrent rename requests are executed: A -> B and B -> A
testConcurrentRenames
{ "repo_name": "zzcclp/ignite", "path": "modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractSelfTest.java", "license": "apache-2.0", "size": 87306 }
[ "java.util.concurrent.CyclicBarrier" ]
import java.util.concurrent.CyclicBarrier;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,825,638
@SuppressWarnings("static-access") private void executeGdal( File chartFile, String chartName, List<String> argList, List<String> tilesList ) throws IOException, InterruptedException { File processDir = chartFile.getParentFile(); //mkdir $1 //gdal_translate -of vrt -expand rgba $1.kap temp.vrt ProcessBuild...
@SuppressWarnings(STR) void function( File chartFile, String chartName, List<String> argList, List<String> tilesList ) throws IOException, InterruptedException { File processDir = chartFile.getParentFile(); ProcessBuilder pb = new ProcessBuilder(argList); pb.directory(processDir); if(manager){ ForkWorker fork = new For...
/** * Executes a script which invokes GDAL and imagemagick to process the chart * into a tile pyramid * * @param config2 * @param chartFile * @param chartName * @param list * @throws IOException * @throws InterruptedException */
Executes a script which invokes GDAL and imagemagick to process the chart into a tile pyramid
executeGdal
{ "repo_name": "rob42/freeboard-server", "path": "src/main/java/nz/co/fortytwo/freeboard/server/util/ChartProcessor.java", "license": "gpl-3.0", "size": 13455 }
[ "java.io.File", "java.io.IOException", "java.util.List" ]
import java.io.File; import java.io.IOException; import java.util.List;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
2,211,042
private void checkInsertedValue(String jsonPart1, String jsonPart2) throws DatabaseEngineException { Expression query = select(all()).from(table(TEST_TABLE)); List<Map<String, ResultColumn>> results = dbEngine.query(query); assertEquals("One value inserted", 1, results.size()); Map<S...
void function(String jsonPart1, String jsonPart2) throws DatabaseEngineException { Expression query = select(all()).from(table(TEST_TABLE)); List<Map<String, ResultColumn>> results = dbEngine.query(query); assertEquals(STR, 1, results.size()); Map<String, ResultColumn> firstRow = results.get(0); assertNotNull(STR, firs...
/** * Checks that the test table has a single entry and with the values as expected. */
Checks that the test table has a single entry and with the values as expected
checkInsertedValue
{ "repo_name": "feedzai/pdb", "path": "src/test/java/com/feedzai/commons/sql/abstraction/engine/impl/abs/JSonTest.java", "license": "apache-2.0", "size": 9090 }
[ "com.feedzai.commons.sql.abstraction.dml.Expression", "com.feedzai.commons.sql.abstraction.dml.dialect.SqlBuilder", "com.feedzai.commons.sql.abstraction.dml.result.ResultColumn", "com.feedzai.commons.sql.abstraction.engine.DatabaseEngineException", "java.util.List", "java.util.Map", "org.junit.Assert" ]
import com.feedzai.commons.sql.abstraction.dml.Expression; import com.feedzai.commons.sql.abstraction.dml.dialect.SqlBuilder; import com.feedzai.commons.sql.abstraction.dml.result.ResultColumn; import com.feedzai.commons.sql.abstraction.engine.DatabaseEngineException; import java.util.List; import java.util.Map; import...
import com.feedzai.commons.sql.abstraction.dml.*; import com.feedzai.commons.sql.abstraction.dml.dialect.*; import com.feedzai.commons.sql.abstraction.dml.result.*; import com.feedzai.commons.sql.abstraction.engine.*; import java.util.*; import org.junit.*;
[ "com.feedzai.commons", "java.util", "org.junit" ]
com.feedzai.commons; java.util; org.junit;
2,215,371
@Test(expectedExceptions = { LDAPException.class }) public void testDecodeInvalidType() throws Exception { ASN1Element[] elements = { new ASN1Element((byte) 0x00, new byte[0]) }; IntermediateClientRequestValue.decode(new ASN1Sequence(elements)); }
@Test(expectedExceptions = { LDAPException.class }) void function() throws Exception { ASN1Element[] elements = { new ASN1Element((byte) 0x00, new byte[0]) }; IntermediateClientRequestValue.decode(new ASN1Sequence(elements)); }
/** * Tests the {@code decode} method with an element containing an invalid type. * * @throws Exception If an unexpected problem occurs. */
Tests the decode method with an element containing an invalid type
testDecodeInvalidType
{ "repo_name": "UnboundID/ldapsdk", "path": "tests/unit/src/com/unboundid/ldap/sdk/unboundidds/controls/IntermediateClientRequestValueTestCase.java", "license": "gpl-2.0", "size": 17102 }
[ "com.unboundid.asn1.ASN1Element", "com.unboundid.asn1.ASN1Sequence", "com.unboundid.ldap.sdk.LDAPException", "org.testng.annotations.Test" ]
import com.unboundid.asn1.ASN1Element; import com.unboundid.asn1.ASN1Sequence; import com.unboundid.ldap.sdk.LDAPException; import org.testng.annotations.Test;
import com.unboundid.asn1.*; import com.unboundid.ldap.sdk.*; import org.testng.annotations.*;
[ "com.unboundid.asn1", "com.unboundid.ldap", "org.testng.annotations" ]
com.unboundid.asn1; com.unboundid.ldap; org.testng.annotations;
1,371,790
public String getGuId(final String owner) { for (final SbObj tmp : objList) { if (tmp.getGuName().equals(owner)) { return tmp.getGu(); } } return null; }
String function(final String owner) { for (final SbObj tmp : objList) { if (tmp.getGuName().equals(owner)) { return tmp.getGu(); } } return null; }
/** * DOCUMENT ME! * * @param owner DOCUMENT ME! * * @return DOCUMENT ME! */
DOCUMENT ME
getGuId
{ "repo_name": "cismet/watergis-client", "path": "src/main/java/de/cismet/watergis/reports/SbHelper.java", "license": "lgpl-3.0", "size": 18698 }
[ "de.cismet.watergis.reports.types.SbObj" ]
import de.cismet.watergis.reports.types.SbObj;
import de.cismet.watergis.reports.types.*;
[ "de.cismet.watergis" ]
de.cismet.watergis;
384,060
void initialize(CredentialProvider provider, File resources) throws CoreException { notNull(provider, "provider is undefined."); notNull(resources, "resources is undefined."); // create execution result String message = messageProvider.getMessage("ci.initialize_info"); ExecutionResult executionResul...
void initialize(CredentialProvider provider, File resources) throws CoreException { notNull(provider, STR); notNull(resources, STR); String message = messageProvider.getMessage(STR); ExecutionResult executionResult = resultRepository.startExecution(message); this.credentialProvider = provider; try { addMetadataForRepor...
/** * Initialize the core component. * * @param resources Environment configuration file which contains resource * definitions. * @param provider Credential provider, which can provide credentials for * external resources. * * @throws CoreException ...
Initialize the core component
initialize
{ "repo_name": "athrane/pineapple", "path": "modules/pineapple-core/src/main/java/com/alpha/pineapple/CoreImpl.java", "license": "gpl-3.0", "size": 16758 }
[ "com.alpha.javautils.ArgumentUtils", "com.alpha.pineapple.command.CommandFacadeException", "com.alpha.pineapple.credential.CredentialProvider", "com.alpha.pineapple.execution.ExecutionResult", "java.io.File" ]
import com.alpha.javautils.ArgumentUtils; import com.alpha.pineapple.command.CommandFacadeException; import com.alpha.pineapple.credential.CredentialProvider; import com.alpha.pineapple.execution.ExecutionResult; import java.io.File;
import com.alpha.javautils.*; import com.alpha.pineapple.command.*; import com.alpha.pineapple.credential.*; import com.alpha.pineapple.execution.*; import java.io.*;
[ "com.alpha.javautils", "com.alpha.pineapple", "java.io" ]
com.alpha.javautils; com.alpha.pineapple; java.io;
2,361,229
public Festival[] getOnlineFestivals(int numberOfResults) throws ClientDoesNotHavePermissionException { return externalDatabaseHandler.readMultipleFestivals(numberOfResults); }
Festival[] function(int numberOfResults) throws ClientDoesNotHavePermissionException { return externalDatabaseHandler.readMultipleFestivals(numberOfResults); }
/** * return top festival results from the online database. If the number of found festival is * lesser than the requested number of festivals all found festivals are returned * * @param numberOfResults number of festivals to return * @return festivals from the online database * @throws Cl...
return top festival results from the online database. If the number of found festival is lesser than the requested number of festivals all found festivals are returned
getOnlineFestivals
{ "repo_name": "amentis/FestPal-Android", "path": "app/src/main/java/com/ivanbratoev/festpal/datamodel/DataModel.java", "license": "apache-2.0", "size": 25628 }
[ "com.ivanbratoev.festpal.datamodel.db.external.ClientDoesNotHavePermissionException" ]
import com.ivanbratoev.festpal.datamodel.db.external.ClientDoesNotHavePermissionException;
import com.ivanbratoev.festpal.datamodel.db.external.*;
[ "com.ivanbratoev.festpal" ]
com.ivanbratoev.festpal;
332,314
@ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable<RoleInstanceInner> list(String locationName, String vendorName, String serviceKey) { return new PagedIterable<>(listAsync(locationName, vendorName, serviceKey)); }
@ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<RoleInstanceInner> function(String locationName, String vendorName, String serviceKey) { return new PagedIterable<>(listAsync(locationName, vendorName, serviceKey)); }
/** * Lists the information of role instances of vendor network function. * * @param locationName The Azure region where the network function resource was created by customer. * @param vendorName The name of the vendor. * @param serviceKey The GUID for the vendor network function. * @throw...
Lists the information of role instances of vendor network function
list
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/hybridnetwork/azure-resourcemanager-hybridnetwork/src/main/java/com/azure/resourcemanager/hybridnetwork/implementation/RoleInstancesClientImpl.java", "license": "mit", "size": 72780 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedIterable", "com.azure.resourcemanager.hybridnetwork.fluent.models.RoleInstanceInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.resourcemanager.hybridnetwork.fluent.models.RoleInstanceInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.hybridnetwork.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
672,813
private String getPcepTunnelKey(TunnelId tunnelId) { for (String key : tunnelMap.keySet()) { if (tunnelMap.get(key).id() == tunnelId.id()) { return key; } } return null; }
String function(TunnelId tunnelId) { for (String key : tunnelMap.keySet()) { if (tunnelMap.get(key).id() == tunnelId.id()) { return key; } } return null; }
/** * Get the tunnel key according to the tunnelID. * * @param tunnelId tunnel id * @return corresponding a tunnel key of the tunnel id. */
Get the tunnel key according to the tunnelID
getPcepTunnelKey
{ "repo_name": "paradisecr/ONOS-OXP", "path": "providers/pcep/tunnel/src/main/java/org/onosproject/provider/pcep/tunnel/impl/PcepTunnelProvider.java", "license": "apache-2.0", "size": 86475 }
[ "org.onlab.util.Tools", "org.onosproject.incubator.net.tunnel.TunnelId" ]
import org.onlab.util.Tools; import org.onosproject.incubator.net.tunnel.TunnelId;
import org.onlab.util.*; import org.onosproject.incubator.net.tunnel.*;
[ "org.onlab.util", "org.onosproject.incubator" ]
org.onlab.util; org.onosproject.incubator;
2,835,064
void addMatchingRequests(RequestStore requestStore, List<String> participantIds, TimeSlot meetingSlot, List<String> commonTags, Collection<ChatRequest> reqs) { Event event = CalendarUtils.createEvent(meetingSlot, participantIds, commonTags); String randomChosenOrgnaiser = reqs.iterator().next().getUserI...
void addMatchingRequests(RequestStore requestStore, List<String> participantIds, TimeSlot meetingSlot, List<String> commonTags, Collection<ChatRequest> reqs) { Event event = CalendarUtils.createEvent(meetingSlot, participantIds, commonTags); String randomChosenOrgnaiser = reqs.iterator().next().getUserId(); CalendarUti...
/** * Creates calendar events and datastore entries for matched requests and their details * Package-private for testing purposes, not intended for direct usage but can be used. * * @param requestStore Instance of RequestStore providing access to entities in datastore. * @param participantIds List of S...
Creates calendar events and datastore entries for matched requests and their details Package-private for testing purposes, not intended for direct usage but can be used
addMatchingRequests
{ "repo_name": "googleinterns/step250-2020", "path": "coffee-chats/src/main/java/com/google/step/coffee/tasks/RequestMatcher.java", "license": "apache-2.0", "size": 18885 }
[ "com.google.api.services.calendar.model.Event", "com.google.step.coffee.data.CalendarUtils", "com.google.step.coffee.data.RequestStore", "com.google.step.coffee.entity.ChatRequest", "com.google.step.coffee.entity.TimeSlot", "java.util.Collection", "java.util.List" ]
import com.google.api.services.calendar.model.Event; import com.google.step.coffee.data.CalendarUtils; import com.google.step.coffee.data.RequestStore; import com.google.step.coffee.entity.ChatRequest; import com.google.step.coffee.entity.TimeSlot; import java.util.Collection; import java.util.List;
import com.google.api.services.calendar.model.*; import com.google.step.coffee.data.*; import com.google.step.coffee.entity.*; import java.util.*;
[ "com.google.api", "com.google.step", "java.util" ]
com.google.api; com.google.step; java.util;
641,236
public static void validateItemType(MaxCulBindingConfig config, Item item) throws BindingConfigParseException { switch (config.getDeviceType()) { case PAIR_MODE: case LISTEN_MODE: case LED_MODE: if (!(item instanceof SwitchItem)) { thro...
static void function(MaxCulBindingConfig config, Item item) throws BindingConfigParseException { switch (config.getDeviceType()) { case PAIR_MODE: case LISTEN_MODE: case LED_MODE: if (!(item instanceof SwitchItem)) { throw new BindingConfigParseException( STR); } else if (config.getFeature() == MaxCulFeature.RESET && !...
/** * Validate if an item is of a valid type * * @param config * Populated configuration to check * @param item * Item to check * @throws BindingConfigParseException * Thrown when item type is invalid */
Validate if an item is of a valid type
validateItemType
{ "repo_name": "lewie/openhab", "path": "bundles/binding/org.openhab.binding.maxcul/src/main/java/org/openhab/binding/maxcul/internal/MaxCulBindingConfigParser.java", "license": "epl-1.0", "size": 16405 }
[ "org.openhab.core.items.Item", "org.openhab.core.library.items.ContactItem", "org.openhab.core.library.items.NumberItem", "org.openhab.core.library.items.SwitchItem", "org.openhab.model.item.binding.BindingConfigParseException" ]
import org.openhab.core.items.Item; import org.openhab.core.library.items.ContactItem; import org.openhab.core.library.items.NumberItem; import org.openhab.core.library.items.SwitchItem; import org.openhab.model.item.binding.BindingConfigParseException;
import org.openhab.core.items.*; import org.openhab.core.library.items.*; import org.openhab.model.item.binding.*;
[ "org.openhab.core", "org.openhab.model" ]
org.openhab.core; org.openhab.model;
1,798,236
@Override public synchronized Aead getAead(String uri) throws GeneralSecurityException { if (this.keyUri != null && !this.keyUri.equals(uri)) { throw new GeneralSecurityException( String.format("this client is bound to %s, cannot load keys bound to %s", this.keyUri, uri)); } ...
synchronized Aead function(String uri) throws GeneralSecurityException { if (this.keyUri != null && !this.keyUri.equals(uri)) { throw new GeneralSecurityException( String.format(STR, this.keyUri, uri)); } Aead aead = new AndroidKeystoreAesGcm( Validators.validateKmsKeyUriAndRemovePrefix(PREFIX, uri), keyStore); return ...
/** * Returns an {@link Aead} backed by a key in Android Keystore specified by {@code uri}. * * <p>Since Android Keystore is somewhat unreliable, a self-test is done against the key. This * will incur a small performance penalty. */
Returns an <code>Aead</code> backed by a key in Android Keystore specified by uri. Since Android Keystore is somewhat unreliable, a self-test is done against the key. This will incur a small performance penalty
getAead
{ "repo_name": "google/tink", "path": "java_src/src/main/java/com/google/crypto/tink/integration/android/AndroidKeystoreKmsClient.java", "license": "apache-2.0", "size": 9114 }
[ "com.google.crypto.tink.Aead", "com.google.crypto.tink.subtle.Validators", "java.security.GeneralSecurityException" ]
import com.google.crypto.tink.Aead; import com.google.crypto.tink.subtle.Validators; import java.security.GeneralSecurityException;
import com.google.crypto.tink.*; import com.google.crypto.tink.subtle.*; import java.security.*;
[ "com.google.crypto", "java.security" ]
com.google.crypto; java.security;
2,223,990
@Override public Iterator<IPortletWindowId> iterator() { return this.resolvedEventQueues.keySet().iterator(); }
Iterator<IPortletWindowId> function() { return this.resolvedEventQueues.keySet().iterator(); }
/** * Get an {@link Iterator} of all {@link IPortletWindowId}s that have {@link Event}s queued. */
Get an <code>Iterator</code> of all <code>IPortletWindowId</code>s that have <code>Event</code>s queued
iterator
{ "repo_name": "drewwills/uPortal", "path": "uportal-war/src/main/java/org/jasig/portal/portlet/rendering/PortletEventQueue.java", "license": "apache-2.0", "size": 3732 }
[ "java.util.Iterator", "org.jasig.portal.portlet.om.IPortletWindowId" ]
import java.util.Iterator; import org.jasig.portal.portlet.om.IPortletWindowId;
import java.util.*; import org.jasig.portal.portlet.om.*;
[ "java.util", "org.jasig.portal" ]
java.util; org.jasig.portal;
2,039,433
private boolean checkThermometer() { SensorManager sensorManager = (SensorManager) getSystemService(Context.SENSOR_SERVICE); Sensor temp = sensorManager.getDefaultSensor(Sensor.TYPE_AMBIENT_TEMPERATURE); if(temp==null) { hasThermometer = false; } else { hasThermometer = true; } return hasThermomete...
boolean function() { SensorManager sensorManager = (SensorManager) getSystemService(Context.SENSOR_SERVICE); Sensor temp = sensorManager.getDefaultSensor(Sensor.TYPE_AMBIENT_TEMPERATURE); if(temp==null) { hasThermometer = false; } else { hasThermometer = true; } return hasThermometer; }
/** * Check if we have a thermometer. */
Check if we have a thermometer
checkThermometer
{ "repo_name": "eric-stanley/pressureNET", "path": "src/ca/cumulonimbus/barometernetwork/BarometerNetworkActivity.java", "license": "gpl-3.0", "size": 117914 }
[ "android.content.Context", "android.hardware.Sensor", "android.hardware.SensorManager" ]
import android.content.Context; import android.hardware.Sensor; import android.hardware.SensorManager;
import android.content.*; import android.hardware.*;
[ "android.content", "android.hardware" ]
android.content; android.hardware;
220,476
void remove(Entity entity);
void remove(Entity entity);
/** * Removes the entity from the context and registers it as deleted. The entity will be removed from the data store * upon subsequent call to {@link #commit()}. * <p> * If the given entity is not in the context, nothing happens. */
Removes the entity from the context and registers it as deleted. The entity will be removed from the data store upon subsequent call to <code>#commit()</code>. If the given entity is not in the context, nothing happens
remove
{ "repo_name": "cuba-platform/cuba", "path": "modules/gui/src/com/haulmont/cuba/gui/model/DataContext.java", "license": "apache-2.0", "size": 15152 }
[ "com.haulmont.cuba.core.entity.Entity" ]
import com.haulmont.cuba.core.entity.Entity;
import com.haulmont.cuba.core.entity.*;
[ "com.haulmont.cuba" ]
com.haulmont.cuba;
2,798,211
private void createFields(DataRecordMetadata metadata, Node node) { Node complexNode = getNode(node, NAMESPACES, XSD_COMPLEX_TYPE); if (complexNode == null) return; Node seqFields = getNode(complexNode, NAMESPACES, XSD_SEQUENCE); if (seqFields == null) return; NodeList list = seqFields.getChildNodes(); ...
void function(DataRecordMetadata metadata, Node node) { Node complexNode = getNode(node, NAMESPACES, XSD_COMPLEX_TYPE); if (complexNode == null) return; Node seqFields = getNode(complexNode, NAMESPACES, XSD_SEQUENCE); if (seqFields == null) return; NodeList list = seqFields.getChildNodes(); Node field; String name; Str...
/** * Creates fields from xsd. * * @param metadata * @param node */
Creates fields from xsd
createFields
{ "repo_name": "CloverETL/CloverETL-Engine", "path": "cloveretl.engine/src/org/jetel/metadata/MetadataXsd.java", "license": "lgpl-2.1", "size": 11225 }
[ "org.w3c.dom.Node", "org.w3c.dom.NodeList" ]
import org.w3c.dom.Node; import org.w3c.dom.NodeList;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
2,071,744
IdentifyPillarsForPutFileRequest identifyPillarsForPutFileRequest = new IdentifyPillarsForPutFileRequest(); initializeMessageDetails(identifyPillarsForPutFileRequest); identifyPillarsForPutFileRequest.setCorrelationID(CORRELATION_ID_DEFAULT); identifyPillarsForPutFileRequest.setAuditTrailInforma...
IdentifyPillarsForPutFileRequest identifyPillarsForPutFileRequest = new IdentifyPillarsForPutFileRequest(); initializeMessageDetails(identifyPillarsForPutFileRequest); identifyPillarsForPutFileRequest.setCorrelationID(CORRELATION_ID_DEFAULT); identifyPillarsForPutFileRequest.setAuditTrailInformation(null); identifyPill...
/** * Retrieves a generic Identify message for the Put operation. * @return The IdentifyPillarsForPutFileRequest for the test. */
Retrieves a generic Identify message for the Put operation
createIdentifyPillarsForPutFileRequest
{ "repo_name": "bitrepository/reference", "path": "bitrepository-client/src/test/java/org/bitrepository/modify/putfile/TestPutFileMessageFactory.java", "license": "lgpl-2.1", "size": 9867 }
[ "org.bitrepository.bitrepositorymessages.IdentifyPillarsForPutFileRequest" ]
import org.bitrepository.bitrepositorymessages.IdentifyPillarsForPutFileRequest;
import org.bitrepository.bitrepositorymessages.*;
[ "org.bitrepository.bitrepositorymessages" ]
org.bitrepository.bitrepositorymessages;
2,650,884
@SuppressWarnings("rawtypes") public void registerTypeWithKryoSerializer( Class<?> type, Class<? extends Serializer> serializerClass) { if (type == null || serializerClass == null) { throw new NullPointerException("Cannot register null class or serializer."); } @...
@SuppressWarnings(STR) void function( Class<?> type, Class<? extends Serializer> serializerClass) { if (type == null serializerClass == null) { throw new NullPointerException(STR); } @SuppressWarnings(STR) Class<? extends Serializer<?>> castedSerializerClass = (Class<? extends Serializer<?>>) serializerClass; registere...
/** * Registers the given Serializer via its class as a serializer for the given type at the * KryoSerializer * * @param type The class of the types serialized with the given serializer. * @param serializerClass The class of the serializer to use. */
Registers the given Serializer via its class as a serializer for the given type at the KryoSerializer
registerTypeWithKryoSerializer
{ "repo_name": "godfreyhe/flink", "path": "flink-core/src/main/java/org/apache/flink/api/common/ExecutionConfig.java", "license": "apache-2.0", "size": 50766 }
[ "com.esotericsoftware.kryo.Serializer" ]
import com.esotericsoftware.kryo.Serializer;
import com.esotericsoftware.kryo.*;
[ "com.esotericsoftware.kryo" ]
com.esotericsoftware.kryo;
1,455,664
public void setResourcePersistence(ResourcePersistence resourcePersistence) { this.resourcePersistence = resourcePersistence; }
void function(ResourcePersistence resourcePersistence) { this.resourcePersistence = resourcePersistence; }
/** * Sets the resource persistence. * * @param resourcePersistence the resource persistence */
Sets the resource persistence
setResourcePersistence
{ "repo_name": "iucn-whp/world-heritage-outlook", "path": "portlets/iucn-dbservice-portlet/docroot/WEB-INF/src/com/iucn/whp/dbservice/service/base/mission_lkpLocalServiceBaseImpl.java", "license": "gpl-2.0", "size": 175113 }
[ "com.liferay.portal.service.persistence.ResourcePersistence" ]
import com.liferay.portal.service.persistence.ResourcePersistence;
import com.liferay.portal.service.persistence.*;
[ "com.liferay.portal" ]
com.liferay.portal;
232,069
private void removeRegInfoLocators(RegistrationInfo regInfo, LookupLocator[] locators) { HashSet removeSet = new HashSet(); for(int i=0;i<locators.length;i++) { removeSet.add(locators[i]); }//end...
void function(RegistrationInfo regInfo, LookupLocator[] locators) { HashSet removeSet = new HashSet(); for(int i=0;i<locators.length;i++) { removeSet.add(locators[i]); } (regInfo.locators).removeAll(removeSet); }
/** Removes the elements of the given set from the given registration's * current set of locators to discover. */
Removes the elements of the given set from the given registration's current set of locators to discover
removeRegInfoLocators
{ "repo_name": "cdegroot/river", "path": "src/com/sun/jini/fiddler/FiddlerImpl.java", "license": "apache-2.0", "size": 419779 }
[ "java.util.HashSet", "net.jini.core.discovery.LookupLocator" ]
import java.util.HashSet; import net.jini.core.discovery.LookupLocator;
import java.util.*; import net.jini.core.discovery.*;
[ "java.util", "net.jini.core" ]
java.util; net.jini.core;
872,659
public CreateCardChargeParams shipTo(final ShipTo shipTo) { return this.with("ship_to", shipTo); }
CreateCardChargeParams function(final ShipTo shipTo) { return this.with(STR, shipTo); }
/** * Sends shipping information. */
Sends shipping information
shipTo
{ "repo_name": "open-pay/openpay-java", "path": "src/main/java/mx/openpay/client/core/requests/transactions/CreateAlipayChargeParams.java", "license": "apache-2.0", "size": 2952 }
[ "mx.openpay.client.ShipTo" ]
import mx.openpay.client.ShipTo;
import mx.openpay.client.*;
[ "mx.openpay.client" ]
mx.openpay.client;
2,176,150
Map<String, String> getDefaultViews() { return this.defaultViews; }
Map<String, String> getDefaultViews() { return this.defaultViews; }
/** * Returns a map of default views for each page * * @return Map of default views */
Returns a map of default views for each page
getDefaultViews
{ "repo_name": "Alfresco/community-edition", "path": "projects/web-client/source/java/org/alfresco/web/config/ViewsConfigElement.java", "license": "lgpl-3.0", "size": 11968 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,305,562
return queryTemplate.replace(ApplicationConstant.PLACE_HOLDER, cuisineType); }
return queryTemplate.replace(ApplicationConstant.PLACE_HOLDER, cuisineType); }
/** * This method provide the complete SQL query by constructing template query * with requested input. with actual requested parameter and provides * complete SQL query. */
This method provide the complete SQL query by constructing template query with requested input. with actual requested parameter and provides complete SQL query
readQuery
{ "repo_name": "ravi115/RestaurantApp", "path": "RestaurantApp/src/com/mobile/restaurant/query/QueryReader.java", "license": "apache-2.0", "size": 1107 }
[ "com.mobile.restaurant.constant.ApplicationConstant" ]
import com.mobile.restaurant.constant.ApplicationConstant;
import com.mobile.restaurant.constant.*;
[ "com.mobile.restaurant" ]
com.mobile.restaurant;
1,255,373
public static void main(String[] args) { JFrame frame = new JFrame(); Container content = frame.getContentPane(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); content.add(new VertexDemo()); frame.pack(); frame.setVisible(true); }
static void function(String[] args) { JFrame frame = new JFrame(); Container content = frame.getContentPane(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); content.add(new VertexDemo()); frame.pack(); frame.setVisible(true); }
/** * a driver for this demo */
a driver for this demo
main
{ "repo_name": "yawlfoundation/yawl", "path": "src/org/yawlfoundation/yawl/procletService/editor/pconns/VertexDemo.java", "license": "lgpl-3.0", "size": 21883 }
[ "java.awt.Container", "javax.swing.JFrame" ]
import java.awt.Container; import javax.swing.JFrame;
import java.awt.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
2,363,896
public Component getComponent() { if (!componentsInitialized) initComponents(); return this.thePanel; }
Component function() { if (!componentsInitialized) initComponents(); return this.thePanel; }
/** * returns the JPanel component. * @return the JPanel component. */
returns the JPanel component
getComponent
{ "repo_name": "autoplot/app", "path": "dasCore/src/org/das2/components/DasProgressPanel.java", "license": "gpl-2.0", "size": 29260 }
[ "java.awt.Component" ]
import java.awt.Component;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,447,082
public void start_tile(Point2D p_point) { if (board_is_read_only) { // no eu.mihosoft.freerouting.interactive action when logfile is running return; } FloatPoint location = graphics_context.coordinate_transform.screen_to_board(p_point); set_interac...
void function(Point2D p_point) { if (board_is_read_only) { return; } FloatPoint location = graphics_context.coordinate_transform.screen_to_board(p_point); set_interactive_state(TileConstructionState.get_instance(location, this.interactive_state, this, logfile)); }
/** * Start interactively creating a tile shaped obstacle. */
Start interactively creating a tile shaped obstacle
start_tile
{ "repo_name": "andrasfuchs/BioBalanceDetector", "path": "Tools/KiCad_FreeRouting/FreeRouting-miho-master/freerouting-master/src/main/java/eu/mihosoft/freerouting/interactive/BoardHandling.java", "license": "gpl-3.0", "size": 57907 }
[ "eu.mihosoft.freerouting.geometry.planar.FloatPoint", "java.awt.geom.Point2D" ]
import eu.mihosoft.freerouting.geometry.planar.FloatPoint; import java.awt.geom.Point2D;
import eu.mihosoft.freerouting.geometry.planar.*; import java.awt.geom.*;
[ "eu.mihosoft.freerouting", "java.awt" ]
eu.mihosoft.freerouting; java.awt;
245,698
public void setContentPane(Container contentPane) { getRootPane().setContentPane(contentPane); }
void function(Container contentPane) { getRootPane().setContentPane(contentPane); }
/** * Sets the contentPane property. This method is called by the constructor. * @param contentPane the contentPane object for this applet * * @exception java.awt.IllegalComponentStateException (a runtime * exception) if the content pane parameter is null * @see #getContentPane...
Sets the contentPane property. This method is called by the constructor
setContentPane
{ "repo_name": "universsky/openjdk", "path": "jdk/src/java.desktop/share/classes/javax/swing/JApplet.java", "license": "gpl-2.0", "size": 19704 }
[ "java.awt.Container" ]
import java.awt.Container;
import java.awt.*;
[ "java.awt" ]
java.awt;
2,036,034
public void enableErasureCodingPolicy(String ecPolicyName) throws IOException { dfs.enableErasureCodingPolicy(ecPolicyName); }
void function(String ecPolicyName) throws IOException { dfs.enableErasureCodingPolicy(ecPolicyName); }
/** * Enable erasure coding policy. * * @param ecPolicyName The name of the policy to be enabled. * @throws IOException */
Enable erasure coding policy
enableErasureCodingPolicy
{ "repo_name": "GeLiXin/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java", "license": "apache-2.0", "size": 115559 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
292,062
public GroupRow getRootGroup(String name) throws AdminPersistenceException { List<GroupRow> rows = getRows(SELECT_ROOT_GROUP_BY_NAME, new String[]{name}); GroupRow[] groups = rows.toArray(new GroupRow[rows.size()]); if (groups.length == 0) { return null; } if (groups.length == 1) { re...
GroupRow function(String name) throws AdminPersistenceException { List<GroupRow> rows = getRows(SELECT_ROOT_GROUP_BY_NAME, new String[]{name}); GroupRow[] groups = rows.toArray(new GroupRow[rows.size()]); if (groups.length == 0) { return null; } if (groups.length == 1) { return groups[0]; } throw new AdminPersistenceEx...
/** * Returns the root Group whith the given name. * @param name * @return the root Group whith the given name. * @throws AdminPersistenceException */
Returns the root Group whith the given name
getRootGroup
{ "repo_name": "stephaneperry/Silverpeas-Core", "path": "lib-core/src/main/java/com/stratelia/webactiv/organization/GroupTable.java", "license": "agpl-3.0", "size": 34468 }
[ "com.stratelia.webactiv.util.exception.SilverpeasException", "java.util.List" ]
import com.stratelia.webactiv.util.exception.SilverpeasException; import java.util.List;
import com.stratelia.webactiv.util.exception.*; import java.util.*;
[ "com.stratelia.webactiv", "java.util" ]
com.stratelia.webactiv; java.util;
288,433
@WebMethod(operationName = "GetGeoIP", action = "http://www.webservicex.net/GetGeoIP") @RequestWrapper(localName = "GetGeoIP", targetNamespace = "http://www.webservicex.net/", className = "net.webservicex.GetGeoIP") @ResponseWrapper(localName = "GetGeoIPResponse", targetNamespace = "http://www.webservicex.n...
@WebMethod(operationName = STR, action = "http: @RequestWrapper(localName = STR, targetNamespace = "http: @ResponseWrapper(localName = "GetGeoIPResponseSTRhttp: @WebResult(name = "GetGeoIPResultSTRhttp: net.webservicex.GeoIP function( @WebParam(name = "IPAddressSTRhttp: java.lang.String ipAddress );
/** * GeoIPService - GetGeoIP enables you to easily look up countries by IP addresses */
GeoIPService - GetGeoIP enables you to easily look up countries by IP addresses
getGeoIP
{ "repo_name": "manyurij/java_study", "path": "soap-sample/src/main/java/net/webservicex/GeoIPServiceSoap.java", "license": "apache-2.0", "size": 1955 }
[ "javax.jws.WebMethod", "javax.jws.WebParam", "javax.jws.WebResult", "javax.xml.ws.RequestWrapper", "javax.xml.ws.ResponseWrapper" ]
import javax.jws.WebMethod; import javax.jws.WebParam; import javax.jws.WebResult; import javax.xml.ws.RequestWrapper; import javax.xml.ws.ResponseWrapper;
import javax.jws.*; import javax.xml.ws.*;
[ "javax.jws", "javax.xml" ]
javax.jws; javax.xml;
2,407,443
public TreeReference getEntityFromID(EvaluationContext ec, String elementId) { //The uniqueid here is the value selected, so we can in theory track down the value we're looking for. //Get root nodeset TreeReference nodesetRef = this.getNodeset().clone(); Vector<XPathExpression> pred...
TreeReference function(EvaluationContext ec, String elementId) { TreeReference nodesetRef = this.getNodeset().clone(); Vector<XPathExpression> predicates = nodesetRef.getPredicate(nodesetRef.size() - 1); if (predicates == null) { predicates = new Vector<>(); } XPathEqExpr caseIdSelection = new XPathEqExpr(XPathEqExpr.E...
/** * Takes an ID and identifies a reference in the provided context which corresponds * to that element if one can be found. * * NOT GUARANTEED TO WORK! May return an entity if one exists */
Takes an ID and identifies a reference in the provided context which corresponds to that element if one can be found. NOT GUARANTEED TO WORK! May return an entity if one exists
getEntityFromID
{ "repo_name": "dimagi/commcare", "path": "src/main/java/org/commcare/suite/model/EntityDatum.java", "license": "apache-2.0", "size": 6479 }
[ "java.util.Vector", "org.javarosa.core.model.condition.EvaluationContext", "org.javarosa.core.model.instance.TreeReference", "org.javarosa.model.xform.XPathReference", "org.javarosa.xpath.expr.XPathEqExpr", "org.javarosa.xpath.expr.XPathExpression", "org.javarosa.xpath.expr.XPathStringLiteral" ]
import java.util.Vector; import org.javarosa.core.model.condition.EvaluationContext; import org.javarosa.core.model.instance.TreeReference; import org.javarosa.model.xform.XPathReference; import org.javarosa.xpath.expr.XPathEqExpr; import org.javarosa.xpath.expr.XPathExpression; import org.javarosa.xpath.expr.XPathStri...
import java.util.*; import org.javarosa.core.model.condition.*; import org.javarosa.core.model.instance.*; import org.javarosa.model.xform.*; import org.javarosa.xpath.expr.*;
[ "java.util", "org.javarosa.core", "org.javarosa.model", "org.javarosa.xpath" ]
java.util; org.javarosa.core; org.javarosa.model; org.javarosa.xpath;
2,541,894
@Test public void testExtensionInstructionWrapperEquals() { checkEqualsAndToString(extensionInstruction1, sameAsExtensionInstruction1, extensionInstruction2); } // ModMplsHeaderInstructions private final EthType ethType1 = new ...
void function() { checkEqualsAndToString(extensionInstruction1, sameAsExtensionInstruction1, extensionInstruction2); } private final EthType ethType1 = new EthType(1); private final EthType ethType2 = new EthType(2); private final Instruction modMplsHeaderInstruction1 = Instructions.popMpls(ethType1); private final Ins...
/** * Test the equals() method of the ExtensionInstructionWrapper class. */
Test the equals() method of the ExtensionInstructionWrapper class
testExtensionInstructionWrapperEquals
{ "repo_name": "LorenzReinhart/ONOSnew", "path": "core/api/src/test/java/org/onosproject/net/flow/instructions/InstructionsTest.java", "license": "apache-2.0", "size": 53514 }
[ "org.onlab.packet.EthType" ]
import org.onlab.packet.EthType;
import org.onlab.packet.*;
[ "org.onlab.packet" ]
org.onlab.packet;
2,252,401
PublishNotify createPublishNotify(Identifier i1, Document md);
PublishNotify createPublishNotify(Identifier i1, Document md);
/** * Create a new {@link PublishNotify} instance that is used to publish * metadata to an {@link Identifier}. * * @param i1 the {@link Identifier} to which the given metadata is published to * @param md the metadata that shall be published * @return the new {@link PublishNotify} instance */
Create a new <code>PublishNotify</code> instance that is used to publish metadata to an <code>Identifier</code>
createPublishNotify
{ "repo_name": "trustathsh/ifmapj", "path": "src/main/java/de/hshannover/f4/trust/ifmapj/messages/RequestFactory.java", "license": "apache-2.0", "size": 14988 }
[ "de.hshannover.f4.trust.ifmapj.identifier.Identifier", "org.w3c.dom.Document" ]
import de.hshannover.f4.trust.ifmapj.identifier.Identifier; import org.w3c.dom.Document;
import de.hshannover.f4.trust.ifmapj.identifier.*; import org.w3c.dom.*;
[ "de.hshannover.f4", "org.w3c.dom" ]
de.hshannover.f4; org.w3c.dom;
2,548,229
public void addAll(final Collection<Object> list) { synchronized (models) { models.addAll(list); if (models.size() > modelSaveSize) { interrupt(); } } }
void function(final Collection<Object> list) { synchronized (models) { models.addAll(list); if (models.size() > modelSaveSize) { interrupt(); } } }
/** * Adds a {@link java.util.Collection} of DB objects to this queue */
Adds a <code>java.util.Collection</code> of DB objects to this queue
addAll
{ "repo_name": "mickele/DBFlow", "path": "dbflow/src/main/java/com/raizlabs/android/dbflow/runtime/DBBatchSaveQueue.java", "license": "mit", "size": 7740 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
589,547
public void setIdentity(Identity identity) { identityEnvironment.setIdentity(identity); }
void function(Identity identity) { identityEnvironment.setIdentity(identity); }
/** * Sets the identity. * * @param identity * The identity to set */
Sets the identity
setIdentity
{ "repo_name": "huihoo/olat", "path": "olat7.8/src/main/java/org/olat/presentation/commons/session/UserSession.java", "license": "apache-2.0", "size": 30163 }
[ "org.olat.data.basesecurity.Identity" ]
import org.olat.data.basesecurity.Identity;
import org.olat.data.basesecurity.*;
[ "org.olat.data" ]
org.olat.data;
1,912,733
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jMenuBar1 = new javax.swing.JMenuBar(); menuFile = new javax.swing.JMenu(); menuItemFileImport = new javax.swing.JMenuItem(); ...
@SuppressWarnings(STR) void function() { jMenuBar1 = new javax.swing.JMenuBar(); menuFile = new javax.swing.JMenu(); menuItemFileImport = new javax.swing.JMenuItem(); jSeparator4 = new javax.swing.JPopupMenu.Separator(); menuItemFileOpen = new javax.swing.JMenuItem(); menuItemFileSave = new javax.swing.JMenuItem(); men...
/** * This method is called from within the constructor to initialize the form. WARNING: Do NOT * modify this code. The content of this method is always regenerated by the Form Editor. */
modify this code. The content of this method is always regenerated by the Form Editor
initComponents
{ "repo_name": "miurahr/tmpotter", "path": "src/main/java/org/tmpotter/ui/MainWindow.java", "license": "gpl-3.0", "size": 28559 }
[ "java.awt.Dimension", "java.io.File", "javax.swing.JMenuItem", "javax.swing.text.DefaultEditorKit", "org.openide.awt.Mnemonics", "org.tmpotter.util.Localization" ]
import java.awt.Dimension; import java.io.File; import javax.swing.JMenuItem; import javax.swing.text.DefaultEditorKit; import org.openide.awt.Mnemonics; import org.tmpotter.util.Localization;
import java.awt.*; import java.io.*; import javax.swing.*; import javax.swing.text.*; import org.openide.awt.*; import org.tmpotter.util.*;
[ "java.awt", "java.io", "javax.swing", "org.openide.awt", "org.tmpotter.util" ]
java.awt; java.io; javax.swing; org.openide.awt; org.tmpotter.util;
379,541
public static Game createGame(String rawJSON) throws FacebookException { try { JSONObject json = new JSONObject(rawJSON); return gameConstructor.newInstance(json); } catch (InstantiationException e) { throw new FacebookException(e); } catch (IllegalAccessE...
static Game function(String rawJSON) throws FacebookException { try { JSONObject json = new JSONObject(rawJSON); return gameConstructor.newInstance(json); } catch (InstantiationException e) { throw new FacebookException(e); } catch (IllegalAccessException e) { throw new AssertionError(e); } catch (InvocationTargetExcep...
/** * Constructs a Game object from rawJSON string. * * @param rawJSON raw JSON form as String * @return Game * @throws FacebookException when provided string is not a valid JSON string. */
Constructs a Game object from rawJSON string
createGame
{ "repo_name": "igorekpotworek/facebook4j", "path": "facebook4j-core/src/main/java/facebook4j/json/DataObjectFactory.java", "license": "apache-2.0", "size": 57208 }
[ "java.lang.reflect.InvocationTargetException" ]
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
1,594,030
@Test public void testAutoGeneratedDefaultBoolean_y() { final Object obj = new AutoKeyAndVal<Boolean>() { @DynamoDBAutoGeneratedDefault("y") public Boolean getVal() { return super.getVal(); }
void function() { final Object obj = new AutoKeyAndVal<Boolean>() { @DynamoDBAutoGeneratedDefault("y") public Boolean getVal() { return super.getVal(); }
/** * Test mappings. */
Test mappings
testAutoGeneratedDefaultBoolean_y
{ "repo_name": "jentfoo/aws-sdk-java", "path": "aws-java-sdk-dynamodb/src/test/java/com/amazonaws/services/dynamodbv2/datamodeling/StandardModelFactoriesTest.java", "license": "apache-2.0", "size": 62787 }
[ "com.amazonaws.services.dynamodbv2.pojos.AutoKeyAndVal" ]
import com.amazonaws.services.dynamodbv2.pojos.AutoKeyAndVal;
import com.amazonaws.services.dynamodbv2.pojos.*;
[ "com.amazonaws.services" ]
com.amazonaws.services;
2,708,657
protected final IndexResponse index(String index, String type, String id, Object... source) { return client().prepareIndex(index, type, id).setSource(source).execute().actionGet(); }
final IndexResponse function(String index, String type, String id, Object... source) { return client().prepareIndex(index, type, id).setSource(source).execute().actionGet(); }
/** * Syntactic sugar for: * <pre> * return client().prepareIndex(index, type, id).setSource(source).execute().actionGet(); * </pre> */
Syntactic sugar for: <code> return client().prepareIndex(index, type, id).setSource(source).execute().actionGet(); </code>
index
{ "repo_name": "sreeramjayan/elasticsearch", "path": "test/framework/src/main/java/org/elasticsearch/test/ESIntegTestCase.java", "license": "apache-2.0", "size": 100953 }
[ "org.elasticsearch.action.index.IndexResponse" ]
import org.elasticsearch.action.index.IndexResponse;
import org.elasticsearch.action.index.*;
[ "org.elasticsearch.action" ]
org.elasticsearch.action;
2,562,380
private boolean isDepthSufficient(Collection<File> files, int depth) throws IOException { final Set<FsFile> fsPaths = new HashSet<FsFile>(); for (final File file : files) if (!fsPaths.add(getFsFileFromClientFile(file, depth))) return false; return true; }
boolean function(Collection<File> files, int depth) throws IOException { final Set<FsFile> fsPaths = new HashSet<FsFile>(); for (final File file : files) if (!fsPaths.add(getFsFileFromClientFile(file, depth))) return false; return true; }
/** * Test if the given path component depth suffices for disambiguating the given set of * {@link File}s. Must be executed client-side. * @param files a set of {@link File}s * @param depth a path component depth * @return if the depth allows the {@link File}s to each be named distinctly *...
Test if the given path component depth suffices for disambiguating the given set of <code>File</code>s. Must be executed client-side
isDepthSufficient
{ "repo_name": "simleo/openmicroscopy", "path": "components/blitz/src/ome/services/blitz/repo/path/ClientFilePathTransformer.java", "license": "gpl-2.0", "size": 5283 }
[ "java.io.File", "java.io.IOException", "java.util.Collection", "java.util.HashSet", "java.util.Set" ]
import java.io.File; import java.io.IOException; import java.util.Collection; import java.util.HashSet; import java.util.Set;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
2,291,278
ActiveMQPrefetchPolicy p = new ActiveMQPrefetchPolicy(); if (getDurableTopicPrefetch() != null) { p.setDurableTopicPrefetch(getDurableTopicPrefetch()); } if (getMaximumPendingMessageLimit() != null) { p.setMaximumPendingMessageLimit(getMaximumPendingMessageLimit()); } if (getOptimizeDura...
ActiveMQPrefetchPolicy p = new ActiveMQPrefetchPolicy(); if (getDurableTopicPrefetch() != null) { p.setDurableTopicPrefetch(getDurableTopicPrefetch()); } if (getMaximumPendingMessageLimit() != null) { p.setMaximumPendingMessageLimit(getMaximumPendingMessageLimit()); } if (getOptimizeDurableTopicPrefetch() != null) { p....
/** * Create an ActiveMQPrefetchPolicy. * * @return an ActiveMQPrefetchPolicy */
Create an ActiveMQPrefetchPolicy
create
{ "repo_name": "adaptris/interlok", "path": "interlok-core/src/main/java/com/adaptris/core/jms/activemq/PrefetchPolicyFactory.java", "license": "apache-2.0", "size": 4371 }
[ "org.apache.activemq.ActiveMQPrefetchPolicy" ]
import org.apache.activemq.ActiveMQPrefetchPolicy;
import org.apache.activemq.*;
[ "org.apache.activemq" ]
org.apache.activemq;
2,671,756
public View getView(Object item, int position, View scrap, ViewGroup parent, int measuredWidth) { return getView(position, scrap, parent); }
View function(Object item, int position, View scrap, ViewGroup parent, int measuredWidth) { return getView(position, scrap, parent); }
/** * Get the view given its associated item. * * @param item Object associated with the view at this position * @param position Position of the item we are verifying * @param scrap The old view to reuse, if possible. Note: You should check * that this view is non-null and of an...
Get the view given its associated item
getView
{ "repo_name": "dseuss/deskclock", "path": "app/src/main/java/com/dseuss/deskclock/widget/sgv/GridAdapter.java", "license": "apache-2.0", "size": 6690 }
[ "android.view.View", "android.view.ViewGroup" ]
import android.view.View; import android.view.ViewGroup;
import android.view.*;
[ "android.view" ]
android.view;
1,045,204
@Override public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) { if (childrenFeatures == null) { super.getChildrenFeatures(object); childrenFeatures.add(ArchitecturePackage.Literals.SERVICE_PROXY__SOFTWARE_SERVICE); } return childrenFeatures; }
Collection<? extends EStructuralFeature> function(Object object) { if (childrenFeatures == null) { super.getChildrenFeatures(object); childrenFeatures.add(ArchitecturePackage.Literals.SERVICE_PROXY__SOFTWARE_SERVICE); } return childrenFeatures; }
/** * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. * <!-- begin-user-...
This specifies how to implement <code>#getChildren</code> and is used to deduce an appropriate feature for an <code>org.eclipse.emf.edit.command.AddCommand</code>, <code>org.eclipse.emf.edit.command.RemoveCommand</code> or <code>org.eclipse.emf.edit.command.MoveCommand</code> in <code>#createCommand</code>.
getChildrenFeatures
{ "repo_name": "CloudScale-Project/Environment", "path": "plugins/org.scaledl.overview.edit/src/org/scaledl/overview/architecture/provider/ServiceProxyItemProvider.java", "license": "epl-1.0", "size": 4683 }
[ "java.util.Collection", "org.eclipse.emf.ecore.EStructuralFeature", "org.scaledl.overview.architecture.ArchitecturePackage" ]
import java.util.Collection; import org.eclipse.emf.ecore.EStructuralFeature; import org.scaledl.overview.architecture.ArchitecturePackage;
import java.util.*; import org.eclipse.emf.ecore.*; import org.scaledl.overview.architecture.*;
[ "java.util", "org.eclipse.emf", "org.scaledl.overview" ]
java.util; org.eclipse.emf; org.scaledl.overview;
227,463
public DetachedCriteria createCriteria(String associationPath, String alias, JoinType joinType, Criterion withClause) { return new DetachedCriteria(impl, criteria.createCriteria( associationPath, alias, joinType, withClause ) ); } /** * Deprecated! * * @param associationPath The association path * @par...
DetachedCriteria function(String associationPath, String alias, JoinType joinType, Criterion withClause) { return new DetachedCriteria(impl, criteria.createCriteria( associationPath, alias, joinType, withClause ) ); } /** * Deprecated! * * @param associationPath The association path * @param joinType The type of join t...
/** * Creates an nested DetachedCriteria representing the association path, specifying the type of join to use and * an additional join restriction. * * @param associationPath The association path * @param alias The alias to associate with this "join". * @param joinType The type of join to use * @param wi...
Creates an nested DetachedCriteria representing the association path, specifying the type of join to use and an additional join restriction
createCriteria
{ "repo_name": "kevin-chen-hw/LDAE", "path": "com.huawei.soa.ldae/src/main/java/org/hibernate/criterion/DetachedCriteria.java", "license": "lgpl-2.1", "size": 13808 }
[ "org.hibernate.sql.JoinType" ]
import org.hibernate.sql.JoinType;
import org.hibernate.sql.*;
[ "org.hibernate.sql" ]
org.hibernate.sql;
2,912,101
public final void setCommentFormat(Pattern pattern) { commentFormat = pattern; }
final void function(Pattern pattern) { commentFormat = pattern; }
/** * Set the format for a comment that turns off reporting. * @param pattern a pattern. */
Set the format for a comment that turns off reporting
setCommentFormat
{ "repo_name": "ilanKeshet/checkstyle", "path": "src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithNearbyCommentFilter.java", "license": "lgpl-2.1", "size": 15273 }
[ "java.util.regex.Pattern" ]
import java.util.regex.Pattern;
import java.util.regex.*;
[ "java.util" ]
java.util;
62,316
byte[] readFile(String filePath) throws IOException { Path path = testFileExists(filePath).toPath(); return readFile(path); }
byte[] readFile(String filePath) throws IOException { Path path = testFileExists(filePath).toPath(); return readFile(path); }
/** * Reads the file located at the path specified and returns the content * in the form of a byte array. * * @param filePath the fully qualified file path * * @return a byte array containing the object * @throws IOException if there is a proble...
Reads the file located at the path specified and returns the content in the form of a byte array
readFile
{ "repo_name": "sambitgaan/htm.java", "path": "src/main/java/org/numenta/nupic/network/Persistence.java", "license": "agpl-3.0", "size": 26284 }
[ "java.io.IOException", "java.nio.file.Path" ]
import java.io.IOException; import java.nio.file.Path;
import java.io.*; import java.nio.file.*;
[ "java.io", "java.nio" ]
java.io; java.nio;
2,875,331
public void applyEntityCollision(Entity p_70108_1_) { if (!this.worldObj.isClient) { if (p_70108_1_ != this.riddenByEntity) { if (p_70108_1_ instanceof EntityLivingBase && !(p_70108_1_ instanceof EntityPlayer) && !(p_70108_1_ instanceof EntityIronGolem) &&...
void function(Entity p_70108_1_) { if (!this.worldObj.isClient) { if (p_70108_1_ != this.riddenByEntity) { if (p_70108_1_ instanceof EntityLivingBase && !(p_70108_1_ instanceof EntityPlayer) && !(p_70108_1_ instanceof EntityIronGolem) && this.getMinecartType() == 0 && this.motionX * this.motionX + this.motionZ * this.m...
/** * Applies a velocity to each of the entities pushing them away from each other. Args: entity */
Applies a velocity to each of the entities pushing them away from each other. Args: entity
applyEntityCollision
{ "repo_name": "TheHecticByte/BananaJ1.7.10Beta", "path": "src/net/minecraft/Server1_7_10/entity/item/EntityMinecart.java", "license": "gpl-3.0", "size": 34871 }
[ "net.minecraft.Server1_7_10" ]
import net.minecraft.Server1_7_10;
import net.minecraft.*;
[ "net.minecraft" ]
net.minecraft;
1,336,743
Artifact loadByCriteria(ArtifactSearchCriteria criteria) throws EntityNotFoundException, NotUniqueResultException;
Artifact loadByCriteria(ArtifactSearchCriteria criteria) throws EntityNotFoundException, NotUniqueResultException;
/** * Find the Artifact that match with the given criteria. * * @param criteria * the search criteria * @return the productInstance * @throws EntityNotFoundException * if the product instance does not exists * @throws NotUniqueResultException * ...
Find the Artifact that match with the given criteria
loadByCriteria
{ "repo_name": "hmunfru/fiware-sdc", "path": "core/src/main/java/com/telefonica/euro_iaas/sdc/manager/ArtifactManager.java", "license": "apache-2.0", "size": 4545 }
[ "com.telefonica.euro_iaas.commons.dao.EntityNotFoundException", "com.telefonica.euro_iaas.sdc.exception.NotUniqueResultException", "com.telefonica.euro_iaas.sdc.model.Artifact", "com.telefonica.euro_iaas.sdc.model.searchcriteria.ArtifactSearchCriteria" ]
import com.telefonica.euro_iaas.commons.dao.EntityNotFoundException; import com.telefonica.euro_iaas.sdc.exception.NotUniqueResultException; import com.telefonica.euro_iaas.sdc.model.Artifact; import com.telefonica.euro_iaas.sdc.model.searchcriteria.ArtifactSearchCriteria;
import com.telefonica.euro_iaas.commons.dao.*; import com.telefonica.euro_iaas.sdc.exception.*; import com.telefonica.euro_iaas.sdc.model.*; import com.telefonica.euro_iaas.sdc.model.searchcriteria.*;
[ "com.telefonica.euro_iaas" ]
com.telefonica.euro_iaas;
2,444,538