method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
public static boolean pdf_begin_font(Env env, @NotNull PDF pdf, String fileName, double a, double b, double c, ...
static boolean function(Env env, @NotNull PDF pdf, String fileName, double a, double b, double c, double d, double e, double f, @Optional String optList) { env.stub(STR); return false; }
/** * Starts a font definition */
Starts a font definition
pdf_begin_font
{ "repo_name": "headius/quercus", "path": "src/main/java/com/caucho/quercus/lib/pdf/PDFModule.java", "license": "gpl-2.0", "size": 48781 }
[ "com.caucho.quercus.annotation.NotNull", "com.caucho.quercus.annotation.Optional", "com.caucho.quercus.env.Env" ]
import com.caucho.quercus.annotation.NotNull; import com.caucho.quercus.annotation.Optional; import com.caucho.quercus.env.Env;
import com.caucho.quercus.annotation.*; import com.caucho.quercus.env.*;
[ "com.caucho.quercus" ]
com.caucho.quercus;
1,396,717
@SideOnly(Side.CLIENT) public int getRenderColor(int p_149741_1_) { return ColorizerFoliage.getFoliageColorBasic(); }
@SideOnly(Side.CLIENT) int function(int p_149741_1_) { return ColorizerFoliage.getFoliageColorBasic(); }
/** * Returns the color this block should be rendered. Used by leaves. */
Returns the color this block should be rendered. Used by leaves
getRenderColor
{ "repo_name": "djLead/modelead", "path": "src/java/com/djlead/leadmod/blocks/LeavesBT.java", "license": "gpl-2.0", "size": 14331 }
[ "net.minecraft.world.ColorizerFoliage" ]
import net.minecraft.world.ColorizerFoliage;
import net.minecraft.world.*;
[ "net.minecraft.world" ]
net.minecraft.world;
1,677,252
// check if the permission mapping has already been applied String tagPrefix = PermissionMapping.getTagPrefix(sdkVersion); if(!CommonQueries.nodesStartingWith(tagPrefix).eval().nodes().isEmpty()){ return true; // permission mapping has already been applied } // need to apply permission mapping HashMap<Pe...
String tagPrefix = PermissionMapping.getTagPrefix(sdkVersion); if(!CommonQueries.nodesStartingWith(tagPrefix).eval().nodes().isEmpty()){ return true; } HashMap<Permission, AtlasHashSet<GraphElement>> permissionMapping = PermissionMapping.applyTags(sdkVersion); boolean success = false; for(Entry<Permission, AtlasHashSet...
/** * This method applies the nearest permission mapping (rounding up if need be) to the requested SDK version. * Note: If the permission mapping is unsuccessful, Atlas Jar indexing may be disable. Enabling Jar indexing is required. * @param projectName An Eclipse project name of an Android application in the wo...
This method applies the nearest permission mapping (rounding up if need be) to the requested SDK version. Note: If the permission mapping is unsuccessful, Atlas Jar indexing may be disable. Enabling Jar indexing is required
applySDKPermissionMapping
{ "repo_name": "MaTriXy/android-essentials-toolbox", "path": "example.analysis/src/toolbox/analysis/Example0.java", "license": "mit", "size": 2391 }
[ "com.ensoftcorp.atlas.core.db.graph.GraphElement", "com.ensoftcorp.atlas.core.db.set.AtlasHashSet", "com.ensoftcorp.atlas.core.script.CommonQueries", "com.ensoftcorp.open.android.essentials.permissions.Permission", "com.ensoftcorp.open.android.essentials.permissions.mappings.PermissionMapping", "java.util...
import com.ensoftcorp.atlas.core.db.graph.GraphElement; import com.ensoftcorp.atlas.core.db.set.AtlasHashSet; import com.ensoftcorp.atlas.core.script.CommonQueries; import com.ensoftcorp.open.android.essentials.permissions.Permission; import com.ensoftcorp.open.android.essentials.permissions.mappings.PermissionMapping;...
import com.ensoftcorp.atlas.core.db.graph.*; import com.ensoftcorp.atlas.core.db.set.*; import com.ensoftcorp.atlas.core.script.*; import com.ensoftcorp.open.android.essentials.permissions.*; import com.ensoftcorp.open.android.essentials.permissions.mappings.*; import java.util.*;
[ "com.ensoftcorp.atlas", "com.ensoftcorp.open", "java.util" ]
com.ensoftcorp.atlas; com.ensoftcorp.open; java.util;
804,365
public Structure getStructure( ) { return (Structure) resolved; }
Structure function( ) { return (Structure) resolved; }
/** * Returns the referenced structure, if the structure is resolved. * * @return the referenced structure, or null if this reference is not set, * or is unresolved */
Returns the referenced structure, if the structure is resolved
getStructure
{ "repo_name": "sguan-actuate/birt", "path": "model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/metadata/StructRefValue.java", "license": "epl-1.0", "size": 3828 }
[ "org.eclipse.birt.report.model.core.Structure" ]
import org.eclipse.birt.report.model.core.Structure;
import org.eclipse.birt.report.model.core.*;
[ "org.eclipse.birt" ]
org.eclipse.birt;
1,786,633
public void setPicture(DataHandler picture) { this.picture = picture; }
void function(DataHandler picture) { this.picture = picture; }
/** * A picture of a person. * * @param picture A picture of a person. */
A picture of a person
setPicture
{ "repo_name": "garyhodgson/enunciate", "path": "integration-tests/jaxws-ri-rest-spring/src/main/samples/full/org/codehaus/enunciate/samples/genealogy/data/Person.java", "license": "apache-2.0", "size": 3512 }
[ "javax.activation.DataHandler" ]
import javax.activation.DataHandler;
import javax.activation.*;
[ "javax.activation" ]
javax.activation;
2,091,167
private void cpError(int cp, int reqCP) throws IOException { String cpName = codePointNameTable.lookup(cp); String reqCPName = codePointNameTable.lookup(reqCP); fail("wrong codepoint val = " + Integer.toHexString(cp) + "("+cpName+")" + ", required codepoint = "...
void function(int cp, int reqCP) throws IOException { String cpName = codePointNameTable.lookup(cp); String reqCPName = codePointNameTable.lookup(reqCP); fail(STR + Integer.toHexString(cp) + "("+cpName+")" + STR + Integer.toHexString(reqCP) + "("+reqCPName+")"); }
/** * Codepoint error * * @exception IOException error reading command file */
Codepoint error
cpError
{ "repo_name": "papicella/snappy-store", "path": "gemfirexd/tools/src/testing/java/com/pivotal/gemfirexd/internal/impl/drda/TestProto.java", "license": "apache-2.0", "size": 37042 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
294,316
List readProjectsForGroup(CmsDbContext dbc, CmsGroup group) throws CmsDataAccessException;
List readProjectsForGroup(CmsDbContext dbc, CmsGroup group) throws CmsDataAccessException;
/** * Returns all projects, which are accessible by a group.<p> * * @param dbc the current database context * @param group the requesting group * * @return a Vector of projects * @throws CmsDataAccessException if something goes wrong */
Returns all projects, which are accessible by a group
readProjectsForGroup
{ "repo_name": "comundus/opencms-comundus", "path": "src/main/java/org/opencms/db/I_CmsProjectDriver.java", "license": "lgpl-2.1", "size": 25498 }
[ "java.util.List", "org.opencms.file.CmsDataAccessException", "org.opencms.file.CmsGroup" ]
import java.util.List; import org.opencms.file.CmsDataAccessException; import org.opencms.file.CmsGroup;
import java.util.*; import org.opencms.file.*;
[ "java.util", "org.opencms.file" ]
java.util; org.opencms.file;
1,908,415
protected void fireEvent( ActionEvent e ) { ActionListener[] actionListeners = listeners.getListeners(ActionListener.class); for( int i = actionListeners.length-1; i >= 0; i-- ) { actionListeners[i].actionPerformed(e); } }
void function( ActionEvent e ) { ActionListener[] actionListeners = listeners.getListeners(ActionListener.class); for( int i = actionListeners.length-1; i >= 0; i-- ) { actionListeners[i].actionPerformed(e); } }
/** * This method fires an action event. * @param e Represents the action that was performed. */
This method fires an action event
fireEvent
{ "repo_name": "Stanwar/agreementmaker", "path": "AgreementMaker-OSGi/AgreementMaker-UserFeedback/src/main/java/am/extension/userfeedback/ui/UFLControlGUI_InitialSettingsPanel.java", "license": "agpl-3.0", "size": 10548 }
[ "java.awt.event.ActionEvent", "java.awt.event.ActionListener" ]
import java.awt.event.ActionEvent; import java.awt.event.ActionListener;
import java.awt.event.*;
[ "java.awt" ]
java.awt;
38,928
protected void save(Map data) { if (value != null) data.put(tag, value); }
void function(Map data) { if (value != null) data.put(tag, value); }
/** * Save the value for this question in a dictionary, using * the tag as the key. * @param data The map in which to save the value for this question. */
Save the value for this question in a dictionary, using the tag as the key
save
{ "repo_name": "Distrotech/icedtea6-1.12", "path": "src/jtreg/com/sun/interview/StringQuestion.java", "license": "gpl-2.0", "size": 6162 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
58,486
private void generateFeatures() throws Exception { if (logger.isDebugEnabled()) logger.debug( "Parsing feature information from XML document for {} feature-entries.", this.features); Property[] propertyArray = this.xmlDoc.getDataset().getTableStructure() .getPropertyArray(); Entry[] entryArr...
void function() throws Exception { if (logger.isDebugEnabled()) logger.debug( STR, this.features); Property[] propertyArray = this.xmlDoc.getDataset().getTableStructure() .getPropertyArray(); Entry[] entryArray = this.xmlDoc.getDataset().getEntries() .getEntryArray(); for (Entry entry : entryArray) { VgAttrFeature newF...
/** * Parses the 'Properties' and 'Entries'-parts of the dataset. For each * entry one feature is created. The feature consists of a geometry and * attributes. Each property is interpreted as an attribute; except the * property that contains a 'GeoReference'-element which is used for the * geometry. * * ...
Parses the 'Properties' and 'Entries'-parts of the dataset. For each entry one feature is created. The feature consists of a geometry and attributes. Each property is interpreted as an attribute; except the property that contains a 'GeoReference'-element which is used for the geometry
generateFeatures
{ "repo_name": "52North/worldviz", "path": "src/main/java/org/n52/v3d/worldviz/dataaccess/load/dataset/AbstractXmlDataset.java", "license": "gpl-2.0", "size": 14308 }
[ "org.n52.v3d.triturus.gisimplm.GmAttrFeature", "org.n52.v3d.triturus.vgis.VgAttrFeature" ]
import org.n52.v3d.triturus.gisimplm.GmAttrFeature; import org.n52.v3d.triturus.vgis.VgAttrFeature;
import org.n52.v3d.triturus.gisimplm.*; import org.n52.v3d.triturus.vgis.*;
[ "org.n52.v3d" ]
org.n52.v3d;
40,542
@JSONMethod({ "tag" }) public void ping(BasicProtocolActor from, OptString tag) { from.send(msgPong(this, tag.value(null))); }
@JSONMethod({ "tag" }) void function(BasicProtocolActor from, OptString tag) { from.send(msgPong(this, tag.value(null))); }
/** * JSON method for the 'ping' message. * * This message is a simple connectivity test. Responds by sending a * 'pong' message back to the sender.<p> * * <u>recv</u>: <tt> { to:<i>REF</i>, op:"ping", * tag:<i>optSTR</i> } </tt><br> * * <u>send</u>: <tt...
JSON method for the 'ping' message. This message is a simple connectivity test. Responds by sending a 'pong' message back to the sender. recv: { to:REF, op:"ping", tag:optSTR } send: { to:asReceived, op:"pong", tag:asReceived }
ping
{ "repo_name": "frandallfarmer/Elko", "path": "ServerCore/java/org/elkoserver/foundation/actor/BasicProtocolHandler.java", "license": "mit", "size": 4900 }
[ "org.elkoserver.foundation.json.JSONMethod", "org.elkoserver.foundation.json.OptString" ]
import org.elkoserver.foundation.json.JSONMethod; import org.elkoserver.foundation.json.OptString;
import org.elkoserver.foundation.json.*;
[ "org.elkoserver.foundation" ]
org.elkoserver.foundation;
2,181,355
public static UnsignedLong valueOf(long value) { checkArgument(value >= 0, "value (%s) is outside the range for an unsigned long value", value); return fromLongBits(value); } /** * Returns a {@code UnsignedLong} representing the same value as the specified * {@code BigInteger}. This is the ...
static UnsignedLong function(long value) { checkArgument(value >= 0, STR, value); return fromLongBits(value); } /** * Returns a {@code UnsignedLong} representing the same value as the specified * {@code BigInteger}. This is the inverse operation of {@link #bigIntegerValue()}. * * @throws IllegalArgumentException if {@c...
/** * Returns an {@code UnsignedLong} representing the same value as the specified {@code long}. * * @throws IllegalArgumentException if {@code value} is negative * @since 14.0 */
Returns an UnsignedLong representing the same value as the specified long
valueOf
{ "repo_name": "hambroperks/j2objc", "path": "guava/sources/com/google/common/primitives/UnsignedLong.java", "license": "apache-2.0", "size": 11038 }
[ "com.google.common.base.Preconditions", "java.math.BigInteger" ]
import com.google.common.base.Preconditions; import java.math.BigInteger;
import com.google.common.base.*; import java.math.*;
[ "com.google.common", "java.math" ]
com.google.common; java.math;
1,442,143
public ARXResult getResult() { return result; }
ARXResult function() { return result; }
/** * Returns the current result. * * @return the result */
Returns the current result
getResult
{ "repo_name": "arx-deidentifier/arx", "path": "src/gui/org/deidentifier/arx/gui/model/Model.java", "license": "apache-2.0", "size": 57645 }
[ "org.deidentifier.arx.ARXResult" ]
import org.deidentifier.arx.ARXResult;
import org.deidentifier.arx.*;
[ "org.deidentifier.arx" ]
org.deidentifier.arx;
866,921
@Test public void testTotalNegationEmitsWarning() throws Exception { AnalysisMock.get().ccSupport().setup(tester.mockToolsConfig); tester.addFile("cc/BUILD", "cc_test(name = 'my_test', srcs = ['test.cc'])", "test_suite(name = 'tests', tests = [':my_test'])"); LoadingResult loadingResult ...
void function() throws Exception { AnalysisMock.get().ccSupport().setup(tester.mockToolsConfig); tester.addFile(STR, STR, STR); LoadingResult loadingResult = tester.loadTests(STRAll specified test targets were excluded by filtersSTR } assertThat(loadingResult.getTestsToRun()).containsExactlyElementsIn(getTargets()); }
/** * Regression test for bug: "blaze is lying to me about what tests exist (have been specified)" */
Regression test for bug: "blaze is lying to me about what tests exist (have been specified)"
testTotalNegationEmitsWarning
{ "repo_name": "abergmeier-dsfishlabs/bazel", "path": "src/test/java/com/google/devtools/build/lib/pkgcache/LoadingPhaseRunnerTest.java", "license": "apache-2.0", "size": 35903 }
[ "com.google.common.truth.Truth", "com.google.devtools.build.lib.analysis.util.AnalysisMock" ]
import com.google.common.truth.Truth; import com.google.devtools.build.lib.analysis.util.AnalysisMock;
import com.google.common.truth.*; import com.google.devtools.build.lib.analysis.util.*;
[ "com.google.common", "com.google.devtools" ]
com.google.common; com.google.devtools;
1,768,430
private void nextNonSpace() throws IOException { next(); skipSpace(); }
void function() throws IOException { next(); skipSpace(); }
/** * Gets the next character from the reader, and if it is a space character, keeps reading until * a non-space character is found. */
Gets the next character from the reader, and if it is a space character, keeps reading until a non-space character is found
nextNonSpace
{ "repo_name": "rharter/auto", "path": "value/src/main/java/com/google/auto/value/processor/escapevelocity/Parser.java", "license": "apache-2.0", "size": 30229 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
214
static void saveToFile(final File f, final Stack<LatLng> trace) throws IOException { if (!f.exists()) f.createNewFile(); BufferedWriter out = new BufferedWriter(new FileWriter(f)); LatLng current; for (int i = 0; i < trace.size(); i++) { current = trace.get(i); ...
static void saveToFile(final File f, final Stack<LatLng> trace) throws IOException { if (!f.exists()) f.createNewFile(); BufferedWriter out = new BufferedWriter(new FileWriter(f)); LatLng current; for (int i = 0; i < trace.size(); i++) { current = trace.get(i); out.append(String.valueOf(current.latitude)).append(";") ....
/** * Writes the given trace of points to the given file in CSV format, * separated by ";" * * @param f the file to write to * @param trace the trace to write * @throws IOException */
Writes the given trace of points to the given file in CSV format, separated by ";"
saveToFile
{ "repo_name": "dhootha/MapsMeasure", "path": "src/main/java/de/j4velin/mapsmeasure/Util.java", "license": "apache-2.0", "size": 8147 }
[ "com.google.android.gms.maps.model.LatLng", "java.io.BufferedWriter", "java.io.File", "java.io.FileWriter", "java.io.IOException", "java.util.Stack" ]
import com.google.android.gms.maps.model.LatLng; import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.util.Stack;
import com.google.android.gms.maps.model.*; import java.io.*; import java.util.*;
[ "com.google.android", "java.io", "java.util" ]
com.google.android; java.io; java.util;
1,457,232
public static List<NabuccoPropertyDescriptor> getPropertyDescriptorList() { return PropertyCache.getInstance().retrieve(GraphDashboardWidgetExtension.class).getAllProperties(); }
static List<NabuccoPropertyDescriptor> function() { return PropertyCache.getInstance().retrieve(GraphDashboardWidgetExtension.class).getAllProperties(); }
/** * Getter for the PropertyDescriptorList. * * @return the List<NabuccoPropertyDescriptor>. */
Getter for the PropertyDescriptorList
getPropertyDescriptorList
{ "repo_name": "NABUCCO/org.nabucco.framework.base", "path": "org.nabucco.framework.base.facade.datatype/src/main/gen/org/nabucco/framework/base/facade/datatype/extension/schema/ui/work/dashboard/widget/GraphDashboardWidgetExtension.java", "license": "epl-1.0", "size": 12686 }
[ "java.util.List", "org.nabucco.framework.base.facade.datatype.property.NabuccoPropertyDescriptor", "org.nabucco.framework.base.facade.datatype.property.PropertyCache" ]
import java.util.List; import org.nabucco.framework.base.facade.datatype.property.NabuccoPropertyDescriptor; import org.nabucco.framework.base.facade.datatype.property.PropertyCache;
import java.util.*; import org.nabucco.framework.base.facade.datatype.property.*;
[ "java.util", "org.nabucco.framework" ]
java.util; org.nabucco.framework;
2,009,699
public void setNamespace(String prefix, String uri, String elementName) { if (StringUtils.isBlank(uri)) { return; } if (StringUtils.isBlank(prefix)) { prefix = ""; } if (StringUtils.isBlank(elementName)) { rootNamespace.clear(); ...
void function(String prefix, String uri, String elementName) { if (StringUtils.isBlank(uri)) { return; } if (StringUtils.isBlank(prefix)) { prefix = ""; } if (StringUtils.isBlank(elementName)) { rootNamespace.clear(); rootNamespace.put(prefix.trim(), uri.trim()); } else { Map nameSpaces = (Map) namespacesPerElement.get...
/** * Adds a namespace declaration to an element.<br> * Any previous values are discarded. If the elementName param is null or * blank, the namespace declaration will be added to the root element. * * @param prefix namespace prefix * @param uri namespace uri * @param elem...
Adds a namespace declaration to an element. Any previous values are discarded. If the elementName param is null or blank, the namespace declaration will be added to the root element
setNamespace
{ "repo_name": "aalmiray/Json-lib", "path": "subprojects/json-lib-core/src/main/java/org/kordamp/json/xml/XMLSerializer.java", "license": "apache-2.0", "size": 63880 }
[ "java.util.Map", "java.util.TreeMap", "org.apache.commons.lang3.StringUtils" ]
import java.util.Map; import java.util.TreeMap; import org.apache.commons.lang3.StringUtils;
import java.util.*; import org.apache.commons.lang3.*;
[ "java.util", "org.apache.commons" ]
java.util; org.apache.commons;
2,715,675
public T pgp(String keyFileName, String keyUserid) { PGPDataFormat pgp = new PGPDataFormat(); pgp.setKeyFileName(keyFileName); pgp.setKeyUserid(keyUserid); return dataFormat(pgp); }
T function(String keyFileName, String keyUserid) { PGPDataFormat pgp = new PGPDataFormat(); pgp.setKeyFileName(keyFileName); pgp.setKeyUserid(keyUserid); return dataFormat(pgp); }
/** * Uses the PGP data format */
Uses the PGP data format
pgp
{ "repo_name": "YMartsynkevych/camel", "path": "camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java", "license": "apache-2.0", "size": 27884 }
[ "org.apache.camel.model.dataformat.PGPDataFormat" ]
import org.apache.camel.model.dataformat.PGPDataFormat;
import org.apache.camel.model.dataformat.*;
[ "org.apache.camel" ]
org.apache.camel;
1,435,834
ProcessingUnitInstanceMemberAliveIndicatorStatusChangedEventManager getProcessingUnitInstanceMemberAliveIndicatorStatusChanged();
ProcessingUnitInstanceMemberAliveIndicatorStatusChangedEventManager getProcessingUnitInstanceMemberAliveIndicatorStatusChanged();
/** * Returns an event manager allowing to register {@link ProcessingUnitInstanceMemberAliveIndicatorStatusChangedEventListener}s. * @since 8.0.6 */
Returns an event manager allowing to register <code>ProcessingUnitInstanceMemberAliveIndicatorStatusChangedEventListener</code>s
getProcessingUnitInstanceMemberAliveIndicatorStatusChanged
{ "repo_name": "Gigaspaces/xap-openspaces", "path": "src/main/java/org/openspaces/admin/pu/ProcessingUnits.java", "license": "apache-2.0", "size": 8482 }
[ "org.openspaces.admin.pu.events.ProcessingUnitInstanceMemberAliveIndicatorStatusChangedEventManager" ]
import org.openspaces.admin.pu.events.ProcessingUnitInstanceMemberAliveIndicatorStatusChangedEventManager;
import org.openspaces.admin.pu.events.*;
[ "org.openspaces.admin" ]
org.openspaces.admin;
1,682
public static void printSystemInfo() { Properties prop = System.getProperties(); System.out.println("H2 " + Constants.getFullVersion() + " @ " + new java.sql.Timestamp(System.currentTimeMillis()).toString()); System.out.println("Java " + prop.getProperty("java...
static void function() { Properties prop = System.getProperties(); System.out.println(STR + Constants.getFullVersion() + STR + new java.sql.Timestamp(System.currentTimeMillis()).toString()); System.out.println(STR + prop.getProperty(STR) + STR + prop.getProperty(STR)+STR + prop.getProperty(STR) + STR + prop.getProperty...
/** * Print system information. */
Print system information
printSystemInfo
{ "repo_name": "vdr007/ThriftyPaxos", "path": "src/applications/h2/src/test/org/h2/test/TestAll.java", "license": "apache-2.0", "size": 31482 }
[ "java.util.Properties", "org.h2.engine.Constants", "org.h2.util.StringUtils" ]
import java.util.Properties; import org.h2.engine.Constants; import org.h2.util.StringUtils;
import java.util.*; import org.h2.engine.*; import org.h2.util.*;
[ "java.util", "org.h2.engine", "org.h2.util" ]
java.util; org.h2.engine; org.h2.util;
963,330
@Generated @Selector("networkTransferMetrics") public native MXNetworkTransferMetric networkTransferMetrics();
@Selector(STR) native MXNetworkTransferMetric function();
/** * [@property] networkTransferMetrics * <p> * An object containing network transfer metrics for this application. */
[@property] networkTransferMetrics An object containing network transfer metrics for this application
networkTransferMetrics
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/metrickit/MXMetricPayload.java", "license": "apache-2.0", "size": 12404 }
[ "org.moe.natj.objc.ann.Selector" ]
import org.moe.natj.objc.ann.Selector;
import org.moe.natj.objc.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
2,811,579
public void register(Collection<ResourceID> currentlyRegisteredTaskManagers) { // register with JM expectMsgClass(RegisterResourceManager.class); resourceManager.tell( new RegisterResourceManagerSuccessful(jobManager.actor(), currentlyRegisteredTaskManagers), jobManager); }
void function(Collection<ResourceID> currentlyRegisteredTaskManagers) { expectMsgClass(RegisterResourceManager.class); resourceManager.tell( new RegisterResourceManagerSuccessful(jobManager.actor(), currentlyRegisteredTaskManagers), jobManager); }
/** * Send a RegisterResourceManagerSuccessful message to the RM. * @param currentlyRegisteredTaskManagers the already-registered workers. */
Send a RegisterResourceManagerSuccessful message to the RM
register
{ "repo_name": "mylog00/flink", "path": "flink-mesos/src/test/java/org/apache/flink/mesos/runtime/clusterframework/MesosFlinkResourceManagerTest.java", "license": "apache-2.0", "size": 29379 }
[ "java.util.Collection", "org.apache.flink.runtime.clusterframework.messages.RegisterResourceManager", "org.apache.flink.runtime.clusterframework.messages.RegisterResourceManagerSuccessful", "org.apache.flink.runtime.clusterframework.types.ResourceID" ]
import java.util.Collection; import org.apache.flink.runtime.clusterframework.messages.RegisterResourceManager; import org.apache.flink.runtime.clusterframework.messages.RegisterResourceManagerSuccessful; import org.apache.flink.runtime.clusterframework.types.ResourceID;
import java.util.*; import org.apache.flink.runtime.clusterframework.messages.*; import org.apache.flink.runtime.clusterframework.types.*;
[ "java.util", "org.apache.flink" ]
java.util; org.apache.flink;
664,982
protected void scheduleRunAsync(Runnable runnable, long delay, TimeUnit unit) { rpcServer.scheduleRunAsync(runnable, unit.toMillis(delay)); }
void function(Runnable runnable, long delay, TimeUnit unit) { rpcServer.scheduleRunAsync(runnable, unit.toMillis(delay)); }
/** * Execute the runnable in the main thread of the underlying RPC endpoint, with * a delay of the given number of milliseconds. * * @param runnable Runnable to be executed * @param delay The delay after which the runnable will be executed */
Execute the runnable in the main thread of the underlying RPC endpoint, with a delay of the given number of milliseconds
scheduleRunAsync
{ "repo_name": "yew1eb/flink", "path": "flink-runtime/src/main/java/org/apache/flink/runtime/rpc/RpcEndpoint.java", "license": "apache-2.0", "size": 11261 }
[ "java.util.concurrent.TimeUnit" ]
import java.util.concurrent.TimeUnit;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
2,046,976
protected boolean isUnlocked( ITransaction transaction, HttpServletRequest req, IResourceLocks resourceLocks, String path ) throws IOException, LockFailedException { LockedObject resourceLock = resourceLoc...
boolean function( ITransaction transaction, HttpServletRequest req, IResourceLocks resourceLocks, String path ) throws IOException, LockFailedException { LockedObject resourceLock = resourceLocks.getLockedObjectByPath(transaction, path); if (resourceLock == null resourceLock.isShared()) { return true; } String[] reques...
/** * Checks if locks on resources at the given path exists and if so checks the If-Header to make sure the If-Header corresponds * to the locked resource. Returning true if no lock exists or the If-Header is corresponding to the locked resource * * @param transaction * @param req Servlet requ...
Checks if locks on resources at the given path exists and if so checks the If-Header to make sure the If-Header corresponds to the locked resource. Returning true if no lock exists or the If-Header is corresponding to the locked resource
isUnlocked
{ "repo_name": "flownclouds/modeshape", "path": "web/modeshape-webdav/src/main/java/org/modeshape/webdav/methods/AbstractMethod.java", "license": "apache-2.0", "size": 14617 }
[ "java.io.IOException", "javax.servlet.http.HttpServletRequest", "org.modeshape.webdav.ITransaction", "org.modeshape.webdav.exceptions.LockFailedException", "org.modeshape.webdav.locking.IResourceLocks", "org.modeshape.webdav.locking.LockedObject" ]
import java.io.IOException; import javax.servlet.http.HttpServletRequest; import org.modeshape.webdav.ITransaction; import org.modeshape.webdav.exceptions.LockFailedException; import org.modeshape.webdav.locking.IResourceLocks; import org.modeshape.webdav.locking.LockedObject;
import java.io.*; import javax.servlet.http.*; import org.modeshape.webdav.*; import org.modeshape.webdav.exceptions.*; import org.modeshape.webdav.locking.*;
[ "java.io", "javax.servlet", "org.modeshape.webdav" ]
java.io; javax.servlet; org.modeshape.webdav;
2,787,122
@SuppressWarnings("unchecked") public Calendar[] retrieveUpdateDateRange() { String sql = "SELECT min(when_created), max(when_created) from datup.fdb_version"; jdbcTemplate.setMaxRows(1); List<Calendar[]> dates = jdbcTemplate.query(sql, new RowMapper() {
@SuppressWarnings(STR) Calendar[] function() { String sql = STR; jdbcTemplate.setMaxRows(1); List<Calendar[]> dates = jdbcTemplate.query(sql, new RowMapper() {
/** * Retrieve site update. * * @param siteId site ID * @param isCustom true if custom update * @return */
Retrieve site update
retrieveUpdateDateRange
{ "repo_name": "OSEHRA-Sandbox/MOCHA", "path": "src/gov/va/med/pharmacy/peps/updater/common/database/SiteUpdate.java", "license": "apache-2.0", "size": 16411 }
[ "java.util.Calendar", "java.util.List", "org.springframework.jdbc.core.RowMapper" ]
import java.util.Calendar; import java.util.List; import org.springframework.jdbc.core.RowMapper;
import java.util.*; import org.springframework.jdbc.core.*;
[ "java.util", "org.springframework.jdbc" ]
java.util; org.springframework.jdbc;
2,605,485
public static Action lookupByUserAndId(User user, Long id) { Map<String, Object> params = new HashMap<String, Object>(); params.put("aid", id); params.put("orgId", user.getOrg().getId()); return (Action)singleton.lookupObjectByNamedQuery( "Action.findByIdandOrgId", pa...
static Action function(User user, Long id) { Map<String, Object> params = new HashMap<String, Object>(); params.put("aid", id); params.put("orgId", user.getOrg().getId()); return (Action)singleton.lookupObjectByNamedQuery( STR, params); }
/** * Lookup an Action by the id, assuming that it is in the same Org as * the user doing the search. This method ensures security around the * Action. * @param user the user doing the search * @param id of the Action to search for * @return the Action found */
Lookup an Action by the id, assuming that it is in the same Org as the user doing the search. This method ensures security around the Action
lookupByUserAndId
{ "repo_name": "mcalmer/spacewalk", "path": "java/code/src/com/redhat/rhn/domain/action/ActionFactory.java", "license": "gpl-2.0", "size": 40280 }
[ "com.redhat.rhn.domain.user.User", "java.util.HashMap", "java.util.Map" ]
import com.redhat.rhn.domain.user.User; import java.util.HashMap; import java.util.Map;
import com.redhat.rhn.domain.user.*; import java.util.*;
[ "com.redhat.rhn", "java.util" ]
com.redhat.rhn; java.util;
2,469,911
public Iterator<Proposal> getProposalsFromTxnLog(long startZxid, long sizeLimit) { if (sizeLimit < 0) { LOG.debug("Negative size limit - retrieving proposal via txnlog is disabled"); return TxnLogProposalIterator.EMPTY_ITERATOR; ...
Iterator<Proposal> function(long startZxid, long sizeLimit) { if (sizeLimit < 0) { LOG.debug(STR); return TxnLogProposalIterator.EMPTY_ITERATOR; } TxnIterator itr = null; try { itr = snapLog.readTxnLog(startZxid, false); if ((itr.getHeader() != null) && (itr.getHeader().getZxid() > startZxid)) { LOG.warn(STR + startZxi...
/** * Get proposals from txnlog. Only packet part of proposal is populated. * * @param startZxid the starting zxid of the proposal * @param sizeLimit maximum on-disk size of txnlog to fetch * 0 is unlimited, negative value means disable. * @return list of proposal (request...
Get proposals from txnlog. Only packet part of proposal is populated
getProposalsFromTxnLog
{ "repo_name": "ehomeshasha/zookeeper", "path": "src/java/main/org/apache/zookeeper/server/ZKDatabase.java", "license": "apache-2.0", "size": 19948 }
[ "java.io.IOException", "java.util.Iterator", "org.apache.zookeeper.server.persistence.TxnLog", "org.apache.zookeeper.server.quorum.Leader" ]
import java.io.IOException; import java.util.Iterator; import org.apache.zookeeper.server.persistence.TxnLog; import org.apache.zookeeper.server.quorum.Leader;
import java.io.*; import java.util.*; import org.apache.zookeeper.server.persistence.*; import org.apache.zookeeper.server.quorum.*;
[ "java.io", "java.util", "org.apache.zookeeper" ]
java.io; java.util; org.apache.zookeeper;
2,252,616
public static SmileDeltaParameters of( double expiry, Tenor expiryTenor, double atmVolatility, DoubleArray delta, DoubleArray riskReversal, DoubleArray strangle) { return of(expiry, atmVolatility, delta, riskReversal, strangle, createParameterMetadata(expiry, expiryTenor, delt...
static SmileDeltaParameters function( double expiry, Tenor expiryTenor, double atmVolatility, DoubleArray delta, DoubleArray riskReversal, DoubleArray strangle) { return of(expiry, atmVolatility, delta, riskReversal, strangle, createParameterMetadata(expiry, expiryTenor, delta)); }
/** * Obtains an instance from market data at-the-money, delta, risk-reversal and strangle. * <p> * This factory allows the tenor to be included in the parameter metadata. * * @param expiry the time to expiry associated to the data * @param expiryTenor the tenor associated with the expiry * @par...
Obtains an instance from market data at-the-money, delta, risk-reversal and strangle. This factory allows the tenor to be included in the parameter metadata
of
{ "repo_name": "OpenGamma/Strata", "path": "modules/pricer/src/main/java/com/opengamma/strata/pricer/fxopt/SmileDeltaParameters.java", "license": "apache-2.0", "size": 27328 }
[ "com.opengamma.strata.basics.date.Tenor", "com.opengamma.strata.collect.array.DoubleArray" ]
import com.opengamma.strata.basics.date.Tenor; import com.opengamma.strata.collect.array.DoubleArray;
import com.opengamma.strata.basics.date.*; import com.opengamma.strata.collect.array.*;
[ "com.opengamma.strata" ]
com.opengamma.strata;
270,945
void subnetDisconnected(SubnetId subnetId);
void subnetDisconnected(SubnetId subnetId);
/** * Signals the core that a subnet has disconnected or is no longer reachable. * * @param subnetId identity of the subnet to be removed */
Signals the core that a subnet has disconnected or is no longer reachable
subnetDisconnected
{ "repo_name": "kuangrewawa/onos", "path": "core/api/src/main/java/org/onosproject/net/subnet/SubnetProviderService.java", "license": "apache-2.0", "size": 2173 }
[ "org.onosproject.net.SubnetId" ]
import org.onosproject.net.SubnetId;
import org.onosproject.net.*;
[ "org.onosproject.net" ]
org.onosproject.net;
2,872,681
// User(String email, String password, String firstName, String lastName, String // institution, Collection<Role> roles) final User user1 = new User("admin@dareon.org", "admin", "Systems", "Administrator", "Dareon Org", Arrays.asList(roleRepository.findByName("ROLE_SA"))); userRepository.save(user1); fina...
final User user1 = new User(STR, "admin", STR, STR, STR, Arrays.asList(roleRepository.findByName(STR))); userRepository.save(user1); final User user2 = new User(STR, STR, STR, "Owner", STR, Arrays.asList(roleRepository.findByName(STR))); userRepository.save(user2); final User user3 = new User(STR, STR, "Data", "Owner",...
/** * defining first 3 initial users and their roles as system admin, repo owner * and dataowner respectively. */
defining first 3 initial users and their roles as system admin, repo owner and dataowner respectively
initUsers
{ "repo_name": "dareon-org/dareon", "path": "src/main/java/org/dareon/dataloader/InitUsersRepos.java", "license": "bsd-3-clause", "size": 4673 }
[ "java.util.Arrays", "org.dareon.domain.User" ]
import java.util.Arrays; import org.dareon.domain.User;
import java.util.*; import org.dareon.domain.*;
[ "java.util", "org.dareon.domain" ]
java.util; org.dareon.domain;
2,793,791
EReference getGlossary__Word_1();
EReference getGlossary__Word_1();
/** * Returns the meta object for the containment reference list '{@link cruise.umple.umple.Glossary_#getWord_1 <em>Word 1</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the containment reference list '<em>Word 1</em>'. * @see cruise.umple.umple.Glossary_#getWord_...
Returns the meta object for the containment reference list '<code>cruise.umple.umple.Glossary_#getWord_1 Word 1</code>'.
getGlossary__Word_1
{ "repo_name": "ahmedvc/umple", "path": "cruise.umple.xtext/src-gen/cruise/umple/umple/UmplePackage.java", "license": "mit", "size": 485842 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
391,950
public static void logInliningDecision(DebugContext debug, final String msg, final Object... args) { logInlining(debug, msg, args); }
static void function(DebugContext debug, final String msg, final Object... args) { logInlining(debug, msg, args); }
/** * Output a generic inlining decision to the logging stream (e.g. inlining termination * condition). * * Used for debugging purposes. */
Output a generic inlining decision to the logging stream (e.g. inlining termination condition). Used for debugging purposes
logInliningDecision
{ "repo_name": "smarr/Truffle", "path": "compiler/src/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/inlining/InliningUtil.java", "license": "gpl-2.0", "size": 54886 }
[ "org.graalvm.compiler.debug.DebugContext" ]
import org.graalvm.compiler.debug.DebugContext;
import org.graalvm.compiler.debug.*;
[ "org.graalvm.compiler" ]
org.graalvm.compiler;
232,015
public void setIcon(Drawable drawable) { if (drawable != null) { drawable.setBounds(0, 0, drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight()); this.mTitle.setCompoundDrawablePadding(ViewUtils.dip2px(mContext, 6)); this.mTitle.setCompoundDrawables(drawable, null, null, null); } else { ...
void function(Drawable drawable) { if (drawable != null) { drawable.setBounds(0, 0, drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight()); this.mTitle.setCompoundDrawablePadding(ViewUtils.dip2px(mContext, 6)); this.mTitle.setCompoundDrawables(drawable, null, null, null); } else { this.mTitle.setCompoundDrawables...
/** * Set XPreference Icon. * * @param drawable */
Set XPreference Icon
setIcon
{ "repo_name": "nulibj/android-project-wo2b", "path": "wo2b-common-wrapper/src/com/wo2b/wrapper/view/XPreferenceGreen.java", "license": "apache-2.0", "size": 14298 }
[ "android.graphics.drawable.Drawable", "com.wo2b.sdk.common.util.ViewUtils" ]
import android.graphics.drawable.Drawable; import com.wo2b.sdk.common.util.ViewUtils;
import android.graphics.drawable.*; import com.wo2b.sdk.common.util.*;
[ "android.graphics", "com.wo2b.sdk" ]
android.graphics; com.wo2b.sdk;
1,156,420
public void setQtyOnHand (BigDecimal QtyOnHand);
void function (BigDecimal QtyOnHand);
/** Set On Hand Quantity. * On Hand Quantity */
Set On Hand Quantity. On Hand Quantity
setQtyOnHand
{ "repo_name": "klst-com/metasfresh", "path": "de.metas.adempiere.adempiere/base/src/main/java-gen/org/compiere/model/I_M_Storage.java", "license": "gpl-2.0", "size": 6012 }
[ "java.math.BigDecimal" ]
import java.math.BigDecimal;
import java.math.*;
[ "java.math" ]
java.math;
231,051
public static ContentType parse( final String s) throws ParseException, UnsupportedCharsetException { if (s == null) { throw new IllegalArgumentException("Content type may not be null"); } HeaderElement[] elements = BasicHeaderValueParser.parseElements(s, null); ...
static ContentType function( final String s) throws ParseException, UnsupportedCharsetException { if (s == null) { throw new IllegalArgumentException(STR); } HeaderElement[] elements = BasicHeaderValueParser.parseElements(s, null); if (elements.length > 0) { return create(elements[0]); } else { throw new ParseException...
/** * Parses textual representation of <code>Content-Type</code> value. * * @param s text * @return content type * @throws ParseException if the given text does not represent a valid * <code>Content-Type</code> value. */
Parses textual representation of <code>Content-Type</code> value
parse
{ "repo_name": "GistLabs/mechanize", "path": "src/main/java/com/gistlabs/mechanize/util/apache/ContentType.java", "license": "mpl-2.0", "size": 9738 }
[ "java.nio.charset.UnsupportedCharsetException", "org.apache.http.HeaderElement", "org.apache.http.ParseException", "org.apache.http.message.BasicHeaderValueParser" ]
import java.nio.charset.UnsupportedCharsetException; import org.apache.http.HeaderElement; import org.apache.http.ParseException; import org.apache.http.message.BasicHeaderValueParser;
import java.nio.charset.*; import org.apache.http.*; import org.apache.http.message.*;
[ "java.nio", "org.apache.http" ]
java.nio; org.apache.http;
1,224,406
public void genCode() throws RevEngineException, IOException, ClassParserException { loadSymbolTable(); curMethod.setSymbolTable(this.getSymbolTable()); if (byteIns.size() == 0) { //Indicates either an abstract cl...
void function() throws RevEngineException, IOException, ClassParserException { loadSymbolTable(); curMethod.setSymbolTable(this.getSymbolTable()); if (byteIns.size() == 0) { } else { try { JCollatingTable collatter = loadBranchTable(); Helper.log(STR + collatter.toString()); collatter.identifyWhileLoops(branches.getGot...
/** * Don't depend on LineNumberTable Attribute of a method, * as it is optional. Available only if compiled with * debugging options on. ( -g ). * @throws RevEngineException Encountered when the decompiler could not * decompile the code. Specific to decompiling engine. * @throws IOExcepti...
Don't depend on LineNumberTable Attribute of a method, as it is optional. Available only if compiled with debugging options on. ( -g )
genCode
{ "repo_name": "max630/jrevpro-old", "path": "src/jreversepro/revengine/JDecompiler.java", "license": "gpl-2.0", "size": 20698 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,947,162
public void setCurrentSeriesPoints(Stack points) { this.currentSeriesPoints = points; }
void function(Stack points) { this.currentSeriesPoints = points; }
/** * Sets the current series points. * * @param points the points. */
Sets the current series points
setCurrentSeriesPoints
{ "repo_name": "raedle/univis", "path": "lib/jfreechart-1.0.1/src/org/jfree/chart/renderer/xy/StackedXYAreaRenderer.java", "license": "lgpl-2.1", "size": 23735 }
[ "java.util.Stack" ]
import java.util.Stack;
import java.util.*;
[ "java.util" ]
java.util;
2,629,275
public void setNameMapping(String name, String alias){ List<String> list = nameMappings.get(name); if(list==null){ list = new ArrayList<String>(); nameMappings.put(name, list); } list.add(alias); }
void function(String name, String alias){ List<String> list = nameMappings.get(name); if(list==null){ list = new ArrayList<String>(); nameMappings.put(name, list); } list.add(alias); }
/** * Adds an alternative name for a material * @param name The material name to be found in a .mesh.xml file * @param alias The material name to be found in a .material file */
Adds an alternative name for a material
setNameMapping
{ "repo_name": "rex-xxx/mt6572_x201", "path": "external/jmonkeyengine/engine/src/ogre/com/jme3/scene/plugins/ogre/matext/MaterialExtensionSet.java", "license": "gpl-2.0", "size": 3353 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,711,776
@Override public String getText(Object object) { Round round = (Round)object; return getString("_UI_Round_type") + " " + round.isSerialized(); }
String function(Object object) { Round round = (Round)object; return getString(STR) + " " + round.isSerialized(); }
/** * This returns the label text for the adapted class. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This returns the label text for the adapted class.
getText
{ "repo_name": "prabushi/devstudio-tooling-esb", "path": "plugins/org.wso2.developerstudio.visualdatamapper.edit/src/org/wso2/developerstudio/datamapper/provider/RoundItemProvider.java", "license": "apache-2.0", "size": 2503 }
[ "org.wso2.developerstudio.datamapper.Round" ]
import org.wso2.developerstudio.datamapper.Round;
import org.wso2.developerstudio.datamapper.*;
[ "org.wso2.developerstudio" ]
org.wso2.developerstudio;
2,775,233
static String lookUpFactoryClassName(String factoryId, String propertiesFilename, String fallbackClassName) { // Use the system property first try { String systemProp = SecuritySupport.get...
static String lookUpFactoryClassName(String factoryId, String propertiesFilename, String fallbackClassName) { try { String systemProp = SecuritySupport.getSystemProperty(factoryId); if (systemProp != null) { if (DEBUG) debugPrintln(STR + systemProp); return systemProp; } } catch (SecurityException se) { } String factor...
/** * Finds the name of the required implementation class in the specified * order. The specified order is the following: * <ol> * <li>query the system property using <code>System.getProperty</code> * <li>read <code>$java.home/lib/<i>propertiesFilename</i></code> file * <li>read <code>...
Finds the name of the required implementation class in the specified order. The specified order is the following: query the system property using <code>System.getProperty</code> read <code>$java.home/lib/propertiesFilename</code> file read <code>META-INF/services/factoryId</code> file use fallback classname
lookUpFactoryClassName
{ "repo_name": "axDev-JDK/jaxp", "path": "src/com/sun/org/apache/xalan/internal/utils/ObjectFactory.java", "license": "gpl-2.0", "size": 26593 }
[ "java.io.File", "java.io.FileInputStream", "java.io.IOException", "java.util.Properties" ]
import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.util.Properties;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
314,581
@Override public void write(String s, int off, int len) throws IOException { ensureOpen(); if (bufferSize == 0) { initOut(); out.write(s, off, len); return; } int b = off, t = off + len; while (b < t) { int d = min(bufferSiz...
void function(String s, int off, int len) throws IOException { ensureOpen(); if (bufferSize == 0) { initOut(); out.write(s, off, len); return; } int b = off, t = off + len; while (b < t) { int d = min(bufferSize - nextChar, t - b); s.getChars(b, b + d, cb, nextChar); b += d; nextChar += d; if (nextChar >= bufferSize) i...
/** * Write a portion of a String. * * @param s String to be written * @param off Offset from which to start reading characters * @param len Number of characters to be written */
Write a portion of a String
write
{ "repo_name": "barreiro/jastow", "path": "src/main/java/org/apache/jasper/runtime/JspWriterImpl.java", "license": "apache-2.0", "size": 17429 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
241,528
protected Set doFindPathMatchingFileResources(Resource rootDirResource, String subPattern) throws IOException { if (rootDirResource instanceof ServletContextResource) { ServletContextResource scResource = (ServletContextResource) rootDirResource; ServletContext sc = scResource.getServletContext(); Str...
Set function(Resource rootDirResource, String subPattern) throws IOException { if (rootDirResource instanceof ServletContextResource) { ServletContextResource scResource = (ServletContextResource) rootDirResource; ServletContext sc = scResource.getServletContext(); String fullPattern = scResource.getPath() + subPattern...
/** * Overridden version which checks for ServletContextResource * and uses <code>ServletContext.getResourcePaths</code> to find * matching resources below the web application root directory. * In case of other resources, delegates to the superclass version. * @see #doRetrieveMatchingServletContextResour...
Overridden version which checks for ServletContextResource and uses <code>ServletContext.getResourcePaths</code> to find matching resources below the web application root directory. In case of other resources, delegates to the superclass version
doFindPathMatchingFileResources
{ "repo_name": "codeApeFromChina/resource", "path": "frame_packages/java_libs/spring-2.5.6-src/src/org/springframework/web/context/support/ServletContextResourcePatternResolver.java", "license": "unlicense", "size": 5087 }
[ "java.io.IOException", "java.util.LinkedHashSet", "java.util.Set", "javax.servlet.ServletContext", "org.springframework.core.io.Resource" ]
import java.io.IOException; import java.util.LinkedHashSet; import java.util.Set; import javax.servlet.ServletContext; import org.springframework.core.io.Resource;
import java.io.*; import java.util.*; import javax.servlet.*; import org.springframework.core.io.*;
[ "java.io", "java.util", "javax.servlet", "org.springframework.core" ]
java.io; java.util; javax.servlet; org.springframework.core;
845,481
@Override public ResourceLocator getResourceLocator() { return ActivityEditPlugin.INSTANCE; }
ResourceLocator function() { return ActivityEditPlugin.INSTANCE; }
/** * Return the resource locator for this item provider's resources. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
Return the resource locator for this item provider's resources.
getResourceLocator
{ "repo_name": "HamedKaramoko/farmingdsl", "path": "fr.esir.lsi.langage.edit/src/exploitation/provider/AtelierItemProvider.java", "license": "mit", "size": 4019 }
[ "org.eclipse.emf.common.util.ResourceLocator" ]
import org.eclipse.emf.common.util.ResourceLocator;
import org.eclipse.emf.common.util.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
183,337
public void startViewAnimations(View child, ViewState viewState, long delay, long duration) { boolean wasVisible = child.getVisibility() == View.VISIBLE; final float alpha = viewState.alpha; if (!wasVisible && alpha != 0 && !viewState.gone) { child.setVisibility(View.VISIBLE); ...
void function(View child, ViewState viewState, long delay, long duration) { boolean wasVisible = child.getVisibility() == View.VISIBLE; final float alpha = viewState.alpha; if (!wasVisible && alpha != 0 && !viewState.gone) { child.setVisibility(View.VISIBLE); } boolean yTranslationChanging = child.getTranslationY() != ...
/** * Start an animation to a new {@link ViewState}. * * @param child the child to start the animation on * @param viewState the {@link StackViewState} of the view to animate to * @param delay a fixed delay * @param duration the duration of the animation */
Start an animation to a new <code>ViewState</code>
startViewAnimations
{ "repo_name": "syslover33/ctank", "path": "java/android-sdk-linux_r24.4.1_src/sources/android-23/com/android/systemui/statusbar/stack/StackStateAnimator.java", "license": "gpl-3.0", "size": 46366 }
[ "android.view.View", "com.android.systemui.statusbar.ExpandableView" ]
import android.view.View; import com.android.systemui.statusbar.ExpandableView;
import android.view.*; import com.android.systemui.statusbar.*;
[ "android.view", "com.android.systemui" ]
android.view; com.android.systemui;
2,390,528
public List generateInstances(TimeRange prototype, TimeRange range, TimeZone timeZone) { // these calendars are used if local time zone and the time zone where the first event was created (timeZone) are different GregorianCalendar firstEventCalendarDate = null; GregorianCalendar nextFirstEventCalendarDate = n...
List function(TimeRange prototype, TimeRange range, TimeZone timeZone) { GregorianCalendar firstEventCalendarDate = null; GregorianCalendar nextFirstEventCalendarDate = null; TimeBreakdown startBreakdown = prototype.firstTime().breakdownLocal(); GregorianCalendar startCalendarDate = TimeService.getCalendar(TimeService....
/** * Return a List of all RecurrenceInstance objects generated by this rule within the given time range, based on the * prototype first range, in time order. * @param prototype The prototype first TimeRange. * @param range A time range to limit the generated ranges. * @param timeZone The time zone to use for disp...
Return a List of all RecurrenceInstance objects generated by this rule within the given time range, based on the prototype first range, in time order
generateInstances
{ "repo_name": "marktriggs/nyu-sakai-10.4", "path": "calendar/calendar-impl/impl/src/java/org/sakaiproject/calendar/impl/RecurrenceRuleBase.java", "license": "apache-2.0", "size": 10915 }
[ "java.util.GregorianCalendar", "java.util.List", "java.util.TimeZone", "java.util.Vector", "org.sakaiproject.time.api.Time", "org.sakaiproject.time.api.TimeBreakdown", "org.sakaiproject.time.api.TimeRange", "org.sakaiproject.time.cover.TimeService" ]
import java.util.GregorianCalendar; import java.util.List; import java.util.TimeZone; import java.util.Vector; import org.sakaiproject.time.api.Time; import org.sakaiproject.time.api.TimeBreakdown; import org.sakaiproject.time.api.TimeRange; import org.sakaiproject.time.cover.TimeService;
import java.util.*; import org.sakaiproject.time.api.*; import org.sakaiproject.time.cover.*;
[ "java.util", "org.sakaiproject.time" ]
java.util; org.sakaiproject.time;
772,943
public void loadFromFile(String dctFilePath) throws FileNotFoundException, IOException, UnsupportedEncodingException { int i, cnt, length, total = 0; // The file only counted 6763 Chinese characters plus 5 reserved slots 3756~3760. // The 3756th is used (as a header) to store information. int...
void function(String dctFilePath) throws FileNotFoundException, IOException, UnsupportedEncodingException { int i, cnt, length, total = 0; int[] buffer = new int[3]; byte[] intBuffer = new byte[4]; String tmpword; RandomAccessFile dctFile = new RandomAccessFile(dctFilePath, "r"); for (i = GB2312_FIRST_CHAR; i < GB2312_...
/** * Load the datafile into this BigramDictionary * * @param dctFilePath path to the Bigramdictionary (bigramdict.dct) * @throws FileNotFoundException * @throws IOException * @throws UnsupportedEncodingException */
Load the datafile into this BigramDictionary
loadFromFile
{ "repo_name": "sluk3r/lucene-3.0.2-src-study", "path": "contrib/analyzers/smartcn/src/java/org/apache/lucene/analysis/cn/smart/hhmm/BigramDictionary.java", "license": "apache-2.0", "size": 8898 }
[ "java.io.FileNotFoundException", "java.io.IOException", "java.io.RandomAccessFile", "java.io.UnsupportedEncodingException", "java.nio.ByteBuffer", "java.nio.ByteOrder" ]
import java.io.FileNotFoundException; import java.io.IOException; import java.io.RandomAccessFile; import java.io.UnsupportedEncodingException; import java.nio.ByteBuffer; import java.nio.ByteOrder;
import java.io.*; import java.nio.*;
[ "java.io", "java.nio" ]
java.io; java.nio;
881,647
public void assertExactlyNumBrokersAreUp(int numBrokers, String detailMessage) throws InterruptedException { try { waitForCondition( () -> checkBrokersUp(numBrokers, (actual, expected) -> actual == expected).orElse(false), WORKER_SETUP_DURATION_MS, ...
void function(int numBrokers, String detailMessage) throws InterruptedException { try { waitForCondition( () -> checkBrokersUp(numBrokers, (actual, expected) -> actual == expected).orElse(false), WORKER_SETUP_DURATION_MS, STR + numBrokers); } catch (AssertionError e) { throw new AssertionError(detailMessage, e); } }
/** * Assert that at least the requested number of workers are up and running. * * @param numBrokers the number of online brokers */
Assert that at least the requested number of workers are up and running
assertExactlyNumBrokersAreUp
{ "repo_name": "Chasego/kafka", "path": "connect/runtime/src/test/java/org/apache/kafka/connect/util/clusters/EmbeddedConnectClusterAssertions.java", "license": "apache-2.0", "size": 19991 }
[ "org.apache.kafka.test.TestUtils" ]
import org.apache.kafka.test.TestUtils;
import org.apache.kafka.test.*;
[ "org.apache.kafka" ]
org.apache.kafka;
2,028,697
public static String getPrivateReply(final Player player) { String reply = null; for (final RPEvent event : player.events()) { if (event.getName().equals(Events.PRIVATE_TEXT)) { reply = event.get("text"); } } player.clearEvents(); return reply; }
static String function(final Player player) { String reply = null; for (final RPEvent event : player.events()) { if (event.getName().equals(Events.PRIVATE_TEXT)) { reply = event.get("text"); } } player.clearEvents(); return reply; }
/** * Query the player's events for private messages. * @param player * @return message text */
Query the player's events for private messages
getPrivateReply
{ "repo_name": "AntumDeluge/arianne-stendhal", "path": "tests/utilities/PlayerTestHelper.java", "license": "gpl-2.0", "size": 10785 }
[ "games.stendhal.common.constants.Events", "games.stendhal.server.entity.player.Player" ]
import games.stendhal.common.constants.Events; import games.stendhal.server.entity.player.Player;
import games.stendhal.common.constants.*; import games.stendhal.server.entity.player.*;
[ "games.stendhal.common", "games.stendhal.server" ]
games.stendhal.common; games.stendhal.server;
1,954,938
public static Rectangle2D.Float getBounds(Graphnode_c node) { Point2D.Float position = getPosition(node); return new Rectangle2D.Float( position.x, position.y, node.getWidth(), node.getHeight()); }
static Rectangle2D.Float function(Graphnode_c node) { Point2D.Float position = getPosition(node); return new Rectangle2D.Float( position.x, position.y, node.getWidth(), node.getHeight()); }
/** * Returns the rectangular bounds of the given graph-node. */
Returns the rectangular bounds of the given graph-node
getBounds
{ "repo_name": "HebaKhaled/bposs", "path": "src/com.mentor.nucleus.bp.ui.canvas/src/com/mentor/nucleus/bp/ui/canvas/util/GraphNodeUtil.java", "license": "apache-2.0", "size": 3137 }
[ "java.awt.geom.Point2D", "java.awt.geom.Rectangle2D" ]
import java.awt.geom.Point2D; import java.awt.geom.Rectangle2D;
import java.awt.geom.*;
[ "java.awt" ]
java.awt;
1,510,170
LogEvent getLogEvent(ExecutionContext context, long id);
LogEvent getLogEvent(ExecutionContext context, long id);
/** * Find the event with a particular id value * @param context locale/timezone information * @param id id of LogEvent * @return matching event (if any) */
Find the event with a particular id value
getLogEvent
{ "repo_name": "leocockroach/JasperServer5.6", "path": "jasperserver-api/engine/src/main/java/com/jaspersoft/jasperserver/api/engine/common/service/LoggingService.java", "license": "gpl-2.0", "size": 3513 }
[ "com.jaspersoft.jasperserver.api.common.domain.ExecutionContext", "com.jaspersoft.jasperserver.api.common.domain.LogEvent" ]
import com.jaspersoft.jasperserver.api.common.domain.ExecutionContext; import com.jaspersoft.jasperserver.api.common.domain.LogEvent;
import com.jaspersoft.jasperserver.api.common.domain.*;
[ "com.jaspersoft.jasperserver" ]
com.jaspersoft.jasperserver;
2,527,346
public static void fireStarted(Run r, TaskListener listener) { for (RunListener l : all()) { if (l.targetType.isInstance(r)) { // See issue https://bugs.eclipse.org/bugs/show_bug.cgi?id=384786 // Gaurd against any failures from listeners try { ...
static void function(Run r, TaskListener listener) { for (RunListener l : all()) { if (l.targetType.isInstance(r)) { try { l.onStarted(r, listener); } catch (Exception exc) { logger.warn(STR, exc); } } } }
/** * Fires the {@link #onStarted} event. */
Fires the <code>#onStarted</code> event
fireStarted
{ "repo_name": "sap-production/hudson-3.x", "path": "hudson-core/src/main/java/hudson/model/listeners/RunListener.java", "license": "apache-2.0", "size": 6757 }
[ "hudson.model.Run", "hudson.model.TaskListener" ]
import hudson.model.Run; import hudson.model.TaskListener;
import hudson.model.*;
[ "hudson.model" ]
hudson.model;
1,305,505
protected void writeLogicalParameter(XMLWriter xw, int targetValue, String activeInteractions) throws IOException { xw.openTag("parameter"); xw.addAttr("val", ""+targetValue); if (!activeInteractions.isEmpty()) { xw.addAttr("idActiveInteractions", activeInteractions); } xw.closeTag(); }
void function(XMLWriter xw, int targetValue, String activeInteractions) throws IOException { xw.openTag(STR); xw.addAttr("val", STRidActiveInteractions", activeInteractions); } xw.closeTag(); }
/** * Write a logical parameter to GINML. * * @param xw an opened XML writer to save the result * @param targetValue the target value when this parameter is enabled * @param activeInteractions the list of associated active interactions * @throws IOException if writing fails */
Write a logical parameter to GINML
writeLogicalParameter
{ "repo_name": "colomoto/bioLQM", "path": "src/main/java/org/colomoto/biolqm/io/ginml/AbstractGINMLWriter.java", "license": "lgpl-3.0", "size": 3650 }
[ "java.io.IOException", "org.colomoto.common.xml.XMLWriter" ]
import java.io.IOException; import org.colomoto.common.xml.XMLWriter;
import java.io.*; import org.colomoto.common.xml.*;
[ "java.io", "org.colomoto.common" ]
java.io; org.colomoto.common;
1,804,607
@Nonnull Map<String, String> getPrivateAttributes();
Map<String, String> getPrivateAttributes();
/** * Returns the private attributes stored with this info object. * * @return the private attributes stored with this info object. */
Returns the private attributes stored with this info object
getPrivateAttributes
{ "repo_name": "tteofili/jackrabbit-oak", "path": "oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/token/TokenInfo.java", "license": "apache-2.0", "size": 2719 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
29,180
public void assertContains(AssertionInfo info, byte[] actual, int[] values) { arrays.assertContains(info, failures, actual, toByteArray(values)); }
void function(AssertionInfo info, byte[] actual, int[] values) { arrays.assertContains(info, failures, actual, toByteArray(values)); }
/** * Asserts that the given array contains the given values, in any order. * @param info contains information about the assertion. * @param actual the given array. * @param values the values that are expected to be in the given array. * @throws NullPointerException if the array of values is {@code null}...
Asserts that the given array contains the given values, in any order
assertContains
{ "repo_name": "bric3/assertj-core", "path": "src/main/java/org/assertj/core/internal/ByteArrays.java", "license": "apache-2.0", "size": 22435 }
[ "org.assertj.core.api.AssertionInfo" ]
import org.assertj.core.api.AssertionInfo;
import org.assertj.core.api.*;
[ "org.assertj.core" ]
org.assertj.core;
2,295,043
ObjectMapper createObjectMapper();
ObjectMapper createObjectMapper();
/** * Creates a configured instance of <code>ObjectMapper</code>. * * @return configured instance of <code>ObjectMapper</code> */
Creates a configured instance of <code>ObjectMapper</code>
createObjectMapper
{ "repo_name": "mmazi/rescu", "path": "src/main/java/si/mazi/rescu/serialization/jackson/JacksonObjectMapperFactory.java", "license": "mit", "size": 1877 }
[ "com.fasterxml.jackson.databind.ObjectMapper" ]
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.*;
[ "com.fasterxml.jackson" ]
com.fasterxml.jackson;
2,329,300
void beforePacks(List<Pack> packs);
void beforePacks(List<Pack> packs);
/** * Invoked before packs are installed. * * @param packs the packs to be installed * @throws IzPackException for any error */
Invoked before packs are installed
beforePacks
{ "repo_name": "mtjandra/izpack", "path": "izpack-api/src/main/java/com/izforge/izpack/api/event/InstallerListener.java", "license": "apache-2.0", "size": 7739 }
[ "com.izforge.izpack.api.data.Pack", "java.util.List" ]
import com.izforge.izpack.api.data.Pack; import java.util.List;
import com.izforge.izpack.api.data.*; import java.util.*;
[ "com.izforge.izpack", "java.util" ]
com.izforge.izpack; java.util;
2,759,172
public MPPProductBOMLine[] getLines (Timestamp valid) { List<MPPProductBOMLine> list = new ArrayList<MPPProductBOMLine>(); // Selected BOM Lines Only for (MPPProductBOMLine bl : getLines(true)) { if (bl.isValidFromTo(valid)) { list.add(bl); } } // return list.toArray(new MPPProductBOMLine[l...
MPPProductBOMLine[] function (Timestamp valid) { List<MPPProductBOMLine> list = new ArrayList<MPPProductBOMLine>(); for (MPPProductBOMLine bl : getLines(true)) { if (bl.isValidFromTo(valid)) { list.add(bl); } } }
/** * Get BOM Lines valid date for Product BOM * @param valid Date to Validate * @return BOM Lines */
Get BOM Lines valid date for Product BOM
getLines
{ "repo_name": "geneos/adempiere", "path": "base/src/org/eevolution/model/MPPProductBOM.java", "license": "gpl-2.0", "size": 8135 }
[ "java.sql.Timestamp", "java.util.ArrayList", "java.util.List" ]
import java.sql.Timestamp; import java.util.ArrayList; import java.util.List;
import java.sql.*; import java.util.*;
[ "java.sql", "java.util" ]
java.sql; java.util;
2,324,467
protected Color getSelectColor() { return selectColor; }
Color function() { return selectColor; }
/** * Returns the color that indicates a selected button. * * @return the color that indicates a selected button */
Returns the color that indicates a selected button
getSelectColor
{ "repo_name": "shaotuanchen/sunflower_exp", "path": "tools/source/gcc-4.2.4/libjava/classpath/javax/swing/plaf/metal/MetalButtonUI.java", "license": "bsd-3-clause", "size": 8868 }
[ "java.awt.Color" ]
import java.awt.Color;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,582,496
public void getAllLDAPDescriptorsHavingPermissions(String ldapGroup, int catalogNum, int groupColumnNum, TransactionController tc, List<? extends PermissionsDescriptor> outDescriptors) throws StandardException; // GemStone changes END
void function(String ldapGroup, int catalogNum, int groupColumnNum, TransactionController tc, List<? extends PermissionsDescriptor> outDescriptors) throws StandardException;
/** * Get the list of all user descriptors belonging to a given LDAP group * having any permission for a table or routine. * * @param ldapGroup the LDAP group to search * @param catalogNum the catalog number of the permissions table to look * @param groupColumnNum the LDAP group column number in the table ...
Get the list of all user descriptors belonging to a given LDAP group having any permission for a table or routine
getAllLDAPDescriptorsHavingPermissions
{ "repo_name": "SnappyDataInc/snappy-store", "path": "gemfirexd/core/src/main/java/com/pivotal/gemfirexd/internal/iapi/sql/dictionary/DataDictionary.java", "license": "apache-2.0", "size": 74186 }
[ "com.pivotal.gemfirexd.internal.iapi.error.StandardException", "com.pivotal.gemfirexd.internal.iapi.store.access.TransactionController", "java.util.List" ]
import com.pivotal.gemfirexd.internal.iapi.error.StandardException; import com.pivotal.gemfirexd.internal.iapi.store.access.TransactionController; import java.util.List;
import com.pivotal.gemfirexd.internal.iapi.error.*; import com.pivotal.gemfirexd.internal.iapi.store.access.*; import java.util.*;
[ "com.pivotal.gemfirexd", "java.util" ]
com.pivotal.gemfirexd; java.util;
307,338
public Date getDateCreated() { return (Date)getAttributeInternal(DATECREATED); }
Date function() { return (Date)getAttributeInternal(DATECREATED); }
/** * * Gets the attribute value for DATE_CREATED using the alias name DateCreated */
Gets the attribute value for DATE_CREATED using the alias name DateCreated
getDateCreated
{ "repo_name": "CBIIT/cadsr-util", "path": "cadsrutil/src/java/gov/nih/nci/ncicb/cadsr/common/persistence/bc4j/QcRecsExtViewRowImpl.java", "license": "bsd-3-clause", "size": 6483 }
[ "oracle.jbo.domain.Date" ]
import oracle.jbo.domain.Date;
import oracle.jbo.domain.*;
[ "oracle.jbo.domain" ]
oracle.jbo.domain;
371,310
@Override protected void end() { Robot.pickup.off(); logger.debug("Pickup off"); }
void function() { Robot.pickup.off(); logger.debug(STR); }
/** * Stop pickup */
Stop pickup
end
{ "repo_name": "mr-glt/FRC-2017-Command", "path": "src/main/java/org/usfirst/frc/team6027/robot/commands/PickupReverse.java", "license": "mit", "size": 1184 }
[ "org.usfirst.frc.team6027.robot.Robot" ]
import org.usfirst.frc.team6027.robot.Robot;
import org.usfirst.frc.team6027.robot.*;
[ "org.usfirst.frc" ]
org.usfirst.frc;
236,287
private static void printRequiredProperties(PrintStream os) { // TODO some annotators (ssplit, regexner, gender, some parser options, dcoref?) are not documented os.println("The following properties can be defined:"); os.println("(if -props or -annotators is not passed in, default properties will be loade...
static void function(PrintStream os) { os.println(STR); os.println(STR); os.println("\t\"props\STR); os.println("\t\"annotators\STR); os.println(STR); os.println(); os.println(STRtokenize\STR); os.println("\t\"tokenize.options\STR); os.println("\t\"tokenize.whitespace\STR); os.println(); os.println(STRcleanxml\STR); os...
/** * Prints the list of properties required to run the pipeline * * @param os * PrintStream to print usage to */
Prints the list of properties required to run the pipeline
printRequiredProperties
{ "repo_name": "begab/kpe", "path": "src/edu/stanford/nlp/pipeline/SzTECoreNLP.java", "license": "gpl-3.0", "size": 43420 }
[ "java.io.PrintStream" ]
import java.io.PrintStream;
import java.io.*;
[ "java.io" ]
java.io;
944,385
public void hide() { if (mAnchor == null) { return; } try { mAnchor.removeView(this); mHandler.removeMessages(SHOW_PROGRESS); } catch (IllegalArgumentException ex) { Log.w("MediaController", "already removed"); } mShowi...
void function() { if (mAnchor == null) { return; } try { mAnchor.removeView(this); mHandler.removeMessages(SHOW_PROGRESS); } catch (IllegalArgumentException ex) { Log.w(STR, STR); } mShowing = false; }
/** * Remove the controller from the screen. */
Remove the controller from the screen
hide
{ "repo_name": "developer-vtnetzwelt/almsmobile", "path": "src/org/digitalcampus/oppia/utils/mediaplayer/VideoControllerView.java", "license": "gpl-3.0", "size": 23001 }
[ "android.util.Log" ]
import android.util.Log;
import android.util.*;
[ "android.util" ]
android.util;
2,378,482
public void addPendingDelete(Index index, IndexSettings settings) { PendingDelete pendingDelete = new PendingDelete(index, settings); addPendingDelete(index, pendingDelete); }
void function(Index index, IndexSettings settings) { PendingDelete pendingDelete = new PendingDelete(index, settings); addPendingDelete(index, pendingDelete); }
/** * Adds a pending delete for the given index. */
Adds a pending delete for the given index
addPendingDelete
{ "repo_name": "scottsom/elasticsearch", "path": "server/src/main/java/org/elasticsearch/indices/IndicesService.java", "license": "apache-2.0", "size": 64641 }
[ "org.elasticsearch.index.Index", "org.elasticsearch.index.IndexSettings" ]
import org.elasticsearch.index.Index; import org.elasticsearch.index.IndexSettings;
import org.elasticsearch.index.*;
[ "org.elasticsearch.index" ]
org.elasticsearch.index;
2,795,760
DateFormat clone = (DateFormat) super.clone(); clone.calendar = (Calendar) calendar.clone(); clone.numberFormat = (NumberFormat) numberFormat.clone(); return clone; } /** * Compares this date format with the specified object and indicates if they * are equal. * * @pa...
DateFormat clone = (DateFormat) super.clone(); clone.calendar = (Calendar) calendar.clone(); clone.numberFormat = (NumberFormat) numberFormat.clone(); return clone; } /** * Compares this date format with the specified object and indicates if they * are equal. * * @param object * the object to compare with this date for...
/** * Returns a new instance of {@code DateFormat} with the same properties. */
Returns a new instance of DateFormat with the same properties
clone
{ "repo_name": "csripada/j2objc", "path": "jre_emul/android/libcore/luni/src/main/java/java/text/DateFormat.java", "license": "apache-2.0", "size": 29861 }
[ "java.util.Calendar" ]
import java.util.Calendar;
import java.util.*;
[ "java.util" ]
java.util;
2,272,014
public final boolean DownloadFile(String remoteSource, String localDestination) { log.info(String.format("Downloading file %s from %s to %s", remoteSource, host, localDestination)); boolean fReturn = true; ClientChannel channel = null; File tempFile = null; FileOutputStream ...
final boolean function(String remoteSource, String localDestination) { log.info(String.format(STR, remoteSource, host, localDestination)); boolean fReturn = true; ClientChannel channel = null; File tempFile = null; FileOutputStream fout = null; try { log.debug(STR); channel = session.createExecChannel(STR + remoteSourc...
/*** * This implementation uses gzip at the remote end to create a binary stream we gunzip on local machine to the * desired destination. Note, this implementation should be replaced by mina SSHD's standard scp/sftp implementation * once available. * * @param remoteSource * sour...
This implementation uses gzip at the remote end to create a binary stream we gunzip on local machine to the desired destination. Note, this implementation should be replaced by mina SSHD's standard scp/sftp implementation once available
DownloadFile
{ "repo_name": "anjalshireesh/gluster-ovirt-poc", "path": "backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/hostinstall/MinaInstallWrapper.java", "license": "apache-2.0", "size": 44054 }
[ "java.io.ByteArrayInputStream", "java.io.ByteArrayOutputStream", "java.io.File", "java.io.FileInputStream", "java.io.FileNotFoundException", "java.io.FileOutputStream", "java.io.IOException", "java.security.MessageDigest", "java.util.zip.GZIPInputStream", "javax.naming.TimeLimitExceededException",...
import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.security.MessageDigest; import java.util.zip.GZIPInputStream; import javax.naming...
import java.io.*; import java.security.*; import java.util.zip.*; import javax.naming.*; import org.apache.sshd.*;
[ "java.io", "java.security", "java.util", "javax.naming", "org.apache.sshd" ]
java.io; java.security; java.util; javax.naming; org.apache.sshd;
404,157
ServiceResponse<Void> beginDelete204Succeeded() throws CloudException, IOException;
ServiceResponse<Void> beginDelete204Succeeded() throws CloudException, IOException;
/** * Long running delete request, service returns a 204 to the initial request, indicating success. * * @throws CloudException exception thrown from REST call * @throws IOException exception thrown from serialization/deserialization * @return the {@link ServiceResponse} object if successful. ...
Long running delete request, service returns a 204 to the initial request, indicating success
beginDelete204Succeeded
{ "repo_name": "sharadagarwal/autorest", "path": "AutoRest/Generators/Java/Azure.Java.Tests/src/main/java/fixtures/lro/LROSADsOperations.java", "license": "mit", "size": 104323 }
[ "com.microsoft.azure.CloudException", "com.microsoft.rest.ServiceResponse", "java.io.IOException" ]
import com.microsoft.azure.CloudException; import com.microsoft.rest.ServiceResponse; import java.io.IOException;
import com.microsoft.azure.*; import com.microsoft.rest.*; import java.io.*;
[ "com.microsoft.azure", "com.microsoft.rest", "java.io" ]
com.microsoft.azure; com.microsoft.rest; java.io;
1,617,380
public void compactStores() throws IOException { for (Store s : getStores()) { CompactionContext compaction = s.requestCompaction(); if (compaction != null) { compact(compaction, s, NoLimitThroughputController.INSTANCE, null); } } }
void function() throws IOException { for (Store s : getStores()) { CompactionContext compaction = s.requestCompaction(); if (compaction != null) { compact(compaction, s, NoLimitThroughputController.INSTANCE, null); } } }
/** * This is a helper function that compact all the stores synchronously * It is used by utilities and testing * * @throws IOException e */
This is a helper function that compact all the stores synchronously It is used by utilities and testing
compactStores
{ "repo_name": "gustavoanatoly/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java", "license": "apache-2.0", "size": 328407 }
[ "java.io.IOException", "org.apache.hadoop.hbase.regionserver.compactions.CompactionContext", "org.apache.hadoop.hbase.regionserver.throttle.NoLimitThroughputController" ]
import java.io.IOException; import org.apache.hadoop.hbase.regionserver.compactions.CompactionContext; import org.apache.hadoop.hbase.regionserver.throttle.NoLimitThroughputController;
import java.io.*; import org.apache.hadoop.hbase.regionserver.compactions.*; import org.apache.hadoop.hbase.regionserver.throttle.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
1,503,242
@Test public void testObservableRetrieval() { Parameters p = NetworkTestHarness.getParameters().copy(); p = p.union(NetworkTestHarness.getDayDemoTestEncoderParams()); p.setParameterByKey(KEY.RANDOM, new MersenneTwister(42)); MultiEncoder me = MultiEncoder.builder().name("").buil...
void function() { Parameters p = NetworkTestHarness.getParameters().copy(); p = p.union(NetworkTestHarness.getDayDemoTestEncoderParams()); p.setParameterByKey(KEY.RANDOM, new MersenneTwister(42)); MultiEncoder me = MultiEncoder.builder().name("").build(); final Layer<Map<String, Object>> l = new Layer<>(p, me, new Spat...
/** * Test that a given layer can return an {@link Observable} capable of * service multiple subscribers. */
Test that a given layer can return an <code>Observable</code> capable of service multiple subscribers
testObservableRetrieval
{ "repo_name": "user405/test", "path": "src/test/java/org/numenta/nupic/network/LayerTest.java", "license": "agpl-3.0", "size": 59971 }
[ "java.util.ArrayList", "java.util.List", "java.util.Map", "org.numenta.nupic.Parameters", "org.numenta.nupic.algorithms.SpatialPooler", "org.numenta.nupic.algorithms.TemporalMemory", "org.numenta.nupic.encoders.MultiEncoder", "org.numenta.nupic.util.MersenneTwister" ]
import java.util.ArrayList; import java.util.List; import java.util.Map; import org.numenta.nupic.Parameters; import org.numenta.nupic.algorithms.SpatialPooler; import org.numenta.nupic.algorithms.TemporalMemory; import org.numenta.nupic.encoders.MultiEncoder; import org.numenta.nupic.util.MersenneTwister;
import java.util.*; import org.numenta.nupic.*; import org.numenta.nupic.algorithms.*; import org.numenta.nupic.encoders.*; import org.numenta.nupic.util.*;
[ "java.util", "org.numenta.nupic" ]
java.util; org.numenta.nupic;
2,561,649
public static AutonomousSystemTlv read(ChannelBuffer c) { return AutonomousSystemTlv.of(c.readInt()); }
static AutonomousSystemTlv function(ChannelBuffer c) { return AutonomousSystemTlv.of(c.readInt()); }
/** * Reads the channel buffer and returns object of AutonomousSystemTlv. * * @param c ChannelBuffer * @return object of AutonomousSystemTlv */
Reads the channel buffer and returns object of AutonomousSystemTlv
read
{ "repo_name": "Shashikanth-Huawei/bmp", "path": "apps/bgp-api/src/main/java/org/onosproject/bgp/bgpio/types/AutonomousSystemTlv.java", "license": "apache-2.0", "size": 3698 }
[ "org.jboss.netty.buffer.ChannelBuffer" ]
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.*;
[ "org.jboss.netty" ]
org.jboss.netty;
2,057,402
public List<IssueWithParams> getWarnings() { return mWarnings; }
List<IssueWithParams> function() { return mWarnings; }
/** * Returns warnings encountered while verifying this signer's JAR signature. Warnings * do not prevent the signer's signature from being considered verified. */
Returns warnings encountered while verifying this signer's JAR signature. Warnings do not prevent the signer's signature from being considered verified
getWarnings
{ "repo_name": "4455jkjh/apktool", "path": "apktool/src/main/java/com/android/apksig/ApkVerifier.java", "license": "apache-2.0", "size": 53925 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
709,165
SarlEnumeration getSarlEnumeration(JvmGenericType jvmType);
SarlEnumeration getSarlEnumeration(JvmGenericType jvmType);
/** Replies the SARL enumeration associated to the given type. * * @param jvmType - the JVM type. * @return the SARL element. * @since 0.6 */
Replies the SARL enumeration associated to the given type
getSarlEnumeration
{ "repo_name": "jgfoster/sarl", "path": "main/coreplugins/io.sarl.lang/src/io/sarl/lang/jvmmodel/SarlJvmModelAssociations.java", "license": "apache-2.0", "size": 10329 }
[ "io.sarl.lang.sarl.SarlEnumeration", "org.eclipse.xtext.common.types.JvmGenericType" ]
import io.sarl.lang.sarl.SarlEnumeration; import org.eclipse.xtext.common.types.JvmGenericType;
import io.sarl.lang.sarl.*; import org.eclipse.xtext.common.types.*;
[ "io.sarl.lang", "org.eclipse.xtext" ]
io.sarl.lang; org.eclipse.xtext;
2,748,680
private View nextViewFromScrapList() { final int size = mScrapList.size(); for (int i = 0; i < size; i++) { final RecyclerView.ViewHolder viewHolder = mScrapList.get(i); if (viewHolder.isRemoved()) { continue; } ...
View function() { final int size = mScrapList.size(); for (int i = 0; i < size; i++) { final RecyclerView.ViewHolder viewHolder = mScrapList.get(i); if (viewHolder.isRemoved()) { continue; } if (mCurrentPosition == viewHolder.getLayoutPosition()) { assignPositionFromScrapList(viewHolder); return viewHolder.itemView; } ...
/** * Returns the next item from the scrap list. * <p> * Upon finding a valid VH, sets current item position to VH.itemPosition + mItemDirection * * @return View if an item in the current position or direction exists if not null. */
Returns the next item from the scrap list. Upon finding a valid VH, sets current item position to VH.itemPosition + mItemDirection
nextViewFromScrapList
{ "repo_name": "jun0813/Telegram-plusplus", "path": "TMessagesProj/src/main/java/org/telegramsecureplus/android/support/widget/LinearLayoutManager.java", "license": "gpl-2.0", "size": 86906 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
1,924,151
public static void initializeTables(final Sql2o sql2o) { try (Connection con = sql2o.open()) { con.createQuery("CREATE SCHEMA " + SCHEMA).executeUpdate(); con.createQuery("CREATE TABLE " + CORPORA + " (id SERIAL, corpus TEXT, PRIMARY KEY(id) );") .executeUpdate(); //TODO: add descriptions/tooltipps...
static void function(final Sql2o sql2o) { try (Connection con = sql2o.open()) { con.createQuery(STR + SCHEMA).executeUpdate(); con.createQuery(STR + CORPORA + STR) .executeUpdate(); con.createQuery(STR + WORDIDS_TABLE + STR) .executeUpdate(); final String assocTable = STR; con.createQuery(STR + SIMILARITY_TABLE + assoc...
/** * Static to avoid initializeMapping */
Static to avoid initializeMapping
initializeTables
{ "repo_name": "hellrich/JeSemE", "path": "website/src/main/java/de/julielab/jeseme/database/DatabaseService.java", "license": "mit", "size": 14283 }
[ "de.julielab.jeseme.configuration.Configuration", "de.julielab.jeseme.database.corpus.Corpus", "java.util.HashMap", "java.util.Map", "org.dbunit.DatabaseUnitException", "org.sql2o.Connection", "org.sql2o.Sql2o" ]
import de.julielab.jeseme.configuration.Configuration; import de.julielab.jeseme.database.corpus.Corpus; import java.util.HashMap; import java.util.Map; import org.dbunit.DatabaseUnitException; import org.sql2o.Connection; import org.sql2o.Sql2o;
import de.julielab.jeseme.configuration.*; import de.julielab.jeseme.database.corpus.*; import java.util.*; import org.dbunit.*; import org.sql2o.*;
[ "de.julielab.jeseme", "java.util", "org.dbunit", "org.sql2o" ]
de.julielab.jeseme; java.util; org.dbunit; org.sql2o;
2,406,404
public OverWindow as(Expression alias) { return new OverWindow( alias, partitionBy, orderBy, unresolvedCall(BuiltInFunctionDefinitions.UNBOUNDED_RANGE), Optional.empty()); }
OverWindow function(Expression alias) { return new OverWindow( alias, partitionBy, orderBy, unresolvedCall(BuiltInFunctionDefinitions.UNBOUNDED_RANGE), Optional.empty()); }
/** * Assigns an alias for this window that the following {@code select()} clause can refer to. * * @param alias alias for this over window * @return the fully defined over window */
Assigns an alias for this window that the following select() clause can refer to
as
{ "repo_name": "clarkyzl/flink", "path": "flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/OverWindowPartitionedOrdered.java", "license": "apache-2.0", "size": 3294 }
[ "java.util.Optional", "org.apache.flink.table.expressions.ApiExpressionUtils", "org.apache.flink.table.expressions.Expression", "org.apache.flink.table.functions.BuiltInFunctionDefinitions" ]
import java.util.Optional; import org.apache.flink.table.expressions.ApiExpressionUtils; import org.apache.flink.table.expressions.Expression; import org.apache.flink.table.functions.BuiltInFunctionDefinitions;
import java.util.*; import org.apache.flink.table.expressions.*; import org.apache.flink.table.functions.*;
[ "java.util", "org.apache.flink" ]
java.util; org.apache.flink;
1,474,215
public static java.util.List extractInvestigationList(ims.domain.ILightweightDomainFactory domainFactory, ims.ocrr.vo.InvestigationShortVoCollection voCollection) { return extractInvestigationList(domainFactory, voCollection, null, new HashMap()); }
static java.util.List function(ims.domain.ILightweightDomainFactory domainFactory, ims.ocrr.vo.InvestigationShortVoCollection voCollection) { return extractInvestigationList(domainFactory, voCollection, null, new HashMap()); }
/** * Create the ims.ocrr.configuration.domain.objects.Investigation list from the value object collection. * @param domainFactory - used to create existing (persistent) domain objects. * @param voCollection - the collection of value objects */
Create the ims.ocrr.configuration.domain.objects.Investigation list from the value object collection
extractInvestigationList
{ "repo_name": "open-health-hub/openMAXIMS", "path": "openmaxims_workspace/ValueObjects/src/ims/ocrr/vo/domain/InvestigationShortVoAssembler.java", "license": "agpl-3.0", "size": 17615 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
577,765
@Override public ArrayList<RegionData> getPreferredStartingRegions(BotState state, Long timeOut) { int m = 6; ArrayList<RegionData> preferredStartingRegions = new ArrayList<RegionData>(); for(int i=0; i<m; i++) { double rand = Math.random(); int r = (int) (rand*state.getPickableStartingRegions().size...
ArrayList<RegionData> function(BotState state, Long timeOut) { int m = 6; ArrayList<RegionData> preferredStartingRegions = new ArrayList<RegionData>(); for(int i=0; i<m; i++) { double rand = Math.random(); int r = (int) (rand*state.getPickableStartingRegions().size()); int regionId = state.getPickableStartingRegions()....
/** * A method used at the start of the game to decide which player start with what Regions. 6 Regions are required to be returned. * This example randomly picks 6 regions from the pickable starting Regions given by the engine. * @return : a list of m (m=6) Regions starting with the most preferred Region and endi...
A method used at the start of the game to decide which player start with what Regions. 6 Regions are required to be returned. This example randomly picks 6 regions from the pickable starting Regions given by the engine
getPreferredStartingRegions
{ "repo_name": "kefik/conquest-engine-gui", "path": "Conquest/src/conquest/bot/BotStarter.java", "license": "apache-2.0", "size": 4717 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
599,917
Food getReproducedFood(Date currentDate);
Food getReproducedFood(Date currentDate);
/** * Method returns new food item, which was reproduced from the old one. * @param currentDate Date date of reproduction. * @return Food new Food item, which was reproduced from the old one. */
Method returns new food item, which was reproduced from the old one
getReproducedFood
{ "repo_name": "DSagai/dsagai", "path": "chapter_004/src/main/java/ru/job4j/dsagai/lesson3/food/Reproducible.java", "license": "apache-2.0", "size": 483 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
562,210
private Object readFromSocket() throws IOException, ClassNotFoundException { setServerSocket(getServerSide().accept()); DataInputStream dis = new DataInputStream(getServerSocket().getInputStream()); byte[] byteArray = new byte[dis.available()]; try { dis.read(byteArray); } finally { dis.close(...
Object function() throws IOException, ClassNotFoundException { setServerSocket(getServerSide().accept()); DataInputStream dis = new DataInputStream(getServerSocket().getInputStream()); byte[] byteArray = new byte[dis.available()]; try { dis.read(byteArray); } finally { dis.close(); } ByteArrayInputStream bais = new Byt...
/** * Reads source object from socket and creates new object. * * @return New object instance. * @throws IOException * Throws when an exception occurs during stream operations. * @throws ClassNotFoundException * Throws when an exception occurs during class stream * ...
Reads source object from socket and creates new object
readFromSocket
{ "repo_name": "bozanfaruk/JClonerRep", "path": "JCloner/src/jcloner/SocketBasedCloner.java", "license": "gpl-3.0", "size": 4696 }
[ "java.io.ByteArrayInputStream", "java.io.DataInputStream", "java.io.IOException", "java.io.ObjectInputStream" ]
import java.io.ByteArrayInputStream; import java.io.DataInputStream; import java.io.IOException; import java.io.ObjectInputStream;
import java.io.*;
[ "java.io" ]
java.io;
126,468
@Test public void testBasicConditionalMergeScenarios() throws Exception { @Cleanup TestContext context = createContext(); context.container.startAsync().awaitRunning(); final String parentSegment = "parentSegment"; // This will be the attribute update to execute against ...
void function() throws Exception { TestContext context = createContext(); context.container.startAsync().awaitRunning(); final String parentSegment = STR; Function<String, AttributeUpdateCollection> attributeUpdateForTxn = txnName -> AttributeUpdateCollection.from( new AttributeUpdate(AttributeId.fromUUID(UUID.nameUUID...
/** * Test in detail the basic situations that a conditional segment merge can face. */
Test in detail the basic situations that a conditional segment merge can face
testBasicConditionalMergeScenarios
{ "repo_name": "pravega/pravega", "path": "segmentstore/server/src/test/java/io/pravega/segmentstore/server/containers/StreamSegmentContainerTests.java", "license": "apache-2.0", "size": 197112 }
[ "io.pravega.segmentstore.contracts.AttributeId", "io.pravega.segmentstore.contracts.AttributeUpdate", "io.pravega.segmentstore.contracts.AttributeUpdateCollection", "io.pravega.segmentstore.contracts.AttributeUpdateType", "io.pravega.segmentstore.contracts.Attributes", "io.pravega.segmentstore.contracts.B...
import io.pravega.segmentstore.contracts.AttributeId; import io.pravega.segmentstore.contracts.AttributeUpdate; import io.pravega.segmentstore.contracts.AttributeUpdateCollection; import io.pravega.segmentstore.contracts.AttributeUpdateType; import io.pravega.segmentstore.contracts.Attributes; import io.pravega.segment...
import io.pravega.segmentstore.contracts.*; import io.pravega.shared.*; import io.pravega.test.common.*; import java.util.*; import java.util.concurrent.*; import java.util.function.*; import org.junit.*;
[ "io.pravega.segmentstore", "io.pravega.shared", "io.pravega.test", "java.util", "org.junit" ]
io.pravega.segmentstore; io.pravega.shared; io.pravega.test; java.util; org.junit;
807,604
int indexId = cursor.getColumnIndex(PodDBAdapter.KEY_ID); int indexTitle = cursor.getColumnIndex(PodDBAdapter.KEY_DOWNLOADSTATUS_TITLE); int indexFeedFile = cursor.getColumnIndex(PodDBAdapter.KEY_FEEDFILE); int indexFileFileType = cursor.getColumnIndex(PodDBAdapter.KEY_FEEDFILETYPE); int...
int indexId = cursor.getColumnIndex(PodDBAdapter.KEY_ID); int indexTitle = cursor.getColumnIndex(PodDBAdapter.KEY_DOWNLOADSTATUS_TITLE); int indexFeedFile = cursor.getColumnIndex(PodDBAdapter.KEY_FEEDFILE); int indexFileFileType = cursor.getColumnIndex(PodDBAdapter.KEY_FEEDFILETYPE); int indexSuccessful = cursor.getCol...
/** * Create a {@link DownloadStatus} instance from a database row (cursor). */
Create a <code>DownloadStatus</code> instance from a database row (cursor)
convert
{ "repo_name": "AntennaPod/AntennaPod", "path": "storage/database/src/main/java/de/danoeh/antennapod/storage/database/mapper/DownloadStatusCursorMapper.java", "license": "gpl-3.0", "size": 1699 }
[ "de.danoeh.antennapod.model.download.DownloadError", "de.danoeh.antennapod.model.download.DownloadStatus", "de.danoeh.antennapod.storage.database.PodDBAdapter", "java.util.Date" ]
import de.danoeh.antennapod.model.download.DownloadError; import de.danoeh.antennapod.model.download.DownloadStatus; import de.danoeh.antennapod.storage.database.PodDBAdapter; import java.util.Date;
import de.danoeh.antennapod.model.download.*; import de.danoeh.antennapod.storage.database.*; import java.util.*;
[ "de.danoeh.antennapod", "java.util" ]
de.danoeh.antennapod; java.util;
2,406,747
private void loadProperties() { RMConfig.get().load(ConfigReader.readPropertiesFromFile(getServletContext().getRealPath(RMConfig.CONFIG_PATH))); ConfigUtils.loadSystemProperties(RMConfig.get()); }
void function() { RMConfig.get().load(ConfigReader.readPropertiesFromFile(getServletContext().getRealPath(RMConfig.CONFIG_PATH))); ConfigUtils.loadSystemProperties(RMConfig.get()); }
/** * Loads properties defined in the configuration file and in JVM arguments. */
Loads properties defined in the configuration file and in JVM arguments
loadProperties
{ "repo_name": "lpellegr/scheduling-portal", "path": "rm-portal/src/main/java/org/ow2/proactive_grid_cloud_portal/rm/server/RMServiceImpl.java", "license": "agpl-3.0", "size": 21194 }
[ "org.ow2.proactive_grid_cloud_portal.common.server.ConfigReader", "org.ow2.proactive_grid_cloud_portal.common.server.ConfigUtils", "org.ow2.proactive_grid_cloud_portal.rm.shared.RMConfig" ]
import org.ow2.proactive_grid_cloud_portal.common.server.ConfigReader; import org.ow2.proactive_grid_cloud_portal.common.server.ConfigUtils; import org.ow2.proactive_grid_cloud_portal.rm.shared.RMConfig;
import org.ow2.proactive_grid_cloud_portal.common.server.*; import org.ow2.proactive_grid_cloud_portal.rm.shared.*;
[ "org.ow2.proactive_grid_cloud_portal" ]
org.ow2.proactive_grid_cloud_portal;
451,869
public static final void changeCaretPosition( final TextKit textKit, final int newPos, final boolean isMovingCaret, final Position.Bias newBias) { TextCaret caret = textKit.getCaret(); Point pt = caret.getMagicCaretPosition(); if (isMovingCaret) { c...
static final void function( final TextKit textKit, final int newPos, final boolean isMovingCaret, final Position.Bias newBias) { TextCaret caret = textKit.getCaret(); Point pt = caret.getMagicCaretPosition(); if (isMovingCaret) { caret.moveDot(newPos, newBias); } else { caret.setDot(newPos, newBias); } caret.setMagicCa...
/** * Sets new value to dot or mark of the given component caret * depending on <code>isMovingCaret</code> value */
Sets new value to dot or mark of the given component caret depending on <code>isMovingCaret</code> value
changeCaretPosition
{ "repo_name": "skyHALud/codenameone", "path": "Ports/iOSPort/xmlvm/apache-harmony-6.0-src-r991881/classlib/modules/awt/src/main/java/common/org/apache/harmony/awt/text/TextUtils.java", "license": "gpl-2.0", "size": 45419 }
[ "java.awt.Point", "javax.swing.text.Position" ]
import java.awt.Point; import javax.swing.text.Position;
import java.awt.*; import javax.swing.text.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
158,422
boolean isDirectCallNodeReplacementPossible(Node fnNode) { // Only inline single-statement functions Node block = NodeUtil.getFunctionBody(fnNode); // Check if this function is suitable for direct replacement of a CALL node: // a function that consists of single return that returns an expression. ...
boolean isDirectCallNodeReplacementPossible(Node fnNode) { Node block = NodeUtil.getFunctionBody(fnNode); if (!block.hasChildren()) { return true; } else if (block.hasOneChild()) { if (block.getFirstChild().isReturn() && block.getFirstChild().getFirstChild() != null) { return true; } } return false; } enum CanInlineRes...
/** * Checks if the given function matches the criteria for an inlinable * function, and if so, adds it to our set of inlinable functions. */
Checks if the given function matches the criteria for an inlinable function, and if so, adds it to our set of inlinable functions
isDirectCallNodeReplacementPossible
{ "repo_name": "bramstein/closure-compiler-inline", "path": "src/com/google/javascript/jscomp/FunctionInjector.java", "license": "apache-2.0", "size": 32725 }
[ "com.google.javascript.rhino.Node" ]
import com.google.javascript.rhino.Node;
import com.google.javascript.rhino.*;
[ "com.google.javascript" ]
com.google.javascript;
2,850,886
private static String getGwtTestSdkPath() { Bundle bundle = GwtTestingPlugin.getDefault().getBundle(); // Maven compile uses a jar, and is in target String basePath = Paths.get("").toAbsolutePath().toString(); if (basePath.endsWith("target")) { basePath = basePath.replace("target/", ""); } ...
static String function() { Bundle bundle = GwtTestingPlugin.getDefault().getBundle(); String basePath = Paths.get(STRtargetSTRtarget/STRSTRgwt.versionSTR/../../resources/target/resources/gwt-STR.zip"; String gwtHomePath = TestEnvironmentUtil.installTestSdk(bundle, pathToZip).toOSString(); return gwtHomePath; }
/** * Get the gwt zip path. */
Get the gwt zip path
getGwtTestSdkPath
{ "repo_name": "gwt-plugins/gwt-eclipse-plugin", "path": "plugins/com.gwtplugins.gwt.eclipse.testing/src/com/google/gwt/eclipse/testing/GwtRuntimeTestUtilities.java", "license": "epl-1.0", "size": 4952 }
[ "com.google.gcp.eclipse.testing.TestEnvironmentUtil", "java.nio.file.Paths", "org.osgi.framework.Bundle" ]
import com.google.gcp.eclipse.testing.TestEnvironmentUtil; import java.nio.file.Paths; import org.osgi.framework.Bundle;
import com.google.gcp.eclipse.testing.*; import java.nio.file.*; import org.osgi.framework.*;
[ "com.google.gcp", "java.nio", "org.osgi.framework" ]
com.google.gcp; java.nio; org.osgi.framework;
201,419
public String formatMessage(String par1Str, Object[] par2ArrayOfObj) { String var3 = this.translateKeyPrivate(par1Str); try { return String.format(var3, par2ArrayOfObj); } catch (IllegalFormatException var5) { return "Format error: " + var...
String function(String par1Str, Object[] par2ArrayOfObj) { String var3 = this.translateKeyPrivate(par1Str); try { return String.format(var3, par2ArrayOfObj); } catch (IllegalFormatException var5) { return STR + var3; } }
/** * Calls String.format(translateKey(key), params) */
Calls String.format(translateKey(key), params)
formatMessage
{ "repo_name": "LolololTrololol/InsertNameHere", "path": "minecraft/net/minecraft/src/Locale.java", "license": "gpl-2.0", "size": 4275 }
[ "java.util.IllegalFormatException" ]
import java.util.IllegalFormatException;
import java.util.*;
[ "java.util" ]
java.util;
458,719
public void newClusteringSchema( TransMeta transMeta ) { ClusterSchema clusterSchema = new ClusterSchema(); ClusterSchemaDialog dialog = new ClusterSchemaDialog( shell, clusterSchema, transMeta.getSlaveServers() ); if ( dialog.open() ) { transMeta.getClusterSchemas().add( clusterSchema ); if...
void function( TransMeta transMeta ) { ClusterSchema clusterSchema = new ClusterSchema(); ClusterSchemaDialog dialog = new ClusterSchemaDialog( shell, clusterSchema, transMeta.getSlaveServers() ); if ( dialog.open() ) { transMeta.getClusterSchemas().add( clusterSchema ); if ( rep != null ) { try { if ( !rep.getSecurity...
/** * This creates a new clustering schema, edits it and adds it to the transformation metadata * */
This creates a new clustering schema, edits it and adds it to the transformation metadata
newClusteringSchema
{ "repo_name": "tgf/pentaho-kettle", "path": "ui/src/org/pentaho/di/ui/spoon/Spoon.java", "license": "apache-2.0", "size": 340257 }
[ "org.pentaho.di.cluster.ClusterSchema", "org.pentaho.di.core.Const", "org.pentaho.di.core.exception.KettleException", "org.pentaho.di.i18n.BaseMessages", "org.pentaho.di.trans.TransMeta", "org.pentaho.di.ui.cluster.dialog.ClusterSchemaDialog", "org.pentaho.di.ui.core.dialog.ErrorDialog" ]
import org.pentaho.di.cluster.ClusterSchema; import org.pentaho.di.core.Const; import org.pentaho.di.core.exception.KettleException; import org.pentaho.di.i18n.BaseMessages; import org.pentaho.di.trans.TransMeta; import org.pentaho.di.ui.cluster.dialog.ClusterSchemaDialog; import org.pentaho.di.ui.core.dialog.ErrorDial...
import org.pentaho.di.cluster.*; import org.pentaho.di.core.*; import org.pentaho.di.core.exception.*; import org.pentaho.di.i18n.*; import org.pentaho.di.trans.*; import org.pentaho.di.ui.cluster.dialog.*; import org.pentaho.di.ui.core.dialog.*;
[ "org.pentaho.di" ]
org.pentaho.di;
1,276,781
public QueueInfo[] getChildQueues(String queueName) throws IOException, InterruptedException;
QueueInfo[] function(String queueName) throws IOException, InterruptedException;
/** * Returns immediate children of queueName. * @param queueName * @return array of JobQueueInfo which are children of queueName * @throws IOException */
Returns immediate children of queueName
getChildQueues
{ "repo_name": "Reidddddd/mo-hadoop2.6.0", "path": "hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/protocol/ClientProtocol.java", "license": "apache-2.0", "size": 14483 }
[ "java.io.IOException", "org.apache.hadoop.mapreduce.QueueInfo" ]
import java.io.IOException; import org.apache.hadoop.mapreduce.QueueInfo;
import java.io.*; import org.apache.hadoop.mapreduce.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
2,901,021
void setAllowedFeatureOfInterestTypeForOffering(String offering, Collection<String> allowedFeatureOfInterestTypes);
void setAllowedFeatureOfInterestTypeForOffering(String offering, Collection<String> allowedFeatureOfInterestTypes);
/** * Sets the allowed featureOfInterest types for the specified offering. * * @param offering * the offering * @param allowedFeatureOfInterestTypes * the allowed featureOfInterest types */
Sets the allowed featureOfInterest types for the specified offering
setAllowedFeatureOfInterestTypeForOffering
{ "repo_name": "nuest/SOS", "path": "core/api/src/main/java/org/n52/sos/cache/WritableContentCache.java", "license": "gpl-2.0", "size": 46330 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
1,630,685
public void setDefaultFocusTraversalPolicy (FocusTraversalPolicy policy) { if (policy == null) throw new IllegalArgumentException (); firePropertyChange ("defaultFocusTraversalPolicy", defaultPolicy, policy); defaultPolicy = policy; }
void function (FocusTraversalPolicy policy) { if (policy == null) throw new IllegalArgumentException (); firePropertyChange (STR, defaultPolicy, policy); defaultPolicy = policy; }
/** * Set the {@link FocusTraversalPolicy} returned by {@link * #getDefaultFocusTraversalPolicy}. Focus-managing {@link * Container}s created after this call will use policy as their * initial focus traversal policy. Existing {@link Container}s' * focus traversal policies will not be affected by calls ...
Set the <code>FocusTraversalPolicy</code> returned by <code>#getDefaultFocusTraversalPolicy</code>. Focus-managing <code>Container</code>s created after this call will use policy as their initial focus traversal policy. Existing <code>Container</code>s' focus traversal policies will not be affected by calls to this met...
setDefaultFocusTraversalPolicy
{ "repo_name": "SanDisk-Open-Source/SSD_Dashboard", "path": "uefi/gcc/gcc-4.6.3/libjava/classpath/java/awt/KeyboardFocusManager.java", "license": "gpl-2.0", "size": 56829 }
[ "java.awt.FocusTraversalPolicy" ]
import java.awt.FocusTraversalPolicy;
import java.awt.*;
[ "java.awt" ]
java.awt;
400,193
@RolesAllowed("user") @Transactional(readOnly = true) public Map<Long, Set<IObject>> loadTagContent(@NotNull @Validate(Long.class) Set<Long> tagIds, Parameters options) { Map<Long, Set<IObject>> m = new HashMap<Long, Set<IObject>>(); Iterator<Long> i = tagIds.iterator(); Long id; while (i.ha...
@RolesAllowed("user") @Transactional(readOnly = true) Map<Long, Set<IObject>> function(@NotNull @Validate(Long.class) Set<Long> tagIds, Parameters options) { Map<Long, Set<IObject>> m = new HashMap<Long, Set<IObject>>(); Iterator<Long> i = tagIds.iterator(); Long id; while (i.hasNext()) { id = i.next(); m.put(id, loadO...
/** * Implemented as specified by the {@link IMetadata} I/F * @see IMetadata#loadTagContent(Set, Parameters) */
Implemented as specified by the <code>IMetadata</code> I/F
loadTagContent
{ "repo_name": "stelfrich/openmicroscopy", "path": "components/server/src/ome/logic/MetadataImpl.java", "license": "gpl-2.0", "size": 40215 }
[ "java.util.HashMap", "java.util.Iterator", "java.util.Map", "java.util.Set", "org.springframework.transaction.annotation.Transactional" ]
import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.Set; import org.springframework.transaction.annotation.Transactional;
import java.util.*; import org.springframework.transaction.annotation.*;
[ "java.util", "org.springframework.transaction" ]
java.util; org.springframework.transaction;
1,110,416
private void addPaper() { // Setup AlertDialog for name request AlertDialog.Builder alert = new AlertDialog.Builder(this); alert.setTitle(R.string.add_paper); alert.setMessage(R.string.enter_paper_name); // Set an EditText view to get user input final EditText input = new EditText(this); alert.setView...
void function() { AlertDialog.Builder alert = new AlertDialog.Builder(this); alert.setTitle(R.string.add_paper); alert.setMessage(R.string.enter_paper_name); final EditText input = new EditText(this); alert.setView(input);
/** * This method will ask the user for a paper name and afterwards create the * new paper. */
This method will ask the user for a paper name and afterwards create the new paper
addPaper
{ "repo_name": "wessnerj/paperLess", "path": "src/de/meetr/hdr/paperless/activity/StartActivity.java", "license": "agpl-3.0", "size": 14017 }
[ "android.app.AlertDialog", "android.widget.EditText" ]
import android.app.AlertDialog; import android.widget.EditText;
import android.app.*; import android.widget.*;
[ "android.app", "android.widget" ]
android.app; android.widget;
1,624,952
@SuppressWarnings("unchecked") void storeLiteral( Object thing ) throws JSONException { try { if ( currentObject instanceof ArrayList ) { ((ArrayList)currentObject).add( thing ); } else if ( currentObject instanceof JSONDocument...
@SuppressWarnings(STR) void storeLiteral( Object thing ) throws JSONException { try { if ( currentObject instanceof ArrayList ) { ((ArrayList)currentObject).add( thing ); } else if ( currentObject instanceof JSONDocument ) { ((JSONDocument)currentObject).put(currentKey.toString(), thing); currentKey = null; } currentVa...
/** * Store a literal object * @param thing the thing to store * @throws JSONException */
Store a literal object
storeLiteral
{ "repo_name": "AustESE-Infrastructure/calliope", "path": "src/calliope/json/corcode/ProgressiveParser.java", "license": "gpl-2.0", "size": 26089 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
2,745,223
private synchronized IpAddress findOrCreateIpAddress(final NewsArticle article, final Session session) { // If user is new, then location might be too IpAddress ip = (IpAddress) this.findByKey(article.getPostingHost(), session, IpAddress.class); if (null == ip) { ip = new IpAddress(artic...
synchronized IpAddress function(final NewsArticle article, final Session session) { IpAddress ip = (IpAddress) this.findByKey(article.getPostingHost(), session, IpAddress.class); if (null == ip) { ip = new IpAddress(article.getPostingHost(), null); session.saveOrUpdate(ip); } return ip; }
/** * Find or create ip address. * * @param article * the article * @param session * the session * @return the ip address */
Find or create ip address
findOrCreateIpAddress
{ "repo_name": "leonarduk/unison", "path": "src/main/java/uk/co/sleonard/unison/datahandling/HibernateHelper.java", "license": "apache-2.0", "size": 24694 }
[ "org.hibernate.Session", "uk.co.sleonard.unison.datahandling.DAO", "uk.co.sleonard.unison.input.NewsArticle" ]
import org.hibernate.Session; import uk.co.sleonard.unison.datahandling.DAO; import uk.co.sleonard.unison.input.NewsArticle;
import org.hibernate.*; import uk.co.sleonard.unison.datahandling.*; import uk.co.sleonard.unison.input.*;
[ "org.hibernate", "uk.co.sleonard" ]
org.hibernate; uk.co.sleonard;
187,241
public ServiceFuture<ServiceEndpointPolicyInner> createOrUpdateAsync(String resourceGroupName, String serviceEndpointPolicyName, ServiceEndpointPolicyInner parameters, final ServiceCallback<ServiceEndpointPolicyInner> serviceCallback) { return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsyn...
ServiceFuture<ServiceEndpointPolicyInner> function(String resourceGroupName, String serviceEndpointPolicyName, ServiceEndpointPolicyInner parameters, final ServiceCallback<ServiceEndpointPolicyInner> serviceCallback) { return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceEn...
/** * Creates or updates a service Endpoint Policies. * * @param resourceGroupName The name of the resource group. * @param serviceEndpointPolicyName The name of the service endpoint policy. * @param parameters Parameters supplied to the create or update service endpoint policy operation. ...
Creates or updates a service Endpoint Policies
createOrUpdateAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/ServiceEndpointPoliciesInner.java", "license": "mit", "size": 81753 }
[ "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
1,382,377
protected void createCards() { // Get information from the database final SetInfo setInfo = new SetInfo(getApplicationContext(), mTableId, mFolder); // Return to the parent activity if all cards have been hidden if (setInfo.isEmpty()) { finish(); } // Lo...
void function() { final SetInfo setInfo = new SetInfo(getApplicationContext(), mTableId, mFolder); if (setInfo.isEmpty()) { finish(); } SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(this); if (settings.getBoolean(Constants.PREF_KEY_DEFINITION, false)) { setInfo.flipCards(); } if (settings.g...
/** * Creates flashcards using a VerticalViewPager. */
Creates flashcards using a VerticalViewPager
createCards
{ "repo_name": "ericfabreu/WearFlashcards", "path": "Mobile/src/main/java/com/ericfabreu/wearflashcards/activities/StudyActivity.java", "license": "mit", "size": 6068 }
[ "android.content.SharedPreferences", "android.preference.PreferenceManager", "android.view.View", "com.ericfabreu.wearflashcards.adapters.StudyAdapter", "com.ericfabreu.wearflashcards.utils.Constants", "com.ericfabreu.wearflashcards.utils.SetInfo" ]
import android.content.SharedPreferences; import android.preference.PreferenceManager; import android.view.View; import com.ericfabreu.wearflashcards.adapters.StudyAdapter; import com.ericfabreu.wearflashcards.utils.Constants; import com.ericfabreu.wearflashcards.utils.SetInfo;
import android.content.*; import android.preference.*; import android.view.*; import com.ericfabreu.wearflashcards.adapters.*; import com.ericfabreu.wearflashcards.utils.*;
[ "android.content", "android.preference", "android.view", "com.ericfabreu.wearflashcards" ]
android.content; android.preference; android.view; com.ericfabreu.wearflashcards;
2,696,473
@ServiceMethod(returns = ReturnType.SINGLE) public Mono<Response<Flux<ByteBuffer>>> deleteMongoDBCollectionWithResponseAsync( String resourceGroupName, String accountName, String databaseName, String collectionName) { if (this.client.getEndpoint() == null) { return Mono ...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<Flux<ByteBuffer>>> function( String resourceGroupName, String accountName, String databaseName, String collectionName) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (this.client.getSubscriptionId() == nu...
/** * Deletes an existing Azure Cosmos DB MongoDB Collection. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param collectionName Cosmos DB co...
Deletes an existing Azure Cosmos DB MongoDB Collection
deleteMongoDBCollectionWithResponseAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/implementation/MongoDBResourcesClientImpl.java", "license": "mit", "size": 257038 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.FluxUtil", "java.nio.ByteBuffer" ]
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 java.nio.ByteBuffer;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import java.nio.*;
[ "com.azure.core", "java.nio" ]
com.azure.core; java.nio;
145,613
public Set<String> getSupportedDatatypes() { return Collections.unmodifiableSet(this.attributeMap.keySet()); }
Set<String> function() { return Collections.unmodifiableSet(this.attributeMap.keySet()); }
/** * Returns the datatype identifiers supported by this factory. * * @return a <code>Set</code> of <code>String</code>s */
Returns the datatype identifiers supported by this factory
getSupportedDatatypes
{ "repo_name": "GenericBreakGlass/GenericBreakGlass-XACML", "path": "src/com.sun.xacml/src/main/java/com/sun/xacml/attr/BaseAttributeFactory.java", "license": "apache-2.0", "size": 10681 }
[ "java.util.Collections", "java.util.Set" ]
import java.util.Collections; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,054,705
void build() { NodeTraversal.traverseTyped(compiler, scope.getRootNode(), this); AstFunctionContents contents = getFunctionAnalysisResults(scope.getRootNode()); if (contents != null) { for (String varName : contents.getEscapedVarNames()) { TypedVar v = scope.getVar(var...
void build() { NodeTraversal.traverseTyped(compiler, scope.getRootNode(), this); AstFunctionContents contents = getFunctionAnalysisResults(scope.getRootNode()); if (contents != null) { for (String varName : contents.getEscapedVarNames()) { TypedVar v = scope.getVar(varName); checkState(v.getScope() == scope); v.markEsc...
/** * Traverse the scope root and build it. */
Traverse the scope root and build it
build
{ "repo_name": "GerHobbelt/closure-compiler", "path": "src/com/google/javascript/jscomp/TypedScopeCreator.java", "license": "apache-2.0", "size": 81651 }
[ "com.google.common.base.Preconditions", "com.google.common.collect.Multiset", "com.google.javascript.jscomp.FunctionTypeBuilder" ]
import com.google.common.base.Preconditions; import com.google.common.collect.Multiset; import com.google.javascript.jscomp.FunctionTypeBuilder;
import com.google.common.base.*; import com.google.common.collect.*; import com.google.javascript.jscomp.*;
[ "com.google.common", "com.google.javascript" ]
com.google.common; com.google.javascript;
981,596