method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public static void putServiceResponseIntoRequestScope(final RequestContext requestContext, final Response response) {
requestContext.getRequestScope().put("parameters", response.getAttributes());
putServiceRedirectUrl(requestContext, response.getUrl());
} | static void function(final RequestContext requestContext, final Response response) { requestContext.getRequestScope().put(STR, response.getAttributes()); putServiceRedirectUrl(requestContext, response.getUrl()); } | /**
* Put service response into request scope.
*
* @param requestContext the request context
* @param response the response
*/ | Put service response into request scope | putServiceResponseIntoRequestScope | {
"repo_name": "fogbeam/cas_mirror",
"path": "core/cas-server-core-web-api/src/main/java/org/apereo/cas/web/support/WebUtils.java",
"license": "apache-2.0",
"size": 67337
} | [
"org.apereo.cas.authentication.principal.Response",
"org.springframework.webflow.execution.RequestContext"
] | import org.apereo.cas.authentication.principal.Response; import org.springframework.webflow.execution.RequestContext; | import org.apereo.cas.authentication.principal.*; import org.springframework.webflow.execution.*; | [
"org.apereo.cas",
"org.springframework.webflow"
] | org.apereo.cas; org.springframework.webflow; | 825,857 |
@Provides
@PluginDomain(NickColourPlugin.class)
public String getSettingsDomain() {
return domain;
} | @PluginDomain(NickColourPlugin.class) String function() { return domain; } | /**
* Provides the domain that the swing settings should be stored under.
*
* @return The settings domain for the swing plugin.
*/ | Provides the domain that the swing settings should be stored under | getSettingsDomain | {
"repo_name": "csmith/DMDirc-Plugins",
"path": "nickcolours/src/main/java/com/dmdirc/addons/nickcolours/NickColourModule.java",
"license": "mit",
"size": 2213
} | [
"com.dmdirc.plugins.PluginDomain"
] | import com.dmdirc.plugins.PluginDomain; | import com.dmdirc.plugins.*; | [
"com.dmdirc.plugins"
] | com.dmdirc.plugins; | 349,907 |
@Override
public void tilesLoaded() {
if (tilesLoadedMethod != null) {
try {
tilesLoadedMethod.invoke(papplet);
} catch (IllegalArgumentException e) {
} catch (IllegalAccessException e) {
} catch (InvocationTargetException e) {
}
}
}
// TRANSFORMATION --------------------------------------... | void function() { if (tilesLoadedMethod != null) { try { tilesLoadedMethod.invoke(papplet); } catch (IllegalArgumentException e) { } catch (IllegalAccessException e) { } catch (InvocationTargetException e) { } } } | /**
* Gets called if all tiles have been loaded. Invokes the tilesLoaded method in the client application if existing.
*
* TODO Pass the ID of this map to the method to enable handling multiple maps.
*/ | Gets called if all tiles have been loaded. Invokes the tilesLoaded method in the client application if existing. TODO Pass the ID of this map to the method to enable handling multiple maps | tilesLoaded | {
"repo_name": "ashr81/unfolding",
"path": "src/de/fhpotsdam/unfolding/mapdisplay/Java2DMapDisplay.java",
"license": "mit",
"size": 17343
} | [
"java.lang.reflect.InvocationTargetException"
] | import java.lang.reflect.InvocationTargetException; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 34,573 |
public Rectangle getScreenBounds() {
Rectangle screenSize = getScreenSize();
Insets screenInsets = getScreenInsets();
return new Rectangle(
screenSize.x + screenInsets.left,
screenSize.y + screenInsets.top,
... | Rectangle function() { Rectangle screenSize = getScreenSize(); Insets screenInsets = getScreenInsets(); return new Rectangle( screenSize.x + screenInsets.left, screenSize.y + screenInsets.top, screenSize.width - screenInsets.left - screenInsets.right, screenSize.height - screenInsets.top - screenInsets.bottom ); } | /**
* Get the bounds of where we can put a popup.
*/ | Get the bounds of where we can put a popup | getScreenBounds | {
"repo_name": "syncer/swingx",
"path": "swingx-autocomplete/src/main/java/org/jdesktop/swingx/autocomplete/workarounds/MacOSXPopupLocationFix.java",
"license": "lgpl-2.1",
"size": 8782
} | [
"java.awt.Insets",
"java.awt.Rectangle"
] | import java.awt.Insets; import java.awt.Rectangle; | import java.awt.*; | [
"java.awt"
] | java.awt; | 1,829,697 |
public static void paint(Geometry geometry, Viewport viewport,
Graphics2D g,
BasicStyle style)
{
ShapeWriter converter = getConverter(viewport);
paint(geometry, converter, g, style);
} | static void function(Geometry geometry, Viewport viewport, Graphics2D g, BasicStyle style) { ShapeWriter converter = getConverter(viewport); paint(geometry, converter, g, style); } | /**
* Paints a geometry onto a graphics context,
* using a given Viewport.
*
* @param geometry shape to paint
* @param viewport
* @param g the graphics context
* @param lineColor line color (null if none)
* @param fillColor fill color (null if none)
*/ | Paints a geometry onto a graphics context, using a given Viewport | paint | {
"repo_name": "dr-jts/jeql",
"path": "modules/jeqlw/src/main/java/jeql/workbench/ui/geomview/GeometryPainter.java",
"license": "gpl-3.0",
"size": 3238
} | [
"java.awt.Graphics2D",
"org.locationtech.jts.awt.ShapeWriter",
"org.locationtech.jts.geom.Geometry"
] | import java.awt.Graphics2D; import org.locationtech.jts.awt.ShapeWriter; import org.locationtech.jts.geom.Geometry; | import java.awt.*; import org.locationtech.jts.awt.*; import org.locationtech.jts.geom.*; | [
"java.awt",
"org.locationtech.jts"
] | java.awt; org.locationtech.jts; | 1,960,595 |
public Enumeration listOptions() {
Vector newVector = new Vector(4);
newVector.addElement(new Option(
"\tSpecify the random number seed (default 1)",
"S", 1, "-S <num>"));
newVector.addElement(new Option(
"\tThe maximum class distribution spread.\n"
... | Enumeration function() { Vector newVector = new Vector(4); newVector.addElement(new Option( STR, "S", 1, STR)); newVector.addElement(new Option( STR +STR +STR, "M", 1, STR)); newVector.addElement(new Option( STR +STR +STR, "W", 0, "-W")); newVector.addElement(new Option( STR, "X", 0, STR)); return newVector.elements();... | /**
* Returns an enumeration describing the available options.
*
* @return an enumeration of all the available options.
*/ | Returns an enumeration describing the available options | listOptions | {
"repo_name": "dsibournemouth/autoweka",
"path": "weka-3.7.7/src/main/java/weka/filters/supervised/instance/SpreadSubsample.java",
"license": "gpl-3.0",
"size": 17990
} | [
"java.util.Enumeration",
"java.util.Vector"
] | import java.util.Enumeration; import java.util.Vector; | import java.util.*; | [
"java.util"
] | java.util; | 815,405 |
public SortedGrouping<T> sortGroup(int field, Order order) {
if (this.getKeys() instanceof Keys.SelectorFunctionKeys) {
throw new InvalidProgramException("KeySelector grouping keys and field index group-sorting keys cannot be used together.");
}
SortedGrouping<T> sg = new SortedGrouping<T>(this.inputDataSe... | SortedGrouping<T> function(int field, Order order) { if (this.getKeys() instanceof Keys.SelectorFunctionKeys) { throw new InvalidProgramException(STR); } SortedGrouping<T> sg = new SortedGrouping<T>(this.inputDataSet, this.keys, field, order); sg.customPartitioner = getCustomPartitioner(); return sg; } | /**
* Sorts {@link org.apache.flink.api.java.tuple.Tuple} elements within a group on the specified field in the specified {@link Order}.
*
* <p><b>Note: Only groups of Tuple elements and Pojos can be sorted.</b>
*
* <p>Groups can be sorted by multiple fields by chaining {@link #sortGroup(int, Order)} calls.
... | Sorts <code>org.apache.flink.api.java.tuple.Tuple</code> elements within a group on the specified field in the specified <code>Order</code>. Note: Only groups of Tuple elements and Pojos can be sorted. Groups can be sorted by multiple fields by chaining <code>#sortGroup(int, Order)</code> calls | sortGroup | {
"repo_name": "zimmermatt/flink",
"path": "flink-java/src/main/java/org/apache/flink/api/java/operators/UnsortedGrouping.java",
"license": "apache-2.0",
"size": 14113
} | [
"org.apache.flink.api.common.InvalidProgramException",
"org.apache.flink.api.common.operators.Keys",
"org.apache.flink.api.common.operators.Order"
] | import org.apache.flink.api.common.InvalidProgramException; import org.apache.flink.api.common.operators.Keys; import org.apache.flink.api.common.operators.Order; | import org.apache.flink.api.common.*; import org.apache.flink.api.common.operators.*; | [
"org.apache.flink"
] | org.apache.flink; | 1,169,264 |
public Date setMinSelectableDate(Date min) {
if (min == null) {
minSelectableDate = defaultMinSelectableDate;
} else {
minSelectableDate = min;
}
drawDays();
return minSelectableDate;
} | Date function(Date min) { if (min == null) { minSelectableDate = defaultMinSelectableDate; } else { minSelectableDate = min; } drawDays(); return minSelectableDate; } | /**
* Sets the minimum selectable date. If null, the date 01\01\0001 will be
* set instead.
*
* @param min
* the minimum selectable date
*
* @return the minimum selectable date
*/ | Sets the minimum selectable date. If null, the date 01\01\0001 will be set instead | setMinSelectableDate | {
"repo_name": "mibischo/freemind",
"path": "accessories/plugins/time/JDayChooser.java",
"license": "gpl-2.0",
"size": 27143
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 1,864,521 |
@SuppressWarnings("unused")
private float[] getStats(StatSource target) {
int index = Arrays.asList(StatSource.values()).indexOf(target);
float[] result = new float[6];
for(int i = 0; i < 6; i++ ) {
result[i] = stats[i][index];
}
return result;
}
... | @SuppressWarnings(STR) float[] function(StatSource target) { int index = Arrays.asList(StatSource.values()).indexOf(target); float[] result = new float[6]; for(int i = 0; i < 6; i++ ) { result[i] = stats[i][index]; } return result; } | /** Get a specific component of stats from a target slot.
* @param target Component's slot for stats
* @return The relevant stat array */ | Get a specific component of stats from a target slot | getStats | {
"repo_name": "studiokeywi/the-island",
"path": "core/src/dev/studiokeywi/theisland/components/CombatComponent.java",
"license": "apache-2.0",
"size": 26387
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 549,988 |
@JsonCreator
public static SdkHarnessLogLevelOverrides from(Map<String, String> values) {
checkNotNull(values, "Expected values to be not null.");
SdkHarnessLogLevelOverrides overrides = new SdkHarnessLogLevelOverrides();
for (Map.Entry<String, String> entry : values.entrySet()) {
try ... | static SdkHarnessLogLevelOverrides function(Map<String, String> values) { checkNotNull(values, STR); SdkHarnessLogLevelOverrides overrides = new SdkHarnessLogLevelOverrides(); for (Map.Entry<String, String> entry : values.entrySet()) { try { overrides.addOverrideForName(entry.getKey(), LogLevel.valueOf(entry.getValue()... | /**
* Expects a map keyed by logger {@code Name}s with values representing {@code LogLevel}s. The
* {@code Name} generally represents the fully qualified Java {@link Class#getName() class
* name}, or fully qualified Java {@link Package#getName() package name}, or custom logger name.
* The {@code Log... | Expects a map keyed by logger Names with values representing LogLevels. The Name generally represents the fully qualified Java <code>Class#getName() class name</code>, or fully qualified Java <code>Package#getName() package name</code>, or custom logger name. The LogLevel represents the log level and must be one of <co... | from | {
"repo_name": "mxm/incubator-beam",
"path": "sdks/java/core/src/main/java/org/apache/beam/sdk/options/SdkHarnessOptions.java",
"license": "apache-2.0",
"size": 7541
} | [
"com.google.common.base.Preconditions",
"java.util.Arrays",
"java.util.Map"
] | import com.google.common.base.Preconditions; import java.util.Arrays; import java.util.Map; | import com.google.common.base.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 1,975,150 |
public void assertIsInterface(AssertionInfo info, Class<?> actual) {
assertNotNull(info, actual);
if (!actual.isInterface()) throw failures.failure(info, shouldBeInterface(actual));
} | void function(AssertionInfo info, Class<?> actual) { assertNotNull(info, actual); if (!actual.isInterface()) throw failures.failure(info, shouldBeInterface(actual)); } | /**
* Verifies that the actual {@code Class} is an interface.
*
* @param info contains information about the assertion.
* @param actual the "actual" {@code Class}.
* @throws AssertionError if {@code actual} is {@code null}.
* @throws AssertionError if the actual {@code Class} is not an interface.
... | Verifies that the actual Class is an interface | assertIsInterface | {
"repo_name": "bric3/assertj-core",
"path": "src/main/java/org/assertj/core/internal/Classes.java",
"license": "apache-2.0",
"size": 10638
} | [
"org.assertj.core.api.AssertionInfo",
"org.assertj.core.error.ShouldBeInterface"
] | import org.assertj.core.api.AssertionInfo; import org.assertj.core.error.ShouldBeInterface; | import org.assertj.core.api.*; import org.assertj.core.error.*; | [
"org.assertj.core"
] | org.assertj.core; | 1,609,478 |
protected short readShort( DataInputStream is ) throws IOException {
byte[] js = new byte[ 2 ];
fillBytes( js, is );
return (short) (((js[ 1 ] << 8)) & 0xff00 | (js[0] & 0x00ff));
} | short function( DataInputStream is ) throws IOException { byte[] js = new byte[ 2 ]; fillBytes( js, is ); return (short) (((js[ 1 ] << 8)) & 0xff00 (js[0] & 0x00ff)); } | /**
* Read the next short ( 2 bytes) value in the DataInputStream.
* we cant use is.readShort() because of different byte-order.
*/ | Read the next short ( 2 bytes) value in the DataInputStream. we cant use is.readShort() because of different byte-order | readShort | {
"repo_name": "Groostav/CMPT880-term-project",
"path": "intruder/benchs/batik/batik-1.7/sources/org/apache/batik/transcoder/wmf/tosvg/AbstractWMFReader.java",
"license": "apache-2.0",
"size": 15293
} | [
"java.io.DataInputStream",
"java.io.IOException"
] | import java.io.DataInputStream; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 349,482 |
public void setFaultIn(List<Interceptor<? extends Message>> faultIn) {
this.faultIn = faultIn;
}
| void function(List<Interceptor<? extends Message>> faultIn) { this.faultIn = faultIn; } | /**
* Sets the fault in.
*
* @param faultIn the new fault in
*/ | Sets the fault in | setFaultIn | {
"repo_name": "Ranx0r0x/Enjekt-Microservice",
"path": "microserver/src/main/java/org/enjekt/osgi/microserver/impl/MicroWebserviceConfiguration.java",
"license": "apache-2.0",
"size": 7667
} | [
"java.util.List",
"org.apache.cxf.interceptor.Interceptor",
"org.apache.cxf.message.Message"
] | import java.util.List; import org.apache.cxf.interceptor.Interceptor; import org.apache.cxf.message.Message; | import java.util.*; import org.apache.cxf.interceptor.*; import org.apache.cxf.message.*; | [
"java.util",
"org.apache.cxf"
] | java.util; org.apache.cxf; | 1,304,148 |
@Test
public void testGetForwardingAddress() throws Exception {
ospfExternalDestination.setForwardingAddress(Ip4Address.valueOf(InetAddress.getLocalHost()));
assertThat(ospfExternalDestination.forwardingAddress(), is(Ip4Address.valueOf(InetAddress.getLocalHost())));
} | void function() throws Exception { ospfExternalDestination.setForwardingAddress(Ip4Address.valueOf(InetAddress.getLocalHost())); assertThat(ospfExternalDestination.forwardingAddress(), is(Ip4Address.valueOf(InetAddress.getLocalHost()))); } | /**
* Tests forwardingAddress() getter method.
*/ | Tests forwardingAddress() getter method | testGetForwardingAddress | {
"repo_name": "sonu283304/onos",
"path": "protocols/ospf/protocol/src/test/java/org/onosproject/ospf/protocol/lsa/subtypes/OspfExternalDestinationTest.java",
"license": "apache-2.0",
"size": 3830
} | [
"java.net.InetAddress",
"org.hamcrest.MatcherAssert",
"org.hamcrest.Matchers",
"org.onlab.packet.Ip4Address"
] | import java.net.InetAddress; import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; import org.onlab.packet.Ip4Address; | import java.net.*; import org.hamcrest.*; import org.onlab.packet.*; | [
"java.net",
"org.hamcrest",
"org.onlab.packet"
] | java.net; org.hamcrest; org.onlab.packet; | 1,765,315 |
public Attr removeAttributeNode(Attr oldAttr) throws DOMException {
if (oldAttr == null) {
return null;
}
if (attributes == null) {
throw createDOMException(DOMException.NOT_FOUND_ERR,
"attribute.missing",
new Object[] { oldAttr.g... | Attr function(Attr oldAttr) throws DOMException { if (oldAttr == null) { return null; } if (attributes == null) { throw createDOMException(DOMException.NOT_FOUND_ERR, STR, new Object[] { oldAttr.getName() }); } String nsURI = oldAttr.getNamespaceURI(); return (Attr)attributes.removeNamedItemNS(nsURI, (nsURI==null ? old... | /**
* <b>DOM</b>: Implements {@link
* org.w3c.dom.Element#removeAttributeNode(Attr)}.
*/ | DOM: Implements <code>org.w3c.dom.Element#removeAttributeNode(Attr)</code> | removeAttributeNode | {
"repo_name": "Groostav/CMPT880-term-project",
"path": "intruder/benchs/batik/batik-1.7/sources/org/apache/batik/dom/AbstractElement.java",
"license": "apache-2.0",
"size": 33547
} | [
"org.w3c.dom.Attr",
"org.w3c.dom.DOMException"
] | import org.w3c.dom.Attr; import org.w3c.dom.DOMException; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 825,095 |
// type check is done in isResolvable
Object result = null;
final Class collectionType = getCollectionType(expectedType);
if (collectionType != null) {
final Map adapterMap = getMatchingComponentAdapters(container, adapter, componentKeyType, getValueType(expectedType));
i... | Object result = null; final Class collectionType = getCollectionType(expectedType); if (collectionType != null) { final Map adapterMap = getMatchingComponentAdapters(container, adapter, componentKeyType, getValueType(expectedType)); if (Array.class.isAssignableFrom(collectionType)) { result = getArrayInstance(container... | /**
* Resolve the parameter for the expected type. The method will return <code>null</code>
* If the expected type is not one of the collection types {@link Array},
* {@link Collection}or {@link Map}. An empty collection is only a valid resolution, if
* the <code>emptyCollection</code> flag was set.... | Resolve the parameter for the expected type. The method will return <code>null</code> If the expected type is not one of the collection types <code>Array</code>, <code>Collection</code>or <code>Map</code>. An empty collection is only a valid resolution, if the <code>emptyCollection</code> flag was set | resolveInstance | {
"repo_name": "picocontainer/PicoContainer1",
"path": "container/src/java/org/picocontainer/defaults/CollectionComponentParameter.java",
"license": "bsd-3-clause",
"size": 15569
} | [
"java.lang.reflect.Array",
"java.util.Collection",
"java.util.Map",
"org.picocontainer.PicoIntrospectionException"
] | import java.lang.reflect.Array; import java.util.Collection; import java.util.Map; import org.picocontainer.PicoIntrospectionException; | import java.lang.reflect.*; import java.util.*; import org.picocontainer.*; | [
"java.lang",
"java.util",
"org.picocontainer"
] | java.lang; java.util; org.picocontainer; | 442,363 |
public Chunk loadChunk(int p_73158_1_, int p_73158_2_)
{
return this.provideChunk(p_73158_1_, p_73158_2_);
} | Chunk function(int p_73158_1_, int p_73158_2_) { return this.provideChunk(p_73158_1_, p_73158_2_); } | /**
* loads or generates the chunk at the chunk location specified
*/ | loads or generates the chunk at the chunk location specified | loadChunk | {
"repo_name": "mviitanen/marsmod",
"path": "mcp/src/minecraft_server/net/minecraft/world/gen/ChunkProviderHell.java",
"license": "gpl-2.0",
"size": 23104
} | [
"net.minecraft.world.chunk.Chunk"
] | import net.minecraft.world.chunk.Chunk; | import net.minecraft.world.chunk.*; | [
"net.minecraft.world"
] | net.minecraft.world; | 2,595,924 |
protected List<T> getLista(final StringBuilder hqlQuery) {
final Query query = createQuery(hqlQuery);
return getLista(query);
}
| List<T> function(final StringBuilder hqlQuery) { final Query query = createQuery(hqlQuery); return getLista(query); } | /**
* Ejecuta la consulta definida en la variable <b>hqlQuery</b> y regresa la
* lista de entidades obtenida.
*
* @param hqlQuery
* consulta a ejecutar.
* @return lista de entidades obtenida de la consulta.
*/ | Ejecuta la consulta definida en la variable hqlQuery y regresa la lista de entidades obtenida | getLista | {
"repo_name": "cancervero/kopinali",
"path": "kopinali-ds/src/main/java/mx/com/cct/arquitectura/kopinali/ds/base/impl/BaseDAOImpl.java",
"license": "gpl-3.0",
"size": 10816
} | [
"java.util.List",
"javax.persistence.Query"
] | import java.util.List; import javax.persistence.Query; | import java.util.*; import javax.persistence.*; | [
"java.util",
"javax.persistence"
] | java.util; javax.persistence; | 2,521,234 |
public static ImagePipelineConfig getOkHttpImagePipelineConfig(Context context) {
if (sOkHttpImagePipelineConfig == null) {
OkHttpClient okHttpClient = new OkHttpClient();
okHttpClient.networkInterceptors().add(new StethoInterceptor());
ImagePipelineConfig.Builder configBuilder =
OkHttpI... | static ImagePipelineConfig function(Context context) { if (sOkHttpImagePipelineConfig == null) { OkHttpClient okHttpClient = new OkHttpClient(); okHttpClient.networkInterceptors().add(new StethoInterceptor()); ImagePipelineConfig.Builder configBuilder = OkHttpImagePipelineConfigFactory.newBuilder(context, okHttpClient)... | /**
* Creates config using OkHttp as network backed.
*/ | Creates config using OkHttp as network backed | getOkHttpImagePipelineConfig | {
"repo_name": "275288698/fresco",
"path": "samples/comparison/src/main/java/com/facebook/samples/comparison/configs/imagepipeline/ImagePipelineConfigFactory.java",
"license": "bsd-3-clause",
"size": 4509
} | [
"android.content.Context",
"com.facebook.imagepipeline.backends.okhttp.OkHttpImagePipelineConfigFactory",
"com.facebook.imagepipeline.core.ImagePipelineConfig",
"com.facebook.stetho.okhttp.StethoInterceptor",
"com.squareup.okhttp.OkHttpClient"
] | import android.content.Context; import com.facebook.imagepipeline.backends.okhttp.OkHttpImagePipelineConfigFactory; import com.facebook.imagepipeline.core.ImagePipelineConfig; import com.facebook.stetho.okhttp.StethoInterceptor; import com.squareup.okhttp.OkHttpClient; | import android.content.*; import com.facebook.imagepipeline.backends.okhttp.*; import com.facebook.imagepipeline.core.*; import com.facebook.stetho.okhttp.*; import com.squareup.okhttp.*; | [
"android.content",
"com.facebook.imagepipeline",
"com.facebook.stetho",
"com.squareup.okhttp"
] | android.content; com.facebook.imagepipeline; com.facebook.stetho; com.squareup.okhttp; | 2,700,660 |
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable<CloudServiceInner> listByResourceGroup(String resourceGroupName, Context context) {
return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context));
} | @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<CloudServiceInner> function(String resourceGroupName, Context context) { return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); } | /**
* Gets a list of all cloud services under a resource group. Use nextLink property in the response to get the next
* page of Cloud Services. Do this till nextLink is null to fetch all the Cloud Services.
*
* @param resourceGroupName Name of the resource group.
* @param context The context to... | Gets a list of all cloud services under a resource group. Use nextLink property in the response to get the next page of Cloud Services. Do this till nextLink is null to fetch all the Cloud Services | listByResourceGroup | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/CloudServicesClientImpl.java",
"license": "mit",
"size": 179410
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedIterable",
"com.azure.core.util.Context",
"com.azure.resourcemanager.compute.fluent.models.CloudServiceInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; import com.azure.resourcemanager.compute.fluent.models.CloudServiceInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.compute.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 30,225 |
public File getOutputDir()
{
return outputDir;
} | File function() { return outputDir; } | /**
* Returns the output directory, where the generated files are being placed. Defaults to
* {project.build.directory}/generated-resources/xml/xslt.
* @return Output directory for generated files.
*/ | Returns the output directory, where the generated files are being placed. Defaults to {project.build.directory}/generated-resources/xml/xslt | getOutputDir | {
"repo_name": "mojohaus/xml-maven-plugin",
"path": "src/main/java/org/codehaus/mojo/xml/transformer/TransformationSet.java",
"license": "apache-2.0",
"size": 9977
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 2,060,084 |
private void restoreFavorite(Key key,byte[] buffer,int dataSize,ArrayList<Key> keys){
Log.v(TAG,"unpacking favorite " + key.id + " (" + dataSize + " bytes)");
if(DEBUG) Log.d(TAG,"read (" + buffer.length + "): " +
Base64.encodeToString(buffer,0,dataSize,Base64.NO_WRAP));
try... | void function(Key key,byte[] buffer,int dataSize,ArrayList<Key> keys){ Log.v(TAG,STR + key.id + STR + dataSize + STR); if(DEBUG) Log.d(TAG,STR + buffer.length + STR + Base64.encodeToString(buffer,0,dataSize,Base64.NO_WRAP)); try{ Favorite favorite=unpackFavorite(buffer,0,dataSize); if(DEBUG) Log.d(TAG,STR + favorite.it... | /**
* Read a favorite from the stream.
*
* <P>Keys arrive in any order, so screens and containers may not exist yet.
*
* @param key identifier for the row
* @param buffer the serialized proto from the stream, may be larger than dataSize
* @param dataSize the size of the proto from the... | Read a favorite from the stream. Keys arrive in any order, so screens and containers may not exist yet | restoreFavorite | {
"repo_name": "hikelee/projector",
"path": "android/master/src/com/android/launcher3/LauncherBackupHelper.java",
"license": "mit",
"size": 39905
} | [
"android.util.Base64",
"android.util.Log",
"com.android.launcher3.backup.BackupProtos",
"com.google.protobuf.nano.InvalidProtocolBufferNanoException",
"java.util.ArrayList"
] | import android.util.Base64; import android.util.Log; import com.android.launcher3.backup.BackupProtos; import com.google.protobuf.nano.InvalidProtocolBufferNanoException; import java.util.ArrayList; | import android.util.*; import com.android.launcher3.backup.*; import com.google.protobuf.nano.*; import java.util.*; | [
"android.util",
"com.android.launcher3",
"com.google.protobuf",
"java.util"
] | android.util; com.android.launcher3; com.google.protobuf; java.util; | 2,313,157 |
@Test
public void pcepUpdateMsgTest22() throws PcepParseException, PcepOutOfBoundMessageException {
byte[] updateMsg = new byte[] {0x20, 0x0b, 0x00, (byte) 0x5C,
0x21, 0x10, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, //SRP object
0x20, 0x10, 0x00, 0x1C, ... | void function() throws PcepParseException, PcepOutOfBoundMessageException { byte[] updateMsg = new byte[] {0x20, 0x0b, 0x00, (byte) 0x5C, 0x21, 0x10, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x20, 0x10, 0x00, 0x1C, 0x00, 0x00, 0x10, 0x03, 0x00, 0x12, 0x00, 0x10, (byte) 0xb6, 0x02, 0x4e, 0x1f, 0x00, 0... | /**
* This test case checks for SRP, LSP (StatefulIPv4LspIdentidiersTlv),
* ERO (IPv4SubObject, IPv4SubObject), LSPA, Bandwidth objects in PcUpd message.
*/ | This test case checks for SRP, LSP (StatefulIPv4LspIdentidiersTlv), ERO (IPv4SubObject, IPv4SubObject), LSPA, Bandwidth objects in PcUpd message | pcepUpdateMsgTest22 | {
"repo_name": "donNewtonAlpha/onos",
"path": "protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/protocol/PcepUpdateMsgTest.java",
"license": "apache-2.0",
"size": 66899
} | [
"org.hamcrest.MatcherAssert",
"org.hamcrest.Matchers",
"org.hamcrest.core.Is",
"org.jboss.netty.buffer.ChannelBuffer",
"org.jboss.netty.buffer.ChannelBuffers",
"org.onosproject.pcepio.exceptions.PcepOutOfBoundMessageException",
"org.onosproject.pcepio.exceptions.PcepParseException"
] | import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; import org.hamcrest.core.Is; import org.jboss.netty.buffer.ChannelBuffer; import org.jboss.netty.buffer.ChannelBuffers; import org.onosproject.pcepio.exceptions.PcepOutOfBoundMessageException; import org.onosproject.pcepio.exceptions.PcepParseException; | import org.hamcrest.*; import org.hamcrest.core.*; import org.jboss.netty.buffer.*; import org.onosproject.pcepio.exceptions.*; | [
"org.hamcrest",
"org.hamcrest.core",
"org.jboss.netty",
"org.onosproject.pcepio"
] | org.hamcrest; org.hamcrest.core; org.jboss.netty; org.onosproject.pcepio; | 2,576,835 |
public int read(byte[] b, int offset, int length)
throws IOException {
if (inStream == null) {
return -1;
}
if ((offset | length | (offset + length) | (b.length - (offset + length))) < 0) {
throw new IndexOutOfBoundsException();
} else if (length ... | int function(byte[] b, int offset, int length) throws IOException { if (inStream == null) { return -1; } if ((offset length (offset + length) (b.length - (offset + length))) < 0) { throw new IndexOutOfBoundsException(); } else if (length == 0) { return 0; } int totalIn = 0; if (inflater != null) { totalIn = inflater.ge... | /**
* Reads into a byte array.
*
* @param b
* @param offset
* @param length
* @throws IOException
*/ | Reads into a byte array | read | {
"repo_name": "deepstupid/phex",
"path": "src/main/java/phex/util/GnutellaInputStream.java",
"license": "agpl-3.0",
"size": 9123
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,688,351 |
protected static final Rectangle getChildViewBounds(View parent, int line,
Rectangle editorRect) {
Shape alloc = parent.getChildAllocation(line, editorRect);
if (alloc==null) {
// WrappedSyntaxView can have this when made so small it's
// no longer visible
return new Rectangle();
}
return ... | static final Rectangle function(View parent, int line, Rectangle editorRect) { Shape alloc = parent.getChildAllocation(line, editorRect); if (alloc==null) { return new Rectangle(); } return alloc instanceof Rectangle ? (Rectangle)alloc : alloc.getBounds(); } | /**
* Returns the bounds of a child view as a rectangle, since
* <code>View</code>s tend to use <code>Shape</code>.
*
* @param parent The parent view of the child whose bounds we're getting.
* @param line The index of the child view.
* @param editorRect Returned from the text area's
* <code>getVisi... | Returns the bounds of a child view as a rectangle, since <code>View</code>s tend to use <code>Shape</code> | getChildViewBounds | {
"repo_name": "Mindtoeye/Hoop",
"path": "src/org/fife/ui/rtextarea/AbstractGutterComponent.java",
"license": "lgpl-3.0",
"size": 2814
} | [
"java.awt.Rectangle",
"java.awt.Shape",
"javax.swing.text.View"
] | import java.awt.Rectangle; import java.awt.Shape; import javax.swing.text.View; | import java.awt.*; import javax.swing.text.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 287,068 |
@Generated
@IsOptional
@Selector("locationManager:didUpdateHeading:")
default void locationManagerDidUpdateHeading(CLLocationManager manager, CLHeading newHeading) {
throw new java.lang.UnsupportedOperationException();
} | @Selector(STR) default void locationManagerDidUpdateHeading(CLLocationManager manager, CLHeading newHeading) { throw new java.lang.UnsupportedOperationException(); } | /**
* locationManager:didUpdateHeading:
* <p>
* Discussion:
* Invoked when a new heading is available.
*/ | locationManager:didUpdateHeading: Discussion: Invoked when a new heading is available | locationManagerDidUpdateHeading | {
"repo_name": "multi-os-engine/moe-core",
"path": "moe.apple/moe.platform.ios/src/main/java/apple/corelocation/protocol/CLLocationManagerDelegate.java",
"license": "apache-2.0",
"size": 11807
} | [
"org.moe.natj.objc.ann.Selector"
] | import org.moe.natj.objc.ann.Selector; | import org.moe.natj.objc.ann.*; | [
"org.moe.natj"
] | org.moe.natj; | 466,023 |
public void testFunctionType() throws Exception {
// isXxx
assertTrue(functionType.isObject());
assertFalse(functionType.isFunctionPrototypeType());
assertTrue(functionType.getImplicitPrototype().getImplicitPrototype()
.isFunctionPrototypeType());
// isSubtype
assertTrue(functionType.... | void function() throws Exception { assertTrue(functionType.isObject()); assertFalse(functionType.isFunctionPrototypeType()); assertTrue(functionType.getImplicitPrototype().getImplicitPrototype() .isFunctionPrototypeType()); assertTrue(functionType.isSubtype(ALL_TYPE)); assertFalse(functionType.isSubtype(STRING_OBJECT_T... | /**
* Tests the behavior of functional types.
*/ | Tests the behavior of functional types | testFunctionType | {
"repo_name": "robbert/closure-compiler",
"path": "test/com/google/javascript/rhino/jstype/JSTypeTest.java",
"license": "apache-2.0",
"size": 266744
} | [
"com.google.javascript.rhino.testing.Asserts"
] | import com.google.javascript.rhino.testing.Asserts; | import com.google.javascript.rhino.testing.*; | [
"com.google.javascript"
] | com.google.javascript; | 1,059,211 |
protected void removeFromMapping() {
if(path != null) {
removeMapping(this);
for(int counter = getChildCount() - 1; counter >= 0; counter--)
((TreeStateNode)getChildAt(counter)).removeFromMapping();
}
}
} // End of VariableH... | void function() { if(path != null) { removeMapping(this); for(int counter = getChildCount() - 1; counter >= 0; counter--) ((TreeStateNode)getChildAt(counter)).removeFromMapping(); } } } private class VisibleTreeStateNodeEnumeration implements Enumeration<TreePath> { protected TreeStateNode parent; protected int nextInd... | /**
* Removes the receiver, and all its children, from the mapping
* table.
*/ | Removes the receiver, and all its children, from the mapping table | removeFromMapping | {
"repo_name": "mirkosertic/Bytecoder",
"path": "classlib/java.desktop/src/main/resources/META-INF/modules/java.desktop/classes/javax/swing/tree/VariableHeightLayoutCache.java",
"license": "apache-2.0",
"size": 61865
} | [
"java.util.Enumeration"
] | import java.util.Enumeration; | import java.util.*; | [
"java.util"
] | java.util; | 1,991,371 |
protected HashMap<String, PropertyDescriptor> inspectProperties() {
boolean scanAccessible = classDescriptor.isScanAccessible();
Class type = classDescriptor.getType();
HashMap<String, PropertyDescriptor> map = new HashMap<>();
Method[] methods = scanAccessible ? ReflectUtil.getAccessibleMethods(type) : Re... | HashMap<String, PropertyDescriptor> function() { boolean scanAccessible = classDescriptor.isScanAccessible(); Class type = classDescriptor.getType(); HashMap<String, PropertyDescriptor> map = new HashMap<>(); Method[] methods = scanAccessible ? ReflectUtil.getAccessibleMethods(type) : ReflectUtil.getSupportedMethods(ty... | /**
* Inspects all properties of target type.
*/ | Inspects all properties of target type | inspectProperties | {
"repo_name": "mohanaraosv/jodd",
"path": "jodd-bean/src/main/java/jodd/introspector/Properties.java",
"license": "bsd-2-clause",
"size": 8196
} | [
"java.lang.reflect.Field",
"java.lang.reflect.Method",
"java.lang.reflect.Modifier",
"java.util.HashMap"
] | import java.lang.reflect.Field; import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.util.HashMap; | import java.lang.reflect.*; import java.util.*; | [
"java.lang",
"java.util"
] | java.lang; java.util; | 770,076 |
public void removeGroup(Group group, DataManager dm) throws Exception {
if (group.isGlobal()) {
SecurityServiceProvider.getGroupManagementService().removeGlobalGroupId(group.getName());
} else {
SecurityServiceProvider.getGroupManagementService().removeLocalGroupId(
Openw... | void function(Group group, DataManager dm) throws Exception { if (group.isGlobal()) { SecurityServiceProvider.getGroupManagementService().removeGlobalGroupId(group.getName()); } else { SecurityServiceProvider.getGroupManagementService().removeLocalGroupId( OpenwisMetadataPortalConfig.getString(ConfigurationConstants.DE... | /**
* Deletes a group.
* @param group the group to delete.
* @param dm The data manager.
* @throws Exception if an error occurs.
*/ | Deletes a group | removeGroup | {
"repo_name": "OpenWIS/openwis",
"path": "openwis-metadataportal/openwis-portal/src/main/java/org/openwis/metadataportal/kernel/group/GroupManager.java",
"license": "gpl-3.0",
"size": 16630
} | [
"org.fao.geonet.kernel.DataManager",
"org.openwis.metadataportal.common.configuration.ConfigurationConstants",
"org.openwis.metadataportal.common.configuration.OpenwisMetadataPortalConfig",
"org.openwis.metadataportal.kernel.external.SecurityServiceProvider",
"org.openwis.metadataportal.model.group.Group"
] | import org.fao.geonet.kernel.DataManager; import org.openwis.metadataportal.common.configuration.ConfigurationConstants; import org.openwis.metadataportal.common.configuration.OpenwisMetadataPortalConfig; import org.openwis.metadataportal.kernel.external.SecurityServiceProvider; import org.openwis.metadataportal.model.... | import org.fao.geonet.kernel.*; import org.openwis.metadataportal.common.configuration.*; import org.openwis.metadataportal.kernel.external.*; import org.openwis.metadataportal.model.group.*; | [
"org.fao.geonet",
"org.openwis.metadataportal"
] | org.fao.geonet; org.openwis.metadataportal; | 1,205,621 |
private void updateContainerState(ClusterDataCache cache, HelixDataAccessor accessor,
PropertyKey.Builder keyBuilder, Cluster cluster, ContainerId containerId,
ParticipantId participantId, ContainerState state) {
InstanceConfig delta = new InstanceConfig(participantId);
delta.setContainerState(sta... | void function(ClusterDataCache cache, HelixDataAccessor accessor, PropertyKey.Builder keyBuilder, Cluster cluster, ContainerId containerId, ParticipantId participantId, ContainerState state) { InstanceConfig delta = new InstanceConfig(participantId); delta.setContainerState(state); if (containerId != null) { delta.setC... | /**
* Update a participant with a new container state and invalidate cached state
* @param helixAdmin
* @param accessor
* @param keyBuilder
* @param cluster
* @param participantId
* @param state
*/ | Update a participant with a new container state and invalidate cached state | updateContainerState | {
"repo_name": "Teino1978-Corp/Teino1978-Corp-helix",
"path": "helix-core/src/main/java/org/apache/helix/controller/stages/ContainerProvisioningStage.java",
"license": "apache-2.0",
"size": 15732
} | [
"org.apache.helix.HelixDataAccessor",
"org.apache.helix.PropertyKey",
"org.apache.helix.api.Cluster",
"org.apache.helix.api.id.ParticipantId",
"org.apache.helix.controller.provisioner.ContainerId",
"org.apache.helix.controller.provisioner.ContainerState",
"org.apache.helix.model.InstanceConfig"
] | import org.apache.helix.HelixDataAccessor; import org.apache.helix.PropertyKey; import org.apache.helix.api.Cluster; import org.apache.helix.api.id.ParticipantId; import org.apache.helix.controller.provisioner.ContainerId; import org.apache.helix.controller.provisioner.ContainerState; import org.apache.helix.model.Inst... | import org.apache.helix.*; import org.apache.helix.api.*; import org.apache.helix.api.id.*; import org.apache.helix.controller.provisioner.*; import org.apache.helix.model.*; | [
"org.apache.helix"
] | org.apache.helix; | 1,824,293 |
@Override
public void dump(OutputStream output) {
try (PrintWriter out = new PrintWriter(new OutputStreamWriter(output, UTF_8))) {
for (long value : values) {
out.printf("%d%n", value);
}
}
} | void function(OutputStream output) { try (PrintWriter out = new PrintWriter(new OutputStreamWriter(output, UTF_8))) { for (long value : values) { out.printf("%d%n", value); } } } | /**
* Writes the values of the snapshot to the given stream.
*
* @param output an output stream
*/ | Writes the values of the snapshot to the given stream | dump | {
"repo_name": "mveitas/metrics",
"path": "metrics-core/src/main/java/com/codahale/metrics/UniformSnapshot.java",
"license": "apache-2.0",
"size": 4383
} | [
"java.io.OutputStream",
"java.io.OutputStreamWriter",
"java.io.PrintWriter"
] | import java.io.OutputStream; import java.io.OutputStreamWriter; import java.io.PrintWriter; | import java.io.*; | [
"java.io"
] | java.io; | 327,806 |
@Modified
protected void modified(Map<String, Object> configProps) throws ConfigurationException {
logger.info("updated({})", configProps);
if (configProps == null) {
return;
}
if (configProps.containsKey(Config.COMETVISU_WEBFOLDER_PROPERTY)
|| configP... | void function(Map<String, Object> configProps) throws ConfigurationException { logger.info(STR, configProps); if (configProps == null) { return; } if (configProps.containsKey(Config.COMETVISU_WEBFOLDER_PROPERTY) configProps.containsKey(Config.COMETVISU_WEBAPP_ALIAS_PROPERTY)) { unregisterServlet(); } readConfiguration(... | /**
* Called by the SCR when the configuration of a binding has been changed
* through the ConfigAdmin service.
*
* @param configuration
* Updated configuration properties
*/ | Called by the SCR when the configuration of a binding has been changed through the ConfigAdmin service | modified | {
"repo_name": "afuechsel/openhab2",
"path": "addons/ui/org.openhab.ui.cometvisu/src/main/java/org/openhab/ui/cometvisu/internal/servlet/CometVisuApp.java",
"license": "epl-1.0",
"size": 11740
} | [
"java.util.Map",
"org.openhab.ui.cometvisu.internal.Config",
"org.osgi.service.cm.ConfigurationException"
] | import java.util.Map; import org.openhab.ui.cometvisu.internal.Config; import org.osgi.service.cm.ConfigurationException; | import java.util.*; import org.openhab.ui.cometvisu.internal.*; import org.osgi.service.cm.*; | [
"java.util",
"org.openhab.ui",
"org.osgi.service"
] | java.util; org.openhab.ui; org.osgi.service; | 1,080,590 |
protected String autogenerateId() throws JspException {
return TagIdGenerator.nextId(getName(), this.pageContext);
}
| String function() throws JspException { return TagIdGenerator.nextId(getName(), this.pageContext); } | /**
* Return a unique ID for the bound name within the current PageContext.
*/ | Return a unique ID for the bound name within the current PageContext | autogenerateId | {
"repo_name": "codeApeFromChina/resource",
"path": "frame_packages/java_libs/spring-2.5.6-src/src/org/springframework/web/servlet/tags/form/AbstractCheckedElementTag.java",
"license": "unlicense",
"size": 3346
} | [
"javax.servlet.jsp.JspException"
] | import javax.servlet.jsp.JspException; | import javax.servlet.jsp.*; | [
"javax.servlet"
] | javax.servlet; | 781,449 |
public GeoInfo load() {
ownTransformation = file.getOwnTransformation();
externalTransformation = (AffineTransform) ownTransformation.clone();
return this;
} | GeoInfo function() { ownTransformation = file.getOwnTransformation(); externalTransformation = (AffineTransform) ownTransformation.clone(); return this; } | /**
* Obtenemos o calculamos el extent de la imagen.
*/ | Obtenemos o calculamos el extent de la imagen | load | {
"repo_name": "iCarto/siga",
"path": "libRaster/src/org/gvsig/raster/dataset/io/MrSidDriver.java",
"license": "gpl-3.0",
"size": 18736
} | [
"java.awt.geom.AffineTransform",
"org.gvsig.raster.dataset.GeoInfo"
] | import java.awt.geom.AffineTransform; import org.gvsig.raster.dataset.GeoInfo; | import java.awt.geom.*; import org.gvsig.raster.dataset.*; | [
"java.awt",
"org.gvsig.raster"
] | java.awt; org.gvsig.raster; | 893,124 |
public Time getTimeLastModified(); | Time function(); | /**
* Access the time of last modificaiton.
*
* @return The Time of last modification.
*/ | Access the time of last modificaiton | getTimeLastModified | {
"repo_name": "ouit0408/sakai",
"path": "assignment/assignment-api/api/src/java/org/sakaiproject/assignment/api/Assignment.java",
"license": "apache-2.0",
"size": 11954
} | [
"org.sakaiproject.time.api.Time"
] | import org.sakaiproject.time.api.Time; | import org.sakaiproject.time.api.*; | [
"org.sakaiproject.time"
] | org.sakaiproject.time; | 935,043 |
public void reload(List<MercadoriaEntity> mercadorias) {
modelo.reload(mercadorias);
} | void function(List<MercadoriaEntity> mercadorias) { modelo.reload(mercadorias); } | /**
* Recarrega a tabela de <code>Mercadoria</code> com a lista
* <code>mercadorias</code>.
*
* @param mercadorias
* <code>List</code> com os elementos <code>Mercadoria</code> que
* devem ser exibidos na tabela.
*/ | Recarrega a tabela de <code>Mercadoria</code> com a lista <code>mercadorias</code> | reload | {
"repo_name": "cams7/crud_sys",
"path": "crud_sys-desktop/src/main/java/br/com/cams7/crud/ui/MercadoriaTable.java",
"license": "gpl-3.0",
"size": 1166
} | [
"br.com.cams7.crud.entity.MercadoriaEntity",
"java.util.List"
] | import br.com.cams7.crud.entity.MercadoriaEntity; import java.util.List; | import br.com.cams7.crud.entity.*; import java.util.*; | [
"br.com.cams7",
"java.util"
] | br.com.cams7; java.util; | 580,678 |
public synchronized boolean remove(String key) throws IOException {
initialize();
checkNotClosed();
validateKey(key);
Entry entry = lruEntries.get(key);
if (entry == null) return false;
return removeEntry(entry);
} | synchronized boolean function(String key) throws IOException { initialize(); checkNotClosed(); validateKey(key); Entry entry = lruEntries.get(key); if (entry == null) return false; return removeEntry(entry); } | /**
* Drops the entry for {@code key} if it exists and can be removed. If the
* entry for {@code key} is currently being edited, that edit will complete
* normally but its value will not be stored.
*
* @return true if an entry was removed.
*/ | Drops the entry for key if it exists and can be removed. If the entry for key is currently being edited, that edit will complete normally but its value will not be stored | remove | {
"repo_name": "jinmiao/okhttp",
"path": "okhttp/src/main/java/com/squareup/okhttp/internal/DiskLruCache.java",
"license": "apache-2.0",
"size": 33962
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 946,220 |
public void put(Text columnFamily, Text columnQualifier, Value value) {
put(columnFamily, columnQualifier, EMPTY_BYTES, false, 0L, false, value.get());
} | void function(Text columnFamily, Text columnQualifier, Value value) { put(columnFamily, columnQualifier, EMPTY_BYTES, false, 0L, false, value.get()); } | /**
* Puts a modification in this mutation. Column visibility is empty; timestamp is not set. All
* parameters are defensively copied.
*
* @param columnFamily
* column family
* @param columnQualifier
* column qualifier
* @param value
* cell value
* @see #at()
... | Puts a modification in this mutation. Column visibility is empty; timestamp is not set. All parameters are defensively copied | put | {
"repo_name": "milleruntime/accumulo",
"path": "core/src/main/java/org/apache/accumulo/core/data/Mutation.java",
"license": "apache-2.0",
"size": 52382
} | [
"org.apache.hadoop.io.Text"
] | import org.apache.hadoop.io.Text; | import org.apache.hadoop.io.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 2,214,302 |
@Bean
@ConditionalOnMissingBean(HiveConnectorTableService.class)
public HiveConnectorTableService hiveTableService(
final IMetacatHiveClient metacatHiveClient,
final HiveConnectorInfoConverter hiveMetacatConverters,
final HiveConnectorDatabaseService hiveConnectorDatabaseService,
... | @ConditionalOnMissingBean(HiveConnectorTableService.class) HiveConnectorTableService function( final IMetacatHiveClient metacatHiveClient, final HiveConnectorInfoConverter hiveMetacatConverters, final HiveConnectorDatabaseService hiveConnectorDatabaseService, final ConnectorContext connectorContext ) { return new HiveC... | /**
* create hive connector table service.
*
* @param metacatHiveClient metacat hive client
* @param hiveMetacatConverters hive metacat converters
* @param hiveConnectorDatabaseService hive database service
* @param connectorContext connector config
* @re... | create hive connector table service | hiveTableService | {
"repo_name": "tgianos/metacat",
"path": "metacat-connector-hive/src/main/java/com/netflix/metacat/connector/hive/configs/HiveConnectorConfig.java",
"license": "apache-2.0",
"size": 5805
} | [
"com.netflix.metacat.common.server.connectors.ConnectorContext",
"com.netflix.metacat.connector.hive.HiveConnectorDatabaseService",
"com.netflix.metacat.connector.hive.HiveConnectorTableService",
"com.netflix.metacat.connector.hive.IMetacatHiveClient",
"com.netflix.metacat.connector.hive.converters.HiveConn... | import com.netflix.metacat.common.server.connectors.ConnectorContext; import com.netflix.metacat.connector.hive.HiveConnectorDatabaseService; import com.netflix.metacat.connector.hive.HiveConnectorTableService; import com.netflix.metacat.connector.hive.IMetacatHiveClient; import com.netflix.metacat.connector.hive.conve... | import com.netflix.metacat.common.server.connectors.*; import com.netflix.metacat.connector.hive.*; import com.netflix.metacat.connector.hive.converters.*; import org.springframework.boot.autoconfigure.condition.*; | [
"com.netflix.metacat",
"org.springframework.boot"
] | com.netflix.metacat; org.springframework.boot; | 1,356,852 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Response<DiagnosticDetectorResponseInner>> executeSiteDetectorWithResponseAsync(
String resourceGroupName,
String siteName,
String detectorName,
String diagnosticCategory,
OffsetDateTime startTime,
OffsetDat... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<DiagnosticDetectorResponseInner>> function( String resourceGroupName, String siteName, String detectorName, String diagnosticCategory, OffsetDateTime startTime, OffsetDateTime endTime, String timeGrain, Context context) { if (this.client.getEndpoint() == null) {... | /**
* Description for Execute Detector.
*
* @param resourceGroupName Name of the resource group to which the resource belongs.
* @param siteName Site Name.
* @param detectorName Detector Resource Name.
* @param diagnosticCategory Category Name.
* @param startTime Start Time.
* @p... | Description for Execute Detector | executeSiteDetectorWithResponseAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/implementation/DiagnosticsClientImpl.java",
"license": "mit",
"size": 288640
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.Context",
"com.azure.resourcemanager.appservice.fluent.models.DiagnosticDetectorResponseInner",
"java.time.OffsetDateTime"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.appservice.fluent.models.DiagnosticDetectorResponseInner; import java.time.OffsetDateTime; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.appservice.fluent.models.*; import java.time.*; | [
"com.azure.core",
"com.azure.resourcemanager",
"java.time"
] | com.azure.core; com.azure.resourcemanager; java.time; | 392,969 |
public static void sort(int[] data, int start, int end, IntComparator comp) {
quickSort(data, start, end, comp);
} | static void function(int[] data, int start, int end, IntComparator comp) { quickSort(data, start, end, comp); } | /**
* Sort the array using the given comparator.
*
* @param data Data to sort
* @param start First index
* @param end Last index (exclusive)
* @param comp Comparator
*/ | Sort the array using the given comparator | sort | {
"repo_name": "elki-project/elki",
"path": "elki-core-util/src/main/java/elki/utilities/datastructures/arrays/IntegerArrayQuickSort.java",
"license": "agpl-3.0",
"size": 8039
} | [
"it.unimi.dsi.fastutil.ints.IntComparator"
] | import it.unimi.dsi.fastutil.ints.IntComparator; | import it.unimi.dsi.fastutil.ints.*; | [
"it.unimi.dsi"
] | it.unimi.dsi; | 143,554 |
public boolean showMoveItems(List<Object> items, List<Object> locations, Object defaultLocation)
{
if (items.isEmpty()) return false;
if (items.get(0) instanceof Group) { this.setTitle("Move Group(s)"); }
else if (items.get(0) instanceof Contact) { this.setTitle("Move Contact(s)"); }
else if (items.get... | boolean function(List<Object> items, List<Object> locations, Object defaultLocation) { if (items.isEmpty()) return false; if (items.get(0) instanceof Group) { this.setTitle(STR); } else if (items.get(0) instanceof Contact) { this.setTitle(STR); } else if (items.get(0) instanceof Account) { this.setTitle(STR); } else { ... | /**
* Shows a dialog appropriate for a move operation.
*
* @param items A list of items to be moved
* @param locations A list of destinations
* @param defaultLocation The destination selected by default
* @return True if the user pressed OK, false if s/he cancelled
*/ | Shows a dialog appropriate for a move operation | showMoveItems | {
"repo_name": "goc9000/UniArchive",
"path": "src/uniarchive/forms/ArchiveOperationsDialog.java",
"license": "gpl-3.0",
"size": 12946
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,916,444 |
public static Collection<User> getTopFans(String artist, String apiKey) {
Result result = Caller.getInstance().call("artist.getTopFans", apiKey, "artist", artist);
return ResponseBuilder.buildCollection(result, User.class);
} | static Collection<User> function(String artist, String apiKey) { Result result = Caller.getInstance().call(STR, apiKey, STR, artist); return ResponseBuilder.buildCollection(result, User.class); } | /**
* Retrieves a list of the top fans of the given artist.
*
* @param artist Artist's name
* @param apiKey The API key
* @return list of top fans
*/ | Retrieves a list of the top fans of the given artist | getTopFans | {
"repo_name": "dubenju/javay",
"path": "src/java/de/umass/lastfm/Artist.java",
"license": "apache-2.0",
"size": 14677
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 2,195,277 |
void removeAttribute(PerunSession sess, Facility facility, User user, AttributeDefinition attribute) throws WrongAttributeAssignmentException, WrongAttributeValueException, WrongReferenceAttributeValueException; | void removeAttribute(PerunSession sess, Facility facility, User user, AttributeDefinition attribute) throws WrongAttributeAssignmentException, WrongAttributeValueException, WrongReferenceAttributeValueException; | /**
* Unset particular attribute for the user on the facility. Core attributes can't be removed this way.
*
* @param sess perun session
* @param user remove attribute from this user
* @param facility remove attributes for this facility
* @param attribute attribute to remove
*
* @throws InternalErrorExce... | Unset particular attribute for the user on the facility. Core attributes can't be removed this way | removeAttribute | {
"repo_name": "zlamalp/perun",
"path": "perun-core/src/main/java/cz/metacentrum/perun/core/bl/AttributesManagerBl.java",
"license": "bsd-2-clause",
"size": 244560
} | [
"cz.metacentrum.perun.core.api.AttributeDefinition",
"cz.metacentrum.perun.core.api.Facility",
"cz.metacentrum.perun.core.api.PerunSession",
"cz.metacentrum.perun.core.api.User",
"cz.metacentrum.perun.core.api.exceptions.WrongAttributeAssignmentException",
"cz.metacentrum.perun.core.api.exceptions.WrongAt... | import cz.metacentrum.perun.core.api.AttributeDefinition; import cz.metacentrum.perun.core.api.Facility; import cz.metacentrum.perun.core.api.PerunSession; import cz.metacentrum.perun.core.api.User; import cz.metacentrum.perun.core.api.exceptions.WrongAttributeAssignmentException; import cz.metacentrum.perun.core.api.e... | import cz.metacentrum.perun.core.api.*; import cz.metacentrum.perun.core.api.exceptions.*; | [
"cz.metacentrum.perun"
] | cz.metacentrum.perun; | 1,814,177 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Response<EntityQueryInner>> getWithResponseAsync(
String resourceGroupName, String workspaceName, String entityQueryId) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
new Ille... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<EntityQueryInner>> function( String resourceGroupName, String workspaceName, String entityQueryId) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (this.client.getSubscriptionId() == null) { return Mono .e... | /**
* Gets an entity query.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param workspaceName The name of the workspace.
* @param entityQueryId entity query ID.
* @throws IllegalArgumentException thrown if parameters fail the validation.
... | Gets an entity query | getWithResponseAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/securityinsights/azure-resourcemanager-securityinsights/src/main/java/com/azure/resourcemanager/securityinsights/implementation/EntityQueriesClientImpl.java",
"license": "mit",
"size": 44744
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.FluxUtil",
"com.azure.resourcemanager.securityinsights.fluent.models.EntityQueryInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.securityinsights.fluent.models.EntityQueryInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.securityinsights.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 907,608 |
public List<Photo> getPhotoObjects() {
if (photos == null || photos.isEmpty()) {
return null;
}
List<Photo> photoObjects = new ArrayList<Photo>();
for(TypifiedPluralProperty photo : photos) {
if(photo != null) {
Photo photoObject = new Photo();... | List<Photo> function() { if (photos == null photos.isEmpty()) { return null; } List<Photo> photoObjects = new ArrayList<Photo>(); for(TypifiedPluralProperty photo : photos) { if(photo != null) { Photo photoObject = new Photo(); photoObject.setPreferred(photo.isPreferred()); String type = photo.getPropertyType(); String... | /**
* Returns the photos as <code>Photo</code> and not just as Property
* @return the photo for this Personal Detail
*/ | Returns the photos as <code>Photo</code> and not just as Property | getPhotoObjects | {
"repo_name": "zhangdakun/funasyn",
"path": "externals/java-sdk/pim/src/main/java-se/com/funambol/common/pim/model/contact/PersonalDetail.java",
"license": "agpl-3.0",
"size": 9634
} | [
"com.funambol.common.pim.model.common.TypifiedPluralProperty",
"com.funambol.util.Base64",
"java.util.ArrayList",
"java.util.List"
] | import com.funambol.common.pim.model.common.TypifiedPluralProperty; import com.funambol.util.Base64; import java.util.ArrayList; import java.util.List; | import com.funambol.common.pim.model.common.*; import com.funambol.util.*; import java.util.*; | [
"com.funambol.common",
"com.funambol.util",
"java.util"
] | com.funambol.common; com.funambol.util; java.util; | 1,291,631 |
protected void sequence_WaypointType(ISerializationContext context, WaypointType semanticObject) {
if (errorAcceptor != null) {
if (transientValues.isValueTransient(semanticObject, TurtlebotmissionPackage.Literals.NAMED_ELEMENT__NAME) == ValueTransient.YES)
errorAcceptor.accept(diagnosticProvider.createFeat... | void function(ISerializationContext context, WaypointType semanticObject) { if (errorAcceptor != null) { if (transientValues.isValueTransient(semanticObject, TurtlebotmissionPackage.Literals.NAMED_ELEMENT__NAME) == ValueTransient.YES) errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, Tur... | /**
* Contexts:
* WaypointType returns WaypointType
*
* Constraint:
* name=EString
*/ | Contexts: WaypointType returns WaypointType Constraint: name=EString | sequence_WaypointType | {
"repo_name": "kribe48/wasp-mbse",
"path": "WASP-turtlebot-DSL/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/serializer/MyDslSemanticSequencer.java",
"license": "mit",
"size": 6749
} | [
"org.eclipse.xtext.serializer.ISerializationContext",
"org.eclipse.xtext.serializer.acceptor.SequenceFeeder",
"org.eclipse.xtext.serializer.sequencer.ITransientValueService"
] | import org.eclipse.xtext.serializer.ISerializationContext; import org.eclipse.xtext.serializer.acceptor.SequenceFeeder; import org.eclipse.xtext.serializer.sequencer.ITransientValueService; | import org.eclipse.xtext.serializer.*; import org.eclipse.xtext.serializer.acceptor.*; import org.eclipse.xtext.serializer.sequencer.*; | [
"org.eclipse.xtext"
] | org.eclipse.xtext; | 167,945 |
void deleteString(String key) throws MdbmException; | void deleteString(String key) throws MdbmException; | /**
* Delete a string from the MDBM. <br>
*
* @param key Stored key
* @throws MdbmException if errno is set. Typically, an error could only occur if the database has been corrupted.
*/ | Delete a string from the MDBM. | deleteString | {
"repo_name": "ruo91/mdbm",
"path": "src/java/src/main/java/com/yahoo/db/mdbm/MdbmInterface.java",
"license": "bsd-3-clause",
"size": 27198
} | [
"com.yahoo.db.mdbm.exceptions.MdbmException"
] | import com.yahoo.db.mdbm.exceptions.MdbmException; | import com.yahoo.db.mdbm.exceptions.*; | [
"com.yahoo.db"
] | com.yahoo.db; | 2,642,199 |
public static MenuScroller setScrollerFor(JPopupMenu menu, int scrollCount, int interval) {
return new MenuScroller(menu, scrollCount, interval);
} | static MenuScroller function(JPopupMenu menu, int scrollCount, int interval) { return new MenuScroller(menu, scrollCount, interval); } | /**
* Registers a popup menu to be scrolled, with the specified number of items to
* display at a time and the specified scrolling interval.
*
* @param menu the popup menu
* @param scrollCount the number of items to be displayed at a time
* @param interval the scroll interval, in milliseconds
* @r... | Registers a popup menu to be scrolled, with the specified number of items to display at a time and the specified scrolling interval | setScrollerFor | {
"repo_name": "martianmartin/Energia",
"path": "app/src/processing/app/tools/MenuScroller.java",
"license": "lgpl-2.1",
"size": 20325
} | [
"javax.swing.JPopupMenu"
] | import javax.swing.JPopupMenu; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 2,353,354 |
UserDataStore userDataStore;
userDataStore = new DiskUserDataStore(this.userCache);
return userDataStore;
} | UserDataStore userDataStore; userDataStore = new DiskUserDataStore(this.userCache); return userDataStore; } | /**
* Create {@link UserDataStore} from a message id.
*/ | Create <code>UserDataStore</code> from a message id | create | {
"repo_name": "Nygar/SdosExample",
"path": "presentation/src/main/java/com/sdos/android/sample/presentation/data/repository/datasource/UserDataStoreFactory.java",
"license": "apache-2.0",
"size": 1602
} | [
"com.sdos.android.sample.presentation.data.repository.datasource.source.UserDataStore",
"com.sdos.android.sample.presentation.data.repository.datasource.source.disk.DiskUserDataStore"
] | import com.sdos.android.sample.presentation.data.repository.datasource.source.UserDataStore; import com.sdos.android.sample.presentation.data.repository.datasource.source.disk.DiskUserDataStore; | import com.sdos.android.sample.presentation.data.repository.datasource.source.*; import com.sdos.android.sample.presentation.data.repository.datasource.source.disk.*; | [
"com.sdos.android"
] | com.sdos.android; | 213,558 |
Response<SkuEnumerationForExistingResourceResult> listSkusForCapacityWithResponse(
String resourceGroupName, String dedicatedCapacityName, Context context); | Response<SkuEnumerationForExistingResourceResult> listSkusForCapacityWithResponse( String resourceGroupName, String dedicatedCapacityName, Context context); | /**
* Lists eligible SKUs for a PowerBI Dedicated resource.
*
* @param resourceGroupName The name of the Azure Resource group of which a given PowerBIDedicated capacity is part.
* This name must be at least 1 character in length, and no more than 90.
* @param dedicatedCapacityName The name ... | Lists eligible SKUs for a PowerBI Dedicated resource | listSkusForCapacityWithResponse | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/powerbidedicated/azure-resourcemanager-powerbidedicated/src/main/java/com/azure/resourcemanager/powerbidedicated/models/Capacities.java",
"license": "mit",
"size": 17073
} | [
"com.azure.core.http.rest.Response",
"com.azure.core.util.Context"
] | import com.azure.core.http.rest.Response; import com.azure.core.util.Context; | import com.azure.core.http.rest.*; import com.azure.core.util.*; | [
"com.azure.core"
] | com.azure.core; | 1,232,793 |
private void clearSyncDate(@NonNull String moduleName) {
mStorage.prefs().edit()
.remove(moduleName)
.remove(moduleName + LOCALE_CONSTANT)
.commit();
}
private static class HaloContentSyncQueryManager {
private static final Stri... | void function(@NonNull String moduleName) { mStorage.prefs().edit() .remove(moduleName) .remove(moduleName + LOCALE_CONSTANT) .commit(); } private static class HaloContentSyncQueryManager { private static final String INSERT = STR + ContentSync.ID + "," + ContentSync.MODULE_ID + "," + ContentSync.NAME + "," + ContentSy... | /**
* Clears the sync date given a locale and a module.
*
* @param moduleName The module name.
*/ | Clears the sync date given a locale and a module | clearSyncDate | {
"repo_name": "mobgen/halo-android",
"path": "sdk-libs/halo-content/src/main/java/com/mobgen/halo/android/content/sync/ContentSyncLocalDatasource.java",
"license": "apache-2.0",
"size": 20507
} | [
"android.database.sqlite.SQLiteDatabase",
"android.database.sqlite.SQLiteStatement",
"android.support.annotation.NonNull",
"com.mobgen.halo.android.content.spec.HaloContentContract",
"com.mobgen.halo.android.framework.common.utils.AssertionUtils",
"com.mobgen.halo.android.framework.storage.database.dsl.OR... | import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteStatement; import android.support.annotation.NonNull; import com.mobgen.halo.android.content.spec.HaloContentContract; import com.mobgen.halo.android.framework.common.utils.AssertionUtils; import com.mobgen.halo.android.framework.storag... | import android.database.sqlite.*; import android.support.annotation.*; import com.mobgen.halo.android.content.spec.*; import com.mobgen.halo.android.framework.common.utils.*; import com.mobgen.halo.android.framework.storage.database.dsl.*; | [
"android.database",
"android.support",
"com.mobgen.halo"
] | android.database; android.support; com.mobgen.halo; | 1,295,001 |
public StoredValueSet getPartSet() {
return (StoredValueSet) partMap.values();
} | StoredValueSet function() { return (StoredValueSet) partMap.values(); } | /**
* Return an entity set view of the part storage container.
*/ | Return an entity set view of the part storage container | getPartSet | {
"repo_name": "djsedulous/namecoind",
"path": "libs/db-4.7.25.NC/examples_java/src/collections/ship/entity/SampleViews.java",
"license": "mit",
"size": 9839
} | [
"com.sleepycat.collections.StoredValueSet"
] | import com.sleepycat.collections.StoredValueSet; | import com.sleepycat.collections.*; | [
"com.sleepycat.collections"
] | com.sleepycat.collections; | 1,687,988 |
EAttribute getColorSet_Declare();
| EAttribute getColorSet_Declare(); | /**
* Returns the meta object for the attribute '{@link io.github.abelgomez.cpntools.ColorSet#getDeclare <em>Declare</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Declare</em>'.
* @see io.github.abelgomez.cpntools.ColorSet#getDeclare()
* @se... | Returns the meta object for the attribute '<code>io.github.abelgomez.cpntools.ColorSet#getDeclare Declare</code>'. | getColorSet_Declare | {
"repo_name": "abelgomez/cpntools.toolkit",
"path": "plugins/io.github.abelgomez.cpntools/src/io/github/abelgomez/cpntools/CpntoolsPackage.java",
"license": "epl-1.0",
"size": 204644
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 188,058 |
public static boolean validateDate(Date date) {
String time = getTime(date);
return validateTime(time);
} | static boolean function(Date date) { String time = getTime(date); return validateTime(time); } | /**
* Validates a time String if it matches one of the two regular expressions.<p>
*
* Returns <code>true</code> if the given date matches to one of the regular
* expressions, <code>false</code> otherwise.<p>
*
* @param date the date String to check
*
* @return <code>true</code> ... | Validates a time String if it matches one of the two regular expressions. Returns <code>true</code> if the given date matches to one of the regular expressions, <code>false</code> otherwise | validateDate | {
"repo_name": "ggiudetti/opencms-core",
"path": "src-gwt/org/opencms/gwt/client/ui/input/datebox/CmsDateConverter.java",
"license": "lgpl-2.1",
"size": 11989
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 350,256 |
public List<AcademicSession> getAcademicSessions();
| List<AcademicSession> function(); | /**
* Gets the list of all known AcademicSessions, sorted by start date.
*
* @return
*/ | Gets the list of all known AcademicSessions, sorted by start date | getAcademicSessions | {
"repo_name": "marktriggs/nyu-sakai-10.4",
"path": "edu-services/cm-service/cm-api/api/src/java/org/sakaiproject/coursemanagement/api/CourseManagementService.java",
"license": "apache-2.0",
"size": 15144
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 835,246 |
static Field forCode(final int field) {
switch (field) {
case MIN_VALUE_FIELD: return MIN_VALUE;
case MAX_VALUE_FIELD: return MAX_VALUE;
case UNIT_FIELD: return UNIT;
default: throw new AssertionError(field);
}
... | static Field forCode(final int field) { switch (field) { case MIN_VALUE_FIELD: return MIN_VALUE; case MAX_VALUE_FIELD: return MAX_VALUE; case UNIT_FIELD: return UNIT; default: throw new AssertionError(field); } } } private final int openSet; private final int openInclusive; private final int openExclusive; private fina... | /**
* Returns the field constant for the given numeric identifier.
*/ | Returns the field constant for the given numeric identifier | forCode | {
"repo_name": "desruisseaux/sis",
"path": "core/sis-utility/src/main/java/org/apache/sis/measure/RangeFormat.java",
"license": "apache-2.0",
"size": 43898
} | [
"java.text.DateFormat",
"java.text.DecimalFormat",
"java.text.DecimalFormatSymbols",
"java.text.Format",
"java.text.NumberFormat",
"java.util.Date",
"java.util.Locale",
"java.util.Map",
"java.util.TimeZone",
"javax.measure.unit.Unit",
"javax.measure.unit.UnitFormat",
"org.apache.sis.util.resou... | import java.text.DateFormat; import java.text.DecimalFormat; import java.text.DecimalFormatSymbols; import java.text.Format; import java.text.NumberFormat; import java.util.Date; import java.util.Locale; import java.util.Map; import java.util.TimeZone; import javax.measure.unit.Unit; import javax.measure.unit.UnitForma... | import java.text.*; import java.util.*; import javax.measure.unit.*; import org.apache.sis.util.resources.*; | [
"java.text",
"java.util",
"javax.measure",
"org.apache.sis"
] | java.text; java.util; javax.measure; org.apache.sis; | 170,931 |
public List<O> convertCollection(Collection<I> results) {
return convert(new PageableList<>(results));
}
| List<O> function(Collection<I> results) { return convert(new PageableList<>(results)); } | /**
* Converts the temporary object to a list object
*
* @param results
* the temporary object returned by the executed query
* @return the converted list
*/ | Converts the temporary object to a list object | convertCollection | {
"repo_name": "Communote/communote-server",
"path": "communote/persistence/src/main/java/com/communote/server/core/vo/query/QueryResultConverter.java",
"license": "apache-2.0",
"size": 2333
} | [
"com.communote.common.util.PageableList",
"java.util.Collection",
"java.util.List"
] | import com.communote.common.util.PageableList; import java.util.Collection; import java.util.List; | import com.communote.common.util.*; import java.util.*; | [
"com.communote.common",
"java.util"
] | com.communote.common; java.util; | 2,786,043 |
public String getBigO() {
Object tmp = library.getObject(entries, "O");
if (tmp instanceof StringObject) {
return ((StringObject) tmp).getLiteralString();
} else {
return null;
}
} | String function() { Object tmp = library.getObject(entries, "O"); if (tmp instanceof StringObject) { return ((StringObject) tmp).getLiteralString(); } else { return null; } } | /**
* Gets the 32-byte string used for verifying the owner password.
*
* @return 32-byte string representing the key O.
*/ | Gets the 32-byte string used for verifying the owner password | getBigO | {
"repo_name": "pdf4j/icepdf4",
"path": "core/src/main/java/org/icepdf/core/pobjects/security/EncryptionDictionary.java",
"license": "apache-2.0",
"size": 22747
} | [
"org.icepdf.core.pobjects.StringObject"
] | import org.icepdf.core.pobjects.StringObject; | import org.icepdf.core.pobjects.*; | [
"org.icepdf.core"
] | org.icepdf.core; | 2,473,818 |
@Test
public void testChildConfigurationsAtNoUniqueKey()
{
assertTrue("Got children", config.childConfigurationsAt("tables.table")
.isEmpty());
} | void function() { assertTrue(STR, config.childConfigurationsAt(STR) .isEmpty()); } | /**
* Tests the result of childConfigurationsAt() if the key selects multiple
* nodes.
*/ | Tests the result of childConfigurationsAt() if the key selects multiple nodes | testChildConfigurationsAtNoUniqueKey | {
"repo_name": "mohanaraosv/commons-configuration",
"path": "src/test/java/org/apache/commons/configuration2/TestHierarchicalConfiguration.java",
"license": "apache-2.0",
"size": 23759
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 1,241,143 |
String getUserFullName(final HttpServletRequest httpServletRequest); | String getUserFullName(final HttpServletRequest httpServletRequest); | /**
* Gets the full name of the current logged in user.
*
* @param httpServletRequest {@link HttpServletRequest} request attribute used to save the fetched result in session.
* @return {@link String} full name of the current user based on its commonName.
*/ | Gets the full name of the current logged in user | getUserFullName | {
"repo_name": "ungerik/ephesoft",
"path": "Ephesoft_Community_Release_4.0.2.0/source/gxt/gxt-core/src/main/java/com/ephesoft/gxt/core/server/security/service/AuthorizationService.java",
"license": "agpl-3.0",
"size": 5722
} | [
"javax.servlet.http.HttpServletRequest"
] | import javax.servlet.http.HttpServletRequest; | import javax.servlet.http.*; | [
"javax.servlet"
] | javax.servlet; | 2,521,302 |
public void init(Object arg1,
Object arg2,
Object arg3,
Object arg4)
throws StandardException {
assert false : "Four-argument init() not implemented for " + getClass().getName();
}
| void function(Object arg1, Object arg2, Object arg3, Object arg4) throws StandardException { assert false : STR + getClass().getName(); } | /**
* Initialize a query tree node.
*
* @exception StandardException Thrown on error
*/ | Initialize a query tree node | init | {
"repo_name": "youngor/openclouddb",
"path": "MyCAT/src/main/java/com/akiban/sql/parser/QueryTreeNode.java",
"license": "apache-2.0",
"size": 26881
} | [
"com.akiban.sql.StandardException"
] | import com.akiban.sql.StandardException; | import com.akiban.sql.*; | [
"com.akiban.sql"
] | com.akiban.sql; | 691,898 |
private void setDefaultBackground() {
setBackgroundPainter(new MattePainter(new Color(229, 0, 0)));
unselectedBackgroundPainter = getBackgroundPainter();
selectedBackgroundPainter = new CompoundPainter(
unselectedBackgroundPainter,
new RectanglePainter(
... | void function() { setBackgroundPainter(new MattePainter(new Color(229, 0, 0))); unselectedBackgroundPainter = getBackgroundPainter(); selectedBackgroundPainter = new CompoundPainter( unselectedBackgroundPainter, new RectanglePainter( 3, 3, 3, 3, 3, 3, true, new Color(100, 100, 100, 100), 2f, new Color(50, 50, 50, 100))... | /**
* DOCUMENT ME!
*/ | DOCUMENT ME | setDefaultBackground | {
"repo_name": "cismet/cids-custom-wrrl-db-mv",
"path": "src/main/java/de/cismet/cids/custom/wrrl_db_mv/util/ReadOnlyFgskBandMember.java",
"license": "lgpl-3.0",
"size": 12099
} | [
"java.awt.Color",
"org.jdesktop.swingx.painter.CompoundPainter",
"org.jdesktop.swingx.painter.MattePainter",
"org.jdesktop.swingx.painter.RectanglePainter"
] | import java.awt.Color; import org.jdesktop.swingx.painter.CompoundPainter; import org.jdesktop.swingx.painter.MattePainter; import org.jdesktop.swingx.painter.RectanglePainter; | import java.awt.*; import org.jdesktop.swingx.painter.*; | [
"java.awt",
"org.jdesktop.swingx"
] | java.awt; org.jdesktop.swingx; | 933,649 |
public AcknowledgedResponse delete(DeleteSnapshotRequest deleteSnapshotRequest, RequestOptions options) throws IOException {
return restHighLevelClient.performRequestAndParseEntity(deleteSnapshotRequest, SnapshotRequestConverters::deleteSnapshot, options,
AcknowledgedResponse::fromXContent, empt... | AcknowledgedResponse function(DeleteSnapshotRequest deleteSnapshotRequest, RequestOptions options) throws IOException { return restHighLevelClient.performRequestAndParseEntity(deleteSnapshotRequest, SnapshotRequestConverters::deleteSnapshot, options, AcknowledgedResponse::fromXContent, emptySet()); } | /**
* Deletes a snapshot.
* See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html"> Snapshot and Restore
* API on elastic.co</a>
*
* @param deleteSnapshotRequest the request
* @param options the request options (e.g. headers), use {@link Reques... | Deletes a snapshot. See Snapshot and Restore API on elastic.co | delete | {
"repo_name": "gfyoung/elasticsearch",
"path": "client/rest-high-level/src/main/java/org/elasticsearch/client/SnapshotClient.java",
"license": "apache-2.0",
"size": 18231
} | [
"java.io.IOException",
"java.util.Collections",
"org.elasticsearch.action.admin.cluster.snapshots.delete.DeleteSnapshotRequest",
"org.elasticsearch.action.support.master.AcknowledgedResponse"
] | import java.io.IOException; import java.util.Collections; import org.elasticsearch.action.admin.cluster.snapshots.delete.DeleteSnapshotRequest; import org.elasticsearch.action.support.master.AcknowledgedResponse; | import java.io.*; import java.util.*; import org.elasticsearch.action.admin.cluster.snapshots.delete.*; import org.elasticsearch.action.support.master.*; | [
"java.io",
"java.util",
"org.elasticsearch.action"
] | java.io; java.util; org.elasticsearch.action; | 2,639,998 |
public static double[] reprojectCoordinates(double[] coordinates, CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS) throws FactoryException, TransformException {
if (coordinates == null || coordinates.length < 2 || sourceCRS == null || targetCRS == null) {
throw new Illeg... | static double[] function(double[] coordinates, CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem targetCRS) throws FactoryException, TransformException { if (coordinates == null coordinates.length < 2 sourceCRS == null targetCRS == null) { throw new IllegalArgumentException(); } if (sourceCRS.equals(target... | /**
* NOTE: This class use GeoTools library to do the re-projection, which bound connections to a HSQL DB. The connections
* seems to not be managed properly, which lead to potential memory leak and random error messages in the server logs.
* @param coordinates Array of coordinates [x1, y1, x2, y2, .... | seems to not be managed properly, which lead to potential memory leak and random error messages in the server logs | reprojectCoordinates | {
"repo_name": "atlasmapper/atlasmapper",
"path": "src/main/java/au/gov/aims/atlasmapperserver/Utils.java",
"license": "gpl-3.0",
"size": 44200
} | [
"org.geotools.geometry.jts.JTS",
"org.geotools.referencing.CRS",
"org.locationtech.jts.geom.Coordinate",
"org.opengis.referencing.FactoryException",
"org.opengis.referencing.crs.CoordinateReferenceSystem",
"org.opengis.referencing.operation.MathTransform",
"org.opengis.referencing.operation.TransformExc... | import org.geotools.geometry.jts.JTS; import org.geotools.referencing.CRS; import org.locationtech.jts.geom.Coordinate; import org.opengis.referencing.FactoryException; import org.opengis.referencing.crs.CoordinateReferenceSystem; import org.opengis.referencing.operation.MathTransform; import org.opengis.referencing.op... | import org.geotools.geometry.jts.*; import org.geotools.referencing.*; import org.locationtech.jts.geom.*; import org.opengis.referencing.*; import org.opengis.referencing.crs.*; import org.opengis.referencing.operation.*; | [
"org.geotools.geometry",
"org.geotools.referencing",
"org.locationtech.jts",
"org.opengis.referencing"
] | org.geotools.geometry; org.geotools.referencing; org.locationtech.jts; org.opengis.referencing; | 458,845 |
private void writeTableInserts(final List<String> tables,
final BufferedWriter writer, final Connection conn) {
// Write out the section header
writeOut(writer, lineSep + "// Insert data into the tables");
// Iterate over the table names
for (String table : tables) {
try {
// Crea... | void function(final List<String> tables, final BufferedWriter writer, final Connection conn) { writeOut(writer, lineSep + STRSELECT * FROM STR, STR, STRINSERT INTO STR (STR) VALUES (STR);") .append(lineSep); writeOut(writer, sb.toString()); } } catch (SQLException e) { Logger.error(e); } } } | /**
* Write the 'insert' statements.
*
* @param tables the list of table names
* @param writer the output writer
* @param conn the database connection
*/ | Write the 'insert' statements | writeTableInserts | {
"repo_name": "argonium/beetle-cli",
"path": "src/io/miti/beetle/prefs/DBScript.java",
"license": "mit",
"size": 24846
} | [
"io.miti.beetle.util.Logger",
"java.io.BufferedWriter",
"java.sql.Connection",
"java.sql.SQLException",
"java.util.List"
] | import io.miti.beetle.util.Logger; import java.io.BufferedWriter; import java.sql.Connection; import java.sql.SQLException; import java.util.List; | import io.miti.beetle.util.*; import java.io.*; import java.sql.*; import java.util.*; | [
"io.miti.beetle",
"java.io",
"java.sql",
"java.util"
] | io.miti.beetle; java.io; java.sql; java.util; | 2,612,180 |
conversation.begin();
this.item = item;
return NavigationRules.ITEM.getRule();
} | conversation.begin(); this.item = item; return NavigationRules.ITEM.getRule(); } | /**
* Starts the conversation
* @param item - item
* @return
*/ | Starts the conversation | startConversation | {
"repo_name": "rcuprak/actionbazaar",
"path": "chapter14/src/main/java/com/actionbazaar/controller/ItemController.java",
"license": "apache-2.0",
"size": 3283
} | [
"com.actionbazaar.NavigationRules"
] | import com.actionbazaar.NavigationRules; | import com.actionbazaar.*; | [
"com.actionbazaar"
] | com.actionbazaar; | 1,548,495 |
public final void testToCustomStringRoundtrip() throws URIException {
UsableURI uuri = UsableURIFactory.
getInstance("http://www.example.com/path?query#anchor");
UsableURI uuri2 = UsableURIFactory.getInstance(uuri.toCustomString());
assertEquals("Not equal", uuri.toString(), uuri... | final void function() throws URIException { UsableURI uuri = UsableURIFactory. getInstance(STRNot equal", uuri.toString(), uuri2.toString()); } | /**
* A UURI's string representation should be same after a
* toCustomString-getInstance roundtrip.
*
* @throws URIException
*/ | A UURI's string representation should be same after a toCustomString-getInstance roundtrip | testToCustomStringRoundtrip | {
"repo_name": "rjoberon/webarchive-commons",
"path": "src/test/java/org/archive/url/UsableURIFactoryTest.java",
"license": "apache-2.0",
"size": 50461
} | [
"org.apache.commons.httpclient.URIException",
"org.archive.url.UsableURI",
"org.archive.url.UsableURIFactory"
] | import org.apache.commons.httpclient.URIException; import org.archive.url.UsableURI; import org.archive.url.UsableURIFactory; | import org.apache.commons.httpclient.*; import org.archive.url.*; | [
"org.apache.commons",
"org.archive.url"
] | org.apache.commons; org.archive.url; | 298,873 |
protected void replyRejectPacket(IQ request) throws NotConnectedException, InterruptedException {
XMPPError xmppError = new XMPPError(XMPPError.Condition.not_acceptable);
IQ error = IQ.createErrorResponse(request, xmppError);
this.connection.sendStanza(error);
} | void function(IQ request) throws NotConnectedException, InterruptedException { XMPPError xmppError = new XMPPError(XMPPError.Condition.not_acceptable); IQ error = IQ.createErrorResponse(request, xmppError); this.connection.sendStanza(error); } | /**
* Responses to the given IQ packet's sender with an XMPP error that an In-Band Bytestream is
* not accepted.
*
* @param request IQ stanza(/packet) that should be answered with a not-acceptable error
* @throws NotConnectedException
* @throws InterruptedException
*/ | Responses to the given IQ packet's sender with an XMPP error that an In-Band Bytestream is not accepted | replyRejectPacket | {
"repo_name": "ayne/Smack",
"path": "smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamManager.java",
"license": "apache-2.0",
"size": 22539
} | [
"org.jivesoftware.smack.SmackException",
"org.jivesoftware.smack.packet.IQ",
"org.jivesoftware.smack.packet.XMPPError"
] | import org.jivesoftware.smack.SmackException; import org.jivesoftware.smack.packet.IQ; import org.jivesoftware.smack.packet.XMPPError; | import org.jivesoftware.smack.*; import org.jivesoftware.smack.packet.*; | [
"org.jivesoftware.smack"
] | org.jivesoftware.smack; | 2,309,469 |
public static <T> Predicate<T> predicate(CheckedPredicate<T> predicate) {
return input -> {
try {
return predicate.test(input);
}
catch (Exception e) {
if (e instanceof RuntimeException) {
throw (RuntimeException) e;
... | static <T> Predicate<T> function(CheckedPredicate<T> predicate) { return input -> { try { return predicate.test(input); } catch (Exception e) { if (e instanceof RuntimeException) { throw (RuntimeException) e; } throw new RuntimeException(e); } }; } | /**
* Return a predicate which rethrows possible checked exceptions as runtime exception.
*
* @param predicate
* @param <T>
* @return
*/ | Return a predicate which rethrows possible checked exceptions as runtime exception | predicate | {
"repo_name": "tzpBingo/java-example",
"path": "src/main/java/org/java8/samples/misc/CheckedFunctions.java",
"license": "apache-2.0",
"size": 2440
} | [
"java.util.function.Predicate"
] | import java.util.function.Predicate; | import java.util.function.*; | [
"java.util"
] | java.util; | 1,314,304 |
protected JingleContentDescription getInstance() {
return new JingleContentDescription.Audio();
}
} | JingleContentDescription function() { return new JingleContentDescription.Audio(); } } | /**
* Get a new instance of this object.
*/ | Get a new instance of this object | getInstance | {
"repo_name": "magnetsystems/message-smack",
"path": "smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/provider/JingleContentDescriptionProvider.java",
"license": "apache-2.0",
"size": 4327
} | [
"org.jivesoftware.smackx.jingleold.packet.JingleContentDescription"
] | import org.jivesoftware.smackx.jingleold.packet.JingleContentDescription; | import org.jivesoftware.smackx.jingleold.packet.*; | [
"org.jivesoftware.smackx"
] | org.jivesoftware.smackx; | 1,807,161 |
public static PDFName mapFormattingObject(String fo, PDFObject parent) {
Mapper mapper = (Mapper)DEFAULT_MAPPINGS.get(fo);
if (mapper != null) {
return mapper.getStructureType(parent);
} else {
return NON_STRUCT;
}
} | static PDFName function(String fo, PDFObject parent) { Mapper mapper = (Mapper)DEFAULT_MAPPINGS.get(fo); if (mapper != null) { return mapper.getStructureType(parent); } else { return NON_STRUCT; } } | /**
* Maps a Formatting Object to a PDFName representing the associated structure type.
* @param fo the formatting object's local name
* @param parent the parent of the structure element to be mapped
* @return the structure type or null if no match could be found
*/ | Maps a Formatting Object to a PDFName representing the associated structure type | mapFormattingObject | {
"repo_name": "spepping/fop-cs",
"path": "src/java/org/apache/fop/render/pdf/FOToPDFRoleMap.java",
"license": "apache-2.0",
"size": 9104
} | [
"org.apache.fop.pdf.PDFName",
"org.apache.fop.pdf.PDFObject"
] | import org.apache.fop.pdf.PDFName; import org.apache.fop.pdf.PDFObject; | import org.apache.fop.pdf.*; | [
"org.apache.fop"
] | org.apache.fop; | 1,597,806 |
Collection<ValidationResult> validate( Date startDate, Date endDate, OrganisationUnit source );
| Collection<ValidationResult> validate( Date startDate, Date endDate, OrganisationUnit source ); | /**
* Validate DataValues.
*
* @param startDate the start date.
* @param endDate the end date.
* @param source the Source.
* @return a Collection of ValidationResults for each validation violation.
*/ | Validate DataValues | validate | {
"repo_name": "minagri-rwanda/DHIS2-Agriculture",
"path": "dhis-api/src/main/java/org/hisp/dhis/validation/ValidationRuleService.java",
"license": "bsd-3-clause",
"size": 10741
} | [
"java.util.Collection",
"java.util.Date",
"org.hisp.dhis.organisationunit.OrganisationUnit"
] | import java.util.Collection; import java.util.Date; import org.hisp.dhis.organisationunit.OrganisationUnit; | import java.util.*; import org.hisp.dhis.organisationunit.*; | [
"java.util",
"org.hisp.dhis"
] | java.util; org.hisp.dhis; | 965,802 |
public ObjectKey getPrimaryKey()
{
return SimpleKey.keyFor(getObjectID());
}
| ObjectKey function() { return SimpleKey.keyFor(getObjectID()); } | /**
* returns an id that differentiates this object from others
* of its class.
*/ | returns an id that differentiates this object from others of its class | getPrimaryKey | {
"repo_name": "trackplus/Genji",
"path": "src/main/java/com/aurel/track/persist/BaseTBaseLine.java",
"license": "gpl-3.0",
"size": 33977
} | [
"org.apache.torque.om.ObjectKey",
"org.apache.torque.om.SimpleKey"
] | import org.apache.torque.om.ObjectKey; import org.apache.torque.om.SimpleKey; | import org.apache.torque.om.*; | [
"org.apache.torque"
] | org.apache.torque; | 2,057,068 |
@Override
public boolean accept(File dir, String name); | boolean function(File dir, String name); | /**
* Tests if a specified file should be included in a file list.
*
* @param dir
* the directory in which the file was found.
* @param name
* the name of the file.
* @return {@code true} if and only if the name should be included in the
* file list; {@code false} other... | Tests if a specified file should be included in a file list | accept | {
"repo_name": "Haixing-Hu/commons",
"path": "src/main/java/com/github/haixing_hu/util/filter/file/FileFilter.java",
"license": "apache-2.0",
"size": 1781
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 1,297,447 |
public void dump(Printer pw, String prefix) {
pw.println(prefix + "type: " + type);
pw.println(prefix + "packageName: " + packageName);
pw.println(prefix + "installerPackageName: " + installerPackageName);
pw.println(prefix + "processName: " + processName);
pw.println(prefix ... | void function(Printer pw, String prefix) { pw.println(prefix + STR + type); pw.println(prefix + STR + packageName); pw.println(prefix + STR + installerPackageName); pw.println(prefix + STR + processName); pw.println(prefix + STR + time); pw.println(prefix + STR + systemApp); switch (type) { case TYPE_CRASH: crashInfo.d... | /**
* Dump the report to a Printer.
*/ | Dump the report to a Printer | dump | {
"repo_name": "JSDemos/android-sdk-20",
"path": "src/android/app/ApplicationErrorReport.java",
"license": "apache-2.0",
"size": 19016
} | [
"android.util.Printer"
] | import android.util.Printer; | import android.util.*; | [
"android.util"
] | android.util; | 1,431,211 |
public void addFilter(Filter filter) {
if (count(filter.getName())) {
// filters is locked for modification, but is itself CoppyOnWrite,
// and can be used while locked
synchronized (filters) {
int idx = Collections.binarySearch(filters, filter, new Compar... | void function(Filter filter) { if (count(filter.getName())) { synchronized (filters) { int idx = Collections.binarySearch(filters, filter, new Comparator<Filter>() { | /**
* add filter behind the others.
*/ | add filter behind the others | addFilter | {
"repo_name": "wouterdb/flens",
"path": "src/main/java/flens/core/Flengine.java",
"license": "apache-2.0",
"size": 18424
} | [
"java.util.Collections",
"java.util.Comparator"
] | import java.util.Collections; import java.util.Comparator; | import java.util.*; | [
"java.util"
] | java.util; | 1,468,085 |
public static Fragment getFragment(Option index)
{
Fragment retFrag = null;
switch(index)
{
case SCORES:
retFrag = new ScoresFragment();
break;
case FLASHCARD_MODE:
retFrag = new FlashcardModeFragment();
break;
case PRESIDENT_LIST:
retFrag = new PresidentListFragment();
break;... | static Fragment function(Option index) { Fragment retFrag = null; switch(index) { case SCORES: retFrag = new ScoresFragment(); break; case FLASHCARD_MODE: retFrag = new FlashcardModeFragment(); break; case PRESIDENT_LIST: retFrag = new PresidentListFragment(); break; case QUIZ_MODE: retFrag = new QuizModeFragment(); br... | /**
* Returns the fragment indicated by enum
* @param index
* @return fragment
*/ | Returns the fragment indicated by enum | getFragment | {
"repo_name": "allisonklopp/PresidentsFlashcardApp",
"path": "Presidents/src/com/catbird/presidents/Option.java",
"license": "mit",
"size": 1949
} | [
"android.support.v4.app.Fragment",
"com.catbird.presidents.fragment.AboutFragment",
"com.catbird.presidents.fragment.FlashcardModeFragment",
"com.catbird.presidents.fragment.PresidentListFragment",
"com.catbird.presidents.fragment.QuizModeFragment",
"com.catbird.presidents.fragment.ScoresFragment",
"com... | import android.support.v4.app.Fragment; import com.catbird.presidents.fragment.AboutFragment; import com.catbird.presidents.fragment.FlashcardModeFragment; import com.catbird.presidents.fragment.PresidentListFragment; import com.catbird.presidents.fragment.QuizModeFragment; import com.catbird.presidents.fragment.Scores... | import android.support.v4.app.*; import com.catbird.presidents.fragment.*; | [
"android.support",
"com.catbird.presidents"
] | android.support; com.catbird.presidents; | 2,710,016 |
private static Set<String> supportedClientKeyTypes(byte[] clientCertificateTypes) {
Set<String> result = new HashSet<String>(clientCertificateTypes.length);
for (byte keyTypeCode : clientCertificateTypes) {
String keyType = clientKeyType(keyTypeCode);
if (... | static Set<String> function(byte[] clientCertificateTypes) { Set<String> result = new HashSet<String>(clientCertificateTypes.length); for (byte keyTypeCode : clientCertificateTypes) { String keyType = clientKeyType(keyTypeCode); if (keyType == null) { continue; } result.add(keyType); } return result; } | /**
* Gets the supported key types for client certificates.
*
* @param clientCertificateTypes {@code ClientCertificateType} values provided by the server.
* See https://www.ietf.org/assignments/tls-parameters/tls-parameters.xml.
* @return supported key types that can ... | Gets the supported key types for client certificates | supportedClientKeyTypes | {
"repo_name": "s-gheldd/netty",
"path": "handler/src/main/java/io/netty/handler/ssl/ReferenceCountedOpenSslClientContext.java",
"license": "apache-2.0",
"size": 13875
} | [
"java.util.HashSet",
"java.util.Set"
] | import java.util.HashSet; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 436,047 |
@ApiModelProperty(example = "null", required = true, value = "type_id integer")
public Integer getTypeId() {
return typeId;
} | @ApiModelProperty(example = "null", required = true, value = STR) Integer function() { return typeId; } | /**
* type_id integer
*
* @return typeId
**/ | type_id integer | getTypeId | {
"repo_name": "GoldenGnu/eve-esi",
"path": "src/main/java/net/troja/eve/esi/model/CorporationAssetsResponse.java",
"license": "apache-2.0",
"size": 13184
} | [
"io.swagger.annotations.ApiModelProperty"
] | import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.*; | [
"io.swagger.annotations"
] | io.swagger.annotations; | 1,493,573 |
@Test
public void testVisibilityReverseScroll() {
initMediatorWithTriggerMode(TRIGGER_MODE_ON_REVERSE_SCROLL);
ArgumentCaptor<BrowserControlsStateProvider.Observer> browserControlsObserverCaptor =
ArgumentCaptor.forClass(BrowserControlsStateProvider.Observer.class);
Asse... | void function() { initMediatorWithTriggerMode(TRIGGER_MODE_ON_REVERSE_SCROLL); ArgumentCaptor<BrowserControlsStateProvider.Observer> browserControlsObserverCaptor = ArgumentCaptor.forClass(BrowserControlsStateProvider.Observer.class); Assert.assertEquals(STR, 0, mLayoutVisibilityTrue.getCallCount()); Assert.assertEqual... | /**
* Tests the show/hide logic for the reverse scroll mode.
*/ | Tests the show/hide logic for the reverse scroll mode | testVisibilityReverseScroll | {
"repo_name": "ric2b/Vivaldi-browser",
"path": "chromium/chrome/browser/continuous_search/android/junit/src/org/chromium/chrome/browser/continuous_search/ContinuousSearchListMediatorTest.java",
"license": "bsd-3-clause",
"size": 26505
} | [
"java.util.Arrays",
"org.chromium.chrome.browser.browser_controls.BrowserControlsStateProvider",
"org.chromium.chrome.browser.tab.Tab",
"org.chromium.url.JUnitTestGURLs",
"org.junit.Assert",
"org.mockito.ArgumentCaptor",
"org.mockito.Mockito"
] | import java.util.Arrays; import org.chromium.chrome.browser.browser_controls.BrowserControlsStateProvider; import org.chromium.chrome.browser.tab.Tab; import org.chromium.url.JUnitTestGURLs; import org.junit.Assert; import org.mockito.ArgumentCaptor; import org.mockito.Mockito; | import java.util.*; import org.chromium.chrome.browser.browser_controls.*; import org.chromium.chrome.browser.tab.*; import org.chromium.url.*; import org.junit.*; import org.mockito.*; | [
"java.util",
"org.chromium.chrome",
"org.chromium.url",
"org.junit",
"org.mockito"
] | java.util; org.chromium.chrome; org.chromium.url; org.junit; org.mockito; | 2,826,335 |
public void setSocketOfPlayer2(Socket gameSocket, Socket chatSocket) {
gameSocket2 = gameSocket;
chatSocket2 = chatSocket;
} | void function(Socket gameSocket, Socket chatSocket) { gameSocket2 = gameSocket; chatSocket2 = chatSocket; } | /**
* Sets sockets for second player
* @param gameSocket
* @param chatSocket
*/ | Sets sockets for second player | setSocketOfPlayer2 | {
"repo_name": "Jircus/GameServer",
"path": "src/server/GameThread.java",
"license": "gpl-3.0",
"size": 5552
} | [
"java.net.Socket"
] | import java.net.Socket; | import java.net.*; | [
"java.net"
] | java.net; | 910,255 |
public static long getBaseLoadAddress() {
synchronized (Linker.class) {
ensureInitializedLocked();
if (!sInBrowserProcess) {
Log.w(TAG, "Shared RELRO sections are disabled in this process!");
return 0;
}
setupBaseLoadAddressLoc... | static long function() { synchronized (Linker.class) { ensureInitializedLocked(); if (!sInBrowserProcess) { Log.w(TAG, STR); return 0; } setupBaseLoadAddressLocked(); if (DEBUG) Log.i(TAG, String.format(Locale.US, STR, sBaseLoadAddress)); return sBaseLoadAddress; } } | /**
* Retrieve the base load address of all shared RELRO sections.
* This also enforces the creation of shared RELRO sections in
* prepareLibraryLoad(), which can later be retrieved with getSharedRelros().
* @return a common, random base load address, or 0 if RELRO sharing is
* disabled.
*... | Retrieve the base load address of all shared RELRO sections. This also enforces the creation of shared RELRO sections in prepareLibraryLoad(), which can later be retrieved with getSharedRelros() | getBaseLoadAddress | {
"repo_name": "ChromiumWebApps/chromium",
"path": "base/android/java/src/org/chromium/base/library_loader/Linker.java",
"license": "bsd-3-clause",
"size": 42846
} | [
"android.util.Log",
"java.util.Locale"
] | import android.util.Log; import java.util.Locale; | import android.util.*; import java.util.*; | [
"android.util",
"java.util"
] | android.util; java.util; | 1,941,612 |
public static int isIpAddress(String ipAddress) {
Pattern VALID_IPV4_PATTERN = null;
Pattern VALID_IPV6_PATTERN = null;
String ipv4Pattern = "(([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\.){3}([01]?\\d\\d?|2[0-4]\\d|25[0-5])";
final String ipv6Pattern = "([0-9a-f]{1,4}:){7}([0-9a-f]){1,4}";
... | static int function(String ipAddress) { Pattern VALID_IPV4_PATTERN = null; Pattern VALID_IPV6_PATTERN = null; String ipv4Pattern = STR; final String ipv6Pattern = STR; final String IPV6_HEX4DECCOMPRESSED_REGEX = STR; final String IPV6_6HEX4DEC_REGEX = STR; final String IPV6_HEXCOMPRESSED_REGEX = STR; final String IPV6_... | /**
* Check the IP version of the address
*
* @param ipAddress
* @return IP version of the address
*/ | Check the IP version of the address | isIpAddress | {
"repo_name": "dana-i2cat/opennaas-routing-nfv",
"path": "extensions/bundles/vrf.model/src/main/java/org/opennaas/extensions/vrf/utils/Utils.java",
"license": "lgpl-3.0",
"size": 19367
} | [
"java.util.regex.Matcher",
"java.util.regex.Pattern",
"java.util.regex.PatternSyntaxException"
] | import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.regex.PatternSyntaxException; | import java.util.regex.*; | [
"java.util"
] | java.util; | 1,184,441 |
void showInfoPage(@StringRes int url); | void showInfoPage(@StringRes int url); | /**
* Show an informational web page. The page doesn't show navigation control.
* @param url Resource id for the URL of the web page.
*/ | Show an informational web page. The page doesn't show navigation control | showInfoPage | {
"repo_name": "chromium/chromium",
"path": "chrome/browser/ui/android/signin/java/src/org/chromium/chrome/browser/ui/signin/fre/SigninFirstRunCoordinator.java",
"license": "bsd-3-clause",
"size": 3654
} | [
"androidx.annotation.StringRes"
] | import androidx.annotation.StringRes; | import androidx.annotation.*; | [
"androidx.annotation"
] | androidx.annotation; | 2,792,295 |
public int getNoticeId() throws SQLException, IOException, MarshalException, ValidationException {
return getNxtId(m_configManager.getNextNotifIdSql());
} | int function() throws SQLException, IOException, MarshalException, ValidationException { return getNxtId(m_configManager.getNextNotifIdSql()); } | /**
* This method wraps the call to the database to get a sequence notice ID
* from the database.
*
* @return int, the sequence id from the database, 0 by default if there is
* database trouble
* @throws java.sql.SQLException if any.
* @throws java.io.IOException if any.
... | This method wraps the call to the database to get a sequence notice ID from the database | getNoticeId | {
"repo_name": "vishwaAbhinav/OpenNMS",
"path": "opennms-services/src/main/java/org/opennms/netmgt/config/NotificationManager.java",
"license": "gpl-2.0",
"size": 49385
} | [
"java.io.IOException",
"java.sql.SQLException",
"org.exolab.castor.xml.MarshalException",
"org.exolab.castor.xml.ValidationException"
] | import java.io.IOException; import java.sql.SQLException; import org.exolab.castor.xml.MarshalException; import org.exolab.castor.xml.ValidationException; | import java.io.*; import java.sql.*; import org.exolab.castor.xml.*; | [
"java.io",
"java.sql",
"org.exolab.castor"
] | java.io; java.sql; org.exolab.castor; | 582,876 |
if (!handle.exists() || handle.length() == 0)
return null;
RandomAccessFile dir = null;
FileLock lock = null;
ObjectInputStream input = null;
boolean delete = false;
try {
dir = new RandomAccessFile(handle, "rw");
lock = dir.getChannel().lock(... | if (!handle.exists() handle.length() == 0) return null; RandomAccessFile dir = null; FileLock lock = null; ObjectInputStream input = null; boolean delete = false; try { dir = new RandomAccessFile(handle, "rw"); lock = dir.getChannel().lock(); input = new ObjectInputStream(new GZIPInputStream( new FileInputStream(dir.ge... | /**
* Read request data
*
* @return read data
*/ | Read request data | read | {
"repo_name": "DeLaSalleUniversity-Manila/forkhub-JeraldLimqueco",
"path": "app/src/main/java/com/github/mobile/RequestReader.java",
"license": "apache-2.0",
"size": 3244
} | [
"android.util.Log",
"java.io.FileInputStream",
"java.io.IOException",
"java.io.ObjectInputStream",
"java.io.RandomAccessFile",
"java.nio.channels.FileLock",
"java.util.zip.GZIPInputStream"
] | import android.util.Log; import java.io.FileInputStream; import java.io.IOException; import java.io.ObjectInputStream; import java.io.RandomAccessFile; import java.nio.channels.FileLock; import java.util.zip.GZIPInputStream; | import android.util.*; import java.io.*; import java.nio.channels.*; import java.util.zip.*; | [
"android.util",
"java.io",
"java.nio",
"java.util"
] | android.util; java.io; java.nio; java.util; | 2,561,152 |
public String getNamespacePrefix(SessionInfo sessionInfo, String uri)
throws NamespaceException, RepositoryException; | String function(SessionInfo sessionInfo, String uri) throws NamespaceException, RepositoryException; | /**
* Returns the namespace prefix for the given namespace <code>uri</code>.
*
* @param sessionInfo the session info.
* @param uri the namespace URI.
* @return the namespace prefix.
* @throws NamespaceException if the URI unknown.
* @throws RepositoryException if another error occurs.... | Returns the namespace prefix for the given namespace <code>uri</code> | getNamespacePrefix | {
"repo_name": "apache/jackrabbit",
"path": "jackrabbit-spi/src/main/java/org/apache/jackrabbit/spi/RepositoryService.java",
"license": "apache-2.0",
"size": 65221
} | [
"javax.jcr.NamespaceException",
"javax.jcr.RepositoryException"
] | import javax.jcr.NamespaceException; import javax.jcr.RepositoryException; | import javax.jcr.*; | [
"javax.jcr"
] | javax.jcr; | 1,428,743 |
public void setDomainZeroBaselineStroke(Stroke stroke) {
ParamChecks.nullNotPermitted(stroke, "stroke");
this.domainZeroBaselineStroke = stroke;
fireChangeEvent();
} | void function(Stroke stroke) { ParamChecks.nullNotPermitted(stroke, STR); this.domainZeroBaselineStroke = stroke; fireChangeEvent(); } | /**
* Sets the stroke for the zero baseline for the domain axis,
* and sends a {@link PlotChangeEvent} to all registered listeners.
*
* @param stroke the stroke ({@code null} not permitted).
*
* @since 1.0.5
*
* @see #getRangeZeroBaselineStroke()
*/ | Sets the stroke for the zero baseline for the domain axis, and sends a <code>PlotChangeEvent</code> to all registered listeners | setDomainZeroBaselineStroke | {
"repo_name": "GitoMat/jfreechart",
"path": "src/main/java/org/jfree/chart/plot/XYPlot.java",
"license": "lgpl-2.1",
"size": 197216
} | [
"java.awt.Stroke",
"org.jfree.chart.util.ParamChecks"
] | import java.awt.Stroke; import org.jfree.chart.util.ParamChecks; | import java.awt.*; import org.jfree.chart.util.*; | [
"java.awt",
"org.jfree.chart"
] | java.awt; org.jfree.chart; | 1,415,390 |
public Settings settings() {
return this.settings;
} | Settings function() { return this.settings; } | /**
* Returns repository settings
*
* @return repository settings
*/ | Returns repository settings | settings | {
"repo_name": "GlenRSmith/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/action/admin/cluster/repositories/put/PutRepositoryRequest.java",
"license": "apache-2.0",
"size": 6665
} | [
"org.elasticsearch.common.settings.Settings"
] | import org.elasticsearch.common.settings.Settings; | import org.elasticsearch.common.settings.*; | [
"org.elasticsearch.common"
] | org.elasticsearch.common; | 2,436,345 |
@Test
public void testFileAccessOutsideStoreRoot()
{
String url = FileContentStore.STORE_PROTOCOL + ContentStore.PROTOCOL_DELIMITER + "../somefile.bin";
try
{
store.getReader(url);
fail("Access to content outside of content store root should n... | void function() { String url = FileContentStore.STORE_PROTOCOL + ContentStore.PROTOCOL_DELIMITER + STR; try { store.getReader(url); fail(STR); } catch (ContentIOException e) { } try { store.exists(url); fail(STR); } catch (ContentIOException e) { } try { store.delete(url); fail(STR); } catch (ContentIOException e) { } ... | /**
* Test for MNT-12301 case.
*/ | Test for MNT-12301 case | testFileAccessOutsideStoreRoot | {
"repo_name": "Alfresco/alfresco-repository",
"path": "src/test/java/org/alfresco/repo/content/filestore/FileContentStoreTest.java",
"license": "lgpl-3.0",
"size": 12132
} | [
"org.alfresco.repo.content.ContentStore",
"org.alfresco.service.cmr.repository.ContentIOException",
"org.junit.Assert"
] | import org.alfresco.repo.content.ContentStore; import org.alfresco.service.cmr.repository.ContentIOException; import org.junit.Assert; | import org.alfresco.repo.content.*; import org.alfresco.service.cmr.repository.*; import org.junit.*; | [
"org.alfresco.repo",
"org.alfresco.service",
"org.junit"
] | org.alfresco.repo; org.alfresco.service; org.junit; | 1,129,097 |
public void removeAll(IProgressMonitor monitor);
/**
* Remove the given descriptor and its corresponding content in this repository.
* @param descriptor the descriptor to remove.
* @deprecated See {@link #removeDescriptor(IArtifactDescriptor, IProgressMonitor)} | void function(IProgressMonitor monitor); /** * Remove the given descriptor and its corresponding content in this repository. * @param descriptor the descriptor to remove. * @deprecated See {@link #removeDescriptor(IArtifactDescriptor, IProgressMonitor)} | /**
* Remove the all keys, descriptors, and contents from this repository.
* @param monitor A progress monitor use to track progress and cancel the operation. This may
* be a long running operation if another process holds the lock on this location
* @since 2.1
*/ | Remove the all keys, descriptors, and contents from this repository | removeAll | {
"repo_name": "digimead/sbt-osgi-manager",
"path": "src/main/java/org/eclipse/equinox/p2/repository/artifact/IArtifactRepository.java",
"license": "apache-2.0",
"size": 11564
} | [
"org.eclipse.core.runtime.IProgressMonitor"
] | import org.eclipse.core.runtime.IProgressMonitor; | import org.eclipse.core.runtime.*; | [
"org.eclipse.core"
] | org.eclipse.core; | 1,177,115 |
private CurvesTemporalMesh applyBevelAndTaper(CurvesTemporalMesh curve, CurvesTemporalMesh bevelObject, CurvesTemporalMesh taperObject, BlenderContext blenderContext) throws BlenderFileException {
List<BezierLine> bevelBezierLines = bevelObject.getScaledBeziers();
List<BezierLine> curveLines = cur... | CurvesTemporalMesh function(CurvesTemporalMesh curve, CurvesTemporalMesh bevelObject, CurvesTemporalMesh taperObject, BlenderContext blenderContext) throws BlenderFileException { List<BezierLine> bevelBezierLines = bevelObject.getScaledBeziers(); List<BezierLine> curveLines = curve.beziers; if (bevelBezierLines.size() ... | /**
* This method applies bevel and taper objects to the curve.
* @param curve
* the curve we apply the objects to
* @param bevelObject
* the bevel object
* @param taperObject
* the taper object
* @param blenderContext
* t... | This method applies bevel and taper objects to the curve | applyBevelAndTaper | {
"repo_name": "GreenCubes/jmonkeyengine",
"path": "jme3-blender/src/main/java/com/jme3/scene/plugins/blender/curves/CurvesTemporalMesh.java",
"license": "bsd-3-clause",
"size": 45739
} | [
"com.jme3.math.Vector3f",
"com.jme3.scene.plugins.blender.BlenderContext",
"com.jme3.scene.plugins.blender.file.BlenderFileException",
"com.jme3.scene.plugins.blender.meshes.Edge",
"com.jme3.scene.plugins.blender.meshes.Face",
"java.util.ArrayList",
"java.util.Collections",
"java.util.List"
] | import com.jme3.math.Vector3f; import com.jme3.scene.plugins.blender.BlenderContext; import com.jme3.scene.plugins.blender.file.BlenderFileException; import com.jme3.scene.plugins.blender.meshes.Edge; import com.jme3.scene.plugins.blender.meshes.Face; import java.util.ArrayList; import java.util.Collections; import jav... | import com.jme3.math.*; import com.jme3.scene.plugins.blender.*; import com.jme3.scene.plugins.blender.file.*; import com.jme3.scene.plugins.blender.meshes.*; import java.util.*; | [
"com.jme3.math",
"com.jme3.scene",
"java.util"
] | com.jme3.math; com.jme3.scene; java.util; | 1,060,150 |
public final void testECFieldF2mint() {
for(int i=0; i<intCtorTestParameters.length; i++) {
ECFieldF2mDomainParams tp = intCtorTestParameters[i];
try {
// perform test
new ECFieldF2m(tp.m);
if (tp.x != null) {
... | final void function() { for(int i=0; i<intCtorTestParameters.length; i++) { ECFieldF2mDomainParams tp = intCtorTestParameters[i]; try { new ECFieldF2m(tp.m); if (tp.x != null) { fail(getName() + STR + i + STR); } } catch (Exception e){ if (tp.x == null !e.getClass().isInstance(tp.x)) { fail(getName() + STR + i + STR + ... | /**
* Tests for constructor <code>ECFieldF2m(int)</code><br>
*
* Assertion: constructs new <code>ECFieldF2m</code> object
* using valid parameter m.
*
* Assertion: IllegalArgumentException if m is not positive.
*/ | Tests for constructor <code>ECFieldF2m(int)</code> Assertion: constructs new <code>ECFieldF2m</code> object using valid parameter m. Assertion: IllegalArgumentException if m is not positive | testECFieldF2mint | {
"repo_name": "freeVM/freeVM",
"path": "enhanced/archive/classlib/java6/modules/security/src/test/api/java/org/apache/harmony/security/tests/java/security/spec/ECFieldF2mTest.java",
"license": "apache-2.0",
"size": 18672
} | [
"java.security.spec.ECFieldF2m"
] | import java.security.spec.ECFieldF2m; | import java.security.spec.*; | [
"java.security"
] | java.security; | 1,665,965 |
public Map<Action, Integer> getActionOffset() {
return actionOffset;
} | Map<Action, Integer> function() { return actionOffset; } | /**
* Returns the {@link java.util.Map} of feature index offsets into the full feature vector for each action
* @return the {@link java.util.Map} of feature index offsets into the full feature vector for each action
*/ | Returns the <code>java.util.Map</code> of feature index offsets into the full feature vector for each action | getActionOffset | {
"repo_name": "jmacglashan/burlap",
"path": "src/main/java/burlap/behavior/functionapproximation/dense/DenseLinearVFA.java",
"license": "apache-2.0",
"size": 10730
} | [
"burlap.mdp.core.action.Action",
"java.util.Map"
] | import burlap.mdp.core.action.Action; import java.util.Map; | import burlap.mdp.core.action.*; import java.util.*; | [
"burlap.mdp.core",
"java.util"
] | burlap.mdp.core; java.util; | 2,640,969 |
public boolean createLink(EntityMinecart cart1, EntityMinecart cart2); | boolean function(EntityMinecart cart1, EntityMinecart cart2); | /**
* Creates a link between two carts,
* but only if there is nothing preventing such a link.
*
* @param cart1
* @param cart2
* @return True if the link succeeded.
*/ | Creates a link between two carts, but only if there is nothing preventing such a link | createLink | {
"repo_name": "Vexatos/PeripheralsPlusPlus",
"path": "src/api/resources/reference/mods/railcraft/api/carts/ILinkageManager.java",
"license": "gpl-2.0",
"size": 2685
} | [
"net.minecraft.entity.item.EntityMinecart"
] | import net.minecraft.entity.item.EntityMinecart; | import net.minecraft.entity.item.*; | [
"net.minecraft.entity"
] | net.minecraft.entity; | 2,877,943 |
public byte[] toByteArray() throws CommandException
{
if (commandBytes == null)
{
createCommand();
}
return commandBytes;
} | byte[] function() throws CommandException { if (commandBytes == null) { createCommand(); } return commandBytes; } | /**
* Converts the command in the byte array.
*
* @return byte[]
*/ | Converts the command in the byte array | toByteArray | {
"repo_name": "joseananio/TayzGrid",
"path": "src/tgclient/src/com/alachisoft/tayzgrid/command/Command.java",
"license": "apache-2.0",
"size": 13742
} | [
"com.alachisoft.tayzgrid.runtime.exceptions.CommandException"
] | import com.alachisoft.tayzgrid.runtime.exceptions.CommandException; | import com.alachisoft.tayzgrid.runtime.exceptions.*; | [
"com.alachisoft.tayzgrid"
] | com.alachisoft.tayzgrid; | 841,846 |
initMocks(this);
locator = new ServerFactoryLocator(logger, Thread.currentThread().getContextClassLoader());
} | initMocks(this); locator = new ServerFactoryLocator(logger, Thread.currentThread().getContextClassLoader()); } | /**
* Prepare for test case execution by creating the test fixtures and mock objects.
*/ | Prepare for test case execution by creating the test fixtures and mock objects | setUp | {
"repo_name": "bmatthews68/ldap-maven-plugin",
"path": "ldap-maven-plugin/src/test/java/com/btmatthews/maven/plugins/ldap/mojo/TestServerLocator.java",
"license": "apache-2.0",
"size": 3192
} | [
"com.btmatthews.utils.monitor.ServerFactoryLocator"
] | import com.btmatthews.utils.monitor.ServerFactoryLocator; | import com.btmatthews.utils.monitor.*; | [
"com.btmatthews.utils"
] | com.btmatthews.utils; | 505,114 |
boolean startObjectEntry(String key) throws ParseException, IOException;
| boolean startObjectEntry(String key) throws ParseException, IOException; | /**
* Receive notification of the beginning of a JSON object entry.
*
* @param key - Key of a JSON object entry.
*
* @return false if the handler wants to stop parsing after return.
* @throws ParseException
*
* @see #endObjectEntry
*/ | Receive notification of the beginning of a JSON object entry | startObjectEntry | {
"repo_name": "Superchicken1/SambaFlow",
"path": "flink/flink-python-job/src/main/java/org/lmu/JSON/parser/ContentHandler.java",
"license": "apache-2.0",
"size": 3216
} | [
"java.io.IOException",
"org.lmu.JSON"
] | import java.io.IOException; import org.lmu.JSON; | import java.io.*; import org.lmu.*; | [
"java.io",
"org.lmu"
] | java.io; org.lmu; | 1,883,346 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.