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 HttpSessionContext getSessionContext() { throw new UnsupportedOperationException("This is not supported - Deprecated anyhow."); }
HttpSessionContext function() { throw new UnsupportedOperationException(STR); }
/** * Unsafe and deprecated .. not implemented * @see HttpSession * @deprecated * @return */
Unsafe and deprecated .. not implemented
getSessionContext
{ "repo_name": "tcolar/javaontracks", "path": "src/net/jot/web/server/JOTWebSession.java", "license": "artistic-2.0", "size": 6576 }
[ "javax.servlet.http.HttpSessionContext" ]
import javax.servlet.http.HttpSessionContext;
import javax.servlet.http.*;
[ "javax.servlet" ]
javax.servlet;
1,815,962
public IGroupMember getGroupMember(EntityIdentifier underlyingEntityIdentifier) throws GroupsException { return getGroupMember( underlyingEntityIdentifier.getKey(), underlyingEntityIdentifier.getType()); }
IGroupMember function(EntityIdentifier underlyingEntityIdentifier) throws GroupsException { return getGroupMember( underlyingEntityIdentifier.getKey(), underlyingEntityIdentifier.getType()); }
/** * Returns an <code>IGroupMember</code> representing either a group or a portal entity, based on * the <code>EntityIdentifier</code>, which refers to the UNDERLYING entity for the <code> * IGroupMember</code>. */
Returns an <code>IGroupMember</code> representing either a group or a portal entity, based on the <code>EntityIdentifier</code>, which refers to the UNDERLYING entity for the <code> IGroupMember</code>
getGroupMember
{ "repo_name": "jl1955/uPortal5", "path": "uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/ReferenceIndividualGroupService.java", "license": "apache-2.0", "size": 27402 }
[ "org.apereo.portal.EntityIdentifier" ]
import org.apereo.portal.EntityIdentifier;
import org.apereo.portal.*;
[ "org.apereo.portal" ]
org.apereo.portal;
1,267,091
public int copyTo(OutputStream out, int len) throws IOException { return copyTo(out, len, null); }
int function(OutputStream out, int len) throws IOException { return copyTo(out, len, null); }
/** * Copies bytes from this input stream to the specified output stream * until the specified number of bytes are copied or the end of the * input stream is reached. * * @param out * The output stream to copy the data to. * * @param len * The number of bytes to copy, or <...
Copies bytes from this input stream to the specified output stream until the specified number of bytes are copied or the end of the input stream is reached
copyTo
{ "repo_name": "thinkingcow/brazil-on-appengine", "path": "src/sunlabs/brazil/util/http/HttpInputStream.java", "license": "apache-2.0", "size": 10844 }
[ "java.io.IOException", "java.io.OutputStream" ]
import java.io.IOException; import java.io.OutputStream;
import java.io.*;
[ "java.io" ]
java.io;
713,727
public void addNewNPC(PacketBuilder packet, NPC npc) { packet.putBits(15, npc.getIndex()); int yPos = npc.getLocation().getY() - player.getLocation().getY(); int xPos = npc.getLocation().getX() - player.getLocation().getX(); packet.putBits(5, xPos); packet.putBits(14, npc.getDefiniti...
void function(PacketBuilder packet, NPC npc) { packet.putBits(15, npc.getIndex()); int yPos = npc.getLocation().getY() - player.getLocation().getY(); int xPos = npc.getLocation().getX() - player.getLocation().getX(); packet.putBits(5, xPos); packet.putBits(14, npc.getDefinition().getId()); packet.putBits(5, yPos); pack...
/** * Adds a new NPC. * * @param packet * The main packet. * @param npc * The npc to add. */
Adds a new NPC
addNewNPC
{ "repo_name": "kewle003/hyperion", "path": "src/org/rs2server/rs2/task/impl/NPCUpdateTask.java", "license": "mit", "size": 8594 }
[ "org.rs2server.rs2.net.PacketBuilder" ]
import org.rs2server.rs2.net.PacketBuilder;
import org.rs2server.rs2.net.*;
[ "org.rs2server.rs2" ]
org.rs2server.rs2;
118,265
public void testGetPathOrURL() throws MalformedURLException, IOException { File arc = ARCWriterTest.createARCFile(getTmpDir(), true); ARCReader reader = ARCReaderFactory.get(arc.getAbsoluteFile()); assertNotNull(reader); reader.close(); doGetFileUrl(arc); }
void function() throws MalformedURLException, IOException { File arc = ARCWriterTest.createARCFile(getTmpDir(), true); ARCReader reader = ARCReaderFactory.get(arc.getAbsoluteFile()); assertNotNull(reader); reader.close(); doGetFileUrl(arc); }
/** * Test path or url. * @throws MalformedURLException * @throws IOException */
Test path or url
testGetPathOrURL
{ "repo_name": "gaowangyizu/myHeritrix", "path": "myHeritrix/src/org/archive/io/arc/ARCReaderFactoryTest.java", "license": "apache-2.0", "size": 3539 }
[ "java.io.File", "java.io.IOException", "java.net.MalformedURLException" ]
import java.io.File; import java.io.IOException; import java.net.MalformedURLException;
import java.io.*; import java.net.*;
[ "java.io", "java.net" ]
java.io; java.net;
1,080,864
public List<V1BinaryAnnotation> binaryAnnotations() { return binaryAnnotations; }
List<V1BinaryAnnotation> function() { return binaryAnnotations; }
/** * {@link Span#tags()} are allocated to binary annotations with a {@link * V1BinaryAnnotation#stringValue()}. {@link Span#remoteEndpoint()} to those without. */
<code>Span#tags()</code> are allocated to binary annotations with a <code>V1BinaryAnnotation#stringValue()</code>. <code>Span#remoteEndpoint()</code> to those without
binaryAnnotations
{ "repo_name": "abesto/zipkin", "path": "zipkin/src/main/java/zipkin2/v1/V1Span.java", "license": "apache-2.0", "size": 10109 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,087,111
public String getELValue(String expression) { FacesContext context = FacesContext.getCurrentInstance(); return context.getApplication().evaluateExpressionGet(context, expression, String.class); }
String function(String expression) { FacesContext context = FacesContext.getCurrentInstance(); return context.getApplication().evaluateExpressionGet(context, expression, String.class); }
/** * Evaluate and EL expression and return its value * * @param expression * The EL expression * @return The result of evaluating the expression */
Evaluate and EL expression and return its value
getELValue
{ "repo_name": "BjerknesClimateDataCentre/QuinCe", "path": "WebApp/src/uk/ac/exeter/QuinCe/web/BaseManagedBean.java", "license": "gpl-3.0", "size": 15710 }
[ "javax.faces.context.FacesContext" ]
import javax.faces.context.FacesContext;
import javax.faces.context.*;
[ "javax.faces" ]
javax.faces;
2,047,939
private static <T> Expression constantArrayList(List<T> values, Class clazz) { return Expressions.call( BuiltInMethod.ARRAYS_AS_LIST.method, Expressions.newArrayInit(clazz, constantList(values))); }
static <T> Expression function(List<T> values, Class clazz) { return Expressions.call( BuiltInMethod.ARRAYS_AS_LIST.method, Expressions.newArrayInit(clazz, constantList(values))); }
/** * E.g. {@code constantArrayList("x", "y")} returns * "Arrays.asList('x', 'y')". */
E.g. constantArrayList("x", "y") returns "Arrays.asList('x', 'y')"
constantArrayList
{ "repo_name": "julianhyde/calcite", "path": "innodb/src/main/java/org/apache/calcite/adapter/innodb/InnodbToEnumerableConverter.java", "license": "apache-2.0", "size": 7355 }
[ "java.util.List", "org.apache.calcite.linq4j.tree.Expression", "org.apache.calcite.linq4j.tree.Expressions", "org.apache.calcite.util.BuiltInMethod" ]
import java.util.List; import org.apache.calcite.linq4j.tree.Expression; import org.apache.calcite.linq4j.tree.Expressions; import org.apache.calcite.util.BuiltInMethod;
import java.util.*; import org.apache.calcite.linq4j.tree.*; import org.apache.calcite.util.*;
[ "java.util", "org.apache.calcite" ]
java.util; org.apache.calcite;
908,451
public FileStatus[] list(String hostName, Path path, boolean fullListing) throws IOException;
FileStatus[] function(String hostName, Path path, boolean fullListing) throws IOException;
/** * List data root. * Responsible to clean / filter temporal results from the failed tasks. * * @param hostName URL to host * @param path path to the object * @return arrays of FileStatus * @throws IOException if connection error */
List data root. Responsible to clean / filter temporal results from the failed tasks
list
{ "repo_name": "ymoatti/pushdown-stocator", "path": "src/main/java/com/ibm/stocator/fs/common/IStoreClient.java", "license": "apache-2.0", "size": 3731 }
[ "java.io.IOException", "org.apache.hadoop.fs.FileStatus", "org.apache.hadoop.fs.Path" ]
import java.io.IOException; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.Path;
import java.io.*; import org.apache.hadoop.fs.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
1,547,868
protected I_CmsUploadServiceAsync getUploadService() { if (m_uploadService == null) { m_uploadService = GWT.create(I_CmsUploadService.class); String serviceUrl = CmsCoreProvider.get().link("org.opencms.ade.upload.CmsUploadService.gwt"); ((ServiceDefTarget)m_uploadSe...
I_CmsUploadServiceAsync function() { if (m_uploadService == null) { m_uploadService = GWT.create(I_CmsUploadService.class); String serviceUrl = CmsCoreProvider.get().link(STR); ((ServiceDefTarget)m_uploadService).setServiceEntryPoint(serviceUrl); } return m_uploadService; }
/** * Returns the upload service instance.<p> * * @return the upload service instance */
Returns the upload service instance
getUploadService
{ "repo_name": "ggiudetti/opencms-core", "path": "src-gwt/org/opencms/gwt/client/ui/replace/CmsReplaceDialog.java", "license": "lgpl-2.1", "size": 22037 }
[ "com.google.gwt.core.client.GWT", "com.google.gwt.user.client.rpc.ServiceDefTarget", "org.opencms.gwt.client.CmsCoreProvider" ]
import com.google.gwt.core.client.GWT; import com.google.gwt.user.client.rpc.ServiceDefTarget; import org.opencms.gwt.client.CmsCoreProvider;
import com.google.gwt.core.client.*; import com.google.gwt.user.client.rpc.*; import org.opencms.gwt.client.*;
[ "com.google.gwt", "org.opencms.gwt" ]
com.google.gwt; org.opencms.gwt;
2,665,101
private List<Way> cutOutInnerPolygons(Way outerPolygon, List<Way> innerPolygons) { if (innerPolygons.isEmpty()) { Way outerWay = new JoinedWay(outerPolygon); if (log.isDebugEnabled()) { log.debug("Way", outerPolygon.getId(), "splitted to way", outerWay.getId()); } return Collections.singletonList(o...
List<Way> function(Way outerPolygon, List<Way> innerPolygons) { if (innerPolygons.isEmpty()) { Way outerWay = new JoinedWay(outerPolygon); if (log.isDebugEnabled()) { log.debug("Way", outerPolygon.getId(), STR, outerWay.getId()); } return Collections.singletonList(outerWay); } Queue<AreaCutData> areasToCut = new Linked...
/** * Cut out all inner polygons from the outer polygon. This will divide the outer * polygon in several polygons. * * @param outerPolygon * the outer polygon * @param innerPolygons * a list of inner polygons * @return a list of polygons that make the outer polygon cut by the inne...
Cut out all inner polygons from the outer polygon. This will divide the outer polygon in several polygons
cutOutInnerPolygons
{ "repo_name": "balp/mkgmap", "path": "src/uk/me/parabola/mkgmap/reader/osm/MultiPolygonRelation.java", "license": "gpl-2.0", "size": 83289 }
[ "java.awt.Rectangle", "java.awt.geom.Area", "java.util.ArrayList", "java.util.Collection", "java.util.Collections", "java.util.LinkedList", "java.util.List", "java.util.ListIterator", "java.util.Queue", "uk.me.parabola.util.Java2DConverter" ]
import java.awt.Rectangle; import java.awt.geom.Area; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.LinkedList; import java.util.List; import java.util.ListIterator; import java.util.Queue; import uk.me.parabola.util.Java2DConverter;
import java.awt.*; import java.awt.geom.*; import java.util.*; import uk.me.parabola.util.*;
[ "java.awt", "java.util", "uk.me.parabola" ]
java.awt; java.util; uk.me.parabola;
2,743,601
public void addAlias(String alias, ClassDescriptor descriptor) { project.addAlias(alias, descriptor); }
void function(String alias, ClassDescriptor descriptor) { project.addAlias(alias, descriptor); }
/** * PUBLIC: * Add an alias for the descriptor */
Add an alias for the descriptor
addAlias
{ "repo_name": "gameduell/eclipselink.runtime", "path": "foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/sessions/AbstractSession.java", "license": "epl-1.0", "size": 198170 }
[ "org.eclipse.persistence.descriptors.ClassDescriptor" ]
import org.eclipse.persistence.descriptors.ClassDescriptor;
import org.eclipse.persistence.descriptors.*;
[ "org.eclipse.persistence" ]
org.eclipse.persistence;
1,015,630
public Map<String, TaskResult> getPreciousResults();
Map<String, TaskResult> function();
/** * Return only the precious results of this job as a mapping between * user task name (in XML job description) and its task result.<br> * User that wants to get a specific result may get this map and ask for a specific mapping. * * @return the precious results as a map. */
Return only the precious results of this job as a mapping between user task name (in XML job description) and its task result. User that wants to get a specific result may get this map and ask for a specific mapping
getPreciousResults
{ "repo_name": "acontes/scheduling", "path": "src/scheduler/src/org/ow2/proactive/scheduler/common/job/JobResult.java", "license": "agpl-3.0", "size": 5038 }
[ "java.util.Map", "org.ow2.proactive.scheduler.common.task.TaskResult" ]
import java.util.Map; import org.ow2.proactive.scheduler.common.task.TaskResult;
import java.util.*; import org.ow2.proactive.scheduler.common.task.*;
[ "java.util", "org.ow2.proactive" ]
java.util; org.ow2.proactive;
37,637
long getPreferredBlockSize(String filename) throws IOException, UnresolvedLinkException { synchronized (rootDir) { INode inode = rootDir.getNode(filename, false); if (inode == null) { throw new FileNotFoundException("File does not exist: " + filename); } if (inode.isDirector...
long getPreferredBlockSize(String filename) throws IOException, UnresolvedLinkException { synchronized (rootDir) { INode inode = rootDir.getNode(filename, false); if (inode == null) { throw new FileNotFoundException(STR + filename); } if (inode.isDirectory() inode.isLink()) { throw new IOException(STR+ filename); } ret...
/** * Get the blocksize of a file * @param filename the filename * @return the number of bytes * @throws IOException if it is a directory or does not exist. */
Get the blocksize of a file
getPreferredBlockSize
{ "repo_name": "sdecoder/CMDS-HDFS", "path": "hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java", "license": "apache-2.0", "size": 76258 }
[ "java.io.FileNotFoundException", "java.io.IOException", "org.apache.hadoop.fs.UnresolvedLinkException" ]
import java.io.FileNotFoundException; import java.io.IOException; import org.apache.hadoop.fs.UnresolvedLinkException;
import java.io.*; import org.apache.hadoop.fs.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
2,872,457
long addLocation(String locationSetting, String cityName, double lat, double lon) { long locationId; // First, check if the location with this city name exists in the db Cursor locationCursor = getContext().getContentResolver().query( WeatherContract.LocationEntry.CONTENT_UR...
long addLocation(String locationSetting, String cityName, double lat, double lon) { long locationId; Cursor locationCursor = getContext().getContentResolver().query( WeatherContract.LocationEntry.CONTENT_URI, new String[]{WeatherContract.LocationEntry._ID}, WeatherContract.LocationEntry.COLUMN_LOCATION_SETTING + STR, n...
/** * Helper method to handle insertion of a new location in the weather database. * * @param locationSetting The location string used to request updates from the server. * @param cityName A human-readable city name, e.g "Mountain View" * @param lat the latitude of the city * @param lon th...
Helper method to handle insertion of a new location in the weather database
addLocation
{ "repo_name": "pranavsingh/Advanced_Android_Development", "path": "app/src/main/java/com/example/android/sunshine/app/sync/SunshineSyncAdapter.java", "license": "apache-2.0", "size": 32157 }
[ "android.content.ContentUris", "android.content.ContentValues", "android.database.Cursor", "android.net.Uri", "com.example.android.sunshine.app.data.WeatherContract" ]
import android.content.ContentUris; import android.content.ContentValues; import android.database.Cursor; import android.net.Uri; import com.example.android.sunshine.app.data.WeatherContract;
import android.content.*; import android.database.*; import android.net.*; import com.example.android.sunshine.app.data.*;
[ "android.content", "android.database", "android.net", "com.example.android" ]
android.content; android.database; android.net; com.example.android;
388,632
public synchronized Properties getServerProps() { if (this.serverProps == null) { this.serverProps = new Properties(); } return this.serverProps; }
synchronized Properties function() { if (this.serverProps == null) { this.serverProps = new Properties(); } return this.serverProps; }
/** * Returns the list of properties that will be used to start/control the * server. * * @return Properties the list of properties. */
Returns the list of properties that will be used to start/control the server
getServerProps
{ "repo_name": "yyuu/libmysql-java", "path": "src/com/mysql/jdbc/util/ServerController.java", "license": "gpl-2.0", "size": 8973 }
[ "java.util.Properties" ]
import java.util.Properties;
import java.util.*;
[ "java.util" ]
java.util;
2,909,133
final String[] fieldNames = new String[metaDataInfo.size() + 1]; final ColumnType[] columnTypes = new ColumnType[metaDataInfo.size() + 1]; // add the document ID field (fixed) fieldNames[0] = ElasticSearchUtils.FIELD_ID; columnTypes[0] = ColumnType.STRING; int i = 1; fo...
final String[] fieldNames = new String[metaDataInfo.size() + 1]; final ColumnType[] columnTypes = new ColumnType[metaDataInfo.size() + 1]; fieldNames[0] = ElasticSearchUtils.FIELD_ID; columnTypes[0] = ColumnType.STRING; int i = 1; for (Entry<String, ?> metaDataField : metaDataInfo.entrySet()) { @SuppressWarnings(STR) f...
/** * Parses the ElasticSearch meta data info into an ElasticSearchMetaData * object. This method makes much easier to create the ElasticSearch schema. * * @param metaDataInfo * ElasticSearch mapping metadata in Map format * @return An ElasticSearchMetaData object */
Parses the ElasticSearch meta data info into an ElasticSearchMetaData object. This method makes much easier to create the ElasticSearch schema
parse
{ "repo_name": "apache/metamodel", "path": "elasticsearch/common/src/main/java/org/apache/metamodel/elasticsearch/common/ElasticSearchMetaDataParser.java", "license": "apache-2.0", "size": 3251 }
[ "java.util.Map", "org.apache.metamodel.schema.ColumnType" ]
import java.util.Map; import org.apache.metamodel.schema.ColumnType;
import java.util.*; import org.apache.metamodel.schema.*;
[ "java.util", "org.apache.metamodel" ]
java.util; org.apache.metamodel;
224,130
public static String formatTime(Date date, String fallback) { return formatDateFormat(TIME_FORMAT, date, fallback); }
static String function(Date date, String fallback) { return formatDateFormat(TIME_FORMAT, date, fallback); }
/** * Formats UTC time into a date/time string */
Formats UTC time into a date/time string
formatTime
{ "repo_name": "f-droid/fdroid-client", "path": "app/src/main/java/org/fdroid/fdroid/Utils.java", "license": "gpl-3.0", "size": 36688 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
2,225,983
@Override public boolean accept(Path path) { return path.toString().matches(regex); }
boolean function(Path path) { return path.toString().matches(regex); }
/** * Override method that returns true if the input file path matches the regex. * * @param path The path of a file to be check by the filter. * @return boolean if file is fastq/fq file. */
Override method that returns true if the input file path matches the regex
accept
{ "repo_name": "penuts7644/HadoopPhredCalculator", "path": "src/main/java/nl/bioinf/wvanhelvoirt/HadoopPhredCalculator/FastqPathFilter.java", "license": "gpl-3.0", "size": 1624 }
[ "org.apache.hadoop.fs.Path" ]
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.fs.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
2,306,278
public void setJoinCondition(Condition joinCondition) { this.joinCondition = joinCondition; }
void function(Condition joinCondition) { this.joinCondition = joinCondition; }
/** * Pick the supported condition. Currently only equal join is supported. * * @param joinCondition - join condition */
Pick the supported condition. Currently only equal join is supported
setJoinCondition
{ "repo_name": "ananthc/apex-malhar", "path": "library/src/main/java/org/apache/apex/malhar/lib/join/SemiJoinOperator.java", "license": "apache-2.0", "size": 5874 }
[ "org.apache.apex.malhar.lib.streamquery.condition.Condition" ]
import org.apache.apex.malhar.lib.streamquery.condition.Condition;
import org.apache.apex.malhar.lib.streamquery.condition.*;
[ "org.apache.apex" ]
org.apache.apex;
445,504
public FeatureCursor queryFeaturesForChunk(boolean distinct, BoundingBox boundingBox, String where, String[] whereArgs, int limit, long offset) { return queryFeaturesForChunk(distinct, boundingBox, where, whereArgs...
FeatureCursor function(boolean distinct, BoundingBox boundingBox, String where, String[] whereArgs, int limit, long offset) { return queryFeaturesForChunk(distinct, boundingBox, where, whereArgs, getPkColumnName(), limit, offset); }
/** * Query for features within the bounding box ordered by id, starting at the * offset and returning no more than the limit * * @param distinct distinct rows * @param boundingBox bounding box * @param where where clause * @param whereArgs where arguments * @param lim...
Query for features within the bounding box ordered by id, starting at the offset and returning no more than the limit
queryFeaturesForChunk
{ "repo_name": "ngageoint/geopackage-android", "path": "geopackage-sdk/src/main/java/mil/nga/geopackage/extension/nga/index/FeatureTableIndex.java", "license": "mit", "size": 276322 }
[ "mil.nga.geopackage.BoundingBox", "mil.nga.geopackage.features.user.FeatureCursor" ]
import mil.nga.geopackage.BoundingBox; import mil.nga.geopackage.features.user.FeatureCursor;
import mil.nga.geopackage.*; import mil.nga.geopackage.features.user.*;
[ "mil.nga.geopackage" ]
mil.nga.geopackage;
347,249
@Test public void testGetAllImplementedTypes01() { IModelInstance modelInstance; modelInstance = ModelBusTestUtility .createEmptyJavaModelInstance(this.model); Set<Type> types; types = modelInstance.getAllImplementedTypes(); assertNotNull(types); assertEquals(0, types.size()); }
void function() { IModelInstance modelInstance; modelInstance = ModelBusTestUtility .createEmptyJavaModelInstance(this.model); Set<Type> types; types = modelInstance.getAllImplementedTypes(); assertNotNull(types); assertEquals(0, types.size()); }
/** * <p> * Tests the method {@link IModelInstance#getAllImplementedTypes()}. * </p> * * @throws TypeNotFoundInModelException */
Tests the method <code>IModelInstance#getAllImplementedTypes()</code>.
testGetAllImplementedTypes01
{ "repo_name": "dresden-ocl/dresdenocl", "path": "tests/org.dresdenocl.modelbus.test/src/org/dresdenocl/modelbus/test/modelinstance/AbstractModelInstanceTest.java", "license": "lgpl-3.0", "size": 10112 }
[ "java.util.Set", "org.dresdenocl.modelbus.test.ModelBusTestUtility", "org.dresdenocl.modelinstance.IModelInstance", "org.dresdenocl.pivotmodel.Type", "org.junit.Assert" ]
import java.util.Set; import org.dresdenocl.modelbus.test.ModelBusTestUtility; import org.dresdenocl.modelinstance.IModelInstance; import org.dresdenocl.pivotmodel.Type; import org.junit.Assert;
import java.util.*; import org.dresdenocl.modelbus.test.*; import org.dresdenocl.modelinstance.*; import org.dresdenocl.pivotmodel.*; import org.junit.*;
[ "java.util", "org.dresdenocl.modelbus", "org.dresdenocl.modelinstance", "org.dresdenocl.pivotmodel", "org.junit" ]
java.util; org.dresdenocl.modelbus; org.dresdenocl.modelinstance; org.dresdenocl.pivotmodel; org.junit;
2,403,181
public void setOrientationLeft() throws RemoteException { Tracer.trace(); getAutomatorBridge().getInteractionController().setRotationLeft(); }
void function() throws RemoteException { Tracer.trace(); getAutomatorBridge().getInteractionController().setRotationLeft(); }
/** * Simulates orienting the device to the left and also freezes rotation * by disabling the sensors. * * If you want to un-freeze the rotation and re-enable the sensors * see {@link #unfreezeRotation()}. * @throws RemoteException * @since API Level 17 */
Simulates orienting the device to the left and also freezes rotation by disabling the sensors. If you want to un-freeze the rotation and re-enable the sensors see <code>#unfreezeRotation()</code>
setOrientationLeft
{ "repo_name": "rex-xxx/mt6572_x201", "path": "frameworks/testing/uiautomator/library/src/com/android/uiautomator/core/UiDevice.java", "license": "gpl-2.0", "size": 29468 }
[ "android.os.RemoteException" ]
import android.os.RemoteException;
import android.os.*;
[ "android.os" ]
android.os;
2,263,529
static ScriptFunction makeFunction(final String name, final MethodHandle methodHandle, final MethodHandle[] specs) { return makeFunction(name, methodHandle, specs, ScriptFunctionData.IS_BUILTIN); }
static ScriptFunction makeFunction(final String name, final MethodHandle methodHandle, final MethodHandle[] specs) { return makeFunction(name, methodHandle, specs, ScriptFunctionData.IS_BUILTIN); }
/** * Factory method for non-constructor built-in functions * * @param name function name * @param methodHandle handle for invocation * @param specs specialized versions of function if available, null otherwise * @return new ScriptFunction */
Factory method for non-constructor built-in functions
makeFunction
{ "repo_name": "koutheir/incinerator-hotspot", "path": "nashorn/src/jdk/nashorn/internal/objects/ScriptFunctionImpl.java", "license": "gpl-2.0", "size": 13031 }
[ "java.lang.invoke.MethodHandle" ]
import java.lang.invoke.MethodHandle;
import java.lang.invoke.*;
[ "java.lang" ]
java.lang;
331,384
Document getDocument() { Document rv = document; document = null; return rv; }
Document getDocument() { Document rv = document; document = null; return rv; }
/** * Returns the document. * * @return the document */
Returns the document
getDocument
{ "repo_name": "anarcheuz/Funny-school-projects", "path": "WebSemantic/src/htmlparser-1.4/src/nu/validator/htmlparser/dom/DOMTreeBuilder.java", "license": "mit", "size": 11347 }
[ "org.w3c.dom.Document" ]
import org.w3c.dom.Document;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
1,402,028
public void onModuleLoad() { TreePanel treeWidget = new AutoCollapseTreePanel(); final TextArea textArea = new TextArea(); textArea.setSize(800, 300); treeWidget.getView().setBroadcastCommand(new BroadcastCommand() {
void function() { TreePanel treeWidget = new AutoCollapseTreePanel(); final TextArea textArea = new TextArea(); textArea.setSize(800, 300); treeWidget.getView().setBroadcastCommand(new BroadcastCommand() {
/** * This is the entry point method. */
This is the entry point method
onModuleLoad
{ "repo_name": "akubach/phyloviewer-simple", "path": "src/main/java/org/iplantc/simple/client/SimpleTreeViewer.java", "license": "gpl-2.0", "size": 1136 }
[ "com.extjs.gxt.ui.client.widget.form.TextArea", "org.iplantc.core.broadcaster.shared.BroadcastCommand" ]
import com.extjs.gxt.ui.client.widget.form.TextArea; import org.iplantc.core.broadcaster.shared.BroadcastCommand;
import com.extjs.gxt.ui.client.widget.form.*; import org.iplantc.core.broadcaster.shared.*;
[ "com.extjs.gxt", "org.iplantc.core" ]
com.extjs.gxt; org.iplantc.core;
563,637
private String getPermissionSHORTAsString(SHORT permission){ if(permission == null){ return null; }else{ ByteBuffer bb = ByteBuffer.allocate(2); bb.put(permission.bytes()[0]); bb.put(permission.bytes()[1]); int permissionShort = bb.getShort(0); return Integer.toOctalString(permissionShort); }...
String function(SHORT permission){ if(permission == null){ return null; }else{ ByteBuffer bb = ByteBuffer.allocate(2); bb.put(permission.bytes()[0]); bb.put(permission.bytes()[1]); int permissionShort = bb.getShort(0); return Integer.toOctalString(permissionShort); } }
/** * Return null if null arguments * * @param permission * @return null/Octal representation of permissions */
Return null if null arguments
getPermissionSHORTAsString
{ "repo_name": "ashish-gehani/SPADE", "path": "src/spade/reporter/CDM.java", "license": "gpl-3.0", "size": 31275 }
[ "java.nio.ByteBuffer" ]
import java.nio.ByteBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
1,670,578
public static UserModel findUserByNameOrEmail(KeycloakSession session, RealmModel realm, String username) { if (realm.isLoginWithEmailAllowed() && username.indexOf('@') != -1) { UserModel user = session.users().getUserByEmail(username, realm); if (user != null) { retu...
static UserModel function(KeycloakSession session, RealmModel realm, String username) { if (realm.isLoginWithEmailAllowed() && username.indexOf('@') != -1) { UserModel user = session.users().getUserByEmail(username, realm); if (user != null) { return user; } } return session.users().getUserByUsername(username, realm); ...
/** * Try to find user by username or email for authentication * * @param realm realm * @param username username or email of user * @return found user */
Try to find user by username or email for authentication
findUserByNameOrEmail
{ "repo_name": "mbaluch/keycloak", "path": "server-spi-private/src/main/java/org/keycloak/models/utils/KeycloakModelUtils.java", "license": "apache-2.0", "size": 20089 }
[ "org.keycloak.models.KeycloakSession", "org.keycloak.models.RealmModel", "org.keycloak.models.UserModel" ]
import org.keycloak.models.KeycloakSession; import org.keycloak.models.RealmModel; import org.keycloak.models.UserModel;
import org.keycloak.models.*;
[ "org.keycloak.models" ]
org.keycloak.models;
701,298
List<T> getXdbFederations();
List<T> getXdbFederations();
/** * Returns all the configured xDB federations. * @return All the configured xDB federations * @since 9.6.0 */
Returns all the configured xDB federations
getXdbFederations
{ "repo_name": "kovaloid/infoarchive-sip-sdk", "path": "configuration/src/main/java/com/opentext/ia/configuration/Configuration.java", "license": "mpl-2.0", "size": 12727 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
904,189
private List<Move> getPossibleMovesForAce(int[] pieces, int card, byte playerToMoveWith){ ArrayList<Move> legal_moves = new ArrayList<Move>(); assert !(card % 13 != Cards.HEARTS_ACE || card == 100); // Use Ace to get out // StartPos is -1 in case the player isn't on the board yet. // homefield of player...
List<Move> function(int[] pieces, int card, byte playerToMoveWith){ ArrayList<Move> legal_moves = new ArrayList<Move>(); assert !(card % 13 != Cards.HEARTS_ACE card == 100); int home = 0; try { home = Rules.getInstance().getHomePositionForPlayer(playerToMoveWith); } catch(Exception e) { } if(Rules.getInstance().isRules...
/** * gets the possible moves for an ace * @param pieces the pieces of the player * @param card the card to use * @param playerToMoveWith the player to move with * @return a List of all possible <class>Move</class>s for this card/situation */
gets the possible moves for an ace
getPossibleMovesForAce
{ "repo_name": "retoo/bodesuri", "path": "src/intelliDOG/ai/framework/BotBoard.java", "license": "gpl-2.0", "size": 34101 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,556,911
public void connect(Handler<AsyncResult<Void>> handler) { next = resp(handler, when("220", c -> { handler.handle(Future.succeededFuture()); })); client = vertx.createNetClient(); client.connect(port, host, res -> { socket = res.result(); if (res....
void function(Handler<AsyncResult<Void>> handler) { next = resp(handler, when("220", c -> { handler.handle(Future.succeededFuture()); })); client = vertx.createNetClient(); client.connect(port, host, res -> { socket = res.result(); if (res.failed()) { handler.handle(Future.failedFuture(res.cause())); } else { RecordPar...
/** * Connect to the server. * @param handler callback handler that is called when the connection is completed. */
Connect to the server
connect
{ "repo_name": "bckfnn/vertx-ftp-client", "path": "src/main/java/io/github/bckfnn/ftp/FtpClient.java", "license": "apache-2.0", "size": 13140 }
[ "io.vertx.core.AsyncResult", "io.vertx.core.Future", "io.vertx.core.Handler", "io.vertx.core.parsetools.RecordParser" ]
import io.vertx.core.AsyncResult; import io.vertx.core.Future; import io.vertx.core.Handler; import io.vertx.core.parsetools.RecordParser;
import io.vertx.core.*; import io.vertx.core.parsetools.*;
[ "io.vertx.core" ]
io.vertx.core;
2,071,785
@UiHandler("m_cropButton") protected void openCropping(ClickEvent event) { m_formatHandler.openCropping(); }
@UiHandler(STR) void function(ClickEvent event) { m_formatHandler.openCropping(); }
/** * Opens the cropping dialog on crop button click.<p> * * @param event the click event */
Opens the cropping dialog on crop button click
openCropping
{ "repo_name": "alkacon/opencms-core", "path": "src-gwt/org/opencms/ade/galleries/client/preview/ui/CmsImageFormatsForm.java", "license": "lgpl-2.1", "size": 13475 }
[ "com.google.gwt.event.dom.client.ClickEvent", "com.google.gwt.uibinder.client.UiHandler" ]
import com.google.gwt.event.dom.client.ClickEvent; import com.google.gwt.uibinder.client.UiHandler;
import com.google.gwt.event.dom.client.*; import com.google.gwt.uibinder.client.*;
[ "com.google.gwt" ]
com.google.gwt;
1,579,770
public void removeField( JavaClassSource javaClassSource, String fieldName, ClassTypeResolver classTypeResolver ) throws Exception { logger.debug( "Removing field: " + fieldName + ", from class: " + javaClassSource.getName() ); FieldSource<JavaClassSource> field; GenerationTools genTools = ...
void function( JavaClassSource javaClassSource, String fieldName, ClassTypeResolver classTypeResolver ) throws Exception { logger.debug( STR + fieldName + STR + javaClassSource.getName() ); FieldSource<JavaClassSource> field; GenerationTools genTools = new GenerationTools(); String methodName; MethodSource<JavaClassSou...
/** * Takes care of field and the corresponding setter/getter removal. */
Takes care of field and the corresponding setter/getter removal
removeField
{ "repo_name": "scandihealth/kie-wb-common", "path": "kie-wb-common-services/kie-wb-common-data-modeller-core/src/main/java/org/kie/workbench/common/services/datamodeller/driver/impl/JavaRoasterModelDriver.java", "license": "apache-2.0", "size": 74861 }
[ "org.drools.core.base.ClassTypeResolver", "org.jboss.forge.roaster.model.source.FieldSource", "org.jboss.forge.roaster.model.source.JavaClassSource", "org.jboss.forge.roaster.model.source.MethodSource", "org.kie.workbench.common.services.datamodeller.codegen.GenerationTools" ]
import org.drools.core.base.ClassTypeResolver; import org.jboss.forge.roaster.model.source.FieldSource; import org.jboss.forge.roaster.model.source.JavaClassSource; import org.jboss.forge.roaster.model.source.MethodSource; import org.kie.workbench.common.services.datamodeller.codegen.GenerationTools;
import org.drools.core.base.*; import org.jboss.forge.roaster.model.source.*; import org.kie.workbench.common.services.datamodeller.codegen.*;
[ "org.drools.core", "org.jboss.forge", "org.kie.workbench" ]
org.drools.core; org.jboss.forge; org.kie.workbench;
936,124
public RootInfo getRootOneshot(String authority, String rootId) { synchronized (mLock) { RootInfo root = getRootLocked(authority, rootId); if (root == null) { mRoots.putAll( authority, loadRootsForAuthority(mContext.getContentResolver(), author...
RootInfo function(String authority, String rootId) { synchronized (mLock) { RootInfo root = getRootLocked(authority, rootId); if (root == null) { mRoots.putAll( authority, loadRootsForAuthority(mContext.getContentResolver(), authority)); root = getRootLocked(authority, rootId); } return root; } }
/** * Return the requested {@link RootInfo}, but only loading the roots for the * requested authority. This is useful when we want to load fast without * waiting for all the other roots to come back. */
Return the requested <code>RootInfo</code>, but only loading the roots for the requested authority. This is useful when we want to load fast without waiting for all the other roots to come back
getRootOneshot
{ "repo_name": "Ant-Droid/android_frameworks_base_OLD", "path": "packages/DocumentsUI/src/com/android/documentsui/RootsCache.java", "license": "apache-2.0", "size": 15094 }
[ "com.android.documentsui.model.RootInfo" ]
import com.android.documentsui.model.RootInfo;
import com.android.documentsui.model.*;
[ "com.android.documentsui" ]
com.android.documentsui;
975,820
@Override public Integer load(final Integer key) { missCount.increment(); Blackhole.consumeCPU(1000); return key * 2 + 11; } }
Integer function(final Integer key) { missCount.increment(); Blackhole.consumeCPU(1000); return key * 2 + 11; } }
/** * The loader increments the miss counter and burns CPU via JMH's blackhole * to have a relevant miss penalty. */
The loader increments the miss counter and burns CPU via JMH's blackhole to have a relevant miss penalty
load
{ "repo_name": "headissue/cache2k-benchmark", "path": "jmh-suite/src/main/java/org/cache2k/benchmark/jmh/suite/eviction/symmetrical/ZipfianSequenceLoadingBenchmark.java", "license": "gpl-3.0", "size": 5107 }
[ "org.openjdk.jmh.infra.Blackhole" ]
import org.openjdk.jmh.infra.Blackhole;
import org.openjdk.jmh.infra.*;
[ "org.openjdk.jmh" ]
org.openjdk.jmh;
2,785,373
@POST @Path("{id}") @Produces(MediaType.APPLICATION_JSON) @ApiOperation("Updates the specified feed.") @ApiResponses({ @ApiResponse(code = 200, message = "The feed was updated.", response = Feed.class), @ApiResponse(code = 404, message = "The feed was not ...
@Path("{id}") @Produces(MediaType.APPLICATION_JSON) @ApiOperation(STR) @ApiResponses({ @ApiResponse(code = 200, message = STR, response = Feed.class), @ApiResponse(code = 404, message = STR, response = RestResponseStatus.class), @ApiResponse(code = 500, message = STR, response = RestResponseStatus.class) }) Feed functi...
/** * Updates an existing feed. Note that POST is used here rather than PUT since it behaves more like a PATCH; which isn't supported in Jersey. */
Updates an existing feed. Note that POST is used here rather than PUT since it behaves more like a PATCH; which isn't supported in Jersey
updateFeed
{ "repo_name": "rashidaligee/kylo", "path": "services/feed-manager-service/feed-manager-controller/src/main/java/com/thinkbiganalytics/feedmgr/rest/controller/FeedsController.java", "license": "apache-2.0", "size": 59384 }
[ "com.thinkbiganalytics.feedmgr.security.FeedServicesAccessControl", "com.thinkbiganalytics.metadata.rest.model.feed.Feed", "com.thinkbiganalytics.rest.model.RestResponseStatus", "com.thinkbiganalytics.security.AccessController", "io.swagger.annotations.ApiOperation", "io.swagger.annotations.ApiResponse", ...
import com.thinkbiganalytics.feedmgr.security.FeedServicesAccessControl; import com.thinkbiganalytics.metadata.rest.model.feed.Feed; import com.thinkbiganalytics.rest.model.RestResponseStatus; import com.thinkbiganalytics.security.AccessController; import io.swagger.annotations.ApiOperation; import io.swagger.annotatio...
import com.thinkbiganalytics.feedmgr.security.*; import com.thinkbiganalytics.metadata.rest.model.feed.*; import com.thinkbiganalytics.rest.model.*; import com.thinkbiganalytics.security.*; import io.swagger.annotations.*; import javax.ws.rs.*; import javax.ws.rs.core.*;
[ "com.thinkbiganalytics.feedmgr", "com.thinkbiganalytics.metadata", "com.thinkbiganalytics.rest", "com.thinkbiganalytics.security", "io.swagger.annotations", "javax.ws" ]
com.thinkbiganalytics.feedmgr; com.thinkbiganalytics.metadata; com.thinkbiganalytics.rest; com.thinkbiganalytics.security; io.swagger.annotations; javax.ws;
2,217,676
EReference getAncestorVersionSpec_Target();
EReference getAncestorVersionSpec_Target();
/** * Returns the meta object for the containment reference ' * {@link org.eclipse.emf.emfstore.internal.server.model.versioning.AncestorVersionSpec#getTarget <em>Target</em>}'. * <!-- begin-user-doc --> <!-- end-user-doc --> * * @return the meta object for the containment reference '<em>Target</em>'. * @s...
Returns the meta object for the containment reference ' <code>org.eclipse.emf.emfstore.internal.server.model.versioning.AncestorVersionSpec#getTarget Target</code>'.
getAncestorVersionSpec_Target
{ "repo_name": "edgarmueller/emfstore-rest", "path": "bundles/org.eclipse.emf.emfstore.server.model/src/org/eclipse/emf/emfstore/internal/server/model/versioning/VersioningPackage.java", "license": "epl-1.0", "size": 84798 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,308,529
public void endElement(String name) throws IOException { xmlOut.endElement(name); }
void function(String name) throws IOException { xmlOut.endElement(name); }
/** * <p>Ends an element.</p> * * <p>This may output an end-tag or close the current start-tag as an * empty element.</p> */
Ends an element. This may output an end-tag or close the current start-tag as an empty element
endElement
{ "repo_name": "jonabbey/Ganymede", "path": "src/ganymede/arlut/csd/ganymede/server/XMLDumpContext.java", "license": "gpl-2.0", "size": 22698 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,149,522
private void putGraphic(AbstractGraphics abstractGraphic, Image image) throws IOException { byte[] rawData = null; final ImageInfo info = image.getInfo(); if (image instanceof ImageRawStream) { ImageRawStream rawImage = (ImageRawStream)image; InputStream...
void function(AbstractGraphics abstractGraphic, Image image) throws IOException { byte[] rawData = null; final ImageInfo info = image.getInfo(); if (image instanceof ImageRawStream) { ImageRawStream rawImage = (ImageRawStream)image; InputStream in = rawImage.createInputStream(); try { rawData = IOUtils.toByteArray(in);...
/** * Puts a graphic/image into the generated RTF file. * @param abstractGraphic the graphic (external-graphic or instream-foreign-object) * @param image the image * @throws IOException In case of an I/O error */
Puts a graphic/image into the generated RTF file
putGraphic
{ "repo_name": "spepping/fop-cs", "path": "src/java/org/apache/fop/render/rtf/RTFHandler.java", "license": "apache-2.0", "size": 63812 }
[ "java.io.IOException", "java.io.InputStream", "org.apache.commons.io.IOUtils", "org.apache.fop.ResourceEventProducer", "org.apache.fop.datatypes.PercentBaseContext", "org.apache.fop.fo.flow.AbstractGraphics", "org.apache.xmlgraphics.image.loader.Image", "org.apache.xmlgraphics.image.loader.ImageInfo",...
import java.io.IOException; import java.io.InputStream; import org.apache.commons.io.IOUtils; import org.apache.fop.ResourceEventProducer; import org.apache.fop.datatypes.PercentBaseContext; import org.apache.fop.fo.flow.AbstractGraphics; import org.apache.xmlgraphics.image.loader.Image; import org.apache.xmlgraphics.i...
import java.io.*; import org.apache.commons.io.*; import org.apache.fop.*; import org.apache.fop.datatypes.*; import org.apache.fop.fo.flow.*; import org.apache.xmlgraphics.image.loader.*; import org.apache.xmlgraphics.image.loader.impl.*;
[ "java.io", "org.apache.commons", "org.apache.fop", "org.apache.xmlgraphics" ]
java.io; org.apache.commons; org.apache.fop; org.apache.xmlgraphics;
1,349,098
private static BookieServiceInfo buildBookieServiceInfo(ComponentInfoPublisher componentInfoPublisher) { List<Endpoint> endpoints = componentInfoPublisher.getEndpoints().values() .stream().map(e -> { return new Endpoint( e.getId(), ...
static BookieServiceInfo function(ComponentInfoPublisher componentInfoPublisher) { List<Endpoint> endpoints = componentInfoPublisher.getEndpoints().values() .stream().map(e -> { return new Endpoint( e.getId(), e.getPort(), e.getHost(), e.getProtocol(), e.getAuth(), e.getExtensions() ); }).collect(Collectors.toList()); ...
/** * Create the {@link BookieServiceInfo} starting from the published endpoints. * * @see ComponentInfoPublisher * @param componentInfoPublisher the endpoint publisher * @return the created bookie service info */
Create the <code>BookieServiceInfo</code> starting from the published endpoints
buildBookieServiceInfo
{ "repo_name": "apache/bookkeeper", "path": "bookkeeper-server/src/main/java/org/apache/bookkeeper/server/Main.java", "license": "apache-2.0", "size": 26518 }
[ "java.util.List", "java.util.stream.Collectors", "org.apache.bookkeeper.common.component.ComponentInfoPublisher", "org.apache.bookkeeper.discover.BookieServiceInfo" ]
import java.util.List; import java.util.stream.Collectors; import org.apache.bookkeeper.common.component.ComponentInfoPublisher; import org.apache.bookkeeper.discover.BookieServiceInfo;
import java.util.*; import java.util.stream.*; import org.apache.bookkeeper.common.component.*; import org.apache.bookkeeper.discover.*;
[ "java.util", "org.apache.bookkeeper" ]
java.util; org.apache.bookkeeper;
926,796
public void setEntityManagerFactoryInterface(Class<? extends EntityManagerFactory> emfInterface) { Assert.isAssignable(EntityManagerFactory.class, emfInterface); this.entityManagerFactoryInterface = emfInterface; }
void function(Class<? extends EntityManagerFactory> emfInterface) { Assert.isAssignable(EntityManagerFactory.class, emfInterface); this.entityManagerFactoryInterface = emfInterface; }
/** * Specify the (potentially vendor-specific) EntityManagerFactory interface * that this EntityManagerFactory proxy is supposed to implement. * <p>The default will be taken from the specific JpaVendorAdapter, if any, * or set to the standard <code>javax.persistence.EntityManagerFactory</code> * interfa...
Specify the (potentially vendor-specific) EntityManagerFactory interface that this EntityManagerFactory proxy is supposed to implement. The default will be taken from the specific JpaVendorAdapter, if any, or set to the standard <code>javax.persistence.EntityManagerFactory</code> interface else
setEntityManagerFactoryInterface
{ "repo_name": "codeApeFromChina/resource", "path": "frame_packages/java_libs/spring-2.5.6-src/tiger/src/org/springframework/orm/jpa/AbstractEntityManagerFactoryBean.java", "license": "unlicense", "size": 17773 }
[ "javax.persistence.EntityManagerFactory", "org.springframework.util.Assert" ]
import javax.persistence.EntityManagerFactory; import org.springframework.util.Assert;
import javax.persistence.*; import org.springframework.util.*;
[ "javax.persistence", "org.springframework.util" ]
javax.persistence; org.springframework.util;
2,347,684
public JMenuItem add(Action a) { return popup.add(a); }
JMenuItem function(Action a) { return popup.add(a); }
/** * Appends a new menu item to the end of the menu which dispatches the * specified {@code Action} object. * * @param a * the {@code Action} to add to the menu. * @return the new menu item. * @see Action */
Appends a new menu item to the end of the menu which dispatches the specified Action object
add
{ "repo_name": "hlfernandez/GC4S", "path": "gc4s/src/main/java/org/sing_group/gc4s/ui/menu/HamburgerMenu.java", "license": "gpl-3.0", "size": 3742 }
[ "javax.swing.Action", "javax.swing.JMenuItem" ]
import javax.swing.Action; import javax.swing.JMenuItem;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
2,572,870
@Override public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { super.onRequestPermissionsResult(requestCode, permissions, grantResults); if (vm != null) if (vm instanceof IPermission) ((IPermission) vm)....
void function(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { super.onRequestPermissionsResult(requestCode, permissions, grantResults); if (vm != null) if (vm instanceof IPermission) ((IPermission) vm).onRequestPermissionsResult(requestCode, permissions, grantResults); }
/*** * Handle the permission and give it to the activity * * @param requestCode * @param permissions * @param grantResults */
Handle the permission and give it to the activity
onRequestPermissionsResult
{ "repo_name": "joxad/easydatabinding", "path": "lib/src/main/java/com/joxad/easydatabinding/activity/ActivityBase.java", "license": "apache-2.0", "size": 4069 }
[ "android.support.annotation.NonNull" ]
import android.support.annotation.NonNull;
import android.support.annotation.*;
[ "android.support" ]
android.support;
2,722,752
private List<FeatureCollection> parseFeatureCollectionData( Element featureCollectionData ) throws OGCWebServiceException { if ( featureCollectionData == null ) { return null; } List<FeatureCollection> transformableData = new ArrayList<FeatureCollectio...
List<FeatureCollection> function( Element featureCollectionData ) throws OGCWebServiceException { if ( featureCollectionData == null ) { return null; } List<FeatureCollection> transformableData = new ArrayList<FeatureCollection>(); try { List<Element> fcElements = getElements( featureCollectionData, GML_PREFIX + STR, n...
/** * Parse the featurecollections from the given featureCollectionsData element. * * @param featureCollectionData * (a deegreewcts:inlineElement/deegreewcts:FeatureCollectionData or a deegreewcts:mulipart element). * @return the list of feature collections. * @throws OGCWebServ...
Parse the featurecollections from the given featureCollectionsData element
parseFeatureCollectionData
{ "repo_name": "lat-lon/deegree2-base", "path": "deegree2-core/src/main/java/org/deegree/ogcwebservices/wcts/operation/TransformDocument.java", "license": "lgpl-2.1", "size": 26509 }
[ "java.util.ArrayList", "java.util.List", "org.deegree.framework.xml.XMLParsingException", "org.deegree.framework.xml.XMLTools", "org.deegree.i18n.Messages", "org.deegree.model.feature.FeatureCollection", "org.deegree.model.feature.GMLFeatureCollectionDocument", "org.deegree.ogcbase.ExceptionCode", "...
import java.util.ArrayList; import java.util.List; import org.deegree.framework.xml.XMLParsingException; import org.deegree.framework.xml.XMLTools; import org.deegree.i18n.Messages; import org.deegree.model.feature.FeatureCollection; import org.deegree.model.feature.GMLFeatureCollectionDocument; import org.deegree.ogcb...
import java.util.*; import org.deegree.framework.xml.*; import org.deegree.i18n.*; import org.deegree.model.feature.*; import org.deegree.ogcbase.*; import org.deegree.ogcwebservices.*; import org.deegree.ogcwebservices.wcts.*; import org.w3c.dom.*;
[ "java.util", "org.deegree.framework", "org.deegree.i18n", "org.deegree.model", "org.deegree.ogcbase", "org.deegree.ogcwebservices", "org.w3c.dom" ]
java.util; org.deegree.framework; org.deegree.i18n; org.deegree.model; org.deegree.ogcbase; org.deegree.ogcwebservices; org.w3c.dom;
1,837,082
@ManagedAttribute(description = "Whether to include a Prefer: return=representation; include=\"URI\" header") public String getPreferInclude() { return getConfiguration().getPreferInclude(); }
@ManagedAttribute(description = STRURI\STR) String function() { return getConfiguration().getPreferInclude(); }
/** * preferInclude getter * * @return the URI(s) that populate the include section in a Prefer header */
preferInclude getter
getPreferInclude
{ "repo_name": "daniel-dgi/fcrepo-camel", "path": "src/main/java/org/fcrepo/camel/FcrepoEndpoint.java", "license": "apache-2.0", "size": 13666 }
[ "org.apache.camel.api.management.ManagedAttribute" ]
import org.apache.camel.api.management.ManagedAttribute;
import org.apache.camel.api.management.*;
[ "org.apache.camel" ]
org.apache.camel;
1,772,363
public static <E extends SpecificRecord, S extends SpecificRecord> Dao<E> buildCompositeDaoWithInputStream( HTablePool tablePool, String tableName, List<InputStream> subEntitySchemaStreams, Class<E> entityClass) { List<String> subEntitySchemaStrings = new ArrayList<String>(); for (InputStream sub...
static <E extends SpecificRecord, S extends SpecificRecord> Dao<E> function( HTablePool tablePool, String tableName, List<InputStream> subEntitySchemaStreams, Class<E> entityClass) { List<String> subEntitySchemaStrings = new ArrayList<String>(); for (InputStream subEntitySchemaStream : subEntitySchemaStreams) { subEnti...
/** * Create a CompositeDao, which will return SpecificRecord instances * represented by the entitySchemaString avro schema. This avro schema must be * a composition of the schemas in the subEntitySchemaStrings list. * * @param tablePool * An HTablePool instance to use for connecting to HBas...
Create a CompositeDao, which will return SpecificRecord instances represented by the entitySchemaString avro schema. This avro schema must be a composition of the schemas in the subEntitySchemaStrings list
buildCompositeDaoWithInputStream
{ "repo_name": "stevek-ngdata/kite", "path": "kite-data/kite-data-hbase/src/main/java/org/kitesdk/data/hbase/avro/SpecificAvroDao.java", "license": "apache-2.0", "size": 18865 }
[ "java.io.InputStream", "java.util.ArrayList", "java.util.List", "org.apache.avro.specific.SpecificRecord", "org.apache.hadoop.hbase.client.HTablePool", "org.kitesdk.data.hbase.impl.Dao" ]
import java.io.InputStream; import java.util.ArrayList; import java.util.List; import org.apache.avro.specific.SpecificRecord; import org.apache.hadoop.hbase.client.HTablePool; import org.kitesdk.data.hbase.impl.Dao;
import java.io.*; import java.util.*; import org.apache.avro.specific.*; import org.apache.hadoop.hbase.client.*; import org.kitesdk.data.hbase.impl.*;
[ "java.io", "java.util", "org.apache.avro", "org.apache.hadoop", "org.kitesdk.data" ]
java.io; java.util; org.apache.avro; org.apache.hadoop; org.kitesdk.data;
2,053,509
public File tempdir() { final File ffile = new File(tempfile().getAbsoluteFile() + ".dir/"); if (!ffile.mkdirs()) { this.commonCore.report(MessageType.EXCEPTION, "Unable to create directory " + ffile); } return ffile; }
File function() { final File ffile = new File(tempfile().getAbsoluteFile() + ".dir/"); if (!ffile.mkdirs()) { this.commonCore.report(MessageType.EXCEPTION, STR + ffile); } return ffile; }
/** * Returns a temporary directory. * * @return A File object for a temporary directory. */
Returns a temporary directory
tempdir
{ "repo_name": "ubicity-devs/jcores", "path": "src/main/java/net/jcores/jre/cores/commons/CommonSys.java", "license": "agpl-3.0", "size": 7828 }
[ "java.io.File", "net.jcores.jre.options.MessageType" ]
import java.io.File; import net.jcores.jre.options.MessageType;
import java.io.*; import net.jcores.jre.options.*;
[ "java.io", "net.jcores.jre" ]
java.io; net.jcores.jre;
1,806,230
int[][] list = new int[adjacencyMatrix.length][]; for (int i = 0; i < adjacencyMatrix.length; i++) { Vector v = new Vector(); for (int j = 0; j < adjacencyMatrix[i].length; j++) { if (adjacencyMatrix[i][j]) { v.add(new Integer(j)); } } list[i] = new int[v.size()]; for (int j = 0; j < v...
int[][] list = new int[adjacencyMatrix.length][]; for (int i = 0; i < adjacencyMatrix.length; i++) { Vector v = new Vector(); for (int j = 0; j < adjacencyMatrix[i].length; j++) { if (adjacencyMatrix[i][j]) { v.add(new Integer(j)); } } list[i] = new int[v.size()]; for (int j = 0; j < v.size(); j++) { Integer in = (Inte...
/** * Calculates a adjacency-list for a given array of an adjacency-matrix. * * @param adjacencyMatrix array with the adjacency-matrix that represents * the graph * @return int[][]-array of the adjacency-list of given nodes. The first * dimension in the array represents the same node as in the given * adj...
Calculates a adjacency-list for a given array of an adjacency-matrix
getAdjacencyList
{ "repo_name": "UniversityOfBrightonComputing/iCurves", "path": "src/main/java/icurves/graph/cycles/AdjacencyList.java", "license": "mit", "size": 1192 }
[ "java.util.Vector" ]
import java.util.Vector;
import java.util.*;
[ "java.util" ]
java.util;
2,870,346
public static NamedMediaType getFromExtension(String extension) { MediaType mt = MediaType.getMediaTypeForExtension(extension); if (mt == null) return null; String description = mt.getMimeType(); return getFromDescription(description); }
static NamedMediaType function(String extension) { MediaType mt = MediaType.getMediaTypeForExtension(extension); if (mt == null) return null; String description = mt.getMimeType(); return getFromDescription(description); }
/** * Retrieves the named media type from the specified extension. * * This should only be used if you are positive that the media type * is already cached for this extension. */
Retrieves the named media type from the specified extension. This should only be used if you are positive that the media type is already cached for this extension
getFromExtension
{ "repo_name": "alejandroarturom/frostwire-desktop", "path": "src/com/limegroup/gnutella/gui/search/NamedMediaType.java", "license": "gpl-3.0", "size": 7307 }
[ "com.limegroup.gnutella.MediaType" ]
import com.limegroup.gnutella.MediaType;
import com.limegroup.gnutella.*;
[ "com.limegroup.gnutella" ]
com.limegroup.gnutella;
2,310,075
@Test public void testMoverCli() throws Exception { final MiniDFSCluster cluster = new MiniDFSCluster .Builder(new HdfsConfiguration()).numDataNodes(0).build(); try { final Configuration conf = cluster.getConfiguration(0); try { Mover.Cli.getNameNodePathsToMove(conf, "-p", "/foo"...
void function() throws Exception { final MiniDFSCluster cluster = new MiniDFSCluster .Builder(new HdfsConfiguration()).numDataNodes(0).build(); try { final Configuration conf = cluster.getConfiguration(0); try { Mover.Cli.getNameNodePathsToMove(conf, "-p", "/foo", "bar"); Assert.fail(STR); } catch (IllegalArgumentExcep...
/** * Test Mover Cli by specifying a list of files/directories using option "-p". * There is only one namenode (and hence name service) specified in the conf. */
Test Mover Cli by specifying a list of files/directories using option "-p". There is only one namenode (and hence name service) specified in the conf
testMoverCli
{ "repo_name": "szegedim/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/mover/TestMover.java", "license": "apache-2.0", "size": 46209 }
[ "java.util.Collection", "java.util.List", "java.util.Map", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.fs.Path", "org.apache.hadoop.hdfs.DFSUtil", "org.apache.hadoop.hdfs.HdfsConfiguration", "org.apache.hadoop.hdfs.MiniDFSCluster", "org.apache.hadoop.test.GenericTestUtils", "org.jun...
import java.util.Collection; import java.util.List; import java.util.Map; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hdfs.DFSUtil; import org.apache.hadoop.hdfs.HdfsConfiguration; import org.apache.hadoop.hdfs.MiniDFSCluster; import org.apache.hadoop.test.Gen...
import java.util.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.*; import org.apache.hadoop.test.*; import org.junit.*;
[ "java.util", "org.apache.hadoop", "org.junit" ]
java.util; org.apache.hadoop; org.junit;
295,215
XNameReplace xNR = oObj.getEvents(); xNR.getElementNames(); tRes.tested("getEvents()",xNR != null); }
XNameReplace xNR = oObj.getEvents(); xNR.getElementNames(); tRes.tested(STR,xNR != null); }
/** * Just calls the method. <p> * Has <b> OK </b> status if not <code>null</code> value returned. */
Just calls the method. Has OK status if not <code>null</code> value returned
_getEvents
{ "repo_name": "qt-haiku/LibreOffice", "path": "qadevOOo/tests/java/ifc/document/_XEventsSupplier.java", "license": "gpl-3.0", "size": 1605 }
[ "com.sun.star.container.XNameReplace" ]
import com.sun.star.container.XNameReplace;
import com.sun.star.container.*;
[ "com.sun.star" ]
com.sun.star;
1,822,446
protected void adds(int size, Register dst, Register src, int aimm) { assert !dst.equals(sp); assert !src.equals(zr); addSubImmInstruction(ADDS, dst, src, aimm, generalFromSize(size)); }
void function(int size, Register dst, Register src, int aimm) { assert !dst.equals(sp); assert !src.equals(zr); addSubImmInstruction(ADDS, dst, src, aimm, generalFromSize(size)); }
/** * dst = src + aimm and sets condition flags. * * @param size register size. Has to be 32 or 64. * @param dst general purpose register. May not be null or stackpointer. * @param src general purpose register. May not be null or zero-register. * @param aimm arithmetic immediate. Either un...
dst = src + aimm and sets condition flags
adds
{ "repo_name": "md-5/jdk10", "path": "src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.asm.aarch64/src/org/graalvm/compiler/asm/aarch64/AArch64Assembler.java", "license": "gpl-2.0", "size": 131187 }
[ "org.graalvm.compiler.asm.aarch64.AArch64Assembler" ]
import org.graalvm.compiler.asm.aarch64.AArch64Assembler;
import org.graalvm.compiler.asm.aarch64.*;
[ "org.graalvm.compiler" ]
org.graalvm.compiler;
344,076
public synchronized void setGroupLdap(String groupName) throws AmbariException { GroupEntity groupEntity = groupDAO.findGroupByName(groupName); if (groupEntity != null) { groupEntity.setGroupType(GroupType.LDAP); groupDAO.merge(groupEntity); } else { throw new AmbariException("Group " + ...
synchronized void function(String groupName) throws AmbariException { GroupEntity groupEntity = groupDAO.findGroupByName(groupName); if (groupEntity != null) { groupEntity.setGroupType(GroupType.LDAP); groupDAO.merge(groupEntity); } else { throw new AmbariException(STR + groupName + STR); } }
/** * Converts group to LDAP group. * * @param groupName group name * @throws AmbariException if group does not exist */
Converts group to LDAP group
setGroupLdap
{ "repo_name": "sekikn/ambari", "path": "ambari-server/src/main/java/org/apache/ambari/server/security/authorization/Users.java", "license": "apache-2.0", "size": 69453 }
[ "org.apache.ambari.server.AmbariException", "org.apache.ambari.server.orm.entities.GroupEntity" ]
import org.apache.ambari.server.AmbariException; import org.apache.ambari.server.orm.entities.GroupEntity;
import org.apache.ambari.server.*; import org.apache.ambari.server.orm.entities.*;
[ "org.apache.ambari" ]
org.apache.ambari;
2,578,212
public Player getPlayer() { Player p = Bukkit.getPlayer(playerName); if (p == null) { throw new IllegalStateException("Player " + playerName + " is not online"); } return p; }
Player function() { Player p = Bukkit.getPlayer(playerName); if (p == null) { throw new IllegalStateException(STR + playerName + STR); } return p; }
/** * Get the Player associated with this ExperienceManager. * * @return the Player object * @throws IllegalStateException * if the player is no longer online */
Get the Player associated with this ExperienceManager
getPlayer
{ "repo_name": "Jameskmonger/XPStrength", "path": "src/com/jamesmonger/XPStrength/util/ExperienceManager.java", "license": "mit", "size": 6178 }
[ "org.bukkit.Bukkit", "org.bukkit.entity.Player" ]
import org.bukkit.Bukkit; import org.bukkit.entity.Player;
import org.bukkit.*; import org.bukkit.entity.*;
[ "org.bukkit", "org.bukkit.entity" ]
org.bukkit; org.bukkit.entity;
311,022
private void initTeamCalPicker(final FieldsetPanel fieldSet) { if (access == false) { final TeamCalDO calendar = data.getCalendar(); final Label teamCalTitle = new Label(fieldSet.newChildId(), calendar != null ? new PropertyModel<String>(data.getCalendar(), "title") : ""); fieldSet.a...
void function(final FieldsetPanel fieldSet) { if (access == false) { final TeamCalDO calendar = data.getCalendar(); final Label teamCalTitle = new Label(fieldSet.newChildId(), calendar != null ? new PropertyModel<String>(data.getCalendar(), "title") : STRcalendar"), calChoiceRenderer.getValues(), calChoiceRenderer); ca...
/** * if has access: create drop down with teamCals else create label * * @param fieldSet */
if has access: create drop down with teamCals else create label
initTeamCalPicker
{ "repo_name": "linqingyicen/projectforge-webapp", "path": "src/main/java/org/projectforge/plugins/teamcal/event/TeamEventEditForm.java", "license": "gpl-3.0", "size": 22997 }
[ "org.apache.wicket.markup.html.basic.Label", "org.apache.wicket.model.PropertyModel", "org.projectforge.plugins.teamcal.admin.TeamCalDO", "org.projectforge.web.wicket.flowlayout.FieldsetPanel" ]
import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.model.PropertyModel; import org.projectforge.plugins.teamcal.admin.TeamCalDO; import org.projectforge.web.wicket.flowlayout.FieldsetPanel;
import org.apache.wicket.markup.html.basic.*; import org.apache.wicket.model.*; import org.projectforge.plugins.teamcal.admin.*; import org.projectforge.web.wicket.flowlayout.*;
[ "org.apache.wicket", "org.projectforge.plugins", "org.projectforge.web" ]
org.apache.wicket; org.projectforge.plugins; org.projectforge.web;
6,626
public void setNumericValue(long newValue) throws ActionFailedException;
void function(long newValue) throws ActionFailedException;
/** * Sets the current value. * * @return The current value */
Sets the current value
setNumericValue
{ "repo_name": "fraunhoferfokus/fokus-upnp", "path": "upnp-core/src/main/java/de/fraunhofer/fokus/lsf/core/IGenericBinaryUPnPActor.java", "license": "gpl-3.0", "size": 1522 }
[ "de.fraunhofer.fokus.upnp.util.exceptions.ActionFailedException" ]
import de.fraunhofer.fokus.upnp.util.exceptions.ActionFailedException;
import de.fraunhofer.fokus.upnp.util.exceptions.*;
[ "de.fraunhofer.fokus" ]
de.fraunhofer.fokus;
1,297,237
if (isInitialized()) { if (get() instanceof Destroyable) { try { ((Destroyable) get()).destroy(); } catch (final Exception e) { LOG.error("destroy operation failed", e); } } } object = null; }
if (isInitialized()) { if (get() instanceof Destroyable) { try { ((Destroyable) get()).destroy(); } catch (final Exception e) { LOG.error(STR, e); } } } object = null; }
/** * Destroy the initialized object. This will trigger the re-initialization when * {@link DestroyableLazyInitializer#get()} method is invoked. */
Destroy the initialized object. This will trigger the re-initialization when <code>DestroyableLazyInitializer#get()</code> method is invoked
destroy
{ "repo_name": "UAK-35/wro4j", "path": "wro4j-core/src/main/java/ro/isdc/wro/util/DestroyableLazyInitializer.java", "license": "apache-2.0", "size": 997 }
[ "ro.isdc.wro.model.resource.processor.Destroyable" ]
import ro.isdc.wro.model.resource.processor.Destroyable;
import ro.isdc.wro.model.resource.processor.*;
[ "ro.isdc.wro" ]
ro.isdc.wro;
2,765,993
public void onRollbackLastReInitializationError(ContainerId containerId, Throwable t) {}
void function(ContainerId containerId, Throwable t) {}
/** * Error Callback for rollback of last re-initialization. * * @param containerId the Id of the container to restart. * @param t a Throwable. */
Error Callback for rollback of last re-initialization
onRollbackLastReInitializationError
{ "repo_name": "bitmybytes/hadoop", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/api/async/NMClientAsync.java", "license": "apache-2.0", "size": 16023 }
[ "org.apache.hadoop.yarn.api.records.ContainerId" ]
import org.apache.hadoop.yarn.api.records.ContainerId;
import org.apache.hadoop.yarn.api.records.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,923,571
@Nullable GridCacheMvccCandidate addEntry(GridLocalCacheEntry entry) throws GridCacheEntryRemovedException { // Add local lock first, as it may throw GridCacheEntryRemovedException. GridCacheMvccCandidate c = entry.addLocal( threadId, lockVer, null, ...
@Nullable GridCacheMvccCandidate addEntry(GridLocalCacheEntry entry) throws GridCacheEntryRemovedException { GridCacheMvccCandidate c = entry.addLocal( threadId, lockVer, null, null, timeout, !inTx(), inTx(), implicitSingle() ); entries.add(entry); if (c == null && timeout < 0) { if (log.isDebugEnabled()) log.debug(STR...
/** * Adds entry to future. * * @param entry Entry to add. * @return Lock candidate. * @throws GridCacheEntryRemovedException If entry was removed. */
Adds entry to future
addEntry
{ "repo_name": "vsisko/incubator-ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/local/GridLocalLockFuture.java", "license": "apache-2.0", "size": 13027 }
[ "org.apache.ignite.internal.processors.cache.GridCacheEntryRemovedException", "org.apache.ignite.internal.processors.cache.GridCacheMvccCandidate", "org.jetbrains.annotations.Nullable" ]
import org.apache.ignite.internal.processors.cache.GridCacheEntryRemovedException; import org.apache.ignite.internal.processors.cache.GridCacheMvccCandidate; import org.jetbrains.annotations.Nullable;
import org.apache.ignite.internal.processors.cache.*; import org.jetbrains.annotations.*;
[ "org.apache.ignite", "org.jetbrains.annotations" ]
org.apache.ignite; org.jetbrains.annotations;
1,988,123
private boolean isMoreSpecificThan(ApplicableFunction left, ApplicableFunction right) { List<TypeSignatureProvider> resolvedTypes = fromTypeSignatures(left.getBoundSignature().getArgumentTypes()); Optional<BoundVariables> boundVariables = new SignatureBinder(typeManager, right.getDeclaredSignatu...
boolean function(ApplicableFunction left, ApplicableFunction right) { List<TypeSignatureProvider> resolvedTypes = fromTypeSignatures(left.getBoundSignature().getArgumentTypes()); Optional<BoundVariables> boundVariables = new SignatureBinder(typeManager, right.getDeclaredSignature(), true) .bindVariables(resolvedTypes);...
/** * One method is more specific than another if invocation handled by the first method could be passed on to the other one */
One method is more specific than another if invocation handled by the first method could be passed on to the other one
isMoreSpecificThan
{ "repo_name": "Teradata/presto", "path": "presto-main/src/main/java/com/facebook/presto/metadata/FunctionRegistry.java", "license": "apache-2.0", "size": 66050 }
[ "com.facebook.presto.sql.analyzer.TypeSignatureProvider", "com.facebook.presto.sql.tree.QualifiedName", "com.google.common.base.Preconditions", "com.google.common.collect.ImmutableListMultimap", "com.google.common.collect.Multimap", "com.google.common.collect.Multimaps", "java.util.Collection", "java....
import com.facebook.presto.sql.analyzer.TypeSignatureProvider; import com.facebook.presto.sql.tree.QualifiedName; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableListMultimap; import com.google.common.collect.Multimap; import com.google.common.collect.Multimaps; import java.util.C...
import com.facebook.presto.sql.analyzer.*; import com.facebook.presto.sql.tree.*; import com.google.common.base.*; import com.google.common.collect.*; import java.util.*;
[ "com.facebook.presto", "com.google.common", "java.util" ]
com.facebook.presto; com.google.common; java.util;
2,654,597
void enterCreator(@NotNull JavaParser.CreatorContext ctx); void exitCreator(@NotNull JavaParser.CreatorContext ctx);
void enterCreator(@NotNull JavaParser.CreatorContext ctx); void exitCreator(@NotNull JavaParser.CreatorContext ctx);
/** * Exit a parse tree produced by {@link JavaParser#creator}. * @param ctx the parse tree */
Exit a parse tree produced by <code>JavaParser#creator</code>
exitCreator
{ "repo_name": "hgkmail/HelloJava", "path": "src/cn/hgk/hellojava/JavaListener.java", "license": "gpl-2.0", "size": 38976 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
1,615,808
public Factory setLoadErrorHandlingPolicy(LoadErrorHandlingPolicy loadErrorHandlingPolicy) { Assertions.checkState(!isCreateCalled); this.loadErrorHandlingPolicy = loadErrorHandlingPolicy; return this; } /** * Sets the minimum number of times to retry if a loading error occurs. The d...
Factory function(LoadErrorHandlingPolicy loadErrorHandlingPolicy) { Assertions.checkState(!isCreateCalled); this.loadErrorHandlingPolicy = loadErrorHandlingPolicy; return this; } /** * Sets the minimum number of times to retry if a loading error occurs. The default value is * {@link DefaultLoadErrorHandlingPolicy#DEFAU...
/** * Sets the {@link LoadErrorHandlingPolicy}. The default value is created by calling {@link * DefaultLoadErrorHandlingPolicy#DefaultLoadErrorHandlingPolicy()}. * * <p>Calling this method overrides any calls to {@link #setMinLoadableRetryCount(int)}. * * @param loadErrorHandlingPolicy A ...
Sets the <code>LoadErrorHandlingPolicy</code>. The default value is created by calling <code>DefaultLoadErrorHandlingPolicy#DefaultLoadErrorHandlingPolicy()</code>. Calling this method overrides any calls to <code>#setMinLoadableRetryCount(int)</code>
setLoadErrorHandlingPolicy
{ "repo_name": "slp/Telegram-FOSS", "path": "TMessagesProj/src/main/java/com/google/android/exoplayer2/source/hls/HlsMediaSource.java", "license": "gpl-2.0", "size": 21270 }
[ "com.google.android.exoplayer2.upstream.DefaultLoadErrorHandlingPolicy", "com.google.android.exoplayer2.upstream.LoadErrorHandlingPolicy", "com.google.android.exoplayer2.util.Assertions" ]
import com.google.android.exoplayer2.upstream.DefaultLoadErrorHandlingPolicy; import com.google.android.exoplayer2.upstream.LoadErrorHandlingPolicy; import com.google.android.exoplayer2.util.Assertions;
import com.google.android.exoplayer2.upstream.*; import com.google.android.exoplayer2.util.*;
[ "com.google.android" ]
com.google.android;
877,710
public CtxAttributeValueType getValueType() { return this.valueType; }
CtxAttributeValueType function() { return this.valueType; }
/** * Returns the value type of this context attribute * * @return the value type of this context attribute */
Returns the value type of this context attribute
getValueType
{ "repo_name": "EPapadopoulou/PersoNIS", "path": "api/android/archive/external/src/main/java/org/societies/android/api/context/model/ACtxAttribute.java", "license": "bsd-2-clause", "size": 15080 }
[ "org.societies.api.context.model.CtxAttributeValueType" ]
import org.societies.api.context.model.CtxAttributeValueType;
import org.societies.api.context.model.*;
[ "org.societies.api" ]
org.societies.api;
79,947
public char getFieldChar(String field) { throwInvalidField(field, Type.CHAR); return fieldsCharacter[fieldDescriptor.getTypeToFieldToIndex().get(Type.CHAR).get(field)]; }
char function(String field) { throwInvalidField(field, Type.CHAR); return fieldsCharacter[fieldDescriptor.getTypeToFieldToIndex().get(Type.CHAR).get(field)]; }
/** * Gets the char value of the given field. * @param field The field. * @return The value. */
Gets the char value of the given field
getFieldChar
{ "repo_name": "siyuanh/apex-malhar", "path": "library/src/main/java/com/datatorrent/lib/appdata/gpo/GPOMutable.java", "license": "apache-2.0", "size": 21060 }
[ "com.datatorrent.lib.appdata.schemas.Type" ]
import com.datatorrent.lib.appdata.schemas.Type;
import com.datatorrent.lib.appdata.schemas.*;
[ "com.datatorrent.lib" ]
com.datatorrent.lib;
2,085,536
public CompletableFuture<Node> start() { return CompletableFuture.completedFuture(null) .thenCompose((v) -> { return this.performUpgrade(); }).thenCompose((v) -> { return this.loadBibles(); }).thenCompose((v) -> { return this.loadSongs(); }).thenCompose((v) -> { return this.loadMedia()...
CompletableFuture<Node> function() { return CompletableFuture.completedFuture(null) .thenCompose((v) -> { return this.performUpgrade(); }).thenCompose((v) -> { return this.loadBibles(); }).thenCompose((v) -> { return this.loadSongs(); }).thenCompose((v) -> { return this.loadMedia(); }).thenCompose((v) -> { return this....
/** * Starts the loading process on another thread. */
Starts the loading process on another thread
start
{ "repo_name": "wnbittle/praisenter", "path": "src/main/java/org/praisenter/ui/LoadingPane.java", "license": "bsd-3-clause", "size": 13439 }
[ "java.util.concurrent.CompletableFuture" ]
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
949,748
public interface BannerDAO { public Banner selectById(int bannerId);
interface BannerDAO { public Banner function(int bannerId);
/** * Gets a specific <code>Banner</code>. * * @param bannerId The Banner ID to search * @return <code>Banner</code> object containing all the information * @see #selectAll */
Gets a specific <code>Banner</code>
selectById
{ "repo_name": "dalinhuang/suduforum", "path": "src/net/jforum/dao/BannerDAO.java", "license": "bsd-3-clause", "size": 3568 }
[ "net.jforum.entities.Banner" ]
import net.jforum.entities.Banner;
import net.jforum.entities.*;
[ "net.jforum.entities" ]
net.jforum.entities;
303,098
public List<ViewAction> getActions();
List<ViewAction> function();
/** * Returns the list of actions * * @return List of actions */
Returns the list of actions
getActions
{ "repo_name": "sarality/appblocks", "path": "src/main/java/com/sarality/app/view/action/ViewAction.java", "license": "apache-2.0", "size": 1936 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
597,266
public static PeerID newPeerID( PeerGroupID groupID, byte [] seed ) { String useFormat = groupID.getIDFormat(); // is the group netpg or worldpg? if( IDFormat.INSTANTIATOR.getSupportedIDFormat().equals( useFormat ) ) { useFormat = factory.idNewInstances; } ...
static PeerID function( PeerGroupID groupID, byte [] seed ) { String useFormat = groupID.getIDFormat(); if( IDFormat.INSTANTIATOR.getSupportedIDFormat().equals( useFormat ) ) { useFormat = factory.idNewInstances; } Instantiator instantiator = (Instantiator) factory.getInstantiator( useFormat ); return instantiator.newP...
/** * Creates a new PeerID instance. A new PeerID will be generated. * The PeerID will be a member of the provided group. * * @see net.jxta.peergroup.PeerGroup * * @param groupID the group to which this PeerID will belong. * @param seed The seed information which will be used ...
Creates a new PeerID instance. A new PeerID will be generated. The PeerID will be a member of the provided group
newPeerID
{ "repo_name": "idega/net.jxta", "path": "src/java/net/jxta/id/IDFactory.java", "license": "gpl-3.0", "size": 52387 }
[ "net.jxta.id.jxta.IDFormat", "net.jxta.peer.PeerID", "net.jxta.peergroup.PeerGroupID" ]
import net.jxta.id.jxta.IDFormat; import net.jxta.peer.PeerID; import net.jxta.peergroup.PeerGroupID;
import net.jxta.id.jxta.*; import net.jxta.peer.*; import net.jxta.peergroup.*;
[ "net.jxta.id", "net.jxta.peer", "net.jxta.peergroup" ]
net.jxta.id; net.jxta.peer; net.jxta.peergroup;
1,820,081
public void ifZCmp(final int mode, final Label label) { mv.visitJumpInsn(mode, label); }
void function(final int mode, final Label label) { mv.visitJumpInsn(mode, label); }
/** * Generates the instructions to jump to a label based on the comparison of * the top integer stack value with zero. * * @param mode * how these values must be compared. One of EQ, NE, LT, GE, GT, * LE. * @param label * where to jump if the co...
Generates the instructions to jump to a label based on the comparison of the top integer stack value with zero
ifZCmp
{ "repo_name": "llbit/ow2-asm", "path": "src/org/objectweb/asm/commons/GeneratorAdapter.java", "license": "bsd-3-clause", "size": 50594 }
[ "org.objectweb.asm.Label" ]
import org.objectweb.asm.Label;
import org.objectweb.asm.*;
[ "org.objectweb.asm" ]
org.objectweb.asm;
929,289
protected Ethernet createArpReplyPacket(int srcIp, int dstIp, long srcMac, long dstMac, short vlanId, byte priorityCode) { byte[] dstMacByte = MACAddress.valueOf(dstMac).toBytes(); byte[] srcMacByte = MACAddress.valueOf(srcMac).toBytes(); IPacket arpReply = new E...
Ethernet function(int srcIp, int dstIp, long srcMac, long dstMac, short vlanId, byte priorityCode) { byte[] dstMacByte = MACAddress.valueOf(dstMac).toBytes(); byte[] srcMacByte = MACAddress.valueOf(srcMac).toBytes(); IPacket arpReply = new Ethernet() .setSourceMACAddress(dstMacByte) .setDestinationMACAddress(srcMacByte...
/** * Creates an ARP reply encapsulated in an Ethernet frame. * @param srcIp The source IP (host that sent the ARP request). * @param dstIp The destination IP (The IP the host is querying for). * @param srcMac The MAC address of the host that sent the ARP request. * @param dstMac The MAC addres...
Creates an ARP reply encapsulated in an Ethernet frame
createArpReplyPacket
{ "repo_name": "mandeepdhami/netvirt-ctrl", "path": "sdnplatform/src/main/java/org/sdnplatform/netvirt/virtualrouting/internal/VirtualRouting.java", "license": "epl-1.0", "size": 108026 }
[ "org.sdnplatform.packet.Ethernet", "org.sdnplatform.packet.IPacket", "org.sdnplatform.packet.IPv4", "org.sdnplatform.util.MACAddress" ]
import org.sdnplatform.packet.Ethernet; import org.sdnplatform.packet.IPacket; import org.sdnplatform.packet.IPv4; import org.sdnplatform.util.MACAddress;
import org.sdnplatform.packet.*; import org.sdnplatform.util.*;
[ "org.sdnplatform.packet", "org.sdnplatform.util" ]
org.sdnplatform.packet; org.sdnplatform.util;
2,067,754
private CompletableFuture<List<MesosWorkerStore.Worker>> getWorkersAsync() { // if this resource manager is recovering from failure, // then some worker tasks are most likely still alive and we can re-obtain them return CompletableFuture.supplyAsync(() -> { try { final List<MesosWorkerStore.Worker> task...
CompletableFuture<List<MesosWorkerStore.Worker>> function() { return CompletableFuture.supplyAsync(() -> { try { final List<MesosWorkerStore.Worker> tasksFromPreviousAttempts = workerStore.recoverWorkers(); for (final MesosWorkerStore.Worker worker : tasksFromPreviousAttempts) { if (worker.state() == MesosWorkerStore.W...
/** * Fetches framework/worker information persisted by a prior incarnation of the RM. */
Fetches framework/worker information persisted by a prior incarnation of the RM
getWorkersAsync
{ "repo_name": "mbode/flink", "path": "flink-mesos/src/main/java/org/apache/flink/mesos/runtime/clusterframework/MesosResourceManager.java", "license": "apache-2.0", "size": 31162 }
[ "java.util.List", "java.util.concurrent.CompletableFuture", "java.util.concurrent.CompletionException", "org.apache.flink.mesos.runtime.clusterframework.store.MesosWorkerStore", "org.apache.flink.runtime.resourcemanager.exceptions.ResourceManagerException" ]
import java.util.List; import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletionException; import org.apache.flink.mesos.runtime.clusterframework.store.MesosWorkerStore; import org.apache.flink.runtime.resourcemanager.exceptions.ResourceManagerException;
import java.util.*; import java.util.concurrent.*; import org.apache.flink.mesos.runtime.clusterframework.store.*; import org.apache.flink.runtime.resourcemanager.exceptions.*;
[ "java.util", "org.apache.flink" ]
java.util; org.apache.flink;
2,570,766
public Iterator<Property> getChildren();
Iterator<Property> function();
/** * Get an iterator over the children of this Parent; all elements * are instances of Property. * * @return Iterator of children; may refer to an empty collection */
Get an iterator over the children of this Parent; all elements are instances of Property
getChildren
{ "repo_name": "neolord0/hwplib", "path": "src/main/java/kr/dogfoot/hwplib/org/apache/poi/poifs/property/Parent.java", "license": "apache-2.0", "size": 2222 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
2,097,753
public static boolean getCompressOutput(JobContext job) { return job.getConfiguration().getBoolean("mapred.output.compress", false); }
static boolean function(JobContext job) { return job.getConfiguration().getBoolean(STR, false); }
/** * Is the job output compressed? * @param job the Job to look in * @return <code>true</code> if the job output should be compressed, * <code>false</code> otherwise */
Is the job output compressed
getCompressOutput
{ "repo_name": "zyguan/HDFS-503-on-0.20.2", "path": "src/mapred/org/apache/hadoop/mapreduce/lib/output/FileOutputFormat.java", "license": "apache-2.0", "size": 11081 }
[ "org.apache.hadoop.mapreduce.JobContext" ]
import org.apache.hadoop.mapreduce.JobContext;
import org.apache.hadoop.mapreduce.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
333,562
@Test(expected = GeniePreconditionException.class) public void testAddTagsToApplicationNoTags() throws GenieException { this.service.addTagsForApplication(APP_1_ID, null); }
@Test(expected = GeniePreconditionException.class) void function() throws GenieException { this.service.addTagsForApplication(APP_1_ID, null); }
/** * Test add tags to application. * * @throws GenieException */
Test add tags to application
testAddTagsToApplicationNoTags
{ "repo_name": "gorcz/genie", "path": "genie-server/src/test/java/com/netflix/genie/server/services/impl/jpa/TestApplicationConfigServiceJPAImpl.java", "license": "apache-2.0", "size": 43910 }
[ "com.netflix.genie.common.exceptions.GenieException", "com.netflix.genie.common.exceptions.GeniePreconditionException", "org.junit.Test" ]
import com.netflix.genie.common.exceptions.GenieException; import com.netflix.genie.common.exceptions.GeniePreconditionException; import org.junit.Test;
import com.netflix.genie.common.exceptions.*; import org.junit.*;
[ "com.netflix.genie", "org.junit" ]
com.netflix.genie; org.junit;
2,040,382
protected static String unescape(String value) { value = CmsStringUtil.substitute(value, "\\,", ","); value = CmsStringUtil.substitute(value, "\\=", "="); value = CmsStringUtil.substitute(value, "\\\\", "\\"); return value; }
static String function(String value) { value = CmsStringUtil.substitute(value, "\\,", ","); value = CmsStringUtil.substitute(value, "\\=", "="); value = CmsStringUtil.substitute(value, "\\\\", "\\"); return value; }
/** * Replaces escaped char sequences in the input value.<p> * * @param value the value to unescape * * @return the unescaped String */
Replaces escaped char sequences in the input value
unescape
{ "repo_name": "alkacon/opencms-core", "path": "src/org/opencms/configuration/CmsParameterConfiguration.java", "license": "lgpl-2.1", "size": 29371 }
[ "org.opencms.util.CmsStringUtil" ]
import org.opencms.util.CmsStringUtil;
import org.opencms.util.*;
[ "org.opencms.util" ]
org.opencms.util;
514,255
@Test public void onClickNavMyWorkflows_openMyWorkflowActivity() throws Exception { onView(withId(R.id.drawer_layout)) .check(matches(isClosed(Gravity.LEFT))) .perform(DrawerActions.open()); onView(withId(R.id.nav_view)) .perform(NavigationViewAc...
void function() throws Exception { onView(withId(R.id.drawer_layout)) .check(matches(isClosed(Gravity.LEFT))) .perform(DrawerActions.open()); onView(withId(R.id.nav_view)) .perform(NavigationViewActions.navigateTo(R.id.nav_my_workflows)); onView(withId(R.id.frame_container)).check(matches((isDisplayed()))); }
/** * Checks if the myWorkflow fragment is launched when we click on myWorkflow in nav drawer. * Without login, The app does not have any user then it also does not have any myworkflow * Without login it will fail */
Checks if the myWorkflow fragment is launched when we click on myWorkflow in nav drawer. Without login, The app does not have any user then it also does not have any myworkflow Without login it will fail
onClickNavMyWorkflows_openMyWorkflowActivity
{ "repo_name": "apache/incubator-taverna-mobile", "path": "app/src/androidTest/java/org/apache/taverna/mobile/DashboardActivityTest.java", "license": "apache-2.0", "size": 10182 }
[ "android.support.test.espresso.Espresso", "android.support.test.espresso.contrib.DrawerActions", "android.support.test.espresso.contrib.NavigationViewActions", "android.view.Gravity" ]
import android.support.test.espresso.Espresso; import android.support.test.espresso.contrib.DrawerActions; import android.support.test.espresso.contrib.NavigationViewActions; import android.view.Gravity;
import android.support.test.espresso.*; import android.support.test.espresso.contrib.*; import android.view.*;
[ "android.support", "android.view" ]
android.support; android.view;
2,085,039
public String addNewModule(String pageKey, String parentObjectInstanceID, int newICObjectID, String label, IWSlideSession slideSession) { IBXMLPage page = null; try { page = getIBXMLPage(pageKey); } catch (Exception e) { e.printStackTrace(); return null; } if (slideSession != null) { // Will c...
String function(String pageKey, String parentObjectInstanceID, int newICObjectID, String label, IWSlideSession slideSession) { IBXMLPage page = null; try { page = getIBXMLPage(pageKey); } catch (Exception e) { e.printStackTrace(); return null; } if (slideSession != null) { XMLElement region = null; try { region = getIB...
/** * After inserting new module IBXMLPage is saved (if successfully inserted module) in other thread * @param pageKey * @param parentObjectInstanceID * @param newICObjectID * @param label * @param slideSession * @return */
After inserting new module IBXMLPage is saved (if successfully inserted module) in other thread
addNewModule
{ "repo_name": "idega/com.idega.builder", "path": "src/java/com/idega/builder/business/BuilderLogic.java", "license": "gpl-3.0", "size": 145872 }
[ "com.idega.slide.business.IWSlideSession", "com.idega.xml.XMLElement", "java.util.List" ]
import com.idega.slide.business.IWSlideSession; import com.idega.xml.XMLElement; import java.util.List;
import com.idega.slide.business.*; import com.idega.xml.*; import java.util.*;
[ "com.idega.slide", "com.idega.xml", "java.util" ]
com.idega.slide; com.idega.xml; java.util;
703,967
public AdvisorInner update(String resourceGroupName, String serverName, String advisorName, AutoExecuteStatus autoExecuteStatus) { return updateWithServiceResponseAsync(resourceGroupName, serverName, advisorName, autoExecuteStatus).toBlocking().single().body(); }
AdvisorInner function(String resourceGroupName, String serverName, String advisorName, AutoExecuteStatus autoExecuteStatus) { return updateWithServiceResponseAsync(resourceGroupName, serverName, advisorName, autoExecuteStatus).toBlocking().single().body(); }
/** * Updates a server advisor. * * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param advisorName The name of the Server Advisor. ...
Updates a server advisor
update
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/sql/mgmt-v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/ServerAdvisorsInner.java", "license": "mit", "size": 21053 }
[ "com.microsoft.azure.management.sql.v2015_05_01_preview.AutoExecuteStatus" ]
import com.microsoft.azure.management.sql.v2015_05_01_preview.AutoExecuteStatus;
import com.microsoft.azure.management.sql.v2015_05_01_preview.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
146,910
private void sendWeaponTab(Player player) { Item playerWeapon = player.getEquipment().get(Equipment.SLOT_WEAPON); if (playerWeapon != null && playerWeapon.getDefinition().getWeaponDefinition() != null) { int interfaceId = playerWeapon.getDefinition().getWeaponDefinition().getInterfaceId(); player.getAct...
void function(Player player) { Item playerWeapon = player.getEquipment().get(Equipment.SLOT_WEAPON); if (playerWeapon != null && playerWeapon.getDefinition().getWeaponDefinition() != null) { int interfaceId = playerWeapon.getDefinition().getWeaponDefinition().getInterfaceId(); player.getActionSender().sendTab(135, inte...
/** * Sends the correct weapon tab interface. * @param player The player to send the interface to. */
Sends the correct weapon tab interface
sendWeaponTab
{ "repo_name": "ubjelly/Derithium", "path": "src/main/java/org/hyperion/rs2/content/combat/util/CombatUtility.java", "license": "gpl-2.0", "size": 5765 }
[ "org.hyperion.rs2.model.Item", "org.hyperion.rs2.model.container.Equipment", "org.hyperion.rs2.model.player.Player" ]
import org.hyperion.rs2.model.Item; import org.hyperion.rs2.model.container.Equipment; import org.hyperion.rs2.model.player.Player;
import org.hyperion.rs2.model.*; import org.hyperion.rs2.model.container.*; import org.hyperion.rs2.model.player.*;
[ "org.hyperion.rs2" ]
org.hyperion.rs2;
1,548,917
@Metered(group = "core", name = "EntityManagerFactory_getApplication") public Application getApplication( String name ) throws Exception { name = name.toLowerCase(); HColumn<String, ByteBuffer> column = cass.getColumn( cass.getSystemKeyspace(), APPLICATIONS_CF, name, PROPERTY_UUI...
@Metered(group = "core", name = STR) Application function( String name ) throws Exception { name = name.toLowerCase(); HColumn<String, ByteBuffer> column = cass.getColumn( cass.getSystemKeyspace(), APPLICATIONS_CF, name, PROPERTY_UUID ); if ( column == null ) { return null; } UUID applicationId = uuid( column.getValue(...
/** * Gets the application. * * @param name the name * * @return application for name * * @throws Exception the exception */
Gets the application
getApplication
{ "repo_name": "mesosphere/usergrid", "path": "stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/EntityManagerFactoryImpl.java", "license": "apache-2.0", "size": 14567 }
[ "com.yammer.metrics.annotation.Metered", "java.nio.ByteBuffer", "me.prettyprint.hector.api.beans.HColumn", "org.apache.usergrid.persistence.EntityManager", "org.apache.usergrid.persistence.entities.Application", "org.apache.usergrid.utils.ConversionUtils" ]
import com.yammer.metrics.annotation.Metered; import java.nio.ByteBuffer; import me.prettyprint.hector.api.beans.HColumn; import org.apache.usergrid.persistence.EntityManager; import org.apache.usergrid.persistence.entities.Application; import org.apache.usergrid.utils.ConversionUtils;
import com.yammer.metrics.annotation.*; import java.nio.*; import me.prettyprint.hector.api.beans.*; import org.apache.usergrid.persistence.*; import org.apache.usergrid.persistence.entities.*; import org.apache.usergrid.utils.*;
[ "com.yammer.metrics", "java.nio", "me.prettyprint.hector", "org.apache.usergrid" ]
com.yammer.metrics; java.nio; me.prettyprint.hector; org.apache.usergrid;
2,050,967
public synchronized void initTasks() throws IOException { if (tasksInited.get()) { return; } synchronized(jobInitKillStatus){ if(jobInitKillStatus.killed) { return; } jobInitKillStatus.initStarted = true; } // log job info JobHistory.JobInfo.logSubmitted(getJob...
synchronized void function() throws IOException { if (tasksInited.get()) { return; } synchronized(jobInitKillStatus){ if(jobInitKillStatus.killed) { return; } jobInitKillStatus.initStarted = true; } JobHistory.JobInfo.logSubmitted(getJobID(), conf, jobFile.toString(), this.startTime); setPriority(this.priority); Path s...
/** * Construct the splits, etc. This is invoked from an async * thread so that split-computation doesn't block anyone. */
Construct the splits, etc. This is invoked from an async thread so that split-computation doesn't block anyone
initTasks
{ "repo_name": "sbyoun/i-mapreduce", "path": "src/mapred/org/apache/hadoop/mapred/JobInProgress.java", "license": "apache-2.0", "size": 94881 }
[ "java.io.DataInputStream", "java.io.IOException", "org.apache.hadoop.fs.FileSystem", "org.apache.hadoop.fs.Path" ]
import java.io.DataInputStream; import java.io.IOException; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path;
import java.io.*; import org.apache.hadoop.fs.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
2,621,369
private void checkPausedOrCanceled() throws StopRequestException { synchronized (mInfo) { if (mInfo.mControl == Downloads.Impl.CONTROL_PAUSED) { throw new StopRequestException( Downloads.Impl.STATUS_PAUSED_BY_APP, "download paused by owner"); }...
void function() throws StopRequestException { synchronized (mInfo) { if (mInfo.mControl == Downloads.Impl.CONTROL_PAUSED) { throw new StopRequestException( Downloads.Impl.STATUS_PAUSED_BY_APP, STR); } if (mInfo.mStatus == Downloads.Impl.STATUS_CANCELED mInfo.mDeleted) { throw new StopRequestException(Downloads.Impl.STA...
/** * Check if the download has been paused or canceled, stopping the request * appropriately if it has been. */
Check if the download has been paused or canceled, stopping the request appropriately if it has been
checkPausedOrCanceled
{ "repo_name": "wangdan/DownloadManager", "path": "library/src/main/java/org/aisen/downloader/provider/DownloadThread.java", "license": "apache-2.0", "size": 31903 }
[ "org.aisen.downloader.downloads.Downloads" ]
import org.aisen.downloader.downloads.Downloads;
import org.aisen.downloader.downloads.*;
[ "org.aisen.downloader" ]
org.aisen.downloader;
2,827,721
@Override protected void siemLog(EntityEvent<IdmRoleDto> event, String status, String detail) { if (event == null) { return; } IdmRoleDto dto = event.getContent(); String operationType = event.getType().name(); String action = siemLoggerManager.buildAction(SiemLoggerManager.ROLE_LEVEL_KEY, operationTyp...
void function(EntityEvent<IdmRoleDto> event, String status, String detail) { if (event == null) { return; } IdmRoleDto dto = event.getContent(); String operationType = event.getType().name(); String action = siemLoggerManager.buildAction(SiemLoggerManager.ROLE_LEVEL_KEY, operationType); if(siemLoggerManager.skipLogging...
/** * Method provides specific logic for role siem logging. * */
Method provides specific logic for role siem logging
siemLog
{ "repo_name": "bcvsolutions/CzechIdMng", "path": "Realization/backend/core/core-impl/src/main/java/eu/bcvsolutions/idm/core/model/service/impl/DefaultIdmRoleService.java", "license": "mit", "size": 17025 }
[ "eu.bcvsolutions.idm.core.api.audit.service.SiemLoggerManager", "eu.bcvsolutions.idm.core.api.dto.IdmRoleDto", "eu.bcvsolutions.idm.core.api.event.EntityEvent", "java.util.Objects" ]
import eu.bcvsolutions.idm.core.api.audit.service.SiemLoggerManager; import eu.bcvsolutions.idm.core.api.dto.IdmRoleDto; import eu.bcvsolutions.idm.core.api.event.EntityEvent; import java.util.Objects;
import eu.bcvsolutions.idm.core.api.audit.service.*; import eu.bcvsolutions.idm.core.api.dto.*; import eu.bcvsolutions.idm.core.api.event.*; import java.util.*;
[ "eu.bcvsolutions.idm", "java.util" ]
eu.bcvsolutions.idm; java.util;
648,910
public static ims.core.admin.pas.domain.objects.PASEvent extractPASEvent(ims.domain.ILightweightDomainFactory domainFactory, ims.core.vo.CareContextPasEventDetailsVo valueObject) { return extractPASEvent(domainFactory, valueObject, new HashMap()); }
static ims.core.admin.pas.domain.objects.PASEvent function(ims.domain.ILightweightDomainFactory domainFactory, ims.core.vo.CareContextPasEventDetailsVo valueObject) { return extractPASEvent(domainFactory, valueObject, new HashMap()); }
/** * Create the domain object from the value object. * @param domainFactory - used to create existing (persistent) domain objects. * @param valueObject - extract the domain object fields from this. */
Create the domain object from the value object
extractPASEvent
{ "repo_name": "FreudianNM/openMAXIMS", "path": "Source Library/openmaxims_workspace/ValueObjects/src/ims/core/vo/domain/CareContextPasEventDetailsVoAssembler.java", "license": "agpl-3.0", "size": 17862 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
312,135
Set<QueryableEntry> getRecords(Comparable value);
Set<QueryableEntry> getRecords(Comparable value);
/** * Produces a result set containing entries whose attribute values are equal * to the given value. * * @param value the value to compare against. * @return the produced result set. */
Produces a result set containing entries whose attribute values are equal to the given value
getRecords
{ "repo_name": "dsukhoroslov/hazelcast", "path": "hazelcast/src/main/java/com/hazelcast/query/impl/Index.java", "license": "apache-2.0", "size": 4397 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,267,209
private PointF getAndCacheSectionBounds(String sectionName) { PointF bounds = mCachedSectionBounds.get(sectionName); if (bounds == null) { mSectionTextPaint.getTextBounds(sectionName, 0, sectionName.length(), mTmpBounds); bounds = new PointF(mSectionTextPa...
PointF function(String sectionName) { PointF bounds = mCachedSectionBounds.get(sectionName); if (bounds == null) { mSectionTextPaint.getTextBounds(sectionName, 0, sectionName.length(), mTmpBounds); bounds = new PointF(mSectionTextPaint.measureText(sectionName), mTmpBounds.height()); mCachedSectionBounds.put(sectionName...
/** * Given a section name, return the bounds of the given section name. */
Given a section name, return the bounds of the given section name
getAndCacheSectionBounds
{ "repo_name": "lcg833/Trebuchet", "path": "Trebuchet/src/main/java/com/android/launcher3/allapps/AllAppsGridAdapter.java", "license": "gpl-3.0", "size": 31103 }
[ "android.graphics.PointF" ]
import android.graphics.PointF;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
2,380,859
@Nullable PyFunction findMethodByName(@Nullable @NonNls final String name, boolean inherited, TypeEvalContext context);
PyFunction findMethodByName(@Nullable @NonNls final String name, boolean inherited, TypeEvalContext context);
/** * Finds a method with given name. * * @param name what to look for * @param inherited true: search in superclasses; false: only look for methods defined in this class. * @param context * @return */
Finds a method with given name
findMethodByName
{ "repo_name": "MichaelNedzelsky/intellij-community", "path": "python/psi-api/src/com/jetbrains/python/psi/PyClass.java", "license": "apache-2.0", "size": 10344 }
[ "com.jetbrains.python.psi.types.TypeEvalContext", "org.jetbrains.annotations.NonNls", "org.jetbrains.annotations.Nullable" ]
import com.jetbrains.python.psi.types.TypeEvalContext; import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.Nullable;
import com.jetbrains.python.psi.types.*; import org.jetbrains.annotations.*;
[ "com.jetbrains.python", "org.jetbrains.annotations" ]
com.jetbrains.python; org.jetbrains.annotations;
1,154,735
@Message(id = 14007, value = "Failed to rollback transaction") TransactionFailureException failedToRollbackTransaction(@Cause Exception e);
@Message(id = 14007, value = STR) TransactionFailureException failedToRollbackTransaction(@Cause Exception e);
/** * failedToRollbackTransaction method definition. * @param e e * @return TransactionFailureException */
failedToRollbackTransaction method definition
failedToRollbackTransaction
{ "repo_name": "bfitzpat/switchyard", "path": "core/runtime/src/main/java/org/switchyard/runtime/RuntimeMessages.java", "license": "apache-2.0", "size": 14146 }
[ "org.jboss.logging.annotations.Cause", "org.jboss.logging.annotations.Message", "org.switchyard.TransactionFailureException" ]
import org.jboss.logging.annotations.Cause; import org.jboss.logging.annotations.Message; import org.switchyard.TransactionFailureException;
import org.jboss.logging.annotations.*; import org.switchyard.*;
[ "org.jboss.logging", "org.switchyard" ]
org.jboss.logging; org.switchyard;
209,879
void setPresent(boolean present) { // Show full, but gray bar if (!present) { setBarColor(Color.LIGHT_GRAY); getModel().setValue(1.0); } }
void setPresent(boolean present) { if (!present) { setBarColor(Color.LIGHT_GRAY); getModel().setValue(1.0); } }
/** * Set present or absent. * * @param present present status of the member */
Set present or absent
setPresent
{ "repo_name": "markuskeunecke/stendhal", "path": "src/games/stendhal/client/gui/group/MemberCellRenderer.java", "license": "gpl-2.0", "size": 4241 }
[ "java.awt.Color" ]
import java.awt.Color;
import java.awt.*;
[ "java.awt" ]
java.awt;
2,773,539
public void init() throws LifecycleException { if (initialized) { if (log.isInfoEnabled()) log.info(sm.getString("coyoteConnector.alreadyInitialized")); return; } this.initialized = true; if (org.apache.tomcat.util.Constants.ENABLE_MODELER) { if (oname == null) { try { // we are loade...
void function() throws LifecycleException { if (initialized) { if (log.isInfoEnabled()) log.info(sm.getString(STR)); return; } this.initialized = true; if (org.apache.tomcat.util.Constants.ENABLE_MODELER) { if (oname == null) { try { oname = createObjectName(container.getName(), STR); Registry.getRegistry(null, null).r...
/** * Initialize this connector (create ServerSocket here!) * @throws LifecycleException */
Initialize this connector (create ServerSocket here!)
init
{ "repo_name": "benothman/jboss-web-nio2", "path": "java/org/apache/catalina/connector/Connector.java", "license": "lgpl-3.0", "size": 26733 }
[ "org.apache.catalina.LifecycleException", "org.apache.tomcat.util.IntrospectionUtils", "org.apache.tomcat.util.modeler.Registry" ]
import org.apache.catalina.LifecycleException; import org.apache.tomcat.util.IntrospectionUtils; import org.apache.tomcat.util.modeler.Registry;
import org.apache.catalina.*; import org.apache.tomcat.util.*; import org.apache.tomcat.util.modeler.*;
[ "org.apache.catalina", "org.apache.tomcat" ]
org.apache.catalina; org.apache.tomcat;
2,270,880
protected Session readSession( byte[] data, String sessionId ) { try { ReplicationStream session_in = getReplicationStream(data); Session session = sessionId!=null?this.findSession(sessionId):null; boolean isNew = (session==null); //clear ...
Session function( byte[] data, String sessionId ) { try { ReplicationStream session_in = getReplicationStream(data); Session session = sessionId!=null?this.findSession(sessionId):null; boolean isNew = (session==null); if ( session!=null ) { ReplicatedSession rs = (ReplicatedSession)session; rs.expire(false); session = ...
/** * Reinstantiates a serialized session from the data passed in. * This will first call createSession() so that we get a fresh instance with all * the managers set and all the transient fields validated. * Then it calls Session.readObjectData(byte[]) to deserialize the object * @param da...
Reinstantiates a serialized session from the data passed in. This will first call createSession() so that we get a fresh instance with all the managers set and all the transient fields validated. Then it calls Session.readObjectData(byte[]) to deserialize the object
readSession
{ "repo_name": "yuyupapa/OpenSource", "path": "apache-tomcat-6.0.48/java/org/apache/catalina/ha/session/SimpleTcpReplicationManager.java", "license": "apache-2.0", "size": 27898 }
[ "org.apache.catalina.Session", "org.apache.catalina.tribes.io.ReplicationStream" ]
import org.apache.catalina.Session; import org.apache.catalina.tribes.io.ReplicationStream;
import org.apache.catalina.*; import org.apache.catalina.tribes.io.*;
[ "org.apache.catalina" ]
org.apache.catalina;
872,979
protected boolean sendMessageToEndpoint(final LogoutHttpMessage msg, final SingleLogoutRequestContext request, final SingleLogoutMessage logoutMessage) { return this.httpClient.sendMessageToEndPoint(msg); }
boolean function(final LogoutHttpMessage msg, final SingleLogoutRequestContext request, final SingleLogoutMessage logoutMessage) { return this.httpClient.sendMessageToEndPoint(msg); }
/** * Send message to endpoint. * * @param msg the msg * @param request the request * @param logoutMessage the logout message * @return true/false */
Send message to endpoint
sendMessageToEndpoint
{ "repo_name": "apereo/cas", "path": "core/cas-server-core-logout-api/src/main/java/org/apereo/cas/logout/slo/BaseSingleLogoutServiceMessageHandler.java", "license": "apache-2.0", "size": 10195 }
[ "org.apereo.cas.logout.LogoutHttpMessage" ]
import org.apereo.cas.logout.LogoutHttpMessage;
import org.apereo.cas.logout.*;
[ "org.apereo.cas" ]
org.apereo.cas;
2,757,994
return (int) (widthPercent*AGC.getW()); }
return (int) (widthPercent*AGC.getW()); }
/** * Transform a position in percent to pixels on the x axis */
Transform a position in percent to pixels on the x axis
percentToPixelW
{ "repo_name": "Khopa/OneStory_VN_Engine", "path": "src/OneStory/src/com/khopa/oneStory/core/views/Utils.java", "license": "mit", "size": 841 }
[ "com.khopa.oneStory.core.AGC" ]
import com.khopa.oneStory.core.AGC;
import com.khopa.*;
[ "com.khopa" ]
com.khopa;
596,376
public void cache(final String path, final int maxSize, final long expires, final TimeUnit units) { final CacheBuilder<Object, Object> cb = CacheBuilder.newBuilder(); if (maxSize > 0) { cb.maximumSize(maxSize); } if (expires > 0) { cb.expireAfterWrite(expires, units); } responses.put(new RestEn...
void function(final String path, final int maxSize, final long expires, final TimeUnit units) { final CacheBuilder<Object, Object> cb = CacheBuilder.newBuilder(); if (maxSize > 0) { cb.maximumSize(maxSize); } if (expires > 0) { cb.expireAfterWrite(expires, units); } responses.put(new RestEndpoint(path), cb.build()); }
/** * Add a caching rule to a path prefix. * * @param path The path prefix to cache * @param maxSize The maximum cache size for this path * @param expires The expiration time (after initial write) * @param units The expiration time units */
Add a caching rule to a path prefix
cache
{ "repo_name": "barchart/barchart-netty4", "path": "rest/client/src/main/java/com/barchart/netty/rest/client/cache/DefaultRestResponseCache.java", "license": "bsd-3-clause", "size": 4333 }
[ "com.barchart.netty.rest.client.RestEndpoint", "com.google.common.cache.CacheBuilder", "java.util.concurrent.TimeUnit" ]
import com.barchart.netty.rest.client.RestEndpoint; import com.google.common.cache.CacheBuilder; import java.util.concurrent.TimeUnit;
import com.barchart.netty.rest.client.*; import com.google.common.cache.*; import java.util.concurrent.*;
[ "com.barchart.netty", "com.google.common", "java.util" ]
com.barchart.netty; com.google.common; java.util;
1,274,434
public ContentDirectoryBrowseResult browseSync(Position pos) { if(getProviderDevice() == null){ return null; } if (pos == null || pos.getDeviceId() == null ) { if(getProviderDevice() != null){ return browseSync(getProviderDevice(),"0" , BrowseFlag.DIR...
ContentDirectoryBrowseResult function(Position pos) { if(getProviderDevice() == null){ return null; } if (pos == null pos.getDeviceId() == null ) { if(getProviderDevice() != null){ return browseSync(getProviderDevice(),"0" , BrowseFlag.DIRECT_CHILDREN, "*", 0L, null, new SortCriterion[0]); }else{ return null; } } if (g...
/** * Browse ContenDirctory synchronous * * @param pos Position * the device and object to be browsed * @return the browsing result */
Browse ContenDirctory synchronous
browseSync
{ "repo_name": "z7z8th/yaacc", "path": "yaacc/src/de/yaacc/upnp/UpnpClient.java", "license": "gpl-3.0", "size": 47772 }
[ "de.yaacc.browser.Position", "de.yaacc.upnp.callback.contentdirectory.ContentDirectoryBrowseResult", "org.fourthline.cling.support.model.BrowseFlag", "org.fourthline.cling.support.model.SortCriterion" ]
import de.yaacc.browser.Position; import de.yaacc.upnp.callback.contentdirectory.ContentDirectoryBrowseResult; import org.fourthline.cling.support.model.BrowseFlag; import org.fourthline.cling.support.model.SortCriterion;
import de.yaacc.browser.*; import de.yaacc.upnp.callback.contentdirectory.*; import org.fourthline.cling.support.model.*;
[ "de.yaacc.browser", "de.yaacc.upnp", "org.fourthline.cling" ]
de.yaacc.browser; de.yaacc.upnp; org.fourthline.cling;
198,356
protected final BigDecimal halfStepPrevInScale(BigDecimal decimal) { BigDecimal step = BigDecimal.ONE.scaleByPowerOfTen(-getRoundingScale()); BigDecimal halfStep = step.divide(BigDecimal.valueOf(2)); return decimal.subtract(halfStep); }
final BigDecimal function(BigDecimal decimal) { BigDecimal step = BigDecimal.ONE.scaleByPowerOfTen(-getRoundingScale()); BigDecimal halfStep = step.divide(BigDecimal.valueOf(2)); return decimal.subtract(halfStep); }
/** * Produces a value half of a "step" back in this expression's rounding scale. * For example with a scale of 2, "2.5" would be stepped back to "2.495". */
Produces a value half of a "step" back in this expression's rounding scale. For example with a scale of 2, "2.5" would be stepped back to "2.495"
halfStepPrevInScale
{ "repo_name": "ohadshacham/phoenix", "path": "phoenix-core/src/main/java/org/apache/phoenix/expression/function/RoundDecimalExpression.java", "license": "apache-2.0", "size": 17213 }
[ "java.math.BigDecimal" ]
import java.math.BigDecimal;
import java.math.*;
[ "java.math" ]
java.math;
47,777
Future<T> resolve(String inetHost, int inetPort);
Future<T> resolve(String inetHost, int inetPort);
/** * Resolves the specified name into a {@link SocketAddress}. * * @param inetHost the name to resolve * @param inetPort the port number * * @return the {@link SocketAddress} as the result of the resolution */
Resolves the specified name into a <code>SocketAddress</code>
resolve
{ "repo_name": "firebase/netty", "path": "resolver/src/main/java/io/netty/resolver/NameResolver.java", "license": "apache-2.0", "size": 3141 }
[ "io.netty.util.concurrent.Future" ]
import io.netty.util.concurrent.Future;
import io.netty.util.concurrent.*;
[ "io.netty.util" ]
io.netty.util;
1,057,943
public void setOwner(ListenerOwner owner) { super.setOwner(owner); if (owner != null) { if (m_fldValue1 != null) if (m_fldValue1.getRecord() != this.getOwner().getRecord()) m_fldValue1.addListener(new FieldRemoveBOnCloseHandler(this)); ...
void function(ListenerOwner owner) { super.setOwner(owner); if (owner != null) { if (m_fldValue1 != null) if (m_fldValue1.getRecord() != this.getOwner().getRecord()) m_fldValue1.addListener(new FieldRemoveBOnCloseHandler(this)); if (m_fldValue2 != null) if (m_fldValue2.getRecord() != this.getOwner().getRecord()) if (m_...
/** * Set the field that owns this listener. * @owner The field that this listener is being added to (if null, this listener is being removed). */
Set the field that owns this listener
setOwner
{ "repo_name": "jbundle/jbundle", "path": "base/base/src/main/java/org/jbundle/base/field/event/CalcBalanceHandler.java", "license": "gpl-3.0", "size": 6083 }
[ "org.jbundle.base.field.ListenerOwner" ]
import org.jbundle.base.field.ListenerOwner;
import org.jbundle.base.field.*;
[ "org.jbundle.base" ]
org.jbundle.base;
288,251
public boolean areAllResultsAvailable() { if (mode == Master.COMPLETION_ORDER) { return unorderedResults.size() == idsubmitted.size(); } else { return orderedResults.size() == idsubmitted.size(); } }
boolean function() { if (mode == Master.COMPLETION_ORDER) { return unorderedResults.size() == idsubmitted.size(); } else { return orderedResults.size() == idsubmitted.size(); } }
/** * Tells if all results are currently available in the queue * @return the answer */
Tells if all results are currently available in the queue
areAllResultsAvailable
{ "repo_name": "nmpgaspar/PainlessProActive", "path": "src/Extensions/org/objectweb/proactive/extensions/masterworker/core/ResultQueue.java", "license": "agpl-3.0", "size": 10372 }
[ "org.objectweb.proactive.extensions.masterworker.interfaces.Master" ]
import org.objectweb.proactive.extensions.masterworker.interfaces.Master;
import org.objectweb.proactive.extensions.masterworker.interfaces.*;
[ "org.objectweb.proactive" ]
org.objectweb.proactive;
1,834,759
public boolean hasPrologRules() { // We check if this project has a rules.pl file if (getConfig().getRulesId() != null) { return true; } // If not, we check the parents. return parents().stream() .map(ProjectState::getConfig) .map(ProjectConfig::getRulesId) .anyMatch...
boolean function() { if (getConfig().getRulesId() != null) { return true; } return parents().stream() .map(ProjectState::getConfig) .map(ProjectConfig::getRulesId) .anyMatch(Objects::nonNull); }
/** * Returns true if the Prolog engine is expected to run for this project, that is if this project * or a parent possesses a rules.pl file. */
Returns true if the Prolog engine is expected to run for this project, that is if this project or a parent possesses a rules.pl file
hasPrologRules
{ "repo_name": "qtproject/qtqa-gerrit", "path": "java/com/google/gerrit/server/project/ProjectState.java", "license": "apache-2.0", "size": 20060 }
[ "java.util.Objects" ]
import java.util.Objects;
import java.util.*;
[ "java.util" ]
java.util;
467,398