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
SslContext getSslContext(); /** * Return the current {@link Realm} * * @return the current {@link Realm}
SslContext getSslContext(); /** * Return the current {@link Realm} * * @return the current {@link Realm}
/** * Return an instance of {@link SslContext} used for SSL connection. * * @return an instance of {@link SslContext} used for SSL connection. */
Return an instance of <code>SslContext</code> used for SSL connection
getSslContext
{ "repo_name": "Aulust/async-http-client", "path": "client/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java", "license": "apache-2.0", "size": 8384 }
[ "io.netty.handler.ssl.SslContext" ]
import io.netty.handler.ssl.SslContext;
import io.netty.handler.ssl.*;
[ "io.netty.handler" ]
io.netty.handler;
1,969,624
UnitElement getUnitElement1();
UnitElement getUnitElement1();
/** * Returns the connected element of some unit. * * @return {@link UnitElement} instance */
Returns the connected element of some unit
getUnitElement1
{ "repo_name": "AliasVector/tmm", "path": "tmm-model/src/main/java/com/mar/tmm/model/KinematicPair.java", "license": "gpl-3.0", "size": 1783 }
[ "com.mar.tmm.model.impl.UnitElement" ]
import com.mar.tmm.model.impl.UnitElement;
import com.mar.tmm.model.impl.*;
[ "com.mar.tmm" ]
com.mar.tmm;
1,275,736
public final void setFilters(final InputFilter[] filters) { getView().setFilters(filters); }
final void function(final InputFilter[] filters) { getView().setFilters(filters); }
/** * Sets the list of input filters that will be used if the buffer is Editable. Has no effect * otherwise. */
Sets the list of input filters that will be used if the buffer is Editable. Has no effect otherwise
setFilters
{ "repo_name": "michael-rapp/AndroidMaterialValidation", "path": "library/src/main/java/de/mrapp/android/validation/EditText.java", "license": "apache-2.0", "size": 89149 }
[ "android.text.InputFilter" ]
import android.text.InputFilter;
import android.text.*;
[ "android.text" ]
android.text;
2,803,938
public final void println(long l) throws IOException { print(l); write(_newlineBytes, 0, _newlineBytes.length); if (flushOnNewline) flush(); }
final void function(long l) throws IOException { print(l); write(_newlineBytes, 0, _newlineBytes.length); if (flushOnNewline) flush(); }
/** * Prints a long followed by a newline. */
Prints a long followed by a newline
println
{ "repo_name": "dwango/quercus", "path": "src/main/java/com/caucho/vfs/WriteStream.java", "license": "gpl-2.0", "size": 30795 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,258,165
public static void cycleTool(EntityPlayer player, boolean isWheelUp, int slot) { if (!GeneralReference.isDimensionAllowed(player)) return; try { InventoryBackpack backpack = Wearing.getWearingBackpackInv(player); ItemStack current = player.getCurrentE...
static void function(EntityPlayer player, boolean isWheelUp, int slot) { if (!GeneralReference.isDimensionAllowed(player)) return; try { InventoryBackpack backpack = Wearing.getWearingBackpackInv(player); ItemStack current = player.getCurrentEquippedItem(); backpack.openInventory(); if (SlotTool.isValidTool(current)) {...
/** * Cycles tools. In a cycle. The tool in your hand with the tools in the special tool slot of the backpack, to be precise. * * @param player Duh * @param isWheelUp An boolean indicating the direction of the switch. Nobody likes to swith always in the same * direction all ...
Cycles tools. In a cycle. The tool in your hand with the tools in the special tool slot of the backpack, to be precise
cycleTool
{ "repo_name": "Ugachaga/AdventureBackpack2", "path": "src/main/java/com/darkona/adventurebackpack/common/ServerActions.java", "license": "lgpl-3.0", "size": 19423 }
[ "com.darkona.adventurebackpack.inventory.InventoryBackpack", "com.darkona.adventurebackpack.inventory.SlotTool", "com.darkona.adventurebackpack.reference.GeneralReference", "com.darkona.adventurebackpack.util.LogHelper", "com.darkona.adventurebackpack.util.Wearing", "net.minecraft.entity.player.EntityPlay...
import com.darkona.adventurebackpack.inventory.InventoryBackpack; import com.darkona.adventurebackpack.inventory.SlotTool; import com.darkona.adventurebackpack.reference.GeneralReference; import com.darkona.adventurebackpack.util.LogHelper; import com.darkona.adventurebackpack.util.Wearing; import net.minecraft.entity....
import com.darkona.adventurebackpack.inventory.*; import com.darkona.adventurebackpack.reference.*; import com.darkona.adventurebackpack.util.*; import net.minecraft.entity.player.*; import net.minecraft.item.*;
[ "com.darkona.adventurebackpack", "net.minecraft.entity", "net.minecraft.item" ]
com.darkona.adventurebackpack; net.minecraft.entity; net.minecraft.item;
1,931,302
protected void setCharStates(Set<DiscreteCharState> pNewCharStates) { mCharStates = pNewCharStates; }
void function(Set<DiscreteCharState> pNewCharStates) { mCharStates = pNewCharStates; }
/** * Set the CharStates field. */
Set the CharStates field
setCharStates
{ "repo_name": "TreeBASE/treebasetest", "path": "treebase-core/src/main/java/org/cipres/treebase/domain/matrix/DiscreteChar.java", "license": "bsd-3-clause", "size": 7698 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,501,567
void addSegment(File indexDir, IndexLoadingConfig indexLoadingConfig) throws Exception;
void addSegment(File indexDir, IndexLoadingConfig indexLoadingConfig) throws Exception;
/** * Adds a segment from local disk into the OFFLINE table. */
Adds a segment from local disk into the OFFLINE table
addSegment
{ "repo_name": "linkedin/pinot", "path": "pinot-core/src/main/java/org/apache/pinot/core/data/manager/TableDataManager.java", "license": "apache-2.0", "size": 4392 }
[ "java.io.File", "org.apache.pinot.core.segment.index.loader.IndexLoadingConfig" ]
import java.io.File; import org.apache.pinot.core.segment.index.loader.IndexLoadingConfig;
import java.io.*; import org.apache.pinot.core.segment.index.loader.*;
[ "java.io", "org.apache.pinot" ]
java.io; org.apache.pinot;
2,134,687
void endPass() { Preconditions.checkState(currentTracer != null, "Tracer should not be null at the end of a pass."); stopTracer(currentTracer, currentPassName); currentPassName = null; currentTracer = null; maybeSanityCheck(); }
void endPass() { Preconditions.checkState(currentTracer != null, STR); stopTracer(currentTracer, currentPassName); currentPassName = null; currentTracer = null; maybeSanityCheck(); }
/** * Marks the end of a pass. */
Marks the end of a pass
endPass
{ "repo_name": "robbert/closure-compiler", "path": "src/com/google/javascript/jscomp/Compiler.java", "license": "apache-2.0", "size": 83465 }
[ "com.google.common.base.Preconditions" ]
import com.google.common.base.Preconditions;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
1,011,751
public Collection<Object> getPlainProviders() { return myPlainProviders; }
Collection<Object> function() { return myPlainProviders; }
/** * Provides the non-resource specific providers which implement method calls on this server * * @see #getResourceProviders() */
Provides the non-resource specific providers which implement method calls on this server
getPlainProviders
{ "repo_name": "cementsuf/hapi-fhir", "path": "hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/RestfulServer.java", "license": "apache-2.0", "size": 43502 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
1,400,502
private static Intent createHeaderIntent(View header) { header = (View)header.getParent(); // tag is set on parent view of header int type = (Integer)header.getTag(); Intent intent = new Intent(); intent.putExtra(LibraryAdapter.DATA_ID, LibraryAdapter.HEADER_ID); intent.putExtra(LibraryAdapter.DATA_TYPE, ...
static Intent function(View header) { header = (View)header.getParent(); int type = (Integer)header.getTag(); Intent intent = new Intent(); intent.putExtra(LibraryAdapter.DATA_ID, LibraryAdapter.HEADER_ID); intent.putExtra(LibraryAdapter.DATA_TYPE, type); return intent; }
/** * Creates the row data used by LibraryActivity. */
Creates the row data used by LibraryActivity
createHeaderIntent
{ "repo_name": "alex73/vanilla", "path": "src/ch/blinkenlights/android/vanilla/LibraryPagerAdapter.java", "license": "gpl-3.0", "size": 24456 }
[ "android.content.Intent", "android.view.View" ]
import android.content.Intent; import android.view.View;
import android.content.*; import android.view.*;
[ "android.content", "android.view" ]
android.content; android.view;
1,311,015
@Override public String check() throws ManifoldCFException { try { checkConnection(); return super.check(); } catch (ServiceInterruption e) { return "Connection temporarily failed: " + e.getMessage(); } catch (ManifoldCFException e) { return "Connection failed: " + e.getMessage()...
String function() throws ManifoldCFException { try { checkConnection(); return super.check(); } catch (ServiceInterruption e) { return STR + e.getMessage(); } catch (ManifoldCFException e) { return STR + e.getMessage(); } } protected class CheckConnectionThread extends Thread { protected Throwable exception = null; pub...
/** * Test the connection. Returns a string describing the connection * integrity. * * @return the connection's status as a displayable string. */
Test the connection. Returns a string describing the connection integrity
check
{ "repo_name": "kishorejangid/manifoldcf", "path": "connectors/googledrive/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/googledrive/GoogleDriveRepositoryConnector.java", "license": "apache-2.0", "size": 59614 }
[ "org.apache.manifoldcf.agents.interfaces.ServiceInterruption", "org.apache.manifoldcf.core.interfaces.ManifoldCFException" ]
import org.apache.manifoldcf.agents.interfaces.ServiceInterruption; import org.apache.manifoldcf.core.interfaces.ManifoldCFException;
import org.apache.manifoldcf.agents.interfaces.*; import org.apache.manifoldcf.core.interfaces.*;
[ "org.apache.manifoldcf" ]
org.apache.manifoldcf;
240,164
public void collectGridNodeData(DiscoveryDataBag dataBag);
void function(DiscoveryDataBag dataBag);
/** * Collects discovery data on nodes already in grid on receiving * {@link TcpDiscoveryNodeAddedMessage}. * * @param dataBag container object to store discovery data in. */
Collects discovery data on nodes already in grid on receiving <code>TcpDiscoveryNodeAddedMessage</code>
collectGridNodeData
{ "repo_name": "WilliamDo/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/GridComponent.java", "license": "apache-2.0", "size": 6010 }
[ "org.apache.ignite.spi.discovery.DiscoveryDataBag" ]
import org.apache.ignite.spi.discovery.DiscoveryDataBag;
import org.apache.ignite.spi.discovery.*;
[ "org.apache.ignite" ]
org.apache.ignite;
2,172,903
void updateRoutingEntry(ShardRouting shardRouting) throws IOException;
void updateRoutingEntry(ShardRouting shardRouting) throws IOException;
/** * Updates the shards routing entry. This mutate the shards internal state depending * on the changes that get introduced by the new routing value. This method will persist shard level metadata. * * @throws IndexShardRelocatedException if shard is marked as relocated and relocatio...
Updates the shards routing entry. This mutate the shards internal state depending on the changes that get introduced by the new routing value. This method will persist shard level metadata
updateRoutingEntry
{ "repo_name": "fernandozhu/elasticsearch", "path": "core/src/main/java/org/elasticsearch/indices/cluster/IndicesClusterStateService.java", "license": "apache-2.0", "size": 46029 }
[ "java.io.IOException", "org.elasticsearch.cluster.routing.ShardRouting" ]
import java.io.IOException; import org.elasticsearch.cluster.routing.ShardRouting;
import java.io.*; import org.elasticsearch.cluster.routing.*;
[ "java.io", "org.elasticsearch.cluster" ]
java.io; org.elasticsearch.cluster;
589,413
@ServiceMethod(returns = ReturnType.SINGLE) public Response<KeyVaultRoleAssignment> getRoleAssignmentWithResponse(KeyVaultRoleAssignmentScope roleScope, String name, Context context) { return asyncClient.getRoleAssignmentWithResponse(roleScope, name, context).block(); }
@ServiceMethod(returns = ReturnType.SINGLE) Response<KeyVaultRoleAssignment> function(KeyVaultRoleAssignmentScope roleScope, String name, Context context) { return asyncClient.getRoleAssignmentWithResponse(roleScope, name, context).block(); }
/** * Gets a {@link KeyVaultRoleAssignment}. * * @param roleScope The {@link KeyVaultRoleAssignmentScope roleScope} of the {@link KeyVaultRoleAssignment}. * @param name The name of the {@link KeyVaultRoleAssignment}. * @param context Additional context that is passed through the HTTP pipeline d...
Gets a <code>KeyVaultRoleAssignment</code>
getRoleAssignmentWithResponse
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/KeyVaultAccessControlClient.java", "license": "mit", "size": 11649 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.Context", "com.azure.security.keyvault.administration.models.KeyVaultRoleAssignment", "com.azure.security.keyvault.administration.models.KeyVaultRoleAssignmentScope"...
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.security.keyvault.administration.models.KeyVaultRoleAssignment; import com.azure.security.keyvault.administration.models.KeyVaultRol...
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.security.keyvault.administration.models.*;
[ "com.azure.core", "com.azure.security" ]
com.azure.core; com.azure.security;
252,175
@ServiceMethod(returns = ReturnType.SINGLE) public Mono<Response<Void>> updateWithResponseAsync(String upnOrObjectId, UserUpdateParameters parameters) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( ...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<Void>> function(String upnOrObjectId, UserUpdateParameters parameters) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (upnOrObjectId == null) { return Mono.error(new IllegalArgumentException(STR)); } if (...
/** * Updates a user. * * @param upnOrObjectId The object ID or principal name of the user to update. * @param parameters Request parameters for updating an existing work or school account user. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws GraphErr...
Updates a user
updateWithResponseAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/implementation/UsersClientImpl.java", "license": "mit", "size": 50884 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.FluxUtil", "com.azure.resourcemanager.authorization.models.UserUpdateParameters" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.authorization.models.UserUpdateParameters;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.authorization.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,714,785
private void saveNestedVariables() { if (nestedVars != null) { Iterator<String> iter = nestedVars.iterator(); while (iter.hasNext()) { String varName = iter.next(); varName = findAlias(varName); Object obj = invokingJspCtxt.getAttribute...
void function() { if (nestedVars != null) { Iterator<String> iter = nestedVars.iterator(); while (iter.hasNext()) { String varName = iter.next(); varName = findAlias(varName); Object obj = invokingJspCtxt.getAttribute(varName); if (obj != null) { originalNestedVars.put(varName, obj); } } } }
/** * Saves the values of any NESTED variables that are present in the invoking * JSP context, so they can later be restored. */
Saves the values of any NESTED variables that are present in the invoking JSP context, so they can later be restored
saveNestedVariables
{ "repo_name": "SourceStudyNotes/Tomcat8", "path": "src/main/java/org/apache/jasper/runtime/JspContextWrapper.java", "license": "apache-2.0", "size": 19427 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
1,130,408
protected void setActionProxyFactory(ActionProxyFactory factory) { this.factory = factory; }
void function(ActionProxyFactory factory) { this.factory = factory; }
/** * Convenience method to ease testing. * @param factory */
Convenience method to ease testing
setActionProxyFactory
{ "repo_name": "codeApeFromChina/resource", "path": "frame_packages/java_libs/struts-2.3.15.2/src/plugins/portlet/src/main/java/org/apache/struts2/portlet/dispatcher/Jsr168Dispatcher.java", "license": "unlicense", "size": 29460 }
[ "com.opensymphony.xwork2.ActionProxyFactory" ]
import com.opensymphony.xwork2.ActionProxyFactory;
import com.opensymphony.xwork2.*;
[ "com.opensymphony.xwork2" ]
com.opensymphony.xwork2;
629,921
private SecurityConstraint [] resultsToArray( ArrayList<SecurityConstraint> results) { if(results == null || results.size() == 0) { return null; } SecurityConstraint [] array = new SecurityConstraint[results.size()]; results.toArray(array); return arra...
SecurityConstraint [] function( ArrayList<SecurityConstraint> results) { if(results == null results.size() == 0) { return null; } SecurityConstraint [] array = new SecurityConstraint[results.size()]; results.toArray(array); return array; }
/** * Convert an ArrayList to a SecurityContraint []. */
Convert an ArrayList to a SecurityContraint []
resultsToArray
{ "repo_name": "GazeboHub/ghub-portal-doc", "path": "doc/modelio/GHub Portal/mda/JavaDesigner/res/java/tomcat/java/org/apache/catalina/realm/RealmBase.java", "license": "epl-1.0", "size": 48371 }
[ "java.util.ArrayList", "org.apache.catalina.deploy.SecurityConstraint" ]
import java.util.ArrayList; import org.apache.catalina.deploy.SecurityConstraint;
import java.util.*; import org.apache.catalina.deploy.*;
[ "java.util", "org.apache.catalina" ]
java.util; org.apache.catalina;
2,434,531
protected ScratchAttributeWriter createLibraryTargetWriter(String labelString) { return ScratchAttributeWriter.fromLabelString(this, "objc_library", labelString); }
ScratchAttributeWriter function(String labelString) { return ScratchAttributeWriter.fromLabelString(this, STR, labelString); }
/** * Creates an {@code objc_library} target writer for the label indicated by the given String. */
Creates an objc_library target writer for the label indicated by the given String
createLibraryTargetWriter
{ "repo_name": "dropbox/bazel", "path": "src/test/java/com/google/devtools/build/lib/rules/objc/ObjcRuleTestCase.java", "license": "apache-2.0", "size": 100511 }
[ "com.google.devtools.build.lib.analysis.util.ScratchAttributeWriter" ]
import com.google.devtools.build.lib.analysis.util.ScratchAttributeWriter;
import com.google.devtools.build.lib.analysis.util.*;
[ "com.google.devtools" ]
com.google.devtools;
2,192,649
public static void deleteAllProperties(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource) { Base.deleteAllProperties(model, instanceResource); } /////////////////////////////////////////////////////////////////// // property access methods
static void function(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource) { Base.deleteAllProperties(model, instanceResource); }
/** * Delete all (this, *, *), i.e. including rdf:type * @param model an RDF2Go model * @param resource */
Delete all (this, *, *), i.e. including rdf:type
deleteAllProperties
{ "repo_name": "oeg-upm/biotea", "path": "src/ws/biotea/ld2rdf/rdf/model/bibo/Patent.java", "license": "apache-2.0", "size": 7415 }
[ "org.ontoware.rdf2go.model.Model", "org.ontoware.rdfreactor.runtime.Base" ]
import org.ontoware.rdf2go.model.Model; import org.ontoware.rdfreactor.runtime.Base;
import org.ontoware.rdf2go.model.*; import org.ontoware.rdfreactor.runtime.*;
[ "org.ontoware.rdf2go", "org.ontoware.rdfreactor" ]
org.ontoware.rdf2go; org.ontoware.rdfreactor;
2,823,542
//- Mock style -// return new ArrayList<Staff>() {{ add( new Staff( StaffTypeMock.find(), StyleMock.find(), "uk-UA" ) ); }}; }
return new ArrayList<Staff>() {{ add( new Staff( StaffTypeMock.find(), StyleMock.find(), "uk-UA" ) ); }}; }
/** * Get list of staffs. * * @return List of staffs. */
Get list of staffs
findAll
{ "repo_name": "coffeine-009/Virtuoso", "path": "src/test/java/com/thecoffeine/virtuoso/music/model/persistence/mock/StaffMock.java", "license": "mit", "size": 1018 }
[ "com.thecoffeine.virtuoso.music.model.entity.Staff", "java.util.ArrayList" ]
import com.thecoffeine.virtuoso.music.model.entity.Staff; import java.util.ArrayList;
import com.thecoffeine.virtuoso.music.model.entity.*; import java.util.*;
[ "com.thecoffeine.virtuoso", "java.util" ]
com.thecoffeine.virtuoso; java.util;
20,864
SystemData systemData();
SystemData systemData();
/** * Gets the systemData property: Metadata pertaining to creation and last modification of the user resource. * * @return the systemData value. */
Gets the systemData property: Metadata pertaining to creation and last modification of the user resource
systemData
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/models/User.java", "license": "mit", "size": 8275 }
[ "com.azure.core.management.SystemData" ]
import com.azure.core.management.SystemData;
import com.azure.core.management.*;
[ "com.azure.core" ]
com.azure.core;
1,449,115
ItemStack getBoots();
ItemStack getBoots();
/** * Returns the item currently being worn * by the armor stand on its feet * * @return the worn item */
Returns the item currently being worn by the armor stand on its feet
getBoots
{ "repo_name": "PipeMC/Pipe", "path": "src/main/java/org/bukkit/entity/ArmorStand.java", "license": "gpl-3.0", "size": 5894 }
[ "org.bukkit.inventory.ItemStack" ]
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.*;
[ "org.bukkit.inventory" ]
org.bukkit.inventory;
2,025,891
protected ByteBuffer encodeCodeAndLength() throws IOException { ByteBuffer buf = null; if (!v4) { buf = ByteBuffer.allocate(2 + 2 + getLength()); buf.putShort((short)getCode()); buf.putShort((short)getLength()); } else { buf = ByteBuffer.allocate(1 + 1 + getLength()); buf.pu...
ByteBuffer function() throws IOException { ByteBuffer buf = null; if (!v4) { buf = ByteBuffer.allocate(2 + 2 + getLength()); buf.putShort((short)getCode()); buf.putShort((short)getLength()); } else { buf = ByteBuffer.allocate(1 + 1 + getLength()); buf.put((byte)getCode()); buf.put((byte)getLength()); } return buf; }
/** * Encode the DHCP option code and length fields of any DHCP option. * * @return the ByteBuffer containing the encoded code and length fields * * @throws IOException Signals that an I/O exception has occurred. */
Encode the DHCP option code and length fields of any DHCP option
encodeCodeAndLength
{ "repo_name": "marosmars/dhcp", "path": "Jagornet-DHCP/src/com/jagornet/dhcp/option/base/BaseDhcpOption.java", "license": "gpl-3.0", "size": 3836 }
[ "java.io.IOException", "java.nio.ByteBuffer" ]
import java.io.IOException; import java.nio.ByteBuffer;
import java.io.*; import java.nio.*;
[ "java.io", "java.nio" ]
java.io; java.nio;
2,851,973
int opus_multistream_decode(PointerByReference st, byte data[], int len, ShortBuffer pcm, int frame_size, int decode_fec);
int opus_multistream_decode(PointerByReference st, byte data[], int len, ShortBuffer pcm, int frame_size, int decode_fec);
/** * Opus multistream decode. * * @param st the st * @param data the data * @param len the len * @param pcm the pcm * @param frame_size the frame size * @param decode_fec the decode fec * @return the int */
Opus multistream decode
opus_multistream_decode
{ "repo_name": "lpatino10/android-sdk", "path": "library/src/main/java/com/ibm/watson/developer_cloud/android/library/audio/opus/JNAOpus.java", "license": "apache-2.0", "size": 40064 }
[ "com.sun.jna.ptr.PointerByReference", "java.nio.ShortBuffer" ]
import com.sun.jna.ptr.PointerByReference; import java.nio.ShortBuffer;
import com.sun.jna.ptr.*; import java.nio.*;
[ "com.sun.jna", "java.nio" ]
com.sun.jna; java.nio;
554,746
private URL getURLFromLocation(String wsdlLocation) { URL url = null; try { try{ String baseDir = new File(System.getProperty("basedir",".")).getCanonicalPath(); wsdlLocation = new File(baseDir + wsdlLocation).getAbsolutePath(); }catch(Exceptio...
URL function(String wsdlLocation) { URL url = null; try { try{ String baseDir = new File(System.getProperty(STR,".")).getCanonicalPath(); wsdlLocation = new File(baseDir + wsdlLocation).getAbsolutePath(); }catch(Exception e){ e.printStackTrace(); fail(); } File file = new File(wsdlLocation); url = file.toURL(); } catch...
/** * Given a String representing a file location, return a URL. * @param wsdlLocation * @return */
Given a String representing a file location, return a URL
getURLFromLocation
{ "repo_name": "jsdjayanga/wso2-axis2", "path": "modules/jaxws/test/org/apache/axis2/jaxws/catalog/XMLCatalogTests.java", "license": "apache-2.0", "size": 5568 }
[ "java.io.File", "java.net.MalformedURLException" ]
import java.io.File; import java.net.MalformedURLException;
import java.io.*; import java.net.*;
[ "java.io", "java.net" ]
java.io; java.net;
2,609,425
public JRBoxPen getRightPen();
JRBoxPen function();
/** * Gets the pen properties for the right border. */
Gets the pen properties for the right border
getRightPen
{ "repo_name": "MHTaleb/Encologim", "path": "lib/JasperReport/src/net/sf/jasperreports/engine/JRLineBox.java", "license": "gpl-3.0", "size": 5101 }
[ "net.sf.jasperreports.engine.base.JRBoxPen" ]
import net.sf.jasperreports.engine.base.JRBoxPen;
import net.sf.jasperreports.engine.base.*;
[ "net.sf.jasperreports" ]
net.sf.jasperreports;
1,571,398
EAttribute getEntryType_Key();
EAttribute getEntryType_Key();
/** * Returns the meta object for the attribute '{@link org.camunda.bpm.modeler.runtime.engine.model.EntryType#getKey <em>Key</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Key</em>'. * @see org.camunda.bpm.modeler.runtime.engine.model.EntryType#getK...
Returns the meta object for the attribute '<code>org.camunda.bpm.modeler.runtime.engine.model.EntryType#getKey Key</code>'.
getEntryType_Key
{ "repo_name": "camunda/camunda-eclipse-plugin", "path": "org.camunda.bpm.modeler/src/org/camunda/bpm/modeler/runtime/engine/model/ModelPackage.java", "license": "epl-1.0", "size": 231785 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
171,549
public MExtensionPoint buildExtensionPoint(MUseCase useCase) { MExtensionPoint extensionPoint = UmlFactory.getFactory().getUseCases().createExtensionPoint(); // Set the owning use case if there is one given. if (useCase != null) { extensionPoint.setUseCase(useCas...
MExtensionPoint function(MUseCase useCase) { MExtensionPoint extensionPoint = UmlFactory.getFactory().getUseCases().createExtensionPoint(); if (useCase != null) { extensionPoint.setUseCase(useCase); if (useCase.getNamespace() != null) { extensionPoint.setNamespace(useCase.getNamespace()); } } extensionPoint.setName("ne...
/** * <p>Build an extension point for a use case.</p> * * <p>Set the namespace to that of the use case if possible.</p> * * @param useCase The owning use case for the extension point. May be * <code>null</code>. * * @return The new extension point...
Build an extension point for a use case. Set the namespace to that of the use case if possible
buildExtensionPoint
{ "repo_name": "argocasegeo/argocasegeo", "path": "src/org/argouml/model/uml/behavioralelements/usecases/UseCasesFactory.java", "license": "epl-1.0", "size": 9441 }
[ "org.argouml.model.uml.UmlFactory", "ru.novosoft.uml.behavior.use_cases.MExtensionPoint", "ru.novosoft.uml.behavior.use_cases.MUseCase" ]
import org.argouml.model.uml.UmlFactory; import ru.novosoft.uml.behavior.use_cases.MExtensionPoint; import ru.novosoft.uml.behavior.use_cases.MUseCase;
import org.argouml.model.uml.*; import ru.novosoft.uml.behavior.use_cases.*;
[ "org.argouml.model", "ru.novosoft.uml" ]
org.argouml.model; ru.novosoft.uml;
2,028,201
public AssemblyRegion trim(final GenomeLocation span) { return trim(span, span); }
AssemblyRegion function(final GenomeLocation span) { return trim(span, span); }
/** * Equivalent to trim(span,span). */
Equivalent to trim(span,span)
trim
{ "repo_name": "BGI-flexlab/SOAPgaeaDevelopment4.0", "path": "src/main/java/org/bgi/flexlab/gaea/tools/haplotypecaller/assembly/AssemblyRegion.java", "license": "gpl-3.0", "size": 29521 }
[ "org.bgi.flexlab.gaea.data.structure.location.GenomeLocation" ]
import org.bgi.flexlab.gaea.data.structure.location.GenomeLocation;
import org.bgi.flexlab.gaea.data.structure.location.*;
[ "org.bgi.flexlab" ]
org.bgi.flexlab;
2,607,386
public void testContentModelIntObjectContentModel043() { dtd = new DTDGetter("hi"); cm = new ContentModel(38, dtd, null); assertNotNull(cm); assertNull(cm.next); assertEquals(38, cm.type); assertEquals(dtd, cm.content); }
void function() { dtd = new DTDGetter("hi"); cm = new ContentModel(38, dtd, null); assertNotNull(cm); assertNull(cm.next); assertEquals(38, cm.type); assertEquals(dtd, cm.content); }
/** * Test method for * 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.ContentModel(int, Object, * ContentModel)' Parameters type=38, new DTDGetter("hi"), null Verifies that * an instance is created. content is equal to new DTDGetter("hi"), type is 38 * and next is nu...
Test method for 'org.apache.harmony.swing.tests.javax.swing.text.parser.ContentModel.ContentModel(int, Object, ContentModel)' Parameters type=38, new DTDGetter("hi"), null Verifies that an instance is created. content is equal to new DTDGetter("hi"), type is 38 and next is null
testContentModelIntObjectContentModel043
{ "repo_name": "skyHALud/codenameone", "path": "Ports/iOSPort/xmlvm/apache-harmony-6.0-src-r991881/classlib/modules/swing/src/test/api/java.injected/org/apache/harmony/swing/tests/javax/swing/text/parser/ContentModelCompatilityTest.java", "license": "gpl-2.0", "size": 153261 }
[ "javax.swing.text.html.parser.ContentModel", "javax.swing.text.parser.utils.DTDGetter" ]
import javax.swing.text.html.parser.ContentModel; import javax.swing.text.parser.utils.DTDGetter;
import javax.swing.text.html.parser.*; import javax.swing.text.parser.utils.*;
[ "javax.swing" ]
javax.swing;
2,387,019
public static String samlDateString() { return samlDateString(new DateTime()); }
static String function() { return samlDateString(new DateTime()); }
/** * Get a string for the current date/time, in the correct format for SAML. * * @return The corresponding string. */
Get a string for the current date/time, in the correct format for SAML
samlDateString
{ "repo_name": "dweidenfeld/library", "path": "src/com/google/enterprise/adaptor/secmgr/saml/OpenSamlUtil.java", "license": "apache-2.0", "size": 43010 }
[ "org.joda.time.DateTime" ]
import org.joda.time.DateTime;
import org.joda.time.*;
[ "org.joda.time" ]
org.joda.time;
2,398,048
@Override public Timestamp getDatum() { return this.datum; }
Timestamp function() { return this.datum; }
/** * DOCUMENT ME! * * @return DOCUMENT ME! */
DOCUMENT ME
getDatum
{ "repo_name": "cismet/lagis-client", "path": "src/main/java/de/cismet/cids/custom/beans/lagis/BeschlussCustomBean.java", "license": "gpl-3.0", "size": 4208 }
[ "java.sql.Timestamp" ]
import java.sql.Timestamp;
import java.sql.*;
[ "java.sql" ]
java.sql;
601,230
@Override public boolean remove(Widget arg0) { boolean result = false; if (contentWidget != null) { result = mainPanel.remove(contentWidget); } contentWidget = null; return result; }
boolean function(Widget arg0) { boolean result = false; if (contentWidget != null) { result = mainPanel.remove(contentWidget); } contentWidget = null; return result; }
/** * Removes the. * * @param arg0 the arg0 * @return true, if successful * @see com.google.gwt.user.client.ui.HasWidgets#remove(com.google.gwt.user.client.ui.Widget) */
Removes the
remove
{ "repo_name": "ebayopensource/turmeric-monitoring", "path": "mgmt-console/src/main/java/org/ebayopensource/turmeric/monitoring/client/view/common/ApplicationMenuView.java", "license": "apache-2.0", "size": 3166 }
[ "com.google.gwt.user.client.ui.Widget" ]
import com.google.gwt.user.client.ui.Widget;
import com.google.gwt.user.client.ui.*;
[ "com.google.gwt" ]
com.google.gwt;
1,023,366
public TestDataConnection returns(String expected) throws Exception { Connection connection = null; Statement statement = null; try { connection = adapter.createConnection(); statement = connection.createStatement(); ResultSet resultSet = statement.executeQuery(sql); ...
TestDataConnection function(String expected) throws Exception { Connection connection = null; Statement statement = null; try { connection = adapter.createConnection(); statement = connection.createStatement(); ResultSet resultSet = statement.executeQuery(sql); expected = expected.trim(); String result = JdbcTestBase.t...
/** * Checks that the current SQL statement returns the expected result. */
Checks that the current SQL statement returns the expected result
returns
{ "repo_name": "ppadma/drill", "path": "exec/jdbc/src/test/java/org/apache/drill/jdbc/JdbcTestBase.java", "license": "apache-2.0", "size": 16848 }
[ "java.sql.Connection", "java.sql.ResultSet", "java.sql.Statement", "org.junit.Assert" ]
import java.sql.Connection; import java.sql.ResultSet; import java.sql.Statement; import org.junit.Assert;
import java.sql.*; import org.junit.*;
[ "java.sql", "org.junit" ]
java.sql; org.junit;
2,426,724
public static String dataType(CIMDataType pType) { if (pType.getType() == CIMDataType.REFERENCE) return pType.getRefClassName() + ' ' + REF; String res = DATATYPE_MAP.get(pType); if (res == null) { String msg = "This function cannot handle typeCode: " + pType.getType() + "!"; // TODO: tracing th...
static String function(CIMDataType pType) { if (pType.getType() == CIMDataType.REFERENCE) return pType.getRefClassName() + ' ' + REF; String res = DATATYPE_MAP.get(pType); if (res == null) { String msg = STR + pType.getType() + "!"; throw new IllegalArgumentException(msg); } return res; }
/** * <pre> * dataType = DT_UINT8 | DT_SINT8 | DT_UINT16 | DT_SINT16 | DT_UINT32 | DT_SINT32 | DT_UINT64 * | DT_SINT64 | DT_REAL32 | DT_REAL64 | DT_CHAR16 | DT_STR | DT_BOOL | DT_DATETIME * </pre> * * Additionally it handles reference types too. * * <pre> * objectType = objectRef ...
<code> dataType = DT_UINT8 | DT_SINT8 | DT_UINT16 | DT_SINT16 | DT_UINT32 | DT_SINT32 | DT_UINT64 | DT_SINT64 | DT_REAL32 | DT_REAL64 | DT_CHAR16 | DT_STR | DT_BOOL | DT_DATETIME </code> Additionally it handles reference types too. <code> objectType = objectRef objectRef = className REF </code>
dataType
{ "repo_name": "acleasby/sblim2", "path": "src/main/java/org/sblim/cimclient/internal/util/MOF.java", "license": "epl-1.0", "size": 25698 }
[ "javax.cim.CIMDataType" ]
import javax.cim.CIMDataType;
import javax.cim.*;
[ "javax.cim" ]
javax.cim;
729,102
public static boolean loadFonts() { final String[] fonts = new String[] { SANS_FONT, BOLD_SANS_FONT }; final GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); for (String s : fonts) { try { URL res = ClientGUI.class.getResource(FONTDIR + s + ".ttf"); ge.registerFont(Font.c...
static boolean function() { final String[] fonts = new String[] { SANS_FONT, BOLD_SANS_FONT }; final GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); for (String s : fonts) { try { URL res = ClientGUI.class.getResource(FONTDIR + s + ".ttf"); ge.registerFont(Font.createFont(Font.TRUETYPE_FONT,...
/** * Loads fonts from the resources into the environment. * * @return true if loading was successful. */
Loads fonts from the resources into the environment
loadFonts
{ "repo_name": "wurfmaul/paugujooksik", "path": "src/at/jku/paugujooksik/tools/ResourceLoader.java", "license": "gpl-3.0", "size": 3284 }
[ "at.jku.paugujooksik.gui.client.ClientGUI", "at.jku.paugujooksik.tools.Constants", "java.awt.Font", "java.awt.FontFormatException", "java.awt.GraphicsEnvironment", "java.io.IOException" ]
import at.jku.paugujooksik.gui.client.ClientGUI; import at.jku.paugujooksik.tools.Constants; import java.awt.Font; import java.awt.FontFormatException; import java.awt.GraphicsEnvironment; import java.io.IOException;
import at.jku.paugujooksik.gui.client.*; import at.jku.paugujooksik.tools.*; import java.awt.*; import java.io.*;
[ "at.jku.paugujooksik", "java.awt", "java.io" ]
at.jku.paugujooksik; java.awt; java.io;
2,807,758
public Name getName() { return this.name; }
Name function() { return this.name; }
/** * Missing description at method getName. * * @return the Name. */
Missing description at method getName
getName
{ "repo_name": "NABUCCO/org.nabucco.testautomation.result", "path": "org.nabucco.testautomation.result.facade.datatype/src/main/gen/org/nabucco/testautomation/result/facade/datatype/trace/ActionTrace.java", "license": "epl-1.0", "size": 15247 }
[ "org.nabucco.framework.base.facade.datatype.Name" ]
import org.nabucco.framework.base.facade.datatype.Name;
import org.nabucco.framework.base.facade.datatype.*;
[ "org.nabucco.framework" ]
org.nabucco.framework;
2,408,839
public boolean addComponentParts(World worldIn, Random randomIn, StructureBoundingBox structureBoundingBoxIn) { if (this.field_143015_k < 0) { this.field_143015_k = this.getAverageGroundLevel(worldIn, structureBoundingBoxIn); ...
boolean function(World worldIn, Random randomIn, StructureBoundingBox structureBoundingBoxIn) { if (this.field_143015_k < 0) { this.field_143015_k = this.getAverageGroundLevel(worldIn, structureBoundingBoxIn); if (this.field_143015_k < 0) { return true; } this.boundingBox.offset(0, this.field_143015_k - this.boundingBo...
/** * second Part of Structure generating, this for example places Spiderwebs, Mob Spawners, it closes * Mineshafts at the end, it adds Fences... */
second Part of Structure generating, this for example places Spiderwebs, Mob Spawners, it closes Mineshafts at the end, it adds Fences..
addComponentParts
{ "repo_name": "aebert1/BigTransport", "path": "build/tmp/recompileMc/sources/net/minecraft/world/gen/structure/StructureVillagePieces.java", "license": "gpl-3.0", "size": 130983 }
[ "java.util.Random", "net.minecraft.block.Block", "net.minecraft.block.BlockCrops", "net.minecraft.init.Blocks", "net.minecraft.util.EnumFacing", "net.minecraft.util.math.MathHelper", "net.minecraft.world.World" ]
import java.util.Random; import net.minecraft.block.Block; import net.minecraft.block.BlockCrops; import net.minecraft.init.Blocks; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.MathHelper; import net.minecraft.world.World;
import java.util.*; import net.minecraft.block.*; import net.minecraft.init.*; import net.minecraft.util.*; import net.minecraft.util.math.*; import net.minecraft.world.*;
[ "java.util", "net.minecraft.block", "net.minecraft.init", "net.minecraft.util", "net.minecraft.world" ]
java.util; net.minecraft.block; net.minecraft.init; net.minecraft.util; net.minecraft.world;
2,841,837
public Scope nextScope() throws NoSuchElementException { return new Scope(nextToken()); }
Scope function() throws NoSuchElementException { return new Scope(nextToken()); }
/** * Returns the next Scope as a Scope object. * * @return Scope * @exception NoSuchElementException */
Returns the next Scope as a Scope object
nextScope
{ "repo_name": "integrated/jakarta-slide-server", "path": "src/share/org/apache/slide/common/ScopeTokenizer.java", "license": "apache-2.0", "size": 5841 }
[ "java.util.NoSuchElementException" ]
import java.util.NoSuchElementException;
import java.util.*;
[ "java.util" ]
java.util;
1,023,861
protected String doInBackground(String... args) { // Building Parameters List<NameValuePair> params = new ArrayList<NameValuePair>(); params.add(new BasicNameValuePair("rid", ""+rid)); params.add(new BasicNameValuePair("codBanc", ""+valCodBanc)); Syst...
String function(String... args) { List<NameValuePair> params = new ArrayList<NameValuePair>(); params.add(new BasicNameValuePair("rid", STRcodBancSTRSTRRID: STRCODBANC: STRGETSTRAll Products: ", json.toString()); try { int success = json.getInt(TAG_SUCCESS); if (success == 1) { } else { } } catch (JSONException e) { e....
/** * getting All products from url * */
getting All products from url
doInBackground
{ "repo_name": "jeslev/ProgramaVentas", "path": "app/src/main/java/com/example/yarvis/programaventas/PayReceiptActivity.java", "license": "gpl-2.0", "size": 5959 }
[ "java.util.ArrayList", "java.util.List", "org.apache.http.NameValuePair", "org.apache.http.message.BasicNameValuePair", "org.json.JSONException" ]
import java.util.ArrayList; import java.util.List; import org.apache.http.NameValuePair; import org.apache.http.message.BasicNameValuePair; import org.json.JSONException;
import java.util.*; import org.apache.http.*; import org.apache.http.message.*; import org.json.*;
[ "java.util", "org.apache.http", "org.json" ]
java.util; org.apache.http; org.json;
1,058,470
final String jvmName = ManagementFactory.getRuntimeMXBean().getName(); final int ampersand = jvmName.indexOf('@'); if (ampersand < 1) return null; return jvmName.substring(0, ampersand); }
final String jvmName = ManagementFactory.getRuntimeMXBean().getName(); final int ampersand = jvmName.indexOf('@'); if (ampersand < 1) return null; return jvmName.substring(0, ampersand); }
/** * Returns the PID of the process. Not guaranteed to be fully portable. * * @return The PID of the process. */
Returns the PID of the process. Not guaranteed to be fully portable
getPid
{ "repo_name": "walkeriniraq/transittime-core", "path": "transitime/src/main/java/org/transitime/monitoring/PidFile.java", "license": "gpl-3.0", "size": 2461 }
[ "java.lang.management.ManagementFactory" ]
import java.lang.management.ManagementFactory;
import java.lang.management.*;
[ "java.lang" ]
java.lang;
927,301
private void deepUpdateFont(FigGroup fg) { // TODO: Fonts shouldn't be handled any differently than other // rendering attributes boolean changed = false; List<Fig> figs = fg.getFigs(); for (Fig f : figs) { if (f instanceof ArgoFigText) { (...
void function(FigGroup fg) { boolean changed = false; List<Fig> figs = fg.getFigs(); for (Fig f : figs) { if (f instanceof ArgoFigText) { ((ArgoFigText) f).renderingChanged(); changed = true; } if (f instanceof FigGroup) { deepUpdateFont((FigGroup) f); } } if (changed) { fg.calcBounds(); } }
/** * Changes the font for all Figs contained in the given FigGroup. <p> * * TODO: In fact, there is a design error in this method: * E.g. for a class, if the name is Italic since the class is abstract, * then the classes features should be in Plain font. * This problem can be f...
Changes the font for all Figs contained in the given FigGroup. E.g. for a class, if the name is Italic since the class is abstract, then the classes features should be in Plain font. This problem can be fixed by implementing the updateFont() method in all subclasses
deepUpdateFont
{ "repo_name": "ckaestne/LEADT", "path": "workspace/argouml_diagrams/argouml-app/src/org/argouml/uml/diagram/ui/FigNodeModelElement.java", "license": "gpl-3.0", "size": 92897 }
[ "java.util.List", "org.tigris.gef.presentation.Fig", "org.tigris.gef.presentation.FigGroup" ]
import java.util.List; import org.tigris.gef.presentation.Fig; import org.tigris.gef.presentation.FigGroup;
import java.util.*; import org.tigris.gef.presentation.*;
[ "java.util", "org.tigris.gef" ]
java.util; org.tigris.gef;
2,059,445
public static boolean booleanValue(Map<String,?> map, String key, boolean defaultValue) { Object obj = map.get(key); if (obj == null) { return defaultValue; } else if (obj instanceof Boolean) { Boolean value = (Boolean)obj; return value.booleanValue(); ...
static boolean function(Map<String,?> map, String key, boolean defaultValue) { Object obj = map.get(key); if (obj == null) { return defaultValue; } else if (obj instanceof Boolean) { Boolean value = (Boolean)obj; return value.booleanValue(); } else { String text = obj.toString(); return Boolean.parseBoolean(text); } }
/** * Returns the boolean value of the given property in the map or returns the default value if its not present */
Returns the boolean value of the given property in the map or returns the default value if its not present
booleanValue
{ "repo_name": "mwringe/fabric8", "path": "components/fabric8-utils/src/main/java/io/fabric8/utils/Maps.java", "license": "apache-2.0", "size": 8075 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,507,861
public Collection<O> read(Query query, Object... parameters);
Collection<O> function(Query query, Object... parameters);
/** * This method implements the read operation using the filters * specified in the query. * @param query Query. * @param parameters Parameters to evaluate query. * @return Return the list with the instances founded. */
This method implements the read operation using the filters specified in the query
read
{ "repo_name": "kevchuk/HolandaCatalinaFw", "path": "src/main/java/org/hcjf/layers/crud/CrudLayerInterface.java", "license": "apache-2.0", "size": 15129 }
[ "java.util.Collection", "org.hcjf.layers.query.Query" ]
import java.util.Collection; import org.hcjf.layers.query.Query;
import java.util.*; import org.hcjf.layers.query.*;
[ "java.util", "org.hcjf.layers" ]
java.util; org.hcjf.layers;
2,543,973
private void doTestSchemaIsReset(PooledConnection pc, String userSchema) throws SQLException { Connection con1 = pc.getConnection(); JDBC.assertCurrentSchema(con1, userSchema); JDBC.assertCurrentUser(con1, userSchema); Statement stmt1 = con1.createStatement(); // ...
void function(PooledConnection pc, String userSchema) throws SQLException { Connection con1 = pc.getConnection(); JDBC.assertCurrentSchema(con1, userSchema); JDBC.assertCurrentUser(con1, userSchema); Statement stmt1 = con1.createStatement(); stmt1.execute(STR); stmt1.close(); JDBC.assertCurrentSchema(con1, "APP"); JDBC...
/** * Executes a test sequence to make sure the schema (and with DERBY-4551, * current user) is correctly reset between logical connections. * * @param pc pooled connection to get logical connections from * @param userSchema name of the default schema for the connection (user) * @throws SQ...
Executes a test sequence to make sure the schema (and with DERBY-4551, current user) is correctly reset between logical connections
doTestSchemaIsReset
{ "repo_name": "apache/derby", "path": "java/org.apache.derby.tests/org/apache/derbyTesting/functionTests/tests/jdbcapi/J2EEDataSourceTest.java", "license": "apache-2.0", "size": 186130 }
[ "java.sql.Connection", "java.sql.SQLException", "java.sql.Statement", "javax.sql.PooledConnection", "org.apache.derbyTesting.junit.JDBC" ]
import java.sql.Connection; import java.sql.SQLException; import java.sql.Statement; import javax.sql.PooledConnection; import org.apache.derbyTesting.junit.JDBC;
import java.sql.*; import javax.sql.*; import org.apache.*;
[ "java.sql", "javax.sql", "org.apache" ]
java.sql; javax.sql; org.apache;
1,054,668
private String getEventTitle ( Element _element ){ this.logger.entering( getClass().getName(), "getEventTitle" ); String eventTitle = null; try { eventTitle = _element.select( this.EVENT_TITLE_ELEMENT ).first( ).select( "a" ).html( ); } catch ( Exception e ) { ...
String function ( Element _element ){ this.logger.entering( getClass().getName(), STR ); String eventTitle = null; try { eventTitle = _element.select( this.EVENT_TITLE_ELEMENT ).first( ).select( "a" ).html( ); } catch ( Exception e ) { this.logger.severe( STR + _element ); this.logger.severe( HelperMethods.getStackTrac...
/** * Parses the event title. * * @param _element the html element from which the title is being extracted from * @return */
Parses the event title
getEventTitle
{ "repo_name": "mrzl/JISCAggregator", "path": "src/main/java/jisc/input/html/JciEventsHtmlParser.java", "license": "apache-2.0", "size": 10083 }
[ "org.jsoup.nodes.Element" ]
import org.jsoup.nodes.Element;
import org.jsoup.nodes.*;
[ "org.jsoup.nodes" ]
org.jsoup.nodes;
327,248
public Deque<DescribedProperty<?>> getDescribedProperties() { final Deque<DescribedProperty<?>> result = new LinkedList<DescribedProperty<?>>(); for (final PropertyBuilder<?> property : this.properties) { result.add(property.buildDescribed()); } return result; }
Deque<DescribedProperty<?>> function() { final Deque<DescribedProperty<?>> result = new LinkedList<DescribedProperty<?>>(); for (final PropertyBuilder<?> property : this.properties) { result.add(property.buildDescribed()); } return result; }
/** * Gets the properties. * * @return The properties. */
Gets the properties
getDescribedProperties
{ "repo_name": "lunarray-org/model-descriptor", "path": "src/main/java/org/lunarray/model/descriptor/accessor/reference/ReferenceBuilder.java", "license": "lgpl-3.0", "size": 8006 }
[ "java.util.Deque", "java.util.LinkedList", "org.lunarray.model.descriptor.accessor.property.DescribedProperty", "org.lunarray.model.descriptor.accessor.property.PropertyBuilder" ]
import java.util.Deque; import java.util.LinkedList; import org.lunarray.model.descriptor.accessor.property.DescribedProperty; import org.lunarray.model.descriptor.accessor.property.PropertyBuilder;
import java.util.*; import org.lunarray.model.descriptor.accessor.property.*;
[ "java.util", "org.lunarray.model" ]
java.util; org.lunarray.model;
2,349,748
private LinkedList<ScanInfo> compileReport(FsVolumeSpi vol, File bpFinalizedDir, File dir, LinkedList<ScanInfo> report) throws InterruptedException { File[] files; throttle(); try { files = FileUtil.listFiles(dir); } catch (IOException ioe) { LOG.warn("Exce...
LinkedList<ScanInfo> function(FsVolumeSpi vol, File bpFinalizedDir, File dir, LinkedList<ScanInfo> report) throws InterruptedException { File[] files; throttle(); try { files = FileUtil.listFiles(dir); } catch (IOException ioe) { LOG.warn(STR, ioe); datanode.checkDiskErrorAsync(); return report; } Arrays.sort(files); f...
/** * Compile a list of {@link ScanInfo} for the blocks in the directory * given by {@code dir}. * * @param vol the volume that contains the directory to scan * @param bpFinalizedDir the root directory of the directory to scan * @param dir the directory to scan * @param report the lis...
Compile a list of <code>ScanInfo</code> for the blocks in the directory given by dir
compileReport
{ "repo_name": "cnfire/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DirectoryScanner.java", "license": "apache-2.0", "size": 33003 }
[ "java.io.File", "java.io.IOException", "java.util.Arrays", "java.util.LinkedList", "org.apache.hadoop.fs.FileUtil", "org.apache.hadoop.hdfs.protocol.Block", "org.apache.hadoop.hdfs.server.datanode.fsdataset.FsVolumeSpi" ]
import java.io.File; import java.io.IOException; import java.util.Arrays; import java.util.LinkedList; import org.apache.hadoop.fs.FileUtil; import org.apache.hadoop.hdfs.protocol.Block; import org.apache.hadoop.hdfs.server.datanode.fsdataset.FsVolumeSpi;
import java.io.*; import java.util.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.server.datanode.fsdataset.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
2,626,495
private boolean designation(GNode designation) { if (null == designation) { while (true) { index++; if ((-1 == size) || (index < size)) { // We have an object to initialize. if (base.hasStructOrUnion()) { // Set the element type for struct/uni...
boolean function(GNode designation) { if (null == designation) { while (true) { index++; if ((-1 == size) (index < size)) { if (base.hasStructOrUnion()) { element = base.toTagged().getMember((int)index).resolve(); } else if ((! hasSize(type)) && (0 == states.size()) && top) { count = Math.max(count, index+1); } return ...
/** * Process the specified designation. This method updates the * internal state to reflect the designation. * * @param designation The designation, which may be * <code>null</code>. * @return <code>false</code> if the designation contains an * error. */
Process the specified designation. This method updates the internal state to reflect the designation
designation
{ "repo_name": "wandoulabs/xtc-rats", "path": "xtc-core/src/main/java/xtc/lang/CAnalyzer.java", "license": "lgpl-2.1", "size": 231201 }
[ "java.math.BigInteger", "java.util.Iterator", "xtc.tree.GNode", "xtc.type.Type", "xtc.util.SingletonIterator" ]
import java.math.BigInteger; import java.util.Iterator; import xtc.tree.GNode; import xtc.type.Type; import xtc.util.SingletonIterator;
import java.math.*; import java.util.*; import xtc.tree.*; import xtc.type.*; import xtc.util.*;
[ "java.math", "java.util", "xtc.tree", "xtc.type", "xtc.util" ]
java.math; java.util; xtc.tree; xtc.type; xtc.util;
148,246
private void cacheRelationship(Relationship r) { relationshipCache.put(r.getTerminologyId(), r); }
void function(Relationship r) { relationshipCache.put(r.getTerminologyId(), r); }
/** * Cache relationship. * * @param r the r */
Cache relationship
cacheRelationship
{ "repo_name": "WestCoastInformatics/OTF-Mapping-Service", "path": "admin/mojo/src/main/java/org/ihtsdo/otf/mapping/mojo/TerminologyRf2DeltaLoader.java", "license": "apache-2.0", "size": 43984 }
[ "org.ihtsdo.otf.mapping.rf2.Relationship" ]
import org.ihtsdo.otf.mapping.rf2.Relationship;
import org.ihtsdo.otf.mapping.rf2.*;
[ "org.ihtsdo.otf" ]
org.ihtsdo.otf;
771,831
protected NodeRef getSiteCalendarContainer(final String siteShortName, boolean create) { return SiteServiceImpl.getSiteContainer( siteShortName, CALENDAR_COMPONENT, create, siteService, transactionService, taggingService); }
NodeRef function(final String siteShortName, boolean create) { return SiteServiceImpl.getSiteContainer( siteShortName, CALENDAR_COMPONENT, create, siteService, transactionService, taggingService); }
/** * Fetches the Calendar Container on a site, creating as required if requested. */
Fetches the Calendar Container on a site, creating as required if requested
getSiteCalendarContainer
{ "repo_name": "Alfresco/alfresco-repository", "path": "src/main/java/org/alfresco/repo/calendar/CalendarServiceImpl.java", "license": "lgpl-3.0", "size": 17491 }
[ "org.alfresco.repo.site.SiteServiceImpl", "org.alfresco.service.cmr.repository.NodeRef" ]
import org.alfresco.repo.site.SiteServiceImpl; import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.repo.site.*; import org.alfresco.service.cmr.repository.*;
[ "org.alfresco.repo", "org.alfresco.service" ]
org.alfresco.repo; org.alfresco.service;
40,949
private void addMapper(Class<?> clazz, Field field) { CellConfig cellConfig = field.getAnnotation(CellConfig.class); BingConvertor bingConvertor = field.getAnnotation(BingConvertor.class); int index; String alias; boolean readRequired; if (cellConfig == null) { //当属性上没有此注解时候,忽略 ret...
void function(Class<?> clazz, Field field) { CellConfig cellConfig = field.getAnnotation(CellConfig.class); BingConvertor bingConvertor = field.getAnnotation(BingConvertor.class); int index; String alias; boolean readRequired; if (cellConfig == null) { return; } else { index = cellConfig.index(); alias = cellConfig.ali...
/** * <p> * Title: addConvertor * </p> * <p> * Description: * </p> */
Title: addConvertor Description:
addMapper
{ "repo_name": "bingyulei007/bingexcel", "path": "excel/src/main/java/com/bing/excel/mapper/AnnotationMapperHandler.java", "license": "apache-2.0", "size": 9404 }
[ "com.bing.excel.annotation.BingConvertor", "com.bing.excel.annotation.CellConfig", "com.bing.excel.converter.FieldValueConverter", "com.bing.excel.exception.IllegalCellConfigException", "com.bing.excel.exception.InitializationException", "com.google.common.base.Strings", "java.lang.reflect.Field", "ja...
import com.bing.excel.annotation.BingConvertor; import com.bing.excel.annotation.CellConfig; import com.bing.excel.converter.FieldValueConverter; import com.bing.excel.exception.IllegalCellConfigException; import com.bing.excel.exception.InitializationException; import com.google.common.base.Strings; import java.lang.r...
import com.bing.excel.annotation.*; import com.bing.excel.converter.*; import com.bing.excel.exception.*; import com.google.common.base.*; import java.lang.reflect.*; import java.util.concurrent.*;
[ "com.bing.excel", "com.google.common", "java.lang", "java.util" ]
com.bing.excel; com.google.common; java.lang; java.util;
1,845,133
public String toRegex(String grokPattern) { byte[] grokPatternBytes = grokPattern.getBytes(StandardCharsets.UTF_8); Matcher matcher = GROK_PATTERN_REGEX.matcher(grokPatternBytes); int result; try { matcherWatchdog.register(matcher); result = matcher.search(0,...
String function(String grokPattern) { byte[] grokPatternBytes = grokPattern.getBytes(StandardCharsets.UTF_8); Matcher matcher = GROK_PATTERN_REGEX.matcher(grokPatternBytes); int result; try { matcherWatchdog.register(matcher); result = matcher.search(0, grokPatternBytes.length, Option.NONE); } finally { matcherWatchdog...
/** * converts a grok expression into a named regex expression * * @return named regex expression */
converts a grok expression into a named regex expression
toRegex
{ "repo_name": "HonzaKral/elasticsearch", "path": "libs/grok/src/main/java/org/elasticsearch/grok/Grok.java", "license": "apache-2.0", "size": 13271 }
[ "java.nio.charset.StandardCharsets", "java.util.Locale", "org.joni.Matcher", "org.joni.Option", "org.joni.Region" ]
import java.nio.charset.StandardCharsets; import java.util.Locale; import org.joni.Matcher; import org.joni.Option; import org.joni.Region;
import java.nio.charset.*; import java.util.*; import org.joni.*;
[ "java.nio", "java.util", "org.joni" ]
java.nio; java.util; org.joni;
1,263,786
private void putWithValidation(String key, Object value) throws BitcoinURIParseException { if (parameterMap.containsKey(key)) { throw new BitcoinURIParseException(String.format(Locale.US, "'%s' is duplicated, URI is invalid", key)); } else { parameterMap.put(key, value); ...
void function(String key, Object value) throws BitcoinURIParseException { if (parameterMap.containsKey(key)) { throw new BitcoinURIParseException(String.format(Locale.US, STR, key)); } else { parameterMap.put(key, value); } }
/** * Put the value against the key in the map checking for duplication. This avoids address field overwrite etc. * * @param key The key for the map * @param value The value to store */
Put the value against the key in the map checking for duplication. This avoids address field overwrite etc
putWithValidation
{ "repo_name": "blockchain/bitcoinj", "path": "core/src/main/java/org/bitcoinj/uri/BitcoinCashURI.java", "license": "apache-2.0", "size": 16936 }
[ "java.util.Locale" ]
import java.util.Locale;
import java.util.*;
[ "java.util" ]
java.util;
2,426,080
@Override public String selectFragment(String alias, String columnSuffix) { SelectFragment frag = generateSelectFragment( alias, columnSuffix ); appendElementColumns( frag, alias ); appendIndexColumns( frag, alias ); appendIdentifierColumns( frag, alias ); return frag.toFragmentString() .substring( 2...
String function(String alias, String columnSuffix) { SelectFragment frag = generateSelectFragment( alias, columnSuffix ); appendElementColumns( frag, alias ); appendIndexColumns( frag, alias ); appendIdentifierColumns( frag, alias ); return frag.toFragmentString() .substring( 2 ); }
/** * Generate a list of collection index, key and element columns */
Generate a list of collection index, key and element columns
selectFragment
{ "repo_name": "1fechner/FeatureExtractor", "path": "sources/FeatureExtractor/lib/hibernate-release-5.1.0.Final/project/hibernate-core/src/main/java/org/hibernate/persister/collection/AbstractCollectionPersister.java", "license": "lgpl-2.1", "size": 67367 }
[ "org.hibernate.sql.SelectFragment" ]
import org.hibernate.sql.SelectFragment;
import org.hibernate.sql.*;
[ "org.hibernate.sql" ]
org.hibernate.sql;
1,767,277
private void mayAddPropToPrototype( RawNominalType rawType, String pname, Node defSite, Node initializer) { NTIScope methodScope = null; DeclaredFunctionType methodType = null; JSType propDeclType = null; JSDocInfo jsdoc = NodeUtil.getBestJSDocInfo(defSite); if (initializer !=...
void function( RawNominalType rawType, String pname, Node defSite, Node initializer) { NTIScope methodScope = null; DeclaredFunctionType methodType = null; JSType propDeclType = null; JSDocInfo jsdoc = NodeUtil.getBestJSDocInfo(defSite); if (initializer != null && initializer.isFunction()) { methodScope = visitFunction...
/** * Called for the usual style of prototype-property definitions, * but also for @lends and for direct assignments of object literals to prototypes. */
Called for the usual style of prototype-property definitions, but also for @lends and for direct assignments of object literals to prototypes
mayAddPropToPrototype
{ "repo_name": "LorenzoDV/closure-compiler", "path": "src/com/google/javascript/jscomp/GlobalTypeInfo.java", "license": "apache-2.0", "size": 107202 }
[ "com.google.javascript.jscomp.newtypes.DeclaredFunctionType", "com.google.javascript.jscomp.newtypes.FunctionType", "com.google.javascript.jscomp.newtypes.JSType", "com.google.javascript.jscomp.newtypes.RawNominalType", "com.google.javascript.rhino.JSDocInfo", "com.google.javascript.rhino.Node" ]
import com.google.javascript.jscomp.newtypes.DeclaredFunctionType; import com.google.javascript.jscomp.newtypes.FunctionType; import com.google.javascript.jscomp.newtypes.JSType; import com.google.javascript.jscomp.newtypes.RawNominalType; import com.google.javascript.rhino.JSDocInfo; import com.google.javascript.rhino...
import com.google.javascript.jscomp.newtypes.*; import com.google.javascript.rhino.*;
[ "com.google.javascript" ]
com.google.javascript;
2,386,481
public Builder setSmallIcon(Icon icon) { mN.setSmallIcon(icon); if (icon != null && icon.getType() == Icon.TYPE_RESOURCE) { mN.icon = icon.getResId(); } return this; }
Builder function(Icon icon) { mN.setSmallIcon(icon); if (icon != null && icon.getType() == Icon.TYPE_RESOURCE) { mN.icon = icon.getResId(); } return this; }
/** * Set the small icon, which will be used to represent the notification in the * status bar and content view (unless overriden there by a * {@link #setLargeIcon(Bitmap) large icon}). * * @param icon An Icon object to use. * @see Notification#icon */
Set the small icon, which will be used to represent the notification in the status bar and content view (unless overriden there by a <code>#setLargeIcon(Bitmap) large icon</code>)
setSmallIcon
{ "repo_name": "daiqiquan/framework-base", "path": "core/java/android/app/Notification.java", "license": "apache-2.0", "size": 264892 }
[ "android.graphics.drawable.Icon" ]
import android.graphics.drawable.Icon;
import android.graphics.drawable.*;
[ "android.graphics" ]
android.graphics;
1,576,799
public void tableCellEnd(ElementEnd element, ElementStart e) throws IOException, NoItemException{ _writer.write(_config.getElement(e.getElementName()).getEnd()); }
void function(ElementEnd element, ElementStart e) throws IOException, NoItemException{ _writer.write(_config.getElement(e.getElementName()).getEnd()); }
/** * Called when TD end element is reached. * * @param element * corresponding end tag * @param e * start tag * @throws IOException * output error occurs * @throws NoItemException * tag not found in the configuration */
Called when TD end element is reached
tableCellEnd
{ "repo_name": "ecrit/ecrit", "path": "html.to.latex/src/html/to/latex/converter/Converter.java", "license": "epl-1.0", "size": 20352 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
703,702
public void addFilterToCommentMediators(ViewerFilter filter);
void function(ViewerFilter filter);
/** * Adds the given filter to the commentMediators edition editor. * * @param filter * a viewer filter * @see org.eclipse.jface.viewers.StructuredViewer#addFilter(ViewerFilter) * */
Adds the given filter to the commentMediators edition editor
addFilterToCommentMediators
{ "repo_name": "prabushi/devstudio-tooling-esb", "path": "plugins/org.wso2.developerstudio.eclipse.gmf.esb.edit/src-gen/org/wso2/developerstudio/eclipse/gmf/esb/parts/RuleMediatorOutputConnectorPropertiesEditionPart.java", "license": "apache-2.0", "size": 1749 }
[ "org.eclipse.jface.viewers.ViewerFilter" ]
import org.eclipse.jface.viewers.ViewerFilter;
import org.eclipse.jface.viewers.*;
[ "org.eclipse.jface" ]
org.eclipse.jface;
330,412
public Timestamp getCreated(); public static final String COLUMNNAME_CreatedBy = "CreatedBy";
Timestamp function(); public static final String COLUMNNAME_CreatedBy = STR;
/** Get Created. * Date this record was created */
Get Created. Date this record was created
getCreated
{ "repo_name": "armenrz/adempiere", "path": "base/src/org/compiere/model/I_C_BPartner_Location.java", "license": "gpl-2.0", "size": 9787 }
[ "java.sql.Timestamp" ]
import java.sql.Timestamp;
import java.sql.*;
[ "java.sql" ]
java.sql;
802,135
public void setValues(ArrayList<String> values) { ((Cab2bListBox) firstComponent).setSelectedValues(values); }
void function(ArrayList<String> values) { ((Cab2bListBox) firstComponent).setSelectedValues(values); }
/** * Sets the values for Enum Panel * @param values * @see edu.wustl.cab2b.client.ui.main.IComponent#setValues(java.util.ArrayList) */
Sets the values for Enum Panel
setValues
{ "repo_name": "NCIP/cab2b", "path": "software/cab2b/src/java/client/edu/wustl/cab2b/client/ui/main/EnumTypePanel.java", "license": "bsd-3-clause", "size": 3841 }
[ "edu.wustl.cab2b.client.ui.controls.Cab2bListBox", "java.util.ArrayList" ]
import edu.wustl.cab2b.client.ui.controls.Cab2bListBox; import java.util.ArrayList;
import edu.wustl.cab2b.client.ui.controls.*; import java.util.*;
[ "edu.wustl.cab2b", "java.util" ]
edu.wustl.cab2b; java.util;
356,380
protected RexNode accessValue(RexNode node) { assert SqlTypeUtil.isNumeric(node.getType()); if (SqlTypeUtil.isDecimal(node.getType())) { return decodeValue(node); } return node; }
RexNode function(RexNode node) { assert SqlTypeUtil.isNumeric(node.getType()); if (SqlTypeUtil.isDecimal(node.getType())) { return decodeValue(node); } return node; }
/** * Retrieves the primitive value of a numeric node. If the node is a * decimal, then it must first be decoded. Otherwise the original node * may be returned. * * @param node a numeric node, possibly a decimal * @return the primitive value of the numeric node */
Retrieves the primitive value of a numeric node. If the node is a decimal, then it must first be decoded. Otherwise the original node may be returned
accessValue
{ "repo_name": "datametica/calcite", "path": "core/src/main/java/org/apache/calcite/rel/rules/ReduceDecimalsRule.java", "license": "apache-2.0", "size": 44846 }
[ "org.apache.calcite.rex.RexNode", "org.apache.calcite.sql.type.SqlTypeUtil" ]
import org.apache.calcite.rex.RexNode; import org.apache.calcite.sql.type.SqlTypeUtil;
import org.apache.calcite.rex.*; import org.apache.calcite.sql.type.*;
[ "org.apache.calcite" ]
org.apache.calcite;
1,359,467
public interface init_put_byte_arg1_read_packet_callback extends Callback {
public interface init_put_byte_arg1_read_packet_callback extends Callback {
/** * Returns the libavformat build-time configuration.<br> * Original signature : <code>char* avformat_configuration()</code><br> * <i>native declaration : src/main/headers/libavformat/avformat.h:47</i> */
Returns the libavformat build-time configuration. Original signature : <code>char* avformat_configuration()</code> native declaration : src/main/headers/libavformat/avformat.h:47
avformat_configuration
{ "repo_name": "sumo/QCoder", "path": "src/main/java/avformat/AvformatLibrary.java", "license": "bsd-2-clause", "size": 143301 }
[ "com.sun.jna.Callback" ]
import com.sun.jna.Callback;
import com.sun.jna.*;
[ "com.sun.jna" ]
com.sun.jna;
1,986,198
public DocumentMutation increment(@NonNullable FieldPath path, long inc);
DocumentMutation function(@NonNullable FieldPath path, long inc);
/** * Atomically increment the existing value at given the FieldPath by the given value. * * @param path the FieldPath to apply this increment operation * @param inc increment to apply to a field - can be positive or negative */
Atomically increment the existing value at given the FieldPath by the given value
increment
{ "repo_name": "ojai/ojai", "path": "java/core/src/main/java/org/ojai/store/DocumentMutation.java", "license": "apache-2.0", "size": 47815 }
[ "org.ojai.FieldPath", "org.ojai.annotation.API" ]
import org.ojai.FieldPath; import org.ojai.annotation.API;
import org.ojai.*; import org.ojai.annotation.*;
[ "org.ojai", "org.ojai.annotation" ]
org.ojai; org.ojai.annotation;
2,771,546
public void setFilmProjection(String value) throws SonyProjectorException { if (!model.isFilmProjectionAvailable()) { throw new SonyProjectorException("Unavailable item " + SonyProjectorItem.FILM_PROJECTION.getName() + " for projector model " + model.getName()); } ...
void function(String value) throws SonyProjectorException { if (!model.isFilmProjectionAvailable()) { throw new SonyProjectorException(STR + SonyProjectorItem.FILM_PROJECTION.getName() + STR + model.getName()); } setSetting(SonyProjectorItem.FILM_PROJECTION, model.getFilmProjectionCodeFromName(value)); }
/** * Request the projector to change the film projection mode * * @param value the film projection mode to set * * @throws SonyProjectorException - In case this setting is not available for the projector or any other problem */
Request the projector to change the film projection mode
setFilmProjection
{ "repo_name": "openhab/openhab2", "path": "bundles/org.openhab.binding.sonyprojector/src/main/java/org/openhab/binding/sonyprojector/internal/communication/SonyProjectorConnector.java", "license": "epl-1.0", "size": 43215 }
[ "org.openhab.binding.sonyprojector.internal.SonyProjectorException" ]
import org.openhab.binding.sonyprojector.internal.SonyProjectorException;
import org.openhab.binding.sonyprojector.internal.*;
[ "org.openhab.binding" ]
org.openhab.binding;
93,714
void addRouteDefinitions(Collection<RouteDefinition> routeDefinitions) throws Exception;
void addRouteDefinitions(Collection<RouteDefinition> routeDefinitions) throws Exception;
/** * Adds a collection of route definitions to the context * * @param routeDefinitions the route(s) definition to add * @throws Exception if the route definitions could not be created for whatever reason */
Adds a collection of route definitions to the context
addRouteDefinitions
{ "repo_name": "curso007/camel", "path": "camel-core/src/main/java/org/apache/camel/CamelContext.java", "license": "apache-2.0", "size": 79052 }
[ "java.util.Collection", "org.apache.camel.model.RouteDefinition" ]
import java.util.Collection; import org.apache.camel.model.RouteDefinition;
import java.util.*; import org.apache.camel.model.*;
[ "java.util", "org.apache.camel" ]
java.util; org.apache.camel;
686,534
private static Hashtable<Integer, String> buildTypes() { Hashtable<Integer, String> dict = new Hashtable<Integer, String>(); dict.put(new Integer(0x00020002), "Media Storage SOP Class UID"); dict.put(new Integer(0x00020003), "Media Storage SOP Instance UID"); dict.put(new Integer(0x00020010), "Transf...
static Hashtable<Integer, String> function() { Hashtable<Integer, String> dict = new Hashtable<Integer, String>(); dict.put(new Integer(0x00020002), STR); dict.put(new Integer(0x00020003), STR); dict.put(new Integer(0x00020010), STR); dict.put(new Integer(0x00020012), STR); dict.put(new Integer(0x00020013), STR); dict....
/** * Assemble the data dictionary. * This is incomplete at best, since there are literally thousands of * fields defined by the DICOM specifications. */
Assemble the data dictionary. This is incomplete at best, since there are literally thousands of fields defined by the DICOM specifications
buildTypes
{ "repo_name": "ctrueden/bioformats", "path": "components/formats-bsd/src/loci/formats/in/DicomReader.java", "license": "gpl-2.0", "size": 80163 }
[ "java.util.Hashtable" ]
import java.util.Hashtable;
import java.util.*;
[ "java.util" ]
java.util;
818,657
if (args.length < 2) { // NOSONAR LOGGER.error("There must be at least two arguments"); return; } int lastIndex = args.length - 1; AllureReportGenerator reportGenerator = new AllureReportGenerator( getFiles(Arrays.copyOf(args, lastIndex)) ); ...
if (args.length < 2) { LOGGER.error(STR); return; } int lastIndex = args.length - 1; AllureReportGenerator reportGenerator = new AllureReportGenerator( getFiles(Arrays.copyOf(args, lastIndex)) ); reportGenerator.generate(new File(args[lastIndex])); }
/** * Generate Allure report data from directories with allure report results. * * @param args a list of directory paths. First (args.length - 1) arguments - * results directories, last argument - the folder to generated data */
Generate Allure report data from directories with allure report results
main
{ "repo_name": "allure-framework/allure1", "path": "allure-report-data/src/main/java/ru/yandex/qatools/allure/data/DummyReportGenerator.java", "license": "apache-2.0", "size": 1407 }
[ "java.io.File", "java.util.Arrays" ]
import java.io.File; import java.util.Arrays;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
2,452,125
public MockHttpSession getHttpSession() { return httpSession; }
MockHttpSession function() { return httpSession; }
/** * Returns {@link HttpSession} for this environment * * @return session */
Returns <code>HttpSession</code> for this environment
getHttpSession
{ "repo_name": "selckin/wicket", "path": "wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java", "license": "apache-2.0", "size": 86041 }
[ "org.apache.wicket.protocol.http.mock.MockHttpSession" ]
import org.apache.wicket.protocol.http.mock.MockHttpSession;
import org.apache.wicket.protocol.http.mock.*;
[ "org.apache.wicket" ]
org.apache.wicket;
1,070,812
public Boolean deleteLocalEntry(String key, String tenantDomain) throws AxisFault { LocalEntryServiceProxy localEntryServiceProxy = getLocalEntryAdminClient(tenantDomain); return localEntryServiceProxy.deleteEntry(key); }
Boolean function(String key, String tenantDomain) throws AxisFault { LocalEntryServiceProxy localEntryServiceProxy = getLocalEntryAdminClient(tenantDomain); return localEntryServiceProxy.deleteEntry(key); }
/** * Delete the local entry. * * @param key Key of the local entry to be deleted. * @param tenantDomain Tenant Domain * @return Status of the operation * @throws AxisFault */
Delete the local entry
deleteLocalEntry
{ "repo_name": "bhathiya/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.gateway/src/main/java/org/wso2/carbon/apimgt/gateway/service/APILocalEntryAdmin.java", "license": "apache-2.0", "size": 3242 }
[ "org.apache.axis2.AxisFault", "org.wso2.carbon.apimgt.gateway.utils.LocalEntryServiceProxy" ]
import org.apache.axis2.AxisFault; import org.wso2.carbon.apimgt.gateway.utils.LocalEntryServiceProxy;
import org.apache.axis2.*; import org.wso2.carbon.apimgt.gateway.utils.*;
[ "org.apache.axis2", "org.wso2.carbon" ]
org.apache.axis2; org.wso2.carbon;
632,726
public int getAllCurrentVotesInEvents() { int count = 0; for (Set<Integer> set : _currentEventVotes.values()) { count += set.size(); } return count; }
int function() { int count = 0; for (Set<Integer> set : _currentEventVotes.values()) { count += set.size(); } return count; }
/** * Get the amount of total votes. * @return */
Get the amount of total votes
getAllCurrentVotesInEvents
{ "repo_name": "AthenaEventEngine/AthenaCore", "path": "src/main/java/com/github/athenaengine/core/EventEngineManager.java", "license": "gpl-3.0", "size": 13420 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,915,246
@Nonnull public ReportRootGetTeamsUserActivityUserCountsRequest select(@Nonnull final String value) { addSelectOption(value); return this; }
ReportRootGetTeamsUserActivityUserCountsRequest function(@Nonnull final String value) { addSelectOption(value); return this; }
/** * Sets the select clause for the request * * @param value the select clause * @return the updated request */
Sets the select clause for the request
select
{ "repo_name": "microsoftgraph/msgraph-sdk-java", "path": "src/main/java/com/microsoft/graph/requests/ReportRootGetTeamsUserActivityUserCountsRequest.java", "license": "mit", "size": 2901 }
[ "com.microsoft.graph.requests.ReportRootGetTeamsUserActivityUserCountsRequest", "javax.annotation.Nonnull" ]
import com.microsoft.graph.requests.ReportRootGetTeamsUserActivityUserCountsRequest; import javax.annotation.Nonnull;
import com.microsoft.graph.requests.*; import javax.annotation.*;
[ "com.microsoft.graph", "javax.annotation" ]
com.microsoft.graph; javax.annotation;
2,533,655
public Dimension getPreferredSize() { if (datePattern != null) { return new JTextField(datePattern).getPreferredSize(); } return super.getPreferredSize(); }
Dimension function() { if (datePattern != null) { return new JTextField(datePattern).getPreferredSize(); } return super.getPreferredSize(); }
/** * Returns the preferred size. If a date pattern is set, it is the size the * date pattern would take. */
Returns the preferred size. If a date pattern is set, it is the size the date pattern would take
getPreferredSize
{ "repo_name": "DegJ/miceschoolproject", "path": "MICE/lib/JCalendar-2/src/com/toedter/calendar/JTextFieldDateEditor.java", "license": "apache-2.0", "size": 12920 }
[ "java.awt.Dimension", "javax.swing.JTextField" ]
import java.awt.Dimension; import javax.swing.JTextField;
import java.awt.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
2,831,966
private void assignNames(Set<Assignment> varsToRename) { NameGenerator globalNameGenerator = new NameGenerator(reservedNames, prefix, reservedCharacters); // Local variables never need a prefix. NameGenerator localNameGenerator = prefix.isEmpty() ? globalNameGenerator : new NameGenerator(...
void function(Set<Assignment> varsToRename) { NameGenerator globalNameGenerator = new NameGenerator(reservedNames, prefix, reservedCharacters); NameGenerator localNameGenerator = prefix.isEmpty() ? globalNameGenerator : new NameGenerator(reservedNames, "", reservedCharacters); List<Assignment> pendingAssignments = new ...
/** * Determines which new names to substitute for the original names. */
Determines which new names to substitute for the original names
assignNames
{ "repo_name": "antz29/closure-compiler", "path": "src/com/google/javascript/jscomp/RenameVars.java", "license": "apache-2.0", "size": 15699 }
[ "java.util.ArrayList", "java.util.List", "java.util.Set", "java.util.SortedSet", "java.util.TreeSet" ]
import java.util.ArrayList; import java.util.List; import java.util.Set; import java.util.SortedSet; import java.util.TreeSet;
import java.util.*;
[ "java.util" ]
java.util;
294,150
private static Experience getExperience(List<String> row) { return new Experience(getFeatures(row), getOutcome(row)); }
static Experience function(List<String> row) { return new Experience(getFeatures(row), getOutcome(row)); }
/** * Gets a training instance from the given row. * * @param row is a row in the CSV training/test data * @return Experience is a training instance comprised of features and an outcome */
Gets a training instance from the given row
getExperience
{ "repo_name": "woodser/logistic_regression", "path": "test/test/learner/TestAbalone.java", "license": "mit", "size": 5032 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,076,660
public boolean onTouchEvent(MotionEvent ev) { if (mInputEventConsistencyVerifier != null) { mInputEventConsistencyVerifier.onTouchEvent(ev, 0); } final int action = ev.getAction(); if (mVelocityTracker == null) { mVelocityTracker = VelocityTracker.obtain(); ...
boolean function(MotionEvent ev) { if (mInputEventConsistencyVerifier != null) { mInputEventConsistencyVerifier.onTouchEvent(ev, 0); } final int action = ev.getAction(); if (mVelocityTracker == null) { mVelocityTracker = VelocityTracker.obtain(); } mVelocityTracker.addMovement(ev); final boolean pointerUp = (action & M...
/** * Analyzes the given motion event and if applicable triggers the * appropriate callbacks on the {@link OnGestureListener} supplied. * * @param ev The current motion event. * @return true if the {@link OnGestureListener} consumed the event, * else false. */
Analyzes the given motion event and if applicable triggers the appropriate callbacks on the <code>OnGestureListener</code> supplied
onTouchEvent
{ "repo_name": "CM13-DUI/android_packages_apps_DUI", "path": "src/com/android/systemui/navigation/fling/FlingGestureDetector.java", "license": "apache-2.0", "size": 27458 }
[ "android.view.MotionEvent", "android.view.VelocityTracker" ]
import android.view.MotionEvent; import android.view.VelocityTracker;
import android.view.*;
[ "android.view" ]
android.view;
2,066,647
public void deleteEscalation(AuthzSubject subject, Escalation e) throws PermissionException, ApplicationException;
void function(AuthzSubject subject, Escalation e) throws PermissionException, ApplicationException;
/** * Delete an escalation chain. This method will throw an exception if the * escalation chain is in use. TODO: Probably want to allow for the fact * that people DO want to delete while states exist. */
Delete an escalation chain. This method will throw an exception if the that people DO want to delete while states exist
deleteEscalation
{ "repo_name": "cc14514/hq6", "path": "hq-server/src/main/java/org/hyperic/hq/escalation/shared/EscalationManager.java", "license": "unlicense", "size": 8013 }
[ "org.hyperic.hq.authz.server.session.AuthzSubject", "org.hyperic.hq.authz.shared.PermissionException", "org.hyperic.hq.common.ApplicationException", "org.hyperic.hq.escalation.server.session.Escalation" ]
import org.hyperic.hq.authz.server.session.AuthzSubject; import org.hyperic.hq.authz.shared.PermissionException; import org.hyperic.hq.common.ApplicationException; import org.hyperic.hq.escalation.server.session.Escalation;
import org.hyperic.hq.authz.server.session.*; import org.hyperic.hq.authz.shared.*; import org.hyperic.hq.common.*; import org.hyperic.hq.escalation.server.session.*;
[ "org.hyperic.hq" ]
org.hyperic.hq;
2,733,867
private void forceOverflowMenu() { try { ViewConfiguration config = ViewConfiguration.get(this); Field menuKeyField = ViewConfiguration.class.getDeclaredField("sHasPermanentMenuKey"); if(menuKeyField != null) { menuKeyField.setAccessible(true); menuKeyField.setB...
void function() { try { ViewConfiguration config = ViewConfiguration.get(this); Field menuKeyField = ViewConfiguration.class.getDeclaredField(STR); if(menuKeyField != null) { menuKeyField.setAccessible(true); menuKeyField.setBoolean(config, false); } } catch (IllegalAccessException e) { Log.w(TAG, STR); } catch (NoSuch...
/** * Modified from: http://stackoverflow.com/a/13098824 */
Modified from: HREF
forceOverflowMenu
{ "repo_name": "matlink/SMSSecure", "path": "src/org/smssecure/smssecure/BaseActionBarActivity.java", "license": "gpl-3.0", "size": 2293 }
[ "android.util.Log", "android.view.ViewConfiguration", "java.lang.reflect.Field" ]
import android.util.Log; import android.view.ViewConfiguration; import java.lang.reflect.Field;
import android.util.*; import android.view.*; import java.lang.reflect.*;
[ "android.util", "android.view", "java.lang" ]
android.util; android.view; java.lang;
768,437
public static BankAccountBicSharedConstants create() { if (bicMapConstants == null) { // NOPMD it's thread save! synchronized (BankAccountBicConstantsImpl.class) { if (bicMapConstants == null) { final BankAccountBicConstantsImpl bicMapConstantsTmp = new BankAccountBicConstantsImpl(); ...
static BankAccountBicSharedConstants function() { if (bicMapConstants == null) { synchronized (BankAccountBicConstantsImpl.class) { if (bicMapConstants == null) { final BankAccountBicConstantsImpl bicMapConstantsTmp = new BankAccountBicConstantsImpl(); COUNTRIES.stream().forEach(country -> bicMapConstantsTmp.addBankAcc...
/** * Instantiates a class via deferred binding. * * @return the new instance, which must be cast to the requested class */
Instantiates a class via deferred binding
create
{ "repo_name": "ManfredTremmel/mt-bean-validators", "path": "src/main/java/de/knightsoftnet/validators/server/data/CreateBankAccountBicMapConstantsClass.java", "license": "apache-2.0", "size": 2051 }
[ "de.knightsoftnet.validators.shared.data.BankAccountBicSharedConstants" ]
import de.knightsoftnet.validators.shared.data.BankAccountBicSharedConstants;
import de.knightsoftnet.validators.shared.data.*;
[ "de.knightsoftnet.validators" ]
de.knightsoftnet.validators;
1,600,719
@Override public Set<K> keySet() { return getCollection().getKeySet(); }
Set<K> function() { return getCollection().getKeySet(); }
/** * Return a {@link java.util.Set} for iterating over and interacting with all keys * in the array map. * * <p><b>Note:</b> this is a fairly inefficient way to access the array contents, it * requires generating a number of temporary objects.</p> */
Return a <code>java.util.Set</code> for iterating over and interacting with all keys in the array map. Note: this is a fairly inefficient way to access the array contents, it requires generating a number of temporary objects
keySet
{ "repo_name": "JSDemos/android-sdk-20", "path": "src/android/util/ArrayMap.java", "license": "apache-2.0", "size": 28511 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
96,250
public static void addEffectKenBurns(Context context, String projectPath, String mediaItemId, String effectId, long startTimeMs, long durationMs, Rect startRect, Rect endRect) { final Intent intent = mIntentPool.get(context, ApiService.class); intent.putExtra(PARAM_OP, OP_EFF...
static void function(Context context, String projectPath, String mediaItemId, String effectId, long startTimeMs, long durationMs, Rect startRect, Rect endRect) { final Intent intent = mIntentPool.get(context, ApiService.class); intent.putExtra(PARAM_OP, OP_EFFECT_ADD_IMAGE_KEN_BURNS); intent.putExtra(PARAM_PROJECT_PATH...
/** * Add a Ken Burns effect * * @param context The context * @param projectPath The project path * @param mediaItemId The media item id * @param effectId The effect id * @param startTimeMs The start time * @param durationMs The duration of the item * @param startRect The st...
Add a Ken Burns effect
addEffectKenBurns
{ "repo_name": "DmitryADP/diff_qc750", "path": "packages/apps/VideoEditor/src/com/android/videoeditor/service/ApiService.java", "license": "gpl-2.0", "size": 203796 }
[ "android.content.Context", "android.content.Intent", "android.graphics.Rect" ]
import android.content.Context; import android.content.Intent; import android.graphics.Rect;
import android.content.*; import android.graphics.*;
[ "android.content", "android.graphics" ]
android.content; android.graphics;
487,048
private void init_candidates() { for (int r = 0; r < num_rows; r++) { for (int c = 0; c < num_cols; c++) { Square curr = pc.standard_puzzle[r][c]; Set<Integer> vals_to_remove = pc.row_puzzle.get_vector(r).get_contained_values(); ...
void function() { for (int r = 0; r < num_rows; r++) { for (int c = 0; c < num_cols; c++) { Square curr = pc.standard_puzzle[r][c]; Set<Integer> vals_to_remove = pc.row_puzzle.get_vector(r).get_contained_values(); curr.remove_candidates(vals_to_remove); vals_to_remove = pc.col_puzzle.get_vector(c).get_contained_values(...
/** * Goes through every PuzzlePieces.Square and updates its availabe candidates * based on filled values in Row/Col/PuzzlePieces.Block Puzzles */
Goes through every PuzzlePieces.Square and updates its availabe candidates based on filled values in Row/Col/PuzzlePieces.Block Puzzles
init_candidates
{ "repo_name": "MehtaSahil/SudokuSolver", "path": "src/Main/Solver.java", "license": "mit", "size": 3850 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,048,132
//TODO deprecate? Recall why no longer using ns/keys params public String replaceProperties(String ns, String value, Hashtable<String, Object> keys) throws BuildException { return replaceProperties(value); }
String function(String ns, String value, Hashtable<String, Object> keys) throws BuildException { return replaceProperties(value); }
/** * Replaces <code>${xxx}</code> style constructions in the given value * with the string value of the corresponding data types. * * <p>Delegates to the one-arg version, completely ignoring the ns * and keys parameters.</p> * * @param ns The namespace for the property. * @pa...
Replaces <code>${xxx}</code> style constructions in the given value with the string value of the corresponding data types. Delegates to the one-arg version, completely ignoring the ns and keys parameters
replaceProperties
{ "repo_name": "Mayo-WE01051879/mayosapp", "path": "Build/src/main/org/apache/tools/ant/PropertyHelper.java", "license": "mit", "size": 46397 }
[ "java.util.Hashtable" ]
import java.util.Hashtable;
import java.util.*;
[ "java.util" ]
java.util;
326,199
public void thirdClick() { robot.mouseDown(InputEvent.BUTTON3_MASK); robot.mouseUp(InputEvent.BUTTON3_MASK); }
void function() { robot.mouseDown(InputEvent.BUTTON3_MASK); robot.mouseUp(InputEvent.BUTTON3_MASK); }
/** * Clicks the 3rd button of the mouse (wheel button for example) */
Clicks the 3rd button of the mouse (wheel button for example)
thirdClick
{ "repo_name": "mbordas/qualify", "path": "src/main/java/qualify/tools/TestToolSikuli.java", "license": "bsd-3-clause", "size": 38343 }
[ "java.awt.event.InputEvent" ]
import java.awt.event.InputEvent;
import java.awt.event.*;
[ "java.awt" ]
java.awt;
60,831
public void receiveSocket(InetAddress myAdress, int myPort, boolean useThread) { if (!useThread) { DatagramPacket request = null; try { DatagramSocket socket = new DatagramSocket(myPort, myAdress); byte[] receiveData = new byte[1024]; request = new DatagramPacket(receiveData, receiveData.l...
void function(InetAddress myAdress, int myPort, boolean useThread) { if (!useThread) { DatagramPacket request = null; try { DatagramSocket socket = new DatagramSocket(myPort, myAdress); byte[] receiveData = new byte[1024]; request = new DatagramPacket(receiveData, receiveData.length); socket.receive(request); message =...
/** * Receives String from UDP * * @param myAdress * the IP Adress from the interface I want to receive from * @param myPort * the Port I want to listen to * @return the received message */
Receives String from UDP
receiveSocket
{ "repo_name": "visio/STT", "path": "SphinxSTT/src/demo/sphinx/helloworld/UDPConnection.java", "license": "mit", "size": 3088 }
[ "java.io.IOException", "java.net.DatagramPacket", "java.net.DatagramSocket", "java.net.InetAddress", "java.net.SocketException", "java.net.UnknownHostException" ]
import java.io.IOException; import java.net.DatagramPacket; import java.net.DatagramSocket; import java.net.InetAddress; import java.net.SocketException; import java.net.UnknownHostException;
import java.io.*; import java.net.*;
[ "java.io", "java.net" ]
java.io; java.net;
2,586,083
private Method loadJar(String jarName) { URL url = null; try { url = new File(jarName).toURI().toURL(); } catch (MalformedURLException e2) { e2.printStackTrace(); return null; } Manifest manifest; try { manifest = new JarFile(new File(jarName)).getManifest(); } c...
Method function(String jarName) { URL url = null; try { url = new File(jarName).toURI().toURL(); } catch (MalformedURLException e2) { e2.printStackTrace(); return null; } Manifest manifest; try { manifest = new JarFile(new File(jarName)).getManifest(); } catch (IOException e1) { e1.printStackTrace(); return null; } Att...
/** * Load jar. * * @param jarName * the jar name * * @return the method */
Load jar
loadJar
{ "repo_name": "neo4j-attic/yajsw", "path": "src/main/java/org/rzo/yajsw/app/WrapperManagerImpl.java", "license": "lgpl-2.1", "size": 28146 }
[ "java.io.File", "java.io.IOException", "java.lang.reflect.Method", "java.net.MalformedURLException", "java.net.URLClassLoader", "java.util.ArrayList", "java.util.Iterator", "java.util.jar.Attributes", "java.util.jar.JarFile", "java.util.jar.Manifest" ]
import java.io.File; import java.io.IOException; import java.lang.reflect.Method; import java.net.MalformedURLException; import java.net.URLClassLoader; import java.util.ArrayList; import java.util.Iterator; import java.util.jar.Attributes; import java.util.jar.JarFile; import java.util.jar.Manifest;
import java.io.*; import java.lang.reflect.*; import java.net.*; import java.util.*; import java.util.jar.*;
[ "java.io", "java.lang", "java.net", "java.util" ]
java.io; java.lang; java.net; java.util;
353,380
void notifyKvStateRegistered( JobID jobId, JobVertexID jobVertexId, KeyGroupRange keyGroupRange, String registrationName, KvStateID kvStateId, KvStateServerAddress kvStateServerAddress);
void notifyKvStateRegistered( JobID jobId, JobVertexID jobVertexId, KeyGroupRange keyGroupRange, String registrationName, KvStateID kvStateId, KvStateServerAddress kvStateServerAddress);
/** * Notifies the listener about a registered KvState instance. * * @param jobId Job ID the KvState instance belongs to * @param jobVertexId JobVertexID the KvState instance belongs to * @param keyGroupRange Key group range the KvState instance belongs to * @param registrationName Name u...
Notifies the listener about a registered KvState instance
notifyKvStateRegistered
{ "repo_name": "haohui/flink", "path": "flink-runtime/src/main/java/org/apache/flink/runtime/query/KvStateRegistryGateway.java", "license": "apache-2.0", "size": 2294 }
[ "org.apache.flink.api.common.JobID", "org.apache.flink.runtime.jobgraph.JobVertexID", "org.apache.flink.runtime.state.KeyGroupRange" ]
import org.apache.flink.api.common.JobID; import org.apache.flink.runtime.jobgraph.JobVertexID; import org.apache.flink.runtime.state.KeyGroupRange;
import org.apache.flink.api.common.*; import org.apache.flink.runtime.jobgraph.*; import org.apache.flink.runtime.state.*;
[ "org.apache.flink" ]
org.apache.flink;
57,353
public static byte[] toBytes(final UUID uuid) { final ByteBuffer buffer = ByteBuffer.allocate(SIZE_IN_BYTES); buffer.putLong(uuid.getMostSignificantBits()); buffer.putLong(uuid.getLeastSignificantBits()); return buffer.array(); }
static byte[] function(final UUID uuid) { final ByteBuffer buffer = ByteBuffer.allocate(SIZE_IN_BYTES); buffer.putLong(uuid.getMostSignificantBits()); buffer.putLong(uuid.getLeastSignificantBits()); return buffer.array(); }
/** * Get array of bytes from UUID. * @param uuid UUID. * @return Array of UUID bytes. */
Get array of bytes from UUID
toBytes
{ "repo_name": "nickolaymykhalych/UCU_adv_DB", "path": "homework_2/src/main/java/com/DB/kolya/SuperUtil.java", "license": "mit", "size": 2067 }
[ "java.nio.ByteBuffer" ]
import java.nio.ByteBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
1,029,493
public static Rect calculateSrcRect(int srcWidth, int srcHeight, int dstWidth, int dstHeight, ScalingLogic scalingLogic) { if (scalingLogic == ScalingLogic.CROP) { final float srcAspect = (float)srcWidth / (float)srcHeight; final float dstAspec...
static Rect function(int srcWidth, int srcHeight, int dstWidth, int dstHeight, ScalingLogic scalingLogic) { if (scalingLogic == ScalingLogic.CROP) { final float srcAspect = (float)srcWidth / (float)srcHeight; final float dstAspect = (float)dstWidth / (float)dstHeight; if (srcAspect > dstAspect) { final int srcRectWidth...
/** * Calculates source rectangle for scaling bitmap * * @param srcWidth Width of source image * @param srcHeight Height of source image * @param dstWidth Width of destination area * @param dstHeight Height of destination area * @param scalingLogic Logic to use to avoid image stretchi...
Calculates source rectangle for scaling bitmap
calculateSrcRect
{ "repo_name": "himanshurchhabra/Calculia", "path": "app/src/main/java/com/example/calculia/Helpers/ScalingUtilities.java", "license": "apache-2.0", "size": 8900 }
[ "android.graphics.Rect" ]
import android.graphics.Rect;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
2,160,844
@NotNull private DiscoCache createDiscoCache( AffinityTopologyVersion topVer, DiscoveryDataClusterState state, ClusterNode loc, Collection<ClusterNode> topSnapshot) { assert topSnapshot.contains(loc); HashSet<UUID> alives = U.newHashSet(topSnapshot.size()); H...
@NotNull DiscoCache function( AffinityTopologyVersion topVer, DiscoveryDataClusterState state, ClusterNode loc, Collection<ClusterNode> topSnapshot) { assert topSnapshot.contains(loc); HashSet<UUID> alives = U.newHashSet(topSnapshot.size()); HashMap<UUID, ClusterNode> nodeMap = U.newHashMap(topSnapshot.size()); ArrayLi...
/** * Called from discovery thread. * * @param topVer Topology version. * @param state Current state. * @param loc Local node. * @param topSnapshot Topology snapshot. * @return Newly created discovery cache. */
Called from discovery thread
createDiscoCache
{ "repo_name": "chandresh-pancholi/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java", "license": "apache-2.0", "size": 138014 }
[ "java.util.ArrayList", "java.util.Collection", "java.util.Collections", "java.util.HashMap", "java.util.HashSet", "java.util.List", "java.util.Map", "java.util.Set", "java.util.TreeSet", "org.apache.ignite.cluster.BaselineNode", "org.apache.ignite.cluster.ClusterNode", "org.apache.ignite.inter...
import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import java.util.TreeSet; import org.apache.ignite.cluster.BaselineNode; import org.apache.ignite.cluster.ClusterN...
import java.util.*; import org.apache.ignite.cluster.*; import org.apache.ignite.internal.cluster.*; import org.apache.ignite.internal.processors.affinity.*; import org.apache.ignite.internal.processors.cluster.*; import org.apache.ignite.internal.util.typedef.internal.*; import org.apache.ignite.lang.*; import org.jet...
[ "java.util", "org.apache.ignite", "org.jetbrains.annotations" ]
java.util; org.apache.ignite; org.jetbrains.annotations;
2,203,940
@Override public Iterable<Artifact> getInputFilesForExtraAction( ActionExecutionContext actionExecutionContext) throws ActionExecutionException, InterruptedException { Collection<Artifact> scannedIncludes = actionExecutionContext.getExecutor().getContext(actionContext) .getScannedInc...
Iterable<Artifact> function( ActionExecutionContext actionExecutionContext) throws ActionExecutionException, InterruptedException { Collection<Artifact> scannedIncludes = actionExecutionContext.getExecutor().getContext(actionContext) .getScannedIncludeFiles(this, actionExecutionContext); ImmutableSet.Builder<Artifact> ...
/** * Provides list of include files needed for performing extra actions on this action when run * remotely. The list of include files is created by performing a header scan on the known input * files. */
Provides list of include files needed for performing extra actions on this action when run remotely. The list of include files is created by performing a header scan on the known input files
getInputFilesForExtraAction
{ "repo_name": "kamalmarhubi/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileAction.java", "license": "apache-2.0", "size": 58095 }
[ "com.google.common.collect.ImmutableSet", "com.google.devtools.build.lib.actions.ActionExecutionContext", "com.google.devtools.build.lib.actions.ActionExecutionException", "com.google.devtools.build.lib.actions.Artifact", "java.util.Collection" ]
import com.google.common.collect.ImmutableSet; import com.google.devtools.build.lib.actions.ActionExecutionContext; import com.google.devtools.build.lib.actions.ActionExecutionException; import com.google.devtools.build.lib.actions.Artifact; import java.util.Collection;
import com.google.common.collect.*; import com.google.devtools.build.lib.actions.*; import java.util.*;
[ "com.google.common", "com.google.devtools", "java.util" ]
com.google.common; com.google.devtools; java.util;
2,359,281
public CountDownLatch getBehaviorCategoryAsync(Integer categoryId, String responseFields, AsyncCallback<com.mozu.api.contracts.core.BehaviorCategory> callback) throws Exception { MozuClient<com.mozu.api.contracts.core.BehaviorCategory> client = com.mozu.api.clients.platform.ReferenceDataClient.getBehaviorCategory...
CountDownLatch function(Integer categoryId, String responseFields, AsyncCallback<com.mozu.api.contracts.core.BehaviorCategory> callback) throws Exception { MozuClient<com.mozu.api.contracts.core.BehaviorCategory> client = com.mozu.api.clients.platform.ReferenceDataClient.getBehaviorCategoryClient( categoryId, responseF...
/** * Retrieves the details of the behavior category specified in the request. * <p><pre><code> * ReferenceData referencedata = new ReferenceData(); * CountDownLatch latch = referencedata.getBehaviorCategory( categoryId, responseFields, callback ); * latch.await() * </code></pre></p> * @param categoryId U...
Retrieves the details of the behavior category specified in the request. <code><code> ReferenceData referencedata = new ReferenceData(); CountDownLatch latch = referencedata.getBehaviorCategory( categoryId, responseFields, callback ); latch.await() * </code></code>
getBehaviorCategoryAsync
{ "repo_name": "lakshmi-nair/mozu-java", "path": "mozu-javaasync-core/src/main/java/com/mozu/api/resources/platform/ReferenceDataResource.java", "license": "mit", "size": 43935 }
[ "com.mozu.api.AsyncCallback", "com.mozu.api.MozuClient", "java.util.concurrent.CountDownLatch" ]
import com.mozu.api.AsyncCallback; import com.mozu.api.MozuClient; import java.util.concurrent.CountDownLatch;
import com.mozu.api.*; import java.util.concurrent.*;
[ "com.mozu.api", "java.util" ]
com.mozu.api; java.util;
1,522,470
@Test public void testFileDeterminationWithNull() throws IOException { // create the extension final Extension e = new Extension(); e.setProperty(HttpListener.PROPERTY_URLMATCHER, "*"); // create the test-subject final FileHandler h = new FileHandler(); h.initialize(e); // check the result final ...
void function() throws IOException { final Extension e = new Extension(); e.setProperty(HttpListener.PROPERTY_URLMATCHER, "*"); final FileHandler h = new FileHandler(); h.initialize(e); final File file = h.determineFile(null); assertNull(file); }
/** * Test a folder-<code>urlMatcher</code> and an <code>URI</code> which is * <code>null</code>. * * @throws IOException * if the decoding fails */
Test a folder-<code>urlMatcher</code> and an <code>URI</code> which is <code>null</code>
testFileDeterminationWithNull
{ "repo_name": "pmeisen/gen-server-http-listener", "path": "test/net/meisen/general/server/http/listener/handler/TestFileHandler.java", "license": "mit", "size": 20094 }
[ "java.io.File", "java.io.IOException", "net.meisen.general.server.http.listener.HttpListener", "net.meisen.general.server.settings.pojos.Extension", "org.junit.Assert" ]
import java.io.File; import java.io.IOException; import net.meisen.general.server.http.listener.HttpListener; import net.meisen.general.server.settings.pojos.Extension; import org.junit.Assert;
import java.io.*; import net.meisen.general.server.http.listener.*; import net.meisen.general.server.settings.pojos.*; import org.junit.*;
[ "java.io", "net.meisen.general", "org.junit" ]
java.io; net.meisen.general; org.junit;
217,644
Objects.requireNonNull(marker, getClass().getSimpleName() + ": marker must not be null"); if (rangeMarkers.contains(marker)) { return; } plotChildren.add(marker.getNode()); rangeMarkers.add(marker); }
Objects.requireNonNull(marker, getClass().getSimpleName() + STR); if (rangeMarkers.contains(marker)) { return; } plotChildren.add(marker.getNode()); rangeMarkers.add(marker); }
/** * Adds a marker to the Y (range) axis. * * @param marker The marker to be added. */
Adds a marker to the Y (range) axis
addRangeMarker
{ "repo_name": "LiquEc/LiquEc", "path": "gui/src/main/java/com/emxsys/chart/extension/XYMarkers.java", "license": "gpl-2.0", "size": 5959 }
[ "java.util.Objects" ]
import java.util.Objects;
import java.util.*;
[ "java.util" ]
java.util;
2,228,247
public void rm(String fileName) throws IOException { int req_id = generateNextRequestID(); TypesWriter tw = new TypesWriter(); tw.writeString(fileName, charsetName); sendMessage(Packet.SSH_FXP_REMOVE, req_id, tw.getBytes()); expectStatusOKMessage(req_id); }
void function(String fileName) throws IOException { int req_id = generateNextRequestID(); TypesWriter tw = new TypesWriter(); tw.writeString(fileName, charsetName); sendMessage(Packet.SSH_FXP_REMOVE, req_id, tw.getBytes()); expectStatusOKMessage(req_id); }
/** * Remove a file. * * @param fileName See the {@link SFTPv3Client comment} for the class for more details. * @throws IOException */
Remove a file
rm
{ "repo_name": "mattb243/AmazonEC2Matlab", "path": "third-party/ganymed-ssh2-build250/src/ch/ethz/ssh2/SFTPv3Client.java", "license": "bsd-3-clause", "size": 37607 }
[ "ch.ethz.ssh2.packets.TypesWriter", "ch.ethz.ssh2.sftp.Packet", "java.io.IOException" ]
import ch.ethz.ssh2.packets.TypesWriter; import ch.ethz.ssh2.sftp.Packet; import java.io.IOException;
import ch.ethz.ssh2.packets.*; import ch.ethz.ssh2.sftp.*; import java.io.*;
[ "ch.ethz.ssh2", "java.io" ]
ch.ethz.ssh2; java.io;
392,627
public Paint getRangeCrosshairPaint() { return this.rangeCrosshairPaint; }
Paint function() { return this.rangeCrosshairPaint; }
/** * Returns the range crosshair color. * * @return The crosshair color. */
Returns the range crosshair color
getRangeCrosshairPaint
{ "repo_name": "apetresc/JFreeChart", "path": "src/main/java/org/jfree/chart/plot/ContourPlot.java", "license": "lgpl-2.1", "size": 61516 }
[ "java.awt.Paint" ]
import java.awt.Paint;
import java.awt.*;
[ "java.awt" ]
java.awt;
402,014
public Vec3d getLook(float partialTicks) { return this.getVectorForRotation(this.rotationPitch, this.rotationYaw); }
Vec3d function(float partialTicks) { return this.getVectorForRotation(this.rotationPitch, this.rotationYaw); }
/** * interpolated look vector */
interpolated look vector
getLook
{ "repo_name": "ThePantsThief/Zombe-Modpack", "path": "source/net/minecraft/client/entity/EntityPlayerSP.java", "license": "gpl-3.0", "size": 48422 }
[ "net.minecraft.util.math.Vec3d" ]
import net.minecraft.util.math.Vec3d;
import net.minecraft.util.math.*;
[ "net.minecraft.util" ]
net.minecraft.util;
1,275,694
@Override public Response apisApiIdRatingsGet(String apiId, Integer limit, Integer offset, Request request) throws NotFoundException { double avgRating; String username = RestApiUtil.getLoggedInUsername(request); int userRatingValue = 0; try { APIStore api...
Response function(String apiId, Integer limit, Integer offset, Request request) throws NotFoundException { double avgRating; String username = RestApiUtil.getLoggedInUsername(request); int userRatingValue = 0; try { APIStore apiStore = RestApiUtil.getConsumer(username); Rating userRating = apiStore.getRatingForApiFromU...
/** * Retrieves a list of ratings for given API ID * * @param apiId API ID * @param limit response limit * @param offset response offset * @param request msf4j request object * @return List of Ratings for API * @throws NotFoundException if failed to find method implementati...
Retrieves a list of ratings for given API ID
apisApiIdRatingsGet
{ "repo_name": "lakmali/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.rest.api.store/src/main/java/org/wso2/carbon/apimgt/rest/api/store/impl/ApisApiServiceImpl.java", "license": "apache-2.0", "size": 43185 }
[ "java.util.HashMap", "java.util.List", "java.util.Map", "javax.ws.rs.core.Response", "org.wso2.carbon.apimgt.core.api.APIStore", "org.wso2.carbon.apimgt.core.exception.APIManagementException", "org.wso2.carbon.apimgt.core.models.Rating", "org.wso2.carbon.apimgt.core.util.APIMgtConstants", "org.wso2....
import java.util.HashMap; import java.util.List; import java.util.Map; import javax.ws.rs.core.Response; import org.wso2.carbon.apimgt.core.api.APIStore; import org.wso2.carbon.apimgt.core.exception.APIManagementException; import org.wso2.carbon.apimgt.core.models.Rating; import org.wso2.carbon.apimgt.core.util.APIMgtC...
import java.util.*; import javax.ws.rs.core.*; import org.wso2.carbon.apimgt.core.api.*; import org.wso2.carbon.apimgt.core.exception.*; import org.wso2.carbon.apimgt.core.models.*; import org.wso2.carbon.apimgt.core.util.*; import org.wso2.carbon.apimgt.rest.api.common.dto.*; import org.wso2.carbon.apimgt.rest.api.com...
[ "java.util", "javax.ws", "org.wso2.carbon", "org.wso2.msf4j" ]
java.util; javax.ws; org.wso2.carbon; org.wso2.msf4j;
673,560
void verifyRMHeartbeatResponseForNodeLabels(NodeHeartbeatResponse response); }
void verifyRMHeartbeatResponseForNodeLabels(NodeHeartbeatResponse response); }
/** * check whether if updated labels sent to RM was accepted or not * @param response */
check whether if updated labels sent to RM was accepted or not
verifyRMHeartbeatResponseForNodeLabels
{ "repo_name": "bitmybytes/hadoop", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/NodeStatusUpdaterImpl.java", "license": "apache-2.0", "size": 49123 }
[ "org.apache.hadoop.yarn.server.api.protocolrecords.NodeHeartbeatResponse" ]
import org.apache.hadoop.yarn.server.api.protocolrecords.NodeHeartbeatResponse;
import org.apache.hadoop.yarn.server.api.protocolrecords.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
984,991