method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
//------------------------------------------------------------------------- // // Public interface // //------------------------------------------------------------------------- public boolean isInitialized() throws DAOException;
boolean function() throws DAOException;
/** * Indicates if the needed data has been initialized */
Indicates if the needed data has been initialized
isInitialized
{ "repo_name": "protonsint/geosdiera", "path": "web/src/main/java/it/geosdi/era/server/service/IStartupService.java", "license": "gpl-3.0", "size": 1825 }
[ "it.geosdi.era.exception.DAOException" ]
import it.geosdi.era.exception.DAOException;
import it.geosdi.era.exception.*;
[ "it.geosdi.era" ]
it.geosdi.era;
1,292,784
protected void cancel(String[] args) throws Exception { LOG.info("Running 'cancel' command."); final Options commandOptions = CliFrontendParser.getCancelCommandOptions(); final CommandLine commandLine = getCommandLine(commandOptions, args, false); CancelOptions cancelOptions = new ...
void function(String[] args) throws Exception { LOG.info(STR); final Options commandOptions = CliFrontendParser.getCancelCommandOptions(); final CommandLine commandLine = getCommandLine(commandOptions, args, false); CancelOptions cancelOptions = new CancelOptions(commandLine); if (cancelOptions.isPrintHelp()) { CliFron...
/** * Executes the CANCEL action. * * @param args Command line arguments for the cancel action. */
Executes the CANCEL action
cancel
{ "repo_name": "aljoscha/flink", "path": "flink-clients/src/main/java/org/apache/flink/client/cli/CliFrontend.java", "license": "apache-2.0", "size": 51839 }
[ "java.util.concurrent.TimeUnit", "org.apache.commons.cli.CommandLine", "org.apache.commons.cli.Options", "org.apache.flink.api.common.JobID", "org.apache.flink.util.FlinkException" ]
import java.util.concurrent.TimeUnit; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.Options; import org.apache.flink.api.common.JobID; import org.apache.flink.util.FlinkException;
import java.util.concurrent.*; import org.apache.commons.cli.*; import org.apache.flink.api.common.*; import org.apache.flink.util.*;
[ "java.util", "org.apache.commons", "org.apache.flink" ]
java.util; org.apache.commons; org.apache.flink;
1,165,579
public static Test suite() { return new TestSuite(ArffSpreadSheetWriterTest.class); }
static Test function() { return new TestSuite(ArffSpreadSheetWriterTest.class); }
/** * Returns a test suite. * * @return the test suite */
Returns a test suite
suite
{ "repo_name": "waikato-datamining/adams-base", "path": "adams-weka/src/test/java/adams/data/io/output/ArffSpreadSheetWriterTest.java", "license": "gpl-3.0", "size": 2655 }
[ "junit.framework.Test", "junit.framework.TestSuite" ]
import junit.framework.Test; import junit.framework.TestSuite;
import junit.framework.*;
[ "junit.framework" ]
junit.framework;
294,961
private void initializeFocusManager() { // Create FocusManager object. startPreview needs it. // if mFocusManager not null, reuse it // otherwise create a new instance if (mFocusManager != null) { mFocusManager.removeMessages(); } else { CameraInfo inf...
void function() { if (mFocusManager != null) { mFocusManager.removeMessages(); } else { CameraInfo info = CameraHolder.instance().getCameraInfo()[mCameraId]; mMirror = (info.facing == CameraInfo.CAMERA_FACING_FRONT); String[] defaultFocusModes = mActivity.getResources().getStringArray( R.array.pref_camera_focusmode_def...
/** * The focus manager is the first UI related element to get initialized, * and it requires the RenderOverlay, so initialize it here */
The focus manager is the first UI related element to get initialized, and it requires the RenderOverlay, so initialize it here
initializeFocusManager
{ "repo_name": "asm-products/nexus-camera", "path": "src/com/android/camera/PhotoModule.java", "license": "agpl-3.0", "size": 72406 }
[ "android.hardware.Camera" ]
import android.hardware.Camera;
import android.hardware.*;
[ "android.hardware" ]
android.hardware;
236,807
public static BaseVectorFactory getInstance() { CompilerAsserts.neverPartOfCompilation("RDataFactory.getInstance() can only be used in slow paths"); return INSTANCE; }
static BaseVectorFactory function() { CompilerAsserts.neverPartOfCompilation(STR); return INSTANCE; }
/** * This factory is only intended for use on slow paths, all places where a node context is * available should use a dynamic {@link VectorFactory} instance. */
This factory is only intended for use on slow paths, all places where a node context is available should use a dynamic <code>VectorFactory</code> instance
getInstance
{ "repo_name": "graalvm/fastr", "path": "com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/RDataFactory.java", "license": "gpl-2.0", "size": 60226 }
[ "com.oracle.truffle.api.CompilerAsserts" ]
import com.oracle.truffle.api.CompilerAsserts;
import com.oracle.truffle.api.*;
[ "com.oracle.truffle" ]
com.oracle.truffle;
2,083,537
public static DenseMatrix64F createFundamental(DenseMatrix64F E, DenseMatrix64F K) { DenseMatrix64F K_inv = new DenseMatrix64F(3,3); CommonOps.invert(K,K_inv); DenseMatrix64F F = new DenseMatrix64F(3,3); DenseMatrix64F temp = new DenseMatrix64F(3,3); CommonOps.multTransA(K_inv,E,temp); CommonOps.mult(t...
static DenseMatrix64F function(DenseMatrix64F E, DenseMatrix64F K) { DenseMatrix64F K_inv = new DenseMatrix64F(3,3); CommonOps.invert(K,K_inv); DenseMatrix64F F = new DenseMatrix64F(3,3); DenseMatrix64F temp = new DenseMatrix64F(3,3); CommonOps.multTransA(K_inv,E,temp); CommonOps.mult(temp,K_inv,F); return F; }
/** * Computes a Fundamental matrix given an Essential matrix and the camera calibration matrix. * * F = (K<sup>-1</sup>)<sup>T</sup>*E*K<sup>-1</sup> * * @param E Essential matrix * @param K Intrinsic camera calibration matrix * @return Fundamental matrix */
Computes a Fundamental matrix given an Essential matrix and the camera calibration matrix. F = (K-1)T*E*K-1
createFundamental
{ "repo_name": "pacozaa/BoofCV", "path": "main/geo/src/boofcv/alg/geo/MultiViewOps.java", "license": "apache-2.0", "size": 28990 }
[ "org.ejml.data.DenseMatrix64F", "org.ejml.ops.CommonOps" ]
import org.ejml.data.DenseMatrix64F; import org.ejml.ops.CommonOps;
import org.ejml.data.*; import org.ejml.ops.*;
[ "org.ejml.data", "org.ejml.ops" ]
org.ejml.data; org.ejml.ops;
1,559,892
public void setIndentation(final int indentation) { ArgumentChecks.ensureBetween("indentation", SINGLE_LINE, Byte.MAX_VALUE, indentation); this.indentation = (byte) indentation; updateFormatter(formatter); }
void function(final int indentation) { ArgumentChecks.ensureBetween(STR, SINGLE_LINE, Byte.MAX_VALUE, indentation); this.indentation = (byte) indentation; updateFormatter(formatter); }
/** * Sets a new indentation to be used for formatting objects. * The {@value #SINGLE_LINE} value means that the whole WKT is to be formatted on a single line. * * @param indentation the new indentation to use. * * @see org.apache.sis.setup.OptionKey#INDENTATION */
Sets a new indentation to be used for formatting objects. The #SINGLE_LINE value means that the whole WKT is to be formatted on a single line
setIndentation
{ "repo_name": "Geomatys/sis", "path": "core/sis-metadata/src/main/java/org/apache/sis/io/wkt/WKTFormat.java", "license": "apache-2.0", "size": 36743 }
[ "org.apache.sis.util.ArgumentChecks" ]
import org.apache.sis.util.ArgumentChecks;
import org.apache.sis.util.*;
[ "org.apache.sis" ]
org.apache.sis;
430,918
void commit() throws WikiSecurityException;
void commit() throws WikiSecurityException;
/** * No-op method that in previous versions of JSPWiki was intended to * atomically commit changes to the user database. Now, the {@link #rename(String, String)}, * {@link #save(UserProfile)} and {@link #deleteByLoginName(String)} methods * are atomic themselves. * @throws WikiSecurityExceptio...
No-op method that in previous versions of JSPWiki was intended to atomically commit changes to the user database. Now, the <code>#rename(String, String)</code>, <code>#save(UserProfile)</code> and <code>#deleteByLoginName(String)</code> methods are atomic themselves
commit
{ "repo_name": "tateshitah/jspwiki", "path": "jspwiki-war/src/main/java/org/apache/wiki/auth/user/UserDatabase.java", "license": "apache-2.0", "size": 10797 }
[ "org.apache.wiki.auth.WikiSecurityException" ]
import org.apache.wiki.auth.WikiSecurityException;
import org.apache.wiki.auth.*;
[ "org.apache.wiki" ]
org.apache.wiki;
2,078,784
default void afterRemoveAddress(SimpleString address, AddressInfo addressInfo) throws ActiveMQException { }
default void afterRemoveAddress(SimpleString address, AddressInfo addressInfo) throws ActiveMQException { }
/** * After an address has been removed * * @param address The address that has been removed * @param addressInfo The address info that has been removed or null if not removed * @throws ActiveMQException */
After an address has been removed
afterRemoveAddress
{ "repo_name": "mnovak1/activemq-artemis", "path": "artemis-server/src/main/java/org/apache/activemq/artemis/core/server/plugin/ActiveMQServerPlugin.java", "license": "apache-2.0", "size": 16642 }
[ "org.apache.activemq.artemis.api.core.ActiveMQException", "org.apache.activemq.artemis.api.core.SimpleString", "org.apache.activemq.artemis.core.server.impl.AddressInfo" ]
import org.apache.activemq.artemis.api.core.ActiveMQException; import org.apache.activemq.artemis.api.core.SimpleString; import org.apache.activemq.artemis.core.server.impl.AddressInfo;
import org.apache.activemq.artemis.api.core.*; import org.apache.activemq.artemis.core.server.impl.*;
[ "org.apache.activemq" ]
org.apache.activemq;
1,466,132
private void openCell(int lineOffset, BlockType type, TableCellAttributes attributes) { closeCell(); if (!openRow) { openRow(lineOffset, new TableRowAttributes()); } state.setLineCharacterOffset(lineOffset); builder.beginBlock(type, attributes); openCell = true; }
void function(int lineOffset, BlockType type, TableCellAttributes attributes) { closeCell(); if (!openRow) { openRow(lineOffset, new TableRowAttributes()); } state.setLineCharacterOffset(lineOffset); builder.beginBlock(type, attributes); openCell = true; }
/** * Open a cell block. * * @param lineOffset * line offset * @param type * type of cell (expecting {@link BlockType#TABLE_CELL_HEADER} or {@link BlockType#TABLE_CELL_NORMAL}). * @param attributes * attributes of the cell */
Open a cell block
openCell
{ "repo_name": "elelpublic/wikitext-all", "path": "src/org.eclipse.mylyn.wikitext.mediawiki.core/src/org/eclipse/mylyn/internal/wikitext/mediawiki/core/block/TableBlock.java", "license": "epl-1.0", "size": 11272 }
[ "org.eclipse.mylyn.wikitext.core.parser.DocumentBuilder", "org.eclipse.mylyn.wikitext.core.parser.TableCellAttributes", "org.eclipse.mylyn.wikitext.core.parser.TableRowAttributes" ]
import org.eclipse.mylyn.wikitext.core.parser.DocumentBuilder; import org.eclipse.mylyn.wikitext.core.parser.TableCellAttributes; import org.eclipse.mylyn.wikitext.core.parser.TableRowAttributes;
import org.eclipse.mylyn.wikitext.core.parser.*;
[ "org.eclipse.mylyn" ]
org.eclipse.mylyn;
1,531,632
public static void hasElements(Collection collection, String message) { if (collection == null || collection.isEmpty()) { throw new IllegalArgumentException(message); } }
static void function(Collection collection, String message) { if (collection == null collection.isEmpty()) { throw new IllegalArgumentException(message); } }
/** * Assert that a collection has elements; that is, it must not be * <code>null</code> and must have a <code>size > 0</code>. * <p> * * <pre> * Assert.hasElements(myCollection, "myCollection must have elements."); * </pre> * * @param collection * The collection to check to see if it has...
Assert that a collection has elements; that is, it must not be <code>null</code> and must have a <code>size > 0</code>. <code> Assert.hasElements(myCollection, "myCollection must have elements."); </code>
hasElements
{ "repo_name": "hiepst/TrendingDemo", "path": "IntelAssign/src/com/hiep/common/util/Assert.java", "license": "lgpl-3.0", "size": 12695 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,580,250
public void clearTaskMarkers(ITextEditor editor) { IResource resource = (IResource) editor.getEditorInput().getAdapter(IResource.class); if (resource == null) return; try { resource.deleteMarkers(IMarker.TASK, false, IResource.DEPTH_INFINITE); } catch (CoreException e) { ...
void function(ITextEditor editor) { IResource resource = (IResource) editor.getEditorInput().getAdapter(IResource.class); if (resource == null) return; try { resource.deleteMarkers(IMarker.TASK, false, IResource.DEPTH_INFINITE); } catch (CoreException e) { TexlipsePlugin.log(STR, e); } }
/** * Clears the task markers * * @param editor The editor to clear the markers from */
Clears the task markers
clearTaskMarkers
{ "repo_name": "rondiplomatico/texlipse", "path": "source/net/sourceforge/texlipse/model/MarkerHandler.java", "license": "epl-1.0", "size": 9347 }
[ "net.sourceforge.texlipse.TexlipsePlugin", "org.eclipse.core.resources.IMarker", "org.eclipse.core.resources.IResource", "org.eclipse.core.runtime.CoreException", "org.eclipse.ui.texteditor.ITextEditor" ]
import net.sourceforge.texlipse.TexlipsePlugin; import org.eclipse.core.resources.IMarker; import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.CoreException; import org.eclipse.ui.texteditor.ITextEditor;
import net.sourceforge.texlipse.*; import org.eclipse.core.resources.*; import org.eclipse.core.runtime.*; import org.eclipse.ui.texteditor.*;
[ "net.sourceforge.texlipse", "org.eclipse.core", "org.eclipse.ui" ]
net.sourceforge.texlipse; org.eclipse.core; org.eclipse.ui;
2,582,157
protected void fireTransFinishedListeners() throws KettleException { // PDI-5229 sync added synchronized ( transListeners ) { if ( transListeners.size() == 0 ) { return; } // prevent Exception from one listener to block others execution List<KettleException> badGuys = new Array...
void function() throws KettleException { synchronized ( transListeners ) { if ( transListeners.size() == 0 ) { return; } List<KettleException> badGuys = new ArrayList<>( transListeners.size() ); for ( TransListener transListener : transListeners ) { try { transListener.transFinished( this ); } catch ( KettleException e...
/** * Make attempt to fire all registered listeners if possible. * * @throws KettleException if any errors occur during notification */
Make attempt to fire all registered listeners if possible
fireTransFinishedListeners
{ "repo_name": "e-cuellar/pentaho-kettle", "path": "engine/src/main/java/org/pentaho/di/trans/Trans.java", "license": "apache-2.0", "size": 199294 }
[ "java.util.ArrayList", "java.util.List", "org.pentaho.di.core.exception.KettleException" ]
import java.util.ArrayList; import java.util.List; import org.pentaho.di.core.exception.KettleException;
import java.util.*; import org.pentaho.di.core.exception.*;
[ "java.util", "org.pentaho.di" ]
java.util; org.pentaho.di;
2,093,228
private QueryBase doQuery(String searchString, String database, org.osid.shared.Properties searchProperties, SessionContext sessionContext) throws org.osid.repository.RepositoryException, org.osid.shared.SharedException { QueryBase query; ...
QueryBase function(String searchString, String database, org.osid.shared.Properties searchProperties, SessionContext sessionContext) throws org.osid.repository.RepositoryException, org.osid.shared.SharedException { QueryBase query; HashMap parameterMap; ArrayList<String> targetList; StringBuilder targetBuffer; paramete...
/** * Execute an HTTP query for a standard search operation * @param request The servlet request block for this transaction * @param sessionContext Session context for this user * @param database Database name */
Execute an HTTP query for a standard search operation
doQuery
{ "repo_name": "OpenCollabZA/sakai", "path": "citations/citations-osid/web2bridge/src/java/edu/indiana/lib/osid/base/repository/http/Repository.java", "license": "apache-2.0", "size": 18180 }
[ "edu.indiana.lib.twinpeaks.search.QueryBase", "edu.indiana.lib.twinpeaks.search.SearchSource", "edu.indiana.lib.twinpeaks.util.SessionContext", "java.util.ArrayList", "java.util.HashMap" ]
import edu.indiana.lib.twinpeaks.search.QueryBase; import edu.indiana.lib.twinpeaks.search.SearchSource; import edu.indiana.lib.twinpeaks.util.SessionContext; import java.util.ArrayList; import java.util.HashMap;
import edu.indiana.lib.twinpeaks.search.*; import edu.indiana.lib.twinpeaks.util.*; import java.util.*;
[ "edu.indiana.lib", "java.util" ]
edu.indiana.lib; java.util;
1,651,558
public void drop(Id.DatasetInstance instance) throws Exception { // Throws NamespaceNotFoundException if the namespace does not exist ensureNamespaceExists(instance.getNamespace()); LOG.info("Deleting dataset {}.{}", instance.getNamespaceId(), instance.getId()); DatasetSpecification spec = instanceMan...
void function(Id.DatasetInstance instance) throws Exception { ensureNamespaceExists(instance.getNamespace()); LOG.info(STR, instance.getNamespaceId(), instance.getId()); DatasetSpecification spec = instanceManager.get(instance); if (spec == null) { throw new DatasetNotFoundException(instance); } dropDataset(instance, s...
/** * Drops the specified dataset instance. * * @param instance the {@link Id.DatasetInstance} to drop * @throws NamespaceNotFoundException if the namespace was not found * @throws DatasetNotFoundException if the dataset instance was not found * @throws IOException if there was a problem in checking i...
Drops the specified dataset instance
drop
{ "repo_name": "mpouttuclarke/cdap", "path": "cdap-data-fabric/src/main/java/co/cask/cdap/data2/datafabric/dataset/service/DatasetInstanceService.java", "license": "apache-2.0", "size": 16397 }
[ "co.cask.cdap.api.dataset.DatasetSpecification", "co.cask.cdap.common.DatasetNotFoundException", "co.cask.cdap.proto.Id" ]
import co.cask.cdap.api.dataset.DatasetSpecification; import co.cask.cdap.common.DatasetNotFoundException; import co.cask.cdap.proto.Id;
import co.cask.cdap.api.dataset.*; import co.cask.cdap.common.*; import co.cask.cdap.proto.*;
[ "co.cask.cdap" ]
co.cask.cdap;
753,522
private double[] geolocate() { double[] values = {0.0, 0.0, 0.0, 0.0}; HttpClient httpclient = new DefaultHttpClient(); try { HttpGet httpget = new HttpGet(DishHelper.GEOLOCATION_URL); HttpResponse response = httpclient.execute(httpget); HttpEntity entity = response.getEntity(); if (entity != nu...
double[] function() { double[] values = {0.0, 0.0, 0.0, 0.0}; HttpClient httpclient = new DefaultHttpClient(); try { HttpGet httpget = new HttpGet(DishHelper.GEOLOCATION_URL); HttpResponse response = httpclient.execute(httpget); HttpEntity entity = response.getEntity(); if (entity != null) { DocumentBuilder builder = D...
/** * Attempts to locate the user's machine using IP-based geolocation * from ipinfodb.com. * * @return Double array containing the latitude, latitude sign, longitude, and longitude sign. These values will be all zeroes if lookup fails. */
Attempts to locate the user's machine using IP-based geolocation from ipinfodb.com
geolocate
{ "repo_name": "okeeblow/DishHelper", "path": "src/org/cooltrainer/dishhelper/DishHelper.java", "license": "epl-1.0", "size": 48666 }
[ "java.io.IOException", "java.net.UnknownHostException", "java.text.DecimalFormat", "java.text.ParseException", "javax.xml.parsers.DocumentBuilder", "javax.xml.parsers.DocumentBuilderFactory", "javax.xml.parsers.ParserConfigurationException", "org.apache.http.HttpEntity", "org.apache.http.HttpRespons...
import java.io.IOException; import java.net.UnknownHostException; import java.text.DecimalFormat; import java.text.ParseException; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import org.apache.http.HttpEntity; import o...
import java.io.*; import java.net.*; import java.text.*; import javax.xml.parsers.*; import org.apache.http.*; import org.apache.http.client.*; import org.apache.http.client.methods.*; import org.apache.http.impl.client.*; import org.w3c.dom.*; import org.xml.sax.*;
[ "java.io", "java.net", "java.text", "javax.xml", "org.apache.http", "org.w3c.dom", "org.xml.sax" ]
java.io; java.net; java.text; javax.xml; org.apache.http; org.w3c.dom; org.xml.sax;
1,668,102
@Override public AuraLocale getAuraLocale() { // use requested locales from context // check for nulls - this happens when AuraContextFilter has not been run final AuraContext context = contextService.getCurrentContext(); if (context == null) { throw new IllegalStateExce...
AuraLocale function() { final AuraContext context = contextService.getCurrentContext(); if (context == null) { throw new IllegalStateException(STR); } final List<Locale> locales = context.getRequestedLocales(); if (locales != null && !locales.isEmpty()) { return new AuraLocaleImpl(locales.get(0)); } return new AuraLoca...
/** * Creates a AuraLocale using the first Locale specified in the Http Request * based on the Accept-Language header values when available, otherwise the * default is used. */
Creates a AuraLocale using the first Locale specified in the Http Request based on the Accept-Language header values when available, otherwise the default is used
getAuraLocale
{ "repo_name": "forcedotcom/aura", "path": "aura-impl/src/main/java/org/auraframework/impl/context/LocalizationAdapterImpl.java", "license": "apache-2.0", "size": 7673 }
[ "java.util.List", "java.util.Locale", "org.auraframework.impl.util.AuraLocaleImpl", "org.auraframework.system.AuraContext", "org.auraframework.util.AuraLocale" ]
import java.util.List; import java.util.Locale; import org.auraframework.impl.util.AuraLocaleImpl; import org.auraframework.system.AuraContext; import org.auraframework.util.AuraLocale;
import java.util.*; import org.auraframework.impl.util.*; import org.auraframework.system.*; import org.auraframework.util.*;
[ "java.util", "org.auraframework.impl", "org.auraframework.system", "org.auraframework.util" ]
java.util; org.auraframework.impl; org.auraframework.system; org.auraframework.util;
1,025,547
protected void checkKeyType( ValidationReport.Builder<ExecutableElement> builder, TypeMirror keyType) { TypeKind kind = keyType.getKind(); if (kind.equals(VOID)) { builder.addError(formatErrorMessage(BINDING_METHOD_MUST_RETURN_A_VALUE)); } else if (!(kind.isPrimitive() || kind.equals(D...
void function( ValidationReport.Builder<ExecutableElement> builder, TypeMirror keyType) { TypeKind kind = keyType.getKind(); if (kind.equals(VOID)) { builder.addError(formatErrorMessage(BINDING_METHOD_MUST_RETURN_A_VALUE)); } else if (!(kind.isPrimitive() kind.equals(DECLARED) kind.equals(ARRAY) kind.equals(TYPEVAR))) ...
/** * Adds an error if {@code keyType} is not a primitive, declared type, array, or type variable. */
Adds an error if keyType is not a primitive, declared type, array, or type variable
checkKeyType
{ "repo_name": "AttwellBrian/dagger", "path": "compiler/src/main/java/dagger/internal/codegen/BindingMethodValidator.java", "license": "apache-2.0", "size": 20008 }
[ "javax.lang.model.element.ExecutableElement", "javax.lang.model.type.TypeKind", "javax.lang.model.type.TypeMirror" ]
import javax.lang.model.element.ExecutableElement; import javax.lang.model.type.TypeKind; import javax.lang.model.type.TypeMirror;
import javax.lang.model.element.*; import javax.lang.model.type.*;
[ "javax.lang" ]
javax.lang;
1,652,534
public static BlockReader newBlockReader(String file, ExtendedBlock block, Token<BlockTokenIdentifier> blockToken, long startOffset, long len, boolean verifyChecksum, ...
static BlockReader function(String file, ExtendedBlock block, Token<BlockTokenIdentifier> blockToken, long startOffset, long len, boolean verifyChecksum, String clientName, Peer peer, DatanodeID datanodeID, PeerCache peerCache, CachingStrategy cachingStrategy) throws IOException { final DataOutputStream out = new DataO...
/** * Create a new BlockReader specifically to satisfy a read. * This method also sends the OP_READ_BLOCK request. * * @param file File location * @param block The block object * @param blockToken The block token for security * @param startOffset The read offset, relative to block head * @pa...
Create a new BlockReader specifically to satisfy a read. This method also sends the OP_READ_BLOCK request
newBlockReader
{ "repo_name": "VicoWu/hadoop-2.7.3", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/RemoteBlockReader2.java", "license": "apache-2.0", "size": 16715 }
[ "java.io.BufferedOutputStream", "java.io.DataOutputStream", "java.io.IOException", "org.apache.hadoop.hdfs.net.Peer", "org.apache.hadoop.hdfs.protocol.DatanodeID", "org.apache.hadoop.hdfs.protocol.ExtendedBlock", "org.apache.hadoop.hdfs.protocol.datatransfer.DataTransferProtoUtil", "org.apache.hadoop....
import java.io.BufferedOutputStream; import java.io.DataOutputStream; import java.io.IOException; import org.apache.hadoop.hdfs.net.Peer; import org.apache.hadoop.hdfs.protocol.DatanodeID; import org.apache.hadoop.hdfs.protocol.ExtendedBlock; import org.apache.hadoop.hdfs.protocol.datatransfer.DataTransferProtoUtil; im...
import java.io.*; import org.apache.hadoop.hdfs.*; import org.apache.hadoop.hdfs.net.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.protocol.datatransfer.*; import org.apache.hadoop.hdfs.protocol.proto.*; import org.apache.hadoop.hdfs.security.token.block.*; import org.apache.hadoop.hdfs.ser...
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
765,723
public void brightness(int value) throws IOException, IllegalArgumentException { // check argument if (value < MilightColor.MIN_BRIGHTNESS || value > MilightColor.MAX_BRIGHTNESS) { throw new IllegalArgumentException( "The brightness value should be between MilightColor.MIN_BRIGHTNESS and MilightCo...
void function(int value) throws IOException, IllegalArgumentException { if (value < MilightColor.MIN_BRIGHTNESS value > MilightColor.MAX_BRIGHTNESS) { throw new IllegalArgumentException( STR); } sendMessage(COMMAND_BRIGHTNESS, value); }
/** * Set the brightness value for the currently active group of lights (the * last one that was switched on, see {@link WiFiBox#getActiveGroup()}). * * @param value * is the brightness value to set (between * MilightColor.MIN_BRIGHTNESS and MilightColor.MAX_BRIGHTNESS) * @throws IO...
Set the brightness value for the currently active group of lights (the last one that was switched on, see <code>WiFiBox#getActiveGroup()</code>)
brightness
{ "repo_name": "stoman/MilightAPI", "path": "src/de/toman/milight/WiFiBox.java", "license": "mit", "size": 39506 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,256,121
public static Method getPublicMethod(Method method) { Class clazz = method.getDeclaringClass(); if((clazz.getModifiers() & Modifier.PUBLIC) != 0) { return method; } return getPublicMethod(clazz, method.getName(), method.getParameterTypes())...
static Method function(Method method) { Class clazz = method.getDeclaringClass(); if((clazz.getModifiers() & Modifier.PUBLIC) != 0) { return method; } return getPublicMethod(clazz, method.getName(), method.getParameterTypes()); }
/** * For a given method, retrieves its publicly accessible counterpart. * This method will look for a method with same name * and signature declared in a public superclass or implemented interface of this * method's declaring class. This counterpart method is publicly callable. * ...
For a given method, retrieves its publicly accessible counterpart. This method will look for a method with same name and signature declared in a public superclass or implemented interface of this method's declaring class. This counterpart method is publicly callable
getPublicMethod
{ "repo_name": "fabioticconi/fscript", "path": "src/murlen/util/fscript/introspection/ClassMap.java", "license": "lgpl-2.1", "size": 17959 }
[ "java.lang.reflect.Method", "java.lang.reflect.Modifier" ]
import java.lang.reflect.Method; import java.lang.reflect.Modifier;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
2,534,224
type = Type.LONG; elementSize = 8; } public CudaLongDataBuffer(DataBuffer underlyingBuffer, long length, long offset) { super(underlyingBuffer, length, offset); } public CudaLongDataBuffer(double[] data) { this(data.length); setData(data); } public CudaLo...
type = Type.LONG; elementSize = 8; } public CudaLongDataBuffer(DataBuffer underlyingBuffer, long length, long offset) { super(underlyingBuffer, length, offset); } public CudaLongDataBuffer(double[] data) { this(data.length); setData(data); } public CudaLongDataBuffer(double[] data, boolean copy) { super(data, copy); } ...
/** * Initialize the type of this buffer */
Initialize the type of this buffer
initTypeAndSize
{ "repo_name": "huitseeker/nd4j", "path": "nd4j-backends/nd4j-backend-impls/nd4j-cuda/src/main/java/org/nd4j/linalg/jcublas/buffer/CudaLongDataBuffer.java", "license": "apache-2.0", "size": 7798 }
[ "java.nio.ByteBuffer", "org.nd4j.linalg.api.buffer.DataBuffer", "org.nd4j.linalg.api.memory.MemoryWorkspace" ]
import java.nio.ByteBuffer; import org.nd4j.linalg.api.buffer.DataBuffer; import org.nd4j.linalg.api.memory.MemoryWorkspace;
import java.nio.*; import org.nd4j.linalg.api.buffer.*; import org.nd4j.linalg.api.memory.*;
[ "java.nio", "org.nd4j.linalg" ]
java.nio; org.nd4j.linalg;
505,147
public void setWorld(World par1World) { this.worldObj = par1World; Iterator var2 = this.specialRendererMap.values().iterator(); while (var2.hasNext()) { TileEntitySpecialRenderer var3 = (TileEntitySpecialRenderer)var2.next(); if (var3 != null) ...
void function(World par1World) { this.worldObj = par1World; Iterator var2 = this.specialRendererMap.values().iterator(); while (var2.hasNext()) { TileEntitySpecialRenderer var3 = (TileEntitySpecialRenderer)var2.next(); if (var3 != null) { var3.onWorldChange(par1World); } } }
/** * Sets the world used by all TileEntitySpecialRender instances and notifies them of this change. */
Sets the world used by all TileEntitySpecialRender instances and notifies them of this change
setWorld
{ "repo_name": "LolololTrololol/InsertNameHere", "path": "minecraft/net/minecraft/src/TileEntityRenderer.java", "license": "gpl-2.0", "size": 7553 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
2,633,572
public void setErrorIndicatorPaint(Paint paint) { ParamChecks.nullNotPermitted(paint, "paint"); this.errorIndicatorPaint = paint; }
void function(Paint paint) { ParamChecks.nullNotPermitted(paint, "paint"); this.errorIndicatorPaint = paint; }
/** * Sets the error indicator paint. * * @param paint the paint (<code>null</code> not permitted). * * @see #getErrorIndicatorPaint() */
Sets the error indicator paint
setErrorIndicatorPaint
{ "repo_name": "sebkur/JFreeChart", "path": "src/main/java/org/jfree/chart/StandardChartTheme.java", "license": "lgpl-3.0", "size": 60532 }
[ "java.awt.Paint", "org.jfree.chart.util.ParamChecks" ]
import java.awt.Paint; import org.jfree.chart.util.ParamChecks;
import java.awt.*; import org.jfree.chart.util.*;
[ "java.awt", "org.jfree.chart" ]
java.awt; org.jfree.chart;
2,796,923
public Table addRow(List<Object> items) { this.value.add(items); return this; }
Table function(List<Object> items) { this.value.add(items); return this; }
/** * Add a row to this Table through a List * * @param items * @return this */
Add a row to this Table through a List
addRow
{ "repo_name": "Nektro/Nub", "path": "src/core/io/nub/core/extras/Table.java", "license": "mit", "size": 1726 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,022,617
JSONObject getInnerJSONObject();
JSONObject getInnerJSONObject();
/** * Gets the underlying JSONObject representation of this graph object. * @return the underlying JSONObject representation of this graph object */
Gets the underlying JSONObject representation of this graph object
getInnerJSONObject
{ "repo_name": "ashokslsk/yelo-android", "path": "libraries/facebookSDK/src/main/java/com/facebook/model/GraphObject.java", "license": "apache-2.0", "size": 39065 }
[ "org.json.JSONObject" ]
import org.json.JSONObject;
import org.json.*;
[ "org.json" ]
org.json;
1,355,003
public static boolean hasPossibleStaticProperty(ClassNode cNode, String methodName) { // assume explicit static method call checked first so we can assume a simple check here if (!methodName.startsWith("get") && !methodName.startsWith("is")) { return false; } String propN...
static boolean function(ClassNode cNode, String methodName) { if (!methodName.startsWith("get") && !methodName.startsWith("is")) { return false; } String propName = getPropNameForAccessor(methodName); PropertyNode pNode = getStaticProperty(cNode, propName); return pNode != null && (methodName.startsWith("get") boolean_...
/** * Return true if we have a static accessor */
Return true if we have a static accessor
hasPossibleStaticProperty
{ "repo_name": "russel/incubator-groovy", "path": "src/main/java/org/apache/groovy/ast/tools/ClassNodeUtils.java", "license": "apache-2.0", "size": 16053 }
[ "org.codehaus.groovy.ast.ClassNode", "org.codehaus.groovy.ast.PropertyNode" ]
import org.codehaus.groovy.ast.ClassNode; import org.codehaus.groovy.ast.PropertyNode;
import org.codehaus.groovy.ast.*;
[ "org.codehaus.groovy" ]
org.codehaus.groovy;
2,569,406
public static void testRelLogicalJoinOrder(String sql, String... expectedSubstrs) throws Exception { final String planStr = getDrillRelPlanInString(sql, SqlExplainLevel.EXPPLAN_ATTRIBUTES, Depth.LOGICAL); final String prefixJoinOrder = getLogicalPrefixJoinOrderFromPlan(planStr); for (final String substr :...
static void function(String sql, String... expectedSubstrs) throws Exception { final String planStr = getDrillRelPlanInString(sql, SqlExplainLevel.EXPPLAN_ATTRIBUTES, Depth.LOGICAL); final String prefixJoinOrder = getLogicalPrefixJoinOrderFromPlan(planStr); for (final String substr : expectedSubstrs) { assertTrue(Strin...
/** * This method will take a SQL string statement, get the LOGICAL plan in Optiq * RelNode format. Then check the physical plan against the list expected * substrs. Verify all the expected strings are contained in the physical plan * string. */
This method will take a SQL string statement, get the LOGICAL plan in Optiq RelNode format. Then check the physical plan against the list expected substrs. Verify all the expected strings are contained in the physical plan string
testRelLogicalJoinOrder
{ "repo_name": "johnnywale/drill", "path": "exec/java-exec/src/test/java/org/apache/drill/PlanTestBase.java", "license": "apache-2.0", "size": 20491 }
[ "org.apache.calcite.sql.SqlExplain", "org.apache.calcite.sql.SqlExplainLevel", "org.junit.Assert" ]
import org.apache.calcite.sql.SqlExplain; import org.apache.calcite.sql.SqlExplainLevel; import org.junit.Assert;
import org.apache.calcite.sql.*; import org.junit.*;
[ "org.apache.calcite", "org.junit" ]
org.apache.calcite; org.junit;
359,104
public ArrayList<TfvcBranchRef> getBranchRefs( final String scopePath, final Boolean includeDeleted, final Boolean includeLinks) { final UUID locationId = UUID.fromString("bc1f417e-239d-42e7-85e1-76e80cb2d6eb"); //$NON-NLS-1$ final ApiResourceVersion apiVersion = new ApiR...
ArrayList<TfvcBranchRef> function( final String scopePath, final Boolean includeDeleted, final Boolean includeLinks) { final UUID locationId = UUID.fromString(STR); final ApiResourceVersion apiVersion = new ApiResourceVersion(STR); final NameValueCollection queryParameters = new NameValueCollection(); queryParameters.a...
/** * [Preview API 3.1-preview.1] Get branch hierarchies below the specified scopePath * * @param scopePath * * @param includeDeleted * * @param includeLinks * * @return ArrayList&lt;TfvcBranchRef&gt; */
[Preview API 3.1-preview.1] Get branch hierarchies below the specified scopePath
getBranchRefs
{ "repo_name": "Microsoft/vso-httpclient-java", "path": "Rest/alm-tfs-client/src/main/generated/com/microsoft/alm/teamfoundation/sourcecontrol/webapi/TfvcHttpClientBase.java", "license": "mit", "size": 99570 }
[ "com.fasterxml.jackson.core.type.TypeReference", "com.microsoft.alm.client.HttpMethod", "com.microsoft.alm.client.VssMediaTypes", "com.microsoft.alm.client.VssRestRequest", "com.microsoft.alm.client.model.NameValueCollection", "com.microsoft.alm.teamfoundation.sourcecontrol.webapi.TfvcBranchRef", "com.m...
import com.fasterxml.jackson.core.type.TypeReference; import com.microsoft.alm.client.HttpMethod; import com.microsoft.alm.client.VssMediaTypes; import com.microsoft.alm.client.VssRestRequest; import com.microsoft.alm.client.model.NameValueCollection; import com.microsoft.alm.teamfoundation.sourcecontrol.webapi.TfvcBra...
import com.fasterxml.jackson.core.type.*; import com.microsoft.alm.client.*; import com.microsoft.alm.client.model.*; import com.microsoft.alm.teamfoundation.sourcecontrol.webapi.*; import com.microsoft.alm.visualstudio.services.webapi.*; import java.util.*;
[ "com.fasterxml.jackson", "com.microsoft.alm", "java.util" ]
com.fasterxml.jackson; com.microsoft.alm; java.util;
1,896,292
public void invokeEvents(Class<?> eventType, Object... args) throws TestConfigurationException, TestInterruptedException { EventDescriptorsContainer edc = testDescriptor.getEventContainer().get(eventType); if (edc != null) { for (EventDescriptor eventDescriptor : edc.getDescriptors().val...
void function(Class<?> eventType, Object... args) throws TestConfigurationException, TestInterruptedException { EventDescriptorsContainer edc = testDescriptor.getEventContainer().get(eventType); if (edc != null) { for (EventDescriptor eventDescriptor : edc.getDescriptors().values()) { try { eventDescriptor.getMethod()....
/** * Invokes all methods of test which match the specified event type * * @param event * @param args * @throws TestConfigurationException * @throws TestInterruptedException */
Invokes all methods of test which match the specified event type
invokeEvents
{ "repo_name": "ishubin/oculus-experior", "path": "src/main/java/net/mindengine/oculus/experior/test/TestRunner.java", "license": "apache-2.0", "size": 23906 }
[ "java.lang.reflect.InvocationTargetException", "net.mindengine.oculus.experior.exception.TestConfigurationException", "net.mindengine.oculus.experior.exception.TestInterruptedException", "net.mindengine.oculus.experior.test.descriptors.EventDescriptor", "net.mindengine.oculus.experior.test.descriptors.Event...
import java.lang.reflect.InvocationTargetException; import net.mindengine.oculus.experior.exception.TestConfigurationException; import net.mindengine.oculus.experior.exception.TestInterruptedException; import net.mindengine.oculus.experior.test.descriptors.EventDescriptor; import net.mindengine.oculus.experior.test.des...
import java.lang.reflect.*; import net.mindengine.oculus.experior.exception.*; import net.mindengine.oculus.experior.test.descriptors.*;
[ "java.lang", "net.mindengine.oculus" ]
java.lang; net.mindengine.oculus;
2,834,389
@Override public Object getDeserializedValue() { if (this.valueIsObject == 0x00) { Object result = this.value; if (result == null) { @Unretained(OffHeapIdentifier.GATEWAY_SENDER_EVENT_IMPL_VALUE) Object so = this.valueObj; if (this.valueObjReleased) { throw new Ille...
Object function() { if (this.valueIsObject == 0x00) { Object result = this.value; if (result == null) { @Unretained(OffHeapIdentifier.GATEWAY_SENDER_EVENT_IMPL_VALUE) Object so = this.valueObj; if (this.valueObjReleased) { throw new IllegalStateException( STR); } if (so instanceof StoredObject) { return ((StoredObject)...
/** * Return this event's deserialized value * * @return this event's deserialized value */
Return this event's deserialized value
getDeserializedValue
{ "repo_name": "davinash/geode", "path": "geode-core/src/main/java/org/apache/geode/internal/cache/wan/GatewaySenderEventImpl.java", "license": "apache-2.0", "size": 45773 }
[ "org.apache.geode.internal.cache.EntryEventImpl", "org.apache.geode.internal.offheap.StoredObject", "org.apache.geode.internal.offheap.annotations.OffHeapIdentifier", "org.apache.geode.internal.offheap.annotations.Unretained" ]
import org.apache.geode.internal.cache.EntryEventImpl; import org.apache.geode.internal.offheap.StoredObject; import org.apache.geode.internal.offheap.annotations.OffHeapIdentifier; import org.apache.geode.internal.offheap.annotations.Unretained;
import org.apache.geode.internal.cache.*; import org.apache.geode.internal.offheap.*; import org.apache.geode.internal.offheap.annotations.*;
[ "org.apache.geode" ]
org.apache.geode;
2,822,898
public Optional<Event> toEvent(EventTypeMatcher typeMatcher, ObjectMapper objectMapper) { BiFunction<JsonNode, Type, Object> deserialiser = makeDeserialiser(objectMapper); return toRepresentation().toEvent(typeMatcher, (schema, nodeMap) -> schema.deserialise(deserialiser, nodeMap));...
Optional<Event> function(EventTypeMatcher typeMatcher, ObjectMapper objectMapper) { BiFunction<JsonNode, Type, Object> deserialiser = makeDeserialiser(objectMapper); return toRepresentation().toEvent(typeMatcher, (schema, nodeMap) -> schema.deserialise(deserialiser, nodeMap)); }
/** * Convert this {@link EventJson} to an {@link Event}, using the supplied {@link EventTypeMatcher} and * {@link ObjectMapper}. * @param typeMatcher The {@link EventTypeMatcher} to use to resolve {@link EventType}s to * {@link com.opencredo.concursus.data.tuples.TupleSchema}s * @param objectM...
Convert this <code>EventJson</code> to an <code>Event</code>, using the supplied <code>EventTypeMatcher</code> and <code>ObjectMapper</code>
toEvent
{ "repo_name": "opencredo/concourse", "path": "concursus-domain-json/src/main/java/com/opencredo/concursus/domain/json/events/EventJson.java", "license": "mit", "size": 5365 }
[ "com.fasterxml.jackson.databind.JsonNode", "com.fasterxml.jackson.databind.ObjectMapper", "com.opencredo.concursus.domain.events.Event", "com.opencredo.concursus.domain.events.matching.EventTypeMatcher", "java.lang.reflect.Type", "java.util.Optional", "java.util.function.BiFunction" ]
import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import com.opencredo.concursus.domain.events.Event; import com.opencredo.concursus.domain.events.matching.EventTypeMatcher; import java.lang.reflect.Type; import java.util.Optional; import java.util.function.BiFunction;
import com.fasterxml.jackson.databind.*; import com.opencredo.concursus.domain.events.*; import com.opencredo.concursus.domain.events.matching.*; import java.lang.reflect.*; import java.util.*; import java.util.function.*;
[ "com.fasterxml.jackson", "com.opencredo.concursus", "java.lang", "java.util" ]
com.fasterxml.jackson; com.opencredo.concursus; java.lang; java.util;
2,031,497
public Operation.Info create( String name , List<Variable> vars ) { InputN func = inputN.get(name); if( func == null ) return null; return func.create(vars,managerTemp); }
Operation.Info function( String name , List<Variable> vars ) { InputN func = inputN.get(name); if( func == null ) return null; return func.create(vars,managerTemp); }
/** * Create a new instance of single input functions * @param name function name * @param vars Input variables * @return Resulting operation */
Create a new instance of single input functions
create
{ "repo_name": "sizuest/EMod", "path": "ch.ethz.inspire.emod/ejml-v0.26-src/main/equation/src/org/ejml/equation/ManagerFunctions.java", "license": "gpl-3.0", "size": 11767 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
421,226
@Override protected void sendData(OutputStream out) throws IOException { out.write(getContent()); }
void function(OutputStream out) throws IOException { out.write(getContent()); }
/** * Writes the data to the given OutputStream. * @param out the OutputStream to write to * @throws IOException if there is a write error */
Writes the data to the given OutputStream
sendData
{ "repo_name": "austgl/transdroid", "path": "lib/src/com/android/internalcopy/http/multipart/StringPart.java", "license": "gpl-3.0", "size": 4734 }
[ "java.io.IOException", "java.io.OutputStream" ]
import java.io.IOException; import java.io.OutputStream;
import java.io.*;
[ "java.io" ]
java.io;
693,243
public static void notify(final Context context, final String reason, final int number) { final Resources res = context.getResources(); final String ticker = reason; final String title = res.getString(R.string.silencer_notification_title); final String ...
static void function(final Context context, final String reason, final int number) { final Resources res = context.getResources(); final String ticker = reason; final String title = res.getString(R.string.silencer_notification_title); final String text = res.getString(R.string.silencer_notification_text, reason); Inten...
/** * Shows the notification, or updates a previously shown notification of * this type, with the given parameters. * * @see #cancel(Context) */
Shows the notification, or updates a previously shown notification of this type, with the given parameters
notify
{ "repo_name": "cmiicbrg/MutePhoneInClass", "path": "app/src/main/java/at/ac/brgenns/android/mutePhoneInClass/SilencerNotification.java", "license": "gpl-3.0", "size": 4375 }
[ "android.app.Notification", "android.app.PendingIntent", "android.content.Context", "android.content.Intent", "android.content.res.Resources", "android.support.v4.app.NotificationCompat", "at.ac.brgenns.android.mutePhoneInClass.prefs.MuteSettingsActivity", "java.text.DateFormat", "java.util.Date" ]
import android.app.Notification; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.content.res.Resources; import android.support.v4.app.NotificationCompat; import at.ac.brgenns.android.mutePhoneInClass.prefs.MuteSettingsActivity; import java.text.DateFormat;...
import android.app.*; import android.content.*; import android.content.res.*; import android.support.v4.app.*; import at.ac.brgenns.android.*; import java.text.*; import java.util.*;
[ "android.app", "android.content", "android.support", "at.ac.brgenns", "java.text", "java.util" ]
android.app; android.content; android.support; at.ac.brgenns; java.text; java.util;
1,616,022
public static Task create(Connection c, String label, String description) throws BadServerResponse, XenAPIException, XmlRpcException { String method_call = "task.create"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), M...
static Task function(Connection c, String label, String description) throws BadServerResponse, XenAPIException, XmlRpcException { String method_call = STR; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(label), Marshalling.toXMLRPC(description)}; ...
/** * Create a new task object which must be manually destroyed. * * @param label short label for the new task * @param description longer description for the new task * @return The reference of the created task object */
Create a new task object which must be manually destroyed
create
{ "repo_name": "mufaddalq/cloudstack-datera-driver", "path": "deps/XenServerJava/src/com/xensource/xenapi/Task.java", "license": "apache-2.0", "size": 25995 }
[ "com.xensource.xenapi.Types", "java.util.Map", "org.apache.xmlrpc.XmlRpcException" ]
import com.xensource.xenapi.Types; import java.util.Map; import org.apache.xmlrpc.XmlRpcException;
import com.xensource.xenapi.*; import java.util.*; import org.apache.xmlrpc.*;
[ "com.xensource.xenapi", "java.util", "org.apache.xmlrpc" ]
com.xensource.xenapi; java.util; org.apache.xmlrpc;
1,130,355
void reclaimPrepareLocks( Transaction t, LockingPolicy locking_policy) throws StandardException;
void reclaimPrepareLocks( Transaction t, LockingPolicy locking_policy) throws StandardException;
/** * reclaim locks associated with the changes in this log record. * <p> * * @exception StandardException Standard exception policy. **/
reclaim locks associated with the changes in this log record.
reclaimPrepareLocks
{ "repo_name": "apache/derby", "path": "java/org.apache.derby.engine/org/apache/derby/iapi/store/raw/RePreparable.java", "license": "apache-2.0", "size": 1609 }
[ "org.apache.derby.iapi.store.raw.LockingPolicy", "org.apache.derby.iapi.store.raw.Transaction", "org.apache.derby.shared.common.error.StandardException" ]
import org.apache.derby.iapi.store.raw.LockingPolicy; import org.apache.derby.iapi.store.raw.Transaction; import org.apache.derby.shared.common.error.StandardException;
import org.apache.derby.iapi.store.raw.*; import org.apache.derby.shared.common.error.*;
[ "org.apache.derby" ]
org.apache.derby;
1,347,591
public void mouseScroll(MouseWheelEvent e){ location=new Vector2(e.getX(),e.getY()); mouseScroll+=e.getWheelRotation(); }
void function(MouseWheelEvent e){ location=new Vector2(e.getX(),e.getY()); mouseScroll+=e.getWheelRotation(); }
/** * Sets the number of rotations the mouse wheel has made * @param e the mouse Wheel event */
Sets the number of rotations the mouse wheel has made
mouseScroll
{ "repo_name": "Nekel-Seyew/sweeney-game-development-environment-2", "path": "SGDE2/src/Utilities/Mouse.java", "license": "gpl-2.0", "size": 7129 }
[ "java.awt.event.MouseWheelEvent" ]
import java.awt.event.MouseWheelEvent;
import java.awt.event.*;
[ "java.awt" ]
java.awt;
2,012,176
@Override public void targetStarted(BuildEvent event) { targetName = event.getTarget().getName(); }
void function(BuildEvent event) { targetName = event.getTarget().getName(); }
/** * Notes the name of the target so it can be logged * if it generates any messages. * * @param event A BuildEvent containing target information. * Must not be <code>null</code>. */
Notes the name of the target so it can be logged if it generates any messages
targetStarted
{ "repo_name": "clockworkorange/grails-core", "path": "grails-bootstrap/src/main/groovy/org/grails/build/logging/GrailsConsoleAntBuilder.java", "license": "apache-2.0", "size": 4639 }
[ "org.apache.tools.ant.BuildEvent" ]
import org.apache.tools.ant.BuildEvent;
import org.apache.tools.ant.*;
[ "org.apache.tools" ]
org.apache.tools;
1,524,981
public static String generateResetKey() { return RandomStringUtils.randomNumeric(DEF_COUNT); }
static String function() { return RandomStringUtils.randomNumeric(DEF_COUNT); }
/** * Generate a reset key. * * @return the generated reset key */
Generate a reset key
generateResetKey
{ "repo_name": "kalnee/trivor", "path": "gateway/src/main/java/org/kalnee/trivor/gateway/service/util/RandomUtil.java", "license": "mit", "size": 895 }
[ "org.apache.commons.lang3.RandomStringUtils" ]
import org.apache.commons.lang3.RandomStringUtils;
import org.apache.commons.lang3.*;
[ "org.apache.commons" ]
org.apache.commons;
1,900,979
public static void log(Logger logger, SQLException e) { SQLException next = e.getNextException(); while (next != null) { logger.error("SQL error: {}. Message: {}", next.getSQLState(), next.getMessage()); next = next.getNextException(); } }
static void function(Logger logger, SQLException e) { SQLException next = e.getNextException(); while (next != null) { logger.error(STR, next.getSQLState(), next.getMessage()); next = next.getNextException(); } }
/** * Logback does not log exceptions associated to {@link java.sql.SQLException#getNextException()}. * See http://jira.qos.ch/browse/LOGBACK-775 */
Logback does not log exceptions associated to <code>java.sql.SQLException#getNextException()</code>. See HREF
log
{ "repo_name": "jblievremont/sonarqube", "path": "server/sonar-server/src/main/java/org/sonar/server/db/migrations/SqlUtil.java", "license": "lgpl-3.0", "size": 3279 }
[ "java.sql.SQLException", "org.sonar.api.utils.log.Logger" ]
import java.sql.SQLException; import org.sonar.api.utils.log.Logger;
import java.sql.*; import org.sonar.api.utils.log.*;
[ "java.sql", "org.sonar.api" ]
java.sql; org.sonar.api;
1,157,693
public Foo findByField2_First(boolean field2, com.liferay.portal.kernel.util.OrderByComparator<Foo> orderByComparator) throws NoSuchFooException;
Foo function(boolean field2, com.liferay.portal.kernel.util.OrderByComparator<Foo> orderByComparator) throws NoSuchFooException;
/** * Returns the first foo in the ordered set where field2 = &#63;. * * @param field2 the field2 * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the first matching foo * @throws NoSuchFooException if a matching foo could not be found */
Returns the first foo in the ordered set where field2 = &#63;
findByField2_First
{ "repo_name": "rafoli/liferay-blade-samples", "path": "maven/apps/service-builder/basic/basic-api/src/main/java/com/liferay/blade/samples/servicebuilder/service/persistence/FooPersistence.java", "license": "apache-2.0", "size": 31389 }
[ "com.liferay.blade.samples.servicebuilder.exception.NoSuchFooException", "com.liferay.blade.samples.servicebuilder.model.Foo" ]
import com.liferay.blade.samples.servicebuilder.exception.NoSuchFooException; import com.liferay.blade.samples.servicebuilder.model.Foo;
import com.liferay.blade.samples.servicebuilder.exception.*; import com.liferay.blade.samples.servicebuilder.model.*;
[ "com.liferay.blade" ]
com.liferay.blade;
1,934,359
public void printManual(PrintWriter out) { out.println("<table width=\"100%\">"); Option[] opts = getOptions(); QuickSorter.quickSort(new ArraySorter(opts)); for (int i=0; i<opts.length; ++i) { out.println("<tr>"); String name = htmlEnc(opts[i].name()); ...
void function(PrintWriter out) { out.println(STR100%\">"); Option[] opts = getOptions(); QuickSorter.quickSort(new ArraySorter(opts)); for (int i=0; i<opts.length; ++i) { out.println("<tr>"); String name = htmlEnc(opts[i].name()); out.print(STR + name + STR + name); if (opts[i].abbrev() != (char) 0) out.print(STR + opt...
/** * Prints manual entries in an html format. */
Prints manual entries in an html format
printManual
{ "repo_name": "freenet/legacy", "path": "src/freenet/config/Config.java", "license": "gpl-2.0", "size": 12560 }
[ "java.io.PrintWriter" ]
import java.io.PrintWriter;
import java.io.*;
[ "java.io" ]
java.io;
578,223
public Type typeCheck(SymbolTable stable) throws TypeCheckError { // Check the argument type (if any) switch(argumentCount()) { case 0: _paramType = Type.Node; break; case 1: _paramType = _param.typeCheck(stable); break; default: throw new TypeCheckError(this); } // T...
Type function(SymbolTable stable) throws TypeCheckError { switch(argumentCount()) { case 0: _paramType = Type.Node; break; case 1: _paramType = _param.typeCheck(stable); break; default: throw new TypeCheckError(this); } if ((_paramType != Type.NodeSet) && (_paramType != Type.Node) && (_paramType != Type.Reference)) { t...
/** * Check that we either have no parameters or one parameter that is * either a node or a node-set. */
Check that we either have no parameters or one parameter that is either a node or a node-set
typeCheck
{ "repo_name": "srnsw/xena", "path": "xena/ext/src/xalan-j_2_7_1/src/org/apache/xalan/xsltc/compiler/NameBase.java", "license": "gpl-3.0", "size": 3799 }
[ "org.apache.xalan.xsltc.compiler.util.Type", "org.apache.xalan.xsltc.compiler.util.TypeCheckError" ]
import org.apache.xalan.xsltc.compiler.util.Type; import org.apache.xalan.xsltc.compiler.util.TypeCheckError;
import org.apache.xalan.xsltc.compiler.util.*;
[ "org.apache.xalan" ]
org.apache.xalan;
417,930
@CalledByNative("BookmarksCallback") void onBookmarksFolderHierarchyAvailable(BookmarkId folderId, List<BookmarkItem> bookmarksList); }
@CalledByNative(STR) void onBookmarksFolderHierarchyAvailable(BookmarkId folderId, List<BookmarkItem> bookmarksList); }
/** * Callback method for fetching the folder hierarchy. * @param folderId The folder id to which the bookmarks belong. * @param bookmarksList List holding the fetched folder details. */
Callback method for fetching the folder hierarchy
onBookmarksFolderHierarchyAvailable
{ "repo_name": "morristech/android-chromium", "path": "chromium/chrome/src/main/java/org/chromium/chrome/browser/BookmarksBridge.java", "license": "bsd-2-clause", "size": 17712 }
[ "java.util.List", "org.chromium.base.CalledByNative" ]
import java.util.List; import org.chromium.base.CalledByNative;
import java.util.*; import org.chromium.base.*;
[ "java.util", "org.chromium.base" ]
java.util; org.chromium.base;
1,690,770
public static Resource produceResource(ResourceSpecifier aSpecifier, Map<String, Object> aAdditionalParams) throws ResourceInitializationException { return produceResource(Resource.class, aSpecifier, aAdditionalParams); }
static Resource function(ResourceSpecifier aSpecifier, Map<String, Object> aAdditionalParams) throws ResourceInitializationException { return produceResource(Resource.class, aSpecifier, aAdditionalParams); }
/** * Produces an appropriate <code>Resource</code> instance from a <code>ResourceSpecifier</code>. * The <code>ResourceSpecifier</code> may either specify how to construct a new instance or how to * locate an existing instance. * * @param aSpecifier * an object that specifies how to acquire...
Produces an appropriate <code>Resource</code> instance from a <code>ResourceSpecifier</code>. The <code>ResourceSpecifier</code> may either specify how to construct a new instance or how to locate an existing instance
produceResource
{ "repo_name": "apache/uima-uimaj", "path": "uimaj-core/src/main/java/org/apache/uima/UIMAFramework.java", "license": "apache-2.0", "size": 64569 }
[ "java.util.Map", "org.apache.uima.resource.Resource", "org.apache.uima.resource.ResourceInitializationException", "org.apache.uima.resource.ResourceSpecifier" ]
import java.util.Map; import org.apache.uima.resource.Resource; import org.apache.uima.resource.ResourceInitializationException; import org.apache.uima.resource.ResourceSpecifier;
import java.util.*; import org.apache.uima.resource.*;
[ "java.util", "org.apache.uima" ]
java.util; org.apache.uima;
153,840
public boolean addRecipient(final String address) throws IOException { return SMTPReply.isPositiveCompletion(rcpt("<" + address + ">")); }
boolean function(final String address) throws IOException { return SMTPReply.isPositiveCompletion(rcpt("<" + address + ">")); }
/** * Add a recipient for a message using the SMTP RCPT command, the * recipient's email address. The sender must be set first before any * recipients may be specified, otherwise the mail server will reject * your commands. * <p> * @param address The recipient's email address. * @re...
Add a recipient for a message using the SMTP RCPT command, the recipient's email address. The sender must be set first before any recipients may be specified, otherwise the mail server will reject your commands.
addRecipient
{ "repo_name": "apache/commons-net", "path": "src/main/java/org/apache/commons/net/smtp/SMTPClient.java", "license": "apache-2.0", "size": 26389 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,437,823
CSVReader csvReader; if (null == this.connection) { throw new RuntimeException("Not a valid connection."); } try { csvReader = new CSVReader(new FileReader(csvFile), this.separator); } catch (Exception ex) { throw new RuntimeException("Error occurred ...
CSVReader csvReader; if (null == this.connection) { throw new RuntimeException(STR); } try { csvReader = new CSVReader(new FileReader(csvFile), this.separator); } catch (Exception ex) { throw new RuntimeException(STR + ex.getMessage()); } String[] headerRow = csvReader.readNext(); if (null == headerRow) { throw new Efw...
/** * Parse CSV file using OpenCSV library and load in * given database table. * * @param csvFile Input CSV file * @param tableName Database table name to import data * @param truncateBeforeLoad Truncate the table before inserting * new re...
Parse CSV file using OpenCSV library and load in given database table
loadCSV
{ "repo_name": "helicalinsight/helicalinsight", "path": "core/src/main/java/com/helicalinsight/datasource/csv/CSVLoader.java", "license": "apache-2.0", "size": 5243 }
[ "au.com.bytecode.opencsv.CSVReader", "com.helicalinsight.efw.exceptions.EfwServiceException", "java.io.FileReader", "java.sql.PreparedStatement", "org.apache.commons.dbutils.DbUtils", "org.apache.commons.lang.StringUtils" ]
import au.com.bytecode.opencsv.CSVReader; import com.helicalinsight.efw.exceptions.EfwServiceException; import java.io.FileReader; import java.sql.PreparedStatement; import org.apache.commons.dbutils.DbUtils; import org.apache.commons.lang.StringUtils;
import au.com.bytecode.opencsv.*; import com.helicalinsight.efw.exceptions.*; import java.io.*; import java.sql.*; import org.apache.commons.dbutils.*; import org.apache.commons.lang.*;
[ "au.com.bytecode", "com.helicalinsight.efw", "java.io", "java.sql", "org.apache.commons" ]
au.com.bytecode; com.helicalinsight.efw; java.io; java.sql; org.apache.commons;
2,002,350
void dropDatabase(String name, boolean ignoreIfNotExists, boolean cascade) throws DatabaseNotExistException, DatabaseNotEmptyException, CatalogException;
void dropDatabase(String name, boolean ignoreIfNotExists, boolean cascade) throws DatabaseNotExistException, DatabaseNotEmptyException, CatalogException;
/** * Drop a database. * * @param name Name of the database to be dropped. * @param ignoreIfNotExists Flag to specify behavior when the database does not exist: if set to * false, throw an exception, if set to true, do nothing. * @param cascade Flag to specify behavior when the databas...
Drop a database
dropDatabase
{ "repo_name": "aljoscha/flink", "path": "flink-table/flink-table-common/src/main/java/org/apache/flink/table/catalog/Catalog.java", "license": "apache-2.0", "size": 28828 }
[ "org.apache.flink.table.catalog.exceptions.CatalogException", "org.apache.flink.table.catalog.exceptions.DatabaseNotEmptyException", "org.apache.flink.table.catalog.exceptions.DatabaseNotExistException" ]
import org.apache.flink.table.catalog.exceptions.CatalogException; import org.apache.flink.table.catalog.exceptions.DatabaseNotEmptyException; import org.apache.flink.table.catalog.exceptions.DatabaseNotExistException;
import org.apache.flink.table.catalog.exceptions.*;
[ "org.apache.flink" ]
org.apache.flink;
1,741,934
public void semanticCheck( Module module ) { allExceptions = new ArrayList<Exception>( ); allExceptions.addAll( validateWithContents( module ) ); }
void function( Module module ) { allExceptions = new ArrayList<Exception>( ); allExceptions.addAll( validateWithContents( module ) ); }
/** * Performs a semantic check of this element, and all its contained * elements. Records errors in the module context. * <p> * Checks the contents of this element. * * @param module * the module information needed for the check, and records any * errors */
Performs a semantic check of this element, and all its contained elements. Records errors in the module context. Checks the contents of this element
semanticCheck
{ "repo_name": "sguan-actuate/birt", "path": "model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/core/ModuleImpl.java", "license": "epl-1.0", "size": 72136 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
650,701
protected boolean markRead(IToken token, String rep, boolean addToNotDefined, boolean checkIfIsValidImportToken) { boolean found = false; Found foundAs = null; String foundAsStr = null; int acceptedScopes = 0; ScopeItems currScopeItems = scope.getCurrScopeItems(); i...
boolean function(IToken token, String rep, boolean addToNotDefined, boolean checkIfIsValidImportToken) { boolean found = false; Found foundAs = null; String foundAsStr = null; int acceptedScopes = 0; ScopeItems currScopeItems = scope.getCurrScopeItems(); if ((currScopeItems.getScopeType() & Scope.ACCEPTED_METHOD_AND_LA...
/** * marks a token as read given its representation * * @param token the token to be added * @param rep the token representation * @param addToNotDefined determines if it should be added to the 'not defined tokens' stack or not * @return true if it was found */
marks a token as read given its representation
markRead
{ "repo_name": "fabioz/Pydev", "path": "plugins/com.python.pydev.analysis/src/com/python/pydev/analysis/scopeanalysis/AbstractScopeAnalyzerVisitor.java", "license": "epl-1.0", "size": 55266 }
[ "com.python.pydev.analysis.visitors.Found", "com.python.pydev.analysis.visitors.Scope", "com.python.pydev.analysis.visitors.ScopeItems", "java.util.Iterator", "org.python.pydev.core.IModule", "org.python.pydev.core.IToken", "org.python.pydev.core.IterTokenEntry", "org.python.pydev.core.TokensList", ...
import com.python.pydev.analysis.visitors.Found; import com.python.pydev.analysis.visitors.Scope; import com.python.pydev.analysis.visitors.ScopeItems; import java.util.Iterator; import org.python.pydev.core.IModule; import org.python.pydev.core.IToken; import org.python.pydev.core.IterTokenEntry; import org.python.pyd...
import com.python.pydev.analysis.visitors.*; import java.util.*; import org.python.pydev.core.*; import org.python.pydev.core.log.*; import org.python.pydev.parser.jython.ast.*; import org.python.pydev.shared_core.string.*;
[ "com.python.pydev", "java.util", "org.python.pydev" ]
com.python.pydev; java.util; org.python.pydev;
3,235
public static boolean eqOrdered(@Nullable Collection<?> c1, @Nullable Collection<?> c2) { if (c1 == c2) return true; if (c1 == null || c2 == null) return false; if (c1.size() != c2.size()) return false; Iterator<?> it1 = c1.iterator(); I...
static boolean function(@Nullable Collection<?> c1, @Nullable Collection<?> c2) { if (c1 == c2) return true; if (c1 == null c2 == null) return false; if (c1.size() != c2.size()) return false; Iterator<?> it1 = c1.iterator(); Iterator<?> it2 = c2.iterator(); while (it1.hasNext() && it2.hasNext()) if (!eq(it1.next(), it2...
/** * Checks if both collections have equal elements in the same order. * * @param c1 First collection. * @param c2 Second collection. * @return {@code True} if both collections have equal elements in the same order. */
Checks if both collections have equal elements in the same order
eqOrdered
{ "repo_name": "dlnufox/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/util/lang/GridFunc.java", "license": "apache-2.0", "size": 157742 }
[ "java.util.Collection", "java.util.Iterator", "org.jetbrains.annotations.Nullable" ]
import java.util.Collection; import java.util.Iterator; import org.jetbrains.annotations.Nullable;
import java.util.*; import org.jetbrains.annotations.*;
[ "java.util", "org.jetbrains.annotations" ]
java.util; org.jetbrains.annotations;
1,670,078
private String productOwnership () { log.info ("productOwnership - M_Product_Category_ID=" + p_M_Product_Category_ID + ", M_Product_ID=" + p_M_Product_ID); String set = " SET AD_Org_ID=" + p_AD_Org_ID; if (p_M_Product_Category_ID > 0) set += " WHERE EXISTS (SELECT * FROM M_Product p" + "...
String function () { log.info (STR + p_M_Product_Category_ID + STR + p_M_Product_ID); String set = STR + p_AD_Org_ID; if (p_M_Product_Category_ID > 0) set += STR + STR + p_M_Product_Category_ID + ")"; else set += STR + p_M_Product_ID; set += STR + getAD_Client_ID() + STR + p_AD_Org_ID; log.fine(STR + set); String sql =...
/** * Product Ownership * @return "" */
Product Ownership
productOwnership
{ "repo_name": "pplatek/adempiere", "path": "base/src/org/compiere/process/OrgOwnership.java", "license": "gpl-2.0", "size": 10914 }
[ "java.math.BigDecimal", "org.compiere.util.DB", "org.compiere.util.Msg" ]
import java.math.BigDecimal; import org.compiere.util.DB; import org.compiere.util.Msg;
import java.math.*; import org.compiere.util.*;
[ "java.math", "org.compiere.util" ]
java.math; org.compiere.util;
59,274
@Delete(path="api/knowledges", checkReferer=false, subscribeToken="") public Boundary delete() { try { Long id = getPathLong(); KnowledgeDataEditLogic.get().delete(id, getLoginedUser()); return send(HttpStatus.SC_200_OK, new Msg("deleted")); } catch (JSONExcep...
@Delete(path=STR, checkReferer=false, subscribeToken=STRdeletedSTRjson parse errorSTRerror", e); return sendError(HttpStatus.SC_500_INTERNAL_SERVER_ERROR); } }
/** * Delete knowledges */
Delete knowledges
delete
{ "repo_name": "support-project/knowledge", "path": "src/main/java/org/support/project/knowledge/control/api/KnowledgesControl.java", "license": "apache-2.0", "size": 5143 }
[ "org.support.project.web.common.HttpStatus", "org.support.project.web.control.service.Delete" ]
import org.support.project.web.common.HttpStatus; import org.support.project.web.control.service.Delete;
import org.support.project.web.common.*; import org.support.project.web.control.service.*;
[ "org.support.project" ]
org.support.project;
2,446,931
public void writeSortBuilder(SortBuilder<?> sort) throws IOException { writeNamedWriteable(sort); }
void function(SortBuilder<?> sort) throws IOException { writeNamedWriteable(sort); }
/** * Writes a {@link SortBuilder} to the current stream */
Writes a <code>SortBuilder</code> to the current stream
writeSortBuilder
{ "repo_name": "clintongormley/elasticsearch", "path": "core/src/main/java/org/elasticsearch/common/io/stream/StreamOutput.java", "license": "apache-2.0", "size": 26739 }
[ "java.io.IOException", "org.elasticsearch.search.sort.SortBuilder" ]
import java.io.IOException; import org.elasticsearch.search.sort.SortBuilder;
import java.io.*; import org.elasticsearch.search.sort.*;
[ "java.io", "org.elasticsearch.search" ]
java.io; org.elasticsearch.search;
337,234
if (null == pp) { throw new IllegalArgumentException("Password policy cannot be null"); } if (null == pp.getStringPolicy()) { StringPolicyType sp = new StringPolicyType(); pp.setStringPolicy(StringPolicyUtils.normalize(sp)); } else { pp.setStringPolicy(StringPolicyUtils.normalize(pp.getStri...
if (null == pp) { throw new IllegalArgumentException(STR); } if (null == pp.getStringPolicy()) { StringPolicyType sp = new StringPolicyType(); pp.setStringPolicy(StringPolicyUtils.normalize(sp)); } else { pp.setStringPolicy(StringPolicyUtils.normalize(pp.getStringPolicy())); } if (null == pp.getLifetime()) { PasswordLi...
/** * add defined default values * * @param pp * @return */
add defined default values
normalize
{ "repo_name": "sabriarabacioglu/engerek", "path": "infra/common/src/main/java/com/evolveum/midpoint/common/policy/PasswordPolicyUtils.java", "license": "apache-2.0", "size": 12321 }
[ "com.evolveum.midpoint.xml.ns._public.common.common_3.PasswordLifeTimeType", "com.evolveum.midpoint.xml.ns._public.common.common_3.StringPolicyType" ]
import com.evolveum.midpoint.xml.ns._public.common.common_3.PasswordLifeTimeType; import com.evolveum.midpoint.xml.ns._public.common.common_3.StringPolicyType;
import com.evolveum.midpoint.xml.ns._public.common.common_3.*;
[ "com.evolveum.midpoint" ]
com.evolveum.midpoint;
1,284,775
private Command processPacketInMessage(IOFSwitch sw, OFPacketIn pi, FloodlightContext cntx) { // Read in packet data headers by using OFMatch OFMatch match = new OFMatch(); match.loadFromPacket(pi.getPacketData(), pi.getInPort()); Long sourceMac = Ethernet.toLong(match.getDataLayerSo...
Command function(IOFSwitch sw, OFPacketIn pi, FloodlightContext cntx) { OFMatch match = new OFMatch(); match.loadFromPacket(pi.getPacketData(), pi.getInPort()); Long sourceMac = Ethernet.toLong(match.getDataLayerSource()); Long destMac = Ethernet.toLong(match.getDataLayerDestination()); Short vlan = match.getDataLayerV...
/** * Processes a OFPacketIn message. If the switch has learned the MAC/VLAN to port mapping * for the pair it will write a FlowMod for. If the mapping has not been learned the * we will flood the packet. * @param sw * @param pi * @param cntx * @return */
Processes a OFPacketIn message. If the switch has learned the MAC/VLAN to port mapping for the pair it will write a FlowMod for. If the mapping has not been learned the we will flood the packet
processPacketInMessage
{ "repo_name": "floodlight/ubuntu-packaging-floodlight", "path": "src/main/java/net/floodlightcontroller/learningswitch/LearningSwitch.java", "license": "apache-2.0", "size": 22853 }
[ "net.floodlightcontroller.core.FloodlightContext", "net.floodlightcontroller.core.IOFSwitch", "net.floodlightcontroller.packet.Ethernet", "org.openflow.protocol.OFFlowMod", "org.openflow.protocol.OFMatch", "org.openflow.protocol.OFPacketIn", "org.openflow.protocol.OFPort", "org.openflow.util.HexString...
import net.floodlightcontroller.core.FloodlightContext; import net.floodlightcontroller.core.IOFSwitch; import net.floodlightcontroller.packet.Ethernet; import org.openflow.protocol.OFFlowMod; import org.openflow.protocol.OFMatch; import org.openflow.protocol.OFPacketIn; import org.openflow.protocol.OFPort; import org....
import net.floodlightcontroller.core.*; import net.floodlightcontroller.packet.*; import org.openflow.protocol.*; import org.openflow.util.*;
[ "net.floodlightcontroller.core", "net.floodlightcontroller.packet", "org.openflow.protocol", "org.openflow.util" ]
net.floodlightcontroller.core; net.floodlightcontroller.packet; org.openflow.protocol; org.openflow.util;
943,799
DecimalArithmetic getRoundingDownArithmetic();
DecimalArithmetic getRoundingDownArithmetic();
/** * Returns the arithmetic for this scale performing unchecked operations with rounding mode {@link RoundingMode#DOWN * DOWN}. * * @return arithmetic for this scale rounding DOWN without overflow checks */
Returns the arithmetic for this scale performing unchecked operations with rounding mode <code>RoundingMode#DOWN DOWN</code>
getRoundingDownArithmetic
{ "repo_name": "tools4j/decimal4j", "path": "src/main/java/org/decimal4j/scale/ScaleMetrics.java", "license": "mit", "size": 9332 }
[ "org.decimal4j.api.DecimalArithmetic" ]
import org.decimal4j.api.DecimalArithmetic;
import org.decimal4j.api.*;
[ "org.decimal4j.api" ]
org.decimal4j.api;
600,860
private void getRandomGuid(boolean secure) { MessageDigest md5 = null; StringBuffer sbValueBeforeMD5 = new StringBuffer(); try { md5 = MessageDigest.getInstance("MD5"); } catch (NoSuchAlgorithmException e) { System.out.println("Error: " + e); ...
void function(boolean secure) { MessageDigest md5 = null; StringBuffer sbValueBeforeMD5 = new StringBuffer(); try { md5 = MessageDigest.getInstance("MD5"); } catch (NoSuchAlgorithmException e) { System.out.println(STR + e); } try { long time = System.currentTimeMillis(); long rand = 0; if (secure) { rand = secureRandom...
/** * Method to generate the random GUID */
Method to generate the random GUID
getRandomGuid
{ "repo_name": "NCIP/cadsr-cgmdr-nci-uk", "path": "src/org/exist/security/RandomGUID.java", "license": "bsd-3-clause", "size": 9696 }
[ "java.security.MessageDigest", "java.security.NoSuchAlgorithmException" ]
import java.security.MessageDigest; import java.security.NoSuchAlgorithmException;
import java.security.*;
[ "java.security" ]
java.security;
296,002
public static MailFilter findFilterByPk(long mfId) throws PathNotFoundException, DatabaseException { log.debug("findFilterByPk({})", mfId); Session session = null; Transaction tx = null; try { session = HibernateUtil.getSessionFactory().openSession(); tx = session.beginTransaction(); MailFilter ret...
static MailFilter function(long mfId) throws PathNotFoundException, DatabaseException { log.debug(STR, mfId); Session session = null; Transaction tx = null; try { session = HibernateUtil.getSessionFactory().openSession(); tx = session.beginTransaction(); MailFilter ret = (MailFilter) session.load(MailFilter.class, mfId...
/** * Find by pk */
Find by pk
findFilterByPk
{ "repo_name": "openkm/document-management-system", "path": "src/main/java/com/openkm/dao/MailAccountDAO.java", "license": "gpl-2.0", "size": 10336 }
[ "com.openkm.core.DatabaseException", "com.openkm.core.PathNotFoundException", "com.openkm.dao.bean.MailFilter", "org.hibernate.HibernateException", "org.hibernate.Session", "org.hibernate.Transaction" ]
import com.openkm.core.DatabaseException; import com.openkm.core.PathNotFoundException; import com.openkm.dao.bean.MailFilter; import org.hibernate.HibernateException; import org.hibernate.Session; import org.hibernate.Transaction;
import com.openkm.core.*; import com.openkm.dao.bean.*; import org.hibernate.*;
[ "com.openkm.core", "com.openkm.dao", "org.hibernate" ]
com.openkm.core; com.openkm.dao; org.hibernate;
1,555,538
public DefaultWikiDescriptor getFromAlias(String wikiAlias) { return wikiAliasCache.get(wikiAlias); }
DefaultWikiDescriptor function(String wikiAlias) { return wikiAliasCache.get(wikiAlias); }
/** * Get a descriptor from the cache. * * @param wikiAlias Alias of the wiki to get * @return the descriptor related to the alias or null if there is no corresponding descriptor in the cache */
Get a descriptor from the cache
getFromAlias
{ "repo_name": "xwiki/xwiki-platform", "path": "xwiki-platform-core/xwiki-platform-wiki/xwiki-platform-wiki-default/src/main/java/org/xwiki/wiki/internal/manager/WikiDescriptorCache.java", "license": "lgpl-2.1", "size": 5126 }
[ "org.xwiki.wiki.internal.descriptor.DefaultWikiDescriptor" ]
import org.xwiki.wiki.internal.descriptor.DefaultWikiDescriptor;
import org.xwiki.wiki.internal.descriptor.*;
[ "org.xwiki.wiki" ]
org.xwiki.wiki;
463,797
private GridMap load(Integer numRows) { if (numRows == null) numRows = computeTableRowCount(); String[][] pageArray; // Wait for page. wait.until(ExpectedConditions.presenceOfElementLocated(By.cssSelector("table#geneGrid"))); int numCols = COL_IN...
GridMap function(Integer numRows) { if (numRows == null) numRows = computeTableRowCount(); String[][] pageArray; wait.until(ExpectedConditions.presenceOfElementLocated(By.cssSelector(STR))); int numCols = COL_INDEX_LAST + 1; pageArray = new String[numRows][numCols]; for (int i = 0; i < numCols; i++) { pageArray[0][i] =...
/** * Pulls <code>numRows</code> rows of search page gene facet data and column * access variables from the search page's 'geneGrid' HTML table. * * @param numRows the number of <code>GridMap</code> table rows to return, * including the heading row. To specify all rows, set <code>numRows</code>...
Pulls <code>numRows</code> rows of search page gene facet data and column access variables from the search page's 'geneGrid' HTML table
load
{ "repo_name": "mpi2/PhenotypeArchive", "path": "src/main/java/org/mousephenotype/www/testing/model/SearchGeneTable.java", "license": "apache-2.0", "size": 14316 }
[ "java.util.List", "org.apache.commons.lang.StringUtils", "org.openqa.selenium.By", "org.openqa.selenium.WebElement", "org.openqa.selenium.support.ui.ExpectedConditions" ]
import java.util.List; import org.apache.commons.lang.StringUtils; import org.openqa.selenium.By; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.ui.ExpectedConditions;
import java.util.*; import org.apache.commons.lang.*; import org.openqa.selenium.*; import org.openqa.selenium.support.ui.*;
[ "java.util", "org.apache.commons", "org.openqa.selenium" ]
java.util; org.apache.commons; org.openqa.selenium;
437,572
@MonitorableStatusValue( name = "request_rate", description = "Rate of the number of requests per second as measured over a 10 second interval." ) public double getRequestRate( ) { return requestRate.calculateRate(); }
@MonitorableStatusValue( name = STR, description = STR ) double function( ) { return requestRate.calculateRate(); }
/** * Returns the rate of the received requests. * @return the rate of the received requests. */
Returns the rate of the received requests
getRequestRate
{ "repo_name": "Talvish/Tales", "path": "product/services/src/com/talvish/tales/contracts/services/ContractStatus.java", "license": "apache-2.0", "size": 10545 }
[ "com.talvish.tales.system.status.MonitorableStatusValue" ]
import com.talvish.tales.system.status.MonitorableStatusValue;
import com.talvish.tales.system.status.*;
[ "com.talvish.tales" ]
com.talvish.tales;
166,504
private void closeClient() { // close out the transport. try { if (this.htable != null) { this.htable.close(); this.htable = null; } if (this.hconnection != null) { this.hconnection.close(); this.hconnection = null; } } catch ...
void function() { try { if (this.htable != null) { this.htable.close(); this.htable = null; } if (this.hconnection != null) { this.hconnection.close(); this.hconnection = null; } } catch (IOException e) { LOG.warn(STR + e.getMessage()); } }
/** * Close out the connection. */
Close out the connection
closeClient
{ "repo_name": "chen0031/htrace", "path": "htrace-hbase/src/main/java/org/htrace/impl/HBaseSpanReceiver.java", "license": "apache-2.0", "size": 13479 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,511,914
public static Application getApplicationDetails(String appName, String username, APIConsumer apiConsumer) throws APIManagementException { Application application; int appId = APIUtil.getApplicationId(appName, username); String groupId = apiConsumer.getGroupId(appId); appl...
static Application function(String appName, String username, APIConsumer apiConsumer) throws APIManagementException { Application application; int appId = APIUtil.getApplicationId(appName, username); String groupId = apiConsumer.getGroupId(appId); application = apiConsumer.getApplicationById(appId); if (application != ...
/** * Retrieve all the details of an Application by name for a given user. * * @param appName name of the application * @param username User name * @param apiConsumer API Consumer * @return {@link Application} instance * @throws APIManagementException if an error occurs while r...
Retrieve all the details of an Application by name for a given user
getApplicationDetails
{ "repo_name": "Rajith90/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/main/java/org/wso2/carbon/apimgt/rest/api/store/v1/utils/ExportUtils.java", "license": "apache-2.0", "size": 8963 }
[ "org.wso2.carbon.apimgt.api.APIConsumer", "org.wso2.carbon.apimgt.api.APIManagementException", "org.wso2.carbon.apimgt.api.model.Application", "org.wso2.carbon.apimgt.impl.utils.APIUtil" ]
import org.wso2.carbon.apimgt.api.APIConsumer; import org.wso2.carbon.apimgt.api.APIManagementException; import org.wso2.carbon.apimgt.api.model.Application; import org.wso2.carbon.apimgt.impl.utils.APIUtil;
import org.wso2.carbon.apimgt.api.*; import org.wso2.carbon.apimgt.api.model.*; import org.wso2.carbon.apimgt.impl.utils.*;
[ "org.wso2.carbon" ]
org.wso2.carbon;
394,889
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Boolean> checkExistenceByIdAsync(String resourceId, String apiVersion);
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Boolean> checkExistenceByIdAsync(String resourceId, String apiVersion);
/** * Checks by ID whether a resource exists. * * @param resourceId The fully qualified ID of the resource, including the resource name and resource type. Use the * format, * /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resour...
Checks by ID whether a resource exists
checkExistenceByIdAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanagerhybrid/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/ResourcesClient.java", "license": "mit", "size": 91824 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod;
import com.azure.core.annotation.*;
[ "com.azure.core" ]
com.azure.core;
2,296,268
public static String[] tokenizeQuotedAruments(char[] buffer) { ArrayList<String> args = new ArrayList<String>(); StringBuilder arg = null; final char noQuote = '\0'; final char singleQuote = '\''; final char doubleQuote = '"'; char currentQuote = noQuote; for ...
static String[] function(char[] buffer) { ArrayList<String> args = new ArrayList<String>(); StringBuilder arg = null; final char noQuote = '\0'; final char singleQuote = '\''; final char doubleQuote = 'STRUnterminated quoted string: STRCommandLineSTR--STR=";
/** * Public for testing (TODO: why are the tests in a different package?) * Parse command line flags from a flat buffer, supporting double-quote enclosed strings * containing whitespace. argv elements are derived by splitting the buffer on whitepace; * double quote characters may enclose tokens con...
Parse command line flags from a flat buffer, supporting double-quote enclosed strings containing whitespace. argv elements are derived by splitting the buffer on whitepace; double quote characters may enclose tokens containing whitespace; a double-quote literal may be escaped with back-slash. (Otherwise backslash is ta...
tokenizeQuotedAruments
{ "repo_name": "michaelforfxhelp/fxhelprepo", "path": "third_party/chromium/base/android/java/src/org/chromium/base/CommandLine.java", "license": "mpl-2.0", "size": 14814 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
1,265,964
@SuppressWarnings("unchecked") public void collapseAllNodes() { HttpSession session = m_classReq.getSession(); String sSearchAC = (String) session.getAttribute("creSearchAC"); Stack m_expandedTreeNodes = (Stack) session .getAttribute("expandedTreeNodes"); Stack m_expandedTreeNodesParent = (Stack) session ...
@SuppressWarnings(STR) void function() { HttpSession session = m_classReq.getSession(); String sSearchAC = (String) session.getAttribute(STR); Stack m_expandedTreeNodes = (Stack) session .getAttribute(STR); Stack m_expandedTreeNodesParent = (Stack) session .getAttribute(STR); Hashtable m_treeNodesHash = (Hashtable) ses...
/** * This method retrieves all open nodes from a stack, then sets them not visible */
This method retrieves all open nodes from a stack, then sets them not visible
collapseAllNodes
{ "repo_name": "NCIP/cadsr-cdecurate", "path": "src/gov/nih/nci/cadsr/cdecurate/tool/EVSMasterTree.java", "license": "bsd-3-clause", "size": 58418 }
[ "gov.nih.nci.cadsr.cdecurate.util.DataManager", "java.util.Hashtable", "java.util.Stack", "javax.servlet.http.HttpSession" ]
import gov.nih.nci.cadsr.cdecurate.util.DataManager; import java.util.Hashtable; import java.util.Stack; import javax.servlet.http.HttpSession;
import gov.nih.nci.cadsr.cdecurate.util.*; import java.util.*; import javax.servlet.http.*;
[ "gov.nih.nci", "java.util", "javax.servlet" ]
gov.nih.nci; java.util; javax.servlet;
719,068
public static RenderedOp create(RenderedImage source0, Integer width, Integer height, RenderingHints hints) { ParameterBlockJAI pb = new ParameterBlockJAI("Pattern", ...
static RenderedOp function(RenderedImage source0, Integer width, Integer height, RenderingHints hints) { ParameterBlockJAI pb = new ParameterBlockJAI(STR, RenderedRegistryMode.MODE_NAME); pb.setSource(STR, source0); pb.setParameter("width", width); pb.setParameter(STR, height); return JAI.create(STR, pb, hints); }
/** * Defines an image with a repeated pattern. * * <p>Creates a <code>ParameterBlockJAI</code> from all * supplied arguments except <code>hints</code> and invokes * {@link JAI#create(String,ParameterBlock,RenderingHints)}. * * @see JAI * @see ParameterBlockJAI * @see Render...
Defines an image with a repeated pattern. Creates a <code>ParameterBlockJAI</code> from all supplied arguments except <code>hints</code> and invokes <code>JAI#create(String,ParameterBlock,RenderingHints)</code>
create
{ "repo_name": "MarinnaCole/LightZone", "path": "lightcrafts/extsrc/com/lightcrafts/mediax/jai/operator/PatternDescriptor.java", "license": "bsd-3-clause", "size": 5368 }
[ "com.lightcrafts.mediax.jai.JAI", "com.lightcrafts.mediax.jai.ParameterBlockJAI", "com.lightcrafts.mediax.jai.RenderedOp", "com.lightcrafts.mediax.jai.registry.RenderedRegistryMode", "java.awt.RenderingHints", "java.awt.image.RenderedImage" ]
import com.lightcrafts.mediax.jai.JAI; import com.lightcrafts.mediax.jai.ParameterBlockJAI; import com.lightcrafts.mediax.jai.RenderedOp; import com.lightcrafts.mediax.jai.registry.RenderedRegistryMode; import java.awt.RenderingHints; import java.awt.image.RenderedImage;
import com.lightcrafts.mediax.jai.*; import com.lightcrafts.mediax.jai.registry.*; import java.awt.*; import java.awt.image.*;
[ "com.lightcrafts.mediax", "java.awt" ]
com.lightcrafts.mediax; java.awt;
42,970
public void left_button_clicked(Point2D p_point) { if (board_is_read_only) { if (this.interactive_action_thread != null) { // The left button is used to stop the interactive action thread. this.interactive_action_thread.request_stop(); ...
void function(Point2D p_point) { if (board_is_read_only) { if (this.interactive_action_thread != null) { this.interactive_action_thread.request_stop(); } return; } if (interactive_state != null && graphics_context != null) { FloatPoint location = graphics_context.coordinate_transform.screen_to_board(p_point); Interacti...
/** * Actions to be taken in the current interactive state * when the left mouse butten is clicked. * * @param p_point a java$awt$geom$Point2D object. */
Actions to be taken in the current interactive state when the left mouse butten is clicked
left_button_clicked
{ "repo_name": "nick-less/freerouting", "path": "src/main/java/interactive/BoardHandling.java", "license": "gpl-3.0", "size": 62043 }
[ "java.awt.geom.Point2D" ]
import java.awt.geom.Point2D;
import java.awt.geom.*;
[ "java.awt" ]
java.awt;
1,783,004
public Color getColor () { return color; }
Color function () { return color; }
/** * Vraca trenutnu boju valnog oblika */
Vraca trenutnu boju valnog oblika
getColor
{ "repo_name": "mbezjak/vhdllab", "path": "vhdllab-client/src/main/java/hr/fer/zemris/vhdllab/applets/simulations/Shape11.java", "license": "apache-2.0", "size": 2516 }
[ "java.awt.Color" ]
import java.awt.Color;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,130,649
public interface OnAnimationFinishedListener { void onAnimationFinished(); } public static final int DEFAULT_ANIMATION_DURATION_MS = 1000; @Retention(RetentionPolicy.SOURCE) @IntDef({SUCCESS_ANIMATION, FAILURE_ANIMATION, OPEN_ON_PHONE_ANIMATION}) public @interface Ov...
interface OnAnimationFinishedListener { void function(); } public static final int DEFAULT_ANIMATION_DURATION_MS = 1000; @Retention(RetentionPolicy.SOURCE) @IntDef({SUCCESS_ANIMATION, FAILURE_ANIMATION, OPEN_ON_PHONE_ANIMATION}) public @interface OverlayType { } public static final int SUCCESS_ANIMATION = 0; public sta...
/** * Called when the confirmation animation is finished. */
Called when the confirmation animation is finished
onAnimationFinished
{ "repo_name": "aosp-mirror/platform_frameworks_support", "path": "wear/src/main/java/androidx/wear/widget/ConfirmationOverlay.java", "license": "apache-2.0", "size": 11778 }
[ "android.graphics.drawable.Drawable", "android.view.View", "androidx.annotation.IntDef", "java.lang.annotation.Retention", "java.lang.annotation.RetentionPolicy" ]
import android.graphics.drawable.Drawable; import android.view.View; import androidx.annotation.IntDef; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy;
import android.graphics.drawable.*; import android.view.*; import androidx.annotation.*; import java.lang.annotation.*;
[ "android.graphics", "android.view", "androidx.annotation", "java.lang" ]
android.graphics; android.view; androidx.annotation; java.lang;
1,559,820
public static void logResultsSeen(boolean wasPanelSeen, boolean wasTap) { RecordHistogram.recordEnumeratedHistogram("Search.ContextualSearchResultsSeen", wasPanelSeen ? RESULTS_SEEN : RESULTS_NOT_SEEN, RESULTS_SEEN_BOUNDARY); logHistogramByGesture(wasPanelSeen, wasTap, "Search.Contex...
static void function(boolean wasPanelSeen, boolean wasTap) { RecordHistogram.recordEnumeratedHistogram(STR, wasPanelSeen ? RESULTS_SEEN : RESULTS_NOT_SEEN, RESULTS_SEEN_BOUNDARY); logHistogramByGesture(wasPanelSeen, wasTap, STR); }
/** * Logs whether search results were seen. * Logs multiple histograms; with and without the original triggering gesture. * @param wasPanelSeen Whether the panel was seen. * @param wasTap Whether the gesture that originally caused the panel to show was a Tap. */
Logs whether search results were seen. Logs multiple histograms; with and without the original triggering gesture
logResultsSeen
{ "repo_name": "highweb-project/highweb-webcl-html5spec", "path": "chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchUma.java", "license": "bsd-3-clause", "size": 50399 }
[ "org.chromium.base.metrics.RecordHistogram" ]
import org.chromium.base.metrics.RecordHistogram;
import org.chromium.base.metrics.*;
[ "org.chromium.base" ]
org.chromium.base;
464,587
public Partition getChangelogPartition() { return changelogPartition; }
Partition function() { return changelogPartition; }
/** * Returns the {@link Partition} used for all changelogs for this task. * @return changelog partition for this task */
Returns the <code>Partition</code> used for all changelogs for this task
getChangelogPartition
{ "repo_name": "prateekm/samza", "path": "samza-api/src/main/java/org/apache/samza/job/model/TaskModel.java", "license": "apache-2.0", "size": 4530 }
[ "org.apache.samza.Partition" ]
import org.apache.samza.Partition;
import org.apache.samza.*;
[ "org.apache.samza" ]
org.apache.samza;
2,105,065
public boolean isSoundWorkflowNet(INetSystem<F,N,P,T,M> sys);
boolean function(INetSystem<F,N,P,T,M> sys);
/** * Check if a given net system is a sound workflow net. * * @param sys A net system. * * @return <code>true</code> if net system <code>sys</code> is a sound workflow net; <code>false</code> otherwise. */
Check if a given net system is a sound workflow net
isSoundWorkflowNet
{ "repo_name": "jbpt/codebase", "path": "jbpt-petri/src/main/java/org/jbpt/petri/mc/IModelChecker.java", "license": "lgpl-3.0", "size": 4410 }
[ "org.jbpt.petri.INetSystem" ]
import org.jbpt.petri.INetSystem;
import org.jbpt.petri.*;
[ "org.jbpt.petri" ]
org.jbpt.petri;
2,788,111
public Adapter createAttributeAdapter() { if (attributeItemProvider == null) { attributeItemProvider = new AttributeItemProvider(this); } return attributeItemProvider; } protected FederationItemProvider federationItemProvider;
Adapter function() { if (attributeItemProvider == null) { attributeItemProvider = new AttributeItemProvider(this); } return attributeItemProvider; } protected FederationItemProvider federationItemProvider;
/** * This creates an adapter for a {@link model.Attribute}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This creates an adapter for a <code>model.Attribute</code>.
createAttributeAdapter
{ "repo_name": "alexlenk/CloudStandby", "path": "org/cloudstandby/model.edit/src/model/provider/ModelItemProviderAdapterFactory.java", "license": "agpl-3.0", "size": 21445 }
[ "org.eclipse.emf.common.notify.Adapter" ]
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,642,989
@Test() public void testForNameAutomated() throws Exception { for (final PKCS8PrivateKeyVersion value : PKCS8PrivateKeyVersion.values()) { for (final String name : getNames(value.name(), value.getName())) { assertNotNull(PKCS8PrivateKeyVersion.forName(name)); assertEqu...
@Test() void function() throws Exception { for (final PKCS8PrivateKeyVersion value : PKCS8PrivateKeyVersion.values()) { for (final String name : getNames(value.name(), value.getName())) { assertNotNull(PKCS8PrivateKeyVersion.forName(name)); assertEquals(PKCS8PrivateKeyVersion.forName(name), value); } } assertNull(PKCS8...
/** * Tests the {@code forName} method with automated tests based on the actual * name of the enum values. * * @throws Exception If an unexpected problem occurs. */
Tests the forName method with automated tests based on the actual name of the enum values
testForNameAutomated
{ "repo_name": "UnboundID/ldapsdk", "path": "tests/unit/src/com/unboundid/util/ssl/cert/PKCS8PrivateKeyVersionTestCase.java", "license": "gpl-2.0", "size": 5239 }
[ "org.testng.annotations.Test" ]
import org.testng.annotations.Test;
import org.testng.annotations.*;
[ "org.testng.annotations" ]
org.testng.annotations;
1,885,340
public void remove(GridCacheVersion ver) { remove0(ver, false); }
void function(GridCacheVersion ver) { remove0(ver, false); }
/** * Removes lock even if it is not owner. * * @param ver Lock version. */
Removes lock even if it is not owner
remove
{ "repo_name": "nivanov/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvcc.java", "license": "apache-2.0", "size": 47308 }
[ "org.apache.ignite.internal.processors.cache.version.GridCacheVersion" ]
import org.apache.ignite.internal.processors.cache.version.GridCacheVersion;
import org.apache.ignite.internal.processors.cache.version.*;
[ "org.apache.ignite" ]
org.apache.ignite;
2,520,410
EvaluationResult evaluate(File originalDataDir, double trainingPercentage, double evaluationPercentage, RescorerProvider provider) throws TasteException, IOException, InterruptedException;
EvaluationResult evaluate(File originalDataDir, double trainingPercentage, double evaluationPercentage, RescorerProvider provider) throws TasteException, IOException, InterruptedException;
/** * Convenience method which sets up a {@link MyrrixRecommender}, splits data in a given location into test/training * data, trains the recommender, then invokes {@link #evaluate(MyrrixRecommender, Multimap)}. * * @param originalDataDir directory containing recommender input data, as (possibly compressed)...
Convenience method which sets up a <code>MyrrixRecommender</code>, splits data in a given location into test/training data, trains the recommender, then invokes <code>#evaluate(MyrrixRecommender, Multimap)</code>
evaluate
{ "repo_name": "rajatchhajed/myrrix-recommender", "path": "online/src/net/myrrix/online/eval/Evaluator.java", "license": "apache-2.0", "size": 3331 }
[ "java.io.File", "java.io.IOException", "net.myrrix.online.RescorerProvider", "org.apache.mahout.cf.taste.common.TasteException" ]
import java.io.File; import java.io.IOException; import net.myrrix.online.RescorerProvider; import org.apache.mahout.cf.taste.common.TasteException;
import java.io.*; import net.myrrix.online.*; import org.apache.mahout.cf.taste.common.*;
[ "java.io", "net.myrrix.online", "org.apache.mahout" ]
java.io; net.myrrix.online; org.apache.mahout;
352,385
public BundleProcessor getProcessor( BeamFnApi.ProcessBundleDescriptor descriptor, List<RemoteInputDestination> remoteInputDesinations, StateDelegator stateDelegator) { checkState( !descriptor.hasTimerApiServiceDescriptor(), "The %s cannot support a %s containing a timer %s.", ...
BundleProcessor function( BeamFnApi.ProcessBundleDescriptor descriptor, List<RemoteInputDestination> remoteInputDesinations, StateDelegator stateDelegator) { checkState( !descriptor.hasTimerApiServiceDescriptor(), STR, BundleProcessor.class.getSimpleName(), BeamFnApi.ProcessBundleDescriptor.class.getSimpleName(), Endpo...
/** * Provides {@link BundleProcessor} that is capable of processing bundles not containing timers. * * <p>Note that bundle processors are cached based upon the the {@link * ProcessBundleDescriptor#getId() process bundle descriptor id}. A previously created instance * may be returned. */
Provides <code>BundleProcessor</code> that is capable of processing bundles not containing timers. Note that bundle processors are cached based upon the the <code>ProcessBundleDescriptor#getId() process bundle descriptor id</code>. A previously created instance may be returned
getProcessor
{ "repo_name": "iemejia/incubator-beam", "path": "runners/java-fn-execution/src/main/java/org/apache/beam/runners/fnexecution/control/SdkHarnessClient.java", "license": "apache-2.0", "size": 28819 }
[ "java.util.Collections", "java.util.List", "org.apache.beam.model.fnexecution.v1.BeamFnApi", "org.apache.beam.model.pipeline.v1.Endpoints", "org.apache.beam.runners.fnexecution.data.RemoteInputDestination", "org.apache.beam.runners.fnexecution.state.StateDelegator", "org.apache.beam.vendor.guava.v26_0_j...
import java.util.Collections; import java.util.List; import org.apache.beam.model.fnexecution.v1.BeamFnApi; import org.apache.beam.model.pipeline.v1.Endpoints; import org.apache.beam.runners.fnexecution.data.RemoteInputDestination; import org.apache.beam.runners.fnexecution.state.StateDelegator; import org.apache.beam....
import java.util.*; import org.apache.beam.model.fnexecution.v1.*; import org.apache.beam.model.pipeline.v1.*; import org.apache.beam.runners.fnexecution.data.*; import org.apache.beam.runners.fnexecution.state.*; import org.apache.beam.vendor.guava.v26_0_jre.com.google.common.base.*;
[ "java.util", "org.apache.beam" ]
java.util; org.apache.beam;
1,949,742
public OutputStreamLoader getOutputStreamLoader() { if (outputStreamLoader != null) { return outputStreamLoader; } else { return new InputStreamFactoryOutputStreamLoader(inputStreamFactory); } }
OutputStreamLoader function() { if (outputStreamLoader != null) { return outputStreamLoader; } else { return new InputStreamFactoryOutputStreamLoader(inputStreamFactory); } }
/** * Returns an OutputStreamLoader that can be used to retrieve the contents * of the file. */
Returns an OutputStreamLoader that can be used to retrieve the contents of the file
getOutputStreamLoader
{ "repo_name": "burris/dwr", "path": "core/api/main/java/org/directwebremoting/io/FileTransfer.java", "license": "apache-2.0", "size": 7193 }
[ "org.directwebremoting.extend.InputStreamFactoryOutputStreamLoader" ]
import org.directwebremoting.extend.InputStreamFactoryOutputStreamLoader;
import org.directwebremoting.extend.*;
[ "org.directwebremoting.extend" ]
org.directwebremoting.extend;
2,553,165
return amount; } /** * Sets the value of the amount property. * * @param value * allowed object is * {@link BigInteger }
return amount; } /** * Sets the value of the amount property. * * @param value * allowed object is * {@link BigInteger }
/** * Gets the value of the amount property. * * @return * possible object is * {@link BigInteger } * */
Gets the value of the amount property
getAmount
{ "repo_name": "TKiura/MetBroker3", "path": "MetBroker3/src/net/agmodel/metbroker/meta/xml/DurationType.java", "license": "lgpl-3.0", "size": 2456 }
[ "java.math.BigInteger" ]
import java.math.BigInteger;
import java.math.*;
[ "java.math" ]
java.math;
2,254,566
public int getFirstSortPosOfCatalogs() throws DataException { int sortPos = 0; try { Connection conn = openConnection(); PreparedStatement ps = conn.prepareStatement("SELECT sortPos FROM Catalogs " + "ORDER BY sortPos ASC"); ps.setMaxRows(1); ResultSet res = ps.executeQuery(); if (res.next()) ...
int function() throws DataException { int sortPos = 0; try { Connection conn = openConnection(); PreparedStatement ps = conn.prepareStatement(STR + STR); ps.setMaxRows(1); ResultSet res = ps.executeQuery(); if (res.next()) { sortPos = res.getInt(STR); } res.close(); ps.close(); conn.close(); } catch (Exception e) { thr...
/** * Returns the first sorting position of all catalogs saved in the database. * * @return first sorting position * * @throws DataException * If an error occurs while getting the sorting position */
Returns the first sorting position of all catalogs saved in the database
getFirstSortPosOfCatalogs
{ "repo_name": "googol42/revager", "path": "src/org/revager/app/model/ApplicationData.java", "license": "gpl-3.0", "size": 46695 }
[ "java.sql.Connection", "java.sql.PreparedStatement", "java.sql.ResultSet" ]
import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,117,506
@Generated @IsOptional @Selector("peripheral:didDiscoverCharacteristicsForService:error:") default void peripheralDidDiscoverCharacteristicsForServiceError(CBPeripheral peripheral, CBService service, NSError error) { throw new java.lang.UnsupportedOperationException(); }
@Selector(STR) default void peripheralDidDiscoverCharacteristicsForServiceError(CBPeripheral peripheral, CBService service, NSError error) { throw new java.lang.UnsupportedOperationException(); }
/** * peripheral:didDiscoverCharacteristicsForService:error: * <p> * This method returns the result of a @link discoverCharacteristics:forService: @/link call. If the characteristic(s) were read successfully, * they can be retrieved via <i>service</i>'s <code>characteristics</code> property. * ...
peripheral:didDiscoverCharacteristicsForService:error: This method returns the result of a @link discoverCharacteristics:forService: @/link call. If the characteristic(s) were read successfully, they can be retrieved via service's <code>characteristics</code> property
peripheralDidDiscoverCharacteristicsForServiceError
{ "repo_name": "multi-os-engine/moe-core", "path": "moe.apple/moe.platform.ios/src/main/java/apple/corebluetooth/protocol/CBPeripheralDelegate.java", "license": "apache-2.0", "size": 11982 }
[ "org.moe.natj.objc.ann.Selector" ]
import org.moe.natj.objc.ann.Selector;
import org.moe.natj.objc.ann.*;
[ "org.moe.natj" ]
org.moe.natj;
31,200
public ConfiguredRuleClassProvider getRuleClassProvider() { return ruleClassProvider; }
ConfiguredRuleClassProvider function() { return ruleClassProvider; }
/** * Returns the rule class provider. */
Returns the rule class provider
getRuleClassProvider
{ "repo_name": "kamalmarhubi/bazel", "path": "src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java", "license": "apache-2.0", "size": 57929 }
[ "com.google.devtools.build.lib.analysis.ConfiguredRuleClassProvider" ]
import com.google.devtools.build.lib.analysis.ConfiguredRuleClassProvider;
import com.google.devtools.build.lib.analysis.*;
[ "com.google.devtools" ]
com.google.devtools;
547,566
void processResult(int rc, String path, Object ctx, List<String> children, Stat stat); } @InterfaceAudience.Public interface Create2Callback extends AsyncCallback {
void processResult(int rc, String path, Object ctx, List<String> children, Stat stat); } @InterfaceAudience.Public interface Create2Callback extends AsyncCallback {
/** * Process the result of the asynchronous call. * * @param rc The return code or the result of the call. * @param path The path that we passed to asynchronous calls. * @param ctx Whatever context object that we passed to asynchronous calls. * @para...
Process the result of the asynchronous call
processResult
{ "repo_name": "maoling/zookeeper", "path": "zookeeper-server/src/main/java/org/apache/zookeeper/AsyncCallback.java", "license": "apache-2.0", "size": 15052 }
[ "java.util.List", "org.apache.yetus.audience.InterfaceAudience", "org.apache.zookeeper.data.Stat" ]
import java.util.List; import org.apache.yetus.audience.InterfaceAudience; import org.apache.zookeeper.data.Stat;
import java.util.*; import org.apache.yetus.audience.*; import org.apache.zookeeper.data.*;
[ "java.util", "org.apache.yetus", "org.apache.zookeeper" ]
java.util; org.apache.yetus; org.apache.zookeeper;
1,700,446
private boolean isGooglePlayServicesAvailable() { final int connectionStatusCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this); if (GooglePlayServicesUtil.isUserRecoverableError(connectionStatusCode)) { showGooglePlayServicesAvailabilityErrorDialog(connecti...
boolean function() { final int connectionStatusCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this); if (GooglePlayServicesUtil.isUserRecoverableError(connectionStatusCode)) { showGooglePlayServicesAvailabilityErrorDialog(connectionStatusCode); return false; } else if (connectionStatusCode != ConnectionRes...
/** * Check that Google Play services APK is installed and up to date. Will * launch an error dialog for the user to update Google Play Services if * possible. * @return true if Google Play Services is available and up to * date on this device; false otherwise. */
Check that Google Play services APK is installed and up to date. Will launch an error dialog for the user to update Google Play Services if possible
isGooglePlayServicesAvailable
{ "repo_name": "miguelarauj1o/CalendarQuickStart", "path": "app/src/main/java/com/example/calendarquickstart/MainActivity.java", "license": "mit", "size": 11424 }
[ "com.google.android.gms.common.ConnectionResult", "com.google.android.gms.common.GooglePlayServicesUtil" ]
import com.google.android.gms.common.ConnectionResult; import com.google.android.gms.common.GooglePlayServicesUtil;
import com.google.android.gms.common.*;
[ "com.google.android" ]
com.google.android;
1,290,107
public void readNBT(NBTTagCompound par1NBTTagCompound) { if (par1NBTTagCompound.hasKey("foodLevel")) { this.foodLevel = par1NBTTagCompound.getInteger("foodLevel"); this.foodTimer = par1NBTTagCompound.getInteger("foodTickTimer"); this.foodSaturationLevel = par1NBTTagCompou...
void function(NBTTagCompound par1NBTTagCompound) { if (par1NBTTagCompound.hasKey(STR)) { this.foodLevel = par1NBTTagCompound.getInteger(STR); this.foodTimer = par1NBTTagCompound.getInteger(STR); this.foodSaturationLevel = par1NBTTagCompound.getFloat(STR); this.foodExhaustionLevel = par1NBTTagCompound.getFloat(STR); } }
/** * Reads the food data for the player. */
Reads the food data for the player
readNBT
{ "repo_name": "DirectCodeGraveyard/Minetweak", "path": "src/main/java/net/minecraft/stats/FoodStats.java", "license": "lgpl-3.0", "size": 4242 }
[ "net.minecraft.nbt.NBTTagCompound" ]
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.*;
[ "net.minecraft.nbt" ]
net.minecraft.nbt;
2,625,077
@Override public B must(@Nonnull final String key, double value) { mandatoryKeys.add(key); options.setDouble(key, value); return getThisBuilder(); }
B function(@Nonnull final String key, double value) { mandatoryKeys.add(key); options.setDouble(key, value); return getThisBuilder(); }
/** * Set mandatory double option. * * @see #must(String, String) */
Set mandatory double option
must
{ "repo_name": "apurtell/hadoop", "path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/impl/AbstractFSBuilderImpl.java", "license": "apache-2.0", "size": 10278 }
[ "javax.annotation.Nonnull" ]
import javax.annotation.Nonnull;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
1,893,181
List<Member> findMembersInVo(PerunSession sess, Vo vo, String searchString) throws PrivilegeException, VoNotExistsException;
List<Member> findMembersInVo(PerunSession sess, Vo vo, String searchString) throws PrivilegeException, VoNotExistsException;
/** * Return list of members by the searchString under defined VO. Search is done in name, email and login. * * @param sess * @param searchString * @param vo * @return list of members * @throws InternalErrorException * @throws PrivilegeException */
Return list of members by the searchString under defined VO. Search is done in name, email and login
findMembersInVo
{ "repo_name": "zwejra/perun", "path": "perun-core/src/main/java/cz/metacentrum/perun/core/api/MembersManager.java", "license": "bsd-2-clause", "size": 67303 }
[ "cz.metacentrum.perun.core.api.exceptions.PrivilegeException", "cz.metacentrum.perun.core.api.exceptions.VoNotExistsException", "java.util.List" ]
import cz.metacentrum.perun.core.api.exceptions.PrivilegeException; import cz.metacentrum.perun.core.api.exceptions.VoNotExistsException; import java.util.List;
import cz.metacentrum.perun.core.api.exceptions.*; import java.util.*;
[ "cz.metacentrum.perun", "java.util" ]
cz.metacentrum.perun; java.util;
300,795
public static final String getHostname() { String lastHostname = "localhost"; try { Enumeration<NetworkInterface> en = NetworkInterface.getNetworkInterfaces(); while (en.hasMoreElements()) { NetworkInterface nwi = en.nextElement(); ...
static final String function() { String lastHostname = STR; try { Enumeration<NetworkInterface> en = NetworkInterface.getNetworkInterfaces(); while (en.hasMoreElements()) { NetworkInterface nwi = en.nextElement(); Enumeration<InetAddress> ip = nwi.getInetAddresses(); while (ip.hasMoreElements()) { InetAddress in = (Ine...
/** * Determine the hostname of the machine Kettle is running on * @return The hostname */
Determine the hostname of the machine Kettle is running on
getHostname
{ "repo_name": "lihongqiang/kettle-4.4.0-stable", "path": "src-core/org/pentaho/di/core/Const.java", "license": "apache-2.0", "size": 78488 }
[ "java.net.InetAddress", "java.net.NetworkInterface", "java.net.SocketException", "java.util.Enumeration" ]
import java.net.InetAddress; import java.net.NetworkInterface; import java.net.SocketException; import java.util.Enumeration;
import java.net.*; import java.util.*;
[ "java.net", "java.util" ]
java.net; java.util;
1,577,436
public void buildClassifier(Instances insts) throws Exception { // can classifier handle the data? getCapabilities().testWithFail(insts); // remove instances with missing class insts = new Instances(insts); insts.deleteWithMissingClass(); // Filter data m_Train = new Instances(inst...
void function(Instances insts) throws Exception { getCapabilities().testWithFail(insts); insts = new Instances(insts); insts.deleteWithMissingClass(); m_Train = new Instances(insts); m_ReplaceMissingValues = new ReplaceMissingValues(); m_ReplaceMissingValues.setInputFormat(m_Train); m_Train = Filter.useFilter(m_Train, ...
/** * Builds the ensemble of perceptrons. * * @param insts the data to train the classifier with * @throws Exception if something goes wrong during building */
Builds the ensemble of perceptrons
buildClassifier
{ "repo_name": "mydzigear/weka.kmeanspp.silhouette_score", "path": "src/weka/classifiers/functions/VotedPerceptron.java", "license": "gpl-3.0", "size": 16417 }
[ "java.util.Random" ]
import java.util.Random;
import java.util.*;
[ "java.util" ]
java.util;
2,420,592
private Object nullInputEvaluator(final Collection<Symbol> nullSymbols, Expression expression) { IdentityHashMap<Expression, Type> expressionTypes = getExpressionTypes( session, metadata, sqlParser, symbolAllocat...
Object function(final Collection<Symbol> nullSymbols, Expression expression) { IdentityHashMap<Expression, Type> expressionTypes = getExpressionTypes( session, metadata, sqlParser, symbolAllocator.getTypes(), expression, emptyList() ); return ExpressionInterpreter.expressionOptimizer(expression, metadata, session, expr...
/** * Evaluates an expression's response to binding the specified input symbols to NULL */
Evaluates an expression's response to binding the specified input symbols to NULL
nullInputEvaluator
{ "repo_name": "totticarter/presto", "path": "presto-main/src/main/java/com/facebook/presto/sql/planner/optimizations/PredicatePushDown.java", "license": "apache-2.0", "size": 52453 }
[ "com.facebook.presto.spi.type.Type", "com.facebook.presto.sql.analyzer.ExpressionAnalyzer", "com.facebook.presto.sql.planner.ExpressionInterpreter", "com.facebook.presto.sql.planner.Symbol", "com.facebook.presto.sql.tree.Expression", "java.util.Collection", "java.util.Collections", "java.util.Identity...
import com.facebook.presto.spi.type.Type; import com.facebook.presto.sql.analyzer.ExpressionAnalyzer; import com.facebook.presto.sql.planner.ExpressionInterpreter; import com.facebook.presto.sql.planner.Symbol; import com.facebook.presto.sql.tree.Expression; import java.util.Collection; import java.util.Collections; im...
import com.facebook.presto.spi.type.*; import com.facebook.presto.sql.analyzer.*; import com.facebook.presto.sql.planner.*; import com.facebook.presto.sql.tree.*; import java.util.*;
[ "com.facebook.presto", "java.util" ]
com.facebook.presto; java.util;
2,728,481
static String read_string(InputStream input) { gnuValueStream g = (gnuValueStream) input; int previous = g.getPosition(); int l = input.read_long(); if (l != vt_INDIRECTION) { g.seek(previous); String s = input.read_string(); if (g.getRunTime() == null) g.setR...
static String read_string(InputStream input) { gnuValueStream g = (gnuValueStream) input; int previous = g.getPosition(); int l = input.read_long(); if (l != vt_INDIRECTION) { g.seek(previous); String s = input.read_string(); if (g.getRunTime() == null) g.setRunTime(new gnuRuntime(null, null)); g.getRunTime().singleIdW...
/** * Read string, expecting the probable indirection. */
Read string, expecting the probable indirection
read_string
{ "repo_name": "SanDisk-Open-Source/SSD_Dashboard", "path": "uefi/gcc/gcc-4.6.3/libjava/classpath/gnu/CORBA/CDR/Vio.java", "license": "gpl-2.0", "size": 45273 }
[ "org.omg.CORBA" ]
import org.omg.CORBA;
import org.omg.*;
[ "org.omg" ]
org.omg;
1,322,139
List<QualifiedObjectName> listTables(Session session, QualifiedTablePrefix prefix);
List<QualifiedObjectName> listTables(Session session, QualifiedTablePrefix prefix);
/** * Get the names that match the specified table prefix (never null). */
Get the names that match the specified table prefix (never null)
listTables
{ "repo_name": "electrum/presto", "path": "core/trino-main/src/main/java/io/trino/metadata/Metadata.java", "license": "apache-2.0", "size": 24596 }
[ "io.trino.Session", "java.util.List" ]
import io.trino.Session; import java.util.List;
import io.trino.*; import java.util.*;
[ "io.trino", "java.util" ]
io.trino; java.util;
1,347,004
public static boolean isSipUriAConnectorInterface(SipURI uri) throws UnknownHostException{ synchronized(sipConnectorEndpoint){ if(c_logger.isTraceEntryExitEnabled()){ c_logger.traceEntry(null, "isSipUriAConnectorInterface", uri); } boolean result = false; try{ InetAddress iaHost = normlizeHost(...
static boolean function(SipURI uri) throws UnknownHostException{ synchronized(sipConnectorEndpoint){ if(c_logger.isTraceEntryExitEnabled()){ c_logger.traceEntry(null, STR, uri); } boolean result = false; try{ InetAddress iaHost = normlizeHost(uri.getHost()); Map<String, HashSet<Integer>> transports = sipConnectorEndpoi...
/** * Checks if a given SipURI is a SIP connector interface * @param uri * @return * @throws UnknownHostException */
Checks if a given SipURI is a SIP connector interface
isSipUriAConnectorInterface
{ "repo_name": "kgibm/open-liberty", "path": "dev/com.ibm.ws.sipcontainer/src/com/ibm/ws/sip/stack/transport/virtualhost/SipVirtualHostAdapter.java", "license": "epl-1.0", "size": 31382 }
[ "java.net.InetAddress", "java.net.UnknownHostException", "java.util.HashSet", "java.util.Map", "javax.servlet.sip.SipURI" ]
import java.net.InetAddress; import java.net.UnknownHostException; import java.util.HashSet; import java.util.Map; import javax.servlet.sip.SipURI;
import java.net.*; import java.util.*; import javax.servlet.sip.*;
[ "java.net", "java.util", "javax.servlet" ]
java.net; java.util; javax.servlet;
1,625,788
public void testBulkFailuresAbortRequest() throws Exception { Failure failure = new Failure("index", "type", "id", new RuntimeException("test")); DummyAbstractAsyncBulkByScrollAction action = new DummyAbstractAsyncBulkByScrollAction(); action.onBulkResponse(new BulkResponse(new BulkItemRespo...
void function() throws Exception { Failure failure = new Failure("index", "type", "id", new RuntimeException("test")); DummyAbstractAsyncBulkByScrollAction action = new DummyAbstractAsyncBulkByScrollAction(); action.onBulkResponse(new BulkResponse(new BulkItemResponse[] {new BulkItemResponse(0, "index", failure)}, rand...
/** * Mimicks bulk indexing failures. */
Mimicks bulk indexing failures
testBulkFailuresAbortRequest
{ "repo_name": "nomoa/elasticsearch", "path": "modules/reindex/src/test/java/org/elasticsearch/index/reindex/AsyncBulkByScrollActionTests.java", "license": "apache-2.0", "size": 35778 }
[ "org.elasticsearch.action.bulk.BulkItemResponse", "org.elasticsearch.action.bulk.BulkResponse", "org.elasticsearch.action.search.ShardSearchFailure", "org.hamcrest.Matchers" ]
import org.elasticsearch.action.bulk.BulkItemResponse; import org.elasticsearch.action.bulk.BulkResponse; import org.elasticsearch.action.search.ShardSearchFailure; import org.hamcrest.Matchers;
import org.elasticsearch.action.bulk.*; import org.elasticsearch.action.search.*; import org.hamcrest.*;
[ "org.elasticsearch.action", "org.hamcrest" ]
org.elasticsearch.action; org.hamcrest;
934,179
public ViewParameters inferDefaultViewParameters(EntityView view);
ViewParameters function(EntityView view);
/** * Allows you to define where (view) in the tool a entity url should direct * the user when it receives a URL template which matches the particular * EntityView supplied. * * @param view * An EntityView object representing a particular matched * incoming request representing a vi...
Allows you to define where (view) in the tool a entity url should direct the user when it receives a URL template which matches the particular EntityView supplied
inferDefaultViewParameters
{ "repo_name": "ouit0408/sakai", "path": "rsf/sakai-rsf-core/src/java/org/sakaiproject/rsf/entitybroker/EntityViewViewParamsInferrer.java", "license": "apache-2.0", "size": 3736 }
[ "org.sakaiproject.entitybroker.EntityView", "uk.org.ponder.rsf.viewstate.ViewParameters" ]
import org.sakaiproject.entitybroker.EntityView; import uk.org.ponder.rsf.viewstate.ViewParameters;
import org.sakaiproject.entitybroker.*; import uk.org.ponder.rsf.viewstate.*;
[ "org.sakaiproject.entitybroker", "uk.org.ponder" ]
org.sakaiproject.entitybroker; uk.org.ponder;
1,261,252
@Override public final void transform( final float[] srcPts, int srcOff, final float[] dstPts, int dstOff, int numPts) throws ProjectionException { final boolean reverse = (srcPts == dstPts && srcOff < dstOff && srcOff + (2 * numPts) > dstOff); if (reverse...
final void function( final float[] srcPts, int srcOff, final float[] dstPts, int dstOff, int numPts) throws ProjectionException { final boolean reverse = (srcPts == dstPts && srcOff < dstOff && srcOff + (2 * numPts) > dstOff); if (reverse) { srcOff += 2 * numPts; dstOff += 2 * numPts; } final Point2D.Double point = new...
/** * Transforms a list of coordinate point ordinal values. Ordinates must be * (<var>longitude</var>,<var>latitude</var>) pairs in decimal degrees. * * @throws ProjectionException if a point can't be transformed. This method tries to transform * every points even if some of them can't be t...
Transforms a list of coordinate point ordinal values. Ordinates must be (longitude,latitude) pairs in decimal degrees
transform
{ "repo_name": "geotools/geotools", "path": "modules/library/referencing/src/main/java/org/geotools/referencing/operation/projection/MapProjection.java", "license": "lgpl-2.1", "size": 78210 }
[ "java.awt.geom.Point2D", "org.geotools.referencing.operation.transform.AbstractMathTransform", "org.opengis.referencing.operation.MathTransform2D" ]
import java.awt.geom.Point2D; import org.geotools.referencing.operation.transform.AbstractMathTransform; import org.opengis.referencing.operation.MathTransform2D;
import java.awt.geom.*; import org.geotools.referencing.operation.transform.*; import org.opengis.referencing.operation.*;
[ "java.awt", "org.geotools.referencing", "org.opengis.referencing" ]
java.awt; org.geotools.referencing; org.opengis.referencing;
1,857,760
protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException, SQLException, ClassNotFoundException { String nextLocation = "dataClerkMain.jsp"; HttpSession session= request.getSession(); String username = request.get...
void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException, SQLException, ClassNotFoundException { String nextLocation = STR; HttpSession session= request.getSession(); String username = request.getParameter(STR); String password = request.getParameter(STR); String pass...
/** * Processes requests for both HTTP <code>GET</code> and <code>POST</code> * methods. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs * @throws java...
Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods
processRequest
{ "repo_name": "skylerh15/javastone", "path": "src/java/clerk/ClerkHandler.java", "license": "mit", "size": 4657 }
[ "java.io.IOException", "java.sql.SQLException", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse", "javax.servlet.http.HttpSession" ]
import java.io.IOException; import java.sql.SQLException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession;
import java.io.*; import java.sql.*; import javax.servlet.*; import javax.servlet.http.*;
[ "java.io", "java.sql", "javax.servlet" ]
java.io; java.sql; javax.servlet;
2,392,111