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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
@Test
public void testExtractArgumentsFromEvent() {
System.out.println("extractArgumentsFromEvent");
ActionEvent e = null;
AbstractJssComboAction instance = new AbstractJssComboActionImpl();
String[] expResult = null;
String[] result = instance.extractArgumentsFromEvent(e);
assertArrayEquals... | void function() { System.out.println(STR); ActionEvent e = null; AbstractJssComboAction instance = new AbstractJssComboActionImpl(); String[] expResult = null; String[] result = instance.extractArgumentsFromEvent(e); assertArrayEquals(expResult, result); } | /**
* Test of extractArgumentsFromEvent method, of class AbstractJssComboAction.
*/ | Test of extractArgumentsFromEvent method, of class AbstractJssComboAction | testExtractArgumentsFromEvent | {
"repo_name": "madmath03/JSwingShell",
"path": "src/test/java/jswingshell/action/AbstractJssComboActionTest.java",
"license": "mit",
"size": 11312
} | [
"java.awt.event.ActionEvent",
"org.junit.Assert"
] | import java.awt.event.ActionEvent; import org.junit.Assert; | import java.awt.event.*; import org.junit.*; | [
"java.awt",
"org.junit"
] | java.awt; org.junit; | 1,173,757 |
private static List<File> downloadFromEclipse(MavenObject mo, BuildType type) {
return downloadFromMaven("http://download.eclipse.org/jgit/maven/", mo, type);
}
| static List<File> function(MavenObject mo, BuildType type) { return downloadFromMaven("http: } | /**
* Download a file from the official Eclipse Maven repository.
*
* @param mo
* the maven object to download.
* @return
*/ | Download a file from the official Eclipse Maven repository | downloadFromEclipse | {
"repo_name": "zaurx/gitblit",
"path": "src/com/gitblit/build/Build.java",
"license": "apache-2.0",
"size": 18096
} | [
"java.io.File",
"java.util.List"
] | import java.io.File; import java.util.List; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,207,955 |
public void executeAsync(AsyncCallback<DynamicFunctionResponse> callback); | void function(AsyncCallback<DynamicFunctionResponse> callback); | /**
* This function behaves the same way as the function execute. The only
* difference is that it needs a callback to be executed when the response
* arrives from the server.
*
* @param callback
*/ | This function behaves the same way as the function execute. The only difference is that it needs a callback to be executed when the response arrives from the server | executeAsync | {
"repo_name": "Fiware/i2nd.KIARA",
"path": "src/main/java/org/fiware/kiara/dynamic/services/DynamicFunctionRequest.java",
"license": "lgpl-3.0",
"size": 2550
} | [
"org.fiware.kiara.client.AsyncCallback"
] | import org.fiware.kiara.client.AsyncCallback; | import org.fiware.kiara.client.*; | [
"org.fiware.kiara"
] | org.fiware.kiara; | 2,636,761 |
public static void reindexAll(boolean async, Session sess) {
FullTextSession txtSession = Search.getFullTextSession(sess);
MassIndexer massIndexer = txtSession.createIndexer();
massIndexer.purgeAllOnStart(true);
try {
if (!async) {
massIndexer.startAndWait... | static void function(boolean async, Session sess) { FullTextSession txtSession = Search.getFullTextSession(sess); MassIndexer massIndexer = txtSession.createIndexer(); massIndexer.purgeAllOnStart(true); try { if (!async) { massIndexer.startAndWait(); } else { massIndexer.start(); } } catch (InterruptedException e) { lo... | /**
* Regenerates all the indexed class indexes
*
* @param async true if the reindexing will be done as a background thread
* @param sess the hibernate session
*/ | Regenerates all the indexed class indexes | reindexAll | {
"repo_name": "sftruelx/new_mypro",
"path": "src/main/java/com/app1/dao/hibernate/HibernateSearchTools.java",
"license": "apache-2.0",
"size": 5090
} | [
"org.hibernate.Session",
"org.hibernate.search.FullTextSession",
"org.hibernate.search.MassIndexer",
"org.hibernate.search.Search"
] | import org.hibernate.Session; import org.hibernate.search.FullTextSession; import org.hibernate.search.MassIndexer; import org.hibernate.search.Search; | import org.hibernate.*; import org.hibernate.search.*; | [
"org.hibernate",
"org.hibernate.search"
] | org.hibernate; org.hibernate.search; | 326,993 |
@Test
@Ignore
public void testContainerPlacementCapacity() throws IOException,
InterruptedException, TimeoutException {
OzoneConfiguration conf = getConf();
final int nodeCount = 4;
final long capacity = 10L * OzoneConsts.GB;
final long used = 2L * OzoneConsts.GB;
final long remaining = ... | void function() throws IOException, InterruptedException, TimeoutException { OzoneConfiguration conf = getConf(); final int nodeCount = 4; final long capacity = 10L * OzoneConsts.GB; final long used = 2L * OzoneConsts.GB; final long remaining = capacity - used; final File testDir = PathUtils.getTestDir( TestContainerPl... | /**
* Test capacity based container placement policy with node reports.
*
* @throws IOException
* @throws InterruptedException
* @throws TimeoutException
*/ | Test capacity based container placement policy with node reports | testContainerPlacementCapacity | {
"repo_name": "dierobotsdie/hadoop",
"path": "hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/node/TestContainerPlacement.java",
"license": "apache-2.0",
"size": 6321
} | [
"java.io.File",
"java.io.IOException",
"java.util.List",
"java.util.concurrent.TimeoutException",
"org.apache.commons.io.IOUtils",
"org.apache.hadoop.fs.FileUtil",
"org.apache.hadoop.hdds.conf.OzoneConfiguration",
"org.apache.hadoop.hdds.protocol.DatanodeDetails",
"org.apache.hadoop.hdds.scm.ScmConf... | import java.io.File; import java.io.IOException; import java.util.List; import java.util.concurrent.TimeoutException; import org.apache.commons.io.IOUtils; import org.apache.hadoop.fs.FileUtil; import org.apache.hadoop.hdds.conf.OzoneConfiguration; import org.apache.hadoop.hdds.protocol.DatanodeDetails; import org.apac... | import java.io.*; import java.util.*; import java.util.concurrent.*; import org.apache.commons.io.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hdds.conf.*; import org.apache.hadoop.hdds.protocol.*; import org.apache.hadoop.hdds.scm.*; import org.apache.hadoop.hdds.scm.container.*; import org.apache.hadoop... | [
"java.io",
"java.util",
"org.apache.commons",
"org.apache.hadoop",
"org.junit"
] | java.io; java.util; org.apache.commons; org.apache.hadoop; org.junit; | 850,260 |
public void begin(String namespace, String name,
Attributes attributes) throws Exception {
Object anAttribute = null;
Object parameters[] = (Object[]) digester.peekParams();
if (attributeName != null) {
anAttribute = attributes.getValue(attributeName);
... | void function(String namespace, String name, Attributes attributes) throws Exception { Object anAttribute = null; Object parameters[] = (Object[]) digester.peekParams(); if (attributeName != null) { anAttribute = attributes.getValue(attributeName); if(anAttribute != null) { parameters[paramIndex] = param; } }else{ para... | /**
* Process the start of this element.
*
* @param attributes The attribute list for this element
*/ | Process the start of this element | begin | {
"repo_name": "plumer/codana",
"path": "tomcat_files/6.0.43/ObjectParamRule.java",
"license": "mit",
"size": 4141
} | [
"org.xml.sax.Attributes"
] | import org.xml.sax.Attributes; | import org.xml.sax.*; | [
"org.xml.sax"
] | org.xml.sax; | 1,427,044 |
protected static byte[] buildDeltasMessage(int iBaselineIndex,
byte iBaselineType, short updateCount, short updateOperand,
SOEObject o, byte[] customizationData) throws IOException {
// System.out.println("Building SHORT DeltasMessage. Values -- Baseline "
// + Integer.toHexString(Constants.BaselinesTypes... | static byte[] function(int iBaselineIndex, byte iBaselineType, short updateCount, short updateOperand, SOEObject o, byte[] customizationData) throws IOException { int packetSize = 6; int iDataLength = 0; if (customizationData != null) { iDataLength = customizationData.length; } packetSize += iDataLength; SOEOutputStrea... | /**
* Used to send Customization Data Updates to objects
*
* @param iBaselineIndex
* @param iBaselineType
* @param updateCount
* @param updateOperand
* @param o
* @param customizationData
* @return
* @throws java.io.IOException
*/ | Used to send Customization Data Updates to objects | buildDeltasMessage | {
"repo_name": "SWGANHServices/SWGANHJava",
"path": "SWGCombined/src/PacketFactory.java",
"license": "gpl-3.0",
"size": 354141
} | [
"java.io.ByteArrayOutputStream",
"java.io.IOException"
] | import java.io.ByteArrayOutputStream; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,343,997 |
void validateUserAuthorizationOnAttachment(HttpServletRequest request, UserDetail user,
SimpleDocument doc) throws WebApplicationException; | void validateUserAuthorizationOnAttachment(HttpServletRequest request, UserDetail user, SimpleDocument doc) throws WebApplicationException; | /**
* Validates the authorization of the specified user to access the specified attachment.
*
* @param request the HTTP request from which the authentication of the caller can be done.
* @param user the user for whom the authorization has to be validated.
* @param doc the document accessed.
* @throws ... | Validates the authorization of the specified user to access the specified attachment | validateUserAuthorizationOnAttachment | {
"repo_name": "ebonnet/Silverpeas-Core",
"path": "core-web/src/main/java/org/silverpeas/core/webapi/base/UserPrivilegeValidation.java",
"license": "agpl-3.0",
"size": 5258
} | [
"javax.servlet.http.HttpServletRequest",
"javax.ws.rs.WebApplicationException",
"org.silverpeas.core.admin.user.model.UserDetail",
"org.silverpeas.core.contribution.attachment.model.SimpleDocument"
] | import javax.servlet.http.HttpServletRequest; import javax.ws.rs.WebApplicationException; import org.silverpeas.core.admin.user.model.UserDetail; import org.silverpeas.core.contribution.attachment.model.SimpleDocument; | import javax.servlet.http.*; import javax.ws.rs.*; import org.silverpeas.core.admin.user.model.*; import org.silverpeas.core.contribution.attachment.model.*; | [
"javax.servlet",
"javax.ws",
"org.silverpeas.core"
] | javax.servlet; javax.ws; org.silverpeas.core; | 192,969 |
Map getEventsMapForTesting() {
return Collections.unmodifiableMap(this.eventsMap);
} | Map getEventsMapForTesting() { return Collections.unmodifiableMap(this.eventsMap); } | /**
* Used for testing purposes only
*
* @return Map object containing DispatchedAndCurrentEvents object for a ThreadIdentifier
*/ | Used for testing purposes only | getEventsMapForTesting | {
"repo_name": "smgoller/geode",
"path": "geode-core/src/main/java/org/apache/geode/internal/cache/ha/HARegionQueue.java",
"license": "apache-2.0",
"size": 150325
} | [
"java.util.Collections",
"java.util.Map"
] | import java.util.Collections; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,851,823 |
@Deprecated
public void setResponseData(String response) {
responseDataAsString = null;
try {
responseData = response.getBytes(getDataEncodingWithDefault());
} catch (UnsupportedEncodingException e) {
log.warn("Could not convert string, using default encoding. "+e... | void function(String response) { responseDataAsString = null; try { responseData = response.getBytes(getDataEncodingWithDefault()); } catch (UnsupportedEncodingException e) { log.warn(STR+e.getLocalizedMessage()); responseData = response.getBytes(Charset.defaultCharset()); } } | /**
* Sets the responseData attribute of the SampleResult object.
* Should only be called after setting the dataEncoding (if necessary)
*
* @param response
* the new responseData value (String)
*
* @deprecated - only intended for use from BeanShell code
*/ | Sets the responseData attribute of the SampleResult object. Should only be called after setting the dataEncoding (if necessary) | setResponseData | {
"repo_name": "ubikloadpack/jmeter",
"path": "src/core/org/apache/jmeter/samplers/SampleResult.java",
"license": "apache-2.0",
"size": 47636
} | [
"java.io.UnsupportedEncodingException",
"java.nio.charset.Charset"
] | import java.io.UnsupportedEncodingException; import java.nio.charset.Charset; | import java.io.*; import java.nio.charset.*; | [
"java.io",
"java.nio"
] | java.io; java.nio; | 2,409,678 |
private void addMenuItem(int actionId, JMenu menu, int key)
{
EditorAction a = controller.getAction(actionId);
JMenuItem item = new JMenuItem(a);
if (key != 0)
setMenuItemAccelerator(item, key);
menu.add(item);
}
| void function(int actionId, JMenu menu, int key) { EditorAction a = controller.getAction(actionId); JMenuItem item = new JMenuItem(a); if (key != 0) setMenuItemAccelerator(item, key); menu.add(item); } | /**
* Adds a new item.
*
* @param actionId The ID associated to the item.
* @param menu The menu to add the item to.
* @param key The key accelerator associated to the menu item.
*/ | Adds a new item | addMenuItem | {
"repo_name": "rleigh-dundee/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/editor/view/EditorUI.java",
"license": "gpl-2.0",
"size": 11645
} | [
"javax.swing.JMenu",
"javax.swing.JMenuItem",
"org.openmicroscopy.shoola.agents.editor.actions.EditorAction"
] | import javax.swing.JMenu; import javax.swing.JMenuItem; import org.openmicroscopy.shoola.agents.editor.actions.EditorAction; | import javax.swing.*; import org.openmicroscopy.shoola.agents.editor.actions.*; | [
"javax.swing",
"org.openmicroscopy.shoola"
] | javax.swing; org.openmicroscopy.shoola; | 45,073 |
private void checkModeSanity(String[] args, CommandLine cliParser) throws ParseException {
String message = null;
//The only time you can use the client without specifiying an instance, is to list all of the instances it sees.
if (!cliParser.hasOption("name") && mode != Mode.DESCRIBE) {
... | void function(String[] args, CommandLine cliParser) throws ParseException { String message = null; if (!cliParser.hasOption("name") && mode != Mode.DESCRIBE) { message = STR; } else if (mode == Mode.INSTALL && !cliParser.hasOption(STR)) { message = STR; } else if (mode != Mode.START && cliParser.hasOption(STR)) { messa... | /**
* Determine if the command line arguments are sufficient for the requested client mode.
*
* @param args
* The command line arguments.
* @param cliParser
* Parsed command line arguments.
* @throws ParseException
*/ | Determine if the command line arguments are sufficient for the requested client mode | checkModeSanity | {
"repo_name": "amoudi87/asterixdb",
"path": "asterix-yarn/src/main/java/org/apache/asterix/aoya/AsterixYARNClient.java",
"license": "apache-2.0",
"size": 60041
} | [
"java.io.File",
"org.apache.commons.cli.CommandLine",
"org.apache.commons.cli.ParseException"
] | import java.io.File; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.ParseException; | import java.io.*; import org.apache.commons.cli.*; | [
"java.io",
"org.apache.commons"
] | java.io; org.apache.commons; | 727,459 |
public static boolean executeDeleteOperation(final ConnectionFactory connectionFactory,
final LdapEntry entry) throws LdapException {
try (Connection connection = createConnection(connectionFactory)) {
final DeleteOperation delete = new DeleteOpe... | static boolean function(final ConnectionFactory connectionFactory, final LdapEntry entry) throws LdapException { try (Connection connection = createConnection(connectionFactory)) { final DeleteOperation delete = new DeleteOperation(connection); final DeleteRequest request = new DeleteRequest(entry.getDn()); request.set... | /**
* Execute delete operation boolean.
*
* @param connectionFactory the connection factory
* @param entry the entry
* @return the boolean
* @throws LdapException the ldap exception
*/ | Execute delete operation boolean | executeDeleteOperation | {
"repo_name": "zhoffice/cas",
"path": "cas-server-support-ldap-core/src/main/java/org/apereo/cas/util/LdapUtils.java",
"license": "apache-2.0",
"size": 12918
} | [
"org.ldaptive.Connection",
"org.ldaptive.ConnectionFactory",
"org.ldaptive.DeleteOperation",
"org.ldaptive.DeleteRequest",
"org.ldaptive.LdapEntry",
"org.ldaptive.LdapException",
"org.ldaptive.Response",
"org.ldaptive.ResultCode",
"org.ldaptive.referral.DeleteReferralHandler"
] | import org.ldaptive.Connection; import org.ldaptive.ConnectionFactory; import org.ldaptive.DeleteOperation; import org.ldaptive.DeleteRequest; import org.ldaptive.LdapEntry; import org.ldaptive.LdapException; import org.ldaptive.Response; import org.ldaptive.ResultCode; import org.ldaptive.referral.DeleteReferralHandle... | import org.ldaptive.*; import org.ldaptive.referral.*; | [
"org.ldaptive",
"org.ldaptive.referral"
] | org.ldaptive; org.ldaptive.referral; | 1,330,506 |
protected static Method checkParameterCount(Method method, int paramCount) {
if (method.getParameterCount() != paramCount) {
throw new AssertionError(String.format(
"Accessor method %s should have %d parameters", method, paramCount));
}
return method;
}
... | static Method function(Method method, int paramCount) { if (method.getParameterCount() != paramCount) { throw new AssertionError(String.format( STR, method, paramCount)); } return method; } static final class GetterIndexed extends AbstractAccessor { public GetterIndexed(Method method) { super(method.getReturnType(), me... | /**
* Checks that access has an expected parameter count.
*
* @param method Accessor method declaration.
* @param paramCount Expected parameter count.
* @return Method parameter.
*/ | Checks that access has an expected parameter count | checkParameterCount | {
"repo_name": "uliashkevich/native-struct",
"path": "src/main/java/net/nativestruct/implementation/field/AbstractAccessor.java",
"license": "mit",
"size": 10993
} | [
"java.lang.reflect.Method"
] | import java.lang.reflect.Method; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 2,807,377 |
public void setSortingOrder(@NonNull SortingOrder sortingOrder) {
this.sortingOrder = sortingOrder;
notifyDataSetChanged();
} | void function(@NonNull SortingOrder sortingOrder) { this.sortingOrder = sortingOrder; notifyDataSetChanged(); } | /**
* Set the sorting order (ASCENDING, DESCENDING) of the Timeline.
*/ | Set the sorting order (ASCENDING, DESCENDING) of the Timeline | setSortingOrder | {
"repo_name": "HoraApps/LeafPic",
"path": "app/src/main/java/org/horaapps/leafpic/timeline/TimelineAdapter.java",
"license": "gpl-3.0",
"size": 11770
} | [
"android.support.annotation.NonNull",
"org.horaapps.leafpic.data.sort.SortingOrder"
] | import android.support.annotation.NonNull; import org.horaapps.leafpic.data.sort.SortingOrder; | import android.support.annotation.*; import org.horaapps.leafpic.data.sort.*; | [
"android.support",
"org.horaapps.leafpic"
] | android.support; org.horaapps.leafpic; | 1,039,565 |
public void onError(String uniqueSignature, Exception e, Tuple inputTuple); | void function(String uniqueSignature, Exception e, Tuple inputTuple); | /**
* Method invoked when an error occurs processing of tuple
*
* @param uniqueSignature
* a unique signature to identify the operator
* @param e
* Exception encountered while processing input
* @param inputTuple
* the tuple to store.
*/ | Method invoked when an error occurs processing of tuple | onError | {
"repo_name": "ljl1988com/pig",
"path": "src/org/apache/pig/ErrorHandler.java",
"license": "apache-2.0",
"size": 1629
} | [
"org.apache.pig.data.Tuple"
] | import org.apache.pig.data.Tuple; | import org.apache.pig.data.*; | [
"org.apache.pig"
] | org.apache.pig; | 2,208,893 |
public static byte[] decrypt(byte[] cipherText, byte[] encryptionKey ) throws NoSuchAlgorithmException, NoSuchProviderException, NoSuchPaddingException, InvalidKeyException, InvalidAlgorithmParameterException, IllegalBlockSizeException, BadPaddingException, InvalidKeyException {
// Get IV from cipher text
byt... | static byte[] function(byte[] cipherText, byte[] encryptionKey ) throws NoSuchAlgorithmException, NoSuchProviderException, NoSuchPaddingException, InvalidKeyException, InvalidAlgorithmParameterException, IllegalBlockSizeException, BadPaddingException, InvalidKeyException { byte[] iv = new byte[Constants.ENCRYPTION_INIT... | /**
* Decrypt a byte array
* @param cipherText The cipher text byte array
* @param encryptionKey The AES encryption key as a byte array
* @return The plain text data in a byte array
* @throws NoSuchAlgorithmException
* @throws NoSuchProviderException
* @throws NoSuchPaddingException
* @throws InvalidKey... | Decrypt a byte array | decrypt | {
"repo_name": "twyburton/Password-Manager",
"path": "PasswordManager/src/twy/burton/client/security/AES.java",
"license": "gpl-3.0",
"size": 3776
} | [
"java.security.InvalidAlgorithmParameterException",
"java.security.InvalidKeyException",
"java.security.NoSuchAlgorithmException",
"java.security.NoSuchProviderException",
"javax.crypto.BadPaddingException",
"javax.crypto.Cipher",
"javax.crypto.IllegalBlockSizeException",
"javax.crypto.NoSuchPaddingEx... | import java.security.InvalidAlgorithmParameterException; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; import java.security.NoSuchProviderException; import javax.crypto.BadPaddingException; import javax.crypto.Cipher; import javax.crypto.IllegalBlockSizeException; import javax... | import java.security.*; import javax.crypto.*; import javax.crypto.spec.*; | [
"java.security",
"javax.crypto"
] | java.security; javax.crypto; | 2,270,641 |
public String getFullFunctionName(IMethodBinding method) {
return getFullName(method.getDeclaringClass()) + '_' + getFunctionName(method);
} | String function(IMethodBinding method) { return getFullName(method.getDeclaringClass()) + '_' + getFunctionName(method); } | /**
* Returns a "Type_method" function name for static methods, such as from
* enum types. A combination of classname plus modified selector is
* guaranteed to be unique within the app.
*/ | Returns a "Type_method" function name for static methods, such as from enum types. A combination of classname plus modified selector is guaranteed to be unique within the app | getFullFunctionName | {
"repo_name": "qq644531343/j2objc",
"path": "translator/src/main/java/com/google/devtools/j2objc/util/NameTable.java",
"license": "apache-2.0",
"size": 39764
} | [
"org.eclipse.jdt.core.dom.IMethodBinding"
] | import org.eclipse.jdt.core.dom.IMethodBinding; | import org.eclipse.jdt.core.dom.*; | [
"org.eclipse.jdt"
] | org.eclipse.jdt; | 1,127,413 |
@Nonnull
public static <K, V> IntegerBinding mapToIntegerThenReduce(@Nonnull final ObservableMap<K, V> items, @Nullable final Integer defaultValue, @Nonnull final ObservableValue<Function<? super V, Integer>> mapper, @Nonnull final ObservableValue<BinaryOperator<Integer>> reducer) {
requireNonNull(reduc... | static <K, V> IntegerBinding function(@Nonnull final ObservableMap<K, V> items, @Nullable final Integer defaultValue, @Nonnull final ObservableValue<Function<? super V, Integer>> mapper, @Nonnull final ObservableValue<BinaryOperator<Integer>> reducer) { requireNonNull(reducer, ERROR_REDUCER_NULL); requireNonNull(mapper... | /**
* Returns an integer binding whose value is the reduction of all values in the map. The mapper function is applied to each value before reduction.
*
* @param items the observable map.
* @param defaultValue the value to be returned if there is no value present, may be null.
* @param m... | Returns an integer binding whose value is the reduction of all values in the map. The mapper function is applied to each value before reduction | mapToIntegerThenReduce | {
"repo_name": "griffon/griffon",
"path": "subprojects/griffon-javafx/src/main/java/griffon/javafx/beans/binding/ReducingBindings.java",
"license": "apache-2.0",
"size": 249342
} | [
"java.util.Objects",
"java.util.function.BinaryOperator",
"java.util.function.Function"
] | import java.util.Objects; import java.util.function.BinaryOperator; import java.util.function.Function; | import java.util.*; import java.util.function.*; | [
"java.util"
] | java.util; | 509,749 |
EReference getPackageDef_Cp(); | EReference getPackageDef_Cp(); | /**
* Returns the meta object for the containment reference '{@link com.euclideanspace.spad.editor.PackageDef#getCp <em>Cp</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference '<em>Cp</em>'.
* @see com.euclideanspace.spad.editor.PackageDef#getC... | Returns the meta object for the containment reference '<code>com.euclideanspace.spad.editor.PackageDef#getCp Cp</code>'. | getPackageDef_Cp | {
"repo_name": "martinbaker/euclideanspace",
"path": "com.euclideanspace.spad/src-gen/com/euclideanspace/spad/editor/EditorPackage.java",
"license": "agpl-3.0",
"size": 593321
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,228,514 |
void setNextResults(final byte [] regionName, final Result [] rs) {
this.nexts.put(regionName, rs);
} | void setNextResults(final byte [] regionName, final Result [] rs) { this.nexts.put(regionName, rs); } | /**
* Use this method to set what a scanner will reply as we next through
* @param regionName
* @param rs
*/ | Use this method to set what a scanner will reply as we next through | setNextResults | {
"repo_name": "lilonglai/hbase-0.96.2",
"path": "hbase-server/src/test/java/org/apache/hadoop/hbase/master/MockRegionServer.java",
"license": "apache-2.0",
"size": 18556
} | [
"org.apache.hadoop.hbase.client.Result"
] | import org.apache.hadoop.hbase.client.Result; | import org.apache.hadoop.hbase.client.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 265,239 |
public StoreFile.Writer createWriterInTmp(MobFileName mobFileName, Path basePath,
long maxKeyCount, Compression.Algorithm compression) throws IOException {
final CacheConfig writerCacheConf = mobCacheConfig;
HFileContext hFileContext = new HFileContextBuilder().withCompression(compression)
.with... | StoreFile.Writer function(MobFileName mobFileName, Path basePath, long maxKeyCount, Compression.Algorithm compression) throws IOException { final CacheConfig writerCacheConf = mobCacheConfig; HFileContext hFileContext = new HFileContextBuilder().withCompression(compression) .withIncludesMvcc(true).withIncludesTags(true... | /**
* Creates the writer for the mob file in temp directory.
* @param mobFileName The mob file name.
* @param basePath The basic path for a temp directory.
* @param maxKeyCount The key count.
* @param compression The compression algorithm.
* @return The writer for the mob file.
* @throws IOExceptio... | Creates the writer for the mob file in temp directory | createWriterInTmp | {
"repo_name": "juwi/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HMobStore.java",
"license": "apache-2.0",
"size": 23397
} | [
"java.io.IOException",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.hbase.CellComparator",
"org.apache.hadoop.hbase.io.compress.Compression",
"org.apache.hadoop.hbase.io.hfile.CacheConfig",
"org.apache.hadoop.hbase.io.hfile.HFileContext",
"org.apache.hadoop.hbase.io.hfile.HFileContextBuilder",
"org... | import java.io.IOException; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.CellComparator; import org.apache.hadoop.hbase.io.compress.Compression; import org.apache.hadoop.hbase.io.hfile.CacheConfig; import org.apache.hadoop.hbase.io.hfile.HFileContext; import org.apache.hadoop.hbase.io.hfile.HFileCon... | import java.io.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.io.compress.*; import org.apache.hadoop.hbase.io.hfile.*; import org.apache.hadoop.hbase.mob.*; import org.apache.hadoop.hbase.util.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 2,069,244 |
private void preRegistrationInitialization(){
try {
initializeZooKeeper();
initializeThreads();
int nbBlocks = conf.getInt("hbase.regionserver.nbreservationblocks", 4);
for (int i = 0; i < nbBlocks; i++) {
reservedSpace.add(new byte[HConstants.DEFAULT_SIZE_RESERVATION_BLOCK]);
... | void function(){ try { initializeZooKeeper(); initializeThreads(); int nbBlocks = conf.getInt(STR, 4); for (int i = 0; i < nbBlocks; i++) { reservedSpace.add(new byte[HConstants.DEFAULT_SIZE_RESERVATION_BLOCK]); } } catch (Throwable t) { this.rpcServer.stop(); abort(STR, t); } } | /**
* All initialization needed before we go register with Master.
*
* @throws IOException
* @throws InterruptedException
*/ | All initialization needed before we go register with Master | preRegistrationInitialization | {
"repo_name": "ay65535/hbase-0.94.0",
"path": "src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java",
"license": "apache-2.0",
"size": 130077
} | [
"org.apache.hadoop.hbase.HConstants"
] | import org.apache.hadoop.hbase.HConstants; | import org.apache.hadoop.hbase.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 2,464,364 |
public com.mozu.api.contracts.productadmin.AttributeInProductType addOption(com.mozu.api.DataViewMode dataViewMode, com.mozu.api.contracts.productadmin.AttributeInProductType attributeInProductType, Integer productTypeId, AuthTicket authTicket) throws Exception
{
MozuClient<com.mozu.api.contracts.productadmin.Att... | com.mozu.api.contracts.productadmin.AttributeInProductType function(com.mozu.api.DataViewMode dataViewMode, com.mozu.api.contracts.productadmin.AttributeInProductType attributeInProductType, Integer productTypeId, AuthTicket authTicket) throws Exception { MozuClient<com.mozu.api.contracts.productadmin.AttributeInProduc... | /**
* Assigns an option attribute to the product type based on the information supplied in the request.
* <p><pre><code>
* ProductTypeOption producttypeoption = new ProductTypeOption();
* AttributeInProductType attributeInProductType = producttypeoption.AddOption(dataViewMode, attributeInProductType, productT... | Assigns an option attribute to the product type based on the information supplied in the request. <code><code> ProductTypeOption producttypeoption = new ProductTypeOption(); AttributeInProductType attributeInProductType = producttypeoption.AddOption(dataViewMode, attributeInProductType, productTypeId, authTicket); </co... | addOption | {
"repo_name": "carsonreinke/mozu-java-sdk",
"path": "src/main/java/com/mozu/api/resources/commerce/catalog/admin/attributedefinition/producttypes/ProductTypeOptionResource.java",
"license": "mit",
"size": 7365
} | [
"com.mozu.api.MozuClient",
"com.mozu.api.security.AuthTicket"
] | import com.mozu.api.MozuClient; import com.mozu.api.security.AuthTicket; | import com.mozu.api.*; import com.mozu.api.security.*; | [
"com.mozu.api"
] | com.mozu.api; | 1,438,039 |
public static String getExisting(Properties props, Enum<?> anEnum) {
String value = get(props, anEnum);
if (value == null) {
Log.info("Key '" + anEnum.name() + "' not found in properties.");
}
return value;
}
/*
public static boolean createDefault(File outputFile, Class<Enum<?>> enumClass) {
Li... | static String function(Properties props, Enum<?> anEnum) { String value = get(props, anEnum); if (value == null) { Log.info(STR + anEnum.name() + STR); } return value; } /* public static boolean createDefault(File outputFile, Class<Enum<?>> enumClass) { List<Enum<?>> enums = EnumUtils.extractEnumValues(enumClass); if(e... | /**
* Warns user if a value for the given key is not found.
*
* @param props
* @param anEnum
* @return
*/ | Warns user if a value for the given key is not found | getExisting | {
"repo_name": "joaobispo/specs-library",
"path": "specs-library/src/pt/up/fe/specs/library/PropertiesUtils.java",
"license": "apache-2.0",
"size": 4999
} | [
"java.io.File",
"java.util.Properties"
] | import java.io.File; import java.util.Properties; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,276,165 |
public boolean isHttp11() {
return protocol.equals(Protocols.HTTP_1_1);
} | boolean function() { return protocol.equals(Protocols.HTTP_1_1); } | /**
* Determine whether this request conforms to HTTP 1.1.
*
* @return {@code true} if the request protocol is equal to {@link Protocols#HTTP_1_1}, {@code false} otherwise
*/ | Determine whether this request conforms to HTTP 1.1 | isHttp11 | {
"repo_name": "wildfly-security-incubator/undertow",
"path": "core/src/main/java/io/undertow/server/HttpServerExchange.java",
"license": "apache-2.0",
"size": 82953
} | [
"io.undertow.util.Protocols"
] | import io.undertow.util.Protocols; | import io.undertow.util.*; | [
"io.undertow.util"
] | io.undertow.util; | 1,512,260 |
public static void main(String[] args) throws IOException {
if (args.length < 3) {
System.err.println("Usage: FieldNormModifier <index> <package.SimilarityClassName | -n> <field1> [field2] ...");
System.exit(1);
}
Similarity s = null;
if (!args[1].equals("-n")) {
try {
Class... | static void function(String[] args) throws IOException { if (args.length < 3) { System.err.println(STR); System.exit(1); } Similarity s = null; if (!args[1].equals("-n")) { try { Class simClass = Class.forName(args[1]); s = (Similarity)simClass.newInstance(); } catch (Exception e) { System.err.println(STR + args[1]); e... | /**
* Command Line Execution method.
*
* <pre>
* Usage: FieldNormModifier /path/index <package.SimilarityClassName | -n> field1 field2 ...
* </pre>
*/ | Command Line Execution method. <code> Usage: FieldNormModifier /path/index <package.SimilarityClassName | -n> field1 field2 ... </code> | main | {
"repo_name": "Overruler/retired-apache-sources",
"path": "lucene-2.9.4/contrib/misc/src/java/org/apache/lucene/index/FieldNormModifier.java",
"license": "apache-2.0",
"size": 4860
} | [
"java.io.File",
"java.io.IOException",
"java.util.Date",
"org.apache.lucene.search.Similarity",
"org.apache.lucene.store.Directory",
"org.apache.lucene.store.FSDirectory"
] | import java.io.File; import java.io.IOException; import java.util.Date; import org.apache.lucene.search.Similarity; import org.apache.lucene.store.Directory; import org.apache.lucene.store.FSDirectory; | import java.io.*; import java.util.*; import org.apache.lucene.search.*; import org.apache.lucene.store.*; | [
"java.io",
"java.util",
"org.apache.lucene"
] | java.io; java.util; org.apache.lucene; | 444,894 |
public static TextNode.Anchor convertTextAnchor(Element e) {
Value v = CSSUtilities.getComputedStyle
(e, SVGCSSEngine.TEXT_ANCHOR_INDEX);
switch (v.getStringValue().charAt(0)) {
case 's':
return TextNode.Anchor.START;
case 'm':
return TextNode.Anch... | static TextNode.Anchor function(Element e) { Value v = CSSUtilities.getComputedStyle (e, SVGCSSEngine.TEXT_ANCHOR_INDEX); switch (v.getStringValue().charAt(0)) { case 's': return TextNode.Anchor.START; case 'm': return TextNode.Anchor.MIDDLE; default: return TextNode.Anchor.END; } } | /**
* Converts the text-anchor CSS value to a TextNode.Anchor.
* @param e the element
*/ | Converts the text-anchor CSS value to a TextNode.Anchor | convertTextAnchor | {
"repo_name": "adufilie/flex-sdk",
"path": "modules/thirdparty/batik/sources/org/apache/flex/forks/batik/bridge/TextUtilities.java",
"license": "apache-2.0",
"size": 11091
} | [
"org.apache.flex.forks.batik.css.engine.SVGCSSEngine",
"org.apache.flex.forks.batik.css.engine.value.Value",
"org.apache.flex.forks.batik.gvt.TextNode",
"org.w3c.dom.Element"
] | import org.apache.flex.forks.batik.css.engine.SVGCSSEngine; import org.apache.flex.forks.batik.css.engine.value.Value; import org.apache.flex.forks.batik.gvt.TextNode; import org.w3c.dom.Element; | import org.apache.flex.forks.batik.css.engine.*; import org.apache.flex.forks.batik.css.engine.value.*; import org.apache.flex.forks.batik.gvt.*; import org.w3c.dom.*; | [
"org.apache.flex",
"org.w3c.dom"
] | org.apache.flex; org.w3c.dom; | 2,186,908 |
public Bundle saveState(Bundle map) {
synchronized (mSurfaceHolder) {
if (map != null) {
map.putInt(KEY_DIFFICULTY, Integer.valueOf(mDifficulty));
map.putDouble(KEY_X, Double.valueOf(mX));
map.putDouble(KEY_Y, Double.valueOf... | Bundle function(Bundle map) { synchronized (mSurfaceHolder) { if (map != null) { map.putInt(KEY_DIFFICULTY, Integer.valueOf(mDifficulty)); map.putDouble(KEY_X, Double.valueOf(mX)); map.putDouble(KEY_Y, Double.valueOf(mY)); map.putDouble(KEY_DX, Double.valueOf(mDX)); map.putDouble(KEY_DY, Double.valueOf(mDY)); map.putDo... | /**
* Dump game state to the provided Bundle. Typically called when the
* Activity is being suspended.
*
* @return Bundle with this view's state
*/ | Dump game state to the provided Bundle. Typically called when the Activity is being suspended | saveState | {
"repo_name": "efortuna/AndroidSDKClone",
"path": "sdk/samples/android-20/legacy/LunarLander/src/com/example/android/lunarlander/LunarView.java",
"license": "apache-2.0",
"size": 33599
} | [
"android.os.Bundle"
] | import android.os.Bundle; | import android.os.*; | [
"android.os"
] | android.os; | 1,841,268 |
@Operation(desc = "Change the priority of the messages corresponding to the given filter", impact = MBeanOperationInfo.ACTION)
int changeMessagesPriority(@Parameter(name = "filter", desc = "A message filter (can be empty)") String filter,
@Parameter(name = "newPriority", desc = "the ... | @Operation(desc = STR, impact = MBeanOperationInfo.ACTION) int changeMessagesPriority(@Parameter(name = STR, desc = STR) String filter, @Parameter(name = STR, desc = STR) int newPriority) throws Exception; | /**
* Changes the priority for all the message corresponding to the specified filter to the specified priority.
* <br>
* Using {@code null} or an empty filter will change <em>all</em> messages from this queue.
*
* @return the number of changed messages
*/ | Changes the priority for all the message corresponding to the specified filter to the specified priority. Using null or an empty filter will change all messages from this queue | changeMessagesPriority | {
"repo_name": "johnament/activemq-artemis",
"path": "artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/QueueControl.java",
"license": "apache-2.0",
"size": 21995
} | [
"javax.management.MBeanOperationInfo"
] | import javax.management.MBeanOperationInfo; | import javax.management.*; | [
"javax.management"
] | javax.management; | 1,825,576 |
public void autoryzujKonto(Konto konto) throws AbstractException {
if (konto == null) {
throw new NullPointerException();
}
mOKEndpoint.autoryzujKonto(konto);
}
| void function(Konto konto) throws AbstractException { if (konto == null) { throw new NullPointerException(); } mOKEndpoint.autoryzujKonto(konto); } | /**
* Potwierdzenie (autoryzacja) konta
*
* @param konto do autoryzacji
* @throws pl.lodz.p.zsk.ssbd2015.ssbd07.exceptions.AbstractException
* Wyjątek stojący na szczycie hierarchii wyjątków aplikacyjnych
*/ | Potwierdzenie (autoryzacja) konta | autoryzujKonto | {
"repo_name": "mihu1993/FuneralManagement",
"path": "src/main/java/pl/lodz/p/zsk/ssbd2015/ssbd07/mok/beans/KontoSession.java",
"license": "unlicense",
"size": 11975
} | [
"pl.lodz.p.zsk.ssbd2015.ssbd07.encje.Konto",
"pl.lodz.p.zsk.ssbd2015.ssbd07.exceptions.AbstractException"
] | import pl.lodz.p.zsk.ssbd2015.ssbd07.encje.Konto; import pl.lodz.p.zsk.ssbd2015.ssbd07.exceptions.AbstractException; | import pl.lodz.p.zsk.ssbd2015.ssbd07.encje.*; import pl.lodz.p.zsk.ssbd2015.ssbd07.exceptions.*; | [
"pl.lodz.p"
] | pl.lodz.p; | 1,545,084 |
public static WebResourceCollectionsMetaData getWebResourceCollections(final SecurityConstraintMetaData securityConstraintMD) {
WebResourceCollectionsMetaData webResourceCollectionsMD = securityConstraintMD.getResourceCollections();
if (webResourceCollectionsMD == null) {
webResourceCol... | static WebResourceCollectionsMetaData function(final SecurityConstraintMetaData securityConstraintMD) { WebResourceCollectionsMetaData webResourceCollectionsMD = securityConstraintMD.getResourceCollections(); if (webResourceCollectionsMD == null) { webResourceCollectionsMD = new WebResourceCollectionsMetaData(); securi... | /**
* Gets web resource collections meta data from security constraint meta data. If not found it creates new web resource
* collections meta data and associates them with security constraint meta data.
*
* @param securityConstraintMD security constraint meta data
* @return web resource collect... | Gets web resource collections meta data from security constraint meta data. If not found it creates new web resource collections meta data and associates them with security constraint meta data | getWebResourceCollections | {
"repo_name": "xasx/wildfly",
"path": "webservices/server-integration/src/main/java/org/jboss/as/webservices/util/WebMetaDataHelper.java",
"license": "lgpl-2.1",
"size": 15042
} | [
"org.jboss.metadata.web.spec.SecurityConstraintMetaData",
"org.jboss.metadata.web.spec.WebResourceCollectionsMetaData"
] | import org.jboss.metadata.web.spec.SecurityConstraintMetaData; import org.jboss.metadata.web.spec.WebResourceCollectionsMetaData; | import org.jboss.metadata.web.spec.*; | [
"org.jboss.metadata"
] | org.jboss.metadata; | 2,619,129 |
@Test
public void canForwardJobKillRequest() throws IOException, ServletException, GenieException {
this.jobsProperties.getForwarding().setEnabled(true);
final String jobId = UUID.randomUUID().toString();
final String forwardedFrom = null;
final HttpServletRequest request = Mocki... | void function() throws IOException, ServletException, GenieException { this.jobsProperties.getForwarding().setEnabled(true); final String jobId = UUID.randomUUID().toString(); final String forwardedFrom = null; final HttpServletRequest request = Mockito.mock(HttpServletRequest.class); final HttpServletResponse response... | /**
* Makes sure we can successfully forward a job kill request.
*
* @throws IOException on error
* @throws ServletException on error
* @throws GenieException on error
*/ | Makes sure we can successfully forward a job kill request | canForwardJobKillRequest | {
"repo_name": "irontable/genie",
"path": "genie-web/src/test/java/com/netflix/genie/web/controllers/JobRestControllerUnitTests.java",
"license": "apache-2.0",
"size": 22479
} | [
"com.netflix.genie.common.exceptions.GenieException",
"java.io.IOException",
"java.util.UUID",
"javax.servlet.ServletException",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse",
"org.apache.http.Header",
"org.apache.http.HttpResponse",
"org.apache.http.StatusLine",
... | import com.netflix.genie.common.exceptions.GenieException; import java.io.IOException; import java.util.UUID; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.http.Header; import org.apache.http.HttpResponse; import org... | import com.netflix.genie.common.exceptions.*; import java.io.*; import java.util.*; import javax.servlet.*; import javax.servlet.http.*; import org.apache.http.*; import org.mockito.*; import org.springframework.http.*; | [
"com.netflix.genie",
"java.io",
"java.util",
"javax.servlet",
"org.apache.http",
"org.mockito",
"org.springframework.http"
] | com.netflix.genie; java.io; java.util; javax.servlet; org.apache.http; org.mockito; org.springframework.http; | 2,730,407 |
public boolean canMerge( )
{
if ( !isActive( ) || isDelete( ) || getParent( ) == null )
{
return false;
}
List list = TableUtil.getSelectionCells( this );
int size = list.size( );
List temp = new ArrayList( );
for ( int i = 0; i < size; i++ )
{
ReportElementEditPart part = (ReportElementEditPa... | boolean function( ) { if ( !isActive( ) isDelete( ) getParent( ) == null ) { return false; } List list = TableUtil.getSelectionCells( this ); int size = list.size( ); List temp = new ArrayList( ); for ( int i = 0; i < size; i++ ) { ReportElementEditPart part = (ReportElementEditPart) list.get( i ); if ( part.isDelete( ... | /**
* Determines if selected cells can be merged.
*
* @return true if merge success, else false.
*/ | Determines if selected cells can be merged | canMerge | {
"repo_name": "Charling-Huang/birt",
"path": "UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/editors/schematic/editparts/TableEditPart.java",
"license": "epl-1.0",
"size": 40021
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,090,284 |
public void skippedEntity (String name)
throws SAXException
{
}
////////////////////////////////////////////////////////////////////
// Internal state.
////////////////////////////////////////////////////////////////////
@UnsupportedAppUsage
XMLReader xmlReader;
@Unsupported... | void function (String name) throws SAXException { } XMLReader xmlReader; DocumentHandler documentHandler; AttributesAdapter qAtts; static final class AttributesAdapter implements AttributeList { AttributesAdapter () { } | /**
* Adapt a SAX2 skipped entity event.
*
* @param name The name of the skipped entity.
* @see org.xml.sax.ContentHandler#skippedEntity
* @exception org.xml.sax.SAXException Throwable by subclasses.
*/ | Adapt a SAX2 skipped entity event | skippedEntity | {
"repo_name": "mirego/j2objc",
"path": "jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/XMLReaderAdapter.java",
"license": "apache-2.0",
"size": 14577
} | [
"org.xml.sax.AttributeList",
"org.xml.sax.DocumentHandler",
"org.xml.sax.SAXException",
"org.xml.sax.XMLReader"
] | import org.xml.sax.AttributeList; import org.xml.sax.DocumentHandler; import org.xml.sax.SAXException; import org.xml.sax.XMLReader; | import org.xml.sax.*; | [
"org.xml.sax"
] | org.xml.sax; | 111,502 |
public static <T, K> MutableMap<K, T> toMap(
Iterable<T> iterable,
Function<? super T, ? extends K> keyFunction)
{
MutableMap<K, T> map = UnifiedMap.newMap();
Iterate.forEach(iterable, new MapCollectProcedure<T, K, T>(map, keyFunction));
return map;
} | static <T, K> MutableMap<K, T> function( Iterable<T> iterable, Function<? super T, ? extends K> keyFunction) { MutableMap<K, T> map = UnifiedMap.newMap(); Iterate.forEach(iterable, new MapCollectProcedure<T, K, T>(map, keyFunction)); return map; } | /**
* Iterate over the specified collection applying the specified Function to each element to calculate
* a key and return the results as a Map.
*/ | Iterate over the specified collection applying the specified Function to each element to calculate a key and return the results as a Map | toMap | {
"repo_name": "jlz27/gs-collections",
"path": "collections/src/main/java/com/gs/collections/impl/utility/Iterate.java",
"license": "apache-2.0",
"size": 72978
} | [
"com.gs.collections.api.block.function.Function",
"com.gs.collections.api.map.MutableMap",
"com.gs.collections.impl.block.procedure.MapCollectProcedure",
"com.gs.collections.impl.map.mutable.UnifiedMap"
] | import com.gs.collections.api.block.function.Function; import com.gs.collections.api.map.MutableMap; import com.gs.collections.impl.block.procedure.MapCollectProcedure; import com.gs.collections.impl.map.mutable.UnifiedMap; | import com.gs.collections.api.block.function.*; import com.gs.collections.api.map.*; import com.gs.collections.impl.block.procedure.*; import com.gs.collections.impl.map.mutable.*; | [
"com.gs.collections"
] | com.gs.collections; | 1,128,803 |
private boolean removeDeployingNode(String url) {
String nsName = "";
try {
URI urlObj = new URI(url);
nsName = urlObj.getHost();
} catch (URISyntaxException e) {
logger.warn("No such deploying node: " + url);
return false;
}
if... | boolean function(String url) { String nsName = STRNo such deploying node: STR: if (matcher.find()) { try { nsName = matcher.group(1); } catch (IndexOutOfBoundsException e) { logger.debug(STR + url); } } } NodeSource ns = this.nodeSources.get(nsName); if (ns == null) { logger.warn(STR + nsName + STR + url); return false... | /**
* To handle the deploying node removal
* @param url the url of the deploying node to remove
* @return true if successful, false otherwise
*/ | To handle the deploying node removal | removeDeployingNode | {
"repo_name": "yinan-liu/scheduling",
"path": "rm/rm-server/src/main/java/org/ow2/proactive/resourcemanager/core/RMCore.java",
"license": "agpl-3.0",
"size": 87108
} | [
"org.ow2.proactive.resourcemanager.nodesource.NodeSource"
] | import org.ow2.proactive.resourcemanager.nodesource.NodeSource; | import org.ow2.proactive.resourcemanager.nodesource.*; | [
"org.ow2.proactive"
] | org.ow2.proactive; | 1,463,134 |
public ServiceFuture<Void> beginDeleteAsync(String resourceGroupName, String serviceEndpointPolicyName, final ServiceCallback<Void> serviceCallback) {
return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, serviceEndpointPolicyName), serviceCallback);
} | ServiceFuture<Void> function(String resourceGroupName, String serviceEndpointPolicyName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, serviceEndpointPolicyName), serviceCallback); } | /**
* Deletes the specified service endpoint policy.
*
* @param resourceGroupName The name of the resource group.
* @param serviceEndpointPolicyName The name of the service endpoint policy.
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @thr... | Deletes the specified service endpoint policy | beginDeleteAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/ServiceEndpointPoliciesInner.java",
"license": "mit",
"size": 72906
} | [
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture"
] | import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 187,073 |
protected AstParameters params() throws ScanException, ParseException {
consumeToken(LPAREN);
List<AstNode> l = Collections.emptyList();
AstNode v = expr(false);
if (v != null) {
l = new ArrayList<>();
l.add(v);
while (token.getSymbol() == COMMA) {
consumeToken();
l.add(expr(true));
}
}... | AstParameters function() throws ScanException, ParseException { consumeToken(LPAREN); List<AstNode> l = Collections.emptyList(); AstNode v = expr(false); if (v != null) { l = new ArrayList<>(); l.add(v); while (token.getSymbol() == COMMA) { consumeToken(); l.add(expr(true)); } } consumeToken(RPAREN); return new AstPara... | /**
* params := <LPAREN> (expr (<COMMA> expr)*)? <RPAREN>
*/ | params := <LPAREN> (expr (<COMMA> expr)*)? <RPAREN> | params | {
"repo_name": "dbmalkovsky/flowable-engine",
"path": "modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/de/odysseus/el/tree/impl/Parser.java",
"license": "apache-2.0",
"size": 22997
} | [
"java.util.ArrayList",
"java.util.Collections",
"java.util.List",
"org.flowable.common.engine.impl.de.odysseus.el.tree.impl.Scanner",
"org.flowable.common.engine.impl.de.odysseus.el.tree.impl.ast.AstNode",
"org.flowable.common.engine.impl.de.odysseus.el.tree.impl.ast.AstParameters"
] | import java.util.ArrayList; import java.util.Collections; import java.util.List; import org.flowable.common.engine.impl.de.odysseus.el.tree.impl.Scanner; import org.flowable.common.engine.impl.de.odysseus.el.tree.impl.ast.AstNode; import org.flowable.common.engine.impl.de.odysseus.el.tree.impl.ast.AstParameters; | import java.util.*; import org.flowable.common.engine.impl.de.odysseus.el.tree.impl.*; import org.flowable.common.engine.impl.de.odysseus.el.tree.impl.ast.*; | [
"java.util",
"org.flowable.common"
] | java.util; org.flowable.common; | 616,821 |
@Override
public String getGID(URL url) throws MalformedURLException {
Pattern p; Matcher m;
String u = url.toExternalForm();
if (u.contains("/thread/") || u.contains("/res/")) {
p = Pattern.compile("^.*\\.[a-z]{1,3}/[a-zA-Z0-9]+/(thread|res)/([0-9]+)(\\.html|\\.php)?.*$");
... | String function(URL url) throws MalformedURLException { Pattern p; Matcher m; String u = url.toExternalForm(); if (u.contains(STR) u.contains("/res/")) { p = Pattern.compile(STR); m = p.matcher(u); if (m.matches()) { return m.group(2); } p = Pattern.compile(STR); m = p.matcher(u); if (m.matches()) { return m.group(1); ... | /**
* For example the achrives are all known. (Check 4chan-x)
* Should be based on the software the specific chan uses.
* FoolFuuka uses the same (url) layout as 4chan
*
* @param url
* @return
* The thread id in string form
* @throws java.net.MalformedURLException */ | For example the achrives are all known. (Check 4chan-x) Should be based on the software the specific chan uses. FoolFuuka uses the same (url) layout as 4chan | getGID | {
"repo_name": "EraYaN/ripme",
"path": "src/main/java/com/rarchives/ripme/ripper/rippers/ChanRipper.java",
"license": "mit",
"size": 6931
} | [
"java.net.MalformedURLException",
"java.util.regex.Matcher",
"java.util.regex.Pattern"
] | import java.net.MalformedURLException; import java.util.regex.Matcher; import java.util.regex.Pattern; | import java.net.*; import java.util.regex.*; | [
"java.net",
"java.util"
] | java.net; java.util; | 263,684 |
private boolean areTypeResourceIdsValid() {
SQLiteDatabase db = getDbHelper().getReadableDatabase();
Cursor cursor = db.query(Tables.DIRECTORIES,
new String[] { Directory.TYPE_RESOURCE_ID, Directory.PACKAGE_NAME,
DirectoryColumns.TYPE_RESOURCE_NAME }, null, n... | boolean function() { SQLiteDatabase db = getDbHelper().getReadableDatabase(); Cursor cursor = db.query(Tables.DIRECTORIES, new String[] { Directory.TYPE_RESOURCE_ID, Directory.PACKAGE_NAME, DirectoryColumns.TYPE_RESOURCE_NAME }, null, null, null, null, null); try { while (cursor.moveToNext()) { int resourceId = cursor.... | /**
* Scans through existing directories to see if the cached resource IDs still
* match their original resource names. If not - plays it safe by refreshing all directories.
*
* @return true if all resource IDs were found valid
*/ | Scans through existing directories to see if the cached resource IDs still match their original resource names. If not - plays it safe by refreshing all directories | areTypeResourceIdsValid | {
"repo_name": "rex-xxx/mt6572_x201",
"path": "packages/providers/ContactsProvider/src/com/android/providers/contacts/ContactDirectoryManager.java",
"license": "gpl-2.0",
"size": 23279
} | [
"android.database.Cursor",
"android.database.sqlite.SQLiteDatabase",
"android.provider.ContactsContract",
"android.text.TextUtils",
"com.android.providers.contacts.ContactsDatabaseHelper"
] | import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.provider.ContactsContract; import android.text.TextUtils; import com.android.providers.contacts.ContactsDatabaseHelper; | import android.database.*; import android.database.sqlite.*; import android.provider.*; import android.text.*; import com.android.providers.contacts.*; | [
"android.database",
"android.provider",
"android.text",
"com.android.providers"
] | android.database; android.provider; android.text; com.android.providers; | 199,485 |
// <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
... | void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); } | /**
* Handles the HTTP <code>GET</code> method.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/ | Handles the HTTP <code>GET</code> method | doGet | {
"repo_name": "chechiachang/booking-manager-maven",
"path": "src/main/java/com/ccc/mavenbmcp/action/CheckUserNameAction.java",
"license": "mit",
"size": 4666
} | [
"java.io.IOException",
"javax.servlet.ServletException",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse"
] | import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; | import java.io.*; import javax.servlet.*; import javax.servlet.http.*; | [
"java.io",
"javax.servlet"
] | java.io; javax.servlet; | 2,593,397 |
@Override
public ActionForward editManualEntry(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
LOG.debug("editManualEdit() started");
LaborCorrectionForm laborCorrectionForm = (LaborCorrectionForm) form;
LaborCorr... | ActionForward function(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { LOG.debug(STR); LaborCorrectionForm laborCorrectionForm = (LaborCorrectionForm) form; LaborCorrectionDocument document = laborCorrectionForm.getLaborCorrectionDocument(); int entry... | /**
* Handles edit of manual entry
*
* @see org.kuali.kfs.gl.document.web.struts.CorrectionAction#editManualEntry(org.apache.struts.action.ActionMapping,
* org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
*/ | Handles edit of manual entry | editManualEntry | {
"repo_name": "ua-eas/ua-kfs-5.3",
"path": "work/src/org/kuali/kfs/module/ld/document/web/struts/LaborCorrectionAction.java",
"license": "agpl-3.0",
"size": 74380
} | [
"java.util.Date",
"java.util.Iterator",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse",
"org.apache.struts.action.ActionForm",
"org.apache.struts.action.ActionForward",
"org.apache.struts.action.ActionMapping",
"org.kuali.kfs.gl.document.CorrectionDocumentUtils",
"... | import java.util.Date; import java.util.Iterator; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import org.kuali.kfs.gl.document.Correc... | import java.util.*; import javax.servlet.http.*; import org.apache.struts.action.*; import org.kuali.kfs.gl.document.*; import org.kuali.kfs.module.ld.businessobject.*; import org.kuali.kfs.module.ld.document.*; import org.kuali.kfs.sys.*; | [
"java.util",
"javax.servlet",
"org.apache.struts",
"org.kuali.kfs"
] | java.util; javax.servlet; org.apache.struts; org.kuali.kfs; | 2,487,454 |
// TODO maybe it is preferable to place this methods in new EclipseBuildersUtil
// ??
public static void addModifiers(TypeDeclaration typeDecl, EclipseModifier... modifiers) {
if (modifiers.length == 0) return;
int typeModifiers = typeDecl.modifiers;
for (EclipseModifier modifier : modifiers) {
typeModifi... | static void function(TypeDeclaration typeDecl, EclipseModifier... modifiers) { if (modifiers.length == 0) return; int typeModifiers = typeDecl.modifiers; for (EclipseModifier modifier : modifiers) { typeModifiers = modifier.modifierConstant; } typeDecl.modifiers = typeModifiers; } | /**
* used by builders to add modifiers to the type or field declaration
*/ | used by builders to add modifiers to the type or field declaration | addModifiers | {
"repo_name": "openlegacy/lombok",
"path": "src/core/lombok/eclipse/handlers/openlegacy/EclipseHandlerUtil.java",
"license": "mit",
"size": 14239
} | [
"org.eclipse.jdt.internal.compiler.ast.TypeDeclaration"
] | import org.eclipse.jdt.internal.compiler.ast.TypeDeclaration; | import org.eclipse.jdt.internal.compiler.ast.*; | [
"org.eclipse.jdt"
] | org.eclipse.jdt; | 2,291,445 |
Vo getVoById(PerunSession perunSession, int id) throws InternalErrorException, VoNotExistsException; | Vo getVoById(PerunSession perunSession, int id) throws InternalErrorException, VoNotExistsException; | /**
* Finds existing VO by id.
*
* @param perunSession
* @param id
* @return VO with requested id or throws if the VO with specified id doesn't exist
* @throws InternalErrorException
*/ | Finds existing VO by id | getVoById | {
"repo_name": "stavamichal/perun",
"path": "perun-core/src/main/java/cz/metacentrum/perun/core/bl/VosManagerBl.java",
"license": "bsd-2-clause",
"size": 15341
} | [
"cz.metacentrum.perun.core.api.PerunSession",
"cz.metacentrum.perun.core.api.Vo",
"cz.metacentrum.perun.core.api.exceptions.InternalErrorException",
"cz.metacentrum.perun.core.api.exceptions.VoNotExistsException"
] | import cz.metacentrum.perun.core.api.PerunSession; import cz.metacentrum.perun.core.api.Vo; import cz.metacentrum.perun.core.api.exceptions.InternalErrorException; import cz.metacentrum.perun.core.api.exceptions.VoNotExistsException; | import cz.metacentrum.perun.core.api.*; import cz.metacentrum.perun.core.api.exceptions.*; | [
"cz.metacentrum.perun"
] | cz.metacentrum.perun; | 2,255,212 |
interface WithExecute extends PredictionsClassifyImageDefinitionStages.WithAllOptions {
ImagePrediction execute(); | interface WithExecute extends PredictionsClassifyImageDefinitionStages.WithAllOptions { ImagePrediction execute(); | /**
* Execute the request.
*
* @return the ImagePrediction object if successful.
*/ | Execute the request | execute | {
"repo_name": "navalev/azure-sdk-for-java",
"path": "sdk/cognitiveservices/ms-azure-cs-customvision-prediction/src/main/java/com/microsoft/azure/cognitiveservices/vision/customvision/prediction/Predictions.java",
"license": "mit",
"size": 38351
} | [
"com.microsoft.azure.cognitiveservices.vision.customvision.prediction.models.ImagePrediction"
] | import com.microsoft.azure.cognitiveservices.vision.customvision.prediction.models.ImagePrediction; | import com.microsoft.azure.cognitiveservices.vision.customvision.prediction.models.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 1,305,357 |
public com.mozu.api.contracts.content.Document getTreeDocument(String documentListName, String documentName, Boolean includeInactive, String responseFields) throws Exception
{
MozuClient<com.mozu.api.contracts.content.Document> client = com.mozu.api.clients.content.documentlists.DocumentTreeClient.getTreeDocument... | com.mozu.api.contracts.content.Document function(String documentListName, String documentName, Boolean includeInactive, String responseFields) throws Exception { MozuClient<com.mozu.api.contracts.content.Document> client = com.mozu.api.clients.content.documentlists.DocumentTreeClient.getTreeDocumentClient(_dataViewMode... | /**
* Retrieves a document based on its document list and folder path in the document hierarchy.
* <p><pre><code>
* DocumentTree documenttree = new DocumentTree();
* Document document = documenttree.getTreeDocument( documentListName, documentName, includeInactive, responseFields);
* </code></pre></p>
* @... | Retrieves a document based on its document list and folder path in the document hierarchy. <code><code> DocumentTree documenttree = new DocumentTree(); Document document = documenttree.getTreeDocument( documentListName, documentName, includeInactive, responseFields); </code></code> | getTreeDocument | {
"repo_name": "bhewett/mozu-java",
"path": "mozu-java-core/src/main/java/com/mozu/api/resources/content/documentlists/DocumentTreeResource.java",
"license": "mit",
"size": 8725
} | [
"com.mozu.api.MozuClient"
] | import com.mozu.api.MozuClient; | import com.mozu.api.*; | [
"com.mozu.api"
] | com.mozu.api; | 2,853,849 |
EClass getIndicator(); | EClass getIndicator(); | /**
* Returns the meta object for class '
* {@link org.smeup.sys.il.data.QIndicator <em>Indicator</em>}'. <!--
* begin-user-doc --> <!-- end-user-doc -->
*
* @return the meta object for class '<em>Indicator</em>'.
* @see org.smeup.sys.il.data.QIndicator
* @generated
*/ | Returns the meta object for class ' <code>org.smeup.sys.il.data.QIndicator Indicator</code>'. | getIndicator | {
"repo_name": "smeup/asup",
"path": "org.smeup.sys.il.data/src/org/smeup/sys/il/data/QIntegratedLanguageDataPackage.java",
"license": "epl-1.0",
"size": 66058
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,029,674 |
public com.google.common.util.concurrent.ListenableFuture<
com.google.cloud.dialogflow.v2.EntityType>
getEntityType(com.google.cloud.dialogflow.v2.GetEntityTypeRequest request) {
return futureUnaryCall(
getChannel().newCall(getGetEntityTypeMethodHelper(), getCallOptions()), reque... | com.google.common.util.concurrent.ListenableFuture< com.google.cloud.dialogflow.v2.EntityType> function(com.google.cloud.dialogflow.v2.GetEntityTypeRequest request) { return futureUnaryCall( getChannel().newCall(getGetEntityTypeMethodHelper(), getCallOptions()), request); } | /**
*
*
* <pre>
* Retrieves the specified entity type.
* </pre>
*/ | <code> Retrieves the specified entity type. </code> | getEntityType | {
"repo_name": "vam-google/google-cloud-java",
"path": "google-api-grpc/grpc-google-cloud-dialogflow-v2/src/main/java/com/google/cloud/dialogflow/v2/EntityTypesGrpc.java",
"license": "apache-2.0",
"size": 71064
} | [
"io.grpc.stub.ClientCalls"
] | import io.grpc.stub.ClientCalls; | import io.grpc.stub.*; | [
"io.grpc.stub"
] | io.grpc.stub; | 1,158,385 |
public void extractQuotes(Context context)
throws XmlPullParserException, IOException {
int[] files = new int[]{R.xml.zhengyuan,R.xml.hsingyun,R.xml.shengyen};
for(int i: files) {
extractXml(context,i);
}
} | void function(Context context) throws XmlPullParserException, IOException { int[] files = new int[]{R.xml.zhengyuan,R.xml.hsingyun,R.xml.shengyen}; for(int i: files) { extractXml(context,i); } } | /**
* Extract xml into readable collection object.
*
* @param activity
* @return
* @throws XmlPullParserException
* @throws IOException
* @see http://android-er.blogspot.com/2010/04/read-xml-resources-in-android-using.html
*/ | Extract xml into readable collection object | extractQuotes | {
"repo_name": "yancyn/BuddhistQuotes",
"path": "src/com/muje/android/quotes/QuoteManager.java",
"license": "gpl-2.0",
"size": 2886
} | [
"android.content.Context",
"java.io.IOException",
"org.xmlpull.v1.XmlPullParserException"
] | import android.content.Context; import java.io.IOException; import org.xmlpull.v1.XmlPullParserException; | import android.content.*; import java.io.*; import org.xmlpull.v1.*; | [
"android.content",
"java.io",
"org.xmlpull.v1"
] | android.content; java.io; org.xmlpull.v1; | 592,100 |
public ILanguageMap getLanguageMap(Locale l) throws SystemFault {
if ( Locale.ENGLISH.getDisplayLanguage().equals(
l.getDisplayLanguage()) ) return new EnglishMap();
throw new SystemFault(l.toString() + " is not supported yet.");
}
| ILanguageMap function(Locale l) throws SystemFault { if ( Locale.ENGLISH.getDisplayLanguage().equals( l.getDisplayLanguage()) ) return new EnglishMap(); throw new SystemFault(l.toString() + STR); } | /**
* Initializes a language mapping class for a given locale.
* @param l
* @return Language specific schema mapping for a given Locale
* @throws SystemFault
*/ | Initializes a language mapping class for a given locale | getLanguageMap | {
"repo_name": "bizosys/hsearch-obsolete",
"path": "src/java/com/bizosys/hsearch/schema/SchemaManager.java",
"license": "apache-2.0",
"size": 11022
} | [
"com.bizosys.oneline.SystemFault",
"java.util.Locale"
] | import com.bizosys.oneline.SystemFault; import java.util.Locale; | import com.bizosys.oneline.*; import java.util.*; | [
"com.bizosys.oneline",
"java.util"
] | com.bizosys.oneline; java.util; | 1,441,326 |
public void testCollator() throws Exception {
// ROOT locale
Benchmark benchmark = execBenchmark(getCollatorConfig("ROOT", "impl:jdk"));
CollationKeyAnalyzer expected = new CollationKeyAnalyzer(TEST_VERSION_CURRENT, Collator
.getInstance(new Locale("")));
assertEqualCollation(expected, benchma... | void function() throws Exception { Benchmark benchmark = execBenchmark(getCollatorConfig("ROOT", STR)); CollationKeyAnalyzer expected = new CollationKeyAnalyzer(TEST_VERSION_CURRENT, Collator .getInstance(new Locale(STRfoobarSTRde", STR)); expected = new CollationKeyAnalyzer(TEST_VERSION_CURRENT, Collator.getInstance(n... | /**
* Test that we can create CollationAnalyzers.
*/ | Test that we can create CollationAnalyzers | testCollator | {
"repo_name": "zhangdian/solr4.6.0",
"path": "lucene/benchmark/src/test/org/apache/lucene/benchmark/byTask/TestPerfTasksLogic.java",
"license": "apache-2.0",
"size": 43116
} | [
"java.text.Collator",
"java.util.Locale",
"org.apache.lucene.collation.CollationKeyAnalyzer"
] | import java.text.Collator; import java.util.Locale; import org.apache.lucene.collation.CollationKeyAnalyzer; | import java.text.*; import java.util.*; import org.apache.lucene.collation.*; | [
"java.text",
"java.util",
"org.apache.lucene"
] | java.text; java.util; org.apache.lucene; | 40,974 |
public void setTimeout(int tmo) {
// Call the base class to store the timeout
super.setTimeout(tmo);
// Set the socket timeout, if the socket is valid
if ( m_socket != null) {
try {
m_socket.setSoTimeout( getTimeout());
}
catch ( SocketException ex) {
... | void function(int tmo) { super.setTimeout(tmo); if ( m_socket != null) { try { m_socket.setSoTimeout( getTimeout()); } catch ( SocketException ex) { } } } public static void setDebug ( boolean dbg) { m_debug = dbg; } | /**
* Set the socket timeout
*
* @param tmo int
*/ | Set the socket timeout | setTimeout | {
"repo_name": "arcusys/Liferay-CIFS",
"path": "source/java/org/alfresco/jlan/server/auth/passthru/TcpipSMBNetworkSession.java",
"license": "gpl-3.0",
"size": 7242
} | [
"java.net.SocketException"
] | import java.net.SocketException; | import java.net.*; | [
"java.net"
] | java.net; | 1,115,144 |
@Override
public void write(int theByte)
throws java.io.IOException {
// Encoding suspended?
if( suspendEncoding ) {
super.out.write( theByte );
return;
} // end if: supsended
// Encode?
i... | void function(int theByte) throws java.io.IOException { if( suspendEncoding ) { super.out.write( theByte ); return; } if( encode ) { buffer[ position++ ] = (byte)theByte; if( position >= bufferLength ) { out.write( encode3to4( b4, buffer, bufferLength, options ) ); lineLength += 4; if( breakLines && lineLength >= MAX_L... | /**
* Writes the byte to the output stream after
* converting to/from Base64 notation.
* When encoding, bytes are buffered three
* at a time before the output stream actually
* gets a write() call.
* When decoding, bytes are buffered four
* at a time.
... | Writes the byte to the output stream after converting to/from Base64 notation. When encoding, bytes are buffered three at a time before the output stream actually gets a write() call. When decoding, bytes are buffered four at a time | write | {
"repo_name": "symcomp/org.symcomp.openmath",
"path": "src/main/java/org/symcomp/openmath/Base64.java",
"license": "apache-2.0",
"size": 77717
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 981,532 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Void> deleteAsync(String resourceGroupName, String resourceName, Context context) {
return beginDeleteAsync(resourceGroupName, resourceName, context)
.last()
.flatMap(this.client::getLroFinalResultOrError);
} | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Void> function(String resourceGroupName, String resourceName, Context context) { return beginDeleteAsync(resourceGroupName, resourceName, context) .last() .flatMap(this.client::getLroFinalResultOrError); } | /**
* Delete an IoT Central application.
*
* @param resourceGroupName The name of the resource group that contains the IoT Central application.
* @param resourceName The ARM resource name of the IoT Central application.
* @param context The context to associate with this operation.
* @thro... | Delete an IoT Central application | deleteAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/iotcentral/azure-resourcemanager-iotcentral/src/main/java/com/azure/resourcemanager/iotcentral/implementation/AppsClientImpl.java",
"license": "mit",
"size": 103959
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.util.Context"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.util.Context; | import com.azure.core.annotation.*; import com.azure.core.util.*; | [
"com.azure.core"
] | com.azure.core; | 385,748 |
public void testObstructedRecurisvely() throws Exception {
// create a file tree consisting of <origFolder>/foo/bar
File foo = new File(origFolder, "foo");
foo.mkdir();
File bar = new File(foo, "bar");
bar.createNewFile();
File mu = new File(origFolder, "mu");
... | void function() throws Exception { File foo = new File(origFolder, "foo"); foo.mkdir(); File bar = new File(foo, "bar"); bar.createNewFile(); File mu = new File(origFolder, "mu"); mu.createNewFile(); writeStringToFile(mu, "moo"); writeStringToFile(bar, STR); createResourceLoader(false); createJarResourceLoader(false); ... | /**
* Verify that a request for a directory, regardless of it return code, does
* not cause subsequent requests for elements beneath that directory to
* fail.
* <p>
* Regression test for W-1387862
*/ | Verify that a request for a directory, regardless of it return code, does not cause subsequent requests for elements beneath that directory to fail. Regression test for W-1387862 | testObstructedRecurisvely | {
"repo_name": "lhong375/aura",
"path": "aura-util/src/test/java/org/auraframework/util/resource/ResourceLoaderTest.java",
"license": "apache-2.0",
"size": 19059
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 1,876,731 |
private void compileTagHandlerPoolList(Node.Nodes page)
throws JasperException {
class TagHandlerPoolVisitor extends Node.Visitor {
private final Vector<String> names;
TagHandlerPoolVisitor(Vector<String> v) {
names = v;
} | void function(Node.Nodes page) throws JasperException { class TagHandlerPoolVisitor extends Node.Visitor { private final Vector<String> names; TagHandlerPoolVisitor(Vector<String> v) { names = v; } | /**
* Compiles list of tag handler pool names.
*/ | Compiles list of tag handler pool names | compileTagHandlerPoolList | {
"repo_name": "plumer/codana",
"path": "tomcat_files/8.0.22/Generator.java",
"license": "mit",
"size": 173069
} | [
"java.util.Vector",
"org.apache.jasper.JasperException"
] | import java.util.Vector; import org.apache.jasper.JasperException; | import java.util.*; import org.apache.jasper.*; | [
"java.util",
"org.apache.jasper"
] | java.util; org.apache.jasper; | 600,412 |
@Test
public void testErrInvalidArgumentsWithVerbose() {
injectTestSystemOut();
int resCode = EXIT_CODE_INVALID_ARGUMENTS;
String uuid = UUID.randomUUID().toString();
assertEquals(resCode, execute(BASELINE.text(), uuid));
assertNotContains(log, testOut.toString(), ERROR... | void function() { injectTestSystemOut(); int resCode = EXIT_CODE_INVALID_ARGUMENTS; String uuid = UUID.randomUUID().toString(); assertEquals(resCode, execute(BASELINE.text(), uuid)); assertNotContains(log, testOut.toString(), ERROR_STACK_TRACE_PREFIX); assertEquals(resCode, execute(BASELINE.text(), CMD_VERBOSE, uuid));... | /**
* Test checks that stack trace for incorrect arguments will be output
* only if {@link CommonArgParser#CMD_VERBOSE} flag is present.
*/ | Test checks that stack trace for incorrect arguments will be output only if <code>CommonArgParser#CMD_VERBOSE</code> flag is present | testErrInvalidArgumentsWithVerbose | {
"repo_name": "samaitra/ignite",
"path": "modules/control-utility/src/test/java/org/apache/ignite/util/GridCommandHandlerClusterByClassTest.java",
"license": "apache-2.0",
"size": 62481
} | [
"java.util.UUID",
"org.apache.ignite.internal.commandline.CommandList",
"org.apache.ignite.testframework.GridTestUtils"
] | import java.util.UUID; import org.apache.ignite.internal.commandline.CommandList; import org.apache.ignite.testframework.GridTestUtils; | import java.util.*; import org.apache.ignite.internal.commandline.*; import org.apache.ignite.testframework.*; | [
"java.util",
"org.apache.ignite"
] | java.util; org.apache.ignite; | 457,823 |
protected static String getModelIDFromPosition(Context context, int position) {
if (lexicalModelsList == null) {
lexicalModelsList = getLexicalModelsList(context);
}
String modelID = "";
if (lexicalModelsList != null && position >= 0 && position < lexicalModelsList.size()) {
HashMap<Strin... | static String function(Context context, int position) { if (lexicalModelsList == null) { lexicalModelsList = getLexicalModelsList(context); } String modelID = ""; if (lexicalModelsList != null && position >= 0 && position < lexicalModelsList.size()) { HashMap<String, String> lexicalModelInfo = lexicalModelsList.get(pos... | /**
* getModelIDFromPosition - Get the lexical model ID at a given position
* @param context
* @param position - int position of the lexical model
* @return String - model ID. Blank if invalid position
*/ | getModelIDFromPosition - Get the lexical model ID at a given position | getModelIDFromPosition | {
"repo_name": "tavultesoft/keymanweb",
"path": "android/KMEA/app/src/main/java/com/tavultesoft/kmea/KeyboardPickerActivity.java",
"license": "apache-2.0",
"size": 29404
} | [
"android.content.Context",
"java.util.HashMap"
] | import android.content.Context; import java.util.HashMap; | import android.content.*; import java.util.*; | [
"android.content",
"java.util"
] | android.content; java.util; | 2,311,444 |
Collection<? extends T> getBlockers(); | Collection<? extends T> getBlockers(); | /**
* Returns blocker references for this.
* @return the blocker references
*/ | Returns blocker references for this | getBlockers | {
"repo_name": "asakusafw/asakusafw-compiler",
"path": "compiler-project/api/src/main/java/com/asakusafw/lang/compiler/api/reference/BlockingReference.java",
"license": "apache-2.0",
"size": 1006
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 2,527,975 |
public void translateTo(ClassGenerator classGen, MethodGenerator methodGen,
NodeSetType type) {
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
int index = cpg.addMethodref(BASIS_LIBRARY_CLASS, "re... | void function(ClassGenerator classGen, MethodGenerator methodGen, NodeSetType type) { final ConstantPoolGen cpg = classGen.getConstantPool(); final InstructionList il = methodGen.getInstructionList(); int index = cpg.addMethodref(BASIS_LIBRARY_CLASS, STR, "(" + OBJECT_SIG + ")" + NODE_ITERATOR_SIG); il.append(new INVOK... | /**
* Casts a reference into a NodeIterator.
*
* @see com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type#translateTo
*/ | Casts a reference into a NodeIterator | translateTo | {
"repo_name": "md-5/jdk10",
"path": "src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ReferenceType.java",
"license": "gpl-2.0",
"size": 15256
} | [
"com.sun.org.apache.bcel.internal.generic.ConstantPoolGen",
"com.sun.org.apache.bcel.internal.generic.InstructionList"
] | import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen; import com.sun.org.apache.bcel.internal.generic.InstructionList; | import com.sun.org.apache.bcel.internal.generic.*; | [
"com.sun.org"
] | com.sun.org; | 688,799 |
public static NabuccoPropertyDescriptor getPropertyDescriptor(String propertyName) {
return PropertyCache.getInstance().retrieve(ProvisionGroupProduceRq.class).getProperty(propertyName);
}
| static NabuccoPropertyDescriptor function(String propertyName) { return PropertyCache.getInstance().retrieve(ProvisionGroupProduceRq.class).getProperty(propertyName); } | /**
* Getter for the PropertyDescriptor.
*
* @param propertyName the String.
* @return the NabuccoPropertyDescriptor.
*/ | Getter for the PropertyDescriptor | getPropertyDescriptor | {
"repo_name": "NABUCCO/org.nabucco.business.provision",
"path": "org.nabucco.business.provision.facade.message/src/main/gen/org/nabucco/business/provision/facade/message/produce/ProvisionGroupProduceRq.java",
"license": "epl-1.0",
"size": 5493
} | [
"org.nabucco.framework.base.facade.datatype.property.NabuccoPropertyDescriptor",
"org.nabucco.framework.base.facade.datatype.property.PropertyCache"
] | import org.nabucco.framework.base.facade.datatype.property.NabuccoPropertyDescriptor; import org.nabucco.framework.base.facade.datatype.property.PropertyCache; | import org.nabucco.framework.base.facade.datatype.property.*; | [
"org.nabucco.framework"
] | org.nabucco.framework; | 1,022,734 |
private String buildEditGroupContext(SessionState state, Context context)
{
context.put("tlang", rb);
// name the html form for user edit fields
context.put("form-name", "group-form");
Site site = (Site) state.getAttribute("site");
Group group = (Group) state.getAttribute("group");
context.put("site",... | String function(SessionState state, Context context) { context.put("tlang", rb); context.put(STR, STR); Site site = (Site) state.getAttribute("site"); Group group = (Group) state.getAttribute("group"); context.put("site", site); context.put("group", group); Menu bar = new MenuImpl(); bar.add(new MenuEntry(rb.getString(... | /**
* Build the context for the edit group mode.
*/ | Build the context for the edit group mode | buildEditGroupContext | {
"repo_name": "ouit0408/sakai",
"path": "site/site-tool/tool/src/java/org/sakaiproject/site/tool/AdminSitesAction.java",
"license": "apache-2.0",
"size": 76844
} | [
"org.sakaiproject.cheftool.Context",
"org.sakaiproject.cheftool.api.Menu",
"org.sakaiproject.cheftool.api.MenuItem",
"org.sakaiproject.cheftool.menu.MenuEntry",
"org.sakaiproject.cheftool.menu.MenuImpl",
"org.sakaiproject.event.api.SessionState",
"org.sakaiproject.site.api.Group",
"org.sakaiproject.si... | import org.sakaiproject.cheftool.Context; import org.sakaiproject.cheftool.api.Menu; import org.sakaiproject.cheftool.api.MenuItem; import org.sakaiproject.cheftool.menu.MenuEntry; import org.sakaiproject.cheftool.menu.MenuImpl; import org.sakaiproject.event.api.SessionState; import org.sakaiproject.site.api.Group; imp... | import org.sakaiproject.cheftool.*; import org.sakaiproject.cheftool.api.*; import org.sakaiproject.cheftool.menu.*; import org.sakaiproject.event.api.*; import org.sakaiproject.site.api.*; | [
"org.sakaiproject.cheftool",
"org.sakaiproject.event",
"org.sakaiproject.site"
] | org.sakaiproject.cheftool; org.sakaiproject.event; org.sakaiproject.site; | 2,739,773 |
public static void assertEqualsVoice(Voice expectedVoice, Voice voice, MP voiceMP) {
assertEquals(""+voiceMP, expectedVoice.getElements().size(), voice.getElements().size());
for (int i : range(expectedVoice.getElements())) {
VoiceElement expElement = expectedVoice.getElement(i);
VoiceElement element = voice... | static void function(Voice expectedVoice, Voice voice, MP voiceMP) { assertEquals(""+voiceMP, expectedVoice.getElements().size(), voice.getElements().size()); for (int i : range(expectedVoice.getElements())) { VoiceElement expElement = expectedVoice.getElement(i); VoiceElement element = voice.getElement(i); assertEqual... | /**
* Tests the equality of the given voices, but only the durations of the rests
* and the durations and notes of the chords.
*/ | Tests the equality of the given voices, but only the durations of the rests and the durations and notes of the chords | assertEqualsVoice | {
"repo_name": "Xenoage/Zong",
"path": "test/test/musicxmltestsuite/tests/utils/VoiceTest.java",
"license": "agpl-3.0",
"size": 1150
} | [
"com.xenoage.utils.kernel.Range",
"com.xenoage.zong.core.music.Voice",
"com.xenoage.zong.core.music.VoiceElement",
"com.xenoage.zong.core.music.chord.Chord",
"org.junit.Assert"
] | import com.xenoage.utils.kernel.Range; import com.xenoage.zong.core.music.Voice; import com.xenoage.zong.core.music.VoiceElement; import com.xenoage.zong.core.music.chord.Chord; import org.junit.Assert; | import com.xenoage.utils.kernel.*; import com.xenoage.zong.core.music.*; import com.xenoage.zong.core.music.chord.*; import org.junit.*; | [
"com.xenoage.utils",
"com.xenoage.zong",
"org.junit"
] | com.xenoage.utils; com.xenoage.zong; org.junit; | 2,023,910 |
public static Value utf8_decode(Env env, StringValue str) {
StringValue sb = env.createUnicodeBuilder();
int len = str.length();
for (int i = 0; i < len; i++) {
int ch = str.charAt(i) & 0xff;
if (ch < 0x80) {
sb.append((char) ch);
} else if ((ch & 0xe0) == 0... | static Value function(Env env, StringValue str) { StringValue sb = env.createUnicodeBuilder(); int len = str.length(); for (int i = 0; i < len; i++) { int ch = str.charAt(i) & 0xff; if (ch < 0x80) { sb.append((char) ch); } else if ((ch & 0xe0) == 0xc0) { int d1 = (ch & 0x1f) << 6; int d2 = str.charAt(++i) & 0x3f; sb.ap... | /**
* Converts from utf8 to iso-8859-1
*/ | Converts from utf8 to iso-8859-1 | utf8_decode | {
"repo_name": "CleverCloud/Quercus",
"path": "quercus/src/main/java/com/caucho/quercus/lib/xml/XmlModule.java",
"license": "gpl-2.0",
"size": 14011
} | [
"com.caucho.quercus.env.Env",
"com.caucho.quercus.env.StringValue",
"com.caucho.quercus.env.Value"
] | import com.caucho.quercus.env.Env; import com.caucho.quercus.env.StringValue; import com.caucho.quercus.env.Value; | import com.caucho.quercus.env.*; | [
"com.caucho.quercus"
] | com.caucho.quercus; | 2,333,997 |
private static void updateModifier(final Coordinate coord, final Coordinate modifier) {
for (int i = 0; i < 3; i++) {
double coordOrdinateValue, modifierOrdinateValue;
switch (i) {
case 1:
coordOrdinateValue = coord.getY();
modifierOrdinateValue = modifier.getY();
... | static void function(final Coordinate coord, final Coordinate modifier) { for (int i = 0; i < 3; i++) { double coordOrdinateValue, modifierOrdinateValue; switch (i) { case 1: coordOrdinateValue = coord.getY(); modifierOrdinateValue = modifier.getY(); break; case 2: coordOrdinateValue = coord.getZ(); modifierOrdinateVal... | /**
* update modifier for each axis of the coordinate where the modifier's axis is less extreme than
* the provides coordinate
*
* @param modifier
* @param cood
*/ | update modifier for each axis of the coordinate where the modifier's axis is less extreme than the provides coordinate | updateModifier | {
"repo_name": "spohnan/geowave",
"path": "core/geotime/src/main/java/org/locationtech/geowave/core/geotime/util/GeometryUtils.java",
"license": "apache-2.0",
"size": 33870
} | [
"org.locationtech.jts.geom.Coordinate"
] | import org.locationtech.jts.geom.Coordinate; | import org.locationtech.jts.geom.*; | [
"org.locationtech.jts"
] | org.locationtech.jts; | 1,804,131 |
@Test(dataProvider = "generateAclOwnerAndGroup")
public void processAclUpdate(final String newOwner, final String newGroup) throws Exception {
bundles[0].submitFeedsScheduleProcess();
final ProcessMerlin processMerlin = new ProcessMerlin(processString);
processMerlin.setACL(newOwner, new... | @Test(dataProvider = STR) void function(final String newOwner, final String newGroup) throws Exception { bundles[0].submitFeedsScheduleProcess(); final ProcessMerlin processMerlin = new ProcessMerlin(processString); processMerlin.setACL(newOwner, newGroup, "*"); final String newProcess = processMerlin.toString(); Asser... | /**
* Test process acl modification.
* @throws Exception
*/ | Test process acl modification | processAclUpdate | {
"repo_name": "sanjeevtripurari/falcon",
"path": "falcon-regression/merlin/src/test/java/org/apache/falcon/regression/security/ProcessAclTest.java",
"license": "apache-2.0",
"size": 10054
} | [
"org.apache.falcon.regression.Entities",
"org.apache.falcon.regression.core.util.AssertUtil",
"org.testng.annotations.Test"
] | import org.apache.falcon.regression.Entities; import org.apache.falcon.regression.core.util.AssertUtil; import org.testng.annotations.Test; | import org.apache.falcon.regression.*; import org.apache.falcon.regression.core.util.*; import org.testng.annotations.*; | [
"org.apache.falcon",
"org.testng.annotations"
] | org.apache.falcon; org.testng.annotations; | 2,422,898 |
protected void sequence_Relation(EObject context, RelationalExpression semanticObject) {
genericSequencer.createSequence(context, semanticObject);
}
| void function(EObject context, RelationalExpression semanticObject) { genericSequencer.createSequence(context, semanticObject); } | /**
* Constraint:
* (left=Relation_RelationalExpression_1_0 operator=RelationalOperator right=ShiftExpression)
*/ | Constraint: (left=Relation_RelationalExpression_1_0 operator=RelationalOperator right=ShiftExpression) | sequence_Relation | {
"repo_name": "mlanoe/x-vhdl",
"path": "plugins/net.mlanoe.language.vhdl.xtext/src-gen/net/mlanoe/language/vhdl/xtext/serializer/AbstractVhdlSemanticSequencer.java",
"license": "gpl-3.0",
"size": 147569
} | [
"net.mlanoe.language.vhdl.expression.RelationalExpression",
"org.eclipse.emf.ecore.EObject"
] | import net.mlanoe.language.vhdl.expression.RelationalExpression; import org.eclipse.emf.ecore.EObject; | import net.mlanoe.language.vhdl.expression.*; import org.eclipse.emf.ecore.*; | [
"net.mlanoe.language",
"org.eclipse.emf"
] | net.mlanoe.language; org.eclipse.emf; | 496,239 |
@Nonnull
private static String getPinotTaskName(@Nonnull String helixJobName) {
return helixJobName.substring(TASK_QUEUE_PREFIX.length() + getTaskType(helixJobName).length() + 1);
} | static String function(@Nonnull String helixJobName) { return helixJobName.substring(TASK_QUEUE_PREFIX.length() + getTaskType(helixJobName).length() + 1); } | /**
* Helper method to convert Helix Job name with JobQueue prefix to Pinot task name.
* <p>E.g. TaskQueue_DummyTask_Task_DummyTask_12345 -> Task_DummyTask_12345
*
* @param helixJobName Helix Job name
* @return Pinot task name
*/ | Helper method to convert Helix Job name with JobQueue prefix to Pinot task name. E.g. TaskQueue_DummyTask_Task_DummyTask_12345 -> Task_DummyTask_12345 | getPinotTaskName | {
"repo_name": "apucher/pinot",
"path": "pinot-controller/src/main/java/com/linkedin/pinot/controller/helix/core/minion/PinotHelixTaskResourceManager.java",
"license": "apache-2.0",
"size": 12686
} | [
"javax.annotation.Nonnull"
] | import javax.annotation.Nonnull; | import javax.annotation.*; | [
"javax.annotation"
] | javax.annotation; | 702,937 |
public Vector<Invid> getRescanObjectsList()
{
if (!doRescan())
{
return new Vector<Invid>();
}
breakOutRescanList();
return new Vector<Invid>(rescanHash.keySet()); // copy
} | Vector<Invid> function() { if (!doRescan()) { return new Vector<Invid>(); } breakOutRescanList(); return new Vector<Invid>(rescanHash.keySet()); } | /**
* <p>This method returns a Vector of Invid objects, corresponding to
* those objects which need to have some field rescan work done.</p>
*/ | This method returns a Vector of Invid objects, corresponding to those objects which need to have some field rescan work done | getRescanObjectsList | {
"repo_name": "jonabbey/Ganymede",
"path": "src/ganymede/arlut/csd/ganymede/common/ReturnVal.java",
"license": "gpl-2.0",
"size": 42505
} | [
"java.util.Vector"
] | import java.util.Vector; | import java.util.*; | [
"java.util"
] | java.util; | 1,978,367 |
return interaction;
}
/**
* Sets the value of the interaction property.
*
* @param value
* allowed object is
* {@link Interaction }
| return interaction; } /** * Sets the value of the interaction property. * * @param value * allowed object is * {@link Interaction } | /**
* Gets the value of the interaction property.
*
* @return
* possible object is
* {@link Interaction }
*
*/ | Gets the value of the interaction property | getInteraction | {
"repo_name": "delkyd/Oracle-Cloud",
"path": "PaaS_SaaS_Accelerator_RESTFulFacade/FusionProxy_InteractionService/src/com/oracle/xmlns/apps/crmcommon/interactions/interactionservice/types/UpdateInteraction.java",
"license": "bsd-3-clause",
"size": 1771
} | [
"com.oracle.xmlns.apps.crmcommon.interactions.interactionservice.Interaction"
] | import com.oracle.xmlns.apps.crmcommon.interactions.interactionservice.Interaction; | import com.oracle.xmlns.apps.crmcommon.interactions.interactionservice.*; | [
"com.oracle.xmlns"
] | com.oracle.xmlns; | 813,251 |
private ContainerRequest setupContainerAskForRM() {
// setup requirements for hosts
// using * as any host will do for the distributed shell app
// set the priority for the request
Priority pri = Records.newRecord(Priority.class);
// TODO - what is the range for priority? how to decide?
pri.se... | ContainerRequest function() { Priority pri = Records.newRecord(Priority.class); pri.setPriority(GiraphConstants.GIRAPH_YARN_PRIORITY); Resource capability = Records.newRecord(Resource.class); capability.setMemory(heapPerContainer); ContainerRequest request = new ContainerRequest(capability, null, null, pri); LOG.info(S... | /**
* Setup the request that will be sent to the RM for the container ask.
*
* @return the setup ResourceRequest to be sent to RM
*/ | Setup the request that will be sent to the RM for the container ask | setupContainerAskForRM | {
"repo_name": "basio/graph",
"path": "giraph-core/src/main/java/org/apache/giraph/yarn/GiraphApplicationMaster.java",
"license": "apache-2.0",
"size": 27677
} | [
"org.apache.giraph.conf.GiraphConstants",
"org.apache.hadoop.yarn.api.records.Priority",
"org.apache.hadoop.yarn.api.records.Resource",
"org.apache.hadoop.yarn.client.api.AMRMClient",
"org.apache.hadoop.yarn.util.Records"
] | import org.apache.giraph.conf.GiraphConstants; import org.apache.hadoop.yarn.api.records.Priority; import org.apache.hadoop.yarn.api.records.Resource; import org.apache.hadoop.yarn.client.api.AMRMClient; import org.apache.hadoop.yarn.util.Records; | import org.apache.giraph.conf.*; import org.apache.hadoop.yarn.api.records.*; import org.apache.hadoop.yarn.client.api.*; import org.apache.hadoop.yarn.util.*; | [
"org.apache.giraph",
"org.apache.hadoop"
] | org.apache.giraph; org.apache.hadoop; | 1,215,367 |
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
log.info("__!! About to reset all data !!__");
try {
final CountDownLatch countDownLatch = new CountDownLatch(1);
Firebase firebase = new... | void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { log.info(STR); try { final CountDownLatch countDownLatch = new CountDownLatch(1); Firebase firebase = new Firebase(STR/WEB-INF/client.propertiesSTRusernameSTRpasswordSTRGot Firebase credentials for "+ username... | /**
* Processes requests for both HTTP <code>GET</code> and <code>POST</code>
* methods.
*
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/ | Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods | processRequest | {
"repo_name": "alexismp/egress",
"path": "server/src/main/java/org/alexismp/egress/ResetAllServlet.java",
"license": "apache-2.0",
"size": 5590
} | [
"com.firebase.client.Firebase",
"java.io.IOException",
"java.util.concurrent.CountDownLatch",
"javax.servlet.ServletException",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse"
] | import com.firebase.client.Firebase; import java.io.IOException; import java.util.concurrent.CountDownLatch; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; | import com.firebase.client.*; import java.io.*; import java.util.concurrent.*; import javax.servlet.*; import javax.servlet.http.*; | [
"com.firebase.client",
"java.io",
"java.util",
"javax.servlet"
] | com.firebase.client; java.io; java.util; javax.servlet; | 1,790,625 |
public FieldVector3D<DerivativeStructure> accelerationDerivatives(final SpacecraftState s,
final String paramName)
throws OrekitException {
if (!hParam.containsKey(paramName)) {
// build the list of supported paramet... | FieldVector3D<DerivativeStructure> function(final SpacecraftState s, final String paramName) throws OrekitException { if (!hParam.containsKey(paramName)) { final StringBuilder builder = new StringBuilder(); for (final String available : hParam.keySet()) { if (builder.length() > 0) { builder.append(STR); } builder.appen... | /** Compute acceleration and derivatives with respect to parameter.
* @param s current state
* @param paramName parameter with respect to which derivation is desired
* @return acceleration with derivatives
* @exception OrekitException if the underlying force models cannot compute the acceleration
... | Compute acceleration and derivatives with respect to parameter | accelerationDerivatives | {
"repo_name": "attatrol/Orekit",
"path": "src/main/java/org/orekit/propagation/numerical/Jacobianizer.java",
"license": "apache-2.0",
"size": 16770
} | [
"org.apache.commons.math3.analysis.differentiation.DerivativeStructure",
"org.apache.commons.math3.geometry.euclidean.threed.FieldVector3D",
"org.apache.commons.math3.geometry.euclidean.threed.Vector3D",
"org.orekit.errors.OrekitException",
"org.orekit.errors.OrekitMessages",
"org.orekit.orbits.Orbit",
... | import org.apache.commons.math3.analysis.differentiation.DerivativeStructure; import org.apache.commons.math3.geometry.euclidean.threed.FieldVector3D; import org.apache.commons.math3.geometry.euclidean.threed.Vector3D; import org.orekit.errors.OrekitException; import org.orekit.errors.OrekitMessages; import org.orekit.... | import org.apache.commons.math3.analysis.differentiation.*; import org.apache.commons.math3.geometry.euclidean.threed.*; import org.orekit.errors.*; import org.orekit.orbits.*; import org.orekit.propagation.*; | [
"org.apache.commons",
"org.orekit.errors",
"org.orekit.orbits",
"org.orekit.propagation"
] | org.apache.commons; org.orekit.errors; org.orekit.orbits; org.orekit.propagation; | 2,861,184 |
private void showSaf(String[] words) {
SafAdapterApp app = (SafAdapterApp)AppManager.getInstance().getApp(SafAdapterApp.APP_NAME);
if (app == null) {
System.err.println("SAF app is not installed");
return;
}
System.out.println("Discovered Neighbors");
for (Neighbor neighbor : NeighborsList.getInst... | void function(String[] words) { SafAdapterApp app = (SafAdapterApp)AppManager.getInstance().getApp(SafAdapterApp.APP_NAME); if (app == null) { System.err.println(STR); return; } System.out.println(STR); for (Neighbor neighbor : NeighborsList.getInstance()) { if (neighbor.isTemporary()) { System.out.println(" " + neighb... | /**
* Execute 'show saf' command; show info about Service Advertisement Framework.
* @param words arguments
*/ | Execute 'show saf' command; show info about Service Advertisement Framework | showSaf | {
"repo_name": "KritikalFabric/corefabric.io",
"path": "src/contrib/java/com/cisco/qte/jdtn/Shell.java",
"license": "apache-2.0",
"size": 123060
} | [
"com.cisco.qte.jdtn.apps.AppManager",
"com.cisco.qte.jdtn.apps.SafAdapterApp",
"com.cisco.qte.jdtn.general.Neighbor",
"com.cisco.qte.jdtn.general.NeighborsList",
"com.cisco.saf.Service",
"java.util.List"
] | import com.cisco.qte.jdtn.apps.AppManager; import com.cisco.qte.jdtn.apps.SafAdapterApp; import com.cisco.qte.jdtn.general.Neighbor; import com.cisco.qte.jdtn.general.NeighborsList; import com.cisco.saf.Service; import java.util.List; | import com.cisco.qte.jdtn.apps.*; import com.cisco.qte.jdtn.general.*; import com.cisco.saf.*; import java.util.*; | [
"com.cisco.qte",
"com.cisco.saf",
"java.util"
] | com.cisco.qte; com.cisco.saf; java.util; | 225,881 |
public void randomIndexTemplate() throws IOException {
// TODO move settings for random directory etc here into the index based randomized settings.
if (cluster().size() > 0) {
Settings.Builder randomSettingsBuilder =
setRandomIndexSettings(random(), Settings.builder... | void function() throws IOException { if (cluster().size() > 0) { Settings.Builder randomSettingsBuilder = setRandomIndexSettings(random(), Settings.builder()); if (isInternalCluster()) { randomSettingsBuilder.put(INDEX_TEST_SEED_SETTING.getKey(), random().nextLong()); } randomSettingsBuilder.put(SETTING_NUMBER_OF_SHARD... | /**
* Creates a randomized index template. This template is used to pass in randomized settings on a
* per index basis. Allows to enable/disable the randomization for number of shards and replicas
*/ | Creates a randomized index template. This template is used to pass in randomized settings on a per index basis. Allows to enable/disable the randomization for number of shards and replicas | randomIndexTemplate | {
"repo_name": "palecur/elasticsearch",
"path": "test/framework/src/main/java/org/elasticsearch/test/ESIntegTestCase.java",
"license": "apache-2.0",
"size": 98171
} | [
"java.io.IOException",
"org.elasticsearch.action.admin.indices.template.put.PutIndexTemplateRequestBuilder",
"org.elasticsearch.cluster.routing.UnassignedInfo",
"org.elasticsearch.common.settings.Settings",
"org.elasticsearch.common.xcontent.XContentBuilder",
"org.elasticsearch.common.xcontent.XContentFac... | import java.io.IOException; import org.elasticsearch.action.admin.indices.template.put.PutIndexTemplateRequestBuilder; import org.elasticsearch.cluster.routing.UnassignedInfo; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xco... | import java.io.*; import org.elasticsearch.action.admin.indices.template.put.*; import org.elasticsearch.cluster.routing.*; import org.elasticsearch.common.settings.*; import org.elasticsearch.common.xcontent.*; import org.elasticsearch.index.*; import org.elasticsearch.index.codec.*; import org.elasticsearch.test.hamc... | [
"java.io",
"org.elasticsearch.action",
"org.elasticsearch.cluster",
"org.elasticsearch.common",
"org.elasticsearch.index",
"org.elasticsearch.test",
"org.hamcrest"
] | java.io; org.elasticsearch.action; org.elasticsearch.cluster; org.elasticsearch.common; org.elasticsearch.index; org.elasticsearch.test; org.hamcrest; | 103,357 |
public IncrementTypeEnum getIncrementTypeValue(); | IncrementTypeEnum function(); | /**
* Returns the increment type. This specifies dataset values increment step.
* @return one of the increment constants in {@link IncrementTypeEnum}.
*/ | Returns the increment type. This specifies dataset values increment step | getIncrementTypeValue | {
"repo_name": "aleatorio12/ProVentasConnector",
"path": "jasperreports-6.2.1-project/jasperreports-6.2.1/src/net/sf/jasperreports/engine/JRElementDataset.java",
"license": "gpl-3.0",
"size": 2940
} | [
"net.sf.jasperreports.engine.type.IncrementTypeEnum"
] | import net.sf.jasperreports.engine.type.IncrementTypeEnum; | import net.sf.jasperreports.engine.type.*; | [
"net.sf.jasperreports"
] | net.sf.jasperreports; | 2,733,677 |
@ApiModelProperty(example = "null", value = "")
public HeaderForGoods getHeader() {
return header;
} | @ApiModelProperty(example = "null", value = "") HeaderForGoods function() { return header; } | /**
* Get header
* @return header
**/ | Get header | getHeader | {
"repo_name": "Avalara/avataxbr-clients",
"path": "java-client/src/main/java/io/swagger/client/model/InformerForGoods.java",
"license": "gpl-3.0",
"size": 11752
} | [
"io.swagger.annotations.ApiModelProperty"
] | import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.*; | [
"io.swagger.annotations"
] | io.swagger.annotations; | 245,608 |
public static int irandom( double min, double max) {
return (int) Randomize.Randdouble(min, max);
}
| static int function( double min, double max) { return (int) Randomize.Randdouble(min, max); } | /**
* <p>
* Method that returns a random integer value between min and max values
* </p>
* @param min Minimum double value
* @param max Maximum double value
* @return random int between min and max values
*/ | Method that returns a random integer value between min and max values | irandom | {
"repo_name": "TheMurderer/keel",
"path": "src/keel/Algorithms/Neural_Networks/gann/Rand.java",
"license": "gpl-3.0",
"size": 2863
} | [
"org.core.Randomize"
] | import org.core.Randomize; | import org.core.*; | [
"org.core"
] | org.core; | 2,350,429 |
public static Rop opConv(TypeBearer dest, TypeBearer source) {
int dbt = dest.getBasicFrameType();
switch (source.getBasicFrameType()) {
case Type.BT_INT: {
switch (dbt) {
case Type.BT_LONG: return CONV_I2L;
case Type.BT_FLOAT: r... | static Rop function(TypeBearer dest, TypeBearer source) { int dbt = dest.getBasicFrameType(); switch (source.getBasicFrameType()) { case Type.BT_INT: { switch (dbt) { case Type.BT_LONG: return CONV_I2L; case Type.BT_FLOAT: return CONV_I2F; case Type.BT_DOUBLE: return CONV_I2D; default: break; } } case Type.BT_LONG: { s... | /**
* Returns the appropriate {@code conv} rop for the given types. The
* result is a shared instance.
*
* @param dest {@code non-null;} target value type
* @param source {@code non-null;} source value type
* @return {@code non-null;} an appropriate instance
*/ | Returns the appropriate conv rop for the given types. The result is a shared instance | opConv | {
"repo_name": "raviagarwal7/buck",
"path": "third-party/java/dx/src/com/android/dx/rop/code/Rops.java",
"license": "apache-2.0",
"size": 82635
} | [
"com.android.dx.rop.type.StdTypeList",
"com.android.dx.rop.type.Type",
"com.android.dx.rop.type.TypeBearer"
] | import com.android.dx.rop.type.StdTypeList; import com.android.dx.rop.type.Type; import com.android.dx.rop.type.TypeBearer; | import com.android.dx.rop.type.*; | [
"com.android.dx"
] | com.android.dx; | 837,868 |
public static ZonedDateTime zonedDateTimeOf(final String value) {
try {
return ZonedDateTime.parse(value);
} catch (final Exception e) {
return null;
}
} | static ZonedDateTime function(final String value) { try { return ZonedDateTime.parse(value); } catch (final Exception e) { return null; } } | /**
* Parse the given value as a zoned datetime.
*
* @param value the value
* @return the date/time instance
*/ | Parse the given value as a zoned datetime | zonedDateTimeOf | {
"repo_name": "robertoschwald/cas",
"path": "core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/DateTimeUtils.java",
"license": "apache-2.0",
"size": 9289
} | [
"java.time.ZonedDateTime"
] | import java.time.ZonedDateTime; | import java.time.*; | [
"java.time"
] | java.time; | 1,959,678 |
public IndexingSchedule getSchedule() {
return this.schedule;
} | IndexingSchedule function() { return this.schedule; } | /**
* Get the schedule property: The schedule for this indexer.
*
* @return the schedule value.
*/ | Get the schedule property: The schedule for this indexer | getSchedule | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/search/azure-search-documents/src/main/java/com/azure/search/documents/indexes/implementation/models/SearchIndexer.java",
"license": "mit",
"size": 13006
} | [
"com.azure.search.documents.indexes.models.IndexingSchedule"
] | import com.azure.search.documents.indexes.models.IndexingSchedule; | import com.azure.search.documents.indexes.models.*; | [
"com.azure.search"
] | com.azure.search; | 806,594 |
public WritableRaster createCompatibleWritableRaster() {
return createCompatibleWritableRaster(width,height);
} | WritableRaster function() { return createCompatibleWritableRaster(width,height); } | /**
* Creates a Raster with the same layout and the same
* width and height, and with new zeroed data arrays. If
* the Raster is a subRaster, this will call
* createCompatibleRaster(width, height).
*/ | Creates a Raster with the same layout and the same width and height, and with new zeroed data arrays. If the Raster is a subRaster, this will call createCompatibleRaster(width, height) | createCompatibleWritableRaster | {
"repo_name": "isaacl/openjdk-jdk",
"path": "src/share/classes/sun/awt/image/ByteComponentRaster.java",
"license": "gpl-2.0",
"size": 39452
} | [
"java.awt.image.WritableRaster"
] | import java.awt.image.WritableRaster; | import java.awt.image.*; | [
"java.awt"
] | java.awt; | 2,637,359 |
Preconditions.checkNotNull(provider, "IE00611: Provider argument can not be null");
Preconditions.checkNotNull(view, "IE00612: View argument can not be null");
Preconditions.checkArgument(view.inSameDatabase(provider),
"IE00613: View is not part of this database");
} | Preconditions.checkNotNull(provider, STR); Preconditions.checkNotNull(view, STR); Preconditions.checkArgument(view.inSameDatabase(provider), STR); } | /**
* Checks arguments for validity.
*
* @param provider The provider argument to validate.
* @param view The view argument to validate.
*/ | Checks arguments for validity | checkArguments | {
"repo_name": "AmesianX/binnavi",
"path": "src/main/java/com/google/security/zynamics/binnavi/Database/PostgreSQL/Functions/PostgreSQLViewFunctions.java",
"license": "apache-2.0",
"size": 14134
} | [
"com.google.common.base.Preconditions"
] | import com.google.common.base.Preconditions; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 2,298,456 |
@NonNull
public List<String> whereArgs() {
return whereArgs;
} | List<String> function() { return whereArgs; } | /**
* Gets optional immutable list of arguments for {@link #where()} clause.
*
* @return non-null, immutable list of arguments for {@code WHERE} clause.
*/ | Gets optional immutable list of arguments for <code>#where()</code> clause | whereArgs | {
"repo_name": "zayass/storio",
"path": "storio-content-resolver/src/main/java/com/pushtorefresh/storio/contentresolver/queries/Query.java",
"license": "apache-2.0",
"size": 10488
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 928,774 |
public static byte[] serialize(BuildFileManifest buildFileManifest) throws IOException {
return ObjectMappers.WRITER_WITH_TYPE.writeValueAsBytes(buildFileManifest);
} | static byte[] function(BuildFileManifest buildFileManifest) throws IOException { return ObjectMappers.WRITER_WITH_TYPE.writeValueAsBytes(buildFileManifest); } | /**
* Serializes an instance of {@link BuildFileManifest} to a byte array.
*
* @param buildFileManifest the instance of {@link BuildFileManifest} to be serialized.
* @return a byte array with the serialized manifest.
* @throws JsonProcessingException
*/ | Serializes an instance of <code>BuildFileManifest</code> to a byte array | serialize | {
"repo_name": "zpao/buck",
"path": "src/com/facebook/buck/parser/cache/json/BuildFileManifestSerializer.java",
"license": "apache-2.0",
"size": 2135
} | [
"com.facebook.buck.parser.api.BuildFileManifest",
"com.facebook.buck.util.json.ObjectMappers",
"java.io.IOException"
] | import com.facebook.buck.parser.api.BuildFileManifest; import com.facebook.buck.util.json.ObjectMappers; import java.io.IOException; | import com.facebook.buck.parser.api.*; import com.facebook.buck.util.json.*; import java.io.*; | [
"com.facebook.buck",
"java.io"
] | com.facebook.buck; java.io; | 1,072,934 |
protected VectorAggregationBufferRow allocateAggregationBuffer() throws HiveException {
VectorAggregateExpression.AggregationBuffer[] aggregationBuffers =
new VectorAggregateExpression.AggregationBuffer[aggregators.length];
for (int i=0; i < aggregators.length; ++i) {
aggregationBuffer... | VectorAggregationBufferRow function() throws HiveException { VectorAggregateExpression.AggregationBuffer[] aggregationBuffers = new VectorAggregateExpression.AggregationBuffer[aggregators.length]; for (int i=0; i < aggregators.length; ++i) { aggregationBuffers[i] = aggregators[i].getNewAggregationBuffer(); aggregators[... | /**
* allocates a new aggregation buffer set.
*/ | allocates a new aggregation buffer set | allocateAggregationBuffer | {
"repo_name": "BUPTAnderson/apache-hive-2.1.1-src",
"path": "ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorGroupByOperator.java",
"license": "apache-2.0",
"size": 35540
} | [
"org.apache.hadoop.hive.ql.exec.vector.expressions.aggregates.VectorAggregateExpression",
"org.apache.hadoop.hive.ql.metadata.HiveException"
] | import org.apache.hadoop.hive.ql.exec.vector.expressions.aggregates.VectorAggregateExpression; import org.apache.hadoop.hive.ql.metadata.HiveException; | import org.apache.hadoop.hive.ql.exec.vector.expressions.aggregates.*; import org.apache.hadoop.hive.ql.metadata.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 2,887,812 |
public Set<Plot> getPlots(PlotArea area, String player) {
UUID uuid = UUIDHandler.getUUID(player, null);
return getPlots(area, uuid);
} | Set<Plot> function(PlotArea area, String player) { UUID uuid = UUIDHandler.getUUID(player, null); return getPlots(area, uuid); } | /**
* Get all the plots owned by a player name.
* @param area
* @param player
* @return Set of Plot
*/ | Get all the plots owned by a player name | getPlots | {
"repo_name": "SynergyMC/PlotSquared",
"path": "Core/src/main/java/com/intellectualcrafters/plot/PS.java",
"license": "gpl-3.0",
"size": 93631
} | [
"com.intellectualcrafters.plot.object.Plot",
"com.intellectualcrafters.plot.object.PlotArea",
"com.intellectualcrafters.plot.util.UUIDHandler",
"java.util.Set"
] | import com.intellectualcrafters.plot.object.Plot; import com.intellectualcrafters.plot.object.PlotArea; import com.intellectualcrafters.plot.util.UUIDHandler; import java.util.Set; | import com.intellectualcrafters.plot.object.*; import com.intellectualcrafters.plot.util.*; import java.util.*; | [
"com.intellectualcrafters.plot",
"java.util"
] | com.intellectualcrafters.plot; java.util; | 617,376 |
public static XAdESSignatureBuilder getSignatureBuilder(final XAdESSignatureParameters params, final DSSDocument document,
final CertificateVerifier certificateVerifier) {
switch (params.getSignaturePackaging()) {
case ENVELOPED:
return new EnvelopedSignatureBuilder(params, document, certificateVerifier);... | static XAdESSignatureBuilder function(final XAdESSignatureParameters params, final DSSDocument document, final CertificateVerifier certificateVerifier) { switch (params.getSignaturePackaging()) { case ENVELOPED: return new EnvelopedSignatureBuilder(params, document, certificateVerifier); case ENVELOPING: return new Env... | /**
* Creates the signature according to the packaging
*
* @param params
* The set of parameters relating to the structure and process of the creation or extension of the
* electronic signature.
* @param document
* The original document to sign.
* @param certificateVerif... | Creates the signature according to the packaging | getSignatureBuilder | {
"repo_name": "zsoltii/dss",
"path": "dss-xades/src/main/java/eu/europa/esig/dss/xades/signature/XAdESSignatureBuilder.java",
"license": "lgpl-2.1",
"size": 38019
} | [
"eu.europa.esig.dss.DSSDocument",
"eu.europa.esig.dss.DSSException",
"eu.europa.esig.dss.validation.CertificateVerifier",
"eu.europa.esig.dss.xades.XAdESSignatureParameters"
] | import eu.europa.esig.dss.DSSDocument; import eu.europa.esig.dss.DSSException; import eu.europa.esig.dss.validation.CertificateVerifier; import eu.europa.esig.dss.xades.XAdESSignatureParameters; | import eu.europa.esig.dss.*; import eu.europa.esig.dss.validation.*; import eu.europa.esig.dss.xades.*; | [
"eu.europa.esig"
] | eu.europa.esig; | 409,998 |
@Nullable
public static EntityMinecart placeCart(GameProfile owner, ItemStack cart, WorldServer world, BlockPos pos) {
cart = cart.copy();
if (cart.getItem() instanceof IMinecartItem) {
IMinecartItem mi = (IMinecartItem) cart.getItem();
return mi.placeCart(owner, cart, wo... | static EntityMinecart function(GameProfile owner, ItemStack cart, WorldServer world, BlockPos pos) { cart = cart.copy(); if (cart.getItem() instanceof IMinecartItem) { IMinecartItem mi = (IMinecartItem) cart.getItem(); return mi.placeCart(owner, cart, world, pos); } else if (cart.getItem() instanceof ItemMinecart) try ... | /**
* Spawns a new cart entity using the provided item.
* <p/>
* The backing item must implement <code>IMinecartItem</code> and/or extend
* <code>ItemMinecart</code>.
* <p/>
* Generally Forge requires all cart items to extend ItemMinecart.
*
* @param owner The player name that sh... | Spawns a new cart entity using the provided item. The backing item must implement <code>IMinecartItem</code> and/or extend <code>ItemMinecart</code>. Generally Forge requires all cart items to extend ItemMinecart | placeCart | {
"repo_name": "CovertJaguar/Railcraft-API",
"path": "mods/railcraft/api/carts/CartToolsAPI.java",
"license": "mit",
"size": 11127
} | [
"com.mojang.authlib.GameProfile",
"java.util.List",
"net.minecraft.entity.item.EntityMinecart",
"net.minecraft.item.ItemMinecart",
"net.minecraft.item.ItemStack",
"net.minecraft.util.EnumActionResult",
"net.minecraft.util.EnumFacing",
"net.minecraft.util.EnumHand",
"net.minecraft.util.math.BlockPos"... | import com.mojang.authlib.GameProfile; import java.util.List; import net.minecraft.entity.item.EntityMinecart; import net.minecraft.item.ItemMinecart; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumActionResult; import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumHand; import net.min... | import com.mojang.authlib.*; import java.util.*; import net.minecraft.entity.item.*; import net.minecraft.item.*; import net.minecraft.util.*; import net.minecraft.util.math.*; import net.minecraft.world.*; | [
"com.mojang.authlib",
"java.util",
"net.minecraft.entity",
"net.minecraft.item",
"net.minecraft.util",
"net.minecraft.world"
] | com.mojang.authlib; java.util; net.minecraft.entity; net.minecraft.item; net.minecraft.util; net.minecraft.world; | 686,840 |
public Type createParameterizedType(Class rawType, Type... arguments) {
return new ParameterizedTypeImpl(rawType, arguments, null);
} | Type function(Class rawType, Type... arguments) { return new ParameterizedTypeImpl(rawType, arguments, null); } | /**
* Returns the {@link Type} object that represents {@code clazz<T1,T2,T3>}.
*/ | Returns the <code>Type</code> object that represents clazz | createParameterizedType | {
"repo_name": "FauxFaux/jdk9-jaxws",
"path": "src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/model/nav/ReflectionNavigator.java",
"license": "gpl-2.0",
"size": 19991
} | [
"java.lang.reflect.Type"
] | import java.lang.reflect.Type; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 1,312,736 |
@DELETE
@Path("setting/{settingId}")
@ZeppelinApi
public Response removeSetting(@PathParam("settingId") String settingId) throws IOException {
logger.info("Remove interpreterSetting {}", settingId);
interpreterSettingManager.remove(settingId);
return new JsonResponse(Status.OK).build();
} | @Path(STR) Response function(@PathParam(STR) String settingId) throws IOException { logger.info(STR, settingId); interpreterSettingManager.remove(settingId); return new JsonResponse(Status.OK).build(); } | /**
* Remove interpreter setting
*/ | Remove interpreter setting | removeSetting | {
"repo_name": "radicalbit/incubator-zeppelin",
"path": "zeppelin-server/src/main/java/org/apache/zeppelin/rest/InterpreterRestApi.java",
"license": "apache-2.0",
"size": 10398
} | [
"java.io.IOException",
"javax.ws.rs.Path",
"javax.ws.rs.PathParam",
"javax.ws.rs.core.Response",
"org.apache.zeppelin.server.JsonResponse"
] | import java.io.IOException; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.core.Response; import org.apache.zeppelin.server.JsonResponse; | import java.io.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import org.apache.zeppelin.server.*; | [
"java.io",
"javax.ws",
"org.apache.zeppelin"
] | java.io; javax.ws; org.apache.zeppelin; | 908,526 |
EList getResource(); | EList getResource(); | /**
* Returns the value of the '<em><b>Resource</b></em>' containment reference list.
* The list contents are of type {@link org.w3.xlink.ResourceType}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Resource</em>' containment reference list isn't clear,
* there really should... | Returns the value of the 'Resource' containment reference list. The list contents are of type <code>org.w3.xlink.ResourceType</code>. If the meaning of the 'Resource' containment reference list isn't clear, there really should be more of a description here... | getResource | {
"repo_name": "geotools/geotools",
"path": "modules/ogc/org.w3.xlink/src/org/w3/xlink/Extended.java",
"license": "lgpl-2.1",
"size": 8573
} | [
"org.eclipse.emf.common.util.EList"
] | import org.eclipse.emf.common.util.EList; | import org.eclipse.emf.common.util.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,547,272 |
public int lookupElementDefinition(String elementName) {
if (fNodeCount > 1) {
// find doctype
int docTypeIndex = -1;
int nchunk = 0;
int nindex = 0;
for (int index = getChunkIndex(fNodeLastChild, nchunk, nindex);
index != -1;
... | int function(String elementName) { if (fNodeCount > 1) { int docTypeIndex = -1; int nchunk = 0; int nindex = 0; for (int index = getChunkIndex(fNodeLastChild, nchunk, nindex); index != -1; index = getChunkIndex(fNodePrevSib, nchunk, nindex)) { nchunk = index >> CHUNK_SHIFT; nindex = index & CHUNK_MASK; if (getChunkInde... | /**
* Returns the index of the element definition in the table
* with the specified name index, or -1 if no such definition
* exists.
*/ | Returns the index of the element definition in the table with the specified name index, or -1 if no such definition exists | lookupElementDefinition | {
"repo_name": "TheTypoMaster/Scaper",
"path": "openjdk/jaxp/drop_included/jaxp_src/src/com/sun/org/apache/xerces/internal/dom/DeferredDocumentImpl.java",
"license": "gpl-2.0",
"size": 74801
} | [
"org.w3c.dom.Node"
] | import org.w3c.dom.Node; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 802,541 |
static boolean isBreakStructure(Node n, boolean labeled) {
switch (n.getType()) {
case Token.FOR:
case Token.FOR_OF:
case Token.DO:
case Token.WHILE:
case Token.SWITCH:
return true;
case Token.BLOCK:
case Token.IF:
case Token.TRY:
return labeled;
... | static boolean isBreakStructure(Node n, boolean labeled) { switch (n.getType()) { case Token.FOR: case Token.FOR_OF: case Token.DO: case Token.WHILE: case Token.SWITCH: return true; case Token.BLOCK: case Token.IF: case Token.TRY: return labeled; default: return false; } } | /**
* Determines whether the given node can be terminated with a BREAK node.
*/ | Determines whether the given node can be terminated with a BREAK node | isBreakStructure | {
"repo_name": "mbrukman/closure-compiler",
"path": "src/com/google/javascript/jscomp/ControlFlowAnalysis.java",
"license": "apache-2.0",
"size": 35694
} | [
"com.google.javascript.rhino.Node",
"com.google.javascript.rhino.Token"
] | import com.google.javascript.rhino.Node; import com.google.javascript.rhino.Token; | import com.google.javascript.rhino.*; | [
"com.google.javascript"
] | com.google.javascript; | 2,018,839 |
@Override
public int perform(DSpaceObject dso) throws IOException {
log.info("performing DataFileStats task " + total++ );
String handle = "\"[no handle found]\"";
String fileDOI = "\"[no file DOI found]\"";
String packageDOI = "\"[no package DOI found]\"";
String articleDOI = "\"[no article DOI found]\"... | int function(DSpaceObject dso) throws IOException { log.info(STR + total++ ); String handle = "\"[no handle found]\STR\STRSTR\STRSTR\STRSTR[no journal found]STR\STRSTR\STRSTRnoneSTRSTR\STRSTR\STRSTR\STRSTR\STRSTRUnable to open database connectionSTRhandle, fileDOI, articleDOI, journal, journalAllowsEmbargo, journalAllo... | /**
* Perform the curation task upon passed DSO
*
* @param dso the DSpace object
* @throws IOException
*/ | Perform the curation task upon passed DSO | perform | {
"repo_name": "ojacobson/dryad-repo",
"path": "dspace/modules/api/src/main/java/org/dspace/curate/DataFileStats.java",
"license": "bsd-3-clause",
"size": 13350
} | [
"java.io.IOException",
"java.sql.SQLException",
"org.datadryad.api.DryadDataFile",
"org.dspace.content.Bitstream",
"org.dspace.content.BitstreamFormat",
"org.dspace.content.DSpaceObject",
"org.w3c.dom.Document",
"org.w3c.dom.NodeList"
] | import java.io.IOException; import java.sql.SQLException; import org.datadryad.api.DryadDataFile; import org.dspace.content.Bitstream; import org.dspace.content.BitstreamFormat; import org.dspace.content.DSpaceObject; import org.w3c.dom.Document; import org.w3c.dom.NodeList; | import java.io.*; import java.sql.*; import org.datadryad.api.*; import org.dspace.content.*; import org.w3c.dom.*; | [
"java.io",
"java.sql",
"org.datadryad.api",
"org.dspace.content",
"org.w3c.dom"
] | java.io; java.sql; org.datadryad.api; org.dspace.content; org.w3c.dom; | 2,791,971 |
default void disconnect() throws IOException, TimeoutException {
} | default void disconnect() throws IOException, TimeoutException { } | /**
* Disconnects from the service.
*
* @throws IOException if an I/O exception occurs while disconnecting
* @throws TimeoutException if a timeout exception occurs while disconnecting
*/ | Disconnects from the service | disconnect | {
"repo_name": "KyoriPowered/membrane",
"path": "src/main/java/net/kyori/membrane/facet/Connectable.java",
"license": "mit",
"size": 1940
} | [
"java.io.IOException",
"java.util.concurrent.TimeoutException"
] | import java.io.IOException; import java.util.concurrent.TimeoutException; | import java.io.*; import java.util.concurrent.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 378,943 |
MockitoAnnotations.initMocks(this);
requestMethod = "POST";
url = "http://www.foo.com/bar";
reportServiceLogger = new ReportServiceLogger(loggerDelegate);
requestFactory = new NetHttpTransport().createRequestFactory();
// Constructs the request headers and adds headers that should be scrubbed
... | MockitoAnnotations.initMocks(this); requestMethod = "POST"; url = STRfooSTRclientCustomerIdSTR123-456-7890STRsomeOtherHeaderSTRSomeOtherValueSTR__rdquerySTRSELECT CampaignId FROM CAMPAIGN_PERFORMANCE_REPORTSTRauthorizationSTRtext/csv; charset=UTF-8STRsomeOtherResponseHeaderSTRfooSTRmultiValueHeaderSTRvalue1STRvalue2"))... | /**
* Sets all instance variables to values for a successful request. Tests that require failed
* requests or null/empty values should mutate the instance variables accordingly.
*/ | Sets all instance variables to values for a successful request. Tests that require failed requests or null/empty values should mutate the instance variables accordingly | setUp | {
"repo_name": "googleads/googleads-java-lib",
"path": "modules/ads_lib/src/test/java/com/google/api/ads/adwords/lib/utils/logging/ReportServiceLoggerTest.java",
"license": "apache-2.0",
"size": 7462
} | [
"org.mockito.MockitoAnnotations"
] | import org.mockito.MockitoAnnotations; | import org.mockito.*; | [
"org.mockito"
] | org.mockito; | 814,758 |
public void sendProgressBarUpdate(Container p_71112_1_, int p_71112_2_, int p_71112_3_)
{
this.playerNetServerHandler.sendPacket(new S31PacketWindowProperty(p_71112_1_.windowId, p_71112_2_, p_71112_3_));
} | void function(Container p_71112_1_, int p_71112_2_, int p_71112_3_) { this.playerNetServerHandler.sendPacket(new S31PacketWindowProperty(p_71112_1_.windowId, p_71112_2_, p_71112_3_)); } | /**
* Sends two ints to the client-side Container. Used for furnace burning time, smelting progress, brewing progress,
* and enchanting level. Normally the first int identifies which variable to update, and the second contains the new
* value. Both are truncated to shorts in non-local SMP.
*/ | Sends two ints to the client-side Container. Used for furnace burning time, smelting progress, brewing progress, and enchanting level. Normally the first int identifies which variable to update, and the second contains the new value. Both are truncated to shorts in non-local SMP | sendProgressBarUpdate | {
"repo_name": "CheeseL0ver/Ore-TTM",
"path": "build/tmp/recompSrc/net/minecraft/entity/player/EntityPlayerMP.java",
"license": "lgpl-2.1",
"size": 46255
} | [
"net.minecraft.inventory.Container",
"net.minecraft.network.play.server.S31PacketWindowProperty"
] | import net.minecraft.inventory.Container; import net.minecraft.network.play.server.S31PacketWindowProperty; | import net.minecraft.inventory.*; import net.minecraft.network.play.server.*; | [
"net.minecraft.inventory",
"net.minecraft.network"
] | net.minecraft.inventory; net.minecraft.network; | 2,703,655 |
public void write(File inputFile) throws IOException,
UnsupportedCommOperationException, PortInUseException {
FileInputStream fis = new FileInputStream(inputFile);
write(fis);
fis.close();
} | void function(File inputFile) throws IOException, UnsupportedCommOperationException, PortInUseException { FileInputStream fis = new FileInputStream(inputFile); write(fis); fis.close(); } | /**
* Write contents of file inputFile to serial port
*
* @param inputFile
* @throws IOException
* @throws UnsupportedCommOperationException
* @throws PortInUseException
*/ | Write contents of file inputFile to serial port | write | {
"repo_name": "Twissi/Animator",
"path": "src/main/java/org/hacklace/animator/exporter/FlashExporter.java",
"license": "gpl-3.0",
"size": 5889
} | [
"gnu.io.PortInUseException",
"gnu.io.UnsupportedCommOperationException",
"java.io.File",
"java.io.FileInputStream",
"java.io.IOException"
] | import gnu.io.PortInUseException; import gnu.io.UnsupportedCommOperationException; import java.io.File; import java.io.FileInputStream; import java.io.IOException; | import gnu.io.*; import java.io.*; | [
"gnu.io",
"java.io"
] | gnu.io; java.io; | 1,614,649 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.