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
@Deprecated public static Header authenticate( final Credentials credentials, final String charset, final boolean proxy) { Args.notNull(credentials, "Credentials"); Args.notNull(charset, "charset"); final StringBuilder tmp = new StringBuilder(); ...
static Header function( final Credentials credentials, final String charset, final boolean proxy) { Args.notNull(credentials, STR); Args.notNull(charset, STR); final StringBuilder tmp = new StringBuilder(); tmp.append(credentials.getUserPrincipal().getName()); tmp.append(":"); tmp.append((credentials.getPassword() == n...
/** * Returns a basic <tt>Authorization</tt> header value for the given * {@link Credentials} and charset. * * @param credentials The credentials to encode. * @param charset The charset to use for encoding the credentials * * @return a basic authorization header * * @depreca...
Returns a basic Authorization header value for the given <code>Credentials</code> and charset
authenticate
{ "repo_name": "Godine/android", "path": "lib/httpclient-android/src/main/java/org/apache/http/impl/auth/BasicSchemeHC4.java", "license": "gpl-2.0", "size": 7270 }
[ "android.util.Base64", "org.apache.http.Header", "org.apache.http.auth.Credentials", "org.apache.http.message.BufferedHeader", "org.apache.http.util.Args", "org.apache.http.util.CharArrayBuffer", "org.apache.http.util.EncodingUtils" ]
import android.util.Base64; import org.apache.http.Header; import org.apache.http.auth.Credentials; import org.apache.http.message.BufferedHeader; import org.apache.http.util.Args; import org.apache.http.util.CharArrayBuffer; import org.apache.http.util.EncodingUtils;
import android.util.*; import org.apache.http.*; import org.apache.http.auth.*; import org.apache.http.message.*; import org.apache.http.util.*;
[ "android.util", "org.apache.http" ]
android.util; org.apache.http;
1,798,142
private @Nonnull Optional<String> toStringWithLengthInSpace( ParserRuleContext messageCtx, ParserRuleContext ctx, IntegerSpace lengthSpace, String name) { String text = ctx.getText(); if (!lengthSpace.contains(text.length())) { _w.addWarning( messageCtx, getFullText(messageCtx)...
@Nonnull Optional<String> function( ParserRuleContext messageCtx, ParserRuleContext ctx, IntegerSpace lengthSpace, String name) { String text = ctx.getText(); if (!lengthSpace.contains(text.length())) { _w.addWarning( messageCtx, getFullText(messageCtx), _parser, String.format( STR, name, lengthSpace, text)); return Op...
/** * Return the text of the provided {@code ctx} if its length is within the provided {@link * IntegerSpace lengthSpace}, or else {@link Optional#empty}. */
Return the text of the provided ctx if its length is within the provided <code>IntegerSpace lengthSpace</code>, or else <code>Optional#empty</code>
toStringWithLengthInSpace
{ "repo_name": "batfish/batfish", "path": "projects/batfish/src/main/java/org/batfish/grammar/palo_alto/PaloAltoConfigurationBuilder.java", "license": "apache-2.0", "size": 140482 }
[ "java.util.Optional", "javax.annotation.Nonnull", "org.antlr.v4.runtime.ParserRuleContext", "org.batfish.datamodel.IntegerSpace" ]
import java.util.Optional; import javax.annotation.Nonnull; import org.antlr.v4.runtime.ParserRuleContext; import org.batfish.datamodel.IntegerSpace;
import java.util.*; import javax.annotation.*; import org.antlr.v4.runtime.*; import org.batfish.datamodel.*;
[ "java.util", "javax.annotation", "org.antlr.v4", "org.batfish.datamodel" ]
java.util; javax.annotation; org.antlr.v4; org.batfish.datamodel;
1,847,037
@Test public void testOptionsWithWhitespace() { Set<String> result = OptionParser.parse(" +all -data_flow "); assertContainedOptions(Arrays.asList("+all", "-data_flow"), result); }
void function() { Set<String> result = OptionParser.parse(STR); assertContainedOptions(Arrays.asList("+all", STR), result); }
/** * Test with options string that contains white space. * * Result contains the options only. */
Test with options string that contains white space. Result contains the options only
testOptionsWithWhitespace
{ "repo_name": "mikanbako/Ant-Jlint-Task", "path": "src/test/java/com/github/mikanbako/ant/jlinttask/OptionParserTest.java", "license": "gpl-2.0", "size": 3553 }
[ "java.util.Arrays", "java.util.Set" ]
import java.util.Arrays; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,470,029
public static BodyContentType getEnumFromValue(String value) throws NoEnumFoundException { if (value != null) { for (BodyContentType imValue : BodyContentType.values()) { if (value.equalsIgnoreCase(imValue.getValue())) { return imValue; } } } throw new NoEnumFou...
static BodyContentType function(String value) throws NoEnumFoundException { if (value != null) { for (BodyContentType imValue : BodyContentType.values()) { if (value.equalsIgnoreCase(imValue.getValue())) { return imValue; } } } throw new NoEnumFoundException( ImMessages.EXCEPTION_NO_REST_API_CONTENT_TYPE_ENUM_FOUND); }
/** * Returns a RestApiBodyContentType if the String passed is the same as one of * the states of the enum<br> * * @param value * : string of the value to retrieve * @return A RestApiBodyContentType, null if not found. * @throws NoEnumFoundException * : No enumerator found ...
Returns a RestApiBodyContentType if the String passed is the same as one of the states of the enum
getEnumFromValue
{ "repo_name": "indigo-dc/im-java-api", "path": "src/main/java/es/upv/i3m/grycap/im/rest/client/BodyContentType.java", "license": "apache-2.0", "size": 1895 }
[ "es.upv.i3m.grycap.im.exceptions.NoEnumFoundException", "es.upv.i3m.grycap.im.lang.ImMessages" ]
import es.upv.i3m.grycap.im.exceptions.NoEnumFoundException; import es.upv.i3m.grycap.im.lang.ImMessages;
import es.upv.i3m.grycap.im.exceptions.*; import es.upv.i3m.grycap.im.lang.*;
[ "es.upv.i3m" ]
es.upv.i3m;
2,497,729
public List<AttributeStatement> createOrganizationIdAttributeStatement(String organizationId) { List<AttributeStatement> statements = new ArrayList<AttributeStatement>(); Attribute attribute = createAttribute(null, SamlConstants.USER_ORG_ID_ATTR, null, Arrays.asList(organizationId)); statem...
List<AttributeStatement> function(String organizationId) { List<AttributeStatement> statements = new ArrayList<AttributeStatement>(); Attribute attribute = createAttribute(null, SamlConstants.USER_ORG_ID_ATTR, null, Arrays.asList(organizationId)); statements.addAll(OpenSAML2ComponentBuilder.getInstance().createAttribut...
/** * Creates the organization id attribute statement. * * @param organizationId the organization id * @return the list */
Creates the organization id attribute statement
createOrganizationIdAttributeStatement
{ "repo_name": "healthreveal/CONNECT", "path": "Product/Production/Common/CONNECTCoreLib/src/main/java/gov/hhs/fha/nhinc/callback/openSAML/OpenSAML2ComponentBuilder.java", "license": "bsd-3-clause", "size": 32385 }
[ "gov.hhs.fha.nhinc.callback.SamlConstants", "java.util.ArrayList", "java.util.Arrays", "java.util.List", "org.opensaml.saml2.core.Attribute", "org.opensaml.saml2.core.AttributeStatement" ]
import gov.hhs.fha.nhinc.callback.SamlConstants; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import org.opensaml.saml2.core.Attribute; import org.opensaml.saml2.core.AttributeStatement;
import gov.hhs.fha.nhinc.callback.*; import java.util.*; import org.opensaml.saml2.core.*;
[ "gov.hhs.fha", "java.util", "org.opensaml.saml2" ]
gov.hhs.fha; java.util; org.opensaml.saml2;
2,488,194
int XUngrabKeyboard(Display display, NativeLong time);
int XUngrabKeyboard(Display display, NativeLong time);
/** * Releases the keyboard and any queued events if this client has it actively grabbed from either XGrabKeyboard() or XGrabKey(). * @param display Specifies the connection to the X server. * @param time Specifies the time. You can pass either a timestamp or CurrentTime. * @return nothing */
Releases the keyboard and any queued events if this client has it actively grabbed from either XGrabKeyboard() or XGrabKey()
XUngrabKeyboard
{ "repo_name": "trejkaz/jna", "path": "contrib/platform/src/com/sun/jna/platform/unix/X11.java", "license": "lgpl-2.1", "size": 105805 }
[ "com.sun.jna.NativeLong" ]
import com.sun.jna.NativeLong;
import com.sun.jna.*;
[ "com.sun.jna" ]
com.sun.jna;
1,247,471
@Override protected SpreadSheet doRead(File file) { SpreadSheet result; Properties props; List<String> keys; Row row; props = new Properties(); if (!props.load(file.getAbsolutePath())) return null; result = new DefaultSpreadSheet(); // header row = result.getHeaderR...
SpreadSheet function(File file) { SpreadSheet result; Properties props; List<String> keys; Row row; props = new Properties(); if (!props.load(file.getAbsolutePath())) return null; result = new DefaultSpreadSheet(); row = result.getHeaderRow(); row.addCell("K").setContentAsString(HEADER_KEY); row.addCell("V").setContent...
/** * Performs the actual reading. Must handle compression itself, if * {@link #supportsCompressedInput()} returns true. * * @param file the file to read from * @return the spreadsheet or null in case of an error * @see #getInputType() * @see #supportsCompressedInput() */
Performs the actual reading. Must handle compression itself, if <code>#supportsCompressedInput()</code> returns true
doRead
{ "repo_name": "waikato-datamining/adams-base", "path": "adams-spreadsheet/src/main/java/adams/data/io/input/PropertiesSpreadSheetReader.java", "license": "gpl-3.0", "size": 6624 }
[ "java.io.File", "java.util.ArrayList", "java.util.Collections", "java.util.List" ]
import java.io.File; import java.util.ArrayList; import java.util.Collections; import java.util.List;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
2,151,795
public static Exception refreshCache(PrintStream... progress) { Exception problem = null; if (CACHE_URL == null) { return null; } PACKAGE_MANAGER.setPackageRepositoryURL(REP_URL); String cacheDir = WEKA_HOME.toString() + File.separator + "repCache"; try { for (PrintStream p : prog...
static Exception function(PrintStream... progress) { Exception problem = null; if (CACHE_URL == null) { return null; } PACKAGE_MANAGER.setPackageRepositoryURL(REP_URL); String cacheDir = WEKA_HOME.toString() + File.separator + STR; try { for (PrintStream p : progress) { p.println(STR); } byte[] zip = PACKAGE_MANAGER.ge...
/** * Refresh the local copy of the package meta data * * @param progress to report progress to * @return any Exception raised or null if all is successful */
Refresh the local copy of the package meta data
refreshCache
{ "repo_name": "ModelWriter/Deliverables", "path": "WP2/D2.5.2_Generation/Jeni/lib/weka-src/src/main/java/weka/core/WekaPackageManager.java", "license": "epl-1.0", "size": 87570 }
[ "java.io.BufferedOutputStream", "java.io.ByteArrayInputStream", "java.io.File", "java.io.FileOutputStream", "java.io.PrintStream", "java.util.zip.ZipEntry", "java.util.zip.ZipInputStream" ]
import java.io.BufferedOutputStream; import java.io.ByteArrayInputStream; import java.io.File; import java.io.FileOutputStream; import java.io.PrintStream; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream;
import java.io.*; import java.util.zip.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,492,501
byte getLuminanceFromGround(Vector3i position);
byte getLuminanceFromGround(Vector3i position);
/** * Get the light level for this object that is caused by everything * other than the sky. * * <p>Higher levels indicate a higher luminance.</p> * * @param position The position of the block * @return A light level, nominally between 0 and 15, inclusive */
Get the light level for this object that is caused by everything other than the sky. Higher levels indicate a higher luminance
getLuminanceFromGround
{ "repo_name": "kenzierocks/SpongeAPI", "path": "src/main/java/org/spongepowered/api/world/extent/Extent.java", "license": "mit", "size": 33484 }
[ "com.flowpowered.math.vector.Vector3i" ]
import com.flowpowered.math.vector.Vector3i;
import com.flowpowered.math.vector.*;
[ "com.flowpowered.math" ]
com.flowpowered.math;
723,941
@Test public void removeScripts_3() throws Exception { Submit submit = mock(Submit.class); SubmitWrapper submitWrapper = new SubmitWrapper(submit); List<ScriptText> scripts = new ArrayList<ScriptText>(); scripts.add(new ScriptText("name1", "text1")); submitWrapper.scripts = scripts; doThrow(new IOExcep...
void function() throws Exception { Submit submit = mock(Submit.class); SubmitWrapper submitWrapper = new SubmitWrapper(submit); List<ScriptText> scripts = new ArrayList<ScriptText>(); scripts.add(new ScriptText("name1", "text1")); submitWrapper.scripts = scripts; doThrow(new IOException()).when(submit).deleteScripts(sc...
/** * Exception occur when delete scripts */
Exception occur when delete scripts
removeScripts_3
{ "repo_name": "cyron/byteman-framework", "path": "src/test/java/jp/co/ntt/oss/jboss/byteman/framework/instrumentor/AbstractDistributedInstrumentorTest.java", "license": "lgpl-2.1", "size": 7460 }
[ "java.io.IOException", "java.util.ArrayList", "java.util.List", "jp.co.ntt.oss.jboss.byteman.framework.instrumentor.AbstractDistributedInstrumentor", "org.jboss.byteman.agent.submit.ScriptText", "org.jboss.byteman.agent.submit.Submit", "org.junit.Assert", "org.mockito.Mockito" ]
import java.io.IOException; import java.util.ArrayList; import java.util.List; import jp.co.ntt.oss.jboss.byteman.framework.instrumentor.AbstractDistributedInstrumentor; import org.jboss.byteman.agent.submit.ScriptText; import org.jboss.byteman.agent.submit.Submit; import org.junit.Assert; import org.mockito.Mockito;
import java.io.*; import java.util.*; import jp.co.ntt.oss.jboss.byteman.framework.instrumentor.*; import org.jboss.byteman.agent.submit.*; import org.junit.*; import org.mockito.*;
[ "java.io", "java.util", "jp.co.ntt", "org.jboss.byteman", "org.junit", "org.mockito" ]
java.io; java.util; jp.co.ntt; org.jboss.byteman; org.junit; org.mockito;
2,610,180
public void openForWrite() throws IOException;
void function() throws IOException;
/** * Open the file for writing, on the underlying file system. File name is * passed in the link#connect() method. * * @throws IOException if file is directory, file does not exists, * i if file is already open for write or other * I/O error occurs ...
Open the file for writing, on the underlying file system. File name is passed in the link#connect() method
openForWrite
{ "repo_name": "wufucious/moped", "path": "squawk/cldc/src/com/sun/squawk/platform/GCFFile.java", "license": "gpl-2.0", "size": 18824 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,351,099
@RobotKeyword @ArgumentNames({ "locator", "text", "logLevel=INFO" }) public void frameShouldNotContain(String locator, String text, String logLevel) { if (frameContains(locator, text)) { logging.log(String.format("Frame Should Not Contain: %s => FAILED", text), logLevel); throw new Selenium2LibraryNonFatal...
@ArgumentNames({ STR, "text", STR }) void function(String locator, String text, String logLevel) { if (frameContains(locator, text)) { logging.log(String.format(STR, text), logLevel); throw new Selenium2LibraryNonFatalException( String.format(STR, text)); } else { logging.log(String.format(STR, text), logLevel); } }
/** * Verify the frame identified by <b>locator</b> does not contain * <b>text</b>.<br> * <br> * See `Introduction` for details about locators. * * @param locator * The locator to locate the frame. * @param text * The text to verify. * @param logLevel * Default=IN...
Verify the frame identified by locator does not contain text. See `Introduction` for details about locators
frameShouldNotContain
{ "repo_name": "MarkusBernhardt/robotframework-selenium2library-java", "path": "src/main/java/com/github/markusbernhardt/selenium2library/keywords/Element.java", "license": "apache-2.0", "size": 56233 }
[ "com.github.markusbernhardt.selenium2library.Selenium2LibraryNonFatalException", "org.robotframework.javalib.annotation.ArgumentNames" ]
import com.github.markusbernhardt.selenium2library.Selenium2LibraryNonFatalException; import org.robotframework.javalib.annotation.ArgumentNames;
import com.github.markusbernhardt.selenium2library.*; import org.robotframework.javalib.annotation.*;
[ "com.github.markusbernhardt", "org.robotframework.javalib" ]
com.github.markusbernhardt; org.robotframework.javalib;
546,052
EList getParentBindings();
EList getParentBindings();
/** * Returns the value of the '<em><b>Parent Bindings</b></em>' reference list. * The list contents are of type {@link ucm.map.ComponentBinding}. * It is bidirectional and its opposite is '{@link ucm.map.ComponentBinding#getParentComponent <em>Parent Component</em>}'. * <!-- begin-user-doc --> * <p> * If t...
Returns the value of the 'Parent Bindings' reference list. The list contents are of type <code>ucm.map.ComponentBinding</code>. It is bidirectional and its opposite is '<code>ucm.map.ComponentBinding#getParentComponent Parent Component</code>'. If the meaning of the 'Parent Bindings' reference list isn't clear, there r...
getParentBindings
{ "repo_name": "McGill-DP-Group/seg.jUCMNav", "path": "src/ucm/map/ComponentRef.java", "license": "epl-1.0", "size": 5233 }
[ "org.eclipse.emf.common.util.EList" ]
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,961,481
Member validateMemberAsync(PerunSession sess, Member member) throws InternalErrorException;
Member validateMemberAsync(PerunSession sess, Member member) throws InternalErrorException;
/** * Validate all attributes for member and then set member's status to VALID. * This method runs asynchronously. It immediately return member with <b>ORIGINAL</b> status and after asynchronous validation sucessfuly finishes * it switch member's status to VALID. If validation ends with error, member keeps his st...
Validate all attributes for member and then set member's status to VALID. This method runs asynchronously. It immediately return member with ORIGINAL status and after asynchronous validation sucessfuly finishes it switch member's status to VALID. If validation ends with error, member keeps his status
validateMemberAsync
{ "repo_name": "ondrocks/perun", "path": "perun-core/src/main/java/cz/metacentrum/perun/core/bl/MembersManagerBl.java", "license": "bsd-2-clause", "size": 49250 }
[ "cz.metacentrum.perun.core.api.Member", "cz.metacentrum.perun.core.api.PerunSession", "cz.metacentrum.perun.core.api.exceptions.InternalErrorException" ]
import cz.metacentrum.perun.core.api.Member; import cz.metacentrum.perun.core.api.PerunSession; import cz.metacentrum.perun.core.api.exceptions.InternalErrorException;
import cz.metacentrum.perun.core.api.*; import cz.metacentrum.perun.core.api.exceptions.*;
[ "cz.metacentrum.perun" ]
cz.metacentrum.perun;
1,304,794
@ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync( String resourceGroupName, String gatewayName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalA...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<Flux<ByteBuffer>>> function( String resourceGroupName, String gatewayName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (this.client.getSubscriptionId() == null) { return Mono .error( n...
/** * Deletes a virtual wan p2s vpn gateway. * * @param resourceGroupName The resource group name of the P2SVpnGateway. * @param gatewayName The name of the gateway. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail ...
Deletes a virtual wan p2s vpn gateway
deleteWithResponseAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/P2SVpnGatewaysClientImpl.java", "license": "mit", "size": 155308 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.Context", "java.nio.ByteBuffer" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import java.nio.ByteBuffer;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import java.nio.*;
[ "com.azure.core", "java.nio" ]
com.azure.core; java.nio;
2,353,501
public String getExtension(Metadata metadata) { if (metadata != null) { // Look for the first registered convenient mapping. for (final MetadataExtension metadataExtension : this.mappings) { if (metadata.equals(metadataExtension.getMetadata())) { r...
String function(Metadata metadata) { if (metadata != null) { for (final MetadataExtension metadataExtension : this.mappings) { if (metadata.equals(metadataExtension.getMetadata())) { return metadataExtension.getName(); } } } return null; }
/** * Returns the first extension mapping to this metadata. * * @param metadata * The metadata to find. * @return The first extension mapping to this metadata. */
Returns the first extension mapping to this metadata
getExtension
{ "repo_name": "pecko/debrief", "path": "org.mwc.asset.comms/docs/restlet_src/org.restlet/org/restlet/service/MetadataService.java", "license": "epl-1.0", "size": 27797 }
[ "org.restlet.data.Metadata", "org.restlet.engine.application.MetadataExtension" ]
import org.restlet.data.Metadata; import org.restlet.engine.application.MetadataExtension;
import org.restlet.data.*; import org.restlet.engine.application.*;
[ "org.restlet.data", "org.restlet.engine" ]
org.restlet.data; org.restlet.engine;
1,572,976
public static double calcScaleOfVector( Vector3d a, Vector3d b, double imageWidth ) { Vector3d line = new Vector3d( a.x - b.x, a.y - b.y, a.z - b.z ); // how much meter is one pixel // scale = the diagonal of one pixel return ( line.length() / imageWidth ) * MapUtils.SQRT2; ...
static double function( Vector3d a, Vector3d b, double imageWidth ) { Vector3d line = new Vector3d( a.x - b.x, a.y - b.y, a.z - b.z ); return ( line.length() / imageWidth ) * MapUtils.SQRT2; }
/** * Calculates the Scale ( = Resolution* sqrt( 2 ) (== diagonal of pixel)) of a Vector between two points on the * Screen given an imagewidth. That is, how much meter is the Scale of one Pixel in an Image given a certain vector. * * @param a * "from" point * @param b ...
Calculates the Scale ( = Resolution* sqrt( 2 ) (== diagonal of pixel)) of a Vector between two points on the Screen given an imagewidth. That is, how much meter is the Scale of one Pixel in an Image given a certain vector
calcScaleOfVector
{ "repo_name": "lat-lon/deegree2-base", "path": "deegree2-core/src/main/java/org/deegree/ogcwebservices/wpvs/utils/StripeFactory.java", "license": "lgpl-2.1", "size": 47995 }
[ "javax.vecmath.Vector3d", "org.deegree.framework.util.MapUtils" ]
import javax.vecmath.Vector3d; import org.deegree.framework.util.MapUtils;
import javax.vecmath.*; import org.deegree.framework.util.*;
[ "javax.vecmath", "org.deegree.framework" ]
javax.vecmath; org.deegree.framework;
87,831
public SceneGraphObject getSceneGraphObject();
SceneGraphObject function();
/** * Get the OpenGL scene graph object representation of this node. This will * need to be cast to the appropriate parent type when being used. * * @return The OpenGL representation. */
Get the OpenGL scene graph object representation of this node. This will need to be cast to the appropriate parent type when being used
getSceneGraphObject
{ "repo_name": "Norkart/NK-VirtualGlobe", "path": "Xj3D/src/java/org/web3d/vrml/renderer/ogl/nodes/OGLVRMLNode.java", "license": "gpl-2.0", "size": 1214 }
[ "org.j3d.aviatrix3d.SceneGraphObject" ]
import org.j3d.aviatrix3d.SceneGraphObject;
import org.j3d.aviatrix3d.*;
[ "org.j3d.aviatrix3d" ]
org.j3d.aviatrix3d;
742,340
public Object findByKey(final String key, final Session session, final Class<?> objclass) throws HibernateException { final String queryText = objclass.getName() + ".findByKey"; final Query query = session.getNamedQuery(queryText); query.setString("key", key); Object uniqueResult = null; try { ...
Object function(final String key, final Session session, final Class<?> objclass) throws HibernateException { final String queryText = objclass.getName() + STR; final Query query = session.getNamedQuery(queryText); query.setString("key", key); Object uniqueResult = null; try { uniqueResult = query.uniqueResult(); } cat...
/** * Find by key. * * @param key * the key * @param session * the session * @param objclass * the objclass * @return the object * @throws HibernateException * the hibernate exception @+ aram objclass */
Find by key
findByKey
{ "repo_name": "leonarduk/unison", "path": "src/main/java/uk/co/sleonard/unison/datahandling/HibernateHelper.java", "license": "apache-2.0", "size": 24694 }
[ "org.hibernate.HibernateException", "org.hibernate.NonUniqueResultException", "org.hibernate.Query", "org.hibernate.Session" ]
import org.hibernate.HibernateException; import org.hibernate.NonUniqueResultException; import org.hibernate.Query; import org.hibernate.Session;
import org.hibernate.*;
[ "org.hibernate" ]
org.hibernate;
187,240
public void setLoadingDrawable(Drawable drawable);
void function(Drawable drawable);
/** * Set the drawable used in the loading layout. This is the same as calling * <code>setLoadingDrawable(drawable, Mode.BOTH)</code> * * @param drawable - Drawable to display */
Set the drawable used in the loading layout. This is the same as calling <code>setLoadingDrawable(drawable, Mode.BOTH)</code>
setLoadingDrawable
{ "repo_name": "Kingjimny/gdmc-mm", "path": "extra_libs/Android-PullToRefreshLibrary/src/com/handmark/pulltorefresh/library/ILoadingLayout.java", "license": "apache-2.0", "size": 1594 }
[ "android.graphics.drawable.Drawable" ]
import android.graphics.drawable.Drawable;
import android.graphics.drawable.*;
[ "android.graphics" ]
android.graphics;
967,319
@Test public void checkRodAddRem() { // Note: I only check assembly.getRodLocations() in a few spots // below since it's a late addition. Further testing may be required. int size = 10; // An assembly to test. ReflectorAssembly assembly = new ReflectorAssembly(10); // Initialize some rods to add/rem...
void function() { int size = 10; ReflectorAssembly assembly = new ReflectorAssembly(10); SFRRod rod1 = new SFRRod(); rod1.setName("Anjie"); SFRRod rod2 = new SFRRod(); rod2.setName("Colin"); SFRRod rod3 = new SFRRod(); rod3.setName(STR); List<Integer> boundaryIndexes = new ArrayList<Integer>(); boundaryIndexes.add(-1);...
/** * <p> * Tests the addition and removal of SFRRods in the ReflectorAssembly. * </p> * */
Tests the addition and removal of SFRRods in the ReflectorAssembly.
checkRodAddRem
{ "repo_name": "SmithRWORNL/ice", "path": "tests/org.eclipse.ice.reactor.sfr.test/src/org/eclipse/ice/reactor/sfr/test/ReflectorAssemblyTester.java", "license": "epl-1.0", "size": 29897 }
[ "java.util.ArrayList", "java.util.HashSet", "java.util.List", "java.util.Set", "org.eclipse.ice.reactor.sfr.core.assembly.ReflectorAssembly", "org.eclipse.ice.reactor.sfr.core.assembly.SFRRod", "org.junit.Assert" ]
import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; import org.eclipse.ice.reactor.sfr.core.assembly.ReflectorAssembly; import org.eclipse.ice.reactor.sfr.core.assembly.SFRRod; import org.junit.Assert;
import java.util.*; import org.eclipse.ice.reactor.sfr.core.assembly.*; import org.junit.*;
[ "java.util", "org.eclipse.ice", "org.junit" ]
java.util; org.eclipse.ice; org.junit;
1,831,168
public static DateTime newDateTime(int year, int month, int day) { return newDateTime(newDate(year, month, day), 0, 0, 0); }
static DateTime function(int year, int month, int day) { return newDateTime(newDate(year, month, day), 0, 0, 0); }
/** * Creates new {@code DateTime} from given information. Time is set to 00:00:00. * * @param year the year to be stored * @param month the month to be stored * @param day the day to be stored * @return the new {@code DateTime} instance */
Creates new DateTime from given information. Time is set to 00:00:00
newDateTime
{ "repo_name": "sebbrudzinski/motech", "path": "platform/commons-date/src/main/java/org/motechproject/commons/date/util/DateUtil.java", "license": "bsd-3-clause", "size": 16668 }
[ "org.joda.time.DateTime" ]
import org.joda.time.DateTime;
import org.joda.time.*;
[ "org.joda.time" ]
org.joda.time;
2,401,390
File dbFile = context.getDatabasePath(databaseName); if (dbFile != null && !dbFile.exists()) { try { copyDatabase(dbFile); } catch (IOException e) { throw new RuntimeException("Error creating source database", e); } } return SQ...
File dbFile = context.getDatabasePath(databaseName); if (dbFile != null && !dbFile.exists()) { try { copyDatabase(dbFile); } catch (IOException e) { throw new RuntimeException(STR, e); } } return SQLiteDatabase.openDatabase(dbFile.getPath(), null, SQLiteDatabase.OPEN_READWRITE); }
/** * Create and/or open a database that will be used for reading and writing. * * @return * @throws RuntimeException if cannot copy database from assets * @throws SQLiteException if the database cannot be opened */
Create and/or open a database that will be used for reading and writing
getWritableDatabase
{ "repo_name": "yuhuayi/HexExamples", "path": "newbee/src/main/java/app/newbee/lib/util/AssetDatabaseOpenHelper.java", "license": "mit", "size": 2772 }
[ "android.database.sqlite.SQLiteDatabase", "java.io.File", "java.io.IOException" ]
import android.database.sqlite.SQLiteDatabase; import java.io.File; import java.io.IOException;
import android.database.sqlite.*; import java.io.*;
[ "android.database", "java.io" ]
android.database; java.io;
1,255,539
@Override public void setPartitionFilter(Expression arg0) throws IOException { }
void function(Expression arg0) throws IOException { }
/** * NOT IMPLEMENTED */
NOT IMPLEMENTED
setPartitionFilter
{ "repo_name": "canojim/elephant-bird", "path": "pig/src/main/java/com/twitter/elephantbird/pig/load/LzoW3CLogLoader.java", "license": "apache-2.0", "size": 3840 }
[ "java.io.IOException", "org.apache.pig.Expression" ]
import java.io.IOException; import org.apache.pig.Expression;
import java.io.*; import org.apache.pig.*;
[ "java.io", "org.apache.pig" ]
java.io; org.apache.pig;
91,834
public static ClickInventoryEvent.Drag createClickInventoryEventDrag(Cause cause, Transaction<ItemStackSnapshot> cursorTransaction, Container targetInventory, List<SlotTransaction> transactions) { HashMap<String, Object> values = new HashMap<>(); values.put("cause", cause); values.put("curso...
static ClickInventoryEvent.Drag function(Cause cause, Transaction<ItemStackSnapshot> cursorTransaction, Container targetInventory, List<SlotTransaction> transactions) { HashMap<String, Object> values = new HashMap<>(); values.put("cause", cause); values.put(STR, cursorTransaction); values.put(STR, targetInventory); val...
/** * AUTOMATICALLY GENERATED, DO NOT EDIT. * Creates a new instance of * {@link org.spongepowered.api.event.item.inventory.ClickInventoryEvent.Drag}. * * @param cause The cause * @param cursorTransaction The cursor transaction * @param targetInventory The target inventory * @par...
AUTOMATICALLY GENERATED, DO NOT EDIT. Creates a new instance of <code>org.spongepowered.api.event.item.inventory.ClickInventoryEvent.Drag</code>
createClickInventoryEventDrag
{ "repo_name": "kashike/SpongeAPI", "path": "src/main/java/org/spongepowered/api/event/SpongeEventFactory.java", "license": "mit", "size": 215110 }
[ "java.util.HashMap", "java.util.List", "org.spongepowered.api.data.Transaction", "org.spongepowered.api.event.cause.Cause", "org.spongepowered.api.event.item.inventory.ClickInventoryEvent", "org.spongepowered.api.item.inventory.Container", "org.spongepowered.api.item.inventory.ItemStackSnapshot", "org...
import java.util.HashMap; import java.util.List; import org.spongepowered.api.data.Transaction; import org.spongepowered.api.event.cause.Cause; import org.spongepowered.api.event.item.inventory.ClickInventoryEvent; import org.spongepowered.api.item.inventory.Container; import org.spongepowered.api.item.inventory.ItemSt...
import java.util.*; import org.spongepowered.api.data.*; import org.spongepowered.api.event.cause.*; import org.spongepowered.api.event.item.inventory.*; import org.spongepowered.api.item.inventory.*; import org.spongepowered.api.item.inventory.transaction.*;
[ "java.util", "org.spongepowered.api" ]
java.util; org.spongepowered.api;
1,946,770
public void setBackgroundBaseColor(int backgroundBaseColor) { this.backgroundBaseColor = backgroundBaseColor; invalidate(); } /** * Set a text color for month names. * Supported formats See {@link Color#parseColor(String)}
void function(int backgroundBaseColor) { this.backgroundBaseColor = backgroundBaseColor; invalidate(); } /** * Set a text color for month names. * Supported formats See {@link Color#parseColor(String)}
/** * Sets the background color for this contributions view. * * @param backgroundBaseColor * the color of the background */
Sets the background color for this contributions view
setBackgroundBaseColor
{ "repo_name": "k0shk0sh/FastHub", "path": "app/src/main/java/com/fastaccess/ui/widgets/contributions/GitHubContributionsView.java", "license": "gpl-3.0", "size": 13583 }
[ "android.graphics.Color" ]
import android.graphics.Color;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
1,764,050
public Collection getTemplateList() { try { AssessmentService delegate = new AssessmentService(); ArrayList list = delegate.getBasicInfoOfAllActiveAssessmentTemplates("title"); //ArrayList list = delegate.getAllAssessmentTemplates(); ArrayList templates = new ArrayList(); Iter...
Collection function() { try { AssessmentService delegate = new AssessmentService(); ArrayList list = delegate.getBasicInfoOfAllActiveAssessmentTemplates("title"); ArrayList templates = new ArrayList(); Iterator iter = list.iterator(); while (iter.hasNext()) { AssessmentTemplateFacade facade = (AssessmentTemplateFacade)...
/** * DOCUMENTATION PENDING * * @return DOCUMENTATION PENDING */
DOCUMENTATION PENDING
getTemplateList
{ "repo_name": "rodriguezdevera/sakai", "path": "samigo/samigo-app/src/java/org/sakaiproject/tool/assessment/ui/bean/author/IndexBean.java", "license": "apache-2.0", "size": 6561 }
[ "java.util.ArrayList", "java.util.Collection", "java.util.Iterator", "org.sakaiproject.tool.assessment.facade.AssessmentTemplateFacade", "org.sakaiproject.tool.assessment.services.assessment.AssessmentService" ]
import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; import org.sakaiproject.tool.assessment.facade.AssessmentTemplateFacade; import org.sakaiproject.tool.assessment.services.assessment.AssessmentService;
import java.util.*; import org.sakaiproject.tool.assessment.facade.*; import org.sakaiproject.tool.assessment.services.assessment.*;
[ "java.util", "org.sakaiproject.tool" ]
java.util; org.sakaiproject.tool;
1,312,750
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { mySqlHostDatabaseSettingLabel = new javax.swing.JLabel(); mySqlHostDatabaseSettingTextField = new javax.swing.JTextField(); mySqlU...
@SuppressWarnings(STR) void function() { mySqlHostDatabaseSettingLabel = new javax.swing.JLabel(); mySqlHostDatabaseSettingTextField = new javax.swing.JTextField(); mySqlUserNameDatabaseSettingLabel = new javax.swing.JLabel(); mySqlUserNameDatabaseSettingTextField = new javax.swing.JTextField(); mySqlPasswordDatabaseSe...
/** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */
This method is called from within the constructor to initialize the form. regenerated by the Form Editor
initComponents
{ "repo_name": "benzyaa/javaapplication", "path": "FreeBasicAccountManagement/src/main/java/com/freebasicacc/ui/SettingsInternalPanel.java", "license": "bsd-3-clause", "size": 18236 }
[ "javax.swing.JComboBox", "javax.swing.JPasswordField", "javax.swing.JTextField" ]
import javax.swing.JComboBox; import javax.swing.JPasswordField; import javax.swing.JTextField;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
362,918
public void testAbstractMethodPy3AddMeta() { runWithLanguageLevel(LanguageLevel.PYTHON34, () -> checkAbstract(".my_method", ".my_class_method")); }
void function() { runWithLanguageLevel(LanguageLevel.PYTHON34, () -> checkAbstract(STR, STR)); }
/** * Ensures that pulling abstract method up to class that has NO ABCMeta works correctly for py3k (metaclass is added) */
Ensures that pulling abstract method up to class that has NO ABCMeta works correctly for py3k (metaclass is added)
testAbstractMethodPy3AddMeta
{ "repo_name": "paplorinc/intellij-community", "path": "python/testSrc/com/jetbrains/python/refactoring/classes/pullUp/PyPullUpTest.java", "license": "apache-2.0", "size": 6079 }
[ "com.jetbrains.python.psi.LanguageLevel" ]
import com.jetbrains.python.psi.LanguageLevel;
import com.jetbrains.python.psi.*;
[ "com.jetbrains.python" ]
com.jetbrains.python;
321,463
public static boolean checkAuthHeader(String authHeader) { String url; RESTResponse restResponse; url= GeneralSettings.getXCodeBaseURL()+"bots"; try { HashMap<String,String> headers=new HashMap<String,String>(); headers.put("Authorization",authHeader); ...
static boolean function(String authHeader) { String url; RESTResponse restResponse; url= GeneralSettings.getXCodeBaseURL()+"bots"; try { HashMap<String,String> headers=new HashMap<String,String>(); headers.put(STR,authHeader); restResponse = RESTClient.sendHttpRequest(HTTPMethod.GET, url, headers, null); return (1==res...
/** * Check if an Authorization header are valid * @param authHeader Authorization header * @return true if header is valid, otherwise false. */
Check if an Authorization header are valid
checkAuthHeader
{ "repo_name": "DLTAStudio/xwebic", "path": "src/ServerWS/src/main/java/com/dltastudio/ws/TokenWS.java", "license": "apache-2.0", "size": 4815 }
[ "com.dltastudio.services.GeneralSettings", "com.dltastudio.services.HTTPMethod", "com.dltastudio.services.RESTClient", "com.dltastudio.services.RESTResponse", "java.util.HashMap" ]
import com.dltastudio.services.GeneralSettings; import com.dltastudio.services.HTTPMethod; import com.dltastudio.services.RESTClient; import com.dltastudio.services.RESTResponse; import java.util.HashMap;
import com.dltastudio.services.*; import java.util.*;
[ "com.dltastudio.services", "java.util" ]
com.dltastudio.services; java.util;
2,071,797
public void setFilters(final Collection<PotenzialflaecheSearch.FilterInfo> filters) { jPanel1.removeAll(); if (filters != null) { for (final PotenzialflaecheSearch.FilterInfo filter : filters) { final PotenzialflaechenWindowSearchSubPanel sub = new PotenzialflaechenWindow...
void function(final Collection<PotenzialflaecheSearch.FilterInfo> filters) { jPanel1.removeAll(); if (filters != null) { for (final PotenzialflaecheSearch.FilterInfo filter : filters) { final PotenzialflaechenWindowSearchSubPanel sub = new PotenzialflaechenWindowSearchSubPanel(this); sub.initWithConnectionContext(getCo...
/** * DOCUMENT ME! * * @param filters DOCUMENT ME! */
DOCUMENT ME
setFilters
{ "repo_name": "cismet/cids-custom-wuppertal", "path": "src/main/java/de/cismet/cids/custom/wunda_blau/search/PotenzialflaechenWindowSearchPanel.java", "license": "lgpl-3.0", "size": 14155 }
[ "de.cismet.cids.custom.wunda_blau.search.server.PotenzialflaecheSearch", "java.util.Collection" ]
import de.cismet.cids.custom.wunda_blau.search.server.PotenzialflaecheSearch; import java.util.Collection;
import de.cismet.cids.custom.wunda_blau.search.server.*; import java.util.*;
[ "de.cismet.cids", "java.util" ]
de.cismet.cids; java.util;
2,050,438
public void invalidateAll(Predicate<? super P> predicate) { final Set<AuthorizationContext<P>> keys = cache.asMap().keySet().stream() .filter(cacheKey -> predicate.test(cacheKey.getPrincipal())) .collect(Collectors.toSet()); cache.invalidateAll(keys); }
void function(Predicate<? super P> predicate) { final Set<AuthorizationContext<P>> keys = cache.asMap().keySet().stream() .filter(cacheKey -> predicate.test(cacheKey.getPrincipal())) .collect(Collectors.toSet()); cache.invalidateAll(keys); }
/** * Discards any cached role associations for principals satisfying * the given predicate. * * @param predicate a predicate to filter credentials */
Discards any cached role associations for principals satisfying the given predicate
invalidateAll
{ "repo_name": "mosoft521/dropwizard", "path": "dropwizard-auth/src/main/java/io/dropwizard/auth/CachingAuthorizer.java", "license": "apache-2.0", "size": 6445 }
[ "java.util.Set", "java.util.function.Predicate", "java.util.stream.Collectors" ]
import java.util.Set; import java.util.function.Predicate; import java.util.stream.Collectors;
import java.util.*; import java.util.function.*; import java.util.stream.*;
[ "java.util" ]
java.util;
1,432,235
@Override public Graphics create() { return new WPathGraphics((Graphics2D) getDelegate().create(), getPrinterJob(), getPrintable(), getPageFormat(), getPageIndex(), ...
Graphics function() { return new WPathGraphics((Graphics2D) getDelegate().create(), getPrinterJob(), getPrintable(), getPageFormat(), getPageIndex(), canDoRedraws()); }
/** * Creates a new <code>Graphics</code> object that is * a copy of this <code>Graphics</code> object. * @return a new graphics context that is a copy of * this graphics context. * @since 1.0 */
Creates a new <code>Graphics</code> object that is a copy of this <code>Graphics</code> object
create
{ "repo_name": "isaacl/openjdk-jdk", "path": "src/windows/classes/sun/awt/windows/WPathGraphics.java", "license": "gpl-2.0", "size": 75305 }
[ "java.awt.Graphics", "java.awt.Graphics2D" ]
import java.awt.Graphics; import java.awt.Graphics2D;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,836,792
protected boolean handleDirtyConflict() { return MessageDialog.openQuestion (getSite().getShell(), getString("_UI_FileConflict_label"), getString("_WARN_FileConflict")); } public XsdRulesEditor() { super(); initializeEditingDomain(); }
boolean function() { return MessageDialog.openQuestion (getSite().getShell(), getString(STR), getString(STR)); } public XsdRulesEditor() { super(); initializeEditingDomain(); }
/** * Shows a dialog that asks if conflicting changes should be discarded. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
Shows a dialog that asks if conflicting changes should be discarded.
handleDirtyConflict
{ "repo_name": "TristanFAURE/oclCheckTool", "path": "plugins/org.topcased.checktool.xsdrules.editor/src/org/topcased/checktool/xsdrules/xsdRules/presentation/XsdRulesEditor.java", "license": "epl-1.0", "size": 55302 }
[ "org.eclipse.jface.dialogs.MessageDialog" ]
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.dialogs.*;
[ "org.eclipse.jface" ]
org.eclipse.jface;
107,418
public void addInternalError(File file, String message) { addInternalError(new FileLocation(file), message); }
void function(File file, String message) { addInternalError(new FileLocation(file), message); }
/** * Adds an internal error message to the log. Internal errors are * only issued when possible bugs are encountered. They are * counted as errors. * * @param file the file affected * @param message the error message */
Adds an internal error message to the log. Internal errors are only issued when possible bugs are encountered. They are counted as errors
addInternalError
{ "repo_name": "tmoskun/JSNMPWalker", "path": "lib/mibble-2.9.3/src/java/net/percederberg/mibble/MibLoaderLog.java", "license": "gpl-3.0", "size": 13850 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
2,746,099
public void deleteKv(com.actiontech.dble.alarm.UcoreInterface.DeleteKvInput request, io.grpc.stub.StreamObserver<com.actiontech.dble.alarm.UcoreInterface.Empty> responseObserver) { asyncUnaryCall( getChannel().newCall(METHOD_DELETE_KV, getCallOptions()), request, responseObs...
void function(com.actiontech.dble.alarm.UcoreInterface.DeleteKvInput request, io.grpc.stub.StreamObserver<com.actiontech.dble.alarm.UcoreInterface.Empty> responseObserver) { asyncUnaryCall( getChannel().newCall(METHOD_DELETE_KV, getCallOptions()), request, responseObserver); }
/** * <pre> * DeleteKv guarantee atomic. * </pre> */
<code> DeleteKv guarantee atomic. </code>
deleteKv
{ "repo_name": "actiontech/dble", "path": "src/main/java/com/actiontech/dble/alarm/UcoreGrpc.java", "license": "gpl-2.0", "size": 134635 }
[ "io.grpc.stub.ClientCalls", "io.grpc.stub.ServerCalls" ]
import io.grpc.stub.ClientCalls; import io.grpc.stub.ServerCalls;
import io.grpc.stub.*;
[ "io.grpc.stub" ]
io.grpc.stub;
1,859,857
@Override public Deferred<Boolean> call(ArrayList<Object> validated) throws Exception { return getFromStorage(tsdb, UniqueId.stringToUid(tsuid)) .addCallbackDeferring(new StoreCB()); } } // Begins the callback chain by validating that the UID mappings exi...
Deferred<Boolean> function(ArrayList<Object> validated) throws Exception { return getFromStorage(tsdb, UniqueId.stringToUid(tsuid)) .addCallbackDeferring(new StoreCB()); } } return Deferred.group(uid_group).addCallbackDeferring(new ValidateCB(this)); }
/** * Called on UID mapping verification and continues executing the CAS * procedure. * @return Results from the {@link #StoreCB} callback */
Called on UID mapping verification and continues executing the CAS procedure
call
{ "repo_name": "manolama/opentsdb", "path": "src/meta/TSMeta.java", "license": "lgpl-2.1", "size": 41474 }
[ "com.stumbleupon.async.Deferred", "java.util.ArrayList", "net.opentsdb.uid.UniqueId" ]
import com.stumbleupon.async.Deferred; import java.util.ArrayList; import net.opentsdb.uid.UniqueId;
import com.stumbleupon.async.*; import java.util.*; import net.opentsdb.uid.*;
[ "com.stumbleupon.async", "java.util", "net.opentsdb.uid" ]
com.stumbleupon.async; java.util; net.opentsdb.uid;
2,524,593
public List<TDelete> getDeletes() { return this.deletes; }
List<TDelete> function() { return this.deletes; }
/** * list of TDeletes to delete */
list of TDeletes to delete
getDeletes
{ "repo_name": "Guavus/hbase", "path": "hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THBaseService.java", "license": "apache-2.0", "size": 597913 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,801,957
public int getIteration() { String iter = XMLUtils.getElementText(elementIteration); if (iter != null) { return Integer.parseInt(iter); } return DEFAULT_ITERATION; } /** * Get the hashed indicator. If the indicator is <code>true> the password of the * <...
int function() { String iter = XMLUtils.getElementText(elementIteration); if (iter != null) { return Integer.parseInt(iter); } return DEFAULT_ITERATION; } /** * Get the hashed indicator. If the indicator is <code>true> the password of the * <code>UsernameToken</code> was encoded using {@link WSConstants#PASSWORD_DIGEST...
/** * Get the Iteration value of this UsernameToken. * * @return Returns the Iteration value. If no Iteration was specified in the * username token the default value according to the specification * is returned. */
Get the Iteration value of this UsernameToken
getIteration
{ "repo_name": "apache/wss4j", "path": "ws-security-dom/src/main/java/org/apache/wss4j/dom/message/token/UsernameToken.java", "license": "apache-2.0", "size": 28595 }
[ "org.apache.wss4j.common.util.XMLUtils", "org.apache.wss4j.dom.WSConstants" ]
import org.apache.wss4j.common.util.XMLUtils; import org.apache.wss4j.dom.WSConstants;
import org.apache.wss4j.common.util.*; import org.apache.wss4j.dom.*;
[ "org.apache.wss4j" ]
org.apache.wss4j;
324,755
public static void zipDirectory(File sourceDirectory, OutputStream outputStream) throws IOException { checkNotNull(sourceDirectory); checkNotNull(outputStream); checkArgument( sourceDirectory.isDirectory(), "%s is not a valid directory", sourceDirectory.getAbsolutePath()); ...
static void function(File sourceDirectory, OutputStream outputStream) throws IOException { checkNotNull(sourceDirectory); checkNotNull(outputStream); checkArgument( sourceDirectory.isDirectory(), STR, sourceDirectory.getAbsolutePath()); ZipOutputStream zos = new ZipOutputStream(outputStream); for (File file : sourceDir...
/** * Zips an entire directory specified by the path. * * @param sourceDirectory the directory to read from. This directory and all subdirectories will * be added to the zip-file. The path within the zip file is relative to the directory given * as parameter, not absolute. * @param outputStrea...
Zips an entire directory specified by the path
zipDirectory
{ "repo_name": "rangadi/incubator-beam", "path": "sdks/java/core/src/main/java/org/apache/beam/sdk/util/ZipFiles.java", "license": "apache-2.0", "size": 10515 }
[ "com.google.common.base.Preconditions", "java.io.File", "java.io.IOException", "java.io.OutputStream", "java.util.zip.ZipOutputStream" ]
import com.google.common.base.Preconditions; import java.io.File; import java.io.IOException; import java.io.OutputStream; import java.util.zip.ZipOutputStream;
import com.google.common.base.*; import java.io.*; import java.util.zip.*;
[ "com.google.common", "java.io", "java.util" ]
com.google.common; java.io; java.util;
1,639,726
private static PersistenceUnitMetadata parsePU(XMLStreamReader reader, Version version, final PropertyReplacer propertyReplacer) throws XMLStreamException { PersistenceUnitMetadata pu = new PersistenceUnitMetadataImpl(); List<String> classes = new ArrayList<String>(1); List<String> jarFiles ...
static PersistenceUnitMetadata function(XMLStreamReader reader, Version version, final PropertyReplacer propertyReplacer) throws XMLStreamException { PersistenceUnitMetadata pu = new PersistenceUnitMetadataImpl(); List<String> classes = new ArrayList<String>(1); List<String> jarFiles = new ArrayList<String>(1); List<St...
/** * Parse the persistence unit definitions based on persistence_2_0.xsd. * * * @param reader * @param propertyReplacer * @return * @throws XMLStreamException */
Parse the persistence unit definitions based on persistence_2_0.xsd
parsePU
{ "repo_name": "jstourac/wildfly", "path": "jpa/subsystem/src/main/java/org/jboss/as/jpa/puparser/PersistenceUnitXmlParser.java", "license": "lgpl-2.1", "size": 13542 }
[ "java.util.ArrayList", "java.util.List", "java.util.Properties", "javax.persistence.SharedCacheMode", "javax.persistence.ValidationMode", "javax.persistence.spi.PersistenceUnitTransactionType", "javax.xml.stream.XMLStreamException", "javax.xml.stream.XMLStreamReader", "org.jboss.as.jpa.config.Config...
import java.util.ArrayList; import java.util.List; import java.util.Properties; import javax.persistence.SharedCacheMode; import javax.persistence.ValidationMode; import javax.persistence.spi.PersistenceUnitTransactionType; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import org....
import java.util.*; import javax.persistence.*; import javax.persistence.spi.*; import javax.xml.stream.*; import org.jboss.as.jpa.config.*; import org.jboss.metadata.property.*; import org.jipijapa.plugin.spi.*;
[ "java.util", "javax.persistence", "javax.xml", "org.jboss.as", "org.jboss.metadata", "org.jipijapa.plugin" ]
java.util; javax.persistence; javax.xml; org.jboss.as; org.jboss.metadata; org.jipijapa.plugin;
2,269,803
public PropertyGroup getPropertyGroup() { return propertyGroup; }
PropertyGroup function() { return propertyGroup; }
/** * Returns the property group. * Values for properties in this group can be stored in the value containers that are this properties values. * * @return the property group */
Returns the property group. Values for properties in this group can be stored in the value containers that are this properties values
getPropertyGroup
{ "repo_name": "ebourg/infonode", "path": "src/net/infonode/properties/types/PropertyGroupProperty.java", "license": "gpl-2.0", "size": 2488 }
[ "net.infonode.properties.base.PropertyGroup" ]
import net.infonode.properties.base.PropertyGroup;
import net.infonode.properties.base.*;
[ "net.infonode.properties" ]
net.infonode.properties;
21,117
public void recordDelegatedNotificationSmallIconFallback( @DelegatedNotificationSmallIconFallback int fallback) { RecordHistogram.recordEnumeratedHistogram( "TrustedWebActivity.DelegatedNotificationSmallIconFallback", fallback, DelegatedNotificationSmallIconFallba...
void function( @DelegatedNotificationSmallIconFallback int fallback) { RecordHistogram.recordEnumeratedHistogram( STR, fallback, DelegatedNotificationSmallIconFallback.NUM_ENTRIES); }
/** * Records which fallback (if any) was used for the small icon of a delegated notification. */
Records which fallback (if any) was used for the small icon of a delegated notification
recordDelegatedNotificationSmallIconFallback
{ "repo_name": "ric2b/Vivaldi-browser", "path": "chromium/chrome/browser/android/browserservices/metrics/java/src/org/chromium/chrome/browser/browserservices/metrics/TrustedWebActivityUmaRecorder.java", "license": "bsd-3-clause", "size": 10003 }
[ "org.chromium.base.metrics.RecordHistogram" ]
import org.chromium.base.metrics.RecordHistogram;
import org.chromium.base.metrics.*;
[ "org.chromium.base" ]
org.chromium.base;
788,540
public Observable<ServiceResponse<RouteFilterInner>> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String routeFilterName, RouteFilterInner routeFilterParameters) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is require...
Observable<ServiceResponse<RouteFilterInner>> function(String resourceGroupName, String routeFilterName, RouteFilterInner routeFilterParameters) { if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (routeFilterName == null) { throw new IllegalArgumentException(STR); } if (this.client.subscri...
/** * Creates or updates a route filter in a specified resource group. * * @param resourceGroupName The name of the resource group. * @param routeFilterName The name of the route filter. * @param routeFilterParameters Parameters supplied to the create or update route filter operation. * @t...
Creates or updates a route filter in a specified resource group
beginCreateOrUpdateWithServiceResponseAsync
{ "repo_name": "martinsawicki/azure-sdk-for-java", "path": "azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteFiltersInner.java", "license": "mit", "size": 69813 }
[ "com.microsoft.rest.ServiceResponse" ]
import com.microsoft.rest.ServiceResponse;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
1,289,178
private DefaultMutableTreeNode getRootNode() { return (DefaultMutableTreeNode) categoryTree.getModel().getRoot(); }
DefaultMutableTreeNode function() { return (DefaultMutableTreeNode) categoryTree.getModel().getRoot(); }
/** * Returns the root node of the category tree. * * @return root node of categoryTree */
Returns the root node of the category tree
getRootNode
{ "repo_name": "petebrew/fhaes", "path": "fhaes/src/main/java/org/fhaes/gui/CategoryEntryPanel.java", "license": "gpl-3.0", "size": 16167 }
[ "javax.swing.tree.DefaultMutableTreeNode" ]
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.*;
[ "javax.swing" ]
javax.swing;
2,463,996
public final <T> JaxBeanInfo<T> getBeanInfo(Class<T> clazz,boolean fatal) throws JAXBException { JaxBeanInfo<T> bi = getBeanInfo(clazz); if(bi!=null) return bi; if(fatal) throw new JAXBException(clazz.getName()+" is not known to this context"); return null; }
final <T> JaxBeanInfo<T> function(Class<T> clazz,boolean fatal) throws JAXBException { JaxBeanInfo<T> bi = getBeanInfo(clazz); if(bi!=null) return bi; if(fatal) throw new JAXBException(clazz.getName()+STR); return null; }
/** * Gets the {@link JaxBeanInfo} object that can handle * the given JAXB-bound class. * * @param fatal * if true, the failure to look up will throw an exception. * Otherwise it will just return null. */
Gets the <code>JaxBeanInfo</code> object that can handle the given JAXB-bound class
getBeanInfo
{ "repo_name": "openjdk/jdk7u", "path": "jaxws/src/share/jaxws_classes/com/sun/xml/internal/bind/v2/runtime/JAXBContextImpl.java", "license": "gpl-2.0", "size": 40024 }
[ "javax.xml.bind.JAXBException" ]
import javax.xml.bind.JAXBException;
import javax.xml.bind.*;
[ "javax.xml" ]
javax.xml;
625,381
protected byte[][] getComplexTypeKeyArray(int rowId) { byte[][] complexTypeData = new byte[complexParentBlockIndexes.length][]; for (int i = 0; i < complexTypeData.length; i++) { GenericQueryType genericQueryType = complexParentIndexToQueryMap.get(complexParentBlockIndexes[i]); ByteArray...
byte[][] function(int rowId) { byte[][] complexTypeData = new byte[complexParentBlockIndexes.length][]; for (int i = 0; i < complexTypeData.length; i++) { GenericQueryType genericQueryType = complexParentIndexToQueryMap.get(complexParentBlockIndexes[i]); ByteArrayOutputStream byteStream = new ByteArrayOutputStream(); D...
/** * Below method will be used to get the complex type keys array based * on row id for all the complex type dimension selected in query * * @param rowId row number * @return complex type key array for all the complex dimension selected in query */
Below method will be used to get the complex type keys array based on row id for all the complex type dimension selected in query
getComplexTypeKeyArray
{ "repo_name": "foryou2030/incubator-carbondata", "path": "core/src/main/java/org/apache/carbondata/scan/result/AbstractScannedResult.java", "license": "apache-2.0", "size": 13984 }
[ "java.io.ByteArrayOutputStream", "java.io.DataOutputStream", "java.io.IOException", "org.apache.carbondata.core.util.CarbonUtil", "org.apache.carbondata.scan.filter.GenericQueryType" ]
import java.io.ByteArrayOutputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.carbondata.core.util.CarbonUtil; import org.apache.carbondata.scan.filter.GenericQueryType;
import java.io.*; import org.apache.carbondata.core.util.*; import org.apache.carbondata.scan.filter.*;
[ "java.io", "org.apache.carbondata" ]
java.io; org.apache.carbondata;
2,851,040
protected StatusResponse parseResponse(String line) throws ProtocolException { return parseResponse(line, false); }
StatusResponse function(String line) throws ProtocolException { return parseResponse(line, false); }
/** * Parse a response object from a response line sent by the server. */
Parse a response object from a response line sent by the server
parseResponse
{ "repo_name": "SeekingFor/jfniki", "path": "alien/src/gnu/inet/nntp/NNTPConnection.java", "license": "gpl-2.0", "size": 42972 }
[ "java.net.ProtocolException" ]
import java.net.ProtocolException;
import java.net.*;
[ "java.net" ]
java.net;
1,708,299
public static void zip(File input, String pathWithinArchive, File output) throws IOException { try (ZipOutputStream zipStream = new ZipOutputStream(new BufferedOutputStream(new FileOutputStream(output)))) { zipStream.setMethod(ZipOutputStream.DEFLATED); zipStream.setLevel(9); zipStream.putNextEntry(new Zi...
static void function(File input, String pathWithinArchive, File output) throws IOException { try (ZipOutputStream zipStream = new ZipOutputStream(new BufferedOutputStream(new FileOutputStream(output)))) { zipStream.setMethod(ZipOutputStream.DEFLATED); zipStream.setLevel(9); zipStream.putNextEntry(new ZipEntry(pathWithi...
/** * Creates a single-entry zip file. * * @param input an uncompressed file * @param pathWithinArchive the path within the archive * @param output the new zip file it will be compressed into */
Creates a single-entry zip file
zip
{ "repo_name": "diffplug/goomph", "path": "src/main/java/com/diffplug/gradle/ZipMisc.java", "license": "apache-2.0", "size": 6903 }
[ "java.io.BufferedInputStream", "java.io.BufferedOutputStream", "java.io.File", "java.io.FileInputStream", "java.io.FileOutputStream", "java.io.IOException", "java.util.zip.ZipEntry", "java.util.zip.ZipOutputStream" ]
import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.util.zip.ZipEntry; import java.util.zip.ZipOutputStream;
import java.io.*; import java.util.zip.*;
[ "java.io", "java.util" ]
java.io; java.util;
864,539
void calculateFilteredData(Entity entity);
void calculateFilteredData(Entity entity);
/** * Calculate filtered data * @param entity for which will calculate filtered data */
Calculate filtered data
calculateFilteredData
{ "repo_name": "dimone-kun/cuba", "path": "modules/core/src/com/haulmont/cuba/core/PersistenceSecurity.java", "license": "apache-2.0", "size": 3959 }
[ "com.haulmont.cuba.core.entity.Entity" ]
import com.haulmont.cuba.core.entity.Entity;
import com.haulmont.cuba.core.entity.*;
[ "com.haulmont.cuba" ]
com.haulmont.cuba;
2,259,805
public NodeEnvironment getNodeEnvironment() { return nodeEnvironment; }
NodeEnvironment function() { return nodeEnvironment; }
/** * Returns the {@link NodeEnvironment} instance of this node */
Returns the <code>NodeEnvironment</code> instance of this node
getNodeEnvironment
{ "repo_name": "crate/crate", "path": "server/src/main/java/org/elasticsearch/node/Node.java", "license": "apache-2.0", "size": 63492 }
[ "org.elasticsearch.env.NodeEnvironment" ]
import org.elasticsearch.env.NodeEnvironment;
import org.elasticsearch.env.*;
[ "org.elasticsearch.env" ]
org.elasticsearch.env;
1,609,419
@ApiMethod( name = "getConferencesCreated", path = "getConferencesCreated", httpMethod = HttpMethod.POST ) public List<Conference> getConferencesCreated(final User user) throws UnauthorizedException { // If not signed in, throw a 401 error. if (user == nul...
@ApiMethod( name = STR, path = STR, httpMethod = HttpMethod.POST ) List<Conference> function(final User user) throws UnauthorizedException { if (user == null) { throw new UnauthorizedException(STR); } String userId = user.getUserId(); Key<Profile> userKey = Key.create(Profile.class, userId); return ofy().load().type(Co...
/** * Returns a list of Conferences that the user created. * In order to receive the websafeConferenceKey via the JSON params, uses a POST method. * * @param user A user who invokes this method, null when the user is not signed in. * @return a list of Conferences that the user created. * @...
Returns a list of Conferences that the user created. In order to receive the websafeConferenceKey via the JSON params, uses a POST method
getConferencesCreated
{ "repo_name": "GoogleCloudPlatformTraining/cpd200-conference-central-java", "path": "solutions/REF_08_ConferenceApi.java", "license": "apache-2.0", "size": 11328 }
[ "com.google.api.server.spi.config.ApiMethod", "com.google.api.server.spi.response.UnauthorizedException", "com.google.appengine.api.users.User", "com.google.training.cpd200.conference.domain.Conference", "com.google.training.cpd200.conference.domain.Profile", "com.google.training.cpd200.conference.service...
import com.google.api.server.spi.config.ApiMethod; import com.google.api.server.spi.response.UnauthorizedException; import com.google.appengine.api.users.User; import com.google.training.cpd200.conference.domain.Conference; import com.google.training.cpd200.conference.domain.Profile; import com.google.training.cpd200.c...
import com.google.api.server.spi.config.*; import com.google.api.server.spi.response.*; import com.google.appengine.api.users.*; import com.google.training.cpd200.conference.domain.*; import com.google.training.cpd200.conference.service.*; import com.googlecode.objectify.*; import java.util.*;
[ "com.google.api", "com.google.appengine", "com.google.training", "com.googlecode.objectify", "java.util" ]
com.google.api; com.google.appengine; com.google.training; com.googlecode.objectify; java.util;
211,224
@Test public void test_validateException_emptyExpectations() { try { Exception exceptionToValidate = new Exception(exceptionMsg); Expectations expectations = new Expectations(); utils.validateResult(exceptionToValidate, action, expectations); assertStrin...
void function() { try { Exception exceptionToValidate = new Exception(exceptionMsg); Expectations expectations = new Expectations(); utils.validateResult(exceptionToValidate, action, expectations); assertStringNotInTrace(outputMgr, "Error"); assertRegexNotInTrace(outputMgr, STR); } catch (Throwable t) { outputMgr.failW...
/** * Tests: * - Provided Expectation object is empty * Expects: * - Nothing should happen */
Tests: - Provided Expectation object is empty Expects: - Nothing should happen
test_validateException_emptyExpectations
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.ws.security.fat.common/test/com/ibm/ws/security/fat/common/validation/TestValidationUtilsTest.java", "license": "epl-1.0", "size": 91503 }
[ "com.ibm.ws.security.fat.common.expectations.Expectations" ]
import com.ibm.ws.security.fat.common.expectations.Expectations;
import com.ibm.ws.security.fat.common.expectations.*;
[ "com.ibm.ws" ]
com.ibm.ws;
2,393,303
@Nonnull public static <T extends EntityEvent> Predicate<T> entityHasMetadata(MetadataKey<?> key) { return e -> Metadata.provideForEntity(e.getEntity()).has(key); }
static <T extends EntityEvent> Predicate<T> function(MetadataKey<?> key) { return e -> Metadata.provideForEntity(e.getEntity()).has(key); }
/** * Returns a predicate which only returns true if the entity has a given metadata key * * @param key the metadata key * @param <T> the event type * @return a predicate which only returns true if the entity has a given metadata key */
Returns a predicate which only returns true if the entity has a given metadata key
entityHasMetadata
{ "repo_name": "lucko/helper", "path": "helper/src/main/java/me/lucko/helper/event/filter/EventFilters.java", "license": "mit", "size": 7551 }
[ "java.util.function.Predicate", "me.lucko.helper.metadata.Metadata", "me.lucko.helper.metadata.MetadataKey", "org.bukkit.event.entity.EntityEvent" ]
import java.util.function.Predicate; import me.lucko.helper.metadata.Metadata; import me.lucko.helper.metadata.MetadataKey; import org.bukkit.event.entity.EntityEvent;
import java.util.function.*; import me.lucko.helper.metadata.*; import org.bukkit.event.entity.*;
[ "java.util", "me.lucko.helper", "org.bukkit.event" ]
java.util; me.lucko.helper; org.bukkit.event;
1,173,744
public Point getBottomRightCorner() { final int x = getWidth() - 1; final int y = getHeight() - 1; return new Point(x, y); }
Point function() { final int x = getWidth() - 1; final int y = getHeight() - 1; return new Point(x, y); }
/** * Returns the logical coordinates of the pixel on the inside * of the panel's bottom right corner. * * @return a new Point object indicating the coordinates (never null) */
Returns the logical coordinates of the pixel on the inside of the panel's bottom right corner
getBottomRightCorner
{ "repo_name": "stephengold/gold-tiles", "path": "Java/GoldTile/src/goldtile/GamePanel.java", "license": "gpl-3.0", "size": 15967 }
[ "java.awt.Point" ]
import java.awt.Point;
import java.awt.*;
[ "java.awt" ]
java.awt;
556,725
super.init(); //log into broker driver.get(getLoginURL()); LoginPage loginPage = new LoginPage(driver); homePage = loginPage.loginAs(getCurrentUserName(), getCurrentPassword()); }
super.init(); driver.get(getLoginURL()); LoginPage loginPage = new LoginPage(driver); homePage = loginPage.loginAs(getCurrentUserName(), getCurrentPassword()); }
/** * Initialises the test case. * * @throws AutomationUtilException * @throws XPathExpressionException * @throws MalformedURLException */
Initialises the test case
init
{ "repo_name": "wso2/product-ei", "path": "integration/broker-tests/tests-ui-integration/src/test/java/org/wso2/carbon/mb/ui/test/subscriptions/SubscriptionDeleteTestCase.java", "license": "apache-2.0", "size": 17098 }
[ "org.wso2.mb.integration.common.utils.ui.pages.login.LoginPage" ]
import org.wso2.mb.integration.common.utils.ui.pages.login.LoginPage;
import org.wso2.mb.integration.common.utils.ui.pages.login.*;
[ "org.wso2.mb" ]
org.wso2.mb;
2,669,621
@Nullable public EducationRoot put(@Nonnull final EducationRoot newEducationRoot) throws ClientException { return send(HttpMethod.PUT, newEducationRoot); }
EducationRoot function(@Nonnull final EducationRoot newEducationRoot) throws ClientException { return send(HttpMethod.PUT, newEducationRoot); }
/** * Creates a EducationRoot with a new object * * @param newEducationRoot the object to create/update * @return the created EducationRoot * @throws ClientException this exception occurs if the request was unable to complete for any reason */
Creates a EducationRoot with a new object
put
{ "repo_name": "microsoftgraph/msgraph-sdk-java", "path": "src/main/java/com/microsoft/graph/requests/EducationRootRequest.java", "license": "mit", "size": 6253 }
[ "com.microsoft.graph.core.ClientException", "com.microsoft.graph.http.HttpMethod", "com.microsoft.graph.models.EducationRoot", "javax.annotation.Nonnull" ]
import com.microsoft.graph.core.ClientException; import com.microsoft.graph.http.HttpMethod; import com.microsoft.graph.models.EducationRoot; import javax.annotation.Nonnull;
import com.microsoft.graph.core.*; import com.microsoft.graph.http.*; import com.microsoft.graph.models.*; import javax.annotation.*;
[ "com.microsoft.graph", "javax.annotation" ]
com.microsoft.graph; javax.annotation;
2,851,615
public int numDocs(Query a, Query b) throws IOException { Query absA = QueryUtils.getAbs(a); Query absB = QueryUtils.getAbs(b); DocSet positiveA = getPositiveDocSet(absA); DocSet positiveB = getPositiveDocSet(absB); // Negative query if absolute value different from original if (a==absA)...
int function(Query a, Query b) throws IOException { Query absA = QueryUtils.getAbs(a); Query absB = QueryUtils.getAbs(b); DocSet positiveA = getPositiveDocSet(absA); DocSet positiveB = getPositiveDocSet(absB); if (a==absA) { if (b==absB) return positiveA.intersectionSize(positiveB); return positiveA.andNotSize(positive...
/** * Returns the number of documents that match both <code>a</code> and <code>b</code>. * <p> * This method is cache-aware and may check as well as modify the cache. * * @return the number of documents in the intersection between <code>a</code> and <code>b</code>. * @throws IOException If there is a ...
Returns the number of documents that match both <code>a</code> and <code>b</code>. This method is cache-aware and may check as well as modify the cache
numDocs
{ "repo_name": "visouza/solr-5.0.0", "path": "solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java", "license": "apache-2.0", "size": 93382 }
[ "java.io.IOException", "org.apache.lucene.search.Query" ]
import java.io.IOException; import org.apache.lucene.search.Query;
import java.io.*; import org.apache.lucene.search.*;
[ "java.io", "org.apache.lucene" ]
java.io; org.apache.lucene;
2,020,705
protected void fullyIdentifyCurrentUser() throws OsmTransferException { getProgressMonitor().indeterminateSubTask(tr("Determine user id for current user...")); synchronized(this) { userInfoReader = new OsmServerUserInfoReader(); } UserInfo info = userInfoReader.fetchUser...
void function() throws OsmTransferException { getProgressMonitor().indeterminateSubTask(tr(STR)); synchronized(this) { userInfoReader = new OsmServerUserInfoReader(); } UserInfo info = userInfoReader.fetchUserInfo(getProgressMonitor().createSubTaskMonitor(1,false)); synchronized(this) { userInfoReader = null; } JosmUse...
/** * Tries to fully identify the current JOSM user * * @throws OsmTransferException thrown if something went wrong */
Tries to fully identify the current JOSM user
fullyIdentifyCurrentUser
{ "repo_name": "CURocketry/Ground_Station_GUI", "path": "src/org/openstreetmap/josm/gui/dialogs/changeset/query/ChangesetQueryTask.java", "license": "gpl-3.0", "size": 8416 }
[ "org.openstreetmap.josm.data.osm.UserInfo", "org.openstreetmap.josm.gui.JosmUserIdentityManager", "org.openstreetmap.josm.io.OsmServerUserInfoReader", "org.openstreetmap.josm.io.OsmTransferException" ]
import org.openstreetmap.josm.data.osm.UserInfo; import org.openstreetmap.josm.gui.JosmUserIdentityManager; import org.openstreetmap.josm.io.OsmServerUserInfoReader; import org.openstreetmap.josm.io.OsmTransferException;
import org.openstreetmap.josm.data.osm.*; import org.openstreetmap.josm.gui.*; import org.openstreetmap.josm.io.*;
[ "org.openstreetmap.josm" ]
org.openstreetmap.josm;
1,617,610
InputStream in = null; BufferedInputStream bis = null; Document doc = null; try { in = documentF.getInputStream(); bis = new BufferedInputStream(in); XMLParser xmlParser = new XMLParser(new IMSEntityResolver()); doc = xmlParser.parse(bis, false); } catch (Exception e) { return null; } finally { ...
InputStream in = null; BufferedInputStream bis = null; Document doc = null; try { in = documentF.getInputStream(); bis = new BufferedInputStream(in); XMLParser xmlParser = new XMLParser(new IMSEntityResolver()); doc = xmlParser.parse(bis, false); } catch (Exception e) { return null; } finally { try { if (in != null) in...
/** * Reads an IMS XML Document if supported by /org/olat/ims/resources. * @param documentF * @return document */
Reads an IMS XML Document if supported by /org/olat/ims/resources
loadIMSDocument
{ "repo_name": "stevenhva/InfoLearn_OpenOLAT", "path": "src/main/java/org/olat/ims/resources/IMSLoader.java", "license": "apache-2.0", "size": 2868 }
[ "java.io.BufferedInputStream", "java.io.InputStream", "org.dom4j.Document", "org.olat.core.util.xml.XMLParser" ]
import java.io.BufferedInputStream; import java.io.InputStream; import org.dom4j.Document; import org.olat.core.util.xml.XMLParser;
import java.io.*; import org.dom4j.*; import org.olat.core.util.xml.*;
[ "java.io", "org.dom4j", "org.olat.core" ]
java.io; org.dom4j; org.olat.core;
1,126,549
private File resolveFileFromPath(String filename) { File f = new File(filename); if (f.isAbsolute() || f.exists()) { return f; } else { return new File(base, filename); } }
File function(String filename) { File f = new File(filename); if (f.isAbsolute() f.exists()) { return f; } else { return new File(base, filename); } }
/** * Resolves file name into {@link File} instance. * When filename is not absolute and not found from current workind dir, * it tries to find it under current base directory * @param filename original file name * @return {@link File} instance */
Resolves file name into <code>File</code> instance. When filename is not absolute and not found from current workind dir, it tries to find it under current base directory
resolveFileFromPath
{ "repo_name": "DoctorQ/jmeter", "path": "src/core/org/apache/jmeter/services/FileServer.java", "license": "apache-2.0", "size": 22886 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
2,718,782
public MiniHBaseCluster startMiniCluster(final int numMasters, final int numSlaves, final int numDataNodes) throws Exception { return startMiniCluster(numMasters, numSlaves, numDataNodes, null, null, null); } /** * Start up a minicluster of hbase, optionally dfs, and zookeeper. * Modifies Configu...
MiniHBaseCluster function(final int numMasters, final int numSlaves, final int numDataNodes) throws Exception { return startMiniCluster(numMasters, numSlaves, numDataNodes, null, null, null); } /** * Start up a minicluster of hbase, optionally dfs, and zookeeper. * Modifies Configuration. Homes the cluster data directo...
/** * Same as {@link #startMiniCluster(int, int)}, but with custom number of datanodes. * @param numDataNodes Number of data nodes. */
Same as <code>#startMiniCluster(int, int)</code>, but with custom number of datanodes
startMiniCluster
{ "repo_name": "toshimasa-nasu/hbase", "path": "hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java", "license": "apache-2.0", "size": 134883 }
[ "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.hbase.master.HMaster", "org.apache.hadoop.hbase.regionserver.HRegionServer", "org.apache.hadoop.hdfs.MiniDFSCluster" ]
import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.master.HMaster; import org.apache.hadoop.hbase.regionserver.HRegionServer; import org.apache.hadoop.hdfs.MiniDFSCluster;
import org.apache.hadoop.conf.*; import org.apache.hadoop.hbase.master.*; import org.apache.hadoop.hbase.regionserver.*; import org.apache.hadoop.hdfs.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,981,078
public void downloadUninterrupted() throws IOException { try { download(); } catch (InterruptedException ignored) { } }
void function() throws IOException { try { download(); } catch (InterruptedException ignored) { } }
/** * Helper function for synchronous downloads (i.e. those *not* using AsyncDownloadWrapper), * which don't really want to bother dealing with an InterruptedException. * The InterruptedException thrown from download() is there to enable cancelling asynchronous * downloads, but regular synchronous d...
Helper function for synchronous downloads (i.e. those *not* using AsyncDownloadWrapper), which don't really want to bother dealing with an InterruptedException. The InterruptedException thrown from download() is there to enable cancelling asynchronous downloads, but regular synchronous downloads cannot be cancelled bec...
downloadUninterrupted
{ "repo_name": "JTechMe/AppHub", "path": "f-droid/src/com/jtechme/apphub/net/Downloader.java", "license": "gpl-2.0", "size": 8782 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,303,589
public static boolean checkNavigationCategory(Category categoryToCheck) { Context mContext = OmniNotes.getAppContext(); String[] navigationListCodes = mContext.getResources().getStringArray(R.array.navigation_list_codes); String navigation = mContext.getSharedPreferences(Constants.PREFS_NAME...
static boolean function(Category categoryToCheck) { Context mContext = OmniNotes.getAppContext(); String[] navigationListCodes = mContext.getResources().getStringArray(R.array.navigation_list_codes); String navigation = mContext.getSharedPreferences(Constants.PREFS_NAME, Context.MODE_MULTI_PROCESS).getString(Constants....
/** * Checks if passed parameters is the category user is actually navigating in */
Checks if passed parameters is the category user is actually navigating in
checkNavigationCategory
{ "repo_name": "jfreax/Omni-Notes", "path": "omniNotes/src/main/java/it/feio/android/omninotes/utils/Navigation.java", "license": "gpl-3.0", "size": 4250 }
[ "android.content.Context", "it.feio.android.omninotes.OmniNotes", "it.feio.android.omninotes.models.Category" ]
import android.content.Context; import it.feio.android.omninotes.OmniNotes; import it.feio.android.omninotes.models.Category;
import android.content.*; import it.feio.android.omninotes.*; import it.feio.android.omninotes.models.*;
[ "android.content", "it.feio.android" ]
android.content; it.feio.android;
1,041,495
public final void setReferenceSetAugmentor(ReferenceSetAugmentor rse) { this.referenceSetAugmentor = rse; }
final void function(ReferenceSetAugmentor rse) { this.referenceSetAugmentor = rse; }
/** * Inject the ReferenceSetAugmentor used to translate or construct new * ExternalReferenceSPI instances within a ReferenceSet */
Inject the ReferenceSetAugmentor used to translate or construct new ExternalReferenceSPI instances within a ReferenceSet
setReferenceSetAugmentor
{ "repo_name": "apache/incubator-taverna-engine", "path": "taverna-reference-impl/src/main/java/org/apache/taverna/reference/impl/AbstractReferenceSetServiceImpl.java", "license": "apache-2.0", "size": 5248 }
[ "org.apache.taverna.reference.ReferenceSetAugmentor" ]
import org.apache.taverna.reference.ReferenceSetAugmentor;
import org.apache.taverna.reference.*;
[ "org.apache.taverna" ]
org.apache.taverna;
605,038
public KafkaRestProperties withConfigurationOverride(Map<String, String> configurationOverride) { this.configurationOverride = configurationOverride; return this; }
KafkaRestProperties function(Map<String, String> configurationOverride) { this.configurationOverride = configurationOverride; return this; }
/** * Set the configurationOverride property: The configurations that need to be overriden. * * @param configurationOverride the configurationOverride value to set. * @return the KafkaRestProperties object itself. */
Set the configurationOverride property: The configurations that need to be overriden
withConfigurationOverride
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/hdinsight/azure-resourcemanager-hdinsight/src/main/java/com/azure/resourcemanager/hdinsight/models/KafkaRestProperties.java", "license": "mit", "size": 2725 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,593,394
@ServiceMethod(returns = ReturnType.SINGLE) private PollerFlux<PollResult<Void>, Void> beginDeleteAsync( String resourceGroupName, String resourceName, Context context) { context = this.client.mergeContext(context); Mono<Response<Flux<ByteBuffer>>> mono = deleteWithResponseAsync(resource...
@ServiceMethod(returns = ReturnType.SINGLE) PollerFlux<PollResult<Void>, Void> function( String resourceGroupName, String resourceName, Context context) { context = this.client.mergeContext(context); Mono<Response<Flux<ByteBuffer>>> mono = deleteWithResponseAsync(resourceGroupName, resourceName, context); return this ....
/** * Deletes the OpenShift managed cluster with a specified resource group and name. * * @param resourceGroupName The name of the resource group. * @param resourceName The name of the OpenShift managed cluster resource. * @param context The context to associate with this operation. * @thr...
Deletes the OpenShift managed cluster with a specified resource group and name
beginDeleteAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-containerservice/src/main/java/com/azure/resourcemanager/containerservice/implementation/OpenShiftManagedClustersClientImpl.java", "license": "mit", "size": 77211 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.management.polling.PollResult", "com.azure.core.util.Context", "com.azure.core.util.polling.PollerFlux", "java.nio.ByteBuffer" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.PollerFlux; import java.nio.ByteBuffer;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.management.polling.*; import com.azure.core.util.*; import com.azure.core.util.polling.*; import java.nio.*;
[ "com.azure.core", "java.nio" ]
com.azure.core; java.nio;
1,240,108
public void createOverlapOfFirstAndSecondInList() { Calendar calendar = Calendar.getInstance(); calendar.add(Calendar.MONTH, SIX); calendar.add(Calendar.YEAR, 1); award.getAwardDirectFandADistributions().get(0).setEndDate(new Date(calendar.getTime().getTime())); }
void function() { Calendar calendar = Calendar.getInstance(); calendar.add(Calendar.MONTH, SIX); calendar.add(Calendar.YEAR, 1); award.getAwardDirectFandADistributions().get(0).setEndDate(new Date(calendar.getTime().getTime())); }
/** * This method creates an overlap of dates for testing rule method will fail. */
This method creates an overlap of dates for testing rule method will fail
createOverlapOfFirstAndSecondInList
{ "repo_name": "rashikpolus/MIT_KC", "path": "coeus-impl/src/test/java/org/kuali/kra/award/timeandmoney/AwardDirectFandADistributionRuleTest.java", "license": "agpl-3.0", "size": 9371 }
[ "java.sql.Date", "java.util.Calendar" ]
import java.sql.Date; import java.util.Calendar;
import java.sql.*; import java.util.*;
[ "java.sql", "java.util" ]
java.sql; java.util;
382,992
protected List<String> getExcludedVendorChoiceCodes() { List<String> excludedVendorChoiceCodes = new ArrayList<String>(); for (int i = 0; i < PurapConstants.AUTO_CLOSE_EXCLUSION_VNDR_CHOICE_CODES.length; i++) { String excludedCode = PurapConstants.AUTO_CLOSE_EXCLUSION_VNDR_CHOICE_CODES[i...
List<String> function() { List<String> excludedVendorChoiceCodes = new ArrayList<String>(); for (int i = 0; i < PurapConstants.AUTO_CLOSE_EXCLUSION_VNDR_CHOICE_CODES.length; i++) { String excludedCode = PurapConstants.AUTO_CLOSE_EXCLUSION_VNDR_CHOICE_CODES[i]; excludedVendorChoiceCodes.add(excludedCode); } return exclu...
/** * Gets a List of excluded vendor choice codes from PurapConstants. * * @return a List of excluded vendor choice codes */
Gets a List of excluded vendor choice codes from PurapConstants
getExcludedVendorChoiceCodes
{ "repo_name": "Ariah-Group/Finance", "path": "af_webapp/src/main/java/org/kuali/kfs/module/purap/document/service/impl/PurchaseOrderServiceImpl.java", "license": "apache-2.0", "size": 122012 }
[ "java.util.ArrayList", "java.util.List", "org.kuali.kfs.module.purap.PurapConstants" ]
import java.util.ArrayList; import java.util.List; import org.kuali.kfs.module.purap.PurapConstants;
import java.util.*; import org.kuali.kfs.module.purap.*;
[ "java.util", "org.kuali.kfs" ]
java.util; org.kuali.kfs;
958,544
void registerDirectActions() { registerCommonChromeActions(mContext, mActivityType, mMenuOrKeyboardActionController, mGoBackAction, mTabModelSelector, mFindToolbarManager, AutofillAssistantFacade.areDirectActionsAvailable(mActivityType) ? mBottomSheetC...
void registerDirectActions() { registerCommonChromeActions(mContext, mActivityType, mMenuOrKeyboardActionController, mGoBackAction, mTabModelSelector, mFindToolbarManager, AutofillAssistantFacade.areDirectActionsAvailable(mActivityType) ? mBottomSheetController : null, mBrowserControls, mCompositorViewHolder, mActivity...
/** * Registers the set of direct actions available to assist apps. */
Registers the set of direct actions available to assist apps
registerDirectActions
{ "repo_name": "ric2b/Vivaldi-browser", "path": "chromium/chrome/android/java/src/org/chromium/chrome/browser/directactions/DirectActionInitializer.java", "license": "bsd-3-clause", "size": 10662 }
[ "org.chromium.chrome.browser.autofill_assistant.AutofillAssistantFacade", "org.chromium.chrome.browser.flags.ActivityType" ]
import org.chromium.chrome.browser.autofill_assistant.AutofillAssistantFacade; import org.chromium.chrome.browser.flags.ActivityType;
import org.chromium.chrome.browser.autofill_assistant.*; import org.chromium.chrome.browser.flags.*;
[ "org.chromium.chrome" ]
org.chromium.chrome;
1,239,589
public Map<String, NodeList> getXmlAnnotations() { return xmlAnnotations; }
Map<String, NodeList> function() { return xmlAnnotations; }
/** * Returns a {@link Map} of <annotation-xml/> elements, keyed on the "encoding" attribute with the * {@link NodeList} content as values. */
Returns a <code>Map</code> of elements, keyed on the "encoding" attribute with the <code>NodeList</code> content as values
getXmlAnnotations
{ "repo_name": "axkr/symja_android_library", "path": "symja_android_library/matheclipse-external/src/main/java/uk/ac/ed/ph/snuggletex/utilities/UnwrappedParallelMathMLDOM.java", "license": "gpl-3.0", "size": 2115 }
[ "java.util.Map", "org.w3c.dom.NodeList" ]
import java.util.Map; import org.w3c.dom.NodeList;
import java.util.*; import org.w3c.dom.*;
[ "java.util", "org.w3c.dom" ]
java.util; org.w3c.dom;
1,128,196
private void inlineFunction( NodeTraversal t, Node callNode, FunctionState fs, InliningMode mode) { Function fn = fs.getFn(); String fnName = fn.getName(); Node fnNode = fs.getSafeFnNode(); injector.inline(callNode, fnName, fnNode, mode); t.getCompiler().reportCodeChange(); ...
void function( NodeTraversal t, Node callNode, FunctionState fs, InliningMode mode) { Function fn = fs.getFn(); String fnName = fn.getName(); Node fnNode = fs.getSafeFnNode(); injector.inline(callNode, fnName, fnNode, mode); t.getCompiler().reportCodeChange(); t.getCompiler().addToDebugLog(STR + fn.getName()); } }
/** * Inline a function into the call site. */
Inline a function into the call site
inlineFunction
{ "repo_name": "weitzj/closure-compiler", "path": "src/com/google/javascript/jscomp/InlineFunctions.java", "license": "apache-2.0", "size": 34729 }
[ "com.google.javascript.jscomp.FunctionInjector", "com.google.javascript.rhino.Node" ]
import com.google.javascript.jscomp.FunctionInjector; import com.google.javascript.rhino.Node;
import com.google.javascript.jscomp.*; import com.google.javascript.rhino.*;
[ "com.google.javascript" ]
com.google.javascript;
187,441
public static SpannableStringBuilder getSpannablePriceNewText(Context context, String text) { String[] result = text.split(":"); String first = result[0]; String second = result[1]; first = first.concat(":"); // Typeface font = Typeface.createFromAsset(context.getAssets(), "...
static SpannableStringBuilder function(Context context, String text) { String[] result = text.split(":"); String first = result[0]; String second = result[1]; first = first.concat(":"); SpannableStringBuilder builder = new SpannableStringBuilder(); SpannableString dkgraySpannable = new SpannableString(first + ""); buil...
/** * Set string with spannable. * * @return: string with two different color */
Set string with spannable
getSpannablePriceNewText
{ "repo_name": "QuixomTech/DeviceInfo", "path": "app/src/main/java/com/quixom/apps/deviceinfo/utilities/Methods.java", "license": "apache-2.0", "size": 20686 }
[ "android.content.Context", "android.text.SpannableString", "android.text.SpannableStringBuilder" ]
import android.content.Context; import android.text.SpannableString; import android.text.SpannableStringBuilder;
import android.content.*; import android.text.*;
[ "android.content", "android.text" ]
android.content; android.text;
372,880
public Coord3D getCoord3D() { return coord; }
Coord3D function() { return coord; }
/** * Get the coord of the plane the shapelist is associated with. * @return see above. */
Get the coord of the plane the shapelist is associated with
getCoord3D
{ "repo_name": "knabar/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/util/roi/model/ShapeList.java", "license": "gpl-2.0", "size": 3440 }
[ "org.openmicroscopy.shoola.util.roi.model.util.Coord3D" ]
import org.openmicroscopy.shoola.util.roi.model.util.Coord3D;
import org.openmicroscopy.shoola.util.roi.model.util.*;
[ "org.openmicroscopy.shoola" ]
org.openmicroscopy.shoola;
191,973
public Eviction constructEviction(InternalCacheBuildContext customizationContext, HeapCacheForEviction hc, InternalEvictionListener l, Cache2kConfig config, int availableProcessors) { boolean strictEviction = config.isStrictEviction(); bo...
Eviction function(InternalCacheBuildContext customizationContext, HeapCacheForEviction hc, InternalEvictionListener l, Cache2kConfig config, int availableProcessors) { boolean strictEviction = config.isStrictEviction(); boolean boostConcurrency = config.isBoostConcurrency(); long maximumWeight = config.getMaximumWeight...
/** * Construct segmented or queued eviction. For the moment hard coded. * If capacity is at least 1000 we use 2 segments if 2 or more CPUs are available. * Segmenting the eviction only improves for lots of concurrent inserts or evictions, * there is no effect on read performance. */
Construct segmented or queued eviction. For the moment hard coded. If capacity is at least 1000 we use 2 segments if 2 or more CPUs are available. Segmenting the eviction only improves for lots of concurrent inserts or evictions, there is no effect on read performance
constructEviction
{ "repo_name": "headissue/cache2k", "path": "cache2k-core/src/main/java/org/cache2k/core/eviction/EvictionFactory.java", "license": "gpl-3.0", "size": 4757 }
[ "org.cache2k.config.Cache2kConfig", "org.cache2k.core.HeapCache", "org.cache2k.core.SegmentedEviction", "org.cache2k.core.api.InternalCacheBuildContext", "org.cache2k.operation.Weigher" ]
import org.cache2k.config.Cache2kConfig; import org.cache2k.core.HeapCache; import org.cache2k.core.SegmentedEviction; import org.cache2k.core.api.InternalCacheBuildContext; import org.cache2k.operation.Weigher;
import org.cache2k.config.*; import org.cache2k.core.*; import org.cache2k.core.api.*; import org.cache2k.operation.*;
[ "org.cache2k.config", "org.cache2k.core", "org.cache2k.operation" ]
org.cache2k.config; org.cache2k.core; org.cache2k.operation;
1,230,938
public SearchSourceBuilder sort(String name, SortOrder order) { return sort(SortBuilders.fieldSort(name).order(order)); }
SearchSourceBuilder function(String name, SortOrder order) { return sort(SortBuilders.fieldSort(name).order(order)); }
/** * Adds a sort against the given field name and the sort ordering. * * @param name The name of the field * @param order The sort ordering */
Adds a sort against the given field name and the sort ordering
sort
{ "repo_name": "xinec/elasticsearch-innerhits-1.4.0", "path": "src/main/java/org/elasticsearch/search/builder/SearchSourceBuilder.java", "license": "apache-2.0", "size": 34237 }
[ "org.elasticsearch.search.sort.SortBuilders", "org.elasticsearch.search.sort.SortOrder" ]
import org.elasticsearch.search.sort.SortBuilders; import org.elasticsearch.search.sort.SortOrder;
import org.elasticsearch.search.sort.*;
[ "org.elasticsearch.search" ]
org.elasticsearch.search;
2,625,839
@ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable<OpenidConnectProviderContractInner> listByService( String resourceGroupName, String serviceName, String filter, Integer top, Integer skip, Context context) { return new PagedIterable<>(listByServiceAsync(resourceGroupName, serv...
@ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<OpenidConnectProviderContractInner> function( String resourceGroupName, String serviceName, String filter, Integer top, Integer skip, Context context) { return new PagedIterable<>(listByServiceAsync(resourceGroupName, serviceName, filter, top, skip, context)...
/** * Lists of all the OpenId Connect Providers. * * @param resourceGroupName The name of the resource group. * @param serviceName The name of the API Management service. * @param filter | Field | Usage | Supported operators | Supported functions * |&lt;/br&gt;|-------------|----------...
Lists of all the OpenId Connect Providers
listByService
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/apimanagement/azure-resourcemanager-apimanagement/src/main/java/com/azure/resourcemanager/apimanagement/implementation/OpenIdConnectProvidersClientImpl.java", "license": "mit", "size": 80530 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedIterable", "com.azure.core.util.Context", "com.azure.resourcemanager.apimanagement.fluent.models.OpenidConnectProviderContractInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; import com.azure.resourcemanager.apimanagement.fluent.models.OpenidConnectProviderContractInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.apimanagement.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
2,761,459
private final boolean isResolvable(Object base) { return base instanceof Map<?, ?>; }
final boolean function(Object base) { return base instanceof Map<?, ?>; }
/** * Test whether the given base should be resolved by this ELResolver. * * @param base * The bean to analyze. * @return base instanceof Map */
Test whether the given base should be resolved by this ELResolver
isResolvable
{ "repo_name": "zwets/flowable-engine", "path": "modules/flowable5-engine/src/main/java/org/activiti/engine/impl/javax/el/MapELResolver.java", "license": "apache-2.0", "size": 14160 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,324,516
default Versioned<V> putIfAbsent(K key, V value) { return putIfAbsent(key, value, Duration.ZERO); }
default Versioned<V> putIfAbsent(K key, V value) { return putIfAbsent(key, value, Duration.ZERO); }
/** * If the specified key is not already associated with a value * associates it with the given value and returns null, else returns the current value. * * @param key key with which the specified value is to be associated * @param value value to be associated with the specified key * @return the pr...
If the specified key is not already associated with a value associates it with the given value and returns null, else returns the current value
putIfAbsent
{ "repo_name": "atomix/atomix", "path": "core/src/main/java/io/atomix/core/map/AtomicMap.java", "license": "apache-2.0", "size": 16612 }
[ "io.atomix.utils.time.Versioned", "java.time.Duration" ]
import io.atomix.utils.time.Versioned; import java.time.Duration;
import io.atomix.utils.time.*; import java.time.*;
[ "io.atomix.utils", "java.time" ]
io.atomix.utils; java.time;
219,478
public static void printHelp(PrintStream stream) throws IOException { stream.println(); stream.println("NAME"); stream.println(" quota set - Set quota values for stores"); stream.println(); stream.println("SYNOPSIS"); stream.println(" quo...
static void function(PrintStream stream) throws IOException { stream.println(); stream.println("NAME"); stream.println(STR); stream.println(); stream.println(STR); stream.println(STR); stream.println(STR); stream.println(); stream.println(STR); stream.println(STR); for(String quotaType: QuotaUtils.validQuotaTypes()) { ...
/** * Prints help menu for command. * * @param stream PrintStream object for output * @throws IOException */
Prints help menu for command
printHelp
{ "repo_name": "cshaxu/voldemort", "path": "src/java/voldemort/tools/admin/command/AdminCommandQuota.java", "license": "apache-2.0", "size": 29304 }
[ "java.io.IOException", "java.io.PrintStream" ]
import java.io.IOException; import java.io.PrintStream;
import java.io.*;
[ "java.io" ]
java.io;
2,700,707
public String createKmaxPublication(PublicationDetail pubDetail);
String function(PublicationDetail pubDetail);
/** * Create a new Publication (only the header - parameters) * * @param pubDetail a PublicationDetail * @return the id of the new publication * @see com.stratelia.webactiv.util.publication.model.PublicationDetail * @since 1.0 */
Create a new Publication (only the header - parameters)
createKmaxPublication
{ "repo_name": "CecileBONIN/Silverpeas-Components", "path": "kmelia/kmelia-ejb/src/main/java/com/stratelia/webactiv/kmelia/control/ejb/KmeliaBm.java", "license": "agpl-3.0", "size": 25457 }
[ "com.stratelia.webactiv.util.publication.model.PublicationDetail" ]
import com.stratelia.webactiv.util.publication.model.PublicationDetail;
import com.stratelia.webactiv.util.publication.model.*;
[ "com.stratelia.webactiv" ]
com.stratelia.webactiv;
2,048,182
private void updateLocation(Location loc){ if (loc == null){ throw new NullPointerException(); } if (actionSearchNearby){ setDataUri(Locatable.toDistanceSearchUri(mBaseContent, loc, searchRadius)); } mLastLocation = loc; }
void function(Location loc){ if (loc == null){ throw new NullPointerException(); } if (actionSearchNearby){ setDataUri(Locatable.toDistanceSearchUri(mBaseContent, loc, searchRadius)); } mLastLocation = loc; }
/** * Called when the location updates. * * @param loc */
Called when the location updates
updateLocation
{ "repo_name": "United-Nations/Locast-Rio-Android", "path": "src/edu/mit/mobile/android/locast/ver2/casts/LocatableListWithMap.java", "license": "gpl-2.0", "size": 13416 }
[ "android.location.Location", "edu.mit.mobile.android.locast.data.Locatable" ]
import android.location.Location; import edu.mit.mobile.android.locast.data.Locatable;
import android.location.*; import edu.mit.mobile.android.locast.data.*;
[ "android.location", "edu.mit.mobile" ]
android.location; edu.mit.mobile;
710,771
boolean endObjectEntry() throws ParseException, IOException;
boolean endObjectEntry() throws ParseException, IOException;
/** * Receive notification of the end of the value of previous object entry. * * @return false if the handler wants to stop parsing after return. * @throws ParseException * * @see #startObjectEntry */
Receive notification of the end of the value of previous object entry
endObjectEntry
{ "repo_name": "AntoineJanvier/Slyx", "path": "Client/src/slyx/jsonsimple/parser/ContentHandler.java", "license": "bsd-3-clause", "size": 3067 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
490,563
public void refresh() { setMatch(match); } ///////////////////////////////////////////////////////////////// // SCORES ///////////////////////////////////////////// ///////////////////////////////////////////////////////////////// private final static int LINE_POINTS = 0; private final static i...
void function() { setMatch(match); } private final static int LINE_POINTS = 0; private final static int LINE_BOMBEDS = 1; private final static int LINE_SELFBOMBINGS = 2; private final static int LINE_BOMBINGS = 3; private final static int LINE_TIME = 4; private final static int LINE_ITEMS = 5; private final static int ...
/** * Updates this panel * (called after a change) */
Updates this panel (called after a change)
refresh
{ "repo_name": "vlabatut/totalboumboum", "path": "src/org/totalboumboum/gui/common/content/subpanel/events/MatchEvolutionSubPanel.java", "license": "gpl-2.0", "size": 24995 }
[ "java.util.HashMap", "java.util.Map", "org.totalboumboum.gui.tools.GuiKeys", "org.totalboumboum.statistics.detailed.Score" ]
import java.util.HashMap; import java.util.Map; import org.totalboumboum.gui.tools.GuiKeys; import org.totalboumboum.statistics.detailed.Score;
import java.util.*; import org.totalboumboum.gui.tools.*; import org.totalboumboum.statistics.detailed.*;
[ "java.util", "org.totalboumboum.gui", "org.totalboumboum.statistics" ]
java.util; org.totalboumboum.gui; org.totalboumboum.statistics;
7,742
@Test public void testUnshift3() { SBuilder instance = new SBuilder(4); instance.shift(); instance.shift(); instance.unshift(); instance.unshift(); assertThat(instance.getIndent(), is(0)); }
void function() { SBuilder instance = new SBuilder(4); instance.shift(); instance.shift(); instance.unshift(); instance.unshift(); assertThat(instance.getIndent(), is(0)); }
/** * Test of unshift method, of class SBuilder. */
Test of unshift method, of class SBuilder
testUnshift3
{ "repo_name": "tkob/yokohamaunit", "path": "src/test/java/yokohama/unit/util/SBuilderTest.java", "license": "mit", "size": 3216 }
[ "org.hamcrest.CoreMatchers", "org.junit.Assert" ]
import org.hamcrest.CoreMatchers; import org.junit.Assert;
import org.hamcrest.*; import org.junit.*;
[ "org.hamcrest", "org.junit" ]
org.hamcrest; org.junit;
1,903,405
private INodeSelectionUpdater getSelectionUpdater() { return m_table == null ? new CNodeSelectionUpdater(getProjectTree(), findNode()) : new CEmptyNodeSelectionUpdater(); }
INodeSelectionUpdater function() { return m_table == null ? new CNodeSelectionUpdater(getProjectTree(), findNode()) : new CEmptyNodeSelectionUpdater(); }
/** * Creates the project tree updater depending on the context in which the menu is built. * * @return Created tree updater object. */
Creates the project tree updater depending on the context in which the menu is built
getSelectionUpdater
{ "repo_name": "guiquanz/binnavi", "path": "src/main/java/com/google/security/zynamics/binnavi/Gui/MainWindow/ProjectTree/Nodes/Project/CProjectNodeMenuBuilder.java", "license": "apache-2.0", "size": 14963 }
[ "com.google.security.zynamics.binnavi.Gui" ]
import com.google.security.zynamics.binnavi.Gui;
import com.google.security.zynamics.binnavi.*;
[ "com.google.security" ]
com.google.security;
409,355
public static EncodedCQCounter copy(EncodedCQCounter counterToCopy) { EncodedCQCounter cqCounter = new EncodedCQCounter(); for (Entry<String, Integer> e : counterToCopy.values().entrySet()) { cqCounter.setValue(e.getKey(), e.getValue()); } return c...
static EncodedCQCounter function(EncodedCQCounter counterToCopy) { EncodedCQCounter cqCounter = new EncodedCQCounter(); for (Entry<String, Integer> e : counterToCopy.values().entrySet()) { cqCounter.setValue(e.getKey(), e.getValue()); } return cqCounter; } public static final EncodedCQCounter NULL_COUNTER = new Encoded...
/** * Copy constructor * @param counterToCopy * @return copy of the passed counter */
Copy constructor
copy
{ "repo_name": "shehzaadn/phoenix", "path": "phoenix-core/src/main/java/org/apache/phoenix/schema/PTable.java", "license": "apache-2.0", "size": 28386 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,995,599
public void setEndDate(Date endDate) { this.endDate = endDate; }
void function(Date endDate) { this.endDate = endDate; }
/** * This method was generated by MyBatis Generator. * This method sets the value of the database column deploy_task_api.end_date * * @param endDate the value for deploy_task_api.end_date * @mbggenerated */
This method was generated by MyBatis Generator. This method sets the value of the database column deploy_task_api.end_date
setEndDate
{ "repo_name": "leonindy/camel", "path": "camel-admin/src/main/java/com/dianping/phoenix/lb/deploy/model/api/DeployTaskApi.java", "license": "gpl-3.0", "size": 8241 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
2,750,542
@Before public void setUp() throws Exception { this.stdout = System.out; this.outStream = new ByteArrayOutputStream(); System.setOut(new PrintStream(this.outStream)); Logger rootLogger = Logger.getRootLogger(); rootLogger.setLevel(Level.INFO); rootLogger.addAppe...
void function() throws Exception { this.stdout = System.out; this.outStream = new ByteArrayOutputStream(); System.setOut(new PrintStream(this.outStream)); Logger rootLogger = Logger.getRootLogger(); rootLogger.setLevel(Level.INFO); rootLogger.addAppender( new ConsoleAppender( new PatternLayout(STR) ) ); }
/** * Set up the main logger. Redirect Out stream and create a test folder and the main * test file in the java temp directory. * @throws Exception */
Set up the main logger. Redirect Out stream and create a test folder and the main test file in the java temp directory
setUp
{ "repo_name": "mpsonntag/crawler-to-rdf", "path": "src/test/java/org/g_node/converter/ConverterJenaTest.java", "license": "bsd-3-clause", "size": 4407 }
[ "java.io.ByteArrayOutputStream", "java.io.PrintStream", "org.apache.log4j.ConsoleAppender", "org.apache.log4j.Level", "org.apache.log4j.Logger", "org.apache.log4j.PatternLayout" ]
import java.io.ByteArrayOutputStream; import java.io.PrintStream; import org.apache.log4j.ConsoleAppender; import org.apache.log4j.Level; import org.apache.log4j.Logger; import org.apache.log4j.PatternLayout;
import java.io.*; import org.apache.log4j.*;
[ "java.io", "org.apache.log4j" ]
java.io; org.apache.log4j;
1,948,186
private void addApplicationPermission(Connection connection, HashMap permissionMap, String applicationId) throws SQLException { final String query = "INSERT INTO AM_APPS_GROUP_PERMISSION (APPLICATION_ID, GROUP_ID, PERMISSION) " + "VALUES (?, ?, ?)"; Map<String, Integer> m...
void function(Connection connection, HashMap permissionMap, String applicationId) throws SQLException { final String query = STR + STR; Map<String, Integer> map = permissionMap; if (permissionMap != null) { if (permissionMap.size() > 0) { try (PreparedStatement statement = connection.prepareStatement(query)) { for (Map...
/** * This method will save permission in to AM_APPS_GROUP_PERMISSION table. * * @param connection Database connection * @param permissionMap Permission Data * @param applicationId Application Id * @throws SQLException If failed to add application. */
This method will save permission in to AM_APPS_GROUP_PERMISSION table
addApplicationPermission
{ "repo_name": "lakmali/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.core/src/main/java/org/wso2/carbon/apimgt/core/dao/impl/ApplicationDAOImpl.java", "license": "apache-2.0", "size": 23217 }
[ "java.sql.Connection", "java.sql.PreparedStatement", "java.sql.SQLException", "java.util.HashMap", "java.util.Map", "org.wso2.carbon.apimgt.core.util.APIMgtConstants" ]
import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException; import java.util.HashMap; import java.util.Map; import org.wso2.carbon.apimgt.core.util.APIMgtConstants;
import java.sql.*; import java.util.*; import org.wso2.carbon.apimgt.core.util.*;
[ "java.sql", "java.util", "org.wso2.carbon" ]
java.sql; java.util; org.wso2.carbon;
2,174,883
public void setAssetValueAmt (BigDecimal AssetValueAmt);
void function (BigDecimal AssetValueAmt);
/** Set Asset value. * Book Value of the asset */
Set Asset value. Book Value of the asset
setAssetValueAmt
{ "repo_name": "arthurmelo88/palmetalADP", "path": "adempiere_360/base/src/org/compiere/model/I_A_Asset_Retirement.java", "license": "gpl-2.0", "size": 5411 }
[ "java.math.BigDecimal" ]
import java.math.BigDecimal;
import java.math.*;
[ "java.math" ]
java.math;
1,276,628
@OnAwt public void openDialog() throws PropertyVetoException { setStatus(Status.OPENED); dialog.setVisible(true); }
void function() throws PropertyVetoException { setStatus(Status.OPENED); dialog.setVisible(true); }
/** * Opens the dialog. * <p> * <h2>AWT Thread</h2> * Should be called in the AWT event dispatch thread. * </p> * * @throws PropertyVetoException * if the opening of the dialog was vetoed. * * @since 3.5 */
Opens the dialog. AWT Thread Should be called in the AWT event dispatch thread.
openDialog
{ "repo_name": "devent/prefdialog", "path": "prefdialog-dialog/src/main/java/com/anrisoftware/prefdialog/simpledialog/SimpleDialog.java", "license": "gpl-3.0", "size": 24685 }
[ "java.beans.PropertyVetoException" ]
import java.beans.PropertyVetoException;
import java.beans.*;
[ "java.beans" ]
java.beans;
466,687
final Type getType(final int index) { return memberTypes[index]; } /** * Returns the type associated to the given attribute name, or {@code null} if none. * This method is functionally equivalent to (omitting the check for null value): * * {@preformat java * getMemberTy...
final Type getType(final int index) { return memberTypes[index]; } /** * Returns the type associated to the given attribute name, or {@code null} if none. * This method is functionally equivalent to (omitting the check for null value): * * {@preformat java * getMemberTypes().get(memberName).getTypeName(); * }
/** * Returns the type at the given index. */
Returns the type at the given index
getType
{ "repo_name": "Geomatys/sis", "path": "core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultRecordType.java", "license": "apache-2.0", "size": 19474 }
[ "org.opengis.util.Type" ]
import org.opengis.util.Type;
import org.opengis.util.*;
[ "org.opengis.util" ]
org.opengis.util;
2,824,951
public void startServer() throws Exception { server = new LdapServer(); int serverPort = 10389; server.setTransports(new TcpTransport(serverPort)); server.setDirectoryService(service); server.start(); }
void function() throws Exception { server = new LdapServer(); int serverPort = 10389; server.setTransports(new TcpTransport(serverPort)); server.setDirectoryService(service); server.start(); }
/** * starts the LdapServer * * @throws Exception */
starts the LdapServer
startServer
{ "repo_name": "nevenr/vertx-auth", "path": "vertx-auth-shiro/src/test/java/io/vertx/ext/auth/test/shiro/EmbeddedADS.java", "license": "apache-2.0", "size": 8630 }
[ "org.apache.directory.server.ldap.LdapServer", "org.apache.directory.server.protocol.shared.transport.TcpTransport" ]
import org.apache.directory.server.ldap.LdapServer; import org.apache.directory.server.protocol.shared.transport.TcpTransport;
import org.apache.directory.server.ldap.*; import org.apache.directory.server.protocol.shared.transport.*;
[ "org.apache.directory" ]
org.apache.directory;
1,700,032
public static ServerLocator createServerLocator(final boolean ha, final DiscoveryGroupConfiguration groupConfiguration) { return new ServerLocatorImpl(ha, groupConfiguration); }
static ServerLocator function(final boolean ha, final DiscoveryGroupConfiguration groupConfiguration) { return new ServerLocatorImpl(ha, groupConfiguration); }
/** * Create a ServerLocator which creates session factories from a set of live servers, no HA * backup information is propagated to the client The UDP address and port are used to listen for * live servers in the cluster * * @param ha The Locator will support topology updates and ha...
Create a ServerLocator which creates session factories from a set of live servers, no HA backup information is propagated to the client The UDP address and port are used to listen for live servers in the cluster
createServerLocator
{ "repo_name": "paulgallagher75/activemq-artemis", "path": "artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ActiveMQClient.java", "license": "apache-2.0", "size": 17476 }
[ "org.apache.activemq.artemis.api.core.DiscoveryGroupConfiguration", "org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl" ]
import org.apache.activemq.artemis.api.core.DiscoveryGroupConfiguration; import org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl;
import org.apache.activemq.artemis.api.core.*; import org.apache.activemq.artemis.core.client.impl.*;
[ "org.apache.activemq" ]
org.apache.activemq;
1,574,469
public static GrantAchievementEvent createGrantAchievementEvent(Game game, Cause cause, Text originalMessage, Text message, MessageSink originalSink, MessageSink sink, Achievement achievement) { Map<String, Object> values = Maps.newHashMap(); values.put("game", game); values.put("cause", cau...
static GrantAchievementEvent function(Game game, Cause cause, Text originalMessage, Text message, MessageSink originalSink, MessageSink sink, Achievement achievement) { Map<String, Object> values = Maps.newHashMap(); values.put("game", game); values.put("cause", cause); values.put(STR, originalMessage); values.put(STR,...
/** * AUTOMATICALLY GENERATED, DO NOT EDIT. * Creates a new instance of * {@link org.spongepowered.api.event.achievement.GrantAchievementEvent}. * * @param game The game * @param cause The cause * @param originalMessage The original message * @param message The message * @p...
AUTOMATICALLY GENERATED, DO NOT EDIT. Creates a new instance of <code>org.spongepowered.api.event.achievement.GrantAchievementEvent</code>
createGrantAchievementEvent
{ "repo_name": "jamierocks/SpongeAPI", "path": "src/main/java/org/spongepowered/api/event/SpongeEventFactory.java", "license": "mit", "size": 196993 }
[ "com.google.common.collect.Maps", "java.util.Map", "org.spongepowered.api.Game", "org.spongepowered.api.event.achievement.GrantAchievementEvent", "org.spongepowered.api.event.cause.Cause", "org.spongepowered.api.statistic.achievement.Achievement", "org.spongepowered.api.text.Text", "org.spongepowered....
import com.google.common.collect.Maps; import java.util.Map; import org.spongepowered.api.Game; import org.spongepowered.api.event.achievement.GrantAchievementEvent; import org.spongepowered.api.event.cause.Cause; import org.spongepowered.api.statistic.achievement.Achievement; import org.spongepowered.api.text.Text; im...
import com.google.common.collect.*; import java.util.*; import org.spongepowered.api.*; import org.spongepowered.api.event.achievement.*; import org.spongepowered.api.event.cause.*; import org.spongepowered.api.statistic.achievement.*; import org.spongepowered.api.text.*; import org.spongepowered.api.text.sink.*;
[ "com.google.common", "java.util", "org.spongepowered.api" ]
com.google.common; java.util; org.spongepowered.api;
2,173,132
public boolean imageUpdate(Image img, int infoflags, int x, int y, int width, int height) { boolean loaded = (infoflags & ImageObserver.ALLBITS) > 0; boolean error = (infoflags & ImageObserver.ERROR) > 0; if (loaded || error) { _consumer.tilesUpdated(loaded); } return !loaded; }
boolean function(Image img, int infoflags, int x, int y, int width, int height) { boolean loaded = (infoflags & ImageObserver.ALLBITS) > 0; boolean error = (infoflags & ImageObserver.ERROR) > 0; if (loaded error) { _consumer.tilesUpdated(loaded); } return !loaded; }
/** * Method called by image loader to inform of updates to the tiles * @param img the image * @param infoflags flags describing how much of the image is known * @param x ignored * @param y ignored * @param width ignored * @param height ignored * @return false to carry on loading, true to stop */
Method called by image loader to inform of updates to the tiles
imageUpdate
{ "repo_name": "sebastic/GpsPrune", "path": "tim/prune/gui/map/MapTileManager.java", "license": "gpl-2.0", "size": 7451 }
[ "java.awt.Image", "java.awt.image.ImageObserver" ]
import java.awt.Image; import java.awt.image.ImageObserver;
import java.awt.*; import java.awt.image.*;
[ "java.awt" ]
java.awt;
912,573
protected NodeFigure createMainFigure() { NodeFigure figure = createNodePlate(); figure.setLayoutManager(new StackLayout()); IFigure shape = createNodeShape(); figure.add(shape); contentPane = setupContentPane(shape); return figure; }
NodeFigure function() { NodeFigure figure = createNodePlate(); figure.setLayoutManager(new StackLayout()); IFigure shape = createNodeShape(); figure.add(shape); contentPane = setupContentPane(shape); return figure; }
/** * Creates figure for this edit part. * * Body of this method does not depend on settings in generation model * so you may safely remove <i>generated</i> tag and modify it. * * @generated */
Creates figure for this edit part. Body of this method does not depend on settings in generation model so you may safely remove generated tag and modify it
createMainFigure
{ "repo_name": "prabushi/devstudio-tooling-esb", "path": "plugins/org.wso2.developerstudio.eclipse.gmf.esb.diagram/src/org/wso2/developerstudio/eclipse/gmf/esb/diagram/edit/parts/WSDLEndPointEditPart.java", "license": "apache-2.0", "size": 28024 }
[ "org.eclipse.draw2d.IFigure", "org.eclipse.draw2d.StackLayout", "org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure" ]
import org.eclipse.draw2d.IFigure; import org.eclipse.draw2d.StackLayout; import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.draw2d.*; import org.eclipse.gmf.runtime.gef.ui.figures.*;
[ "org.eclipse.draw2d", "org.eclipse.gmf" ]
org.eclipse.draw2d; org.eclipse.gmf;
149,396
if (value == null) { if (targetType.equals(Boolean.TYPE)) { return false; } return value; } final Class<? extends Object> actualType = value.getClass(); if (targetType.isPrimitive()) { targetType = PrimitiveTypes.valueOf(targetTy...
if (value == null) { if (targetType.equals(Boolean.TYPE)) { return false; } return value; } final Class<? extends Object> actualType = value.getClass(); if (targetType.isPrimitive()) { targetType = PrimitiveTypes.valueOf(targetType.toString().toUpperCase()).getWraper(); } if (targetType.isAssignableFrom(actualType)) { ...
/** * Todo : change this so the Cmd class being used in the conversion * can itself have "editor" methods -- static methods like the ones below * * The 'public static Foo create(String)' method would take precedence over * all other "editor" logic. * */
Todo : change this so the Cmd class being used in the conversion can itself have "editor" methods -- static methods like the ones below The 'public static Foo create(String)' method would take precedence over all other "editor" logic
convert
{ "repo_name": "danielsoro/crest", "path": "tomitribe-crest/src/main/java/org/tomitribe/crest/converters/Converter.java", "license": "apache-2.0", "size": 5423 }
[ "java.beans.PropertyEditor", "org.tomitribe.crest.cmds.processors.types.PrimitiveTypes", "org.tomitribe.util.editor.Editors" ]
import java.beans.PropertyEditor; import org.tomitribe.crest.cmds.processors.types.PrimitiveTypes; import org.tomitribe.util.editor.Editors;
import java.beans.*; import org.tomitribe.crest.cmds.processors.types.*; import org.tomitribe.util.editor.*;
[ "java.beans", "org.tomitribe.crest", "org.tomitribe.util" ]
java.beans; org.tomitribe.crest; org.tomitribe.util;
1,995,640
public static String readAssetAsString(final Context ctx, final String name) throws IOException { final Reader r = new BufferedReader(new InputStreamReader( ctx.getAssets().open(name), UTF_8)); try { return readString(r); } finally { r.close(); } }
static String function(final Context ctx, final String name) throws IOException { final Reader r = new BufferedReader(new InputStreamReader( ctx.getAssets().open(name), UTF_8)); try { return readString(r); } finally { r.close(); } }
/** * Attempts to read the asset with the given name as a utf-8 string. * @throws IOException reading the asset failed (most likely the given name * was wrong) */
Attempts to read the asset with the given name as a utf-8 string
readAssetAsString
{ "repo_name": "TheAppGuys/winzigsql", "path": "src/main/java/de/theappguys/winzigsql/ResourceUtils.java", "license": "bsd-3-clause", "size": 2588 }
[ "android.content.Context", "java.io.BufferedReader", "java.io.IOException", "java.io.InputStreamReader", "java.io.Reader" ]
import android.content.Context; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.Reader;
import android.content.*; import java.io.*;
[ "android.content", "java.io" ]
android.content; java.io;
1,532,601