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
protected AuthnRequest retrieveSamlAuthenticationRequestFromHttpRequest(final HttpServletRequest request, final HttpServletResponse response) throws Exception { LOGGER.debug("Retrieving authentication request from scope"); v...
AuthnRequest function(final HttpServletRequest request, final HttpServletResponse response) throws Exception { LOGGER.debug(STR); val context = new JEEContext(request, response); val requestValue = samlProfileHandlerConfigurationContext.getSessionStore() .get(context, SamlProtocolConstants.PARAMETER_SAML_REQUEST).orEls...
/** * Retrieve authn request authn request. * * @param request the request * @param response the response * @return the authn request * @throws Exception the exception */
Retrieve authn request authn request
retrieveSamlAuthenticationRequestFromHttpRequest
{ "repo_name": "pdrados/cas", "path": "support/cas-server-support-saml-idp-web/src/main/java/org/apereo/cas/support/saml/web/idp/profile/AbstractSamlIdPProfileHandlerController.java", "license": "apache-2.0", "size": 23741 }
[ "java.io.ByteArrayInputStream", "java.nio.charset.StandardCharsets", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse", "org.apache.commons.lang3.StringUtils", "org.apereo.cas.support.saml.SamlProtocolConstants", "org.apereo.cas.util.EncodingUtils", "org.opensaml.core.x...
import java.io.ByteArrayInputStream; import java.nio.charset.StandardCharsets; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.lang3.StringUtils; import org.apereo.cas.support.saml.SamlProtocolConstants; import org.apereo.cas.util.EncodingUtils; imp...
import java.io.*; import java.nio.charset.*; import javax.servlet.http.*; import org.apache.commons.lang3.*; import org.apereo.cas.support.saml.*; import org.apereo.cas.util.*; import org.opensaml.core.xml.util.*; import org.opensaml.saml.saml2.core.*; import org.pac4j.core.context.*;
[ "java.io", "java.nio", "javax.servlet", "org.apache.commons", "org.apereo.cas", "org.opensaml.core", "org.opensaml.saml", "org.pac4j.core" ]
java.io; java.nio; javax.servlet; org.apache.commons; org.apereo.cas; org.opensaml.core; org.opensaml.saml; org.pac4j.core;
2,414,770
public void removeSlot(int slot) { Validate.isTrue(slot >= 0 && slot < slots.length); slots[slot] = null; }
void function(int slot) { Validate.isTrue(slot >= 0 && slot < slots.length); slots[slot] = null; }
/** * Clears a slot * @param slot The slot to change. */
Clears a slot
removeSlot
{ "repo_name": "Razz0991/BuildTools", "path": "src/main/java/au/com/mineauz/buildtools/menu/MenuPageInventory.java", "license": "lgpl-3.0", "size": 1654 }
[ "org.apache.commons.lang.Validate" ]
import org.apache.commons.lang.Validate;
import org.apache.commons.lang.*;
[ "org.apache.commons" ]
org.apache.commons;
2,601,510
public void restoreHierarchyState(SparseArray<Parcelable> container) { dispatchRestoreInstanceState(container); }
void function(SparseArray<Parcelable> container) { dispatchRestoreInstanceState(container); }
/** * Restore this view hierarchy's frozen state from the given container. * * @param container The SparseArray which holds previously frozen states. * * @see #saveHierarchyState * @see #dispatchRestoreInstanceState * @see #onRestoreInstanceState */
Restore this view hierarchy's frozen state from the given container
restoreHierarchyState
{ "repo_name": "mateor/PDroidHistory", "path": "frameworks/base/core/java/android/view/View.java", "license": "gpl-3.0", "size": 347830 }
[ "android.os.Parcelable", "android.util.SparseArray" ]
import android.os.Parcelable; import android.util.SparseArray;
import android.os.*; import android.util.*;
[ "android.os", "android.util" ]
android.os; android.util;
251,966
private static void setupPropertyEncryption() { // get/set the current encryption key Encryptor keyEncryptor = new AesEncryptor(); String encryptedKey = securityProperties.getProperty(ENCRYPTION_KEY_CURRENT); if (encryptedKey == null || encryptedKey.isEmpty()) { currentKey = null; ...
static void function() { Encryptor keyEncryptor = new AesEncryptor(); String encryptedKey = securityProperties.getProperty(ENCRYPTION_KEY_CURRENT); if (encryptedKey == null encryptedKey.isEmpty()) { currentKey = null; } else { currentKey = keyEncryptor.decrypt(encryptedKey); } String newKey = securityProperties.getProp...
/** * Setup the property encryption key, rewriting encrypted values as appropriate */
Setup the property encryption key, rewriting encrypted values as appropriate
setupPropertyEncryption
{ "repo_name": "trimnguye/JavaChatServer", "path": "src/java/org/jivesoftware/util/JiveGlobals.java", "license": "apache-2.0", "size": 42411 }
[ "java.util.HashMap", "java.util.Map" ]
import java.util.HashMap; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
193,701
FileItemStream next() throws FileUploadException, IOException;
FileItemStream next() throws FileUploadException, IOException;
/** * Returns the next available {@link FileItemStream}. * * @throws java.util.NoSuchElementException * No more items are available. Use {@link #hasNext()} to prevent this exception. * @throws FileUploadException * Parsing or processing the file item failed. * @throws IOException ...
Returns the next available <code>FileItemStream</code>
next
{ "repo_name": "Servoy/wicket", "path": "wicket/src/main/java/org/apache/wicket/util/upload/FileItemIterator.java", "license": "apache-2.0", "size": 1927 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
499,770
private Map<String, String> findChildProjectDashboards() { // Get the DashboardTask for all child projects of this task's project. Collection<DashboardTask> aChildTasks = getProject() .getChildProjects() .values() .stream() ...
Map<String, String> function() { Collection<DashboardTask> aChildTasks = getProject() .getChildProjects() .values() .stream() .map(p -> Projects.getTask(p, TASK_NAME, DashboardTask.class)) .filter(Objects::nonNull) .collect(Collectors.toList()); if (aChildTasks.isEmpty()) return Collections.emptyMap(); Map<String, Stri...
/** * Find all child projects that have a {@code DashboardTask} and return a mapping from the * project name to the path of the dashboard report. * * @return The child projects with dashboard reports, or an empty map if the task's project has * no child projects with a {@code Dashboar...
Find all child projects that have a DashboardTask and return a mapping from the project name to the path of the dashboard report
findChildProjectDashboards
{ "repo_name": "handmadecode/quill", "path": "src/main/java/org/myire/quill/dashboard/DashboardTask.java", "license": "apache-2.0", "size": 14155 }
[ "java.io.Serializable", "java.nio.file.Path", "java.util.Collection", "java.util.Collections", "java.util.HashMap", "java.util.Map", "java.util.Objects", "java.util.stream.Collectors", "org.myire.quill.common.Projects", "org.myire.quill.report.Reports" ]
import java.io.Serializable; import java.nio.file.Path; import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Objects; import java.util.stream.Collectors; import org.myire.quill.common.Projects; import org.myire.quill.report.Reports;
import java.io.*; import java.nio.file.*; import java.util.*; import java.util.stream.*; import org.myire.quill.common.*; import org.myire.quill.report.*;
[ "java.io", "java.nio", "java.util", "org.myire.quill" ]
java.io; java.nio; java.util; org.myire.quill;
1,969,066
@ApiModelProperty(required = true, value = "The ID of the document.") public String getDocumentId() { return documentId; }
@ApiModelProperty(required = true, value = STR) String function() { return documentId; }
/** * The ID of the document. * @return documentId **/
The ID of the document
getDocumentId
{ "repo_name": "GenesysPureEngage/workspace-client-java", "path": "src/main/java/com/genesys/internal/workspace/model/MediamediatypeinteractionsidadddocumentData.java", "license": "mit", "size": 4285 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
201,264
public static List<Radian> calculateCirclePoints(final double aLatitude, final double aLongitude, final double aRadius) { double r = (aRadius / (EARTH_RADIUS * Math.cos(aLatitude * RAD))) / RAD; final CartesianPoint vec = CartesianPoint.fromRadian(new Radian(aLatitude, aLongitude)); final CartesianPoint pt ...
static List<Radian> function(final double aLatitude, final double aLongitude, final double aRadius) { double r = (aRadius / (EARTH_RADIUS * Math.cos(aLatitude * RAD))) / RAD; final CartesianPoint vec = CartesianPoint.fromRadian(new Radian(aLatitude, aLongitude)); final CartesianPoint pt = CartesianPoint.fromRadian(new ...
/** * Calculate points that form a circle with the given radius around the * given position on the surface of the earth * * @param aLatitude * The position's latitude * @param aLongitude * The position's longitude * @param aRadius * The radius in meters * @return A ...
Calculate points that form a circle with the given radius around the given position on the surface of the earth
calculateCirclePoints
{ "repo_name": "joachimeichborn/GeoTag", "path": "GeoTag/src/main/java/joachimeichborn/geotag/io/writer/kml/CirclePolygon.java", "license": "gpl-3.0", "size": 8806 }
[ "java.util.LinkedList", "java.util.List" ]
import java.util.LinkedList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
496,085
private static void writeClientConnectorConfiguration(BinaryRawWriter w, ClientConnectorConfiguration cfg) { assert w != null; if (cfg != null) { w.writeBoolean(true); w.writeString(cfg.getHost()); w.writeInt(cfg.getPort()); w.writeInt(cfg.getPortRan...
static void function(BinaryRawWriter w, ClientConnectorConfiguration cfg) { assert w != null; if (cfg != null) { w.writeBoolean(true); w.writeString(cfg.getHost()); w.writeInt(cfg.getPort()); w.writeInt(cfg.getPortRange()); w.writeInt(cfg.getSocketSendBufferSize()); w.writeInt(cfg.getSocketReceiveBufferSize()); w.write...
/** * Writes the client connector configuration. * * @param w Writer. */
Writes the client connector configuration
writeClientConnectorConfiguration
{ "repo_name": "amirakhmedov/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java", "license": "apache-2.0", "size": 75809 }
[ "org.apache.ignite.binary.BinaryRawWriter", "org.apache.ignite.configuration.ClientConnectorConfiguration" ]
import org.apache.ignite.binary.BinaryRawWriter; import org.apache.ignite.configuration.ClientConnectorConfiguration;
import org.apache.ignite.binary.*; import org.apache.ignite.configuration.*;
[ "org.apache.ignite" ]
org.apache.ignite;
1,361,349
public List<NodeIdAndType> getChildren(String parentId, long limit, long offset);
List<NodeIdAndType> function(String parentId, long limit, long offset);
/** * A single page of IDs and types for a given parentIds. * * @param parentId * @param limit * @param offset * @return */
A single page of IDs and types for a given parentIds
getChildren
{ "repo_name": "zimingd/Synapse-Repository-Services", "path": "lib/models/src/main/java/org/sagebionetworks/repo/model/NodeDAO.java", "license": "apache-2.0", "size": 20217 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,595,308
private static String readAddressFromInterface(final String interfaceName) { try { final String filePath = "/sys/class/net/" + interfaceName + "/address"; final StringBuilder fileData = new StringBuilder(1000); final BufferedReader reader = new BufferedReader(new FileRead...
static String function(final String interfaceName) { try { final String filePath = STR + interfaceName + STR; final StringBuilder fileData = new StringBuilder(1000); final BufferedReader reader = new BufferedReader(new FileReader(filePath), 1024); final char[] buf = new char[1024]; int numRead; String readData; while (...
/** * Read MAC address without requiring the ACCESS_WIFI_STATE permission. * @param interfaceName * @return */
Read MAC address without requiring the ACCESS_WIFI_STATE permission
readAddressFromInterface
{ "repo_name": "mpire-nxus/nxus_android_sdk", "path": "library/src/main/java/com/nxus/measurement/utils/NetworkUtils.java", "license": "mit", "size": 6121 }
[ "java.io.BufferedReader", "java.io.FileReader", "java.io.IOException" ]
import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
773,422
public StraightLine2D parallel(Point2D point) { return new LineSegment2D(p1, p2).parallel(point); }
StraightLine2D function(Point2D point) { return new LineSegment2D(p1, p2).parallel(point); }
/** * Creates a straight line parallel to this object, and passing through the * given point. * * @param point * the point to go through * @return the parallel through the point */
Creates a straight line parallel to this object, and passing through the given point
parallel
{ "repo_name": "pokowaka/android-geom", "path": "geom/src/main/java/math/geom2d/line/Line2D.java", "license": "lgpl-2.1", "size": 21812 }
[ "math.geom2d.Point2D" ]
import math.geom2d.Point2D;
import math.geom2d.*;
[ "math.geom2d" ]
math.geom2d;
2,604,807
public static <T> T splitEachLine(CharSequence self, CharSequence regex, @ClosureParams(value=FromString.class,options={"List<String>","String[]"},conflictResolutionStrategy=PickFirstResolver.class) Closure<T> closure) throws IOException { return splitEachLine(self, Pattern.compile(regex.toString()), closur...
static <T> T function(CharSequence self, CharSequence regex, @ClosureParams(value=FromString.class,options={STR,STR},conflictResolutionStrategy=PickFirstResolver.class) Closure<T> closure) throws IOException { return splitEachLine(self, Pattern.compile(regex.toString()), closure); }
/** * Iterates through the given CharSequence line by line, splitting each line using * the given regex delimiter. The list of tokens for each line is then passed to * the given closure. * * @param self a CharSequence * @param regex the delimiting regular expression * @param clo...
Iterates through the given CharSequence line by line, splitting each line using the given regex delimiter. The list of tokens for each line is then passed to the given closure
splitEachLine
{ "repo_name": "bsideup/incubator-groovy", "path": "src/main/org/codehaus/groovy/runtime/StringGroovyMethods.java", "license": "apache-2.0", "size": 141076 }
[ "groovy.lang.Closure", "groovy.transform.stc.ClosureParams", "groovy.transform.stc.FromString", "groovy.transform.stc.PickFirstResolver", "java.io.IOException", "java.util.regex.Pattern" ]
import groovy.lang.Closure; import groovy.transform.stc.ClosureParams; import groovy.transform.stc.FromString; import groovy.transform.stc.PickFirstResolver; import java.io.IOException; import java.util.regex.Pattern;
import groovy.lang.*; import groovy.transform.stc.*; import java.io.*; import java.util.regex.*;
[ "groovy.lang", "groovy.transform.stc", "java.io", "java.util" ]
groovy.lang; groovy.transform.stc; java.io; java.util;
2,264,742
private Result pMultiplicativeOperator(final int yyStart) throws IOException { Result yyResult; String yyValue; ParseError yyError = ParseError.DUMMY; // Alternative <Times>. yyResult = pSymbol(yyStart); if (yyResult.hasValue("*")) { yyValue = "*"; return yyResult....
Result function(final int yyStart) throws IOException { Result yyResult; String yyValue; ParseError yyError = ParseError.DUMMY; yyResult = pSymbol(yyStart); if (yyResult.hasValue("*")) { yyValue = "*"; return yyResult.createValue(yyValue, yyError); } yyResult = pSymbol(yyStart); if (yyResult.hasValue("/")) { yyValue = ...
/** * Parse nonterminal xtc.lang.JavaFive.MultiplicativeOperator. * * @param yyStart The index. * @return The result. * @throws IOException Signals an I/O error. */
Parse nonterminal xtc.lang.JavaFive.MultiplicativeOperator
pMultiplicativeOperator
{ "repo_name": "wandoulabs/xtc-rats", "path": "xtc-core/src/main/java/xtc/lang/JavaFiveParser.java", "license": "lgpl-2.1", "size": 313913 }
[ "java.io.IOException", "xtc.parser.ParseError", "xtc.parser.Result" ]
import java.io.IOException; import xtc.parser.ParseError; import xtc.parser.Result;
import java.io.*; import xtc.parser.*;
[ "java.io", "xtc.parser" ]
java.io; xtc.parser;
2,746,281
public Map getSpecialOperations() { return specialOperations; }
Map function() { return specialOperations; }
/** * PUBLIC: * The special operations to use in place of <code>equal</code>. * @return A hashtable where the keys are <code>Class</code> objects and the values * are the names of operations to use for attributes of that <code>Class</code>. * @see #addSpecialOperation */
The special operations to use in place of <code>equal</code>
getSpecialOperations
{ "repo_name": "RallySoftware/eclipselink.runtime", "path": "foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/queries/QueryByExamplePolicy.java", "license": "epl-1.0", "size": 25823 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
712,515
// COMPLETE (14) Create a method called showJsonDataView to show the data and hide the error private void showJsonDataView () { // Show retrieved data mSearchResultsTextView.setVisibility(View.VISIBLE); // Hide error messages errorMessageTextView.setVisibility(View.INVISIBLE); ...
void function () { mSearchResultsTextView.setVisibility(View.VISIBLE); errorMessageTextView.setVisibility(View.INVISIBLE); }
/** * This method shows the retrieved data on the user interface while hiding any error messages * that may be present from previous usage. */
This method shows the retrieved data on the user interface while hiding any error messages that may be present from previous usage
showJsonDataView
{ "repo_name": "CHaller6/ud851-Exercises", "path": "Lesson02-GitHub-Repo-Search/T02.06-Exercise-AddPolish/app/src/main/java/com/example/android/datafrominternet/MainActivity.java", "license": "apache-2.0", "size": 5787 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
1,203,159
public void testTasksCumulativelyExceedingTTPhysicalLimits() throws Exception { // Run the test only if memory management is enabled if (!isProcfsBasedTreeAvailable()) { return; } // Start cluster with proper configuration. JobConf fConf = new JobConf(); // very small value, so ...
void function() throws Exception { if (!isProcfsBasedTreeAvailable()) { return; } JobConf fConf = new JobConf(); fConf.set(TaskMemoryManagerThread.TT_MEMORY_MANAGER_MONITORING_INTERVAL, String.valueOf(300)); LinuxResourceCalculatorPlugin memoryCalculatorPlugin = new LinuxResourceCalculatorPlugin(); long totalPhysicalMe...
/** * Test for verifying that tasks causing cumulative usage of physical memory * to go beyond TT's limit get killed. * * @throws Exception */
Test for verifying that tasks causing cumulative usage of physical memory to go beyond TT's limit get killed
testTasksCumulativelyExceedingTTPhysicalLimits
{ "repo_name": "nvoron23/hadoop-20", "path": "src/test/org/apache/hadoop/mapred/TestTaskTrackerMemoryManager.java", "license": "apache-2.0", "size": 20218 }
[ "java.util.ArrayList", "java.util.Arrays", "java.util.List", "java.util.regex.Matcher", "java.util.regex.Pattern", "org.apache.hadoop.examples.SleepJob", "org.apache.hadoop.util.LinuxResourceCalculatorPlugin" ]
import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.apache.hadoop.examples.SleepJob; import org.apache.hadoop.util.LinuxResourceCalculatorPlugin;
import java.util.*; import java.util.regex.*; import org.apache.hadoop.examples.*; import org.apache.hadoop.util.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
1,865,812
@Override public void dump( final DataOutputStream file ) throws IOException { super.dump(file); file.writeShort(exceptionIndexTable.length); for (final int index : exceptionIndexTable) { file.writeShort(index); } }
void function( final DataOutputStream file ) throws IOException { super.dump(file); file.writeShort(exceptionIndexTable.length); for (final int index : exceptionIndexTable) { file.writeShort(index); } }
/** * Dump exceptions attribute to file stream in binary format. * * @param file Output file stream * @throws IOException */
Dump exceptions attribute to file stream in binary format
dump
{ "repo_name": "apache/commons-bcel", "path": "src/main/java/org/apache/bcel/classfile/ExceptionTable.java", "license": "apache-2.0", "size": 6213 }
[ "java.io.DataOutputStream", "java.io.IOException" ]
import java.io.DataOutputStream; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,155,382
void setProcessIdForJob( @NotBlank(message = "No job id entered. Unable to set process id") final String id, final int pid ) throws GenieException;
void setProcessIdForJob( @NotBlank(message = STR) final String id, final int pid ) throws GenieException;
/** * Set the java process id that will run the given job. * * @param id The id of the job to attach the process to. * @param pid The id of the process that will run the job. * @throws GenieException if there is an error */
Set the java process id that will run the given job
setProcessIdForJob
{ "repo_name": "chen0031/genie", "path": "genie-server/src/main/java/com/netflix/genie/server/services/JobService.java", "license": "apache-2.0", "size": 10236 }
[ "com.netflix.genie.common.exceptions.GenieException", "org.hibernate.validator.constraints.NotBlank" ]
import com.netflix.genie.common.exceptions.GenieException; import org.hibernate.validator.constraints.NotBlank;
import com.netflix.genie.common.exceptions.*; import org.hibernate.validator.constraints.*;
[ "com.netflix.genie", "org.hibernate.validator" ]
com.netflix.genie; org.hibernate.validator;
2,642,369
@Test public void testJMXBeanAfterRoleChange() throws Exception { qu = new QuorumUtil(1); // create 3 servers qu.disableJMXTest = true; qu.startAll(); ZooKeeper[] zkArr = createHandles(qu); // changing a server's role / port is done by "adding" it with the same /...
void function() throws Exception { qu = new QuorumUtil(1); qu.disableJMXTest = true; qu.startAll(); ZooKeeper[] zkArr = createHandles(qu); List<String> joiningServers = new ArrayList<String>(); int changingIndex = 1; int replica2 = 2; QuorumPeer peer2 = qu.getPeer(replica2).peer; QuorumServer changingQS2 = peer2.getVie...
/** * Tests verifies the jmx attributes of local and remote peer bean - change * participant to observer role */
Tests verifies the jmx attributes of local and remote peer bean - change participant to observer role
testJMXBeanAfterRoleChange
{ "repo_name": "ervinyang/tutorial_zookeeper", "path": "zookeeper-trunk/src/java/test/org/apache/zookeeper/test/ReconfigTest.java", "license": "mit", "size": 42462 }
[ "java.util.ArrayList", "java.util.List", "org.apache.zookeeper.ZooKeeper", "org.apache.zookeeper.jmx.CommonNames", "org.apache.zookeeper.server.quorum.QuorumPeer", "org.junit.Assert" ]
import java.util.ArrayList; import java.util.List; import org.apache.zookeeper.ZooKeeper; import org.apache.zookeeper.jmx.CommonNames; import org.apache.zookeeper.server.quorum.QuorumPeer; import org.junit.Assert;
import java.util.*; import org.apache.zookeeper.*; import org.apache.zookeeper.jmx.*; import org.apache.zookeeper.server.quorum.*; import org.junit.*;
[ "java.util", "org.apache.zookeeper", "org.junit" ]
java.util; org.apache.zookeeper; org.junit;
653,070
public Set<String> listObjects(String namespace);
Set<String> function(String namespace);
/** * List all objects in given namespace. */
List all objects in given namespace
listObjects
{ "repo_name": "rockmkd/datacollector", "path": "container/src/main/java/com/streamsets/datacollector/blobstore/BlobStoreTask.java", "license": "apache-2.0", "size": 1379 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,857,822
@Nonnull static BigInteger integerComponent(@Nonnull Number number) { requireNonNull(number); if (number instanceof BigDecimal) { BigDecimal numberAsBigDecimal = (BigDecimal) number; return numberAsBigDecimal.toBigInteger(); } return toBigDecimal(number).toBigInteger(); }
static BigInteger integerComponent(@Nonnull Number number) { requireNonNull(number); if (number instanceof BigDecimal) { BigDecimal numberAsBigDecimal = (BigDecimal) number; return numberAsBigDecimal.toBigInteger(); } return toBigDecimal(number).toBigInteger(); }
/** * Determines the integer component of the given number. * <p> * For example: * <p> * <ul> * <li>{@code 2} has an integer component of {@code 2}</li> * <li>{@code 1.234} has an integer component of {@code 1}</li> * <li>{@code -1.5} has an integer component of {@code -1}</li> * <li>{@code ....
Determines the integer component of the given number. For example: 2 has an integer component of 2 1.234 has an integer component of 1 -1.5 has an integer component of -1 .5 has an integer component of 0
integerComponent
{ "repo_name": "lokalized/lokalized-java", "path": "src/main/java/com/lokalized/NumberUtils.java", "license": "apache-2.0", "size": 14239 }
[ "java.math.BigDecimal", "java.math.BigInteger", "java.util.Objects", "javax.annotation.Nonnull" ]
import java.math.BigDecimal; import java.math.BigInteger; import java.util.Objects; import javax.annotation.Nonnull;
import java.math.*; import java.util.*; import javax.annotation.*;
[ "java.math", "java.util", "javax.annotation" ]
java.math; java.util; javax.annotation;
1,044,823
private void setBufferSize(int size) { buf = new byte[size + 3]; buf_length = size; count = 0; } public SerializerTraceWriter(Writer out, SerializerTrace tracer) { m_writer = out; m_tracer = tracer; setBufferSize(1024); }
void function(int size) { buf = new byte[size + 3]; buf_length = size; count = 0; } SerializerTraceWriter(Writer out, SerializerTrace tracer) { m_writer = out; m_tracer = tracer; function(1024); }
/** * Creates or replaces the internal buffer, and makes sure it has a few * extra bytes slight overflow of the last UTF8 encoded character. * @param size */
Creates or replaces the internal buffer, and makes sure it has a few extra bytes slight overflow of the last UTF8 encoded character
setBufferSize
{ "repo_name": "haikuowuya/android_system_code", "path": "src/com/sun/org/apache/xml/internal/serializer/SerializerTraceWriter.java", "license": "apache-2.0", "size": 10311 }
[ "java.io.Writer" ]
import java.io.Writer;
import java.io.*;
[ "java.io" ]
java.io;
492,081
EClass getType();
EClass getType();
/** * Returns the meta object for class '{@link org.eclipse.vorto.core.api.model.datatype.Type <em>Type</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>Type</em>'. * @see org.eclipse.vorto.core.api.model.datatype.Type * @generated */
Returns the meta object for class '<code>org.eclipse.vorto.core.api.model.datatype.Type Type</code>'.
getType
{ "repo_name": "hrohmer/vorto", "path": "bundles/org.eclipse.vorto.core/src/org/eclipse/vorto/core/api/model/datatype/DatatypePackage.java", "license": "epl-1.0", "size": 57755 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
194,940
protected MapEntryUpdateResult.Status clear(Commit<? extends Clear> commit) { try { Iterator<Map.Entry<String, MapEntryValue>> iterator = mapEntries .entrySet().iterator(); while (iterator.hasNext()) { Map.Entry<String, MapEntryValue> entry = itera...
MapEntryUpdateResult.Status function(Commit<? extends Clear> commit) { try { Iterator<Map.Entry<String, MapEntryValue>> iterator = mapEntries .entrySet().iterator(); while (iterator.hasNext()) { Map.Entry<String, MapEntryValue> entry = iterator.next(); String key = entry.getKey(); MapEntryValue value = entry.getValue()...
/** * Handles a clear commit. * * @param commit clear commit * @return clear result */
Handles a clear commit
clear
{ "repo_name": "sonu283304/onos", "path": "core/store/primitives/src/main/java/org/onosproject/store/primitives/resources/impl/AtomixConsistentMapState.java", "license": "apache-2.0", "size": 22603 }
[ "com.google.common.collect.Lists", "io.atomix.copycat.server.Commit", "java.util.Iterator", "java.util.Map", "org.onosproject.store.primitives.resources.impl.AtomixConsistentMapCommands", "org.onosproject.store.service.MapEvent", "org.onosproject.store.service.Versioned" ]
import com.google.common.collect.Lists; import io.atomix.copycat.server.Commit; import java.util.Iterator; import java.util.Map; import org.onosproject.store.primitives.resources.impl.AtomixConsistentMapCommands; import org.onosproject.store.service.MapEvent; import org.onosproject.store.service.Versioned;
import com.google.common.collect.*; import io.atomix.copycat.server.*; import java.util.*; import org.onosproject.store.primitives.resources.impl.*; import org.onosproject.store.service.*;
[ "com.google.common", "io.atomix.copycat", "java.util", "org.onosproject.store" ]
com.google.common; io.atomix.copycat; java.util; org.onosproject.store;
1,709,138
@Test public void testBasic() throws SAXException, IOException, SchemaException { MidPointPrismContextFactory factory = getContextFactory(); PrismContext context = factory.createInitializedPrismContext(); SchemaRegistry reg = context.getSchemaRegistry(); Schema javaxSchema = reg.getJavaxSchema(); assertN...
void function() throws SAXException, IOException, SchemaException { MidPointPrismContextFactory factory = getContextFactory(); PrismContext context = factory.createInitializedPrismContext(); SchemaRegistry reg = context.getSchemaRegistry(); Schema javaxSchema = reg.getJavaxSchema(); assertNotNull(javaxSchema); Document...
/** * Test whether the midpoint prism context was constructed OK and if it can validate * ordinary user object. */
Test whether the midpoint prism context was constructed OK and if it can validate ordinary user object
testBasic
{ "repo_name": "rpudil/midpoint", "path": "infra/schema/src/test/java/com/evolveum/midpoint/schema/TestSchemaRegistry.java", "license": "apache-2.0", "size": 11077 }
[ "com.evolveum.midpoint.prism.PrismContext", "com.evolveum.midpoint.prism.schema.SchemaRegistry", "com.evolveum.midpoint.util.DOMUtil", "com.evolveum.midpoint.util.exception.SchemaException", "java.io.IOException", "javax.xml.transform.dom.DOMResult", "javax.xml.transform.dom.DOMSource", "javax.xml.val...
import com.evolveum.midpoint.prism.PrismContext; import com.evolveum.midpoint.prism.schema.SchemaRegistry; import com.evolveum.midpoint.util.DOMUtil; import com.evolveum.midpoint.util.exception.SchemaException; import java.io.IOException; import javax.xml.transform.dom.DOMResult; import javax.xml.transform.dom.DOMSourc...
import com.evolveum.midpoint.prism.*; import com.evolveum.midpoint.prism.schema.*; import com.evolveum.midpoint.util.*; import com.evolveum.midpoint.util.exception.*; import java.io.*; import javax.xml.transform.dom.*; import javax.xml.validation.*; import org.testng.*; import org.w3c.dom.*; import org.xml.sax.*;
[ "com.evolveum.midpoint", "java.io", "javax.xml", "org.testng", "org.w3c.dom", "org.xml.sax" ]
com.evolveum.midpoint; java.io; javax.xml; org.testng; org.w3c.dom; org.xml.sax;
2,264,004
private static boolean isVirtualDocument(Uri uri) { if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) return false; if (uri == null) return false; if (!DocumentsContract.isDocumentUri(ContextUtils.getApplicationContext(), uri)) { return false; } ContentResol...
static boolean function(Uri uri) { if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) return false; if (uri == null) return false; if (!DocumentsContract.isDocumentUri(ContextUtils.getApplicationContext(), uri)) { return false; } ContentResolver contentResolver = ContextUtils.getApplicationContext().getContentReso...
/** * Checks whether the passed Uri represents a virtual document. * * @param uri the content URI to be resolved. * @return True for virtual file, false for any other file. */
Checks whether the passed Uri represents a virtual document
isVirtualDocument
{ "repo_name": "lizhangqu/chromium-net-for-android", "path": "cronet-native/src/main/java/org/chromium/base/ContentUriUtils.java", "license": "bsd-3-clause", "size": 11258 }
[ "android.content.ContentResolver", "android.database.Cursor", "android.net.Uri", "android.os.Build", "android.provider.DocumentsContract" ]
import android.content.ContentResolver; import android.database.Cursor; import android.net.Uri; import android.os.Build; import android.provider.DocumentsContract;
import android.content.*; import android.database.*; import android.net.*; import android.os.*; import android.provider.*;
[ "android.content", "android.database", "android.net", "android.os", "android.provider" ]
android.content; android.database; android.net; android.os; android.provider;
2,072,390
@Override public void endWindow() { if (!mergedTuple.isEmpty()) { mergedport.emit(mergedTuple); mergedTuple = new HashMap<K, V>(); } }
void function() { if (!mergedTuple.isEmpty()) { mergedport.emit(mergedTuple); mergedTuple = new HashMap<K, V>(); } }
/** * emits mergedTuple on mergedport if it is not empty */
emits mergedTuple on mergedport if it is not empty
endWindow
{ "repo_name": "skekre98/apex-mlhr", "path": "library/src/main/java/com/datatorrent/lib/util/UnifierHashMap.java", "license": "apache-2.0", "size": 2538 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
143,770
DataValueDescriptor getValue() { return value; } ////////////////////////////////////////////////////////////////// // // CALLABLE STATEMENT // //////////////////////////////////////////////////////////////////
DataValueDescriptor getValue() { return value; }
/** * Get the parameter value. Doesn't check to * see if it has been initialized or not. * * @return the parameter value, may return null */
Get the parameter value. Doesn't check to see if it has been initialized or not
getValue
{ "repo_name": "kavin256/Derby", "path": "java/engine/org/apache/derby/impl/sql/GenericParameter.java", "license": "apache-2.0", "size": 8227 }
[ "org.apache.derby.iapi.types.DataValueDescriptor" ]
import org.apache.derby.iapi.types.DataValueDescriptor;
import org.apache.derby.iapi.types.*;
[ "org.apache.derby" ]
org.apache.derby;
2,779,335
private static final boolean unaligned = Platform.unaligned(); public static boolean arrayEqualsBlock( MemoryBlock leftBase, long leftOffset, MemoryBlock rightBase, long rightOffset, long length) { return arrayEquals(leftBase.getBaseObject(), leftBase.getBaseOffset() + leftOffset, rightBase.getBase...
static final boolean unaligned = Platform.unaligned(); public static boolean function( MemoryBlock leftBase, long leftOffset, MemoryBlock rightBase, long rightOffset, long length) { return arrayEquals(leftBase.getBaseObject(), leftBase.getBaseOffset() + leftOffset, rightBase.getBaseObject(), rightBase.getBaseOffset() +...
/** * MemoryBlock equality check for MemoryBlocks. * @return true if the arrays are equal, false otherwise */
MemoryBlock equality check for MemoryBlocks
arrayEqualsBlock
{ "repo_name": "sahilTakiar/spark", "path": "common/unsafe/src/main/java/org/apache/spark/unsafe/array/ByteArrayMethods.java", "license": "apache-2.0", "size": 4035 }
[ "org.apache.spark.unsafe.Platform", "org.apache.spark.unsafe.memory.MemoryBlock" ]
import org.apache.spark.unsafe.Platform; import org.apache.spark.unsafe.memory.MemoryBlock;
import org.apache.spark.unsafe.*; import org.apache.spark.unsafe.memory.*;
[ "org.apache.spark" ]
org.apache.spark;
1,628,562
protected boolean isExcluded(final File file) { return !filenameFilter.accept(file.getParentFile(), file.getName()); }
boolean function(final File file) { return !filenameFilter.accept(file.getParentFile(), file.getName()); }
/** * Utility method to determine if the file is excluded by the * inclusion/exclusion filter. * * @param file * the file * @return true if the file is excluded, or false if it is to be included */
Utility method to determine if the file is excluded by the inclusion/exclusion filter
isExcluded
{ "repo_name": "DICE-UNC/jargon-modeshape", "path": "irods-connector/attic/IRODSWriteableConnector.java", "license": "bsd-3-clause", "size": 45386 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
834,701
@Override public void writeObject(File file, OutputStream outputStream) throws IOException, SerializationException { InputStream inputStream = null; try { inputStream = new BufferedInputStream(new FileInputStream(file), BUFFER_SIZE); for (int data = inputStream.r...
void function(File file, OutputStream outputStream) throws IOException, SerializationException { InputStream inputStream = null; try { inputStream = new BufferedInputStream(new FileInputStream(file), BUFFER_SIZE); for (int data = inputStream.read(); data != -1; data = inputStream.read()) { outputStream.write((byte)data...
/** * Writes a file to an output stream. */
Writes a file to an output stream
writeObject
{ "repo_name": "ggeorg/chillverse", "path": "src/org/apache/pivot/io/FileSerializer.java", "license": "apache-2.0", "size": 3787 }
[ "java.io.BufferedInputStream", "java.io.File", "java.io.FileInputStream", "java.io.IOException", "java.io.InputStream", "java.io.OutputStream", "org.apache.pivot.serialization.SerializationException" ]
import java.io.BufferedInputStream; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import org.apache.pivot.serialization.SerializationException;
import java.io.*; import org.apache.pivot.serialization.*;
[ "java.io", "org.apache.pivot" ]
java.io; org.apache.pivot;
2,471,293
public static ArrayList<Instruction> recompileHopsDag2Forced( Hop hops, long tid, ExecType et ) throws DMLRuntimeException, HopsException, LopsException, IOException { ArrayList<Instruction> newInst = null; //need for synchronization as we do temp changes in shared hops/lops synchronized( hops ) { LO...
static ArrayList<Instruction> function( Hop hops, long tid, ExecType et ) throws DMLRuntimeException, HopsException, LopsException, IOException { ArrayList<Instruction> newInst = null; synchronized( hops ) { LOG.debug (STR + OptimizerUtils.toMB(OptimizerUtils.getLocalMemBudget()) + STR); hops.resetVisitStatus(); rClear...
/** * D) Recompile predicate hop DAG (single root), but forced to CP. * * This happens always 'inplace', without statistics updates, and * without dynamic rewrites. * * @param hops list of high-level operators * @param tid thread id * @param et execution type * @return list of instructions * @th...
D) Recompile predicate hop DAG (single root), but forced to CP. This happens always 'inplace', without statistics updates, and without dynamic rewrites
recompileHopsDag2Forced
{ "repo_name": "asurve/incubator-systemml", "path": "src/main/java/org/apache/sysml/hops/recompile/Recompiler.java", "license": "apache-2.0", "size": 69505 }
[ "java.io.IOException", "java.util.ArrayList", "org.apache.sysml.conf.ConfigurationManager", "org.apache.sysml.hops.Hop", "org.apache.sysml.hops.HopsException", "org.apache.sysml.hops.OptimizerUtils", "org.apache.sysml.lops.Lop", "org.apache.sysml.lops.LopProperties", "org.apache.sysml.lops.LopsExcep...
import java.io.IOException; import java.util.ArrayList; import org.apache.sysml.conf.ConfigurationManager; import org.apache.sysml.hops.Hop; import org.apache.sysml.hops.HopsException; import org.apache.sysml.hops.OptimizerUtils; import org.apache.sysml.lops.Lop; import org.apache.sysml.lops.LopProperties; import org.a...
import java.io.*; import java.util.*; import org.apache.sysml.conf.*; import org.apache.sysml.hops.*; import org.apache.sysml.lops.*; import org.apache.sysml.lops.compile.*; import org.apache.sysml.runtime.*; import org.apache.sysml.runtime.controlprogram.parfor.*; import org.apache.sysml.runtime.instructions.*;
[ "java.io", "java.util", "org.apache.sysml" ]
java.io; java.util; org.apache.sysml;
975,753
private void output(String string) throws IOException { int length = string.length(); if (tempChars == null || tempChars.length < length) { tempChars = new char[length]; } string.getChars(0, length, tempChars, 0); super.output(tempChars, 0, length); } ...
void function(String string) throws IOException { int length = string.length(); if (tempChars == null tempChars.length < length) { tempChars = new char[length]; } string.getChars(0, length, tempChars, 0); super.output(tempChars, 0, length); } class OptionListModel extends DefaultListModel implements ListSelectionModel,...
/** * This directly invokes super's <code>output</code> after converting * <code>string</code> to a char[]. */
This directly invokes super's <code>output</code> after converting <code>string</code> to a char[]
output
{ "repo_name": "cst316/spring16project-Team-Flagstaff", "path": "src/net/sf/memoranda/ui/htmleditor/AltHTMLWriter.java", "license": "gpl-2.0", "size": 84375 }
[ "java.io.IOException", "java.io.Serializable", "java.util.BitSet", "javax.swing.DefaultListModel", "javax.swing.ListSelectionModel", "javax.swing.event.EventListenerList" ]
import java.io.IOException; import java.io.Serializable; import java.util.BitSet; import javax.swing.DefaultListModel; import javax.swing.ListSelectionModel; import javax.swing.event.EventListenerList;
import java.io.*; import java.util.*; import javax.swing.*; import javax.swing.event.*;
[ "java.io", "java.util", "javax.swing" ]
java.io; java.util; javax.swing;
482,758
@SafeVarargs final List<V> get(Object... keyComponentArray) { return get(new KeyComponentArray(keyComponentArray)); }
final List<V> get(Object... keyComponentArray) { return get(new KeyComponentArray(keyComponentArray)); }
/** * Invoked to get all values with composite-key matching the submitted * keyComponentArray. * * @param keyComponentArray array of key objects. * @return all values with composite-key matching the submitted keyComponentArray */
Invoked to get all values with composite-key matching the submitted keyComponentArray
get
{ "repo_name": "dvimont/OrderedSet", "path": "src/main/java/org/commonvox/collections/MapNode.java", "license": "apache-2.0", "size": 25679 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,466,414
public static void main(String argv[]) throws Exception { StringUtils.startupShutdownMessage(TaskTracker.class, argv, LOG); try { if (argv.length == 0) { JobConf conf = new JobConf(); ReflectionUtils.setContentionTracing (conf.getBoolean("tasktracker.contention.tracking", false))...
static void function(String argv[]) throws Exception { StringUtils.startupShutdownMessage(TaskTracker.class, argv, LOG); try { if (argv.length == 0) { JobConf conf = new JobConf(); ReflectionUtils.setContentionTracing (conf.getBoolean(STR, false)); new TaskTracker(conf).run(); return; } if (STR.equals(argv[0]) && argv....
/** * Start the TaskTracker, point toward the indicated JobTracker */
Start the TaskTracker, point toward the indicated JobTracker
main
{ "repo_name": "rvadali/fb-raid-refactoring", "path": "src/mapred/org/apache/hadoop/mapred/TaskTracker.java", "license": "apache-2.0", "size": 135755 }
[ "org.apache.hadoop.util.ReflectionUtils", "org.apache.hadoop.util.StringUtils" ]
import org.apache.hadoop.util.ReflectionUtils; import org.apache.hadoop.util.StringUtils;
import org.apache.hadoop.util.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,677,866
public static Writer createWriter(final Configuration conf, final FileSystem fs, final Path path, final boolean overwritable, long blocksize) throws IOException { // Configuration already does caching for the Class lookup. Class<? extends Writer> logWriterClass = conf.getClass("hbase.regionserver....
static Writer function(final Configuration conf, final FileSystem fs, final Path path, final boolean overwritable, long blocksize) throws IOException { Class<? extends Writer> logWriterClass = conf.getClass(STR, ProtobufLogWriter.class, Writer.class); Writer writer = null; try { writer = logWriterClass.getDeclaredConst...
/** * Public because of FSHLog. Should be package-private */
Public because of FSHLog. Should be package-private
createWriter
{ "repo_name": "HubSpot/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/wal/FSHLogProvider.java", "license": "apache-2.0", "size": 4914 }
[ "java.io.IOException", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.fs.FileSystem", "org.apache.hadoop.fs.Path", "org.apache.hadoop.hbase.regionserver.wal.ProtobufLogWriter", "org.apache.hadoop.hbase.util.CommonFSUtils" ]
import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.regionserver.wal.ProtobufLogWriter; import org.apache.hadoop.hbase.util.CommonFSUtils;
import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hbase.regionserver.wal.*; import org.apache.hadoop.hbase.util.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
1,767,712
private ExecRow getRowFromHashTable(int position) throws StandardException { // Get the row from the hash table positionInHashTable.setValue(position); DataValueDescriptor[] hashRowArray = getCurrentRowFromHashtable(); if (SanityManager.DEBUG) { SanityManager.ASSERT(hashRowArray != null, "hashR...
ExecRow function(int position) throws StandardException { positionInHashTable.setValue(position); DataValueDescriptor[] hashRowArray = getCurrentRowFromHashtable(); if (SanityManager.DEBUG) { SanityManager.ASSERT(hashRowArray != null, STR); } DataValueDescriptor[] resultRowArray = new DataValueDescriptor[hashRowArray.l...
/** * Get the row at the specified position * from the hash table. * * @param position The specified position. * * @return The row at that position. * * @exception StandardException thrown on failure */
Get the row at the specified position from the hash table
getRowFromHashTable
{ "repo_name": "scnakandala/derby", "path": "java/engine/org/apache/derby/impl/sql/execute/ScrollInsensitiveResultSet.java", "license": "apache-2.0", "size": 33262 }
[ "org.apache.derby.iapi.error.StandardException", "org.apache.derby.iapi.sql.execute.ExecRow", "org.apache.derby.iapi.sql.execute.NoPutResultSet", "org.apache.derby.iapi.types.DataValueDescriptor", "org.apache.derby.iapi.types.RowLocation", "org.apache.derby.shared.common.sanity.SanityManager" ]
import org.apache.derby.iapi.error.StandardException; import org.apache.derby.iapi.sql.execute.ExecRow; import org.apache.derby.iapi.sql.execute.NoPutResultSet; import org.apache.derby.iapi.types.DataValueDescriptor; import org.apache.derby.iapi.types.RowLocation; import org.apache.derby.shared.common.sanity.SanityMana...
import org.apache.derby.iapi.error.*; import org.apache.derby.iapi.sql.execute.*; import org.apache.derby.iapi.types.*; import org.apache.derby.shared.common.sanity.*;
[ "org.apache.derby" ]
org.apache.derby;
12,986
private void writeRequests() throws IOException { if (!setRequests) { if (!failedOnce) { requests.prepend(method + " " + http.getURLFile() + " " + HTTP_VERSION, null); } if (!getUseCaches()) { requests.setIfNotSet("Cache-Control", "no-cache"); requests.setIfNotSet("Pragma", "n...
void function() throws IOException { if (!setRequests) { if (!failedOnce) { requests.prepend(method + " " + http.getURLFile() + " " + HTTP_VERSION, null); } if (!getUseCaches()) { requests.setIfNotSet(STR, STR); requests.setIfNotSet(STR, STR); } requests.setIfNotSet(STR, userAgent); final int port = url.getPort(); Stri...
/** * adds the standard key/val pairs to reqests if necessary & write to given * PrintStream. */
adds the standard key/val pairs to reqests if necessary & write to given PrintStream
writeRequests
{ "repo_name": "rovemonteux/silvertunnel-monteux", "path": "src/main/java/cf/monteux/silvertunnel/netlib/adapter/url/impl/net/http/HttpURLConnection.java", "license": "lgpl-3.0", "size": 91765 }
[ "java.io.IOException", "java.io.PrintStream", "java.text.SimpleDateFormat", "java.util.Date", "java.util.Locale", "java.util.TimeZone" ]
import java.io.IOException; import java.io.PrintStream; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; import java.util.TimeZone;
import java.io.*; import java.text.*; import java.util.*;
[ "java.io", "java.text", "java.util" ]
java.io; java.text; java.util;
2,045,844
public List<HashMap<String, String>> getFields(String moduleId) { List<HashMap<String, String>> fields = new ArrayList<>(); JSONObject moduleData = (JSONObject) ((JSONObject) data.get("fields")).get(moduleId); for (Object key : moduleData.keySet()) { HashMap<String, String> prope...
List<HashMap<String, String>> function(String moduleId) { List<HashMap<String, String>> fields = new ArrayList<>(); JSONObject moduleData = (JSONObject) ((JSONObject) data.get(STR)).get(moduleId); for (Object key : moduleData.keySet()) { HashMap<String, String> properties = (HashMap<String, String>) moduleData.get(key)...
/** * returns the list of modules * * @param moduleId * @return */
returns the list of modules
getFields
{ "repo_name": "CognizantQAHub/Cognizant-Intelligent-Test-Scripter", "path": "IDE/src/main/java/com/cognizant/cognizantits/ide/main/explorer/settings/ReportingModuleSettings.java", "license": "apache-2.0", "size": 4901 }
[ "java.util.ArrayList", "java.util.HashMap", "java.util.List", "org.json.simple.JSONObject" ]
import java.util.ArrayList; import java.util.HashMap; import java.util.List; import org.json.simple.JSONObject;
import java.util.*; import org.json.simple.*;
[ "java.util", "org.json.simple" ]
java.util; org.json.simple;
2,332,586
@Schema(required = true, description = "Set `true` to enable encryption for this customer") public Boolean isEnableCustomerEncryption() { return enableCustomerEncryption; }
@Schema(required = true, description = STR) Boolean function() { return enableCustomerEncryption; }
/** * Set &#x60;true&#x60; to enable encryption for this customer * @return enableCustomerEncryption **/
Set &#x60;true&#x60; to enable encryption for this customer
isEnableCustomerEncryption
{ "repo_name": "iterate-ch/cyberduck", "path": "dracoon/src/main/java/ch/cyberduck/core/sds/io/swagger/client/model/EnableCustomerEncryptionRequest.java", "license": "gpl-3.0", "size": 4187 }
[ "io.swagger.v3.oas.annotations.media.Schema" ]
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.*;
[ "io.swagger.v3" ]
io.swagger.v3;
256,998
public double nextWeibull(double shape, double scale) throws NotStrictlyPositiveException { return new WeibullDistribution(getRan(), shape, scale, WeibullDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY).sample(); } /** * Generates a random value from the {@link ZipfDistribution ...
double function(double shape, double scale) throws NotStrictlyPositiveException { return new WeibullDistribution(getRan(), shape, scale, WeibullDistribution.DEFAULT_INVERSE_ABSOLUTE_ACCURACY).sample(); } /** * Generates a random value from the {@link ZipfDistribution Zipf Distribution}. * * @param numberOfElements the ...
/** * Generates a random value from the {@link WeibullDistribution Weibull Distribution}. * * @param shape the shape parameter of the Weibull distribution * @param scale the scale parameter of the Weibull distribution * @return random value sampled from the Weibull(shape, size) distribution ...
Generates a random value from the <code>WeibullDistribution Weibull Distribution</code>
nextWeibull
{ "repo_name": "charles-cooper/idylfin", "path": "src/org/apache/commons/math3/random/RandomDataGenerator.java", "license": "apache-2.0", "size": 31656 }
[ "org.apache.commons.math3.distribution.WeibullDistribution", "org.apache.commons.math3.distribution.ZipfDistribution", "org.apache.commons.math3.exception.NotStrictlyPositiveException" ]
import org.apache.commons.math3.distribution.WeibullDistribution; import org.apache.commons.math3.distribution.ZipfDistribution; import org.apache.commons.math3.exception.NotStrictlyPositiveException;
import org.apache.commons.math3.distribution.*; import org.apache.commons.math3.exception.*;
[ "org.apache.commons" ]
org.apache.commons;
2,509,288
protected void configureViewResolvers(ViewResolverRegistry registry) { } private static final class EmptyHandlerMapping extends AbstractHandlerMapping {
void function(ViewResolverRegistry registry) { } private static final class EmptyHandlerMapping extends AbstractHandlerMapping {
/** * Override this method to configure view resolution. * @see ViewResolverRegistry */
Override this method to configure view resolution
configureViewResolvers
{ "repo_name": "qobel/esoguproject", "path": "spring-framework/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurationSupport.java", "license": "apache-2.0", "size": 35035 }
[ "org.springframework.web.servlet.handler.AbstractHandlerMapping" ]
import org.springframework.web.servlet.handler.AbstractHandlerMapping;
import org.springframework.web.servlet.handler.*;
[ "org.springframework.web" ]
org.springframework.web;
1,135,412
@Test public void testLedgerMetadataContainsHostNameAsBookieID() throws Exception { stopBKCluster(); bkc = new BookKeeperTestClient(baseClientConf); // start bookie with useHostNameAsBookieID=false, as old bookie ServerConfiguration serverConf1 = newServerConfigurati...
void function() throws Exception { stopBKCluster(); bkc = new BookKeeperTestClient(baseClientConf); ServerConfiguration serverConf1 = newServerConfiguration(); ServerConfiguration serverConf2 = newServerConfiguration(); serverConf2.setUseHostNameAsBookieID(true); ServerConfiguration serverConf3 = newServerConfiguration...
/** * Test verifies bookie recovery, the host (recorded via useHostName in * ledgermetadata). */
Test verifies bookie recovery, the host (recorded via useHostName in ledgermetadata)
testLedgerMetadataContainsHostNameAsBookieID
{ "repo_name": "apache/bookkeeper", "path": "bookkeeper-server/src/test/java/org/apache/bookkeeper/replication/BookieAutoRecoveryTest.java", "license": "apache-2.0", "size": 26610 }
[ "java.util.List", "java.util.SortedMap", "java.util.concurrent.CountDownLatch", "org.apache.bookkeeper.client.BookKeeperTestClient", "org.apache.bookkeeper.client.LedgerHandle", "org.apache.bookkeeper.conf.ServerConfiguration", "org.apache.bookkeeper.net.BookieId", "org.apache.bookkeeper.proto.BookieS...
import java.util.List; import java.util.SortedMap; import java.util.concurrent.CountDownLatch; import org.apache.bookkeeper.client.BookKeeperTestClient; import org.apache.bookkeeper.client.LedgerHandle; import org.apache.bookkeeper.conf.ServerConfiguration; import org.apache.bookkeeper.net.BookieId; import org.apache.b...
import java.util.*; import java.util.concurrent.*; import org.apache.bookkeeper.client.*; import org.apache.bookkeeper.conf.*; import org.apache.bookkeeper.net.*; import org.apache.bookkeeper.proto.*; import org.junit.*;
[ "java.util", "org.apache.bookkeeper", "org.junit" ]
java.util; org.apache.bookkeeper; org.junit;
2,549,122
public Properties getJaxRpcServiceProperties() { return this.jaxRpcServiceProperties; }
Properties function() { return this.jaxRpcServiceProperties; }
/** * Return JAX-RPC service properties to be passed to the ServiceFactory, if any. */
Return JAX-RPC service properties to be passed to the ServiceFactory, if any
getJaxRpcServiceProperties
{ "repo_name": "codeApeFromChina/resource", "path": "frame_packages/java_libs/spring-2.5.6-src/src/org/springframework/remoting/jaxrpc/LocalJaxRpcServiceFactory.java", "license": "unlicense", "size": 11175 }
[ "java.util.Properties" ]
import java.util.Properties;
import java.util.*;
[ "java.util" ]
java.util;
2,666,452
@SuppressWarnings(value="unchecked") public int compare(Object o1, Object o2, Schema s) { if (o1 == o2) return 0; switch (s.getType()) { case RECORD: for (Field f : s.getFields()) { if (f.order() == Field.Order.IGNORE) continue; // ignore this field ...
@SuppressWarnings(value=STR) int function(Object o1, Object o2, Schema s) { if (o1 == o2) return 0; switch (s.getType()) { case RECORD: for (Field f : s.getFields()) { if (f.order() == Field.Order.IGNORE) continue; int pos = f.pos(); String name = f.name(); int compare = compare(getField(o1, name, pos), getField(o2, na...
/** Compare objects according to their schema. If equal, return zero. If * greater-than, return 1, if less than return -1. Order is consistent with * that of {@link BinaryData#compare(byte[], int, byte[], int, Schema)}. */
Compare objects according to their schema. If equal, return zero. If greater-than, return 1, if less than return -1. Order is consistent with that of <code>BinaryData#compare(byte[], int, byte[], int, Schema)</code>
compare
{ "repo_name": "cloudera/avro", "path": "lang/java/avro/src/main/java/org/apache/avro/generic/GenericData.java", "license": "apache-2.0", "size": 21455 }
[ "java.util.Collection", "java.util.Iterator", "org.apache.avro.AvroRuntimeException", "org.apache.avro.Schema", "org.apache.avro.util.Utf8" ]
import java.util.Collection; import java.util.Iterator; import org.apache.avro.AvroRuntimeException; import org.apache.avro.Schema; import org.apache.avro.util.Utf8;
import java.util.*; import org.apache.avro.*; import org.apache.avro.util.*;
[ "java.util", "org.apache.avro" ]
java.util; org.apache.avro;
1,288,939
public void testWarningLevel0() { ForteCCCompiler compiler = ForteCCCompiler.getInstance(); Vector args = new Vector(); compiler.addWarningSwitch(args, 0); assertEquals(1, args.size()); assertEquals("-w", args.elementAt(0)); }
void function() { ForteCCCompiler compiler = ForteCCCompiler.getInstance(); Vector args = new Vector(); compiler.addWarningSwitch(args, 0); assertEquals(1, args.size()); assertEquals("-w", args.elementAt(0)); }
/** * Tests command line switches for warning = 0 */
Tests command line switches for warning = 0
testWarningLevel0
{ "repo_name": "maven-nar/cpptasks-parallel", "path": "src/test/java/com/github/maven_nar/cpptasks/sun/TestForteCCCompiler.java", "license": "apache-2.0", "size": 4817 }
[ "com.github.maven_nar.cpptasks.sun.ForteCCCompiler", "java.util.Vector" ]
import com.github.maven_nar.cpptasks.sun.ForteCCCompiler; import java.util.Vector;
import com.github.maven_nar.cpptasks.sun.*; import java.util.*;
[ "com.github.maven_nar", "java.util" ]
com.github.maven_nar; java.util;
1,007,139
public static <E> Counter<E> divisionNonNaN(Counter<E> c1, Counter<E> c2) { Counter<E> result = c1.getFactory().create(); for (E key : Sets.union(c1.keySet(), c2.keySet())) { if(c2.getCount(key) != 0) result.setCount(key, c1.getCount(key) / c2.getCount(key)); } return result; }
static <E> Counter<E> function(Counter<E> c1, Counter<E> c2) { Counter<E> result = c1.getFactory().create(); for (E key : Sets.union(c1.keySet(), c2.keySet())) { if(c2.getCount(key) != 0) result.setCount(key, c1.getCount(key) / c2.getCount(key)); } return result; }
/** * Returns c1 divided by c2. Safe - will not calculate scores for keys that are zero or that do not exist in c2 * * @return c1 divided by c2. */
Returns c1 divided by c2. Safe - will not calculate scores for keys that are zero or that do not exist in c2
divisionNonNaN
{ "repo_name": "codev777/CoreNLP", "path": "src/edu/stanford/nlp/stats/Counters.java", "license": "gpl-2.0", "size": 100293 }
[ "edu.stanford.nlp.util.Sets" ]
import edu.stanford.nlp.util.Sets;
import edu.stanford.nlp.util.*;
[ "edu.stanford.nlp" ]
edu.stanford.nlp;
549,040
public static double[] calculateSunPositionLowTT(double Mjd_TT) { // Constants final double eps = 23.43929111*AstroConst.Rad; // Obliquity of J2000 ecliptic final double T = (Mjd_TT-AstroConst.MJD_J2000)/36525.0; // Julian cent. since J2000 // Variables double L, M, r; double[] r_...
static double[] function(double Mjd_TT) { final double eps = 23.43929111*AstroConst.Rad; final double T = (Mjd_TT-AstroConst.MJD_J2000)/36525.0; double L, M, r; double[] r_Sun = new double[3]; M = 2.0*Math.PI * MathUtils.Frac( 0.9931267 + 99.9973583*T); L = 2.0*Math.PI * MathUtils.Frac ( 0.7859444 + M/(2.0*Math.PI) + (...
/** * Computes the Sun's geocentric position using a low precision analytical series * * @param Mjd_TT Terrestrial Time (Modified Julian Date) * @return Solar position vector [m] with respect to the mean equator and equinox of J2000 (EME2000, ICRF) */
Computes the Sun's geocentric position using a low precision analytical series
calculateSunPositionLowTT
{ "repo_name": "AlexFalappa/hcc", "path": "wwj-toolkit/src/main/java/name/gano/astro/bodies/Sun.java", "license": "apache-2.0", "size": 8421 }
[ "name.gano.astro.AstroConst", "name.gano.astro.MathUtils" ]
import name.gano.astro.AstroConst; import name.gano.astro.MathUtils;
import name.gano.astro.*;
[ "name.gano.astro" ]
name.gano.astro;
1,090,125
List<User> getAllUsers(String configName);
List<User> getAllUsers(String configName);
/** * Returns a list of all users on the OpenMRS server. Configuration with the given {@code configName} will be used * while performing this action. * * @param configName the name of the configuration * @return the list of all users */
Returns a list of all users on the OpenMRS server. Configuration with the given configName will be used while performing this action
getAllUsers
{ "repo_name": "wstrzelczyk/modules", "path": "openmrs-19/src/main/java/org/motechproject/openmrs19/service/OpenMRSUserService.java", "license": "bsd-3-clause", "size": 4099 }
[ "java.util.List", "org.motechproject.openmrs19.domain.User" ]
import java.util.List; import org.motechproject.openmrs19.domain.User;
import java.util.*; import org.motechproject.openmrs19.domain.*;
[ "java.util", "org.motechproject.openmrs19" ]
java.util; org.motechproject.openmrs19;
531,365
@Override public InteractionResult handlePlayerInteraction(Player entityhuman, InteractionHand enumhand, ItemStack itemStack) { if (super.handlePlayerInteraction(entityhuman, enumhand, itemStack).consumesAction()) { return InteractionResult.CONSUME; } if (getOwner().equals(entityhuman) && itemStack != nul...
InteractionResult function(Player entityhuman, InteractionHand enumhand, ItemStack itemStack) { if (super.handlePlayerInteraction(entityhuman, enumhand, itemStack).consumesAction()) { return InteractionResult.CONSUME; } if (getOwner().equals(entityhuman) && itemStack != null) { if (itemStack.getItem() == Items.SHEARS &...
/** * Is called when player rightclicks this MyPet * return: * true: there was a reaction on rightclick * false: no reaction on rightclick */
Is called when player rightclicks this MyPet return: true: there was a reaction on rightclick false: no reaction on rightclick
handlePlayerInteraction
{ "repo_name": "xXKeyleXx/MyPet", "path": "modules/v1_17_R1/src/main/java/de/Keyle/MyPet/compat/v1_17_R1/entity/types/EntityMyPillager.java", "license": "lgpl-3.0", "size": 8779 }
[ "java.lang.reflect.InvocationTargetException", "net.minecraft.world.InteractionHand", "net.minecraft.world.InteractionResult", "net.minecraft.world.entity.Mob", "net.minecraft.world.entity.item.ItemEntity", "net.minecraft.world.entity.player.Player", "net.minecraft.world.item.BannerItem", "net.minecra...
import java.lang.reflect.InvocationTargetException; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.entity.Mob; import net.minecraft.world.entity.item.ItemEntity; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.BannerI...
import java.lang.reflect.*; import net.minecraft.world.*; import net.minecraft.world.entity.*; import net.minecraft.world.entity.item.*; import net.minecraft.world.entity.player.*; import net.minecraft.world.item.*; import org.bukkit.craftbukkit.*;
[ "java.lang", "net.minecraft.world", "org.bukkit.craftbukkit" ]
java.lang; net.minecraft.world; org.bukkit.craftbukkit;
2,909,962
private void assertNodesMvccIs(boolean enabled, IgniteEx... nodes) { for (IgniteEx n: nodes) assertEquals("Check node: " + n.name(), enabled, n.context().coordinators().mvccEnabled()); }
void function(boolean enabled, IgniteEx... nodes) { for (IgniteEx n: nodes) assertEquals(STR + n.name(), enabled, n.context().coordinators().mvccEnabled()); }
/** * Asserts if any node MVCC status doesn't equal expected */
Asserts if any node MVCC status doesn't equal expected
assertNodesMvccIs
{ "repo_name": "NSAmelchev/ignite", "path": "modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccClientTopologyTest.java", "license": "apache-2.0", "size": 10252 }
[ "org.apache.ignite.internal.IgniteEx" ]
import org.apache.ignite.internal.IgniteEx;
import org.apache.ignite.internal.*;
[ "org.apache.ignite" ]
org.apache.ignite;
834,904
public void addCloseListener(BiConsumer<Void, Throwable> listener) { closeContext.whenComplete(listener); }
void function(BiConsumer<Void, Throwable> listener) { closeContext.whenComplete(listener); }
/** * Add a listener that will be called when the channel is closed. * * @param listener to be called */
Add a listener that will be called when the channel is closed
addCloseListener
{ "repo_name": "s1monw/elasticsearch", "path": "libs/elasticsearch-nio/src/main/java/org/elasticsearch/nio/ChannelContext.java", "license": "apache-2.0", "size": 3754 }
[ "java.util.function.BiConsumer" ]
import java.util.function.BiConsumer;
import java.util.function.*;
[ "java.util" ]
java.util;
2,674,580
public SnowflakeDataset withTable(Object table) { if (this.innerTypeProperties() == null) { this.innerTypeProperties = new SnowflakeDatasetTypeProperties(); } this.innerTypeProperties().withTable(table); return this; }
SnowflakeDataset function(Object table) { if (this.innerTypeProperties() == null) { this.innerTypeProperties = new SnowflakeDatasetTypeProperties(); } this.innerTypeProperties().withTable(table); return this; }
/** * Set the table property: The table name of the Snowflake database. Type: string (or Expression with resultType * string). * * @param table the table value to set. * @return the SnowflakeDataset object itself. */
Set the table property: The table name of the Snowflake database. Type: string (or Expression with resultType string)
withTable
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/datafactory/azure-resourcemanager-datafactory/src/main/java/com/azure/resourcemanager/datafactory/models/SnowflakeDataset.java", "license": "mit", "size": 4989 }
[ "com.azure.resourcemanager.datafactory.fluent.models.SnowflakeDatasetTypeProperties" ]
import com.azure.resourcemanager.datafactory.fluent.models.SnowflakeDatasetTypeProperties;
import com.azure.resourcemanager.datafactory.fluent.models.*;
[ "com.azure.resourcemanager" ]
com.azure.resourcemanager;
5,378
public static java.util.Set extractAdminEventSet(ims.domain.ILightweightDomainFactory domainFactory, ims.pathways.vo.AdminEventVoCollection voCollection) { return extractAdminEventSet(domainFactory, voCollection, null, new HashMap()); }
static java.util.Set function(ims.domain.ILightweightDomainFactory domainFactory, ims.pathways.vo.AdminEventVoCollection voCollection) { return extractAdminEventSet(domainFactory, voCollection, null, new HashMap()); }
/** * Create the ims.pathways.domain.objects.AdminEvent set from the value object collection. * @param domainFactory - used to create existing (persistent) domain objects. * @param voCollection - the collection of value objects */
Create the ims.pathways.domain.objects.AdminEvent set from the value object collection
extractAdminEventSet
{ "repo_name": "open-health-hub/openMAXIMS", "path": "openmaxims_workspace/ValueObjects/src/ims/pathways/vo/domain/AdminEventVoAssembler.java", "license": "agpl-3.0", "size": 19283 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
2,440,788
@Override @Post("text") public Representation responsePost(Representation param) { try { @SuppressWarnings("unchecked") Series<Header> responseHeaders = (Series<Header>) getResponse().getAttributes().get("org.restlet.http.headers"); if (responseHeaders == null) { respon...
@Post("text") Representation function(Representation param) { try { @SuppressWarnings(STR) Series<Header> responseHeaders = (Series<Header>) getResponse().getAttributes().get(STR); if (responseHeaders == null) { responseHeaders = new Series<Header>(Header.class); getResponse().getAttributes().put(STR, responseHeaders);...
/** * Responde requsicoes via metodo POST. * @param param Corpo da Requisicao (contem o parametro <code>speech</code>). * @return Resposta (JSON). */
Responde requsicoes via metodo POST
responsePost
{ "repo_name": "robsonsmartins/acaas", "path": "source/acaas.jboss7/AcaaS/src/com/robsonmartins/acaas/stt/STTResource.java", "license": "gpl-3.0", "size": 4746 }
[ "java.util.HashMap", "java.util.Map", "org.apache.commons.io.IOUtils", "org.restlet.data.Status", "org.restlet.engine.header.Header", "org.restlet.representation.Representation", "org.restlet.resource.Post", "org.restlet.util.Series" ]
import java.util.HashMap; import java.util.Map; import org.apache.commons.io.IOUtils; import org.restlet.data.Status; import org.restlet.engine.header.Header; import org.restlet.representation.Representation; import org.restlet.resource.Post; import org.restlet.util.Series;
import java.util.*; import org.apache.commons.io.*; import org.restlet.data.*; import org.restlet.engine.header.*; import org.restlet.representation.*; import org.restlet.resource.*; import org.restlet.util.*;
[ "java.util", "org.apache.commons", "org.restlet.data", "org.restlet.engine", "org.restlet.representation", "org.restlet.resource", "org.restlet.util" ]
java.util; org.apache.commons; org.restlet.data; org.restlet.engine; org.restlet.representation; org.restlet.resource; org.restlet.util;
2,358,838
public static void setProperties(final ChronoElement element, final Map<String, Object> properties) { for (Map.Entry<String, Object> property : properties.entrySet()) { element.setProperty(property.getKey(), property.getValue()); } }
static void function(final ChronoElement element, final Map<String, Object> properties) { for (Map.Entry<String, Object> property : properties.entrySet()) { element.setProperty(property.getKey(), property.getValue()); } }
/** * Set the properties of the provided element using the provided map. * * @param element * the element to set the properties of * @param properties * the properties to set as a Map */
Set the properties of the provided element using the provided map
setProperties
{ "repo_name": "JaewookByun/epcis", "path": "otg/src/main/java/org/oliot/khronos/persistent/ElementHelper.java", "license": "apache-2.0", "size": 8470 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,537,077
static public boolean isAssignableFrom (Class c1, Class c2) { Type c1Type = ReflectionCache.getType(c1); Type c2Type = ReflectionCache.getType(c2); return c1Type.isAssignableFrom(c2Type); }
static boolean function (Class c1, Class c2) { Type c1Type = ReflectionCache.getType(c1); Type c2Type = ReflectionCache.getType(c2); return c1Type.isAssignableFrom(c2Type); }
/** Determines if the class or interface represented by first Class parameter is either the same as, or is a superclass or * superinterface of, the class or interface represented by the second Class parameter. */
Determines if the class or interface represented by first Class parameter is either the same as, or is a superclass or
isAssignableFrom
{ "repo_name": "azakhary/libgdx", "path": "backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx/utils/reflect/ClassReflection.java", "license": "apache-2.0", "size": 10401 }
[ "com.badlogic.gwtref.client.ReflectionCache", "com.badlogic.gwtref.client.Type" ]
import com.badlogic.gwtref.client.ReflectionCache; import com.badlogic.gwtref.client.Type;
import com.badlogic.gwtref.client.*;
[ "com.badlogic.gwtref" ]
com.badlogic.gwtref;
1,630,810
private void pirateRecipe(String text) { if ("excitedze".equals(text)) { LanguageManager languagemanager = this.mc.getLanguageManager(); Language language = languagemanager.getLanguage("en_pt"); if (languagemanager.getCurrentLanguage().compareTo(language) == ...
void function(String text) { if (STR.equals(text)) { LanguageManager languagemanager = this.mc.getLanguageManager(); Language language = languagemanager.getLanguage("en_pt"); if (languagemanager.getCurrentLanguage().compareTo(language) == 0) { return; } languagemanager.setCurrentLanguage(language); this.mc.gameSettings...
/** * "Check if we should activate the pirate speak easter egg" * * @param text 'if equal to "excitedze", activate the easter egg' */
"Check if we should activate the pirate speak easter egg"
pirateRecipe
{ "repo_name": "TheGreatAndPowerfulWeegee/wipunknown", "path": "build/tmp/recompileMc/sources/net/minecraft/client/gui/recipebook/GuiRecipeBook.java", "license": "gpl-3.0", "size": 29145 }
[ "net.minecraft.client.resources.Language", "net.minecraft.client.resources.LanguageManager" ]
import net.minecraft.client.resources.Language; import net.minecraft.client.resources.LanguageManager;
import net.minecraft.client.resources.*;
[ "net.minecraft.client" ]
net.minecraft.client;
2,750,507
public void setDocFilePersistence(DocFilePersistence docFilePersistence) { this.docFilePersistence = docFilePersistence; }
void function(DocFilePersistence docFilePersistence) { this.docFilePersistence = docFilePersistence; }
/** * Sets the doc file persistence. * * @param docFilePersistence the doc file persistence */
Sets the doc file persistence
setDocFilePersistence
{ "repo_name": "openegovplatform/OEPv2", "path": "oep-dossier-portlet/docroot/WEB-INF/src/org/oep/dossiermgt/service/base/DossierTagServiceBaseImpl.java", "license": "apache-2.0", "size": 49313 }
[ "org.oep.dossiermgt.service.persistence.DocFilePersistence" ]
import org.oep.dossiermgt.service.persistence.DocFilePersistence;
import org.oep.dossiermgt.service.persistence.*;
[ "org.oep.dossiermgt" ]
org.oep.dossiermgt;
112,463
public void endBook() throws IOException { if (uploadingBook) { uploadingBook = false; write("ENDBOOK"); String line; if (!"ENDBOOKOK".equals(line = read())) throw new IOException("Invalid response " + line); } }
void function() throws IOException { if (uploadingBook) { uploadingBook = false; write(STR); String line; if (!STR.equals(line = read())) throw new IOException(STR + line); } }
/** * Conclude the book upload * * @throws IOException */
Conclude the book upload
endBook
{ "repo_name": "schierla/jbeagle", "path": "src/de/schierla/jbeagle/BeagleConnector.java", "license": "gpl-3.0", "size": 7943 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,636,007
public Optional<ExpandedSwapLeg> getLeg(PayReceive payReceive) { return legs.stream().filter(leg -> leg.getPayReceive() == payReceive).findFirst(); }
Optional<ExpandedSwapLeg> function(PayReceive payReceive) { return legs.stream().filter(leg -> leg.getPayReceive() == payReceive).findFirst(); }
/** * Gets the first pay or receive leg of the swap. * <p> * This returns the first pay or receive leg of the swap, empty if no matching leg. * * @param payReceive the pay or receive flag * @return the first matching leg of the swap */
Gets the first pay or receive leg of the swap. This returns the first pay or receive leg of the swap, empty if no matching leg
getLeg
{ "repo_name": "nssales/Strata", "path": "modules/finance/src/main/java/com/opengamma/strata/finance/rate/swap/ExpandedSwap.java", "license": "apache-2.0", "size": 13585 }
[ "com.opengamma.strata.basics.PayReceive", "java.util.Optional" ]
import com.opengamma.strata.basics.PayReceive; import java.util.Optional;
import com.opengamma.strata.basics.*; import java.util.*;
[ "com.opengamma.strata", "java.util" ]
com.opengamma.strata; java.util;
2,323,709
public static void saveMimeInputStreamAsFile(HttpServletResponse response, String contentType, InputStream inStream, String fileName, int fileSize) throws IOException { // If there are quotes in the name, we should replace them to avoid issues. // The filename will be wrapped with quotes belo...
static void function(HttpServletResponse response, String contentType, InputStream inStream, String fileName, int fileSize) throws IOException { String updateFileName; if(fileName.contains("\"STR\STRSTRContent-dispositionSTRattachment; filename=\STR\STRExpiresSTR0STRCache-ControlSTRmust-revalidate, post-check=0, pre-ch...
/** * A file that is not of type text/plain or text/html can be output through * the response using this method. * * @param response * @param contentType * @param inStream * @param fileName */
A file that is not of type text/plain or text/html can be output through the response using this method
saveMimeInputStreamAsFile
{ "repo_name": "mztaylor/rice-git", "path": "rice-middleware/kns/src/main/java/org/kuali/rice/kns/util/WebUtils.java", "license": "apache-2.0", "size": 38590 }
[ "java.io.IOException", "java.io.InputStream", "java.io.OutputStream", "javax.servlet.http.HttpServletResponse" ]
import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import javax.servlet.http.HttpServletResponse;
import java.io.*; import javax.servlet.http.*;
[ "java.io", "javax.servlet" ]
java.io; javax.servlet;
541,136
public static Request listenForRequest(BluetoothConnection connection) throws IOException { Request request = new Request("", "", connection); return request.listen() ? request : null; }
static Request function(BluetoothConnection connection) throws IOException { Request request = new Request(STR", connection); return request.listen() ? request : null; }
/** * This is a blocking method, which will wait until a full Request is received. */
This is a blocking method, which will wait until a full Request is received
listenForRequest
{ "repo_name": "krakerbelin/AVCPStore", "path": "F-Droid/src/org/fdroid/fdroid/net/bluetooth/httpish/Request.java", "license": "gpl-3.0", "size": 6156 }
[ "java.io.IOException", "org.fdroid.fdroid.net.bluetooth.BluetoothConnection" ]
import java.io.IOException; import org.fdroid.fdroid.net.bluetooth.BluetoothConnection;
import java.io.*; import org.fdroid.fdroid.net.bluetooth.*;
[ "java.io", "org.fdroid.fdroid" ]
java.io; org.fdroid.fdroid;
62,227
public static List<CurrencyCode> getByCountry(String country, boolean caseSensitive) { return getByCountry(CountryCode.getByCode(country, caseSensitive)); }
static List<CurrencyCode> function(String country, boolean caseSensitive) { return getByCountry(CountryCode.getByCode(country, caseSensitive)); }
/** * Get a list of {@code CurrencyCode} instances whose country * list contains the specified country. * * <p> * This method is an alias of {@link #getByCountry(CountryCode) * getByCountry}{@code (}{@link CountryCode}{@code .}{@link * CountryCode#getByCode(String, boolean) getByCode}...
Get a list of CurrencyCode instances whose country list contains the specified country. This method is an alias of <code>#getByCountry(CountryCode) getByCountry</code>(<code>CountryCode</code>.<code>CountryCode#getByCode(String, boolean) getByCode</code>(country, caseSensitive)).
getByCountry
{ "repo_name": "TakahikoKawasaki/nv-i18n", "path": "src/main/java/com/neovisionaries/i18n/CurrencyCode.java", "license": "apache-2.0", "size": 79951 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
226,173
Map<String, TransportConfiguration> getConnectorConfigurations();
Map<String, TransportConfiguration> getConnectorConfigurations();
/** * Returns the connectors configured for this server. */
Returns the connectors configured for this server
getConnectorConfigurations
{ "repo_name": "mnovak1/activemq-artemis", "path": "artemis-server/src/main/java/org/apache/activemq/artemis/core/config/Configuration.java", "license": "apache-2.0", "size": 38918 }
[ "java.util.Map", "org.apache.activemq.artemis.api.core.TransportConfiguration" ]
import java.util.Map; import org.apache.activemq.artemis.api.core.TransportConfiguration;
import java.util.*; import org.apache.activemq.artemis.api.core.*;
[ "java.util", "org.apache.activemq" ]
java.util; org.apache.activemq;
2,695,204
private View makeAndAddView(int position) { View child; if (!mDataChanged) { child = mRecycler.get(position); if (child != null) { // Position the view setUpChild(child); return child; } } // Noth...
View function(int position) { View child; if (!mDataChanged) { child = mRecycler.get(position); if (child != null) { setUpChild(child); return child; } } child = mAdapter.getView(position, null, this); setUpChild(child); return child; }
/** * Obtain a view, either by pulling an existing view from the recycler or * by getting a new one from the adapter. If we are animating, make sure * there is enough information in the view's layout parameters to animate * from the old to new positions. * * @param position Position in the...
Obtain a view, either by pulling an existing view from the recycler or by getting a new one from the adapter. If we are animating, make sure there is enough information in the view's layout parameters to animate from the old to new positions
makeAndAddView
{ "repo_name": "mateor/pdroid", "path": "android-4.0.3_r1/trunk/frameworks/base/core/java/android/widget/Spinner.java", "license": "gpl-3.0", "size": 25688 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
2,334,203
public void setChannel(SubscribableChannel channel) { this.channel = channel; }
void function(SubscribableChannel channel) { this.channel = channel; }
/** * Sets the Spring Messaging Channel that this event bus should publish events to. * * @param channel the channel to publish events to */
Sets the Spring Messaging Channel that this event bus should publish events to
setChannel
{ "repo_name": "soulrebel/AxonFramework", "path": "spring/src/main/java/org/axonframework/spring/messaging/eventbus/SpringMessagingTerminal.java", "license": "apache-2.0", "size": 3679 }
[ "org.springframework.messaging.SubscribableChannel" ]
import org.springframework.messaging.SubscribableChannel;
import org.springframework.messaging.*;
[ "org.springframework.messaging" ]
org.springframework.messaging;
2,048,901
public Set<FieldDescriptor> getSuggestedFields() { return suggestions.keySet(); }
Set<FieldDescriptor> function() { return suggestions.keySet(); }
/** * Gets the fields descriptors which are queried for suggestions. * @return {@link FieldDescriptor} with the suggested fields. */
Gets the fields descriptors which are queried for suggestions
getSuggestedFields
{ "repo_name": "RBMHTechnology/vind", "path": "api/src/main/java/com/rbmhtechnology/vind/api/result/SuggestionResult.java", "license": "apache-2.0", "size": 4464 }
[ "com.rbmhtechnology.vind.model.FieldDescriptor", "java.util.Set" ]
import com.rbmhtechnology.vind.model.FieldDescriptor; import java.util.Set;
import com.rbmhtechnology.vind.model.*; import java.util.*;
[ "com.rbmhtechnology.vind", "java.util" ]
com.rbmhtechnology.vind; java.util;
2,278,468
public Call<ResponseBody> postPathGlobalValidAsync(final ServiceCallback<Void> serviceCallback) { if (this.client.getSubscriptionId() == null) { serviceCallback.failure(new ServiceException( new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and c...
Call<ResponseBody> function(final ServiceCallback<Void> serviceCallback) { if (this.client.getSubscriptionId() == null) { serviceCallback.failure(new ServiceException( new IllegalArgumentException(STR))); }
/** * POST method with subscriptionId modeled in credentials. Set the credential subscriptionId to '1234-5678-9012-3456' to succeed * * @param serviceCallback the async ServiceCallback to handle successful and failed responses. */
POST method with subscriptionId modeled in credentials. Set the credential subscriptionId to '1234-5678-9012-3456' to succeed
postPathGlobalValidAsync
{ "repo_name": "BretJohnson/autorest", "path": "AutoRest/Generators/Java/Azure.Java.Tests/src/main/java/fixtures/azurespecials/SubscriptionInCredentialsImpl.java", "license": "mit", "size": 14802 }
[ "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceException", "com.squareup.okhttp.ResponseBody" ]
import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceException; import com.squareup.okhttp.ResponseBody;
import com.microsoft.rest.*; import com.squareup.okhttp.*;
[ "com.microsoft.rest", "com.squareup.okhttp" ]
com.microsoft.rest; com.squareup.okhttp;
2,204,958
public LoadBalancerInner withProbes(List<ProbeInner> probes) { this.probes = probes; return this; }
LoadBalancerInner function(List<ProbeInner> probes) { this.probes = probes; return this; }
/** * Set the probes value. * * @param probes the probes value to set * @return the LoadBalancerInner object itself. */
Set the probes value
withProbes
{ "repo_name": "pomortaz/azure-sdk-for-java", "path": "azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerInner.java", "license": "mit", "size": 8731 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,599,114
public void debugPrint(Writer out, String prefix, boolean verbose) { IndentingWriter iw = new IndentingWriter(out, 0, prefix); int sz = size(); try { for (int i = 0; i < sz; i++) { DalvInsn insn = (DalvInsn) get0(i); String s; if ...
void function(Writer out, String prefix, boolean verbose) { IndentingWriter iw = new IndentingWriter(out, 0, prefix); int sz = size(); try { for (int i = 0; i < sz; i++) { DalvInsn insn = (DalvInsn) get0(i); String s; if ((insn.codeSize() != 0) verbose) { s = insn.listingString("", 0, verbose); } else { s = null; } if ...
/** * Does a human-friendly dump of this instance. * * @param out {@code non-null;} where to dump * @param prefix {@code non-null;} prefix to attach to each line of output * @param verbose whether to be verbose; verbose output includes * lines for zero-size instructions and explicit consta...
Does a human-friendly dump of this instance
debugPrint
{ "repo_name": "alibaba/atlas", "path": "atlas-gradle-plugin/dexpatch/src/main/java/com/taobao/android/dx/dex/code/DalvInsnList.java", "license": "apache-2.0", "size": 8339 }
[ "com.taobao.android.dx.util.IndentingWriter", "java.io.IOException", "java.io.Writer" ]
import com.taobao.android.dx.util.IndentingWriter; import java.io.IOException; import java.io.Writer;
import com.taobao.android.dx.util.*; import java.io.*;
[ "com.taobao.android", "java.io" ]
com.taobao.android; java.io;
779,305
public void setInventorySlotContents(int par1, ItemStack par2ItemStack) { this.theInventory[par1] = par2ItemStack; if (par2ItemStack != null && par2ItemStack.stackSize > this.getInventoryStackLimit()) { par2ItemStack.stackSize = this.getInventoryStackLimit(); } ...
void function(int par1, ItemStack par2ItemStack) { this.theInventory[par1] = par2ItemStack; if (par2ItemStack != null && par2ItemStack.stackSize > this.getInventoryStackLimit()) { par2ItemStack.stackSize = this.getInventoryStackLimit(); } if (this.inventoryResetNeededOnSlotChange(par1)) { this.resetRecipeAndSlots(); } ...
/** * Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections). */
Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections)
setInventorySlotContents
{ "repo_name": "wildex999/stjerncraft_mcpc", "path": "src/minecraft/net/minecraft/inventory/InventoryMerchant.java", "license": "gpl-3.0", "size": 7957 }
[ "net.minecraft.item.ItemStack" ]
import net.minecraft.item.ItemStack;
import net.minecraft.item.*;
[ "net.minecraft.item" ]
net.minecraft.item;
1,216,034
public static java.util.Set extractCatsReferralSet(ims.domain.ILightweightDomainFactory domainFactory, ims.RefMan.vo.CatsReferralForClinicListVoCollection voCollection) { return extractCatsReferralSet(domainFactory, voCollection, null, new HashMap()); }
static java.util.Set function(ims.domain.ILightweightDomainFactory domainFactory, ims.RefMan.vo.CatsReferralForClinicListVoCollection voCollection) { return extractCatsReferralSet(domainFactory, voCollection, null, new HashMap()); }
/** * Create the ims.RefMan.domain.objects.CatsReferral set from the value object collection. * @param domainFactory - used to create existing (persistent) domain objects. * @param voCollection - the collection of value objects */
Create the ims.RefMan.domain.objects.CatsReferral set from the value object collection
extractCatsReferralSet
{ "repo_name": "FreudianNM/openMAXIMS", "path": "Source Library/openmaxims_workspace/ValueObjects/src/ims/RefMan/vo/domain/CatsReferralForClinicListVoAssembler.java", "license": "agpl-3.0", "size": 18310 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
920,455
public String toTextString() { ByteArrayOutputStream out = new ByteArrayOutputStream(); InputStream input = null; try { input = createInputStream(); IOUtils.copy(input, out); } catch (IOException e) { return ""; } finally { IOUtils.closeQuietly(input); } COSString s...
String function() { ByteArrayOutputStream out = new ByteArrayOutputStream(); InputStream input = null; try { input = createInputStream(); IOUtils.copy(input, out); } catch (IOException e) { return ""; } finally { IOUtils.closeQuietly(input); } COSString string = new COSString(out.toByteArray()); return string.getString...
/** * Returns the contents of the stream as a PDF "text string". */
Returns the contents of the stream as a PDF "text string"
toTextString
{ "repo_name": "gavanx/pdflearn", "path": "pdfbox/src/main/java/org/apache/pdfbox/cos/COSStream.java", "license": "apache-2.0", "size": 11813 }
[ "java.io.ByteArrayOutputStream", "java.io.IOException", "java.io.InputStream", "org.apache.pdfbox.io.IOUtils" ]
import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import org.apache.pdfbox.io.IOUtils;
import java.io.*; import org.apache.pdfbox.io.*;
[ "java.io", "org.apache.pdfbox" ]
java.io; org.apache.pdfbox;
2,566,572
public Builder setProperty(IProperty<?> mappedProperty) { property = mappedProperty; return this; }
Builder function(IProperty<?> mappedProperty) { property = mappedProperty; return this; }
/** * Sets the property used when mapping states to resource locations. */
Sets the property used when mapping states to resource locations
setProperty
{ "repo_name": "BlazeLoader/BlazeLoader", "path": "src/client/com/blazeloader/api/client/ModStateMap.java", "license": "bsd-2-clause", "size": 3307 }
[ "net.minecraft.block.properties.IProperty" ]
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.properties.*;
[ "net.minecraft.block" ]
net.minecraft.block;
2,827,784
public static void writeMyEphemeralNodeOnDisk(String fileContent) { String fileName = ZNodeClearer.getMyEphemeralNodeFileName(); if (fileName == null) { LOG.warn("Environment variable HBASE_ZNODE_FILE not set; znodes will not be cleared " + "on crash by start scripts (Longer MTTR!)"); re...
static void function(String fileContent) { String fileName = ZNodeClearer.getMyEphemeralNodeFileName(); if (fileName == null) { LOG.warn(STR + STR); return; } FileWriter fstream; try { fstream = new FileWriter(fileName); } catch (IOException e) { LOG.warn(STR+fileName, e); return; } BufferedWriter out = new BufferedWri...
/** * Logs the errors without failing on exception. */
Logs the errors without failing on exception
writeMyEphemeralNodeOnDisk
{ "repo_name": "JingchengDu/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/ZNodeClearer.java", "license": "apache-2.0", "size": 7295 }
[ "java.io.BufferedWriter", "java.io.FileWriter", "java.io.IOException" ]
import java.io.BufferedWriter; import java.io.FileWriter; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,158,740
public static int getIntValue(Element ele, String tagName) { //in production application you would catch the exception return Integer.parseInt(getTextValue(ele, tagName)); }
static int function(Element ele, String tagName) { return Integer.parseInt(getTextValue(ele, tagName)); }
/** * Calls getTextValue and returns a int value * * @param ele * @param tagName * @return */
Calls getTextValue and returns a int value
getIntValue
{ "repo_name": "marpet/seadas", "path": "seadas-processing/src/main/java/gov/nasa/gsfc/seadas/processing/general/XmlReader.java", "license": "gpl-3.0", "size": 2900 }
[ "org.w3c.dom.Element" ]
import org.w3c.dom.Element;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
2,347,417
static public long executeUpdate(// final BigdataSailRepositoryConnection conn,// final ASTContainer astContainer,// final Dataset dataset, final boolean includeInferred,// final QueryBindingSet bs ) throws UpdateExecutionException { ...
static long function( final BigdataSailRepositoryConnection conn, final ASTContainer astContainer, final Dataset dataset, final boolean includeInferred, final QueryBindingSet bs ) throws UpdateExecutionException { if(conn == null) throw new IllegalArgumentException(); if(astContainer == null) throw new IllegalArgumentE...
/** * Evaluate a SPARQL UPDATE request (core method). * * @param astContainer * The query model. * @param ctx * The evaluation context. * @param dataset * A dataset which will override the data set declaration for * each ...
Evaluate a SPARQL UPDATE request (core method)
executeUpdate
{ "repo_name": "blazegraph/database", "path": "bigdata-core/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/eval/ASTEvalHelper.java", "license": "gpl-2.0", "size": 48261 }
[ "com.bigdata.bop.IBindingSet", "com.bigdata.rdf.sail.BigdataSailRepositoryConnection", "com.bigdata.rdf.sparql.ast.ASTContainer", "com.bigdata.rdf.sparql.ast.eval.ASTDeferredIVResolution", "org.openrdf.query.Dataset", "org.openrdf.query.MalformedQueryException", "org.openrdf.query.UpdateExecutionExcepti...
import com.bigdata.bop.IBindingSet; import com.bigdata.rdf.sail.BigdataSailRepositoryConnection; import com.bigdata.rdf.sparql.ast.ASTContainer; import com.bigdata.rdf.sparql.ast.eval.ASTDeferredIVResolution; import org.openrdf.query.Dataset; import org.openrdf.query.MalformedQueryException; import org.openrdf.query.Up...
import com.bigdata.bop.*; import com.bigdata.rdf.sail.*; import com.bigdata.rdf.sparql.ast.*; import com.bigdata.rdf.sparql.ast.eval.*; import org.openrdf.query.*; import org.openrdf.query.algebra.evaluation.*;
[ "com.bigdata.bop", "com.bigdata.rdf", "org.openrdf.query" ]
com.bigdata.bop; com.bigdata.rdf; org.openrdf.query;
975,504
private void onSpam(List<MessageReference> messages) { if (QMail.confirmSpam()) { // remember the message selection for #onCreateDialog(int) activeMessages = messages; showDialog(R.id.dialog_confirm_spam); } else { onSpamConfirmed(messages); } ...
void function(List<MessageReference> messages) { if (QMail.confirmSpam()) { activeMessages = messages; showDialog(R.id.dialog_confirm_spam); } else { onSpamConfirmed(messages); } }
/** * Move messages to the spam folder. * * @param messages * The messages to move to the spam folder. Never {@code null}. */
Move messages to the spam folder
onSpam
{ "repo_name": "philipwhiuk/q-mail", "path": "qmail/src/main/java/com/fsck/k9/fragment/MessageListFragment.java", "license": "apache-2.0", "size": 101650 }
[ "com.fsck.k9.QMail", "com.fsck.k9.activity.MessageReference", "java.util.List" ]
import com.fsck.k9.QMail; import com.fsck.k9.activity.MessageReference; import java.util.List;
import com.fsck.k9.*; import com.fsck.k9.activity.*; import java.util.*;
[ "com.fsck.k9", "java.util" ]
com.fsck.k9; java.util;
2,311,832
private int indexOfUnclosedParen() { final int cursor = textArea.getCaretPosition(); final String text = textArea.getText(); final Stack<Integer> stack = new Stack<Integer>(); int column = 0; for (int i = 0; i < cursor; i++) { final char c = text.charAt(i); if (isOpen(c)) { sta...
int function() { final int cursor = textArea.getCaretPosition(); final String text = textArea.getText(); final Stack<Integer> stack = new Stack<Integer>(); int column = 0; for (int i = 0; i < cursor; i++) { final char c = text.charAt(i); if (isOpen(c)) { stack.push(column); } else if (isClose(c)) { if (stack.size() == ...
/** * Search for an unterminated paren or bracket. If found, return * its index in the given text. Otherwise return -1. * <p>Ignores syntax errors, treating (foo] as a valid construct. * <p>Assumes that the text contains no surrogate characters. * @param cursor The current cursor position in the given te...
Search for an unterminated paren or bracket. If found, return its index in the given text. Otherwise return -1. Ignores syntax errors, treating (foo] as a valid construct. Assumes that the text contains no surrogate characters
indexOfUnclosedParen
{ "repo_name": "tildebyte/processing.py", "path": "runtime/src/jycessing/mode/PyInputHandler.java", "license": "apache-2.0", "size": 13459 }
[ "java.util.Stack" ]
import java.util.Stack;
import java.util.*;
[ "java.util" ]
java.util;
647,847
BufferedImage createZoomedLensImage(BufferedImage image) { if (lens == null) return null; try { return lens.createZoomedImage(image); } catch(Exception e) { return null; } }
BufferedImage createZoomedLensImage(BufferedImage image) { if (lens == null) return null; try { return lens.createZoomedImage(image); } catch(Exception e) { return null; } }
/** * Creates a zoomed version of the passed image. * * @param image The image to zoom. * @return See above. * @throws Exception */
Creates a zoomed version of the passed image
createZoomedLensImage
{ "repo_name": "tp81/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/agents/imviewer/view/ImViewerUI.java", "license": "gpl-2.0", "size": 80326 }
[ "java.awt.image.BufferedImage" ]
import java.awt.image.BufferedImage;
import java.awt.image.*;
[ "java.awt" ]
java.awt;
2,009,909
public final BasicTransform getBasicTransform( ) { BasicTransform basicTransform = null; try { if( _basicTransform == null ) throw new JWaveFailure( "Transform - BasicTransform object is null!" ); if( !( _basicTransform instanceof BasicTransform ) ) throw new JWaveFailure( "Tra...
final BasicTransform function( ) { BasicTransform basicTransform = null; try { if( _basicTransform == null ) throw new JWaveFailure( STR ); if( !( _basicTransform instanceof BasicTransform ) ) throw new JWaveFailure( STR + STR ); basicTransform = _basicTransform; } catch( JWaveException e ) { e.showMessage( ); e.printS...
/** * Return the used object of type BasicTransform. * * @author Christian Scheiblich (cscheiblich@gmail.com) * @date 14.03.2015 18:19:13 * @return identifier of object of type Basic Transform */
Return the used object of type BasicTransform
getBasicTransform
{ "repo_name": "RaineForest/ECG-Viewer", "path": "JWave/src/math/jwave/Transform.java", "license": "gpl-2.0", "size": 16283 }
[ "math.jwave.exceptions.JWaveException", "math.jwave.exceptions.JWaveFailure", "math.jwave.transforms.BasicTransform" ]
import math.jwave.exceptions.JWaveException; import math.jwave.exceptions.JWaveFailure; import math.jwave.transforms.BasicTransform;
import math.jwave.exceptions.*; import math.jwave.transforms.*;
[ "math.jwave.exceptions", "math.jwave.transforms" ]
math.jwave.exceptions; math.jwave.transforms;
1,433,996
public void earlyReadonly(final String serviceURI, final CoordinationContextType coordinationContext) throws SoapFault, IOException { final String messageId = MessageId.getMessageId() ; final MAP map = AddressingHelper.createRequestContext(serviceURI, messageId) ; SyncPa...
void function(final String serviceURI, final CoordinationContextType coordinationContext) throws SoapFault, IOException { final String messageId = MessageId.getMessageId() ; final MAP map = AddressingHelper.createRequestContext(serviceURI, messageId) ; SyncParticipantClient.getClient().sendEarlyReadonly(coordinationCon...
/** * Send an earlyReadonly request. * @param serviceURI The target service URI. * @param coordinationContext The coordination context. * @throws SoapFault For any errors. * @throws IOException for any transport errors. */
Send an earlyReadonly request
earlyReadonly
{ "repo_name": "nmcl/scratch", "path": "graalvm/transactions/fork/narayana/XTS/localjunit/WSTFSC07-interop/src/main/java/com/jboss/transaction/wstf/webservices/sc007/SyncParticipantStub.java", "license": "apache-2.0", "size": 11630 }
[ "com.arjuna.webservices.SoapFault", "com.arjuna.webservices11.wsaddr.AddressingHelper", "com.arjuna.wsc11.messaging.MessageId", "com.jboss.transaction.wstf.webservices.sc007.client.SyncParticipantClient", "java.io.IOException", "org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationContextType" ]
import com.arjuna.webservices.SoapFault; import com.arjuna.webservices11.wsaddr.AddressingHelper; import com.arjuna.wsc11.messaging.MessageId; import com.jboss.transaction.wstf.webservices.sc007.client.SyncParticipantClient; import java.io.IOException; import org.oasis_open.docs.ws_tx.wscoor._2006._06.CoordinationConte...
import com.arjuna.webservices.*; import com.arjuna.webservices11.wsaddr.*; import com.arjuna.wsc11.messaging.*; import com.jboss.transaction.wstf.webservices.sc007.client.*; import java.io.*; import org.oasis_open.docs.ws_tx.wscoor.*;
[ "com.arjuna.webservices", "com.arjuna.webservices11", "com.arjuna.wsc11", "com.jboss.transaction", "java.io", "org.oasis_open.docs" ]
com.arjuna.webservices; com.arjuna.webservices11; com.arjuna.wsc11; com.jboss.transaction; java.io; org.oasis_open.docs;
1,364,808
public ServerState userVisibleState() { return this.userVisibleState; }
ServerState function() { return this.userVisibleState; }
/** * Get a state of a server that is visible to user. Possible values include: 'Ready', 'Dropping', 'Disabled'. * * @return the userVisibleState value */
Get a state of a server that is visible to user. Possible values include: 'Ready', 'Dropping', 'Disabled'
userVisibleState
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/mysql/mgmt-v2017_12_01/src/main/java/com/microsoft/azure/management/mysql/v2017_12_01/implementation/ServerInner.java", "license": "mit", "size": 9224 }
[ "com.microsoft.azure.management.mysql.v2017_12_01.ServerState" ]
import com.microsoft.azure.management.mysql.v2017_12_01.ServerState;
import com.microsoft.azure.management.mysql.v2017_12_01.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
960,921
@BetaApi("A restructuring of stub classes is planned, so this may break in the future") public static final VideoIntelligenceServiceClient create(VideoIntelligenceServiceStub stub) { return new VideoIntelligenceServiceClient(stub); } protected VideoIntelligenceServiceClient(VideoIntelligenceServiceSetti...
@BetaApi(STR) static final VideoIntelligenceServiceClient function(VideoIntelligenceServiceStub stub) { return new VideoIntelligenceServiceClient(stub); } protected VideoIntelligenceServiceClient(VideoIntelligenceServiceSettings settings) throws IOException { this.settings = settings; this.stub = ((VideoIntelligenceSer...
/** * Constructs an instance of VideoIntelligenceServiceClient, using the given stub for making * calls. This is for advanced usage - prefer using create(VideoIntelligenceServiceSettings). */
Constructs an instance of VideoIntelligenceServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(VideoIntelligenceServiceSettings)
create
{ "repo_name": "googleapis/java-video-intelligence", "path": "google-cloud-video-intelligence/src/main/java/com/google/cloud/videointelligence/v1/VideoIntelligenceServiceClient.java", "license": "apache-2.0", "size": 13781 }
[ "com.google.api.core.BetaApi", "com.google.cloud.videointelligence.v1.stub.VideoIntelligenceServiceStub", "com.google.cloud.videointelligence.v1.stub.VideoIntelligenceServiceStubSettings", "com.google.longrunning.OperationsClient", "java.io.IOException" ]
import com.google.api.core.BetaApi; import com.google.cloud.videointelligence.v1.stub.VideoIntelligenceServiceStub; import com.google.cloud.videointelligence.v1.stub.VideoIntelligenceServiceStubSettings; import com.google.longrunning.OperationsClient; import java.io.IOException;
import com.google.api.core.*; import com.google.cloud.videointelligence.v1.stub.*; import com.google.longrunning.*; import java.io.*;
[ "com.google.api", "com.google.cloud", "com.google.longrunning", "java.io" ]
com.google.api; com.google.cloud; com.google.longrunning; java.io;
1,901,716
protected UserSession replaceSessionWithRoutedBy(Award parentAward) { String routedByUserId = parentAward.getAwardDocument().getDocumentHeader().getWorkflowDocument().getRoutedByPrincipalId(); Person person = getPersonService().getPerson(routedByUserId); UserSession oldSession = GlobalVariab...
UserSession function(Award parentAward) { String routedByUserId = parentAward.getAwardDocument().getDocumentHeader().getWorkflowDocument().getRoutedByPrincipalId(); Person person = getPersonService().getPerson(routedByUserId); UserSession oldSession = GlobalVariables.getUserSession(); GlobalVariables.setUserSession(new...
/** * Replace the UserSession with one for the user who routed the parent award. * @param parentAward * @return */
Replace the UserSession with one for the user who routed the parent award
replaceSessionWithRoutedBy
{ "repo_name": "sanjupolus/KC6.oLatest", "path": "coeus-impl/src/main/java/org/kuali/kra/award/awardhierarchy/sync/service/AwardSyncServiceImpl.java", "license": "agpl-3.0", "size": 43278 }
[ "org.kuali.kra.award.home.Award", "org.kuali.rice.kim.api.identity.Person", "org.kuali.rice.krad.UserSession", "org.kuali.rice.krad.util.GlobalVariables" ]
import org.kuali.kra.award.home.Award; import org.kuali.rice.kim.api.identity.Person; import org.kuali.rice.krad.UserSession; import org.kuali.rice.krad.util.GlobalVariables;
import org.kuali.kra.award.home.*; import org.kuali.rice.kim.api.identity.*; import org.kuali.rice.krad.*; import org.kuali.rice.krad.util.*;
[ "org.kuali.kra", "org.kuali.rice" ]
org.kuali.kra; org.kuali.rice;
957,394
PlatformAsyncResult processInStreamAsync(int type, BinaryRawReaderEx reader) throws IgniteCheckedException;
PlatformAsyncResult processInStreamAsync(int type, BinaryRawReaderEx reader) throws IgniteCheckedException;
/** * Process asynchronous operation. * * @param type Type. * @param reader Binary reader. * @return Async result (should not be null). * @throws IgniteCheckedException In case of exception. */
Process asynchronous operation
processInStreamAsync
{ "repo_name": "samaitra/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformTarget.java", "license": "apache-2.0", "size": 4177 }
[ "org.apache.ignite.IgniteCheckedException", "org.apache.ignite.internal.binary.BinaryRawReaderEx" ]
import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.internal.binary.BinaryRawReaderEx;
import org.apache.ignite.*; import org.apache.ignite.internal.binary.*;
[ "org.apache.ignite" ]
org.apache.ignite;
2,707,413
private void checkClosed() { getParent().getCancelCriterion().checkCancelInProgress(null); if (!this.closed) { return; } throw new OplogCancelledException("This Oplog has been closed."); }
void function() { getParent().getCancelCriterion().checkCancelInProgress(null); if (!this.closed) { return; } throw new OplogCancelledException(STR); }
/** * A check to confirm that the oplog has been closed because of the cache being closed * */
A check to confirm that the oplog has been closed because of the cache being closed
checkClosed
{ "repo_name": "deepakddixit/incubator-geode", "path": "geode-core/src/main/java/org/apache/geode/internal/cache/Oplog.java", "license": "apache-2.0", "size": 283255 }
[ "org.apache.geode.distributed.OplogCancelledException" ]
import org.apache.geode.distributed.OplogCancelledException;
import org.apache.geode.distributed.*;
[ "org.apache.geode" ]
org.apache.geode;
307,100
// [START list_datasets] public static void listDatasets(final Bigquery bigquery, final String projectId) throws IOException { Datasets.List datasetRequest = bigquery.datasets().list(projectId); DatasetList datasetList = datasetRequest.execute(); if (datasetList.getDatasets() != null) { Lis...
static void function(final Bigquery bigquery, final String projectId) throws IOException { Datasets.List datasetRequest = bigquery.datasets().list(projectId); DatasetList datasetList = datasetRequest.execute(); if (datasetList.getDatasets() != null) { List<DatasetList.Datasets> datasets = datasetList.getDatasets(); Sys...
/** * Display all BigQuery datasets associated with a project. * * @param bigquery an authorized BigQuery client * @param projectId a string containing the current project ID * @throws IOException Thrown if there is a network error connecting to * Bigquery. */
Display all BigQuery datasets associated with a project
listDatasets
{ "repo_name": "ErinJoan/mostly_empty_directory", "path": "bigquery/src/main/java/com/google/cloud/bigquery/samples/BigqueryUtils.java", "license": "apache-2.0", "size": 6350 }
[ "com.google.api.services.bigquery.Bigquery", "com.google.api.services.bigquery.model.DatasetList", "java.io.IOException", "java.util.List" ]
import com.google.api.services.bigquery.Bigquery; import com.google.api.services.bigquery.model.DatasetList; import java.io.IOException; import java.util.List;
import com.google.api.services.bigquery.*; import com.google.api.services.bigquery.model.*; import java.io.*; import java.util.*;
[ "com.google.api", "java.io", "java.util" ]
com.google.api; java.io; java.util;
1,350,269
public synchronized <SK,PK,E1,E2 extends E1> SecondaryIndex<SK,PK,E2> getSecondaryIndex(PrimaryIndex<PK,E1> primaryIndex, Class<E2> entityClass, String entityClassName, Class<SK> keyClass, String keyClass...
synchronized <SK,PK,E1,E2 extends E1> SecondaryIndex<SK,PK,E2> function(PrimaryIndex<PK,E1> primaryIndex, Class<E2> entityClass, String entityClassName, Class<SK> keyClass, String keyClassName, String keyName) throws DatabaseException { assert (rawAccess && keyClassName == null) (!rawAccess && keyClassName != null); ch...
/** * A getSecondaryIndex with extra parameters for opening a raw store. * keyClassName is used for consistency checking and should be null for a * raw store only. */
A getSecondaryIndex with extra parameters for opening a raw store. keyClassName is used for consistency checking and should be null for a raw store only
getSecondaryIndex
{ "repo_name": "plast-lab/DelphJ", "path": "examples/berkeleydb/com/sleepycat/persist/impl/Store.java", "license": "mit", "size": 55422 }
[ "com.sleepycat.je.DatabaseException", "com.sleepycat.persist.PrimaryIndex", "com.sleepycat.persist.SecondaryIndex", "com.sleepycat.persist.model.EntityMetadata", "com.sleepycat.persist.model.SecondaryKeyMetadata" ]
import com.sleepycat.je.DatabaseException; import com.sleepycat.persist.PrimaryIndex; import com.sleepycat.persist.SecondaryIndex; import com.sleepycat.persist.model.EntityMetadata; import com.sleepycat.persist.model.SecondaryKeyMetadata;
import com.sleepycat.je.*; import com.sleepycat.persist.*; import com.sleepycat.persist.model.*;
[ "com.sleepycat.je", "com.sleepycat.persist" ]
com.sleepycat.je; com.sleepycat.persist;
427,715
public File getSelectedNode(){ return selectedNode_; }
File function(){ return selectedNode_; }
/** * Methode d'acces pour l'attribut selectedNode_ * @return */
Methode d'acces pour l'attribut selectedNode_
getSelectedNode
{ "repo_name": "Fidouda/LOG8430", "path": "TP1Option1/src/Model/SimpleModel.java", "license": "gpl-2.0", "size": 5564 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
2,111,522
@ServiceMethod(returns = ReturnType.SINGLE) public FrontendIpConfigurationInner get( String resourceGroupName, String loadBalancerName, String frontendIpConfigurationName) { return getAsync(resourceGroupName, loadBalancerName, frontendIpConfigurationName).block(); }
@ServiceMethod(returns = ReturnType.SINGLE) FrontendIpConfigurationInner function( String resourceGroupName, String loadBalancerName, String frontendIpConfigurationName) { return getAsync(resourceGroupName, loadBalancerName, frontendIpConfigurationName).block(); }
/** * Gets load balancer frontend IP configuration. * * @param resourceGroupName The name of the resource group. * @param loadBalancerName The name of the load balancer. * @param frontendIpConfigurationName The name of the frontend IP configuration. * @throws IllegalArgumentException throw...
Gets load balancer frontend IP configuration
get
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/LoadBalancerFrontendIpConfigurationsClientImpl.java", "license": "mit", "size": 24678 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.resourcemanager.network.fluent.models.FrontendIpConfigurationInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.network.fluent.models.FrontendIpConfigurationInner;
import com.azure.core.annotation.*; import com.azure.resourcemanager.network.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,090,979
public void initMetaData() { EiColumn eiColumn; eiColumn = new EiColumn("providerId"); eiColumn.setFieldLength(10); eiColumn.setDescName("供应商代码"); eiMetadata.addMeta(eiColumn); eiColumn = new EiColumn("providerName"); eiColumn.setFieldLength(100); eiColumn.setDescName("供应商名称"); eiMetadata...
void function() { EiColumn eiColumn; eiColumn = new EiColumn(STR); eiColumn.setFieldLength(10); eiColumn.setDescName("供应商代码"); eiMetadata.addMeta(eiColumn); eiColumn = new EiColumn(STR); eiColumn.setFieldLength(100); eiColumn.setDescName("供应商名称"); eiMetadata.addMeta(eiColumn); eiColumn = new EiColumn(STR); eiColumn.set...
/** * initialize the metadata */
initialize the metadata
initMetaData
{ "repo_name": "stserp/erp1", "path": "source/src/com/baosight/sts/st/rp/domain/STRP0104.java", "license": "apache-2.0", "size": 17401 }
[ "com.baosight.iplat4j.core.ei.EiColumn" ]
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.ei.*;
[ "com.baosight.iplat4j" ]
com.baosight.iplat4j;
734,063
EReference getPhysicalDevice_LogicalDevice();
EReference getPhysicalDevice_LogicalDevice();
/** * Returns the meta object for the reference list '{@link COSEM.PhysicalDevice#getLogicalDevice <em>Logical Device</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the reference list '<em>Logical Device</em>'. * @see COSEM.PhysicalDevice#getLogicalDevice() * @see #g...
Returns the meta object for the reference list '<code>COSEM.PhysicalDevice#getLogicalDevice Logical Device</code>'.
getPhysicalDevice_LogicalDevice
{ "repo_name": "georghinkel/ttc2017smartGrids", "path": "solutions/ModelJoin/src/main/java/COSEM/COSEMPackage.java", "license": "mit", "size": 60487 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,873,378
if (isInited) return (MindstormsPackage)EPackage.Registry.INSTANCE.getEPackage(MindstormsPackage.eNS_URI); // Obtain or create and register package MindstormsPackageImpl theMindstormsPackage = (MindstormsPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof MindstormsPackageImpl ? EPackage.Registry.INS...
if (isInited) return (MindstormsPackage)EPackage.Registry.INSTANCE.getEPackage(MindstormsPackage.eNS_URI); MindstormsPackageImpl theMindstormsPackage = (MindstormsPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof MindstormsPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new MindstormsPackageImpl()...
/** * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. * * <p>This method is used to initialize {@link MindstormsPackage#eINSTANCE} when that field is accessed. * Clients should not invoke it directly. Instead, they should simply access that field...
Creates, registers, and initializes the Package for this model, and for any others upon which it depends. This method is used to initialize <code>MindstormsPackage#eINSTANCE</code> when that field is accessed. Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
init
{ "repo_name": "mbats/mindstorms", "path": "plugins/fr.obeo.dsl.mindstorms/src-gen/fr/obeo/dsl/mindstorms/impl/MindstormsPackageImpl.java", "license": "epl-1.0", "size": 32889 }
[ "fr.obeo.dsl.mindstorms.MindstormsPackage", "org.eclipse.emf.ecore.EPackage" ]
import fr.obeo.dsl.mindstorms.MindstormsPackage; import org.eclipse.emf.ecore.EPackage;
import fr.obeo.dsl.mindstorms.*; import org.eclipse.emf.ecore.*;
[ "fr.obeo.dsl", "org.eclipse.emf" ]
fr.obeo.dsl; org.eclipse.emf;
2,647,808
default Optional<String> parameter(String parameter) { List<String> values = parameters().get(parameter); if (values != null) { return Optional.ofNullable(values.get(0)); } else { return Optional.empty(); } } /** * The headers of the request message. * Deprecated in favor of {@l...
default Optional<String> parameter(String parameter) { List<String> values = parameters().get(parameter); if (values != null) { return Optional.ofNullable(values.get(0)); } else { return Optional.empty(); } } /** * The headers of the request message. * Deprecated in favor of {@link Request#headerEntries()}
/** * A uri query parameter of the request message, or empty if no parameter with that name is found. * Returns the first query parameter value if it is repeated. Use {@link #parameters()} to get * all repeated values. */
A uri query parameter of the request message, or empty if no parameter with that name is found. Returns the first query parameter value if it is repeated. Use <code>#parameters()</code> to get all repeated values
parameter
{ "repo_name": "spotify/apollo", "path": "apollo-api/src/main/java/com/spotify/apollo/Request.java", "license": "apache-2.0", "size": 5271 }
[ "java.util.List", "java.util.Optional" ]
import java.util.List; import java.util.Optional;
import java.util.*;
[ "java.util" ]
java.util;
2,546,444
public boolean isUseableByPlayer(EntityPlayer par1EntityPlayer) { return this.worldObj.getTileEntity(this.xCoord, this.yCoord, this.zCoord) != this ? false : par1EntityPlayer.getDistanceSq((double)this.xCoord + 0.5D, (double)this.yCoord + 0.5D, (double)this.zCoord + 0.5D) <= 64.0D; } publi...
boolean function(EntityPlayer par1EntityPlayer) { return this.worldObj.getTileEntity(this.xCoord, this.yCoord, this.zCoord) != this ? false : par1EntityPlayer.getDistanceSq((double)this.xCoord + 0.5D, (double)this.yCoord + 0.5D, (double)this.zCoord + 0.5D) <= 64.0D; } public void openInventory() {}
/** * Do not make give this method the name canInteractWith because it clashes with Container */
Do not make give this method the name canInteractWith because it clashes with Container
isUseableByPlayer
{ "repo_name": "NEMESIS13cz/Evercraft", "path": "java/evercraft/NEMESIS13cz/TileEntity/TileEntity/TileEntityEnricher.java", "license": "gpl-3.0", "size": 20611 }
[ "net.minecraft.entity.player.EntityPlayer" ]
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.*;
[ "net.minecraft.entity" ]
net.minecraft.entity;
2,441,548
public void testGetQueueDefault() { HttpServletRequest req = createMock(HttpServletRequest.class); expect(req.getHeader("X-AppEngine-QueueName")).andReturn(null); expect(req.getParameter(AppEngineJobContext.JOB_ID_PARAMETER_NAME)) .andReturn(jobId.toString()) .anyTimes(); replay(req); ...
void function() { HttpServletRequest req = createMock(HttpServletRequest.class); expect(req.getHeader(STR)).andReturn(null); expect(req.getParameter(AppEngineJobContext.JOB_ID_PARAMETER_NAME)) .andReturn(jobId.toString()) .anyTimes(); replay(req); Configuration conf = new Configuration(false); persistMRState(jobId, con...
/** * Ensures that {@link AppEngineJobContext#getWorkerQueue()} falls back * to the default queue. */
Ensures that <code>AppEngineJobContext#getWorkerQueue()</code> falls back to the default queue
testGetQueueDefault
{ "repo_name": "bradseefeld/AppEngine-MapReduce", "path": "test/com/google/appengine/tools/mapreduce/AppEngineJobContextTest.java", "license": "apache-2.0", "size": 7038 }
[ "javax.servlet.http.HttpServletRequest", "org.apache.hadoop.conf.Configuration", "org.easymock.EasyMock" ]
import javax.servlet.http.HttpServletRequest; import org.apache.hadoop.conf.Configuration; import org.easymock.EasyMock;
import javax.servlet.http.*; import org.apache.hadoop.conf.*; import org.easymock.*;
[ "javax.servlet", "org.apache.hadoop", "org.easymock" ]
javax.servlet; org.apache.hadoop; org.easymock;
1,482,675
@Override public boolean supportsGroupByUnrelated() throws SQLException { return realDatabaseMetaData.supportsGroupByUnrelated(); }
boolean function() throws SQLException { return realDatabaseMetaData.supportsGroupByUnrelated(); }
/** * Retrieves whether this database supports using a column that is * not in the <code>SELECT</code> statement in a * <code>GROUP BY</code> clause. * * @return <code>true</code> if so; <code>false</code> otherwise * @throws SQLException if a database access error occurs */
Retrieves whether this database supports using a column that is not in the <code>SELECT</code> statement in a <code>GROUP BY</code> clause
supportsGroupByUnrelated
{ "repo_name": "mattyb149/pdi-presto-jdbc", "path": "src/main/java/org/pentaho/community/di/plugins/database/presto/delegate/DelegateDatabaseMetaData.java", "license": "apache-2.0", "size": 148362 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,219,059