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
@Override public void setMongoOps(MongoOperations mongoOps) { this.mongoOps = mongoOps; }
void function(MongoOperations mongoOps) { this.mongoOps = mongoOps; }
/** * SETTER for MongoOperations template. * * @param mongoOps * the mongo template. */
SETTER for MongoOperations template
setMongoOps
{ "repo_name": "joseluisillana/api-restful-spring-jersey", "path": "erep-services/src/main/java/com/bbva/operationalreportingapi/rest/services/ComplianceProcessDefinitionServiceImpl.java", "license": "gpl-2.0", "size": 65486 }
[ "org.springframework.data.mongodb.core.MongoOperations" ]
import org.springframework.data.mongodb.core.MongoOperations;
import org.springframework.data.mongodb.core.*;
[ "org.springframework.data" ]
org.springframework.data;
1,780,633
public ListResponse list(final ListRequest request) throws IOException, SubversionException { final File projectPath = new File(request.getProjectPath()); final List<String> args = defaultArgs(); args.add("list"); List<String> paths = new ArrayList<>(); paths.add(request.ge...
ListResponse function(final ListRequest request) throws IOException, SubversionException { final File projectPath = new File(request.getProjectPath()); final List<String> args = defaultArgs(); args.add("list"); List<String> paths = new ArrayList<>(); paths.add(request.getTarget()); final CommandLineResult result = runC...
/** * List remote subversion directory. * * @return the response containing target children */
List remote subversion directory
list
{ "repo_name": "kaloyan-raev/che", "path": "plugins/plugin-svn/che-plugin-svn-ext-server/src/main/java/org/eclipse/che/plugin/svn/server/SubversionApi.java", "license": "epl-1.0", "size": 42226 }
[ "java.io.File", "java.io.IOException", "java.util.ArrayList", "java.util.List", "org.eclipse.che.dto.server.DtoFactory", "org.eclipse.che.plugin.svn.server.upstream.CommandLineResult", "org.eclipse.che.plugin.svn.shared.ListRequest", "org.eclipse.che.plugin.svn.shared.ListResponse" ]
import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.eclipse.che.dto.server.DtoFactory; import org.eclipse.che.plugin.svn.server.upstream.CommandLineResult; import org.eclipse.che.plugin.svn.shared.ListRequest; import org.eclipse.che.plugin.svn.shared.ListRespon...
import java.io.*; import java.util.*; import org.eclipse.che.dto.server.*; import org.eclipse.che.plugin.svn.server.upstream.*; import org.eclipse.che.plugin.svn.shared.*;
[ "java.io", "java.util", "org.eclipse.che" ]
java.io; java.util; org.eclipse.che;
325,728
@Test(expectedExceptions = IllegalArgumentException.class) public void testContainsAnyNull() { final ExternalIdBundle test = ExternalIdBundle.of(ID_11, ID_12); test.containsAny(null); }
@Test(expectedExceptions = IllegalArgumentException.class) void function() { final ExternalIdBundle test = ExternalIdBundle.of(ID_11, ID_12); test.containsAny(null); }
/** * Tests that the containsAny() method does not accept null. */
Tests that the containsAny() method does not accept null
testContainsAnyNull
{ "repo_name": "McLeodMoores/starling", "path": "projects/util/src/test/java/com/opengamma/id/ExternalIdBundleTest.java", "license": "apache-2.0", "size": 22614 }
[ "org.testng.annotations.Test" ]
import org.testng.annotations.Test;
import org.testng.annotations.*;
[ "org.testng.annotations" ]
org.testng.annotations;
1,503,139
@Override public void start(final Stage window) { setDummyScene(window); window.show(); final GeneralEnvelope bbox = new GeneralEnvelope(CommonCRS.defaultGeographic()); bbox.setRange(0, -140.99778, -52.6480987209); bbox.setRange(1, 41.6751050889, 83.23324); ...
void function(final Stage window) { setDummyScene(window); window.show(); final GeneralEnvelope bbox = new GeneralEnvelope(CommonCRS.defaultGeographic()); bbox.setRange(0, -140.99778, -52.6480987209); bbox.setRange(1, 41.6751050889, 83.23324); final CRSChooser chooser = new CRSChooser(null, bbox, null); final Optional<...
/** * Creates and starts the test application. * * @param window where to show the application. */
Creates and starts the test application
start
{ "repo_name": "apache/sis", "path": "application/sis-javafx/src/test/java/org/apache/sis/gui/referencing/CRSChooserApp.java", "license": "apache-2.0", "size": 3120 }
[ "java.util.Optional", "org.apache.sis.geometry.GeneralEnvelope", "org.apache.sis.referencing.CommonCRS", "org.opengis.referencing.crs.CoordinateReferenceSystem" ]
import java.util.Optional; import org.apache.sis.geometry.GeneralEnvelope; import org.apache.sis.referencing.CommonCRS; import org.opengis.referencing.crs.CoordinateReferenceSystem;
import java.util.*; import org.apache.sis.geometry.*; import org.apache.sis.referencing.*; import org.opengis.referencing.crs.*;
[ "java.util", "org.apache.sis", "org.opengis.referencing" ]
java.util; org.apache.sis; org.opengis.referencing;
2,415,385
private void parseIntConstantMapping(String expression) throws AggregationException { String[] parsedExpression = expression.split(Defaults.ASSIGN_SIGN); String constant = parsedExpression[1].trim(); String outputField = parseOutputField(parsedExpression[0]); Integer value = createInt(constant); c...
void function(String expression) throws AggregationException { String[] parsedExpression = expression.split(Defaults.ASSIGN_SIGN); String constant = parsedExpression[1].trim(); String outputField = parseOutputField(parsedExpression[0]); Integer value = createInt(constant); checkFieldExistence(outputField); registerOutp...
/** * Parses an integer constant mapping. * * @param expression * @throws AggregationException */
Parses an integer constant mapping
parseIntConstantMapping
{ "repo_name": "CloverETL/CloverETL-Engine", "path": "cloveretl.component/src/org/jetel/component/aggregate/AggregateMappingParser.java", "license": "lgpl-2.1", "size": 29314 }
[ "org.jetel.data.Defaults" ]
import org.jetel.data.Defaults;
import org.jetel.data.*;
[ "org.jetel.data" ]
org.jetel.data;
874,626
public void deleteHost(HostBean host) { if (host.getId() < 0) return; synchronized (dbLock) { SQLiteDatabase db = this.getWritableDatabase(); db.delete(TABLE_HOSTS, "_id = ?", new String[] { String.valueOf(host.getId()) }); } }
void function(HostBean host) { if (host.getId() < 0) return; synchronized (dbLock) { SQLiteDatabase db = this.getWritableDatabase(); db.delete(TABLE_HOSTS, STR, new String[] { String.valueOf(host.getId()) }); } }
/** * Delete a specific host by its <code>_id</code> value. */
Delete a specific host by its <code>_id</code> value
deleteHost
{ "repo_name": "getconsole/serialbot", "path": "src/nz/co/cloudstore/serialbot/util/HostDatabase.java", "license": "apache-2.0", "size": 27726 }
[ "android.database.sqlite.SQLiteDatabase", "nz.co.cloudstore.serialbot.bean.HostBean" ]
import android.database.sqlite.SQLiteDatabase; import nz.co.cloudstore.serialbot.bean.HostBean;
import android.database.sqlite.*; import nz.co.cloudstore.serialbot.bean.*;
[ "android.database", "nz.co.cloudstore" ]
android.database; nz.co.cloudstore;
49,268
public int[] executeBatch() throws SQLException { return statement.executeBatch(); }
int[] function() throws SQLException { return statement.executeBatch(); }
/** * Executes all of the batched statements. * * See {@link Statement#executeBatch()} for details. * @return update counts for each statement * @throws SQLException if something went wrong */
Executes all of the batched statements. See <code>Statement#executeBatch()</code> for details
executeBatch
{ "repo_name": "AlexanderZf44/APermyakov", "path": "chapter_008/src/main/java/ru/apermyakov/TestTask/NamedParameterStatement.java", "license": "apache-2.0", "size": 10792 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,914,723
@Override public void onSurfaceCreated (final SurfaceHolder holder) { engines++; setLinkedEngine(this); if (DEBUG) Log.d(TAG, " > AndroidWallpaperEngine - onSurfaceCreated() " + hashCode() + ", running: " + engines + ", linked: " + (linkedEngine == this)); Log.i(TAG, "engine surface...
void function (final SurfaceHolder holder) { engines++; setLinkedEngine(this); if (DEBUG) Log.d(TAG, STR + hashCode() + STR + engines + STR + (linkedEngine == this)); Log.i(TAG, STR); super.onSurfaceCreated(holder); if (engines == 1) { visibleEngines = 0; } if (engines == 1 && app == null) { viewFormat = 0; viewWidth =...
/** Called before surface holder callbacks (ex for GLSurfaceView)! This is called immediately after the surface is first * created. Implementations of this should start up whatever rendering code they desire. Note that only one thread can ever * draw into a Surface, so you should not draw into the Surface here ...
Called before surface holder callbacks (ex for GLSurfaceView)! This is called immediately after the surface is first created. Implementations of this should start up whatever rendering code they desire. Note that only one thread can ever
onSurfaceCreated
{ "repo_name": "GreenLightning/libgdx", "path": "backends/gdx-backend-android/src/com/badlogic/gdx/backends/android/AndroidLiveWallpaperService.java", "license": "apache-2.0", "size": 23609 }
[ "android.util.Log", "android.view.SurfaceHolder", "com.badlogic.gdx.Gdx" ]
import android.util.Log; import android.view.SurfaceHolder; import com.badlogic.gdx.Gdx;
import android.util.*; import android.view.*; import com.badlogic.gdx.*;
[ "android.util", "android.view", "com.badlogic.gdx" ]
android.util; android.view; com.badlogic.gdx;
2,685,893
@Test public void testFaultInOfValuesFromDisk() { try { // Asif First create a persist only disk region which is of aysnch // & switch of OplOg type diskProps.setMaxOplogSize(1000); diskProps.setPersistBackup(true); diskProps.setRolling(false); diskProps.setSynchronous(tru...
void function() { try { diskProps.setMaxOplogSize(1000); diskProps.setPersistBackup(true); diskProps.setRolling(false); diskProps.setSynchronous(true); diskProps.setTimeInterval(-1); diskProps.setOverflow(false); region = DiskRegionHelperFactory.getSyncPersistOnlyRegion(cache, diskProps, Scope.LOCAL); byte[] val = new ...
/** * Tests whether the data is written in the right format on the disk * * @author Asif */
Tests whether the data is written in the right format on the disk
testFaultInOfValuesFromDisk
{ "repo_name": "ysung-pivotal/incubator-geode", "path": "gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/OplogJUnitTest.java", "license": "apache-2.0", "size": 145020 }
[ "com.gemstone.gemfire.cache.Scope", "org.junit.Assert" ]
import com.gemstone.gemfire.cache.Scope; import org.junit.Assert;
import com.gemstone.gemfire.cache.*; import org.junit.*;
[ "com.gemstone.gemfire", "org.junit" ]
com.gemstone.gemfire; org.junit;
11,243
public static void removeAttributes(Element target, boolean flag) { if (!target.hasAttributes()) { return; } String prefix = target.getPrefix(); NamedNodeMap nnm = target.getAttributes(); Attr toPutBack = null; if (flag) { if (prefix== null) { ...
static void function(Element target, boolean flag) { if (!target.hasAttributes()) { return; } String prefix = target.getPrefix(); NamedNodeMap nnm = target.getAttributes(); Attr toPutBack = null; if (flag) { if (prefix== null) { toPutBack = target.getAttributeNodeNS(NS_URI_XMLNS,"xmlns"); } else { toPutBack = target.ge...
/** * Drop the attributes from an element, except possibly an <code>xmlns</code> * attribute that declares its namespace. * @param target the element whose attributes will be removed. * @param flag preserve namespace declaration */
Drop the attributes from an element, except possibly an <code>xmlns</code> attribute that declares its namespace
removeAttributes
{ "repo_name": "Subasinghe/ode", "path": "utils/src/main/java/org/apache/ode/utils/DOMUtils.java", "license": "apache-2.0", "size": 49085 }
[ "org.w3c.dom.Attr", "org.w3c.dom.Element", "org.w3c.dom.NamedNodeMap" ]
import org.w3c.dom.Attr; import org.w3c.dom.Element; import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
2,097,467
Optional<CommandMapping> removeMapping(CommandMapping mapping);
Optional<CommandMapping> removeMapping(CommandMapping mapping);
/** * Remove a command identified by the given mapping. * * @param mapping The mapping * @return The previous mapping associated with the alias, if one was found */
Remove a command identified by the given mapping
removeMapping
{ "repo_name": "caseif/SpongeAPI", "path": "src/main/java/org/spongepowered/api/service/command/CommandService.java", "license": "mit", "size": 6735 }
[ "com.google.common.base.Optional", "org.spongepowered.api.util.command.CommandMapping" ]
import com.google.common.base.Optional; import org.spongepowered.api.util.command.CommandMapping;
import com.google.common.base.*; import org.spongepowered.api.util.command.*;
[ "com.google.common", "org.spongepowered.api" ]
com.google.common; org.spongepowered.api;
927,098
public List<Tag> getObjectTags(Taggable taggable, Profile profile) { if (profile.isLoggedIn()) { return getTags(null, taggable.getName(), taggable.getTagType(), profile.getUsername()); } else { return Collections.emptyList(); } }
List<Tag> function(Taggable taggable, Profile profile) { if (profile.isLoggedIn()) { return getTags(null, taggable.getName(), taggable.getTagType(), profile.getUsername()); } else { return Collections.emptyList(); } }
/** * Get the tags for a specific object. * @param taggable The object with the tags. * @param profile The user these tags should belong to. * @return tags. */
Get the tags for a specific object
getObjectTags
{ "repo_name": "julie-sullivan/phytomine", "path": "intermine/api/main/src/org/intermine/api/profile/TagManager.java", "license": "lgpl-2.1", "size": 26133 }
[ "java.util.Collections", "java.util.List", "org.intermine.model.userprofile.Tag" ]
import java.util.Collections; import java.util.List; import org.intermine.model.userprofile.Tag;
import java.util.*; import org.intermine.model.userprofile.*;
[ "java.util", "org.intermine.model" ]
java.util; org.intermine.model;
1,715,209
Page<ModuleDTO> findAll(Pageable pageable);
Page<ModuleDTO> findAll(Pageable pageable);
/** * Get all the modules. * * @param pageable the pagination information * @return the list of entities */
Get all the modules
findAll
{ "repo_name": "solairerove/woodstock", "path": "src/main/java/com/github/solairerove/service/ModuleService.java", "license": "apache-2.0", "size": 901 }
[ "com.github.solairerove.service.dto.ModuleDTO", "org.springframework.data.domain.Page", "org.springframework.data.domain.Pageable" ]
import com.github.solairerove.service.dto.ModuleDTO; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable;
import com.github.solairerove.service.dto.*; import org.springframework.data.domain.*;
[ "com.github.solairerove", "org.springframework.data" ]
com.github.solairerove; org.springframework.data;
525,483
public static ServerAddress createNonBlockingServer(HostAndPort address, TProcessor processor, TProtocolFactory protocolFactory, final String serverName, String threadName, final int numThreads, final int numSTThreads, long timeBetweenThreadChecks, long maxMessageSize) throws TTransportException { final TN...
static ServerAddress function(HostAndPort address, TProcessor processor, TProtocolFactory protocolFactory, final String serverName, String threadName, final int numThreads, final int numSTThreads, long timeBetweenThreadChecks, long maxMessageSize) throws TTransportException { final TNonblockingServerSocket transport = ...
/** * Create a NonBlockingServer with a custom thread pool that can dynamically resize itself. */
Create a NonBlockingServer with a custom thread pool that can dynamically resize itself
createNonBlockingServer
{ "repo_name": "adamjshook/accumulo", "path": "server/base/src/main/java/org/apache/accumulo/server/rpc/TServerUtils.java", "license": "apache-2.0", "size": 28135 }
[ "com.google.common.net.HostAndPort", "java.net.InetSocketAddress", "java.util.concurrent.ThreadPoolExecutor", "org.apache.accumulo.core.rpc.ThriftUtil", "org.apache.thrift.TProcessor", "org.apache.thrift.TProcessorFactory", "org.apache.thrift.protocol.TProtocolFactory", "org.apache.thrift.transport.TT...
import com.google.common.net.HostAndPort; import java.net.InetSocketAddress; import java.util.concurrent.ThreadPoolExecutor; import org.apache.accumulo.core.rpc.ThriftUtil; import org.apache.thrift.TProcessor; import org.apache.thrift.TProcessorFactory; import org.apache.thrift.protocol.TProtocolFactory; import org.apa...
import com.google.common.net.*; import java.net.*; import java.util.concurrent.*; import org.apache.accumulo.core.rpc.*; import org.apache.thrift.*; import org.apache.thrift.protocol.*; import org.apache.thrift.transport.*;
[ "com.google.common", "java.net", "java.util", "org.apache.accumulo", "org.apache.thrift" ]
com.google.common; java.net; java.util; org.apache.accumulo; org.apache.thrift;
1,588,791
public Iterator<LexicalEntry> getAllEntries();
Iterator<LexicalEntry> function();
/** * Returns all lexical entries in this lexicon, without any guaranteed order. */
Returns all lexical entries in this lexicon, without any guaranteed order
getAllEntries
{ "repo_name": "urieli/talismane", "path": "talismane_core/src/main/java/com/joliciel/talismane/lexicon/Lexicon.java", "license": "agpl-3.0", "size": 1637 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
2,102,180
Message createMessage(Session session) throws JMSException;
Message createMessage(Session session) throws JMSException;
/** * Create a {@link Message} to be sent. * @param session the JMS {@link Session} to be used to create the * <code>Message</code> (never <code>null</code>) * @return the <code>Message</code> to be sent * @throws javax.jms.JMSException if thrown by JMS API methods */
Create a <code>Message</code> to be sent
createMessage
{ "repo_name": "codeApeFromChina/resource", "path": "frame_packages/java_libs/spring-2.5.6-src/src/org/springframework/jms/core/MessageCreator.java", "license": "unlicense", "size": 1694 }
[ "javax.jms.JMSException", "javax.jms.Message", "javax.jms.Session" ]
import javax.jms.JMSException; import javax.jms.Message; import javax.jms.Session;
import javax.jms.*;
[ "javax.jms" ]
javax.jms;
500,538
public Rectangle2D getRectangle(int x) { if (x == 9) { return new Rectangle2D.Double((border[2][0]) + 50, border[2][1], border[2][2] - 100, border[2][3]); } return new Rectangle2D.Double(border[x][0], border[x][1], border[x][2], border[x][3]); }
Rectangle2D function(int x) { if (x == 9) { return new Rectangle2D.Double((border[2][0]) + 50, border[2][1], border[2][2] - 100, border[2][3]); } return new Rectangle2D.Double(border[x][0], border[x][1], border[x][2], border[x][3]); }
/** * retorna cada Rectangulo que se pide * * @param x numero del rectangulo ( imagen de fondo o objeto) * @return Rectangle2D.Double */
retorna cada Rectangulo que se pide
getRectangle
{ "repo_name": "mariogrieco/The-Ninja-Challenge", "path": "srcOriginal/ScenasWorld/Scena3World.java", "license": "apache-2.0", "size": 4446 }
[ "java.awt.geom.Rectangle2D" ]
import java.awt.geom.Rectangle2D;
import java.awt.geom.*;
[ "java.awt" ]
java.awt;
86,139
protected long getNextSize(long sz) { Preconditions.checkArgument(sz >= 0L); // If no logging is configured, log every 1, 10, 100, 1000, ..., 100000 if (this.logEveryNRows == 0L) { final long next = (long) Math.pow(10.0, Math.ceil(Math.log10(sz + 1))); return Math.min(100000L, next); } ...
long function(long sz) { Preconditions.checkArgument(sz >= 0L); if (this.logEveryNRows == 0L) { final long next = (long) Math.pow(10.0, Math.ceil(Math.log10(sz + 1))); return Math.min(100000L, next); } return ((sz / this.logEveryNRows) + 1L) * this.logEveryNRows; } protected transient Byte alias; protected transient Ob...
/** * Determine the frequency with which to emit a log message instead of * one for every for every event. * * @param sz The current number of events * @return The next event count to emit a log message */
Determine the frequency with which to emit a log message instead of one for every for every event
getNextSize
{ "repo_name": "nishantmonu51/hive", "path": "ql/src/java/org/apache/hadoop/hive/ql/exec/CommonJoinOperator.java", "license": "apache-2.0", "size": 39172 }
[ "com.google.common.base.Preconditions", "java.util.List" ]
import com.google.common.base.Preconditions; import java.util.List;
import com.google.common.base.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
831,981
private Queue<File> collectRecursively(File parent) { Queue<File> result = new LinkedList<File>(); File[] subFiles = parent.listFiles(fileFilter); Arrays.sort(subFiles); // sort files alphabetically for (int i = 0; i < subFiles.length; i++) { if (subFile...
Queue<File> function(File parent) { Queue<File> result = new LinkedList<File>(); File[] subFiles = parent.listFiles(fileFilter); Arrays.sort(subFiles); for (int i = 0; i < subFiles.length; i++) { if (subFiles[i].isDirectory()) result.addAll(collectRecursively(subFiles[i])); else result.add(subFiles[i]); } return result...
/** * Recursive collecting. * @param parent parent file of the directory. * @return Queue of subfiles. */
Recursive collecting
collectRecursively
{ "repo_name": "memo33/NAMControllerCompiler", "path": "src/controller/tasks/CollectRULsTask.java", "license": "mit", "size": 3307 }
[ "java.io.File", "java.util.Arrays", "java.util.LinkedList", "java.util.Queue", "javax.swing.SwingWorker" ]
import java.io.File; import java.util.Arrays; import java.util.LinkedList; import java.util.Queue; import javax.swing.SwingWorker;
import java.io.*; import java.util.*; import javax.swing.*;
[ "java.io", "java.util", "javax.swing" ]
java.io; java.util; javax.swing;
1,287,965
protected void executeFile(IFile file, IAction action) { execute(file, action); }
void function(IFile file, IAction action) { execute(file, action); }
/** * execute File */
execute File
executeFile
{ "repo_name": "chanakaudaya/developer-studio", "path": "registry/org.wso2.developerstudio.eclipse.greg.manager.local/src/org/wso2/developerstudio/eclipse/greg/manager/local/checkout/actions/ConflictAction.java", "license": "apache-2.0", "size": 2165 }
[ "org.eclipse.core.resources.IFile", "org.eclipse.jface.action.IAction" ]
import org.eclipse.core.resources.IFile; import org.eclipse.jface.action.IAction;
import org.eclipse.core.resources.*; import org.eclipse.jface.action.*;
[ "org.eclipse.core", "org.eclipse.jface" ]
org.eclipse.core; org.eclipse.jface;
2,195,577
@ApiModelProperty(example = "null", value = "") public String getNcesDataYear() { return ncesDataYear; }
@ApiModelProperty(example = "null", value = "") String function() { return ncesDataYear; }
/** * Get ncesDataYear * @return ncesDataYear **/
Get ncesDataYear
getNcesDataYear
{ "repo_name": "PitneyBowes/LocationIntelligenceSDK-Java", "path": "src/main/java/pb/locationintelligence/model/School.java", "license": "apache-2.0", "size": 22521 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
1,241,211
public int readFixedInt32() throws IOException { return ByteBuffer.wrap(readBytes(4)).order(ByteOrder.LITTLE_ENDIAN).asIntBuffer().get(); }
int function() throws IOException { return ByteBuffer.wrap(readBytes(4)).order(ByteOrder.LITTLE_ENDIAN).asIntBuffer().get(); }
/** * reads a fixed int32 from the current position * * @return the int * @throws IOException if the data cannot be read */
reads a fixed int32 from the current position
readFixedInt32
{ "repo_name": "kwahsog/clarity", "path": "src/main/java/skadistats/clarity/source/Source.java", "license": "bsd-3-clause", "size": 7467 }
[ "java.io.IOException", "java.nio.ByteBuffer", "java.nio.ByteOrder" ]
import java.io.IOException; import java.nio.ByteBuffer; import java.nio.ByteOrder;
import java.io.*; import java.nio.*;
[ "java.io", "java.nio" ]
java.io; java.nio;
597,539
private boolean onTouchForwarded(MotionEvent srcEvent) { final View src = mSrc; final ListPopupWindow popup = getPopup(); if (popup == null || !popup.isShowing()) { return false; } final DropDownListView dst = popup.mDropDownList; ...
boolean function(MotionEvent srcEvent) { final View src = mSrc; final ListPopupWindow popup = getPopup(); if (popup == null !popup.isShowing()) { return false; } final DropDownListView dst = popup.mDropDownList; if (dst == null !dst.isShown()) { return false; } final MotionEvent dstEvent = MotionEvent.obtainNoHistory(s...
/** * Handled forwarded motion events and determines when to stop * forwarding. * * @param srcEvent motion event in source view coordinates * @return true to continue forwarding motion events, false to cancel */
Handled forwarded motion events and determines when to stop forwarding
onTouchForwarded
{ "repo_name": "szpaddy/android-4.1.2_r2-core", "path": "java/android/widget/ListPopupWindow.java", "license": "apache-2.0", "size": 63233 }
[ "android.view.MotionEvent", "android.view.View" ]
import android.view.MotionEvent; import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
1,168,663
Internals internals = DfpInternals.getInstance(); String userAgent = internals.getUserAgentCombiner().getUserAgent("test"); assertTrue(userAgent.contains("DfpApi")); assertFalse(userAgent.contains("DfaApi")); assertFalse(userAgent.contains("AwApi")); }
Internals internals = DfpInternals.getInstance(); String userAgent = internals.getUserAgentCombiner().getUserAgent("test"); assertTrue(userAgent.contains(STR)); assertFalse(userAgent.contains(STR)); assertFalse(userAgent.contains("AwApi")); }
/** * Test method for {@link DfpInternals#getInstance()}. */
Test method for <code>DfpInternals#getInstance()</code>
testGetInstance
{ "repo_name": "stoksey69/googleads-java-lib", "path": "modules/ads_lib/src/test/java/com/google/api/ads/dfp/lib/utils/DfpInternalsTest.java", "license": "apache-2.0", "size": 1400 }
[ "com.google.api.ads.common.lib.utils.Internals", "org.junit.Assert" ]
import com.google.api.ads.common.lib.utils.Internals; import org.junit.Assert;
import com.google.api.ads.common.lib.utils.*; import org.junit.*;
[ "com.google.api", "org.junit" ]
com.google.api; org.junit;
462,912
public static void writeEnumValue(Parcel dest, Enum e) { dest.writeInt(e.ordinal()); }
static void function(Parcel dest, Enum e) { dest.writeInt(e.ordinal()); }
/** * Allows memory efficient parcelation of enums. * * @param dest Destination of the value. * @param e Value to write. */
Allows memory efficient parcelation of enums
writeEnumValue
{ "repo_name": "MR612/TheApp", "path": "app/src/main/java/ir/isilearning/lmsapp/helper/ParcelableHelper.java", "license": "apache-2.0", "size": 1729 }
[ "android.os.Parcel" ]
import android.os.Parcel;
import android.os.*;
[ "android.os" ]
android.os;
2,910,160
public void setInitialDelay(Duration initialDelay) { this.defaultConfiguration.setInitialDelay(initialDelay); }
void function(Duration initialDelay) { this.defaultConfiguration.setInitialDelay(initialDelay); }
/** * Set the amount of time the route controller should wait before to start * the routes after the camel context is started. * * @param initialDelay the initial delay. */
Set the amount of time the route controller should wait before to start the routes after the camel context is started
setInitialDelay
{ "repo_name": "kevinearls/camel", "path": "camel-core/src/main/java/org/apache/camel/impl/cluster/ClusteredRouteController.java", "license": "apache-2.0", "size": 11795 }
[ "java.time.Duration" ]
import java.time.Duration;
import java.time.*;
[ "java.time" ]
java.time;
638,825
public Object getKey(Exchange exchange) { Object key = ((KratiEndpoint) getEndpoint()).getKey(); if (exchange.getIn().getHeader(KratiConstants.KEY) != null) { key = exchange.getIn().getHeader(KratiConstants.KEY); } return key; }
Object function(Exchange exchange) { Object key = ((KratiEndpoint) getEndpoint()).getKey(); if (exchange.getIn().getHeader(KratiConstants.KEY) != null) { key = exchange.getIn().getHeader(KratiConstants.KEY); } return key; }
/** * Retrieves the key from the URI or from the exchange headers. The header will take precedence over the URI. */
Retrieves the key from the URI or from the exchange headers. The header will take precedence over the URI
getKey
{ "repo_name": "engagepoint/camel", "path": "components/camel-krati/src/main/java/org/apache/camel/component/krati/KratiProducer.java", "license": "apache-2.0", "size": 5503 }
[ "org.apache.camel.Exchange" ]
import org.apache.camel.Exchange;
import org.apache.camel.*;
[ "org.apache.camel" ]
org.apache.camel;
2,371,578
@RequestMapping(value = "/delete", method = RequestMethod.DELETE, produces = "application/json") public String delete(HttpServletRequest request) throws Exception { // Récupération de l'ID de l'utilisateur en fonction du Token Long userId = tokenService.getUserIdByToken(request); JsonObject object = jsonServi...
@RequestMapping(value = STR, method = RequestMethod.DELETE, produces = STR) String function(HttpServletRequest request) throws Exception { Long userId = tokenService.getUserIdByToken(request); JsonObject object = jsonService.parse(request.getReader()).getAsJsonObject(); User user = userService.getUser(userId); String p...
/** * suppresion d'un utilisateur * @param request with JSON contening id * @return JSON with response if success * @throws Exception */
suppresion d'un utilisateur
delete
{ "repo_name": "jordane-quincy/M2_projet_back", "path": "SKE/src/main/java/org/istv/ske/core/controller/UserController.java", "license": "mit", "size": 16781 }
[ "com.google.gson.JsonObject", "javax.servlet.http.HttpServletRequest", "org.istv.ske.configuration.ApplicationConfig", "org.istv.ske.core.exception.BadRequestException", "org.istv.ske.core.service.AuthenticationServiceImpl", "org.istv.ske.core.utils.FieldReader", "org.istv.ske.dal.entities.User", "org...
import com.google.gson.JsonObject; import javax.servlet.http.HttpServletRequest; import org.istv.ske.configuration.ApplicationConfig; import org.istv.ske.core.exception.BadRequestException; import org.istv.ske.core.service.AuthenticationServiceImpl; import org.istv.ske.core.utils.FieldReader; import org.istv.ske.dal.en...
import com.google.gson.*; import javax.servlet.http.*; import org.istv.ske.configuration.*; import org.istv.ske.core.exception.*; import org.istv.ske.core.service.*; import org.istv.ske.core.utils.*; import org.istv.ske.dal.entities.*; import org.springframework.web.bind.annotation.*;
[ "com.google.gson", "javax.servlet", "org.istv.ske", "org.springframework.web" ]
com.google.gson; javax.servlet; org.istv.ske; org.springframework.web;
2,694,216
protected boolean scrollPageDown(TextView widget, Spannable buffer) { final Layout layout = widget.getLayout(); final int innerHeight = getInnerHeight(widget); final int bottom = widget.getScrollY() + innerHeight + innerHeight; int bottomLine = layout.getLineForVertical(bottom); ...
boolean function(TextView widget, Spannable buffer) { final Layout layout = widget.getLayout(); final int innerHeight = getInnerHeight(widget); final int bottom = widget.getScrollY() + innerHeight + innerHeight; int bottomLine = layout.getLineForVertical(bottom); if (bottomLine <= layout.getLineCount() - 1) { Touch.scr...
/** * Performs a scroll page up action. * Scrolls down by one page. * * @param widget The text view. * @param buffer The text buffer. * @return True if the event was handled. * @hide */
Performs a scroll page up action. Scrolls down by one page
scrollPageDown
{ "repo_name": "JSDemos/android-sdk-20", "path": "src/android/text/method/BaseMovementMethod.java", "license": "apache-2.0", "size": 23891 }
[ "android.text.Layout", "android.text.Spannable", "android.widget.TextView" ]
import android.text.Layout; import android.text.Spannable; import android.widget.TextView;
import android.text.*; import android.widget.*;
[ "android.text", "android.widget" ]
android.text; android.widget;
1,923,831
EClass getProjectReference();
EClass getProjectReference();
/** * Returns the meta object for class '{@link org.eclipse.n4js.projectDescription.ProjectReference <em>Project Reference</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>Project Reference</em>'. * @see org.eclipse.n4js.projectDescription.ProjectReference *...
Returns the meta object for class '<code>org.eclipse.n4js.projectDescription.ProjectReference Project Reference</code>'.
getProjectReference
{ "repo_name": "lbeurerkellner/n4js", "path": "plugins/org.eclipse.n4js.model/emf-gen/org/eclipse/n4js/projectDescription/ProjectDescriptionPackage.java", "license": "epl-1.0", "size": 55093 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
292,836
public void addPlayer(EntityPlayerMP p_72683_1_) { int var2 = (int)p_72683_1_.posX >> 4; int var3 = (int)p_72683_1_.posZ >> 4; p_72683_1_.managedPosX = p_72683_1_.posX; p_72683_1_.managedPosZ = p_72683_1_.posZ; for (int var4 = var2 - this.playerViewRadius; var4 <= var2 +...
void function(EntityPlayerMP p_72683_1_) { int var2 = (int)p_72683_1_.posX >> 4; int var3 = (int)p_72683_1_.posZ >> 4; p_72683_1_.managedPosX = p_72683_1_.posX; p_72683_1_.managedPosZ = p_72683_1_.posZ; for (int var4 = var2 - this.playerViewRadius; var4 <= var2 + this.playerViewRadius; ++var4) { for (int var5 = var3 - ...
/** * Adds an EntityPlayerMP to the PlayerManager and to all player instances within player visibility */
Adds an EntityPlayerMP to the PlayerManager and to all player instances within player visibility
addPlayer
{ "repo_name": "Hexeption/Youtube-Hacked-Client-1.8", "path": "minecraft/net/minecraft/server/management/PlayerManager.java", "license": "mit", "size": 21628 }
[ "net.minecraft.entity.player.EntityPlayerMP" ]
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.entity.player.*;
[ "net.minecraft.entity" ]
net.minecraft.entity;
646,674
@Override public boolean dispatchKeyEvent(KeyEvent event) { if( event.getAction()==KeyEvent.ACTION_DOWN ) { switch( event.getKeyCode() ) { case KeyEvent.KEYCODE_BACK: PFInterface.getInstance().inputDeviceKey(PFInterface.DeviceKeyMap.BACK, PFIn...
boolean function(KeyEvent event) { if( event.getAction()==KeyEvent.ACTION_DOWN ) { switch( event.getKeyCode() ) { case KeyEvent.KEYCODE_BACK: PFInterface.getInstance().inputDeviceKey(PFInterface.DeviceKeyMap.BACK, PFInterface.DeviceKeyEvent.CLICK); return true; case KeyEvent.KEYCODE_MENU: PFInterface.getInstance().inpu...
/** * handle device keys */
handle device keys
dispatchKeyEvent
{ "repo_name": "kennykwok1/PlaygroundOSS", "path": "Engine/porting/Android/src/klb/android/GameEngine/GameEngineActivity.java", "license": "apache-2.0", "size": 25565 }
[ "android.view.KeyEvent" ]
import android.view.KeyEvent;
import android.view.*;
[ "android.view" ]
android.view;
389,100
private void readResponseBody(HttpURLConnection conn) { final byte[] buffer = new byte[BUFFER_SIZE]; InputStream inStream = null; try { inStream = conn.getInputStream(); while (inStream.read(buffer) > 0) { // Skip content } } catch...
void function(HttpURLConnection conn) { final byte[] buffer = new byte[BUFFER_SIZE]; InputStream inStream = null; try { inStream = conn.getInputStream(); while (inStream.read(buffer) > 0) { } } catch (final IOException e) { } finally { if (inStream != null) { try { inStream.close(); } catch (final IOException e) { } } ...
/** * Read and ignore the response body. */
Read and ignore the response body
readResponseBody
{ "repo_name": "jerkar/jerkar", "path": "dev.jeka.core/src/main/java/dev/jeka/core/api/depmanagement/embedded/ivy/IvyFollowRedirectUrlHandler.java", "license": "apache-2.0", "size": 6449 }
[ "java.io.IOException", "java.io.InputStream", "java.net.HttpURLConnection" ]
import java.io.IOException; import java.io.InputStream; import java.net.HttpURLConnection;
import java.io.*; import java.net.*;
[ "java.io", "java.net" ]
java.io; java.net;
2,008,155
public void finish() throws IOException { // See Bugzilla 28776 for a discussion on this // http://issues.apache.org/bugzilla/show_bug.cgi?id=28776 this.writeEOFRecord(); this.writeEOFRecord(); }
void function() throws IOException { this.writeEOFRecord(); this.writeEOFRecord(); }
/** * Ends the TAR archive without closing the underlying OutputStream. * The result is that the two EOF records of nulls are written. * @throws IOException on error */
Ends the TAR archive without closing the underlying OutputStream. The result is that the two EOF records of nulls are written
finish
{ "repo_name": "viqueen/jenkins", "path": "core/src/main/java/hudson/org/apache/tools/tar/TarOutputStream.java", "license": "mit", "size": 12486 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,691,612
@Test public void currenciesPutTest() throws ApiException { String stewardname = null; String currency = null; String authorization = null; CurrenciesRequest currencies = null; // CreateResponse response = api.currenciesPut(stewardname, currency, authorization, currencies...
void function() throws ApiException { String stewardname = null; String currency = null; String authorization = null; CurrenciesRequest currencies = null; }
/** * Update a Currency * * * * @throws ApiException * if the Api call fails */
Update a Currency
currenciesPutTest
{ "repo_name": "Circular-Money/Agent-Based-Model", "path": "openmoney-api-client/src/test/java/io/swagger/client/api/CurrenciesApiTest.java", "license": "gpl-3.0", "size": 3737 }
[ "io.swagger.client.ApiException", "io.swagger.client.model.CurrenciesRequest" ]
import io.swagger.client.ApiException; import io.swagger.client.model.CurrenciesRequest;
import io.swagger.client.*; import io.swagger.client.model.*;
[ "io.swagger.client" ]
io.swagger.client;
2,893,299
TSink<JsonObject> events(TStream<JsonObject> stream, Function<JsonObject, String> eventId, UnaryOperator<JsonObject> payload, Function<JsonObject, Integer> qos) ;
TSink<JsonObject> events(TStream<JsonObject> stream, Function<JsonObject, String> eventId, UnaryOperator<JsonObject> payload, Function<JsonObject, Integer> qos) ;
/** * Publish a stream's tuples as device events. * <p> * Each tuple is published as a device event with the supplied functions * providing the event identifier, payload and QoS. The event identifier and * QoS can be generated based upon the tuple. * * @param stream * ...
Publish a stream's tuples as device events. Each tuple is published as a device event with the supplied functions providing the event identifier, payload and QoS. The event identifier and QoS can be generated based upon the tuple
events
{ "repo_name": "ddebrunner/incubator-quarks", "path": "connectors/iot/src/main/java/org/apache/edgent/connectors/iot/IotDevice.java", "license": "apache-2.0", "size": 4502 }
[ "com.google.gson.JsonObject", "org.apache.edgent.function.Function", "org.apache.edgent.function.UnaryOperator", "org.apache.edgent.topology.TSink", "org.apache.edgent.topology.TStream" ]
import com.google.gson.JsonObject; import org.apache.edgent.function.Function; import org.apache.edgent.function.UnaryOperator; import org.apache.edgent.topology.TSink; import org.apache.edgent.topology.TStream;
import com.google.gson.*; import org.apache.edgent.function.*; import org.apache.edgent.topology.*;
[ "com.google.gson", "org.apache.edgent" ]
com.google.gson; org.apache.edgent;
2,850,613
return em; } public UserFacade() { super(User.class); }
return em; } public UserFacade() { super(User.class); }
/** * Returns the entity manager for this class * @return The entity manager for this class */
Returns the entity manager for this class
getEntityManager
{ "repo_name": "McBrosa/MapChat", "path": "src/java/com/mapchat/sessionbeanpackage/UserFacade.java", "license": "lgpl-3.0", "size": 2075 }
[ "com.mapchat.entitypackage.User" ]
import com.mapchat.entitypackage.User;
import com.mapchat.entitypackage.*;
[ "com.mapchat.entitypackage" ]
com.mapchat.entitypackage;
430,840
public void setChannels(Collection<String> channels) { this.channels.clear(); this.channels.addAll(channels); }
void function(Collection<String> channels) { this.channels.clear(); this.channels.addAll(channels); }
/** * All concrete queues the worker polls. */
All concrete queues the worker polls
setChannels
{ "repo_name": "shopping24/redjob", "path": "src/main/java/com/s24/redjob/channel/ChannelWorkerState.java", "license": "apache-2.0", "size": 739 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,466,919
BackOffTimer.Task getRestartingRouteState(String routeId);
BackOffTimer.Task getRestartingRouteState(String routeId);
/** * Gets the state of the backoff for the given route if its managed and under restarting. * * @param routeId the route id * @return the state, or <tt>null</tt> if the route is not under restarting */
Gets the state of the backoff for the given route if its managed and under restarting
getRestartingRouteState
{ "repo_name": "nikhilvibhav/camel", "path": "core/camel-api/src/main/java/org/apache/camel/spi/SupervisingRouteController.java", "license": "apache-2.0", "size": 6288 }
[ "org.apache.camel.util.backoff.BackOffTimer" ]
import org.apache.camel.util.backoff.BackOffTimer;
import org.apache.camel.util.backoff.*;
[ "org.apache.camel" ]
org.apache.camel;
154,401
public Priority getPriority() { return config.getPriority() != null ? config.getPriority() : Priority.MIDDLE; }
Priority function() { return config.getPriority() != null ? config.getPriority() : Priority.MIDDLE; }
/** * Priority to display. If a short business assessment is displayed only rows with high priority are shown. * @return */
Priority to display. If a short business assessment is displayed only rows with high priority are shown
getPriority
{ "repo_name": "micromata/projectforge", "path": "projectforge-business/src/main/java/org/projectforge/business/fibu/kost/BusinessAssessmentRow.java", "license": "gpl-3.0", "size": 6701 }
[ "org.projectforge.common.i18n.Priority" ]
import org.projectforge.common.i18n.Priority;
import org.projectforge.common.i18n.*;
[ "org.projectforge.common" ]
org.projectforge.common;
2,610,112
@ServiceMethod(returns = ReturnType.SINGLE) ProductPoliciesCreateOrUpdateResponse createOrUpdateWithResponse( String resourceGroupName, String serviceName, String productId, PolicyIdName policyId, PolicyContractInner parameters, String ifMatch, Context con...
@ServiceMethod(returns = ReturnType.SINGLE) ProductPoliciesCreateOrUpdateResponse createOrUpdateWithResponse( String resourceGroupName, String serviceName, String productId, PolicyIdName policyId, PolicyContractInner parameters, String ifMatch, Context context);
/** * Creates or updates policy configuration for the Product. * * @param resourceGroupName The name of the resource group. * @param serviceName The name of the API Management service. * @param productId Product identifier. Must be unique in the current API Management service instance. * @...
Creates or updates policy configuration for the Product
createOrUpdateWithResponse
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/apimanagement/azure-resourcemanager-apimanagement/src/main/java/com/azure/resourcemanager/apimanagement/fluent/ProductPoliciesClient.java", "license": "mit", "size": 11341 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.util.Context", "com.azure.resourcemanager.apimanagement.fluent.models.PolicyContractInner", "com.azure.resourcemanager.apimanagement.models.PolicyIdName", "com.azure.resourcemanager.apimanagement.models.Prod...
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.util.Context; import com.azure.resourcemanager.apimanagement.fluent.models.PolicyContractInner; import com.azure.resourcemanager.apimanagement.models.PolicyIdName; import com.azure.resourcemanager.apimanag...
import com.azure.core.annotation.*; import com.azure.core.util.*; import com.azure.resourcemanager.apimanagement.fluent.models.*; import com.azure.resourcemanager.apimanagement.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,352,883
Block createNextBlock(@Nullable Address to, @Nullable TransactionOutPoint prevOut, long time, byte[] pubKey, BigInteger coinbaseValue) { Block b = new Block(params); b.setDifficultyTarget(difficultyTarget); b.addCoinbaseTransaction(pubKey, coinbaseValue); i...
Block createNextBlock(@Nullable Address to, @Nullable TransactionOutPoint prevOut, long time, byte[] pubKey, BigInteger coinbaseValue) { Block b = new Block(params); b.setDifficultyTarget(difficultyTarget); b.addCoinbaseTransaction(pubKey, coinbaseValue); if (to != null) { Transaction t = new Transaction(params); t.add...
/** * Returns a solved block that builds on top of this one. This exists for unit tests. * In this variant you can specify a public key (pubkey) for use in generating coinbase blocks. */
Returns a solved block that builds on top of this one. This exists for unit tests. In this variant you can specify a public key (pubkey) for use in generating coinbase blocks
createNextBlock
{ "repo_name": "joeswhite/freicoinj", "path": "core/src/main/java/com/google/bitcoin/core/Block.java", "license": "apache-2.0", "size": 46534 }
[ "com.google.bitcoin.script.Script", "java.math.BigInteger", "javax.annotation.Nullable" ]
import com.google.bitcoin.script.Script; import java.math.BigInteger; import javax.annotation.Nullable;
import com.google.bitcoin.script.*; import java.math.*; import javax.annotation.*;
[ "com.google.bitcoin", "java.math", "javax.annotation" ]
com.google.bitcoin; java.math; javax.annotation;
394,180
public void setExtractedText(ExtractedText text) { Editable content = getEditableText(); if (text.text != null) { if (content == null) { setText(text.text, TextView.BufferType.EDITABLE); } else if (text.partialStartOffset < 0) { removeParcelabl...
void function(ExtractedText text) { Editable content = getEditableText(); if (text.text != null) { if (content == null) { setText(text.text, TextView.BufferType.EDITABLE); } else if (text.partialStartOffset < 0) { removeParcelableSpans(content, 0, content.length()); content.replace(0, content.length(), text.text); } el...
/** * Apply to this text view the given extracted text, as previously * returned by {@link #extractText(ExtractedTextRequest, ExtractedText)}. */
Apply to this text view the given extracted text, as previously returned by <code>#extractText(ExtractedTextRequest, ExtractedText)</code>
setExtractedText
{ "repo_name": "JSDemos/android-sdk-20", "path": "src/android/widget/TextView.java", "license": "apache-2.0", "size": 343681 }
[ "android.text.Editable", "android.text.Selection", "android.text.Spannable", "android.text.method.MetaKeyKeyListener", "android.view.inputmethod.ExtractedText" ]
import android.text.Editable; import android.text.Selection; import android.text.Spannable; import android.text.method.MetaKeyKeyListener; import android.view.inputmethod.ExtractedText;
import android.text.*; import android.text.method.*; import android.view.inputmethod.*;
[ "android.text", "android.view" ]
android.text; android.view;
655,790
public List<byte[]> getVerticesColors(Structure meshStructure, BlenderContext blenderContext) throws BlenderFileException { Pointer pMCol = (Pointer) meshStructure.getFieldValue("mcol"); List<byte[]> verticesColors = null; List<Structure> mCol = null; if (pMCol.isNotNull()) { ...
List<byte[]> function(Structure meshStructure, BlenderContext blenderContext) throws BlenderFileException { Pointer pMCol = (Pointer) meshStructure.getFieldValue("mcol"); List<byte[]> verticesColors = null; List<Structure> mCol = null; if (pMCol.isNotNull()) { verticesColors = new ArrayList<byte[]>(); mCol = pMCol.fetc...
/** * This method returns the vertices colors. Each vertex is stored in byte[4] array. * * @param meshStructure * the structure containing the mesh data * @param blenderContext * the blender context * @return a list of vertices colors, each color belongs ...
This method returns the vertices colors. Each vertex is stored in byte[4] array
getVerticesColors
{ "repo_name": "chototsu/MikuMikuStudio", "path": "engine/src/blender/com/jme3/scene/plugins/blender/meshes/MeshHelper.java", "license": "bsd-2-clause", "size": 24649 }
[ "com.jme3.scene.plugins.blender.BlenderContext", "com.jme3.scene.plugins.blender.exceptions.BlenderFileException", "com.jme3.scene.plugins.blender.file.Pointer", "com.jme3.scene.plugins.blender.file.Structure", "java.util.ArrayList", "java.util.List" ]
import com.jme3.scene.plugins.blender.BlenderContext; import com.jme3.scene.plugins.blender.exceptions.BlenderFileException; import com.jme3.scene.plugins.blender.file.Pointer; import com.jme3.scene.plugins.blender.file.Structure; import java.util.ArrayList; import java.util.List;
import com.jme3.scene.plugins.blender.*; import com.jme3.scene.plugins.blender.exceptions.*; import com.jme3.scene.plugins.blender.file.*; import java.util.*;
[ "com.jme3.scene", "java.util" ]
com.jme3.scene; java.util;
2,178,752
public static Movie getMovieById(int movieid) { Movie ourmovie = null; // Find the movie for the given username; try { for(Movie m : movies) { if(m.getID() == movieid) { ourmovie = m; break; } } ...
static Movie function(int movieid) { Movie ourmovie = null; try { for(Movie m : movies) { if(m.getID() == movieid) { ourmovie = m; break; } } } catch(Exception e) { Log.println(Log.ERROR, STR, e.getMessage()); } return ourmovie; }
/** * return Movie object for given id * @param movieid id form tomato API * @return Movie object with matching ID */
return Movie object for given id
getMovieById
{ "repo_name": "mmccoy37/GTMovies", "path": "app/src/main/java/com/team19/gtmovies/data/IOActions.java", "license": "gpl-3.0", "size": 13231 }
[ "android.util.Log", "com.team19.gtmovies.pojo.Movie" ]
import android.util.Log; import com.team19.gtmovies.pojo.Movie;
import android.util.*; import com.team19.gtmovies.pojo.*;
[ "android.util", "com.team19.gtmovies" ]
android.util; com.team19.gtmovies;
1,573,874
public void fileNotFound(File f) { if (!recentFiles.contains(f)) { throw new IllegalStateException("Well no wonder it wasn't found, its not in the list."); } else { recentFiles.remove(f); } }
void function(File f) { if (!recentFiles.contains(f)) { throw new IllegalStateException(STR); } else { recentFiles.remove(f); } }
/** * Call to remove a file from the list. * * @param f */
Call to remove a file from the list
fileNotFound
{ "repo_name": "spotbugs/spotbugs", "path": "spotbugs/src/gui/main/edu/umd/cs/findbugs/gui2/GUISaveState.java", "license": "lgpl-2.1", "size": 18628 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
2,805,686
public void save(Session session) throws IOException { // Open an output stream to the specified pathname, if any File file = file(session.getIdInternal()); if (file == null) { return; } if (manager.getContainer().getLogger().isDebugEnabled()) { manag...
void function(Session session) throws IOException { File file = file(session.getIdInternal()); if (file == null) { return; } if (manager.getContainer().getLogger().isDebugEnabled()) { manager.getContainer().getLogger().debug(sm.getString(getStoreName()+STR, session.getIdInternal(), file.getAbsolutePath())); } FileOutpu...
/** * Save the specified Session into this Store. Any previously saved * information for the associated session identifier is replaced. * * @param session Session to be saved * * @exception IOException if an input/output error occurs */
Save the specified Session into this Store. Any previously saved information for the associated session identifier is replaced
save
{ "repo_name": "plumer/codana", "path": "tomcat_files/7.0.0/FileStore.java", "license": "mit", "size": 12865 }
[ "java.io.BufferedOutputStream", "java.io.File", "java.io.FileOutputStream", "java.io.IOException", "java.io.ObjectOutputStream", "org.apache.catalina.Session" ]
import java.io.BufferedOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.ObjectOutputStream; import org.apache.catalina.Session;
import java.io.*; import org.apache.catalina.*;
[ "java.io", "org.apache.catalina" ]
java.io; org.apache.catalina;
223,984
public void get(int index, NullableIntHolder holder) { if (isSet(index) == 0) { holder.isSet = 0; return; } holder.isSet = 1; holder.value = valueBuffer.getInt(index * TYPE_WIDTH); }
void function(int index, NullableIntHolder holder) { if (isSet(index) == 0) { holder.isSet = 0; return; } holder.isSet = 1; holder.value = valueBuffer.getInt(index * TYPE_WIDTH); }
/** * Get the element at the given index from the vector and * sets the state in holder. If element at given index * is null, holder.isSet will be zero. * * @param index position of element */
Get the element at the given index from the vector and sets the state in holder. If element at given index is null, holder.isSet will be zero
get
{ "repo_name": "majetideepak/arrow", "path": "java/vector/src/main/java/org/apache/arrow/vector/IntVector.java", "license": "apache-2.0", "size": 11417 }
[ "org.apache.arrow.vector.holders.NullableIntHolder" ]
import org.apache.arrow.vector.holders.NullableIntHolder;
import org.apache.arrow.vector.holders.*;
[ "org.apache.arrow" ]
org.apache.arrow;
1,576,513
score = 100; // base score, so we don't go negative // start off with big bonus for having a history of being used score += fp.getReferences() * 100; // I hate how USDA is full of babyfoods. Come on, really. if (fp.getDescription().startsWith("Babyfood")) { score -= 100;...
score = 100; score += fp.getReferences() * 100; if (fp.getDescription().startsWith(STR)) { score -= 100; } if (fp.getSource() == Datasources.getUserFoods()) { score += 100; } else if (fp.getSource() == Datasources.getCRDBFoods()) { score += 50; } score -= 3*getFoodProxy().getDescription().length(); for (int i=0; i<quer...
/** * A heuristic scoring function to give a smart sort of the results * @param query the user's search terms, as entered */
A heuristic scoring function to give a smart sort of the results
computeScore
{ "repo_name": "cheesebro/CRONOMETER", "path": "src/ca/spaz/cron/ui/SearchHit.java", "license": "epl-1.0", "size": 2154 }
[ "ca.spaz.cron.datasource.Datasources" ]
import ca.spaz.cron.datasource.Datasources;
import ca.spaz.cron.datasource.*;
[ "ca.spaz.cron" ]
ca.spaz.cron;
2,432,214
public String toString() { StringBuilder str = new StringBuilder(128); if (Rlog.isLoggable(LOG_TAG, Log.DEBUG)) { str.append("addr: " + getAddress()) .append(" pres.: " + getNumberPresentation()) .append(" dial: " + getOrigDialString()) ...
String function() { StringBuilder str = new StringBuilder(128); if (Rlog.isLoggable(LOG_TAG, Log.DEBUG)) { str.append(STR + getAddress()) .append(STR + getNumberPresentation()) .append(STR + getOrigDialString()) .append(STR + getRemainingPostDialString()) .append(STR + getCnapName()) .append("(" + getCnapNamePresentati...
/** * Build a human representation of a connection instance, suitable for debugging. * Don't log personal stuff unless in debug mode. * @return a string representing the internal state of this connection. */
Build a human representation of a connection instance, suitable for debugging. Don't log personal stuff unless in debug mode
toString
{ "repo_name": "JSDemos/android-sdk-20", "path": "src/com/android/internal/telephony/Connection.java", "license": "apache-2.0", "size": 10729 }
[ "android.telephony.Rlog", "android.util.Log" ]
import android.telephony.Rlog; import android.util.Log;
import android.telephony.*; import android.util.*;
[ "android.telephony", "android.util" ]
android.telephony; android.util;
240,406
public static AlgorithmParameterGenerator getInstance(String algorithm) throws NoSuchAlgorithmException { if (algorithm == null) { throw new NullPointerException(Messages.getString("security.01")); //$NON-NLS-1$ } synchronized (engine) { engine.getInstance...
static AlgorithmParameterGenerator function(String algorithm) throws NoSuchAlgorithmException { if (algorithm == null) { throw new NullPointerException(Messages.getString(STR)); } synchronized (engine) { engine.getInstance(algorithm, null); return new AlgorithmParameterGenerator( (AlgorithmParameterGeneratorSpi) engine...
/** * Returns a new instance of {@code AlgorithmParameterGenerator} for the * specified algorithm. * * @param algorithm * the name of the algorithm to use. * @return a new instance of {@code AlgorithmParameterGenerator} for the * specified algorithm. * @throws...
Returns a new instance of AlgorithmParameterGenerator for the specified algorithm
getInstance
{ "repo_name": "freeVM/freeVM", "path": "enhanced/java/classlib/modules/security/src/main/java/common/java/security/AlgorithmParameterGenerator.java", "license": "apache-2.0", "size": 8853 }
[ "org.apache.harmony.security.internal.nls.Messages" ]
import org.apache.harmony.security.internal.nls.Messages;
import org.apache.harmony.security.internal.nls.*;
[ "org.apache.harmony" ]
org.apache.harmony;
2,260,562
public void transactList(TransactionManager transactionManager, TransactionListener<List<ModelClass>> listTransactionListener) { checkSelect("transact"); transactionManager.fetchFromTable(this, listTransactionListener); }
void function(TransactionManager transactionManager, TransactionListener<List<ModelClass>> listTransactionListener) { checkSelect(STR); transactionManager.fetchFromTable(this, listTransactionListener); }
/** * Puts this query onto the {@link com.raizlabs.android.dbflow.runtime.DBTransactionQueue} and will return a list of * {@link ModelClass} on the UI thread. * * @param transactionManager The transaction manager to add the query to * @param listTransactionListener The result of this trans...
Puts this query onto the <code>com.raizlabs.android.dbflow.runtime.DBTransactionQueue</code> and will return a list of <code>ModelClass</code> on the UI thread
transactList
{ "repo_name": "omegasoft7/DBFlow", "path": "library/src/main/java/com/raizlabs/android/dbflow/sql/language/Where.java", "license": "mit", "size": 14519 }
[ "com.raizlabs.android.dbflow.runtime.TransactionManager", "com.raizlabs.android.dbflow.runtime.transaction.TransactionListener", "java.util.List" ]
import com.raizlabs.android.dbflow.runtime.TransactionManager; import com.raizlabs.android.dbflow.runtime.transaction.TransactionListener; import java.util.List;
import com.raizlabs.android.dbflow.runtime.*; import com.raizlabs.android.dbflow.runtime.transaction.*; import java.util.*;
[ "com.raizlabs.android", "java.util" ]
com.raizlabs.android; java.util;
773,437
@SuppressWarnings("nls") public void paint(final Color grid_color, final PaintEvent event) { if (! (visible && region.intersects(event.x, event.y, event.width, event.height))) return; if (Chart.debug) System.out.println("paint axis '" + getLabel() + "',...
@SuppressWarnings("nls") void function(final Color grid_color, final PaintEvent event) { if (! (visible && region.intersects(event.x, event.y, event.width, event.height))) return; if (Chart.debug) System.out.println(STR + getLabel() + STR + region.height + STR); final GC gc = event.gc; final Point char_size = gc.textEx...
/** Paint the axis. * <p> * Does not paint any series data, only the axis (labels, ticks, ...) * @param event Clipping information from the paint event is used for optimization) */
Paint the axis. Does not paint any series data, only the axis (labels, ticks, ...)
paint
{ "repo_name": "ControlSystemStudio/cs-studio", "path": "applications/appunorganized/appunorganized-plugins/org.csstudio.swt.chart/src/org/csstudio/swt/chart/axes/YAxis.java", "license": "epl-1.0", "size": 20669 }
[ "org.csstudio.swt.chart.Chart", "org.csstudio.swt.util.GraphicsUtils", "org.eclipse.swt.events.PaintEvent", "org.eclipse.swt.graphics.Color", "org.eclipse.swt.graphics.Point" ]
import org.csstudio.swt.chart.Chart; import org.csstudio.swt.util.GraphicsUtils; import org.eclipse.swt.events.PaintEvent; import org.eclipse.swt.graphics.Color; import org.eclipse.swt.graphics.Point;
import org.csstudio.swt.chart.*; import org.csstudio.swt.util.*; import org.eclipse.swt.events.*; import org.eclipse.swt.graphics.*;
[ "org.csstudio.swt", "org.eclipse.swt" ]
org.csstudio.swt; org.eclipse.swt;
2,370,260
@Test public void testW1Y1900Previous() { Week previous = (Week) this.w1Y1900.previous(); assertNull(previous); }
void function() { Week previous = (Week) this.w1Y1900.previous(); assertNull(previous); }
/** * Request the week before week 1, 1900: it should be <code>null</code>. */
Request the week before week 1, 1900: it should be <code>null</code>
testW1Y1900Previous
{ "repo_name": "oskopek/jfreechart-fse", "path": "src/test/java/org/jfree/data/time/WeekTest.java", "license": "lgpl-2.1", "size": 18439 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
139,546
@Test public void testConstructor2() { TTSException ttsException = new TTSException("Message"); Assert.assertNotNull("TTSException(String) constructor failed", ttsException); }
void function() { TTSException ttsException = new TTSException(STR); Assert.assertNotNull(STR, ttsException); }
/** * Test TTSException(String message) constructor */
Test TTSException(String message) constructor
testConstructor2
{ "repo_name": "phxql/smarthome", "path": "bundles/core/org.eclipse.smarthome.core.voice.test/src/test/java/org/eclipse/smarthome/core/voice/TTSExceptionTest.java", "license": "epl-1.0", "size": 1673 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
1,482,997
public Sort getIndexSort() { return indexSort; }
Sort function() { return indexSort; }
/** * Return the sort order of this index, or null if the index has no sort. */
Return the sort order of this index, or null if the index has no sort
getIndexSort
{ "repo_name": "wenpos/elasticsearch", "path": "core/src/main/java/org/elasticsearch/index/engine/EngineConfig.java", "license": "apache-2.0", "size": 15331 }
[ "org.apache.lucene.search.Sort" ]
import org.apache.lucene.search.Sort;
import org.apache.lucene.search.*;
[ "org.apache.lucene" ]
org.apache.lucene;
160,658
public NotifDefaultAddressRow getNotifDefaultAddress(String query) throws UtilException { return getUniqueRow(query); }
NotifDefaultAddressRow function(String query) throws UtilException { return getUniqueRow(query); }
/** * Returns the unique row given by a no parameters query. */
Returns the unique row given by a no parameters query
getNotifDefaultAddress
{ "repo_name": "auroreallibe/Silverpeas-Core", "path": "core-library/src/main/java/org/silverpeas/core/notification/user/client/model/NotifDefaultAddressTable.java", "license": "agpl-3.0", "size": 6546 }
[ "org.silverpeas.core.exception.UtilException" ]
import org.silverpeas.core.exception.UtilException;
import org.silverpeas.core.exception.*;
[ "org.silverpeas.core" ]
org.silverpeas.core;
1,368,610
HistoricTaskInstanceQuery taskCompletedOn(Date endDate);
HistoricTaskInstanceQuery taskCompletedOn(Date endDate);
/** * Only select select historic task instances which are completed on the given date */
Only select select historic task instances which are completed on the given date
taskCompletedOn
{ "repo_name": "flowable/flowable-engine", "path": "modules/flowable-task-service-api/src/main/java/org/flowable/task/api/history/HistoricTaskInstanceQuery.java", "license": "apache-2.0", "size": 3753 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
612,072
public List getRubrics() { return rubrics; }
List function() { return rubrics; }
/** * Returns the rubrics. * * @return List */
Returns the rubrics
getRubrics
{ "repo_name": "RLDevOps/Demo", "path": "src/main/java/org/olat/ims/qti/editor/beecom/objects/Assessment.java", "license": "apache-2.0", "size": 9219 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
86,848
protected void removeRegisteredService(final RegisteredService service) { this.serviceMap.remove(service.getId()); }
void function(final RegisteredService service) { this.serviceMap.remove(service.getId()); }
/** * Remove registered service. * * @param service the service */
Remove registered service
removeRegisteredService
{ "repo_name": "frett/cas", "path": "core/cas-server-core-services-registry/src/main/java/org/apereo/cas/services/resource/AbstractResourceBasedServiceRegistry.java", "license": "apache-2.0", "size": 17942 }
[ "org.apereo.cas.services.RegisteredService" ]
import org.apereo.cas.services.RegisteredService;
import org.apereo.cas.services.*;
[ "org.apereo.cas" ]
org.apereo.cas;
70,082
void updateDays(WheelView year, WheelView month, WheelView day) { Calendar calendar = Calendar.getInstance(); calendar.set(Calendar.YEAR, calendar.get(Calendar.YEAR) + year.getCurrentItem()); calendar.set(Calendar.MONTH, month.getCurrentItem()); int maxDays = calenda...
void updateDays(WheelView year, WheelView month, WheelView day) { Calendar calendar = Calendar.getInstance(); calendar.set(Calendar.YEAR, calendar.get(Calendar.YEAR) + year.getCurrentItem()); calendar.set(Calendar.MONTH, month.getCurrentItem()); int maxDays = calendar.getActualMaximum(Calendar.DAY_OF_MONTH); day.setVie...
/** * Updates day wheel. Sets max days according to selected month and year */
Updates day wheel. Sets max days according to selected month and year
updateDays
{ "repo_name": "dktlu/Mitotu", "path": "MiaoTu/src/main/java/com/miaotu/activity/PublishCustomTourActivity2.java", "license": "apache-2.0", "size": 12564 }
[ "com.miaotu.adapter.DateNumericAdapter", "java.util.Calendar" ]
import com.miaotu.adapter.DateNumericAdapter; import java.util.Calendar;
import com.miaotu.adapter.*; import java.util.*;
[ "com.miaotu.adapter", "java.util" ]
com.miaotu.adapter; java.util;
1,828,452
public static List<IMessage> analyzeDoc(IDocument doc, IAnalysisPreferences analysisPrefs, String moduleName, IIndentPrefs indentPrefs, IProgressMonitor monitor) { ArrayList<IMessage> ret = new ArrayList<IMessage>(); //don't even try to gather indentation errors if they should be ignore...
static List<IMessage> function(IDocument doc, IAnalysisPreferences analysisPrefs, String moduleName, IIndentPrefs indentPrefs, IProgressMonitor monitor) { ArrayList<IMessage> ret = new ArrayList<IMessage>(); if (analysisPrefs.getSeverityForType(IAnalysisPreferences.TYPE_INDENTATION_PROBLEM) == IMarker.SEVERITY_INFO) { ...
/** * Analyze the doc for mixed tabs and indents with the wrong number of chars. * @param monitor * * @return a list with the error messages to be shown to the user. */
Analyze the doc for mixed tabs and indents with the wrong number of chars
analyzeDoc
{ "repo_name": "smkr/pyclipse", "path": "plugins/com.python.pydev.analysis/src/com/python/pydev/analysis/tabnanny/TabNanny.java", "license": "epl-1.0", "size": 8308 }
[ "com.python.pydev.analysis.IAnalysisPreferences", "com.python.pydev.analysis.messages.IMessage", "java.util.ArrayList", "java.util.List", "org.eclipse.core.resources.IMarker", "org.eclipse.core.runtime.IProgressMonitor", "org.eclipse.jface.text.BadLocationException", "org.eclipse.jface.text.IDocument"...
import com.python.pydev.analysis.IAnalysisPreferences; import com.python.pydev.analysis.messages.IMessage; import java.util.ArrayList; import java.util.List; import org.eclipse.core.resources.IMarker; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.jface.text.BadLocationException; import org.eclips...
import com.python.pydev.analysis.*; import com.python.pydev.analysis.messages.*; import java.util.*; import org.eclipse.core.resources.*; import org.eclipse.core.runtime.*; import org.eclipse.jface.text.*; import org.python.pydev.core.*; import org.python.pydev.parser.fastparser.*;
[ "com.python.pydev", "java.util", "org.eclipse.core", "org.eclipse.jface", "org.python.pydev" ]
com.python.pydev; java.util; org.eclipse.core; org.eclipse.jface; org.python.pydev;
2,705,644
private static void logReadError(final int flags, final Exception ex) { if (BitFlagUtils.anyNotSet(flags, FLAG_SILENT)) { logger.log(Level.SEVERE, "Unable to read message", ex); } }
static void function(final int flags, final Exception ex) { if (BitFlagUtils.anyNotSet(flags, FLAG_SILENT)) { logger.log(Level.SEVERE, STR, ex); } }
/** * Log read error. * * @param flags the flags * @param ex the ex */
Log read error
logReadError
{ "repo_name": "aherbert/GDSC-SMLM", "path": "src/main/java/uk/ac/sussex/gdsc/smlm/ij/settings/SettingsManager.java", "license": "gpl-3.0", "size": 46108 }
[ "java.util.logging.Level", "uk.ac.sussex.gdsc.core.utils.BitFlagUtils" ]
import java.util.logging.Level; import uk.ac.sussex.gdsc.core.utils.BitFlagUtils;
import java.util.logging.*; import uk.ac.sussex.gdsc.core.utils.*;
[ "java.util", "uk.ac.sussex" ]
java.util; uk.ac.sussex;
1,638,301
protected TimeRange adjustTimeRangeToLayoutTable(TimeRange eventTimeRange) { Time lowerBound = null, upperBound = null; // // Make sure that the upper/lower bounds fall within the layout table. // if (this.timeRange.firstTime().compareTo(event...
TimeRange function(TimeRange eventTimeRange) { Time lowerBound = null, upperBound = null; { lowerBound = this.timeRange.firstTime(); } else { lowerBound = eventTimeRange.firstTime(); } if (this.timeRange.lastTime().compareTo(eventTimeRange.lastTime()) < 0) { upperBound = this.timeRange.lastTime(); } else { upperBound =...
/** * Convert the time range to fall entirely within the time range of the layout table. */
Convert the time range to fall entirely within the time range of the layout table
adjustTimeRangeToLayoutTable
{ "repo_name": "OpenCollabZA/sakai", "path": "calendar/calendar-impl/impl/src/java/org/sakaiproject/calendar/impl/PDFExportService.java", "license": "apache-2.0", "size": 61583 }
[ "org.sakaiproject.time.api.Time", "org.sakaiproject.time.api.TimeRange" ]
import org.sakaiproject.time.api.Time; import org.sakaiproject.time.api.TimeRange;
import org.sakaiproject.time.api.*;
[ "org.sakaiproject.time" ]
org.sakaiproject.time;
2,053,811
public Unit unit() { return this.unit; }
Unit function() { return this.unit; }
/** * Get the unit property: the unit of the metric. * * @return the unit value. */
Get the unit property: the unit of the metric
unit
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/models/MetricDefinitionInner.java", "license": "mit", "size": 9350 }
[ "com.azure.resourcemanager.monitor.models.Unit" ]
import com.azure.resourcemanager.monitor.models.Unit;
import com.azure.resourcemanager.monitor.models.*;
[ "com.azure.resourcemanager" ]
com.azure.resourcemanager;
1,848,592
public com.google.common.util.concurrent.ListenableFuture<io.grpc.instrumentation.v1alpha.StatsResponse> getStats( io.grpc.instrumentation.v1alpha.StatsRequest request) { return futureUnaryCall( getChannel().newCall(getGetStatsMethod(), getCallOptions()), request); }
com.google.common.util.concurrent.ListenableFuture<io.grpc.instrumentation.v1alpha.StatsResponse> function( io.grpc.instrumentation.v1alpha.StatsRequest request) { return futureUnaryCall( getChannel().newCall(getGetStatsMethod(), getCallOptions()), request); }
/** * <pre> * Query the server for specific stats * </pre> */
<code> Query the server for specific stats </code>
getStats
{ "repo_name": "rmichela/grpc-java", "path": "services/src/generated/main/grpc/io/grpc/instrumentation/v1alpha/MonitoringGrpc.java", "license": "apache-2.0", "size": 29215 }
[ "io.grpc.stub.ClientCalls" ]
import io.grpc.stub.ClientCalls;
import io.grpc.stub.*;
[ "io.grpc.stub" ]
io.grpc.stub;
699,420
//----------------------------------------------------------------------- public CurveName getCurveName() { return curveName; }
CurveName function() { return curveName; }
/** * Gets the curve name. * @return the value of the property, not null */
Gets the curve name
getCurveName
{ "repo_name": "nssales/Strata", "path": "examples/src/main/java/com/opengamma/strata/examples/marketdata/curve/LoadedCurveName.java", "license": "apache-2.0", "size": 10009 }
[ "com.opengamma.strata.market.curve.CurveName" ]
import com.opengamma.strata.market.curve.CurveName;
import com.opengamma.strata.market.curve.*;
[ "com.opengamma.strata" ]
com.opengamma.strata;
871,111
private static IElement convertBinding(final IMethodBinding pBinding) { ASTCrawler.checkForNull(pBinding); String lReturn = null; try { lReturn = ASTCrawler.convertBinding(pBinding.getDeclaringClass()).getId() + "."; } catch (final NullPointerException E) { E.printStackTrace(); throw E; } if (pB...
static IElement function(final IMethodBinding pBinding) { ASTCrawler.checkForNull(pBinding); String lReturn = null; try { lReturn = ASTCrawler.convertBinding(pBinding.getDeclaringClass()).getId() + "."; } catch (final NullPointerException E) { E.printStackTrace(); throw E; } if (pBinding.isConstructor()) lReturn += STR...
/** * Converts a method binding to a method element. * * @param pBinding * The binding to covert. Cannot be null. * @return A method element corresponding to pBinding. Never null. */
Converts a method binding to a method element
convertBinding
{ "repo_name": "khatchad/fraglight", "path": "edu.ohio_state.cse.khatchad.fraglight.core/src/ca/mcgill/cs/swevo/jayfx/ASTCrawler.java", "license": "epl-1.0", "size": 51345 }
[ "ca.mcgill.cs.swevo.jayfx.model.Category", "ca.mcgill.cs.swevo.jayfx.model.FlyweightElementFactory", "ca.mcgill.cs.swevo.jayfx.model.IElement", "org.eclipse.jdt.core.dom.IMethodBinding", "org.eclipse.jdt.core.dom.ITypeBinding" ]
import ca.mcgill.cs.swevo.jayfx.model.Category; import ca.mcgill.cs.swevo.jayfx.model.FlyweightElementFactory; import ca.mcgill.cs.swevo.jayfx.model.IElement; import org.eclipse.jdt.core.dom.IMethodBinding; import org.eclipse.jdt.core.dom.ITypeBinding;
import ca.mcgill.cs.swevo.jayfx.model.*; import org.eclipse.jdt.core.dom.*;
[ "ca.mcgill.cs", "org.eclipse.jdt" ]
ca.mcgill.cs; org.eclipse.jdt;
585,125
public static boolean isFullyInWater(Location player) { double touchedX = fixXAxis(player.getX()); // Yes, this doesn't make sense, but it's supposed to fix some false positives in water walk. // Think of it as 2 negatives = a positive :) if (!(new Location(player.getWorld(), touche...
static boolean function(Location player) { double touchedX = fixXAxis(player.getX()); if (!(new Location(player.getWorld(), touchedX, player.getY(), player.getBlockZ()).getBlock()).isLiquid() && !(new Location(player.getWorld(), touchedX, Math.round(player.getY()), player.getBlockZ()).getBlock()).isLiquid()) { return t...
/** * Determine whether a player is fully submerged in water * * @param player the player's location * @return true if the player is fully in the water */
Determine whether a player is fully submerged in water
isFullyInWater
{ "repo_name": "m1enkrafftman/AntiCheatPlus", "path": "src/main/java/net/dynamicdev/anticheat/util/Utilities.java", "license": "gpl-3.0", "size": 26825 }
[ "org.bukkit.Location" ]
import org.bukkit.Location;
import org.bukkit.*;
[ "org.bukkit" ]
org.bukkit;
935,477
public static <K, V> void initializeSpout(KafkaSpout<K, V> spout, Map<String, Object> topoConf, TopologyContext topoContextMock, SpoutOutputCollector collectorMock) throws Exception { when(topoContextMock.getThisTaskIndex()).thenReturn(0); when(topoContextMock.getComponentTasks(any())).thenR...
static <K, V> void function(KafkaSpout<K, V> spout, Map<String, Object> topoConf, TopologyContext topoContextMock, SpoutOutputCollector collectorMock) throws Exception { when(topoContextMock.getThisTaskIndex()).thenReturn(0); when(topoContextMock.getComponentTasks(any())).thenReturn(Collections.singletonList(0)); spout...
/** * Open and activate a KafkaSpout that acts as a single-task/executor spout. * * @param <K> Kafka key type * @param <V> Kafka value type * @param spout The spout to prepare * @param topoConf The topoConf * @param topoContextMock The TopologyContext mock * @param collectorMock ...
Open and activate a KafkaSpout that acts as a single-task/executor spout
initializeSpout
{ "repo_name": "kishorvpatil/incubator-storm", "path": "external/storm-kafka-client/src/test/java/org/apache/storm/kafka/spout/SingleTopicKafkaUnitSetupHelper.java", "license": "apache-2.0", "size": 3783 }
[ "java.util.Collections", "java.util.Map", "org.apache.storm.spout.SpoutOutputCollector", "org.apache.storm.task.TopologyContext", "org.mockito.Mockito" ]
import java.util.Collections; import java.util.Map; import org.apache.storm.spout.SpoutOutputCollector; import org.apache.storm.task.TopologyContext; import org.mockito.Mockito;
import java.util.*; import org.apache.storm.spout.*; import org.apache.storm.task.*; import org.mockito.*;
[ "java.util", "org.apache.storm", "org.mockito" ]
java.util; org.apache.storm; org.mockito;
445,448
public Info build() { // Fail early if there is no lipo context collector on the rule - otherwise we end up failing // in lipo optimization. Preconditions.checkState( // 'cc_inc_library' rules do not compile, and thus are not affected by LIPO. ruleContext.getRule().getRuleClass().equals("c...
Info function() { Preconditions.checkState( ruleContext.getRule().getRuleClass().equals(STR) ruleContext.getRule().isAttrDefined(STR, BuildType.LABEL)); if (checkDepsGenerateCpp) { for (LanguageDependentFragment dep : AnalysisUtils.getProviders(deps, LanguageDependentFragment.class)) { LanguageDependentFragment.Checker...
/** * Create the C++ compile and link actions, and the corresponding C++-related providers. */
Create the C++ compile and link actions, and the corresponding C++-related providers
build
{ "repo_name": "hhclam/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/cpp/CcLibraryHelper.java", "license": "apache-2.0", "size": 43692 }
[ "com.google.devtools.build.lib.actions.Artifact", "com.google.devtools.build.lib.analysis.AnalysisUtils", "com.google.devtools.build.lib.analysis.LanguageDependentFragment", "com.google.devtools.build.lib.analysis.OutputGroupProvider", "com.google.devtools.build.lib.analysis.Runfiles", "com.google.devtool...
import com.google.devtools.build.lib.actions.Artifact; import com.google.devtools.build.lib.analysis.AnalysisUtils; import com.google.devtools.build.lib.analysis.LanguageDependentFragment; import com.google.devtools.build.lib.analysis.OutputGroupProvider; import com.google.devtools.build.lib.analysis.Runfiles; import c...
import com.google.devtools.build.lib.actions.*; import com.google.devtools.build.lib.analysis.*; import com.google.devtools.build.lib.collect.nestedset.*; import com.google.devtools.build.lib.packages.*; import com.google.devtools.build.lib.util.*; import java.util.*;
[ "com.google.devtools", "java.util" ]
com.google.devtools; java.util;
1,657,444
public static void write(byte[] data, Writer output) throws IOException { write(data, output, Charset.defaultCharset()); }
static void function(byte[] data, Writer output) throws IOException { write(data, output, Charset.defaultCharset()); }
/** * Writes bytes from a <code>byte[]</code> to chars on a <code>Writer</code> * using the default character encoding of the platform. * <p/> * This method uses {@link String#String(byte[])}. * * @param data the byte array to write, do not modify during output, * ...
Writes bytes from a <code>byte[]</code> to chars on a <code>Writer</code> using the default character encoding of the platform. This method uses <code>String#String(byte[])</code>
write
{ "repo_name": "wzx54321/XinFramework", "path": "app/src/main/java/com/xin/framework/xinframwork/utils/common/io/IOUtils.java", "license": "apache-2.0", "size": 100603 }
[ "java.io.IOException", "java.io.Writer", "java.nio.charset.Charset" ]
import java.io.IOException; import java.io.Writer; import java.nio.charset.Charset;
import java.io.*; import java.nio.charset.*;
[ "java.io", "java.nio" ]
java.io; java.nio;
2,074,122
public void copyFrom(ProxyConfig other) { Assert.notNull(other, "Other ProxyConfig object must not be null"); this.proxyTargetClass = other.proxyTargetClass; this.optimize = other.optimize; this.exposeProxy = other.exposeProxy; this.frozen = other.frozen; this.opaque = other.opaque; }
void function(ProxyConfig other) { Assert.notNull(other, STR); this.proxyTargetClass = other.proxyTargetClass; this.optimize = other.optimize; this.exposeProxy = other.exposeProxy; this.frozen = other.frozen; this.opaque = other.opaque; }
/** * Copy configuration from the other config object. * @param other object to copy configuration from */
Copy configuration from the other config object
copyFrom
{ "repo_name": "spring-projects/spring-framework", "path": "spring-aop/src/main/java/org/springframework/aop/framework/ProxyConfig.java", "license": "apache-2.0", "size": 5478 }
[ "org.springframework.util.Assert" ]
import org.springframework.util.Assert;
import org.springframework.util.*;
[ "org.springframework.util" ]
org.springframework.util;
408,203
private void stop() { stopTimeout(); if (this.status != AccelListener.STOPPED) { this.sensorManager.unregisterListener(this); } this.setStatus(AccelListener.STOPPED); this.accuracy = SensorManager.SENSOR_STATUS_UNRELIABLE; }
void function() { stopTimeout(); if (this.status != AccelListener.STOPPED) { this.sensorManager.unregisterListener(this); } this.setStatus(AccelListener.STOPPED); this.accuracy = SensorManager.SENSOR_STATUS_UNRELIABLE; }
/** * Stop listening to acceleration sensor. */
Stop listening to acceleration sensor
stop
{ "repo_name": "infil00p/oscon2013-mobilespec", "path": "src/org/apache/cordova/core/AccelListener.java", "license": "apache-2.0", "size": 9733 }
[ "android.hardware.SensorManager" ]
import android.hardware.SensorManager;
import android.hardware.*;
[ "android.hardware" ]
android.hardware;
767,727
private void checkRouteToAccepteble(Cell source, Cell dest) throws ImposibleMoveException { int x1 = source.getX(); int y1 = source.getY(); int x2 = dest.getX(); int y2 = dest.getY(); int deltaX = Math.abs(x2 - x1); int deltaY = Math.abs(y2 - y1); if (deltaX != deltaY) { throw new ImposibleMoveExcep...
void function(Cell source, Cell dest) throws ImposibleMoveException { int x1 = source.getX(); int y1 = source.getY(); int x2 = dest.getX(); int y2 = dest.getY(); int deltaX = Math.abs(x2 - x1); int deltaY = Math.abs(y2 - y1); if (deltaX != deltaY) { throw new ImposibleMoveException(STR); } }
/** * Check Route. * @param source Cell of start * @param dest Cell of finish * @throws ImposibleMoveException if route is not acceptable. */
Check Route
checkRouteToAccepteble
{ "repo_name": "tgenman/dbondarev", "path": "chapter_002/src/main/java/ru/job4j/chess/Bishop.java", "license": "apache-2.0", "size": 1725 }
[ "ru.job4j.chess.exceptions.ImposibleMoveException" ]
import ru.job4j.chess.exceptions.ImposibleMoveException;
import ru.job4j.chess.exceptions.*;
[ "ru.job4j.chess" ]
ru.job4j.chess;
532,761
boolean isUnix() { // if the path represents a local path, there' no need to guess. if(!isRemote()) return File.pathSeparatorChar!=';'; // note that we can't use the usual File.pathSeparator and etc., as the OS of // the machine where this code runs and the O...
boolean isUnix() { if(!isRemote()) return File.pathSeparatorChar!=';'; if(remote.length()>3 && remote.charAt(1)==':' && remote.charAt(2)=='\\') return false; return remote.indexOf("\\")==-1; }
/** * Checks if the remote path is Unix. */
Checks if the remote path is Unix
isUnix
{ "repo_name": "dariver/jenkins", "path": "core/src/main/java/hudson/FilePath.java", "license": "mit", "size": 119940 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
2,179,920
public static Window getTopWindow() { return instance.topWindow; }
static Window function() { return instance.topWindow; }
/** * Returns a UI component by name. * @param altName the name of the component to be retrieved * @return a UI component by name */
Returns a UI component by name
getTopWindow
{ "repo_name": "specify/specify6", "path": "src/edu/ku/brc/ui/UIRegistry.java", "license": "gpl-2.0", "size": 98859 }
[ "java.awt.Window" ]
import java.awt.Window;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,424,948
public void decrementResourceCount(long accountId, ResourceType type, Long... delta);
void function(long accountId, ResourceType type, Long... delta);
/** * Decrements the resource count * * @param accountId * @param type * @param delta */
Decrements the resource count
decrementResourceCount
{ "repo_name": "mufaddalq/cloudstack-datera-driver", "path": "api/src/com/cloud/user/ResourceLimitService.java", "license": "apache-2.0", "size": 4746 }
[ "com.cloud.configuration.Resource" ]
import com.cloud.configuration.Resource;
import com.cloud.configuration.*;
[ "com.cloud.configuration" ]
com.cloud.configuration;
2,725,245
private int pickBucket(T key) { int range = getRange(key); if (range < 0) return -1; int rv = pickBucket(range); if (rv >= 0) { return rv; } _log.error("Key does not fit in any bucket?! WTF!\nKey : [" + DataHelper.toHexStr...
int function(T key) { int range = getRange(key); if (range < 0) return -1; int rv = pickBucket(range); if (rv >= 0) { return rv; } _log.error(STR + DataHelper.toHexString(key.getData()) + "]" + STR + _us + STR + DataHelper.toHexString(DataHelper.xor(_us.getData(), key.getData())) + "]", new Exception("WTF")); _log.erro...
/** * The bucket number (NOT the range number) that the xor of the key goes in * Caller must hold read lock * @return 0 to max-1 or -1 for us */
The bucket number (NOT the range number) that the xor of the key goes in Caller must hold read lock
pickBucket
{ "repo_name": "NoYouShutup/CryptMeme", "path": "CryptMeme/core/java/src/net/i2p/kademlia/KBucketSet.java", "license": "mit", "size": 27128 }
[ "net.i2p.data.DataHelper" ]
import net.i2p.data.DataHelper;
import net.i2p.data.*;
[ "net.i2p.data" ]
net.i2p.data;
640,296
@Test public void buildsCorrectCookie() throws Exception { final String name = "some-cookie-name-6"; final String value = "some-value-of-it-6"; MatcherAssert.assertThat( new CookieBuilder(new URI("http://google.com/6")) .name(name) .value(value...
void function() throws Exception { final String name = STR; final String value = STR; MatcherAssert.assertThat( new CookieBuilder(new URI(STRmaxAgeSTRdomainSTRgoogle.comSTRpathSTR/6STRnameSTRvalue", Matchers.equalTo(value)) ) ); }
/** * CookieBuilder can build a valid cookie. * @throws Exception If there is some problem inside */
CookieBuilder can build a valid cookie
buildsCorrectCookie
{ "repo_name": "krzyk/rexsl", "path": "src/test/java/com/rexsl/page/CookieBuilderTest.java", "license": "bsd-3-clause", "size": 5625 }
[ "org.hamcrest.MatcherAssert", "org.hamcrest.Matchers" ]
import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers;
import org.hamcrest.*;
[ "org.hamcrest" ]
org.hamcrest;
2,391,147
@Override public boolean copyMessageToIccEf(String callingPackage, int status, byte[] pdu, byte[] smsc) { //NOTE smsc not used in RUIM if (DBG) log("copyMessageToIccEf: status=" + status + " ==> " + "pdu=("+ Arrays.toString(pdu) + "), smsc=(" + Arrays.toString(sms...
boolean function(String callingPackage, int status, byte[] pdu, byte[] smsc) { if (DBG) log(STR + status + STR + "pdu=("+ Arrays.toString(pdu) + STR + Arrays.toString(smsc) +")"); enforceReceiveAndSend(STR); if (mAppOps.noteOp(AppOpsManager.OP_WRITE_ICC_SMS, Binder.getCallingUid(), callingPackage) != AppOpsManager.MODE...
/** * Copy a raw SMS PDU to the Icc. * * @param pdu the raw PDU to store * @param status message status (STATUS_ON_ICC_READ, STATUS_ON_ICC_UNREAD, * STATUS_ON_ICC_SENT, STATUS_ON_ICC_UNSENT) * @return success or not * */
Copy a raw SMS PDU to the Icc
copyMessageToIccEf
{ "repo_name": "indashnet/InDashNet.Open.UN2000", "path": "android/frameworks/opt/telephony/src/java/com/android/internal/telephony/IccSmsInterfaceManager.java", "license": "apache-2.0", "size": 31411 }
[ "android.app.AppOpsManager", "android.os.Binder", "android.os.Message", "java.util.Arrays" ]
import android.app.AppOpsManager; import android.os.Binder; import android.os.Message; import java.util.Arrays;
import android.app.*; import android.os.*; import java.util.*;
[ "android.app", "android.os", "java.util" ]
android.app; android.os; java.util;
1,559,582
public void normalize() { Node p = getFirstChild(); if (p != null) { p.normalize(); Node n = p.getNextSibling(); while (n != null) { if (p.getNodeType() == TEXT_NODE && n.getNodeType() == TEXT_NODE) { String ...
void function() { Node p = getFirstChild(); if (p != null) { p.normalize(); Node n = p.getNextSibling(); while (n != null) { if (p.getNodeType() == TEXT_NODE && n.getNodeType() == TEXT_NODE) { String s = p.getNodeValue() + n.getNodeValue(); AbstractText at = (AbstractText)p; at.setNodeValue(s); removeChild(n); n = p.ge...
/** * <b>DOM</b>: Implements {@link org.w3c.dom.Node#normalize()}. */
DOM: Implements <code>org.w3c.dom.Node#normalize()</code>
normalize
{ "repo_name": "apache/batik", "path": "batik-dom/src/main/java/org/apache/batik/dom/AbstractParentNode.java", "license": "apache-2.0", "size": 30795 }
[ "org.w3c.dom.Node" ]
import org.w3c.dom.Node;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
1,337,953
public void readPacketData(PacketBuffer p_148837_1_) throws IOException { this.field_148914_a = p_148837_1_.readUnsignedByte(); short var2 = p_148837_1_.readShort(); this.field_148913_b = new ItemStack[var2]; for (int var3 = 0; var3 < var2; ++var3) { this.fie...
void function(PacketBuffer p_148837_1_) throws IOException { this.field_148914_a = p_148837_1_.readUnsignedByte(); short var2 = p_148837_1_.readShort(); this.field_148913_b = new ItemStack[var2]; for (int var3 = 0; var3 < var2; ++var3) { this.field_148913_b[var3] = p_148837_1_.readItemStackFromBuffer(); } }
/** * Reads the raw packet data from the data stream. */
Reads the raw packet data from the data stream
readPacketData
{ "repo_name": "mviitanen/marsmod", "path": "mcp/src/minecraft_server/net/minecraft/network/play/server/S30PacketWindowItems.java", "license": "gpl-2.0", "size": 2187 }
[ "java.io.IOException", "net.minecraft.item.ItemStack", "net.minecraft.network.PacketBuffer" ]
import java.io.IOException; import net.minecraft.item.ItemStack; import net.minecraft.network.PacketBuffer;
import java.io.*; import net.minecraft.item.*; import net.minecraft.network.*;
[ "java.io", "net.minecraft.item", "net.minecraft.network" ]
java.io; net.minecraft.item; net.minecraft.network;
1,509,065
public static <V> CoGbkResult of(TupleTag<V> tag, List<V> data) { return CoGbkResult.empty().and(tag, data); }
static <V> CoGbkResult function(TupleTag<V> tag, List<V> data) { return CoGbkResult.empty().and(tag, data); }
/** * Returns a new CoGbkResult that contains just the given tag and given data. */
Returns a new CoGbkResult that contains just the given tag and given data
of
{ "repo_name": "tweise/incubator-beam", "path": "sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/join/CoGbkResult.java", "license": "apache-2.0", "size": 15015 }
[ "java.util.List", "org.apache.beam.sdk.values.TupleTag" ]
import java.util.List; import org.apache.beam.sdk.values.TupleTag;
import java.util.*; import org.apache.beam.sdk.values.*;
[ "java.util", "org.apache.beam" ]
java.util; org.apache.beam;
877,960
public void testSetDecimalFormatSymbolsAsNull(){ // Regression for HARMONY-1070 try { DecimalFormat format = (DecimalFormat)DecimalFormat.getInstance(); format.setDecimalFormatSymbols(null); ...
void function(){ try { DecimalFormat format = (DecimalFormat)DecimalFormat.getInstance(); format.setDecimalFormatSymbols(null); } catch (Exception e) { fail(STR + e); } }
/** * Test if setDecimalFormatSymbols method wont throw NullPointerException * when it is called with null parameter. */
Test if setDecimalFormatSymbols method wont throw NullPointerException when it is called with null parameter
testSetDecimalFormatSymbolsAsNull
{ "repo_name": "freeVM/freeVM", "path": "enhanced/archive/classlib/java6/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/DecimalFormatTest.java", "license": "apache-2.0", "size": 69330 }
[ "java.text.DecimalFormat" ]
import java.text.DecimalFormat;
import java.text.*;
[ "java.text" ]
java.text;
1,482,134
private String computeClassName(File file) { String absPath = file.getAbsolutePath(); String packageBase = absPath.substring(startPackageLength, absPath.length() - 6); String className; className = packageBase.replace(File.separatorChar, '.'); return className; }
String function(File file) { String absPath = file.getAbsolutePath(); String packageBase = absPath.substring(startPackageLength, absPath.length() - 6); String className; className = packageBase.replace(File.separatorChar, '.'); return className; }
/** * Given a file name, guess the fully qualified class name. * @param file class file * @return class name */
Given a file name, guess the fully qualified class name
computeClassName
{ "repo_name": "9fevrier/displaytag", "path": "displaytag/src/test/java/org/displaytag/test/TestAll.java", "license": "artistic-2.0", "size": 8748 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
474,494
@Override public AbstractUnit clone() { return new Shaman(); }
AbstractUnit function() { return new Shaman(); }
/** * Create new clone shaman. * * @return new clone */
Create new clone shaman
clone
{ "repo_name": "wolfdog007/aruzhev", "path": "chapter_002/src/main/java/ru/job4j/battlegame/units/orc/Shaman.java", "license": "apache-2.0", "size": 1945 }
[ "ru.job4j.battlegame.units.AbstractUnit" ]
import ru.job4j.battlegame.units.AbstractUnit;
import ru.job4j.battlegame.units.*;
[ "ru.job4j.battlegame" ]
ru.job4j.battlegame;
72,846
private void hideAllViews() { for (View view : views) { view.setVisibility(INVISIBLE); } }
void function() { for (View view : views) { view.setVisibility(INVISIBLE); } }
/** * Sets all views as Invisible */
Sets all views as Invisible
hideAllViews
{ "repo_name": "elementsinteractive/Android-FoldingLayout", "path": "app/src/main/java/nl/elements/flipanimation/FoldingLayout.java", "license": "bsd-3-clause", "size": 11635 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
2,573,728
public int help() throws IOException { return sendCommand(NNTPCommand.HELP); }
int function() throws IOException { return sendCommand(NNTPCommand.HELP); }
/*** * A convenience method to send the NNTP HELP command to the server, * receive the reply, and return the reply code. * <p> * @return The reply code received from the server. * @exception NNTPConnectionClosedException * If the NNTP server prematurely closes the connection as a resu...
A convenience method to send the NNTP HELP command to the server, receive the reply, and return the reply code.
help
{ "repo_name": "ductt-neo/commons-net-ssh", "path": "src/main/java/org/apache/commons/net/nntp/NNTP.java", "license": "apache-2.0", "size": 43219 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,476,239
public byte[] getBytes(int columnIndex) throws SQLException { return getBytes(columnIndex, false); }
byte[] function(int columnIndex) throws SQLException { return getBytes(columnIndex, false); }
/** * Get the value of a column in the current row as a Java byte array. * * <p> * <b>Be warned</b> If the blob is huge, then you may run out of memory. * </p> * * @param columnIndex * the first column is 1, the second is 2, ... * * @return the column valu...
Get the value of a column in the current row as a Java byte array. Be warned If the blob is huge, then you may run out of memory.
getBytes
{ "repo_name": "martingh15/TPJava", "path": "TPJavaNotebook/mysql-connector-java-5.1.39/src/com/mysql/jdbc/ResultSetImpl.java", "license": "mpl-2.0", "size": 288777 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
695,164
public void showNotification(String title, String message) { Notification.show(title, message, Type.TRAY_NOTIFICATION); }
void function(String title, String message) { Notification.show(title, message, Type.TRAY_NOTIFICATION); }
/** * Shows a tray notification with the given title and message. * @param title of the notification * @param message for the notification */
Shows a tray notification with the given title and message
showNotification
{ "repo_name": "unicesi/songstock", "path": "songstock.web.vaadin/src/songstock/web/SongStockUI.java", "license": "gpl-3.0", "size": 6723 }
[ "com.vaadin.ui.Notification" ]
import com.vaadin.ui.Notification;
import com.vaadin.ui.*;
[ "com.vaadin.ui" ]
com.vaadin.ui;
1,857,662
public static void i(String tag, String formatString, Throwable tr, Object... args) { if (logger != null && isLoggingEnabled(tag, INFO)) { try { logger.i(tag, String.format(Locale.ENGLISH, formatString, args, tr)); } catch (Exception e) { logger.i(tag,...
static void function(String tag, String formatString, Throwable tr, Object... args) { if (logger != null && isLoggingEnabled(tag, INFO)) { try { logger.i(tag, String.format(Locale.ENGLISH, formatString, args, tr)); } catch (Exception e) { logger.i(tag, String.format(Locale.ENGLISH, STR, formatString), e); } } }
/** * Send a INFO message and log the exception. * @param tag Used to identify the source of a log message. It usually identifies * the class or activity where the log call occurs. * @param formatString The string you would like logged plus format specifiers. * @param tr An exception to...
Send a INFO message and log the exception
i
{ "repo_name": "couchbase/couchbase-lite-java-core", "path": "src/main/java/com/couchbase/lite/util/Log.java", "license": "apache-2.0", "size": 17533 }
[ "java.util.Locale" ]
import java.util.Locale;
import java.util.*;
[ "java.util" ]
java.util;
2,247,571
@Override @SuppressWarnings("boxing") protected void execute() throws ProcessException { @SuppressWarnings("unchecked") Predicate<Object> pCondition = (Predicate<Object>) checkParameter(BRANCH_CONDITION); RelationType<?> rBranchParam = getParameter(BRANCH_PARAM); String sBranchTarget = getParame...
@SuppressWarnings(STR) void function() throws ProcessException { @SuppressWarnings(STR) Predicate<Object> pCondition = (Predicate<Object>) checkParameter(BRANCH_CONDITION); RelationType<?> rBranchParam = getParameter(BRANCH_PARAM); String sBranchTarget = getParameter(BRANCH_TARGET); String sNextStep; if (pCondition != ...
/*************************************** * Checks the defined branching condition and if the condition is fulfilled, * modifies the superclass' reference to the next step accordingly. * * @throws ProcessException If the step configuration is invalid */
Checks the defined branching condition and if the condition is fulfilled, modifies the superclass' reference to the next step accordingly
execute
{ "repo_name": "esoco/esoco-business", "path": "src/main/java/de/esoco/process/step/BranchStep.java", "license": "apache-2.0", "size": 5392 }
[ "de.esoco.lib.expression.Predicate", "de.esoco.lib.expression.Predicates", "de.esoco.process.ProcessException", "org.obrel.core.RelationType" ]
import de.esoco.lib.expression.Predicate; import de.esoco.lib.expression.Predicates; import de.esoco.process.ProcessException; import org.obrel.core.RelationType;
import de.esoco.lib.expression.*; import de.esoco.process.*; import org.obrel.core.*;
[ "de.esoco.lib", "de.esoco.process", "org.obrel.core" ]
de.esoco.lib; de.esoco.process; org.obrel.core;
1,077,739
private static double log(double x) { double y = 0.0; if (x < 1E-300) { y = -690.7755; } else { y = Math.log(x); } return y; } static class MultiClassObjectiveFunction implements DifferentiableMultivariateFunction { doub...
static double function(double x) { double y = 0.0; if (x < 1E-300) { y = -690.7755; } else { y = Math.log(x); } return y; } static class MultiClassObjectiveFunction implements DifferentiableMultivariateFunction { double[][] x; int[] y; int k; double lambda; List<FTask> ftasks = null; List<GTask> gtasks = null; MultiCla...
/** * Returns natural log without underflow. */
Returns natural log without underflow
log
{ "repo_name": "arehart13/smile", "path": "core/src/main/java/smile/classification/LogisticRegression.java", "license": "apache-2.0", "size": 28094 }
[ "java.util.ArrayList", "java.util.List", "java.util.concurrent.Callable" ]
import java.util.ArrayList; import java.util.List; import java.util.concurrent.Callable;
import java.util.*; import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,532,453
try { DataSource dataSource = countryPersistence.getDataSource(); Connection connection = dataSource.getConnection(); Statement statement = connection.createStatement(); ResultSet resultSet = statement.executeQuery( "select id, name from country"); while (resultSet.next()) { if (_log.isInfo...
try { DataSource dataSource = countryPersistence.getDataSource(); Connection connection = dataSource.getConnection(); Statement statement = connection.createStatement(); ResultSet resultSet = statement.executeQuery( STR); while (resultSet.next()) { if (_log.isInfoEnabled()) { _log.info(STR); } if (_log.isInfoEnabled())...
/** * NOTE FOR DEVELOPERS: * * Never reference this class directly. Use <code>com.liferay.blade.samples.dspservicebuilder.service.CountryLocalService</code> via injection or a <code>org.osgi.util.tracker.ServiceTracker</code> or use <code>com.liferay.blade.samples.dspservicebuilder.service.CountryLocalServiceUtil...
Never reference this class directly. Use <code>com.liferay.blade.samples.dspservicebuilder.service.CountryLocalService</code> via injection or a <code>org.osgi.util.tracker.ServiceTracker</code> or use <code>com.liferay.blade.samples.dspservicebuilder.service.CountryLocalServiceUtil</code>
useDSP
{ "repo_name": "gamerson/liferay-blade-samples", "path": "maven/apps/service-builder/dsp/dsp-service/src/main/java/com/liferay/blade/samples/dspservicebuilder/service/impl/CountryLocalServiceImpl.java", "license": "apache-2.0", "size": 3142 }
[ "com.liferay.portal.kernel.log.Log", "com.liferay.portal.kernel.log.LogFactoryUtil", "java.sql.Connection", "java.sql.ResultSet", "java.sql.SQLException", "java.sql.Statement", "javax.sql.DataSource" ]
import com.liferay.portal.kernel.log.Log; import com.liferay.portal.kernel.log.LogFactoryUtil; import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import javax.sql.DataSource;
import com.liferay.portal.kernel.log.*; import java.sql.*; import javax.sql.*;
[ "com.liferay.portal", "java.sql", "javax.sql" ]
com.liferay.portal; java.sql; javax.sql;
1,823,779
public Vector3 getHitPointAt(int i) { if (selectedEntity == null) return null; return selectedEntity.hitPoints.get(i); }
Vector3 function(int i) { if (selectedEntity == null) return null; return selectedEntity.hitPoints.get(i); }
/** * Get hit point of given index * @param i * @return hit point for given hit points index */
Get hit point of given index
getHitPointAt
{ "repo_name": "andreasdr/tdme", "path": "src/net/drewke/tdme/engine/physics/CollisionResponse.java", "license": "mit", "size": 9977 }
[ "net.drewke.tdme.math.Vector3" ]
import net.drewke.tdme.math.Vector3;
import net.drewke.tdme.math.*;
[ "net.drewke.tdme" ]
net.drewke.tdme;
719,698
public LoadBalancerOutboundRuleProtocol protocol() { return this.protocol; }
LoadBalancerOutboundRuleProtocol function() { return this.protocol; }
/** * Get the protocol for the outbound rule in load balancer. Possible values include: 'Tcp', 'Udp', 'All'. * * @return the protocol value */
Get the protocol for the outbound rule in load balancer. Possible values include: 'Tcp', 'Udp', 'All'
protocol
{ "repo_name": "navalev/azure-sdk-for-java", "path": "sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/implementation/OutboundRuleInner.java", "license": "mit", "size": 8381 }
[ "com.microsoft.azure.management.network.v2019_04_01.LoadBalancerOutboundRuleProtocol" ]
import com.microsoft.azure.management.network.v2019_04_01.LoadBalancerOutboundRuleProtocol;
import com.microsoft.azure.management.network.v2019_04_01.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
1,379,757
@Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); }
void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); }
/** * Handles the HTTP <code>POST</code> method. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */
Handles the HTTP <code>POST</code> method
doPost
{ "repo_name": "inkimar-nrm/mediaserver", "path": "web/src/main/java/se/nrm/bio/mediaserver/rs/demo/DemoPost.java", "license": "gpl-3.0", "size": 2543 }
[ "java.io.IOException", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse" ]
import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
import java.io.*; import javax.servlet.*; import javax.servlet.http.*;
[ "java.io", "javax.servlet" ]
java.io; javax.servlet;
2,370,274
public Class getPropertyTypeForSetter(Object object, String name) { Class type = object.getClass(); if (object instanceof Class) { type = getClassPropertyTypeForSetter((Class) object, name); } else if (object instanceof Map) { Map map = (Map) object; Object value = map.get(name); ...
Class function(Object object, String name) { Class type = object.getClass(); if (object instanceof Class) { type = getClassPropertyTypeForSetter((Class) object, name); } else if (object instanceof Map) { Map map = (Map) object; Object value = map.get(name); if (value == null) { type = Object.class; } else { type = valu...
/** * Returns the class that the setter expects to receive as a parameter when * setting a property value. * * @param object The bean to check * @param name The name of the property * @return The type of the property */
Returns the class that the setter expects to receive as a parameter when setting a property value
getPropertyTypeForSetter
{ "repo_name": "cavajtennis/ibatis", "path": "java/mapper/mapper2/src/com/ibatis/common/beans/ComplexBeanProbe.java", "license": "apache-2.0", "size": 11596 }
[ "java.util.Map", "java.util.StringTokenizer" ]
import java.util.Map; import java.util.StringTokenizer;
import java.util.*;
[ "java.util" ]
java.util;
205,244
@Nullable public String getTrackedBranch(@NotNull String branch) { String trackedName = null; for (GitRepository repository : myRepositories) { GitRemoteBranch tracked = getTrackedBranch(repository, branch); if (tracked == null) { return null; } if (trackedName == null) { ...
String function(@NotNull String branch) { String trackedName = null; for (GitRepository repository : myRepositories) { GitRemoteBranch tracked = getTrackedBranch(repository, branch); if (tracked == null) { return null; } if (trackedName == null) { trackedName = tracked.getNameForLocalOperations(); } else if (!trackedNa...
/** * If there is a common remote branch which is commonly tracked by the given branch in all repositories, * returns the name of this remote branch. Otherwise returns null. <br/> * For one repository just returns the tracked branch or null if there is no tracked branch. */
If there is a common remote branch which is commonly tracked by the given branch in all repositories, returns the name of this remote branch. Otherwise returns null. For one repository just returns the tracked branch or null if there is no tracked branch
getTrackedBranch
{ "repo_name": "hurricup/intellij-community", "path": "plugins/git4idea/src/git4idea/ui/branch/GitMultiRootBranchConfig.java", "license": "apache-2.0", "size": 4165 }
[ "org.jetbrains.annotations.NotNull" ]
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.*;
[ "org.jetbrains.annotations" ]
org.jetbrains.annotations;
256,291