method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
public Map<String,FieldsConservedDomainModel> queryEntityConservedDomainModel(List<Tuple3<String, String, String>> qry, List<String> fields) throws IOException, JsonClientException { List<Object> args = new ArrayList<Object>(); args.add(qry); args.add(fields); TypeReference<List<Map<...
Map<String,FieldsConservedDomainModel> function(List<Tuple3<String, String, String>> qry, List<String> fields) throws IOException, JsonClientException { List<Object> args = new ArrayList<Object>(); args.add(qry); args.add(fields); TypeReference<List<Map<String,FieldsConservedDomainModel>>> retType = new TypeReference<L...
/** * <p>Original spec-file function name: query_entity_ConservedDomainModel</p> * <pre> * </pre> * @param qry instance of list of tuple of size 3: String, String, String * @param fields instance of list of String * @return instance of mapping from String to type {@link us.kbase....
Original spec-file function name: query_entity_ConservedDomainModel <code> </code>
queryEntityConservedDomainModel
{ "repo_name": "kbase/trees", "path": "src/us/kbase/cdmientityapi/CDMIEntityAPIClient.java", "license": "mit", "size": 869221 }
[ "com.fasterxml.jackson.core.type.TypeReference", "java.io.IOException", "java.util.ArrayList", "java.util.List", "java.util.Map", "us.kbase.common.service.JsonClientException", "us.kbase.common.service.Tuple3" ]
import com.fasterxml.jackson.core.type.TypeReference; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Map; import us.kbase.common.service.JsonClientException; import us.kbase.common.service.Tuple3;
import com.fasterxml.jackson.core.type.*; import java.io.*; import java.util.*; import us.kbase.common.service.*;
[ "com.fasterxml.jackson", "java.io", "java.util", "us.kbase.common" ]
com.fasterxml.jackson; java.io; java.util; us.kbase.common;
1,967,385
public List<Usuario> choices0RemoveUsuario(){ return filtroUS(container.allMatches(new QueryDefault<Usuario>(Usuario.class, "ListarUsuarios")),true); }
List<Usuario> function(){ return filtroUS(container.allMatches(new QueryDefault<Usuario>(Usuario.class, STR)),true); }
/** * Lista que devuelve los Sectores ha eliminar. * @return */
Lista que devuelve los Sectores ha eliminar
choices0RemoveUsuario
{ "repo_name": "ProyectoTypes/inventariohardware", "path": "dom/src/main/java/dom/usuario/UsuarioRepositorio.java", "license": "gpl-2.0", "size": 6969 }
[ "java.util.List", "org.apache.isis.applib.query.QueryDefault" ]
import java.util.List; import org.apache.isis.applib.query.QueryDefault;
import java.util.*; import org.apache.isis.applib.query.*;
[ "java.util", "org.apache.isis" ]
java.util; org.apache.isis;
266,218
private String getOpenIDMessageMode(ParameterList paramList, HttpServletResponse response, HttpServletRequest request) throws IOException { String mode = null; if (paramList == null) { if (log.isDebugEnabled()) { log.debug("Invalid ...
String function(ParameterList paramList, HttpServletResponse response, HttpServletRequest request) throws IOException { String mode = null; if (paramList == null) { if (log.isDebugEnabled()) { log.debug(STR + request.getQueryString()); } directResponse(response, getErrorResponseText(STR)); return null; } mode = paramLi...
/** * Returns the mode field of the OpenID message. * * @param paramList * @param response * @param request * @return * @throws IOException */
Returns the mode field of the OpenID message
getOpenIDMessageMode
{ "repo_name": "pulasthi7/carbon-identity", "path": "components/openid/org.wso2.carbon.identity.provider/src/main/java/org/wso2/carbon/identity/provider/openid/handlers/OpenIDHandler.java", "license": "apache-2.0", "size": 32997 }
[ "java.io.IOException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse", "org.openid4java.message.ParameterList", "org.wso2.carbon.identity.base.IdentityConstants" ]
import java.io.IOException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.openid4java.message.ParameterList; import org.wso2.carbon.identity.base.IdentityConstants;
import java.io.*; import javax.servlet.http.*; import org.openid4java.message.*; import org.wso2.carbon.identity.base.*;
[ "java.io", "javax.servlet", "org.openid4java.message", "org.wso2.carbon" ]
java.io; javax.servlet; org.openid4java.message; org.wso2.carbon;
2,023,108
public void mouseMoved(MouseEvent e){ location=new Vector2(e.getX(),e.getY()); }
void function(MouseEvent e){ location=new Vector2(e.getX(),e.getY()); }
/** * sets the location of the mouse * @param e MouseEvent of being moved */
sets the location of the mouse
mouseMoved
{ "repo_name": "Nekel-Seyew/sweeney-game-development-environment-2", "path": "SGDE2/src/Utilities/Mouse.java", "license": "gpl-2.0", "size": 7129 }
[ "java.awt.event.MouseEvent" ]
import java.awt.event.MouseEvent;
import java.awt.event.*;
[ "java.awt" ]
java.awt;
2,012,175
Response then( BiConsumer<UndefinedObject, Throwable> listener ); @RequiredArgsConstructor class UndefinedObject { final Object object;
Response then( BiConsumer<UndefinedObject, Throwable> listener ); class UndefinedObject { final Object object;
/** * Attach a listener that will be notified when the response is available. * * @param listener * @return */
Attach a listener that will be notified when the response is available
then
{ "repo_name": "Skullabs/kikaha", "path": "kikaha-modules/kikaha-uworkers/source/kikaha/uworkers/api/Response.java", "license": "apache-2.0", "size": 969 }
[ "java.util.function.BiConsumer" ]
import java.util.function.BiConsumer;
import java.util.function.*;
[ "java.util" ]
java.util;
200,235
public void addNewScript(JsAst ast) { if (!addNewSourceAst(ast)) { return; } Node emptyScript = new Node(Token.SCRIPT); InputId inputId = ast.getInputId(); emptyScript.setInputId(inputId); emptyScript.setStaticSourceFile( SourceFile.fromCode(inputId.getIdName(), "")); proces...
void function(JsAst ast) { if (!addNewSourceAst(ast)) { return; } Node emptyScript = new Node(Token.SCRIPT); InputId inputId = ast.getInputId(); emptyScript.setInputId(inputId); emptyScript.setStaticSourceFile( SourceFile.fromCode(inputId.getIdName(), "")); processNewScript(ast, emptyScript); }
/** * Adds a new Script AST to the compile state. If a script for the same file * already exists the script will not be added, instead a call to * #replaceScript should be used. * * @param ast the ast of the new file */
Adds a new Script AST to the compile state. If a script for the same file already exists the script will not be added, instead a call to #replaceScript should be used
addNewScript
{ "repo_name": "nicupavel/google-closure-compiler", "path": "src/com/google/javascript/jscomp/Compiler.java", "license": "apache-2.0", "size": 78825 }
[ "com.google.javascript.rhino.InputId", "com.google.javascript.rhino.Node", "com.google.javascript.rhino.Token" ]
import com.google.javascript.rhino.InputId; import com.google.javascript.rhino.Node; import com.google.javascript.rhino.Token;
import com.google.javascript.rhino.*;
[ "com.google.javascript" ]
com.google.javascript;
2,850,153
private void startGame() throws LWJGLException, IOException { this.gameSettings = new GameSettings(this, this.mcDataDir); this.defaultResourcePacks.add(this.mcDefaultResourcePack); this.startTimerHackThread(); if (this.gameSettings.overrideHeight > 0 && this.gameSettings.overrid...
void function() throws LWJGLException, IOException { this.gameSettings = new GameSettings(this, this.mcDataDir); this.defaultResourcePacks.add(this.mcDefaultResourcePack); this.startTimerHackThread(); if (this.gameSettings.overrideHeight > 0 && this.gameSettings.overrideWidth > 0) { this.displayWidth = this.gameSetting...
/** * Starts the game: initializes the canvas, the title, the settings, etcetera. */
Starts the game: initializes the canvas, the title, the settings, etcetera
startGame
{ "repo_name": "dogjaw2233/tiu-s-mod", "path": "build/tmp/recompileMc/sources/net/minecraft/client/Minecraft.java", "license": "lgpl-2.1", "size": 129685 }
[ "java.io.File", "java.io.IOException", "net.minecraft.client.audio.MusicTicker", "net.minecraft.client.audio.SoundHandler", "net.minecraft.client.gui.FontRenderer", "net.minecraft.client.renderer.OpenGlHelper", "net.minecraft.client.renderer.texture.TextureManager", "net.minecraft.client.resources.Lan...
import java.io.File; import java.io.IOException; import net.minecraft.client.audio.MusicTicker; import net.minecraft.client.audio.SoundHandler; import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.renderer.OpenGlHelper; import net.minecraft.client.renderer.texture.TextureManager; import net.minecra...
import java.io.*; import net.minecraft.client.audio.*; import net.minecraft.client.gui.*; import net.minecraft.client.renderer.*; import net.minecraft.client.renderer.texture.*; import net.minecraft.client.resources.*; import net.minecraft.client.settings.*; import net.minecraft.client.shader.*; import net.minecraft.ut...
[ "java.io", "net.minecraft.client", "net.minecraft.util", "net.minecraft.world", "org.lwjgl" ]
java.io; net.minecraft.client; net.minecraft.util; net.minecraft.world; org.lwjgl;
994,170
@ServiceMethod(returns = ReturnType.SINGLE) public Mono<Void> deleteLinkedResourcesAsync( String userId, String todoTaskListId, String todoTaskId, String linkedResourceId) { final String ifMatch = null; return deleteLinkedResourcesWithResponseAsync(userId, todoTaskListId, todoTaskId, lin...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Void> function( String userId, String todoTaskListId, String todoTaskId, String linkedResourceId) { final String ifMatch = null; return deleteLinkedResourcesWithResponseAsync(userId, todoTaskListId, todoTaskId, linkedResourceId, ifMatch) .flatMap((Response<Void> res) -> ...
/** * Delete navigation property linkedResources for users. * * @param userId key: id of user. * @param todoTaskListId key: id of todoTaskList. * @param todoTaskId key: id of todoTask. * @param linkedResourceId key: id of linkedResource. * @throws IllegalArgumentException thrown if pa...
Delete navigation property linkedResources for users
deleteLinkedResourcesAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/implementation/UsersTodoListsTasksClientImpl.java", "license": "mit", "size": 117318 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*;
[ "com.azure.core" ]
com.azure.core;
252,155
@Test(timeout = SWIFT_BULK_IO_TEST_TIMEOUT) public void testOverwritePartitionedFile() throws Throwable { final Path path = new Path("/test/testOverwritePartitionedFile"); final int len1 = 8192; final byte[] src1 = SwiftTestUtils.dataset(len1, 'A', 'Z'); FSDataOutputStream out = fs.create(path, ...
@Test(timeout = SWIFT_BULK_IO_TEST_TIMEOUT) void function() throws Throwable { final Path path = new Path(STR); final int len1 = 8192; final byte[] src1 = SwiftTestUtils.dataset(len1, 'A', 'Z'); FSDataOutputStream out = fs.create(path, false, getBufferSize(), (short) 1, 1024); out.write(src1, 0, len1); out.close(); lon...
/** * Test that when a partitioned file is overwritten by a smaller one, * all the old partitioned files go away * @throws Throwable */
Test that when a partitioned file is overwritten by a smaller one, all the old partitioned files go away
testOverwritePartitionedFile
{ "repo_name": "openstack/sahara-extra", "path": "hadoop-swiftfs/src/test/java/org/apache/hadoop/fs/swift/TestSwiftFileSystemPartitionedUploads.java", "license": "apache-2.0", "size": 19578 }
[ "org.apache.hadoop.fs.FSDataOutputStream", "org.apache.hadoop.fs.FileStatus", "org.apache.hadoop.fs.Path", "org.apache.hadoop.fs.swift.util.SwiftTestUtils", "org.junit.Test" ]
import org.apache.hadoop.fs.FSDataOutputStream; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.swift.util.SwiftTestUtils; import org.junit.Test;
import org.apache.hadoop.fs.*; import org.apache.hadoop.fs.swift.util.*; import org.junit.*;
[ "org.apache.hadoop", "org.junit" ]
org.apache.hadoop; org.junit;
2,371,916
@Test public void testScopeInInitOptionsShouldBeConsideredByLoginUrl() { JSObjectBuilder initOptions = defaultArguments() .loginRequiredOnLoad() // phone is optional client scope .add("scope", "openid profile email phone"); try { test...
void function() { JSObjectBuilder initOptions = defaultArguments() .loginRequiredOnLoad() .add("scope", STR); try { testExecutor.init(initOptions); throw new RuntimeException(STR); } catch (WebDriverException ex) { } testExecutor.loginForm(testUser, this::assertOnTestAppUrl) .init(initOptions, this::assertAdapterIsLogg...
/** * Test for scope handling via {@code initOptions}: <pre>{@code * Keycloak keycloak = new Keycloak(); keycloak.init({.... scope: "profile email phone"}) * }</pre> * See KEYCLOAK-14412 */
Test for scope handling via initOptions: <code>Keycloak keycloak = new Keycloak(); keycloak.init({.... scope: "profile email phone") }</code> See KEYCLOAK-14412
testScopeInInitOptionsShouldBeConsideredByLoginUrl
{ "repo_name": "keycloak/keycloak", "path": "testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/javascript/JavascriptAdapterTest.java", "license": "apache-2.0", "size": 42437 }
[ "org.keycloak.testsuite.util.javascript.JSObjectBuilder", "org.openqa.selenium.WebDriverException" ]
import org.keycloak.testsuite.util.javascript.JSObjectBuilder; import org.openqa.selenium.WebDriverException;
import org.keycloak.testsuite.util.javascript.*; import org.openqa.selenium.*;
[ "org.keycloak.testsuite", "org.openqa.selenium" ]
org.keycloak.testsuite; org.openqa.selenium;
358,894
@FloatRange(from = 0.0, to = 1.0) public float getProgress() { return mProgress; }
@FloatRange(from = 0.0, to = 1.0) float function() { return mProgress; }
/** * Returns the current progress of the arrow. */
Returns the current progress of the arrow
getProgress
{ "repo_name": "aosp-mirror/platform_frameworks_support", "path": "v7/appcompat/src/main/java/androidx/appcompat/graphics/drawable/DrawerArrowDrawable.java", "license": "apache-2.0", "size": 14647 }
[ "androidx.annotation.FloatRange" ]
import androidx.annotation.FloatRange;
import androidx.annotation.*;
[ "androidx.annotation" ]
androidx.annotation;
2,084,007
public void afterRegionCreate(SystemMemberRegionEvent event) { adminDS.handleRegionCreateEvent(event); }
void function(SystemMemberRegionEvent event) { adminDS.handleRegionCreateEvent(event); }
/** * See SystemMemberCacheListener#afterRegionCreate(SystemMemberCacheEvent) */
See SystemMemberCacheListener#afterRegionCreate(SystemMemberCacheEvent)
afterRegionCreate
{ "repo_name": "robertgeiger/incubator-geode", "path": "gemfire-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AdminDistributedSystemJmxImpl.java", "license": "apache-2.0", "size": 85628 }
[ "com.gemstone.gemfire.admin.SystemMemberRegionEvent" ]
import com.gemstone.gemfire.admin.SystemMemberRegionEvent;
import com.gemstone.gemfire.admin.*;
[ "com.gemstone.gemfire" ]
com.gemstone.gemfire;
2,298,294
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { buttonGroupTriggerType = new javax.swing.ButtonGroup(); buttonGroupActionType = new javax.swing.ButtonGroup(); jScrollPaneABRu...
@SuppressWarnings(STR) void function() { buttonGroupTriggerType = new javax.swing.ButtonGroup(); buttonGroupActionType = new javax.swing.ButtonGroup(); jScrollPaneABRules = new javax.swing.JScrollPane(); jTableABRules = new javax.swing.JTable(); jLabel1 = new javax.swing.JLabel(); jButtonRemoveABRule = new javax.swing....
/** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */
This method is called from within the constructor to initialize the form. regenerated by the Form Editor
initComponents
{ "repo_name": "mytechia/UNIDA", "path": "unida_basicgui/src/main/java/com/hi3project/unida/tools/librarybasicgui/dialog/ManageAutonomousBehaviourRulesDialog.java", "license": "agpl-3.0", "size": 16400 }
[ "javax.swing.JLabel", "javax.swing.JTable" ]
import javax.swing.JLabel; import javax.swing.JTable;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
2,266,052
public void addModule(ItemTaskModule m){ //Add to modules list modules.add(m); //Apply any task specific properties to this entity. m.applyProperties(this); //Make new ItemStack to be added to the inventory of the entity ItemStack newStack = new ItemStack(m, 1, 0); //Get current list of module...
void function(ItemTaskModule m){ modules.add(m); m.applyProperties(this); ItemStack newStack = new ItemStack(m, 1, 0); ItemStack[] current = expansions.get(TempInventoryType.module); List<ItemStack> temp = new ArrayList<ItemStack>(Arrays.asList(current)); temp.add(newStack); for(int i = 0; i < temp.size(); i++){ if (te...
/** * Used to add a module to the appropriate collections in the entity. * Added to the collection that simply lists the modules in the entity. * Also added to the collection with the inventories for the numerous expansions(batteries, modules, chest, etc.) * * @param m Module to be added. */
Used to add a module to the appropriate collections in the entity. Added to the collection that simply lists the modules in the entity. Also added to the collection with the inventories for the numerous expansions(batteries, modules, chest, etc.)
addModule
{ "repo_name": "sfschouten/dronemod", "path": "src/main/java/sfschouten/dronemod/entity/EntityDrone.java", "license": "gpl-3.0", "size": 13652 }
[ "java.util.ArrayList", "java.util.Arrays", "java.util.List", "net.minecraft.item.ItemStack" ]
import java.util.ArrayList; import java.util.Arrays; import java.util.List; import net.minecraft.item.ItemStack;
import java.util.*; import net.minecraft.item.*;
[ "java.util", "net.minecraft.item" ]
java.util; net.minecraft.item;
566,552
public boolean isTrendDeactivated(final StaplerRequest request) { return createUserConfiguration(request).isDeactivated(); }
boolean function(final StaplerRequest request) { return createUserConfiguration(request).isDeactivated(); }
/** * Returns whether the trend graph is deactivated. * * @param request * the request to get the cookie from * @return <code>true</code> if the trend is deactivated */
Returns whether the trend graph is deactivated
isTrendDeactivated
{ "repo_name": "recena/analysis-core-plugin", "path": "src/main/java/hudson/plugins/analysis/core/AbstractProjectAction.java", "license": "mit", "size": 15161 }
[ "org.kohsuke.stapler.StaplerRequest" ]
import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.*;
[ "org.kohsuke.stapler" ]
org.kohsuke.stapler;
1,630,446
private void assertReplay(ReplayMechanism replay, TestData data) { replay.connect(); int count = 0; Assert.assertEquals(data.getSeparator(), replay.getSeparator()); long start = System.currentTimeMillis(); String expectedPayload = data.getExpectedPayload(); do {...
void function(ReplayMechanism replay, TestData data) { replay.connect(); int count = 0; Assert.assertEquals(data.getSeparator(), replay.getSeparator()); long start = System.currentTimeMillis(); String expectedPayload = data.getExpectedPayload(); do { String payload = replay.getNext(true); if (null != payload) { if (nul...
/** * Asserts the data. * * @param data the test data */
Asserts the data
assertReplay
{ "repo_name": "QualiMaster/Infrastructure", "path": "DataManagementLayer/src/test/java/tests/eu/qualimaster/dataManagement/ReplayMechanismTests.java", "license": "apache-2.0", "size": 10002 }
[ "eu.qualimaster.dataManagement.sources.ReplayMechanism", "org.junit.Assert" ]
import eu.qualimaster.dataManagement.sources.ReplayMechanism; import org.junit.Assert;
import eu.qualimaster.*; import org.junit.*;
[ "eu.qualimaster", "org.junit" ]
eu.qualimaster; org.junit;
1,337,384
public ModbusUDPTransport getModbusTransport() { return m_ModbusTransport; }//getModbusTransport
ModbusUDPTransport function() { return m_ModbusTransport; }
/** * Returns the <tt>ModbusTransport</tt> associated with this * <tt>TCPMasterConnection</tt>. * * @return the connection's <tt>ModbusTransport</tt>. */
Returns the ModbusTransport associated with this TCPMasterConnection
getModbusTransport
{ "repo_name": "sfeilmeier/org.openhab.binding.fems", "path": "src/main/java/net/wimpi/modbus/net/UDPSlaveTerminal.java", "license": "epl-1.0", "size": 8488 }
[ "net.wimpi.modbus.io.ModbusUDPTransport" ]
import net.wimpi.modbus.io.ModbusUDPTransport;
import net.wimpi.modbus.io.*;
[ "net.wimpi.modbus" ]
net.wimpi.modbus;
2,768,828
public static void runDatanodeDaemon(DataNode dn) throws IOException { if (dn != null) { //register datanode dn.register(); dn.dataNodeThread = new Thread(dn, dnThreadName); dn.dataNodeThread.setDaemon(true); // needed for JUnit testing dn.dataNodeThread.start(); } }
static void function(DataNode dn) throws IOException { if (dn != null) { dn.register(); dn.dataNodeThread = new Thread(dn, dnThreadName); dn.dataNodeThread.setDaemon(true); dn.dataNodeThread.start(); } }
/** Start a single datanode daemon and wait for it to finish. * If this thread is specifically interrupted, it will stop waiting. */
Start a single datanode daemon and wait for it to finish. If this thread is specifically interrupted, it will stop waiting
runDatanodeDaemon
{ "repo_name": "sbyoun/i-mapreduce", "path": "src/hdfs/org/apache/hadoop/hdfs/server/datanode/DataNode.java", "license": "apache-2.0", "size": 57854 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,899,777
public MultiMatchQueryBuilder fuzziness(Object fuzziness) { this.fuzziness = Fuzziness.build(fuzziness); return this; }
MultiMatchQueryBuilder function(Object fuzziness) { this.fuzziness = Fuzziness.build(fuzziness); return this; }
/** * Sets the fuzziness used when evaluated to a fuzzy query type. Defaults to "AUTO". */
Sets the fuzziness used when evaluated to a fuzzy query type. Defaults to "AUTO"
fuzziness
{ "repo_name": "achow/elasticsearch", "path": "core/src/main/java/org/elasticsearch/index/query/MultiMatchQueryBuilder.java", "license": "apache-2.0", "size": 12384 }
[ "org.elasticsearch.common.unit.Fuzziness" ]
import org.elasticsearch.common.unit.Fuzziness;
import org.elasticsearch.common.unit.*;
[ "org.elasticsearch.common" ]
org.elasticsearch.common;
697,511
public static void executeOutOfHeavyProcessLater(@NotNull Runnable command, int delayMs) { HeavyProcessLatch.INSTANCE.executeOutOfHeavyProcess(() -> JobScheduler.getScheduler().schedule(() -> { if (HeavyProcessLatch.INSTANCE.isRunning()) { executeOutOfHeavyProcessLater(command, delayMs); } ...
static void function(@NotNull Runnable command, int delayMs) { HeavyProcessLatch.INSTANCE.executeOutOfHeavyProcess(() -> JobScheduler.getScheduler().schedule(() -> { if (HeavyProcessLatch.INSTANCE.isRunning()) { executeOutOfHeavyProcessLater(command, delayMs); } else { command.run(); } }, delayMs, TimeUnit.MILLISECONDS...
/** * Starts a task out of heavy activity after a delay. * * @param command a task to start * @param delayMs delay in milliseconds to wait after a heavy activity is finished */
Starts a task out of heavy activity after a delay
executeOutOfHeavyProcessLater
{ "repo_name": "mdanielwork/intellij-community", "path": "platform/vcs-log/impl/src/com/intellij/vcs/log/impl/HeavyAwareExecutor.java", "license": "apache-2.0", "size": 9125 }
[ "com.intellij.concurrency.JobScheduler", "com.intellij.ide.PowerSaveMode", "com.intellij.openapi.Disposable", "com.intellij.openapi.progress.ProgressIndicator", "com.intellij.openapi.project.Project", "com.intellij.util.io.storage.HeavyProcessLatch", "java.util.concurrent.ScheduledFuture", "java.util....
import com.intellij.concurrency.JobScheduler; import com.intellij.ide.PowerSaveMode; import com.intellij.openapi.Disposable; import com.intellij.openapi.progress.ProgressIndicator; import com.intellij.openapi.project.Project; import com.intellij.util.io.storage.HeavyProcessLatch; import java.util.concurrent.ScheduledFu...
import com.intellij.concurrency.*; import com.intellij.ide.*; import com.intellij.openapi.*; import com.intellij.openapi.progress.*; import com.intellij.openapi.project.*; import com.intellij.util.io.storage.*; import java.util.concurrent.*; import org.jetbrains.annotations.*;
[ "com.intellij.concurrency", "com.intellij.ide", "com.intellij.openapi", "com.intellij.util", "java.util", "org.jetbrains.annotations" ]
com.intellij.concurrency; com.intellij.ide; com.intellij.openapi; com.intellij.util; java.util; org.jetbrains.annotations;
1,386,608
boolean WriteFile(HANDLE hFile, byte[] lpBuffer, int nNumberOfBytesToWrite, IntByReference lpNumberOfBytesWritten, WinBase.OVERLAPPED lpOverlapped);
boolean WriteFile(HANDLE hFile, byte[] lpBuffer, int nNumberOfBytesToWrite, IntByReference lpNumberOfBytesWritten, WinBase.OVERLAPPED lpOverlapped);
/** * Writes data to the specified file or input/output (I/O) device. * @param hFile * A handle to the file or I/O device (for example, a file, file stream, physical disk, volume, * console buffer, tape drive, socket, communications resource, mailslot, or pipe). * @param lpBuffer * A ...
Writes data to the specified file or input/output (I/O) device
WriteFile
{ "repo_name": "tulskiy/jna", "path": "contrib/platform/src/com/sun/jna/platform/win32/Kernel32.java", "license": "lgpl-2.1", "size": 69582 }
[ "com.sun.jna.ptr.IntByReference" ]
import com.sun.jna.ptr.IntByReference;
import com.sun.jna.ptr.*;
[ "com.sun.jna" ]
com.sun.jna;
827,119
String getTelephoneNumber(String identifier) throws SharkKBException;
String getTelephoneNumber(String identifier) throws SharkKBException;
/**Returns a telephone number. * This number must be specified with an identifying string so the function * knows which number should be returned. * * @param identifier The identifying string. * @return The telephone number. * @throws SharkKBException This message is thrown when no SharkKB...
Returns a telephone number. This number must be specified with an identifying string so the function knows which number should be returned
getTelephoneNumber
{ "repo_name": "blackicetee/SharkProfile", "path": "src/Profile/Profile.java", "license": "gpl-3.0", "size": 7665 }
[ "net.sharkfw.knowledgeBase.SharkKBException" ]
import net.sharkfw.knowledgeBase.SharkKBException;
import net.sharkfw.*;
[ "net.sharkfw" ]
net.sharkfw;
319,731
public void runMetricsTest() throws Throwable { // create a stream with 5 topics final String topic = "metricsStream"; createTestTopic(topic, 5, 1); final Tuple1<Throwable> error = new Tuple1<>(null); // start job writing & reading data. final StreamExecutionEnvironment env1 = StreamExecutionEnvironme...
void function() throws Throwable { final String topic = STR; createTestTopic(topic, 5, 1); final Tuple1<Throwable> error = new Tuple1<>(null); final StreamExecutionEnvironment env1 = StreamExecutionEnvironment.getExecutionEnvironment(); env1.setParallelism(1); env1.getConfig().setRestartStrategy(RestartStrategies.noRes...
/** * Test metrics reporting for consumer. * * @throws Exception */
Test metrics reporting for consumer
runMetricsTest
{ "repo_name": "tzulitai/flink", "path": "flink-connectors/flink-connector-kafka-base/src/test/java/org/apache/flink/streaming/connectors/kafka/KafkaConsumerTestBase.java", "license": "apache-2.0", "size": 85965 }
[ "org.apache.flink.api.common.restartstrategy.RestartStrategies", "org.apache.flink.api.common.serialization.TypeInformationSerializationSchema", "org.apache.flink.api.common.typeinfo.TypeHint", "org.apache.flink.api.common.typeinfo.TypeInformation", "org.apache.flink.api.java.tuple.Tuple1", "org.apache.fl...
import org.apache.flink.api.common.restartstrategy.RestartStrategies; import org.apache.flink.api.common.serialization.TypeInformationSerializationSchema; import org.apache.flink.api.common.typeinfo.TypeHint; import org.apache.flink.api.common.typeinfo.TypeInformation; import org.apache.flink.api.java.tuple.Tuple1; imp...
import org.apache.flink.api.common.restartstrategy.*; import org.apache.flink.api.common.serialization.*; import org.apache.flink.api.common.typeinfo.*; import org.apache.flink.api.java.tuple.*; import org.apache.flink.streaming.api.environment.*;
[ "org.apache.flink" ]
org.apache.flink;
2,077,246
public static ITPPQuest getNextPhaseClass(TPP_Phase ph) { return getPhases().get(getPhaseIndex(getNextPhase(ph))); }
static ITPPQuest function(TPP_Phase ph) { return getPhases().get(getPhaseIndex(getNextPhase(ph))); }
/** * return next instance of quest phases classes from list * @param ph * @return next phase class */
return next instance of quest phases classes from list
getNextPhaseClass
{ "repo_name": "nhnb/stendhal", "path": "src/games/stendhal/server/maps/quests/ThePiedPiper.java", "license": "gpl-2.0", "size": 8626 }
[ "games.stendhal.server.maps.quests.piedpiper.ITPPQuest" ]
import games.stendhal.server.maps.quests.piedpiper.ITPPQuest;
import games.stendhal.server.maps.quests.piedpiper.*;
[ "games.stendhal.server" ]
games.stendhal.server;
2,190,853
@Function(name = "then", arity = 2) public static Object then(ExecutionContext cx, Object thisValue, Object onFulfilled, Object onRejected) { if (!IsPromise(thisValue)) { throw newTypeError(cx, Messages.Key.IncompatibleThis, "Promise.prototype.then", ...
@Function(name = "then", arity = 2) static Object function(ExecutionContext cx, Object thisValue, Object onFulfilled, Object onRejected) { if (!IsPromise(thisValue)) { throw newTypeError(cx, Messages.Key.IncompatibleThis, STR, Type.of(thisValue).toString()); } PromiseObject promise = (PromiseObject) thisValue; Construc...
/** * 25.4.5.3 Promise.prototype.then ( onFulfilled , onRejected ) * * @param cx * the execution context * @param thisValue * the function this-value * @param onFulfilled * the onFulfilled handler * @param...
25.4.5.3 Promise.prototype.then ( onFulfilled , onRejected )
then
{ "repo_name": "anba/es6draft", "path": "src/main/java/com/github/anba/es6draft/runtime/objects/promise/PromisePrototype.java", "license": "mit", "size": 13635 }
[ "com.github.anba.es6draft.runtime.AbstractOperations", "com.github.anba.es6draft.runtime.ExecutionContext", "com.github.anba.es6draft.runtime.internal.Errors", "com.github.anba.es6draft.runtime.internal.Messages", "com.github.anba.es6draft.runtime.internal.Properties", "com.github.anba.es6draft.runtime.ob...
import com.github.anba.es6draft.runtime.AbstractOperations; import com.github.anba.es6draft.runtime.ExecutionContext; import com.github.anba.es6draft.runtime.internal.Errors; import com.github.anba.es6draft.runtime.internal.Messages; import com.github.anba.es6draft.runtime.internal.Properties; import com.github.anba.es...
import com.github.anba.es6draft.runtime.*; import com.github.anba.es6draft.runtime.internal.*; import com.github.anba.es6draft.runtime.objects.promise.*; import com.github.anba.es6draft.runtime.types.*;
[ "com.github.anba" ]
com.github.anba;
2,014,467
@Override public PropostaAbilita approvaPropostaAbilita(Long id, String descrizione) throws ProposteException { GregorianCalendar calendar = new GregorianCalendar(); if(id==null) { throw new ProposteException(ProposteException.Causa.ALCUNIPARAMETRINULLIOVUOTI); } PropostaAbilita propostaAbilita = this....
PropostaAbilita function(Long id, String descrizione) throws ProposteException { GregorianCalendar calendar = new GregorianCalendar(); if(id==null) { throw new ProposteException(ProposteException.Causa.ALCUNIPARAMETRINULLIOVUOTI); } PropostaAbilita propostaAbilita = this.getPropostaAbilitaById(id); if(propostaAbilita!=...
/** * Metodo per approvare una proposta di abilita'. Tale metodo permette solamente di specificare la descrizione della nuova abilita', ma * non il nome. Infatti, il nome dell'abilita' corrispondera' automaticamente all'attributo "abilitaProposta" di PropostaAbilita. * @param id = Long che rappresenta l'id univoc...
Metodo per approvare una proposta di abilita'. Tale metodo permette solamente di specificare la descrizione della nuova abilita', ma non il nome. Infatti, il nome dell'abilita' corrispondera' automaticamente all'attributo "abilitaProposta" di PropostaAbilita
approvaPropostaAbilita
{ "repo_name": "Ks89/SWIMv2", "path": "SWIMv2_EJB/ejbModule/sessionBeans/GestioneProposte.java", "license": "apache-2.0", "size": 12789 }
[ "java.util.GregorianCalendar" ]
import java.util.GregorianCalendar;
import java.util.*;
[ "java.util" ]
java.util;
1,557,397
private static String getFormattedName(User user) { List<String> parts = new ArrayList<>(); if (user.getTitle() != null) { parts.add(user.getTitle()); } if (user.getFirstName() != null) { parts.add(user.getFirstName()); } if (user.getMiddleNames() != null) { parts.add(user.getMiddleNames(...
static String function(User user) { List<String> parts = new ArrayList<>(); if (user.getTitle() != null) { parts.add(user.getTitle()); } if (user.getFirstName() != null) { parts.add(user.getFirstName()); } if (user.getMiddleNames() != null) { parts.add(user.getMiddleNames()); } if (user.getLastName() != null) { parts.a...
/** * Formats a MolgenisUser's name. * * @return String containing the user's first name, middle names and last name. */
Formats a MolgenisUser's name
getFormattedName
{ "repo_name": "Mark-de-Haan/molgenis", "path": "molgenis-core-ui/src/main/java/org/molgenis/core/ui/controller/FeedbackController.java", "license": "lgpl-3.0", "size": 7344 }
[ "java.util.ArrayList", "java.util.List", "org.molgenis.data.security.auth.User", "org.springframework.util.StringUtils" ]
import java.util.ArrayList; import java.util.List; import org.molgenis.data.security.auth.User; import org.springframework.util.StringUtils;
import java.util.*; import org.molgenis.data.security.auth.*; import org.springframework.util.*;
[ "java.util", "org.molgenis.data", "org.springframework.util" ]
java.util; org.molgenis.data; org.springframework.util;
921,777
protected void initFromFile( ByteSequence bytes, boolean wide ) throws IOException { setIndex(bytes.readUnsignedShort()); length = 3; }
void function( ByteSequence bytes, boolean wide ) throws IOException { setIndex(bytes.readUnsignedShort()); length = 3; }
/** * Read needed data (i.e., index) from file. * @param bytes input stream * @param wide wide prefix? */
Read needed data (i.e., index) from file
initFromFile
{ "repo_name": "treejames/JMD", "path": "src/org/apache/bcel/generic/CPInstruction.java", "license": "mit", "size": 3890 }
[ "java.io.IOException", "org.apache.bcel.util.ByteSequence" ]
import java.io.IOException; import org.apache.bcel.util.ByteSequence;
import java.io.*; import org.apache.bcel.util.*;
[ "java.io", "org.apache.bcel" ]
java.io; org.apache.bcel;
144,475
public SimpleSelector getSimpleSelector() { return simpleSelector; }
SimpleSelector function() { return simpleSelector; }
/** * <b>SAC</b>: Implements {@link * org.w3c.css.sac.ConditionalSelector#getSimpleSelector()}. */
SAC: Implements <code>org.w3c.css.sac.ConditionalSelector#getSimpleSelector()</code>
getSimpleSelector
{ "repo_name": "adufilie/flex-sdk", "path": "modules/thirdparty/batik/sources/org/apache/flex/forks/batik/css/engine/sac/CSSConditionalSelector.java", "license": "apache-2.0", "size": 3789 }
[ "org.w3c.css.sac.SimpleSelector" ]
import org.w3c.css.sac.SimpleSelector;
import org.w3c.css.sac.*;
[ "org.w3c.css" ]
org.w3c.css;
1,550,950
public static ArrayList<String> getUsersFoundArray() { if(usersFoundArray == null) { usersFoundArray = new ArrayList<String>(); } return usersFoundArray; } //following adapter private static FollowingAdapter followingAdapter = null; private static ArrayList<Stri...
static ArrayList<String> function() { if(usersFoundArray == null) { usersFoundArray = new ArrayList<String>(); } return usersFoundArray; } private static FollowingAdapter followingAdapter = null; private static ArrayList<String> followingArray = new ArrayList<String>();
/** * Gets users found array. * * @return the users found array */
Gets users found array
getUsersFoundArray
{ "repo_name": "CMPUT301W17T11/FeelTrip", "path": "app/src/main/java/com/example/henzoshimada/feeltrip/FeelTripApplication.java", "license": "mit", "size": 12856 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
2,120,041
public void testIsolationLevel() throws Exception { if (versionMeetsMinimum(4, 0)) { String[] isoLevelNames = new String[] { "Connection.TRANSACTION_NONE", "Connection.TRANSACTION_READ_COMMITTED", "Connection.TRANSACTION_READ_UNCOMMITTED", "Connection.TRANSACTION_REPEATABLE_R...
void function() throws Exception { if (versionMeetsMinimum(4, 0)) { String[] isoLevelNames = new String[] { STR, STR, STR, STR, STR }; int[] isolationLevels = new int[] { Connection.TRANSACTION_NONE, Connection.TRANSACTION_READ_COMMITTED, Connection.TRANSACTION_READ_UNCOMMITTED, Connection.TRANSACTION_REPEATABLE_READ, ...
/** * Tests isolation level functionality * * @throws Exception * if an error occurs */
Tests isolation level functionality
testIsolationLevel
{ "repo_name": "slockhart/sql-app", "path": "mysql-connector-java-5.1.34/src/testsuite/simple/ConnectionTest.java", "license": "gpl-2.0", "size": 74127 }
[ "java.sql.Connection", "java.sql.DatabaseMetaData" ]
import java.sql.Connection; import java.sql.DatabaseMetaData;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,656,963
public Declaration getMember(String name, List<Type> signature, boolean ellipsis) { return getMember(name, signature, ellipsis, false); }
Declaration function(String name, List<Type> signature, boolean ellipsis) { return getMember(name, signature, ellipsis, false); }
/** * Search only this scope, including members inherited * by the scope, without considering containing scopes * or imports. We're not looking for un-shared direct * members, but return them anyway, to let the caller * produce a nicer error. */
Search only this scope, including members inherited by the scope, without considering containing scopes or imports. We're not looking for un-shared direct members, but return them anyway, to let the caller produce a nicer error
getMember
{ "repo_name": "ceylon/ceylon-model", "path": "src/com/redhat/ceylon/model/typechecker/model/Element.java", "license": "apache-2.0", "size": 7782 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
913,530
public static String hmacSHA1(String msg, String key) { try { return digestHmacToHex("HmacSHA1", msg, key.getBytes("UTF-8")); } catch (NoSuchAlgorithmException | UnsupportedEncodingException | InvalidKeyException ex) { Logger.getLogger(DigestUtil.class).error(ex.getMessag...
static String function(String msg, String key) { try { return digestHmacToHex(STR, msg, key.getBytes("UTF-8")); } catch (NoSuchAlgorithmException UnsupportedEncodingException InvalidKeyException ex) { Logger.getLogger(DigestUtil.class).error(ex.getMessage()); } return null; }
/** * Devuelve la firma sha1 en formato String hexadecimal * @param msg mensaje * @param key clave privada * @return firma en formato String hexadecimal */
Devuelve la firma sha1 en formato String hexadecimal
hmacSHA1
{ "repo_name": "jencisopy/JavaBeanStack", "path": "commons/src/main/java/org/javabeanstack/crypto/DigestUtil.java", "license": "lgpl-3.0", "size": 11798 }
[ "java.io.UnsupportedEncodingException", "java.security.InvalidKeyException", "java.security.NoSuchAlgorithmException", "org.apache.log4j.Logger" ]
import java.io.UnsupportedEncodingException; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; import org.apache.log4j.Logger;
import java.io.*; import java.security.*; import org.apache.log4j.*;
[ "java.io", "java.security", "org.apache.log4j" ]
java.io; java.security; org.apache.log4j;
1,035,251
@Override public Trie reduce(Reduce by) { List<Trie> h = new ArrayList<Trie>(); for (Trie trie : tries) h.add(trie.reduce(by)); MultiTrie2 m = new MultiTrie2(forward); m.tries = h; return m; }
Trie function(Reduce by) { List<Trie> h = new ArrayList<Trie>(); for (Trie trie : tries) h.add(trie.reduce(by)); MultiTrie2 m = new MultiTrie2(forward); m.tries = h; return m; }
/** * Remove empty rows from the given Trie and return the newly reduced Trie. * * @param by the Trie to reduce * @return the newly reduced Trie */
Remove empty rows from the given Trie and return the newly reduced Trie
reduce
{ "repo_name": "fnp/pylucene", "path": "lucene-java-3.5.0/lucene/contrib/analyzers/stempel/src/java/org/egothor/stemmer/MultiTrie2.java", "license": "apache-2.0", "size": 10514 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,418,313
public void testCreateFromImageRGB() throws IOException { PDDocument document = new PDDocument(); BufferedImage image = ImageIO.read(JPEGFactoryTest.class.getResourceAsStream("jpeg.jpg")); assertEquals(3, image.getColorModel().getNumComponents()); PDImageXObject ximage = JPEGFact...
void function() throws IOException { PDDocument document = new PDDocument(); BufferedImage image = ImageIO.read(JPEGFactoryTest.class.getResourceAsStream(STR)); assertEquals(3, image.getColorModel().getNumComponents()); PDImageXObject ximage = JPEGFactory.createFromImage(document, image); validate(ximage, 8, 344, 287, ...
/** * Tests RGB JPEGFactory#createFromImage(PDDocument document, BufferedImage * image) with color JPEG image */
Tests RGB JPEGFactory#createFromImage(PDDocument document, BufferedImage image) with color JPEG image
testCreateFromImageRGB
{ "repo_name": "joansmith/pdfbox", "path": "pdfbox/src/test/java/org/apache/pdfbox/pdmodel/graphics/image/JPEGFactoryTest.java", "license": "apache-2.0", "size": 9159 }
[ "java.awt.image.BufferedImage", "java.io.IOException", "javax.imageio.ImageIO", "org.apache.pdfbox.pdmodel.PDDocument", "org.apache.pdfbox.pdmodel.graphics.color.PDDeviceRGB", "org.apache.pdfbox.pdmodel.graphics.image.ValidateXImage" ]
import java.awt.image.BufferedImage; import java.io.IOException; import javax.imageio.ImageIO; import org.apache.pdfbox.pdmodel.PDDocument; import org.apache.pdfbox.pdmodel.graphics.color.PDDeviceRGB; import org.apache.pdfbox.pdmodel.graphics.image.ValidateXImage;
import java.awt.image.*; import java.io.*; import javax.imageio.*; import org.apache.pdfbox.pdmodel.*; import org.apache.pdfbox.pdmodel.graphics.color.*; import org.apache.pdfbox.pdmodel.graphics.image.*;
[ "java.awt", "java.io", "javax.imageio", "org.apache.pdfbox" ]
java.awt; java.io; javax.imageio; org.apache.pdfbox;
2,434,048
public ServiceCall<Void> putValidAsync(ReadonlyObj complexBody, final ServiceCallback<Void> serviceCallback) { return ServiceCall.fromResponse(putValidWithServiceResponseAsync(complexBody), serviceCallback); }
ServiceCall<Void> function(ReadonlyObj complexBody, final ServiceCallback<Void> serviceCallback) { return ServiceCall.fromResponse(putValidWithServiceResponseAsync(complexBody), serviceCallback); }
/** * Put complex types that have readonly properties. * * @param complexBody the ReadonlyObj value * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */
Put complex types that have readonly properties
putValidAsync
{ "repo_name": "matthchr/autorest", "path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/bodycomplex/implementation/ReadonlypropertysImpl.java", "license": "mit", "size": 7797 }
[ "com.microsoft.rest.ServiceCall", "com.microsoft.rest.ServiceCallback" ]
import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
717,396
private Font getDefaultParagraphFont() { if (this.defaultParagraphFont == null) { this.defaultParagraphFont = new Font(Font.HELVETICA, 12, Font.BOLD); } return this.defaultParagraphFont; }
Font function() { if (this.defaultParagraphFont == null) { this.defaultParagraphFont = new Font(Font.HELVETICA, 12, Font.BOLD); } return this.defaultParagraphFont; }
/** * Method getDefaultParagraphFont. * @return Font */
Method getDefaultParagraphFont
getDefaultParagraphFont
{ "repo_name": "idega/platform2", "path": "src/se/idega/idegaweb/commune/school/business/SchoolChoiceBusinessBean.java", "license": "gpl-3.0", "size": 100610 }
[ "com.lowagie.text.Font" ]
import com.lowagie.text.Font;
import com.lowagie.text.*;
[ "com.lowagie.text" ]
com.lowagie.text;
1,439,532
public com.iucn.whp.dbservice.model.whp_sites_inscription_criteria updatewhp_sites_inscription_criteria( com.iucn.whp.dbservice.model.whp_sites_inscription_criteria whp_sites_inscription_criteria) throws com.liferay.portal.kernel.exception.SystemException;
com.iucn.whp.dbservice.model.whp_sites_inscription_criteria function( com.iucn.whp.dbservice.model.whp_sites_inscription_criteria whp_sites_inscription_criteria) throws com.liferay.portal.kernel.exception.SystemException;
/** * Updates the whp_sites_inscription_criteria in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. * * @param whp_sites_inscription_criteria the whp_sites_inscription_criteria * @return the whp_sites_inscription_criteria that was updated * @throws SystemException i...
Updates the whp_sites_inscription_criteria in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners
updatewhp_sites_inscription_criteria
{ "repo_name": "iucn-whp/world-heritage-outlook", "path": "portlets/iucn-dbservice-portlet/docroot/WEB-INF/service/com/iucn/whp/dbservice/service/whp_sites_inscription_criteriaLocalService.java", "license": "gpl-2.0", "size": 12660 }
[ "com.liferay.portal.kernel.exception.SystemException" ]
import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.exception.*;
[ "com.liferay.portal" ]
com.liferay.portal;
1,949,300
public static int getAllocationByteCount(Bitmap bitmap) { return IMPL.getAllocationByteCount(bitmap); }
static int function(Bitmap bitmap) { return IMPL.getAllocationByteCount(bitmap); }
/** * Returns the size of the allocated memory used to store this bitmap's pixels in a backwards * compatible way. * * @param bitmap the bitmap in which to return it's allocation size * @return the allocation size in bytes */
Returns the size of the allocated memory used to store this bitmap's pixels in a backwards compatible way
getAllocationByteCount
{ "repo_name": "BruceHurrican/studydemo", "path": "libs_src/v4src/java/android/support/v4/graphics/BitmapCompat.java", "license": "apache-2.0", "size": 3522 }
[ "android.graphics.Bitmap" ]
import android.graphics.Bitmap;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
505,128
private void activateSkill(Skill skill) { caster.getAvatar().stopAnim(); switch (skill.getAvatarAnimType()) { case MELEE: Log.addSystem("melee anim"); caster.getAvatar().meleeAnim(false); break; case RANGE: Log.addSystem("range anim"); caster.getAvatar().ran...
void function(Skill skill) { caster.getAvatar().stopAnim(); switch (skill.getAvatarAnimType()) { case MELEE: Log.addSystem(STR); caster.getAvatar().meleeAnim(false); break; case RANGE: Log.addSystem(STR); caster.getAvatar().rangeAnim(false); break; case CAST: caster.getAvatar().castAnim(false); break; default: Log.addS...
/** * Activates specified skill * * @param skill Game skill */
Activates specified skill
activateSkill
{ "repo_name": "Isangeles/Senlin", "path": "src/main/java/pl/isangeles/senlin/core/character/SkillCaster.java", "license": "gpl-2.0", "size": 4337 }
[ "pl.isangeles.senlin.cli.Log", "pl.isangeles.senlin.core.skill.Skill", "pl.isangeles.senlin.util.Settings" ]
import pl.isangeles.senlin.cli.Log; import pl.isangeles.senlin.core.skill.Skill; import pl.isangeles.senlin.util.Settings;
import pl.isangeles.senlin.cli.*; import pl.isangeles.senlin.core.skill.*; import pl.isangeles.senlin.util.*;
[ "pl.isangeles.senlin" ]
pl.isangeles.senlin;
23,372
private void preemptTasks(Collection<JobInProgress> jobs, TaskType type, int maxToPreempt) { if (maxToPreempt <= 0) { return; } Set<TaskInProgress> tips = new HashSet<TaskInProgress>(); Map<JobInProgress, Integer> tasksCanBePreempted = new HashMap<JobInProgress,...
void function(Collection<JobInProgress> jobs, TaskType type, int maxToPreempt) { if (maxToPreempt <= 0) { return; } Set<TaskInProgress> tips = new HashSet<TaskInProgress>(); Map<JobInProgress, Integer> tasksCanBePreempted = new HashMap<JobInProgress, Integer>(); for (JobInProgress job : jobs) { if (!canBePreempted(job)...
/** * Preempt up to maxToPreempt tasks of the given type. * Selects the tasks so as to preempt the least recently launched one first, * thus minimizing wasted compute time. */
Preempt up to maxToPreempt tasks of the given type. Selects the tasks so as to preempt the least recently launched one first, thus minimizing wasted compute time
preemptTasks
{ "repo_name": "jchen123/hadoop-20-warehouse-fix", "path": "src/contrib/fairscheduler/src/java/org/apache/hadoop/mapred/FairScheduler.java", "license": "apache-2.0", "size": 76317 }
[ "java.util.ArrayList", "java.util.Collection", "java.util.HashMap", "java.util.HashSet", "java.util.List", "java.util.Map", "java.util.Set", "org.apache.hadoop.mapreduce.TaskType" ]
import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import org.apache.hadoop.mapreduce.TaskType;
import java.util.*; import org.apache.hadoop.mapreduce.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
881,581
public List<String> getAllPublicData() throws ApplicationException { List<String> publicData = new ArrayList<String>(); try { String query = "select a.protection_group_name protection_group_name from csm_protection_group a, csm_role b, csm_user_group_role_pg c, csm_group d " + "where a.protection_group_i...
List<String> function() throws ApplicationException { List<String> publicData = new ArrayList<String>(); try { String query = STR + STR + STR + AccessibilityBean.CSM_PUBLIC_GROUP + STR + AccessibilityBean.CSM_READ_ROLE + "'"; String[] columns = new String[] { STR }; Object[] columnTypes = new Object[] { Hibernate.STRIN...
/** * Return a list of data (csm protected_group_name) marked public in the * database * * @return * @throws Exception */
Return a list of data (csm protected_group_name) marked public in the database
getAllPublicData
{ "repo_name": "NCIP/cananolab", "path": "software/cananolab-webapp/src/gov/nih/nci/cananolab/system/applicationservice/impl/CaNanoLabApplicationServiceImpl.java", "license": "bsd-3-clause", "size": 6431 }
[ "gov.nih.nci.cananolab.dto.common.AccessibilityBean", "gov.nih.nci.system.applicationservice.ApplicationException", "java.util.ArrayList", "java.util.List", "org.hibernate.Hibernate" ]
import gov.nih.nci.cananolab.dto.common.AccessibilityBean; import gov.nih.nci.system.applicationservice.ApplicationException; import java.util.ArrayList; import java.util.List; import org.hibernate.Hibernate;
import gov.nih.nci.cananolab.dto.common.*; import gov.nih.nci.system.applicationservice.*; import java.util.*; import org.hibernate.*;
[ "gov.nih.nci", "java.util", "org.hibernate" ]
gov.nih.nci; java.util; org.hibernate;
526,057
@Override public void detachFromLayerColorMap() { final Layer layer = getLayer(); if (null != layer) { layer.detachShapeFromColorMap(this); } } /** * Serializes this shape as a {@link JSONObject}
void function() { final Layer layer = getLayer(); if (null != layer) { layer.detachShapeFromColorMap(this); } } /** * Serializes this shape as a {@link JSONObject}
/** * Detaches this Shape from the Layers Color Map */
Detaches this Shape from the Layers Color Map
detachFromLayerColorMap
{ "repo_name": "Josephblt/lienzo-core", "path": "src/main/java/com/ait/lienzo/client/core/shape/Shape.java", "license": "apache-2.0", "size": 43293 }
[ "com.google.gwt.json.client.JSONObject" ]
import com.google.gwt.json.client.JSONObject;
import com.google.gwt.json.client.*;
[ "com.google.gwt" ]
com.google.gwt;
540,066
@Override public final void sendRedirect(String location) throws IOException { doSaveContext(); super.sendRedirect(location); }
final void function(String location) throws IOException { doSaveContext(); super.sendRedirect(location); }
/** * Makes sure the context is stored before calling the * superclass <code>sendRedirect()</code> */
Makes sure the context is stored before calling the superclass <code>sendRedirect()</code>
sendRedirect
{ "repo_name": "dsyer/spring-security", "path": "web/src/main/java/org/springframework/security/web/context/SaveContextOnUpdateOrErrorResponseWrapper.java", "license": "apache-2.0", "size": 3724 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
883,893
public static String getBinaryName(Elements elementUtils, TypeElement type) throws IOException { String packageName = getPackageName(elementUtils, type); String qualifiedName = type.getQualifiedName().toString(); if (packageName.length() > 0) { return packageName + '.' + qualifiedName.substring(pack...
static String function(Elements elementUtils, TypeElement type) throws IOException { String packageName = getPackageName(elementUtils, type); String qualifiedName = type.getQualifiedName().toString(); if (packageName.length() > 0) { return packageName + '.' + qualifiedName.substring(packageName.length() + 1).replace('....
/** * Get the qualified name of a class. Also respects innner classes * * @param elementUtils Elements * @param type TypeElement * @return The qualified name of the class represented by the passed type element * @throws IOException */
Get the qualified name of a class. Also respects innner classes
getBinaryName
{ "repo_name": "sockeqwe/ParcelablePlease", "path": "processor/src/main/java/com/hannesdorfmann/parcelableplease/processor/util/TypeUtils.java", "license": "apache-2.0", "size": 2060 }
[ "java.io.IOException", "javax.lang.model.element.TypeElement", "javax.lang.model.util.Elements" ]
import java.io.IOException; import javax.lang.model.element.TypeElement; import javax.lang.model.util.Elements;
import java.io.*; import javax.lang.model.element.*; import javax.lang.model.util.*;
[ "java.io", "javax.lang" ]
java.io; javax.lang;
380,029
public void updateNextSeed(GMSSRandom gmssRandom) { gmssRandom.nextSeed(seedNext); }
void function(GMSSRandom gmssRandom) { gmssRandom.nextSeed(seedNext); }
/** * updates the nextSeed of this treehash instance one step needed for the * schedulng of the seeds * * @param gmssRandom the prng used for the seeds */
updates the nextSeed of this treehash instance one step needed for the schedulng of the seeds
updateNextSeed
{ "repo_name": "Skywalker-11/spongycastle", "path": "core/src/main/java/org/spongycastle/pqc/crypto/gmss/Treehash.java", "license": "mit", "size": 14649 }
[ "org.spongycastle.pqc.crypto.gmss.util.GMSSRandom" ]
import org.spongycastle.pqc.crypto.gmss.util.GMSSRandom;
import org.spongycastle.pqc.crypto.gmss.util.*;
[ "org.spongycastle.pqc" ]
org.spongycastle.pqc;
1,034,288
public static void getComponent(DataManager data, String componentId) { String url = DataURL.showComponent(data, componentId); GWT.log(url); RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, URL.encode(url)); try { @SuppressWarnings("unused") Request request = ...
static void function(DataManager data, String componentId) { String url = DataURL.showComponent(data, componentId); GWT.log(url); RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, URL.encode(url)); try { @SuppressWarnings(STR) Request request = builder.sendRequest(null, new ComponentRequestCallback(data, ...
/** * Makes an asynchronous HTTP GET request to the server to retrieve the data * for a single component. * * @param data the DataManager object for the WMT session * @param componentId the identifier of the component in the database, a * String */
Makes an asynchronous HTTP GET request to the server to retrieve the data for a single component
getComponent
{ "repo_name": "mdpiper/wmt-client", "path": "src/edu/colorado/csdms/wmt/client/control/DataTransfer.java", "license": "mit", "size": 46635 }
[ "com.google.gwt.core.client.GWT", "com.google.gwt.http.client.Request", "com.google.gwt.http.client.RequestBuilder", "com.google.gwt.http.client.RequestException", "com.google.gwt.http.client.URL", "com.google.gwt.user.client.Window", "edu.colorado.csdms.wmt.client.Constants" ]
import com.google.gwt.core.client.GWT; import com.google.gwt.http.client.Request; import com.google.gwt.http.client.RequestBuilder; import com.google.gwt.http.client.RequestException; import com.google.gwt.http.client.URL; import com.google.gwt.user.client.Window; import edu.colorado.csdms.wmt.client.Constants;
import com.google.gwt.core.client.*; import com.google.gwt.http.client.*; import com.google.gwt.user.client.*; import edu.colorado.csdms.wmt.client.*;
[ "com.google.gwt", "edu.colorado.csdms" ]
com.google.gwt; edu.colorado.csdms;
973,985
public AsyncRequest createPostRequest(String url, List<Object> dtoArray) { return createPostRequest(url, dtoArray, false); }
AsyncRequest function(String url, List<Object> dtoArray) { return createPostRequest(url, dtoArray, false); }
/** * Creates new POST request to the specified {@code url} with the provided {@code data}. * * @param url * request URL * @param dtoArray * the array of DTO to send as body of the request. Must contain objects that implement {@link * org.eclipse.che.ide.dto.Js...
Creates new POST request to the specified url with the provided data
createPostRequest
{ "repo_name": "kaloyan-raev/che", "path": "ide/commons-gwt/src/main/java/org/eclipse/che/ide/rest/AsyncRequestFactory.java", "license": "epl-1.0", "size": 8676 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
899,465
private void rightElbowUp(int kinectID, HashMap<SkeletonJoint, SkeletonJointPosition> skel, PoseName gesture) { // is the user's right hand at head level or above? if (!poseActivity.containsKey(gesture)) { return; } Point3D rightElbowPt = getJointPos(skel, SkeletonJoint.RIGHT_ELBOW); Point3D r...
void function(int kinectID, HashMap<SkeletonJoint, SkeletonJointPosition> skel, PoseName gesture) { if (!poseActivity.containsKey(gesture)) { return; } Point3D rightElbowPt = getJointPos(skel, SkeletonJoint.RIGHT_ELBOW); Point3D rightShoulderPt = getJointPos(skel, SkeletonJoint.RIGHT_SHOULDER); if ((rightElbowPt == nul...
/** * Right elbow up. * * @param kinectID * the kinect id * @param skel * the skel * @param gesture * the gesture */
Right elbow up
rightElbowUp
{ "repo_name": "synergynet/synergynet3.1", "path": "synergynet3-tracking/synergynet3-tracking-kinect/src/main/java/usertracking/Poses.java", "license": "bsd-3-clause", "size": 37748 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
2,801,090
public BasicBlock getBlock(InstructionHandle start) { BasicBlock block = blockMap.get(start); if (block == null) { block = allocateBasicBlock(); blockMap.put(start, block); // Block is an exception handler? CodeExceptionGen...
BasicBlock function(InstructionHandle start) { BasicBlock block = blockMap.get(start); if (block == null) { block = allocateBasicBlock(); blockMap.put(start, block); CodeExceptionGen exceptionGen = exceptionHandlerMap.getHandlerForStartInstruction(start); if (exceptionGen != null) block.setExceptionGen(exceptionGen); a...
/** * Get the basic block in the subroutine for the given instruction. If * the block doesn't exist yet, it is created, and a work list item is * added which will populate it. Note that if start is an exception * thrower, the block returned will be its ETB. * * @par...
Get the basic block in the subroutine for the given instruction. If the block doesn't exist yet, it is created, and a work list item is added which will populate it. Note that if start is an exception thrower, the block returned will be its ETB
getBlock
{ "repo_name": "jesusaplsoft/FindAllBugs", "path": "findbugs/src/java/edu/umd/cs/findbugs/ba/BetterCFGBuilder2.java", "license": "gpl-2.0", "size": 45370 }
[ "org.apache.bcel.generic.CodeExceptionGen", "org.apache.bcel.generic.InstructionHandle" ]
import org.apache.bcel.generic.CodeExceptionGen; import org.apache.bcel.generic.InstructionHandle;
import org.apache.bcel.generic.*;
[ "org.apache.bcel" ]
org.apache.bcel;
1,340,139
if (op instanceof VersionUpdateOp || op instanceof NoOp) { return true; } else if (op instanceof AddParticipant || op instanceof RemoveParticipant || op instanceof WaveletBlipOperation) { return false; } else { // This happens when the op parameter is a non-core subclass of // Wa...
if (op instanceof VersionUpdateOp op instanceof NoOp) { return true; } else if (op instanceof AddParticipant op instanceof RemoveParticipant op instanceof WaveletBlipOperation) { return false; } else { throw new RuntimeException(STR + op.getClass()); } }
/** * Returns true iff the wavelet operation is considered a no-op as far as undo * is concerned. * * @param op */
Returns true iff the wavelet operation is considered a no-op as far as undo is concerned
isNoop
{ "repo_name": "gburd/wave", "path": "src/org/waveprotocol/wave/model/wave/undo/OpUtils.java", "license": "apache-2.0", "size": 1748 }
[ "org.waveprotocol.wave.model.operation.wave.AddParticipant", "org.waveprotocol.wave.model.operation.wave.NoOp", "org.waveprotocol.wave.model.operation.wave.RemoveParticipant", "org.waveprotocol.wave.model.operation.wave.VersionUpdateOp", "org.waveprotocol.wave.model.operation.wave.WaveletBlipOperation" ]
import org.waveprotocol.wave.model.operation.wave.AddParticipant; import org.waveprotocol.wave.model.operation.wave.NoOp; import org.waveprotocol.wave.model.operation.wave.RemoveParticipant; import org.waveprotocol.wave.model.operation.wave.VersionUpdateOp; import org.waveprotocol.wave.model.operation.wave.WaveletBlipO...
import org.waveprotocol.wave.model.operation.wave.*;
[ "org.waveprotocol.wave" ]
org.waveprotocol.wave;
907,381
private static native Image loadImageData(Format format, InputStream inputStream);
static native Image function(Format format, InputStream inputStream);
/** * Loads images via iOS native API * * @param format has to be Image.Format.RGBA8 * @param inputStream the InputStream to load the image data from * @return the loaded Image */
Loads images via iOS native API
loadImageData
{ "repo_name": "PlanetWaves/clockworkengine", "path": "branches/3.0/engine/src/ios/com/clockwork/system/ios/IosImageLoader.java", "license": "apache-2.0", "size": 965 }
[ "com.clockwork.texture.Image", "java.io.InputStream" ]
import com.clockwork.texture.Image; import java.io.InputStream;
import com.clockwork.texture.*; import java.io.*;
[ "com.clockwork.texture", "java.io" ]
com.clockwork.texture; java.io;
1,111,420
@Override public void exitExprRemoveMultipleRoles(@NotNull QueryGrammarParser.ExprRemoveMultipleRolesContext ctx) { }
@Override public void exitExprRemoveMultipleRoles(@NotNull QueryGrammarParser.ExprRemoveMultipleRolesContext ctx) { }
/** * {@inheritDoc} * <p/> * The default implementation does nothing. */
The default implementation does nothing
enterExprRemoveMultipleRoles
{ "repo_name": "pmeisen/dis-timeintervaldataanalyzer", "path": "src/net/meisen/dissertation/impl/parser/query/generated/QueryGrammarBaseListener.java", "license": "bsd-3-clause", "size": 33327 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
1,760,830
public static GUIFont parse(String pathName, String fileName) throws Exception { GUIFont font = new GUIFont(); // now parse the font file BufferedReader in = new BufferedReader(new InputStreamReader(FileSystem.getInstance().getInputStream(pathName, fileName))); String info = in.readLine(); String common =...
static GUIFont function(String pathName, String fileName) throws Exception { GUIFont font = new GUIFont(); BufferedReader in = new BufferedReader(new InputStreamReader(FileSystem.getInstance().getInputStream(pathName, fileName))); String info = in.readLine(); String common = in.readLine(); String page = in.readLine(); ...
/** * Parse the font definition file * @param font file * @throws GUIParserException */
Parse the font definition file
parse
{ "repo_name": "andreasdr/tdme", "path": "src/net/drewke/tdme/gui/renderer/GUIFont.java", "license": "mit", "size": 13608 }
[ "java.io.BufferedReader", "java.io.InputStreamReader", "net.drewke.tdme.engine.fileio.textures.TextureLoader", "net.drewke.tdme.os.FileSystem" ]
import java.io.BufferedReader; import java.io.InputStreamReader; import net.drewke.tdme.engine.fileio.textures.TextureLoader; import net.drewke.tdme.os.FileSystem;
import java.io.*; import net.drewke.tdme.engine.fileio.textures.*; import net.drewke.tdme.os.*;
[ "java.io", "net.drewke.tdme" ]
java.io; net.drewke.tdme;
2,103,041
String viewFileAsHtmlString( TokenProxy<?, TokenType.Simple> tokenProxy, byte[] bytes, ViewDocumentRequestBuilder params ) throws HodErrorException;
String viewFileAsHtmlString( TokenProxy<?, TokenType.Simple> tokenProxy, byte[] bytes, ViewDocumentRequestBuilder params ) throws HodErrorException;
/** * Convert a file to HTML and retrieve the result as an HTML String using the given token proxy * @param tokenProxy The token proxy to use * @param bytes The bytes of the file to view * @param params Additional parameters to use for the request * @return A String containing the HTML * @...
Convert a file to HTML and retrieve the result as an HTML String using the given token proxy
viewFileAsHtmlString
{ "repo_name": "hpautonomy/java-hod-client", "path": "src/main/java/com/hp/autonomy/hod/client/api/analysis/viewdocument/ViewDocumentService.java", "license": "mit", "size": 12711 }
[ "com.hp.autonomy.hod.client.api.authentication.TokenType", "com.hp.autonomy.hod.client.error.HodErrorException", "com.hp.autonomy.hod.client.token.TokenProxy" ]
import com.hp.autonomy.hod.client.api.authentication.TokenType; import com.hp.autonomy.hod.client.error.HodErrorException; import com.hp.autonomy.hod.client.token.TokenProxy;
import com.hp.autonomy.hod.client.api.authentication.*; import com.hp.autonomy.hod.client.error.*; import com.hp.autonomy.hod.client.token.*;
[ "com.hp.autonomy" ]
com.hp.autonomy;
2,548,992
default Olingo4EndpointProducerBuilder httpHeaders( Map<String, String> httpHeaders) { doSetProperty("httpHeaders", httpHeaders); return this; }
default Olingo4EndpointProducerBuilder httpHeaders( Map<String, String> httpHeaders) { doSetProperty(STR, httpHeaders); return this; }
/** * Custom HTTP headers to inject into every request, this could include * OAuth tokens, etc. * * The option is a: <code>java.util.Map&lt;java.lang.String, * java.lang.String&gt;</code> type. * * Group: common */
Custom HTTP headers to inject into every request, this could include OAuth tokens, etc. The option is a: <code>java.util.Map&lt;java.lang.String, java.lang.String&gt;</code> type. Group: common
httpHeaders
{ "repo_name": "DariusX/camel", "path": "core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Olingo4EndpointBuilderFactory.java", "license": "apache-2.0", "size": 64356 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
636,108
@Pure public DoubleProperty z2Property() { if (this.p2.z == null) { this.p2.z = new SimpleDoubleProperty(this, MathFXAttributeNames.Z2); } return this.p2.z; }
DoubleProperty function() { if (this.p2.z == null) { this.p2.z = new SimpleDoubleProperty(this, MathFXAttributeNames.Z2); } return this.p2.z; }
/** Replies the property that is the z coordinate of the second segment point. * * @return the z2 property. */
Replies the property that is the z coordinate of the second segment point
z2Property
{ "repo_name": "tpiotrow/afc", "path": "advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d3/dfx/Segment3dfx.java", "license": "apache-2.0", "size": 9555 }
[ "org.arakhne.afc.math.geometry.MathFXAttributeNames" ]
import org.arakhne.afc.math.geometry.MathFXAttributeNames;
import org.arakhne.afc.math.geometry.*;
[ "org.arakhne.afc" ]
org.arakhne.afc;
2,440,367
public void search(String searchText, IJavaSearchScope scope, int searchFor, int limitTo, int matchMode, boolean isCaseSensitive, SearchRequestor requestor, IProgressMonitor monitor) { //wait for the index JSPIndexManager.getDefault().waitForConsistent(monitor); SearchJob job = new Sear...
void function(String searchText, IJavaSearchScope scope, int searchFor, int limitTo, int matchMode, boolean isCaseSensitive, SearchRequestor requestor, IProgressMonitor monitor) { JSPIndexManager.getDefault().waitForConsistent(monitor); SearchJob job = new SearchJob(searchText, scope, searchFor, limitTo, matchMode, isC...
/** * Perform a java search w/ the given parameters. Runs in a background Job * (results may still come in after this method call) * * @param searchText * the string of text to search on * @param searchFor * IJavaSearchConstants.TYPE, METHOD, FIELD, PACKAGE, etc...
Perform a java search w/ the given parameters. Runs in a background Job (results may still come in after this method call)
search
{ "repo_name": "ttimbul/eclipse.wst", "path": "bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/JSPSearchSupport.java", "license": "epl-1.0", "size": 21481 }
[ "org.eclipse.core.runtime.IProgressMonitor", "org.eclipse.jdt.core.search.IJavaSearchScope", "org.eclipse.jdt.core.search.SearchRequestor" ]
import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.jdt.core.search.IJavaSearchScope; import org.eclipse.jdt.core.search.SearchRequestor;
import org.eclipse.core.runtime.*; import org.eclipse.jdt.core.search.*;
[ "org.eclipse.core", "org.eclipse.jdt" ]
org.eclipse.core; org.eclipse.jdt;
279,405
public void sendTo(Player player) { if (!isEnabled() || wasSentTo(player)) return; sentTo.add(player.getUniqueId()); /// ProTip invite, displayed before a ProTip. player.sendMessage(I.t("{darkpurple}ProTip!") + " " + ChatColor.RESET + text); proTipsSound.pla...
void function(Player player) { if (!isEnabled() wasSentTo(player)) return; sentTo.add(player.getUniqueId()); player.sendMessage(I.t(STR) + " " + ChatColor.RESET + text); proTipsSound.play(player); }
/** * Sends a ProTip, if this ProTip wasn't sent before to this player. * * @param player The receiver of this ProTip. */
Sends a ProTip, if this ProTip wasn't sent before to this player
sendTo
{ "repo_name": "AmauryCarrade/UHPlugin", "path": "src/main/java/eu/carrade/amaury/UHCReloaded/protips/ProTip.java", "license": "gpl-3.0", "size": 4435 }
[ "fr.zcraft.zlib.components.i18n.I", "org.bukkit.ChatColor", "org.bukkit.entity.Player" ]
import fr.zcraft.zlib.components.i18n.I; import org.bukkit.ChatColor; import org.bukkit.entity.Player;
import fr.zcraft.zlib.components.i18n.*; import org.bukkit.*; import org.bukkit.entity.*;
[ "fr.zcraft.zlib", "org.bukkit", "org.bukkit.entity" ]
fr.zcraft.zlib; org.bukkit; org.bukkit.entity;
2,887,303
private void validateTestMethods(List<Throwable> errors) { List<FrameworkMethod> methods = getTestClass().getAnnotatedMethods(Test.class); for (FrameworkMethod testMethod : methods) { testMethod.validatePublicVoid(false, errors); validateTestMethodArgs(testMethod, errors); } }
void function(List<Throwable> errors) { List<FrameworkMethod> methods = getTestClass().getAnnotatedMethods(Test.class); for (FrameworkMethod testMethod : methods) { testMethod.validatePublicVoid(false, errors); validateTestMethodArgs(testMethod, errors); } }
/** * Marks validation errors in errors if: * * <ul> * <li>Any method marked by @Test is a not a public non-static void method. * <li>Any method marked by @Test does not have exact args ({@link EndToEndTestDescriptor}, * {@link ProcessResult}) * </ul> */
Marks validation errors in errors if: Any method marked by @Test is a not a public non-static void method. Any method marked by @Test does not have exact args (<code>EndToEndTestDescriptor</code>, <code>ProcessResult</code>)
validateTestMethods
{ "repo_name": "ilya-klyuchnikov/buck", "path": "test/com/facebook/buck/testutil/endtoend/EndToEndRunner.java", "license": "apache-2.0", "size": 16026 }
[ "java.util.List", "org.junit.Test", "org.junit.runners.model.FrameworkMethod" ]
import java.util.List; import org.junit.Test; import org.junit.runners.model.FrameworkMethod;
import java.util.*; import org.junit.*; import org.junit.runners.model.*;
[ "java.util", "org.junit", "org.junit.runners" ]
java.util; org.junit; org.junit.runners;
972,514
protected CountingThreadPoolExecutor getExecutor() { return new SetPoolExecutor(1, this.numThreads, 30, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>()); }
CountingThreadPoolExecutor function() { return new SetPoolExecutor(1, this.numThreads, 30, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>()); }
/** * Factory method for this solver's thread-pool executor. */
Factory method for this solver's thread-pool executor
getExecutor
{ "repo_name": "johspaeth/soot-infoflow", "path": "src/soot/jimple/infoflow/solver/fastSolver/IFDSSolver.java", "license": "lgpl-2.1", "size": 19024 }
[ "java.util.concurrent.LinkedBlockingQueue", "java.util.concurrent.TimeUnit" ]
import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.TimeUnit;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,376,896
@ServiceMethod(name = "SPEEDY_GET_ARCHIVE_INFO") public void getArchiveInfo(@Binder(name = "aArchiveName") String archiveName, DataBinder binder) throws ServiceException, DataException { CollectionData col = getLocalCollectionData(); DataBinder archiveInfo = ArchiveUtils.readArchiveFile(col.m_locati...
@ServiceMethod(name = STR) void function(@Binder(name = STR) String archiveName, DataBinder binder) throws ServiceException, DataException { CollectionData col = getLocalCollectionData(); DataBinder archiveInfo = ArchiveUtils.readArchiveFile(col.m_location, archiveName, false); binder.merge(archiveInfo); }
/** * Get archive info for each archive as a resultset. * * @param idcName * The collection name * @param binder * The output data binder */
Get archive info for each archive as a resultset
getArchiveInfo
{ "repo_name": "tstirrat/ucm-SpeedyArchiver", "path": "src/main/java/org/stirrat/ecm/speedyarchiver/SpeedyArchiverServices.java", "license": "apache-2.0", "size": 14881 }
[ "org.ucmtwine.annotation.Binder", "org.ucmtwine.annotation.ServiceMethod" ]
import org.ucmtwine.annotation.Binder; import org.ucmtwine.annotation.ServiceMethod;
import org.ucmtwine.annotation.*;
[ "org.ucmtwine.annotation" ]
org.ucmtwine.annotation;
965,146
public String priceList (Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value) { Integer M_PriceList_ID = (Integer) mTab.getValue("M_PriceList_ID"); if (M_PriceList_ID == null || M_PriceList_ID.intValue()== 0) return ""; if (steps) log.warning("init"); PreparedStatement pstmt ...
String function (Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value) { Integer M_PriceList_ID = (Integer) mTab.getValue(STR); if (M_PriceList_ID == null M_PriceList_ID.intValue()== 0) return STRinitSTRSELECT pl.IsTaxIncluded,pl.EnforcePriceLimit,pl.C_Currency_ID,c.StdPrecision,STRplv.M_PriceList...
/** * Order Header - PriceList. * (used also in Invoice) * - C_Currency_ID * - IsTaxIncluded * Window Context: * - EnforcePriceLimit * - StdPrecision * - M_PriceList_Version_ID * @param ctx context * @param WindowNo current Window No * @param mTab Grid Tab * @param mField Gr...
Order Header - PriceList. (used also in Invoice) - C_Currency_ID - IsTaxIncluded Window Context: - EnforcePriceLimit - StdPrecision - M_PriceList_Version_ID
priceList
{ "repo_name": "arthurmelo88/palmetalADP", "path": "adempierelbr/base/src/org/compiere/model/CalloutOrder.java", "license": "gpl-2.0", "size": 55228 }
[ "java.util.Properties" ]
import java.util.Properties;
import java.util.*;
[ "java.util" ]
java.util;
256,846
protected void paintGeneric(Graphics g) { // Draw Background g.setColor(Color.black); g.fillRect(0, 0, gui.getWidth(), gui.getHeight()); // Draw Titlebar g.setColor(Color.white); g.fillRect(0, 0, gui.getWidth(), 16); // Calc width of Text and display Title g.setColor(Color.black); int width=0; fo...
void function(Graphics g) { g.setColor(Color.black); g.fillRect(0, 0, gui.getWidth(), gui.getHeight()); g.setColor(Color.white); g.fillRect(0, 0, gui.getWidth(), 16); g.setColor(Color.black); int width=0; for(char c : Main.title.toCharArray()) { width+=g.getFontMetrics().charWidth(c); } g.drawString(Main.title, gui.get...
/** * paints Titlebar and Background * @param g Graphics to Paint */
paints Titlebar and Background
paintGeneric
{ "repo_name": "erwin8086/quadro", "path": "Game/src/game/Menu.java", "license": "gpl-2.0", "size": 17944 }
[ "java.awt.Color", "java.awt.Graphics" ]
import java.awt.Color; import java.awt.Graphics;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,438,238
protected T getUniqueRow(String query, String parameter) throws UtilException { ResultSet rs = null; PreparedStatement select = null; try { select = schema.getStatement(query); synchronized (select) { select.setString(1, parameter); rs = select.executeQuery(); re...
T function(String query, String parameter) throws UtilException { ResultSet rs = null; PreparedStatement select = null; try { select = schema.getStatement(query); synchronized (select) { select.setString(1, parameter); rs = select.executeQuery(); return getUniqueRow(rs); } } catch (SQLException e) { throw new UtilExcep...
/** * Returns the unique row referenced by the given query and String parameter. Returns null if no * rows match the id. Throws a UtilException if more then one row match the id. * @return the requiered row or null. * @param query the sql query string must be like "select * from ... where ... col=?" where c...
Returns the unique row referenced by the given query and String parameter. Returns null if no rows match the id. Throws a UtilException if more then one row match the id
getUniqueRow
{ "repo_name": "CecileBONIN/Silverpeas-Core", "path": "lib-core/src/main/java/com/stratelia/webactiv/util/AbstractTable.java", "license": "agpl-3.0", "size": 18731 }
[ "com.stratelia.webactiv.util.exception.UtilException", "java.sql.PreparedStatement", "java.sql.ResultSet", "java.sql.SQLException" ]
import com.stratelia.webactiv.util.exception.UtilException; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException;
import com.stratelia.webactiv.util.exception.*; import java.sql.*;
[ "com.stratelia.webactiv", "java.sql" ]
com.stratelia.webactiv; java.sql;
2,657,519
public void verify(MWProject project);
void function(MWProject project);
/** * Asks this <code>AutomapVerifier</code> to verify the execution of the * automap on the objects. * * @param project The root of the object hierarchy */
Asks this <code>AutomapVerifier</code> to verify the execution of the automap on the objects
verify
{ "repo_name": "RallySoftware/eclipselink.runtime", "path": "utils/eclipselink.utils.workbench.test/mappingsplugin/source/org/eclipse/persistence/tools/workbench/test/mappingsmodel/automap/AutomapVerifier.java", "license": "epl-1.0", "size": 1141 }
[ "org.eclipse.persistence.tools.workbench.mappingsmodel.project.MWProject" ]
import org.eclipse.persistence.tools.workbench.mappingsmodel.project.MWProject;
import org.eclipse.persistence.tools.workbench.mappingsmodel.project.*;
[ "org.eclipse.persistence" ]
org.eclipse.persistence;
2,362,893
private void createThread() { if (!Thread_Exists) { UpTime = new TimeStamp(); // set up the thread to listen Listener_Thread = new Thread(this); Listener_Thread.setDaemon(true); Listener_Thread.setName("OMS_FileBasedService"); logger.info("Creating ...
void function() { if (!Thread_Exists) { UpTime = new TimeStamp(); Listener_Thread = new Thread(this); Listener_Thread.setDaemon(true); Listener_Thread.setName(STR); logger.info(STR + Listener_Thread.getName() + STR); Thread_Exists = true; } }
/** *** Summary_Description_Of_What_createThread_Does. *** <p> *** *** @see Method_related_to_this_method *** *** @param Parameter_name Description_of_method_parameter__Delete_if_none *** *** @return Description_of_method_return_value__Delete_if_none *** *** @throws ...
Summary_Description_Of_What_createThread_Does. @see Method_related_to_this_method @param Parameter_name Description_of_method_parameter__Delete_if_none @return Description_of_method_return_value__Delete_if_none @throws Class_name Description_of_exception_thrown__Delete_if_none
createThread
{ "repo_name": "meier/opensm-smt", "path": "src/main/java/gov/llnl/lc/infiniband/opensm/plugin/data/OMS_FileBasedService.java", "license": "gpl-2.0", "size": 17504 }
[ "gov.llnl.lc.time.TimeStamp" ]
import gov.llnl.lc.time.TimeStamp;
import gov.llnl.lc.time.*;
[ "gov.llnl.lc" ]
gov.llnl.lc;
2,108,021
public long subCost(ArrayList<FromItem> fromList) { return _subselect.subCost(fromList); }
long function(ArrayList<FromItem> fromList) { return _subselect.subCost(fromList); }
/** * Returns the cost based on the given FromList. */
Returns the cost based on the given FromList
subCost
{ "repo_name": "dlitz/resin", "path": "modules/resin/src/com/caucho/db/sql/SubSelectEvalExpr.java", "license": "gpl-2.0", "size": 2359 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
2,726,678
public void updateColor(Player player, MinecraftColor color) { this.color = color; if(color == MinecraftColor.TRANSPARENT) // If the color is transparent, just destroy the ArmorStand. { destroy(player); return; } if(!isRendered()) // Pixel not already rendered. Render the pixel. { ren...
void function(Player player, MinecraftColor color) { this.color = color; if(color == MinecraftColor.TRANSPARENT) { destroy(player); return; } if(!isRendered()) { render(player, location); } else { HoloGUIApi.packetManager.updateEntityText(player, entityId, color.symbol() + "▇"); } }
/** * Updates this pixel's color for the given player. * * @param player * @param color */
Updates this pixel's color for the given player
updateColor
{ "repo_name": "Kloudy/HoloGUIApi", "path": "src/com/antarescraft/kloudy/hologuiapi/guicomponents/CanvasPixel.java", "license": "apache-2.0", "size": 3517 }
[ "com.antarescraft.kloudy.hologuiapi.HoloGUIApi", "com.antarescraft.kloudy.hologuiapi.imageprocessing.MinecraftColor", "org.bukkit.entity.Player" ]
import com.antarescraft.kloudy.hologuiapi.HoloGUIApi; import com.antarescraft.kloudy.hologuiapi.imageprocessing.MinecraftColor; import org.bukkit.entity.Player;
import com.antarescraft.kloudy.hologuiapi.*; import com.antarescraft.kloudy.hologuiapi.imageprocessing.*; import org.bukkit.entity.*;
[ "com.antarescraft.kloudy", "org.bukkit.entity" ]
com.antarescraft.kloudy; org.bukkit.entity;
1,200,211
@Test public void dirtyRegionMatchesOpaqueRegion() { NodePath rootPath = getRenderRoot(root, 10, 10, 90, 90); assertRenderRoot(rect, rootPath); }
void function() { NodePath rootPath = getRenderRoot(root, 10, 10, 90, 90); assertRenderRoot(rect, rootPath); }
/** * Tests the case where the dirty region exactly matches the opaque region. * The rect is dirty. */
Tests the case where the dirty region exactly matches the opaque region. The rect is dirty
dirtyRegionMatchesOpaqueRegion
{ "repo_name": "teamfx/openjfx-10-dev-rt", "path": "modules/javafx.graphics/src/test/java/test/com/sun/javafx/sg/prism/RenderRootTest.java", "license": "gpl-2.0", "size": 15706 }
[ "com.sun.javafx.sg.prism.NodePath" ]
import com.sun.javafx.sg.prism.NodePath;
import com.sun.javafx.sg.prism.*;
[ "com.sun.javafx" ]
com.sun.javafx;
2,065,027
public void save() { if (this.openedUri == null) { return; } final URI uri = this.openedUri; final IAxialCodingModel axialCodingModel = new JointJSAxialCodingModel( uri, this.jointjs.getModel()); try { CODE_SERVICE.addAxialCodingModel(axialCodingModel); } catch (CodeStoreWriteException e) { ...
void function() { if (this.openedUri == null) { return; } final URI uri = this.openedUri; final IAxialCodingModel axialCodingModel = new JointJSAxialCodingModel( uri, this.jointjs.getModel()); try { CODE_SERVICE.addAxialCodingModel(axialCodingModel); } catch (CodeStoreWriteException e) { LOGGER.error(STR + IAxialCoding...
/** * Saves the currently opened {@link URI}. * * @return */
Saves the currently opened <code>URI</code>
save
{ "repo_name": "bkahlert/api-usability-analyzer", "path": "de.fu_berlin.imp.apiua.groundedtheory/src/de/fu_berlin/imp/apiua/groundedtheory/views/AxialCodingComposite.java", "license": "mit", "size": 27856 }
[ "de.fu_berlin.imp.apiua.groundedtheory.model.IAxialCodingModel", "de.fu_berlin.imp.apiua.groundedtheory.model.JointJSAxialCodingModel", "de.fu_berlin.imp.apiua.groundedtheory.storage.exceptions.CodeStoreWriteException" ]
import de.fu_berlin.imp.apiua.groundedtheory.model.IAxialCodingModel; import de.fu_berlin.imp.apiua.groundedtheory.model.JointJSAxialCodingModel; import de.fu_berlin.imp.apiua.groundedtheory.storage.exceptions.CodeStoreWriteException;
import de.fu_berlin.imp.apiua.groundedtheory.model.*; import de.fu_berlin.imp.apiua.groundedtheory.storage.exceptions.*;
[ "de.fu_berlin.imp" ]
de.fu_berlin.imp;
1,208,949
private void cleanup() { try { //close the FileOutputStream (which also closes the Channel) fileOutputStream.close(); } catch (Exception e) { LOG.error("Error closing the file stream: "+ this.saveAs ,e); } if (bytesDownloaded != size) { //if the download is ...
void function() { try { fileOutputStream.close(); } catch (Exception e) { LOG.error(STR+ this.saveAs ,e); } if (bytesDownloaded != size) { try { file.delete(); } catch (Exception e) { LOG.error(STR + e.getMessage()); } if (!aborted) throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, STR + fileName + STR + by...
/** * cleanup everything */
cleanup everything
cleanup
{ "repo_name": "yintaoxue/read-open-source-code", "path": "solr-4.10.4/src/org/apache/solr/handler/SnapPuller.java", "license": "apache-2.0", "size": 64187 }
[ "org.apache.solr.common.SolrException" ]
import org.apache.solr.common.SolrException;
import org.apache.solr.common.*;
[ "org.apache.solr" ]
org.apache.solr;
671,759
public ApplicationGatewayHttpListenerPropertiesFormat withProtocol(ApplicationGatewayProtocol protocol) { this.protocol = protocol; return this; }
ApplicationGatewayHttpListenerPropertiesFormat function(ApplicationGatewayProtocol protocol) { this.protocol = protocol; return this; }
/** * Set the protocol property: Protocol of the HTTP listener. * * @param protocol the protocol value to set. * @return the ApplicationGatewayHttpListenerPropertiesFormat object itself. */
Set the protocol property: Protocol of the HTTP listener
withProtocol
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/models/ApplicationGatewayHttpListenerPropertiesFormat.java", "license": "mit", "size": 10400 }
[ "com.azure.resourcemanager.network.models.ApplicationGatewayProtocol" ]
import com.azure.resourcemanager.network.models.ApplicationGatewayProtocol;
import com.azure.resourcemanager.network.models.*;
[ "com.azure.resourcemanager" ]
com.azure.resourcemanager;
71,435
public int lineBegin(int p) throws SyntaxException { synchronized(textArea) { char txt[] = textArea.getStyledTextBody().getText().toCharArray(); if(p > textArea.getStyledTextBody().getText().length() || p < 0) throw new SyntaxException("Index out of text area " + p); ...
int function(int p) throws SyntaxException { synchronized(textArea) { char txt[] = textArea.getStyledTextBody().getText().toCharArray(); if(p > textArea.getStyledTextBody().getText().length() p < 0) throw new SyntaxException(STR + p); if(p == txt.length) p--; for(int index = txt[p]=='\n' ? p - 1: p ; index >= 0; index-...
/** * Find the begin index of line where position p at, suppose that p is an caret which * is located in the gap between character * * @param p the imaginary caret position, 0 &le; p &le; {@link StyledTextBody#length() length()} * @return begin index of line * @throws SyntaxException if p...
Find the begin index of line where position p at, suppose that p is an caret which is located in the gap between character
lineBegin
{ "repo_name": "w86763777/SyntaxPane", "path": "src/main/java/com/syntax/manage/SyntaxDocumentTool.java", "license": "mit", "size": 5660 }
[ "com.syntax.code.StyledTextBody" ]
import com.syntax.code.StyledTextBody;
import com.syntax.code.*;
[ "com.syntax.code" ]
com.syntax.code;
27,821
public void run(List<Object> paragraphIdOrIdx, InterpreterContext context) { for (Object idOrIdx : paragraphIdOrIdx) { if (idOrIdx instanceof String) { String id = (String) idOrIdx; run(id, context); } else if (idOrIdx instanceof Integer) { Integer idx = (Integer) idOrIdx; ...
void function(List<Object> paragraphIdOrIdx, InterpreterContext context) { for (Object idOrIdx : paragraphIdOrIdx) { if (idOrIdx instanceof String) { String id = (String) idOrIdx; run(id, context); } else if (idOrIdx instanceof Integer) { Integer idx = (Integer) idOrIdx; run(idx, context); } else { throw new Interprete...
/** * Run paragraphs * @param paragraphIdOrIdx list of paragraph id or idx */
Run paragraphs
run
{ "repo_name": "cris83/incubator-zeppelin", "path": "spark/src/main/java/org/apache/zeppelin/spark/ZeppelinContext.java", "license": "apache-2.0", "size": 21426 }
[ "java.util.List", "org.apache.zeppelin.interpreter.InterpreterContext", "org.apache.zeppelin.interpreter.InterpreterException" ]
import java.util.List; import org.apache.zeppelin.interpreter.InterpreterContext; import org.apache.zeppelin.interpreter.InterpreterException;
import java.util.*; import org.apache.zeppelin.interpreter.*;
[ "java.util", "org.apache.zeppelin" ]
java.util; org.apache.zeppelin;
1,630,641
// Instantiate a cryptography async client that will be used to perform crypto operations. Notice that the client is using default Azure // credentials. To make default credentials work, ensure that environment variables 'AZURE_CLIENT_ID', // 'AZURE_CLIENT_KEY' and 'AZURE_TENANT_ID' are set with...
CryptographyAsyncClient cryptoAsyncClient = new CryptographyClientBuilder() .credential(new DefaultAzureCredentialBuilder().build()) .keyIdentifier(STR) .buildAsyncClient(); byte[] plaintext = new byte[100]; new Random(0x1234567L).nextBytes(plaintext); MessageDigest md = MessageDigest.getInstance(STR); md.update(plaint...
/** * Authenticates with the key vault and shows how to set, get, update and delete a key in the key vault. * * @param args Unused. Arguments to the program. * @throws IllegalArgumentException when invalid key vault endpoint is passed. * @throws InterruptedException when the thread is interrupt...
Authenticates with the key vault and shows how to set, get, update and delete a key in the key vault
main
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/keyvault/azure-security-keyvault-keys/src/samples/java/com/azure/security/keyvault/keys/cryptography/SignVerifyOperationsAsync.java", "license": "mit", "size": 3339 }
[ "com.azure.identity.DefaultAzureCredentialBuilder", "com.azure.security.keyvault.keys.cryptography.models.SignatureAlgorithm", "java.security.MessageDigest", "java.util.Random" ]
import com.azure.identity.DefaultAzureCredentialBuilder; import com.azure.security.keyvault.keys.cryptography.models.SignatureAlgorithm; import java.security.MessageDigest; import java.util.Random;
import com.azure.identity.*; import com.azure.security.keyvault.keys.cryptography.models.*; import java.security.*; import java.util.*;
[ "com.azure.identity", "com.azure.security", "java.security", "java.util" ]
com.azure.identity; com.azure.security; java.security; java.util;
1,204,363
static BeamSqlExpression buildExpression(RexNode rexNode) { BeamSqlExpression ret = null; if (rexNode instanceof RexLiteral) { RexLiteral node = (RexLiteral) rexNode; SqlTypeName type = node.getTypeName(); Object value = node.getValue(); if (SqlTypeName.CHAR_TYPES.contains(type) ...
static BeamSqlExpression buildExpression(RexNode rexNode) { BeamSqlExpression ret = null; if (rexNode instanceof RexLiteral) { RexLiteral node = (RexLiteral) rexNode; SqlTypeName type = node.getTypeName(); Object value = node.getValue(); if (SqlTypeName.CHAR_TYPES.contains(type) && node.getValue() instanceof NlsString)...
/** * {@link #buildExpression(RexNode)} visits the operands of {@link RexNode} recursively, * and represent each {@link SqlOperator} with a corresponding {@link BeamSqlExpression}. */
<code>#buildExpression(RexNode)</code> visits the operands of <code>RexNode</code> recursively, and represent each <code>SqlOperator</code> with a corresponding <code>BeamSqlExpression</code>
buildExpression
{ "repo_name": "jbonofre/beam", "path": "sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/impl/interpreter/BeamSqlFnExecutor.java", "license": "apache-2.0", "size": 20562 }
[ "java.math.BigDecimal", "java.util.ArrayList", "java.util.Calendar", "java.util.List", "org.apache.beam.sdk.extensions.sql.impl.interpreter.operator.BeamSqlCaseExpression", "org.apache.beam.sdk.extensions.sql.impl.interpreter.operator.BeamSqlCastExpression", "org.apache.beam.sdk.extensions.sql.impl.inte...
import java.math.BigDecimal; import java.util.ArrayList; import java.util.Calendar; import java.util.List; import org.apache.beam.sdk.extensions.sql.impl.interpreter.operator.BeamSqlCaseExpression; import org.apache.beam.sdk.extensions.sql.impl.interpreter.operator.BeamSqlCastExpression; import org.apache.beam.sdk.exte...
import java.math.*; import java.util.*; import org.apache.beam.sdk.extensions.sql.impl.interpreter.operator.*; import org.apache.beam.sdk.extensions.sql.impl.interpreter.operator.arithmetic.*; import org.apache.beam.sdk.extensions.sql.impl.interpreter.operator.comparison.*; import org.apache.beam.sdk.extensions.sql.imp...
[ "java.math", "java.util", "org.apache.beam", "org.apache.calcite" ]
java.math; java.util; org.apache.beam; org.apache.calcite;
1,621,862
public List<CmsProperty> getCachedPropertyList(String key) { return m_cachePropertyList.get(key); }
List<CmsProperty> function(String key) { return m_cachePropertyList.get(key); }
/** * Returns the property list cached with the given cache key or <code>null</code> if not found.<p> * * @param key the cache key to look for * * @return the property list cached with the given cache key */
Returns the property list cached with the given cache key or <code>null</code> if not found
getCachedPropertyList
{ "repo_name": "it-tavis/opencms-core", "path": "src/org/opencms/monitor/CmsMemoryMonitor.java", "license": "lgpl-2.1", "size": 86968 }
[ "java.util.List", "org.opencms.file.CmsProperty" ]
import java.util.List; import org.opencms.file.CmsProperty;
import java.util.*; import org.opencms.file.*;
[ "java.util", "org.opencms.file" ]
java.util; org.opencms.file;
139,604
public Object assemble(Serializable cached, SessionImplementor session, Object owner) throws HibernateException;
Object function(Serializable cached, SessionImplementor session, Object owner) throws HibernateException;
/** * Reconstruct the object from its cached "disassembled" state. * @param cached the disassembled state from the cache * @param session the session * @param owner the parent entity object * @return the the object */
Reconstruct the object from its cached "disassembled" state
assemble
{ "repo_name": "codeApeFromChina/resource", "path": "frame_packages/java_libs/hibernate-distribution-3.6.10.Final/project/hibernate-core/src/main/java/org/hibernate/type/Type.java", "license": "unlicense", "size": 19478 }
[ "java.io.Serializable", "org.hibernate.HibernateException", "org.hibernate.engine.SessionImplementor" ]
import java.io.Serializable; import org.hibernate.HibernateException; import org.hibernate.engine.SessionImplementor;
import java.io.*; import org.hibernate.*; import org.hibernate.engine.*;
[ "java.io", "org.hibernate", "org.hibernate.engine" ]
java.io; org.hibernate; org.hibernate.engine;
2,035,321
public ServiceFuture<Void> updateAsync(String resourceGroupName, String serviceName, String quotaCounterKey, String quotaPeriodKey, QuotaCounterValueContractProperties parameters, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupNam...
ServiceFuture<Void> function(String resourceGroupName, String serviceName, String quotaCounterKey, String quotaPeriodKey, QuotaCounterValueContractProperties parameters, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, serviceName, quotaC...
/** * Updates an existing quota counter value in the specified service instance. * * @param resourceGroupName The name of the resource group. * @param serviceName The name of the API Management service. * @param quotaCounterKey Quota counter key identifier.This is the result of expression defin...
Updates an existing quota counter value in the specified service instance
updateAsync
{ "repo_name": "navalev/azure-sdk-for-java", "path": "sdk/apimanagement/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/apimanagement/v2018_06_01_preview/implementation/QuotaByPeriodKeysInner.java", "license": "mit", "size": 18409 }
[ "com.microsoft.azure.management.apimanagement.v2018_06_01_preview.QuotaCounterValueContractProperties", "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.azure.management.apimanagement.v2018_06_01_preview.QuotaCounterValueContractProperties; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.azure.management.apimanagement.v2018_06_01_preview.*; import com.microsoft.rest.*;
[ "com.microsoft.azure", "com.microsoft.rest" ]
com.microsoft.azure; com.microsoft.rest;
2,804,189
protected void drawText( final RenderableText renderableText, final long contentX2 ) { if ( renderableText.getLength() == 0 ) { // This text is empty. return; } final long posX = renderableText.getX(); final long posY = renderableText.getY(); final Graphics2D g2; if ( getTextSpec...
void function( final RenderableText renderableText, final long contentX2 ) { if ( renderableText.getLength() == 0 ) { return; } final long posX = renderableText.getX(); final long posY = renderableText.getY(); final Graphics2D g2; if ( getTextSpec() == null ) { g2 = (Graphics2D) getGraphics().create(); final StyleSheet...
/** * Renders the glyphs stored in the text node. * * @param renderableText * the text node that should be rendered. * @param contentX2 */
Renders the glyphs stored in the text node
drawText
{ "repo_name": "EgorZhuk/pentaho-reporting", "path": "engine/core/src/main/java/org/pentaho/reporting/engine/classic/core/modules/output/pageable/graphics/internal/LogicalPageDrawable.java", "license": "lgpl-2.1", "size": 52510 }
[ "java.awt.FontMetrics", "java.awt.Graphics2D", "java.awt.RenderingHints", "java.awt.geom.Rectangle2D", "org.pentaho.reporting.engine.classic.core.layout.model.RenderableText", "org.pentaho.reporting.engine.classic.core.layout.output.OutputProcessorFeature", "org.pentaho.reporting.engine.classic.core.lay...
import java.awt.FontMetrics; import java.awt.Graphics2D; import java.awt.RenderingHints; import java.awt.geom.Rectangle2D; import org.pentaho.reporting.engine.classic.core.layout.model.RenderableText; import org.pentaho.reporting.engine.classic.core.layout.output.OutputProcessorFeature; import org.pentaho.reporting.eng...
import java.awt.*; import java.awt.geom.*; import org.pentaho.reporting.engine.classic.core.layout.model.*; import org.pentaho.reporting.engine.classic.core.layout.output.*; import org.pentaho.reporting.engine.classic.core.layout.text.*; import org.pentaho.reporting.engine.classic.core.style.*; import org.pentaho.repor...
[ "java.awt", "org.pentaho.reporting" ]
java.awt; org.pentaho.reporting;
2,740,601
public List<Object> getHandledProperties();
List<Object> function();
/** * Return a list of all the properties managed by the section * * @return a not null list of all the property ids of the managed properties */
Return a list of all the properties managed by the section
getHandledProperties
{ "repo_name": "OpenSoftwareSolutions/PDFReporter-Studio", "path": "com.jaspersoft.studio.properties/src/com/jaspersoft/studio/properties/internal/IWidgetsProviderSection.java", "license": "lgpl-3.0", "size": 2196 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,829,718
public InvoiceType invoiceType() { return this.invoiceType; }
InvoiceType function() { return this.invoiceType; }
/** * Get the invoiceType property: Invoice type. * * @return the invoiceType value. */
Get the invoiceType property: Invoice type
invoiceType
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/billing/azure-resourcemanager-billing/src/main/java/com/azure/resourcemanager/billing/fluent/models/InvoiceProperties.java", "license": "mit", "size": 15301 }
[ "com.azure.resourcemanager.billing.models.InvoiceType" ]
import com.azure.resourcemanager.billing.models.InvoiceType;
import com.azure.resourcemanager.billing.models.*;
[ "com.azure.resourcemanager" ]
com.azure.resourcemanager;
880,543
public static String getFullDateAndTime(long timestamp) { Date date = new Date(timestamp); Format dateFormat = new SimpleDateFormat("EEEE, dd MMMM yyyy, hh:mm a", Locale.US); return dateFormat.format(date); }
static String function(long timestamp) { Date date = new Date(timestamp); Format dateFormat = new SimpleDateFormat(STR, Locale.US); return dateFormat.format(date); }
/** * Helper method to get the date and time from timestamp. Converts the Timestamp in Milliseconds to Date and Time and then * formats the Date object with {@link Format} and returns the String of Date and Time. * * @return */
Helper method to get the date and time from timestamp. Converts the Timestamp in Milliseconds to Date and Time and then formats the Date object with <code>Format</code> and returns the String of Date and Time
getFullDateAndTime
{ "repo_name": "SFSU-Jour-680/newspoints", "path": "newsp_lib/src/main/java/newspoints/sfsu/com/newsp_lib/util/AppUtil.java", "license": "apache-2.0", "size": 4929 }
[ "java.sql.Date", "java.text.Format", "java.text.SimpleDateFormat", "java.util.Locale" ]
import java.sql.Date; import java.text.Format; import java.text.SimpleDateFormat; import java.util.Locale;
import java.sql.*; import java.text.*; import java.util.*;
[ "java.sql", "java.text", "java.util" ]
java.sql; java.text; java.util;
471,717
public UpdateSettingsRequest settings(Map<String, ?> source) { this.settings = Settings.builder().loadFromMap(source).build(); return this; }
UpdateSettingsRequest function(Map<String, ?> source) { this.settings = Settings.builder().loadFromMap(source).build(); return this; }
/** * Sets the settings to be updated (either json or yaml format) */
Sets the settings to be updated (either json or yaml format)
settings
{ "repo_name": "nknize/elasticsearch", "path": "server/src/main/java/org/elasticsearch/action/admin/indices/settings/put/UpdateSettingsRequest.java", "license": "apache-2.0", "size": 7932 }
[ "java.util.Map", "org.elasticsearch.common.settings.Settings" ]
import java.util.Map; import org.elasticsearch.common.settings.Settings;
import java.util.*; import org.elasticsearch.common.settings.*;
[ "java.util", "org.elasticsearch.common" ]
java.util; org.elasticsearch.common;
2,770,273
public MovieFromListUI transform(SearchJSONResults.SearchJSONEntity searchItem) { if (searchItem == null) { throw new IllegalArgumentException("Cannot transform a null value"); } MovieFromListUI movieFromListUI = new MovieFromListUI(); movieFromListUI.setTitle(searchItem....
MovieFromListUI function(SearchJSONResults.SearchJSONEntity searchItem) { if (searchItem == null) { throw new IllegalArgumentException(STR); } MovieFromListUI movieFromListUI = new MovieFromListUI(); movieFromListUI.setTitle(searchItem.getTitle()); movieFromListUI.setUrl(searchItem.getImageUrl()); movieFromListUI.setIm...
/** * Transform a {@link SearchJSONResults.SearchJSONEntity} into an {@link MovieFromListUI}. * * @param searchItem Object to be transformed. * @return {@link MovieFromListUI}. */
Transform a <code>SearchJSONResults.SearchJSONEntity</code> into an <code>MovieFromListUI</code>
transform
{ "repo_name": "noloman/Movies-Finder", "path": "android/src/main/java/com/raulh82vlc/MoviesFinder/domain/mapper/MoviesListModelDataMapper.java", "license": "apache-2.0", "size": 2937 }
[ "com.raulh82vlc.MoviesFinder" ]
import com.raulh82vlc.MoviesFinder;
import com.raulh82vlc.*;
[ "com.raulh82vlc" ]
com.raulh82vlc;
2,702,332
private void tryErroneousProduction( String production, String testLangFragment, String errorMsg ) { try { parseMethod( production, testLangFragment); } catch (Throwable e) { if( !(e instanceof OncoPrintLangException)){ System.out.println( e.getClass().getName() ); ...
void function( String production, String testLangFragment, String errorMsg ) { try { parseMethod( production, testLangFragment); } catch (Throwable e) { if( !(e instanceof OncoPrintLangException)){ System.out.println( e.getClass().getName() ); e.printStackTrace(); } Assert.assertTrue(e instanceof OncoPrintLangException...
/** * check that IllegalArgumentException with appropriate error message is thrown */
check that IllegalArgumentException with appropriate error message is thrown
tryErroneousProduction
{ "repo_name": "HectorWon/cbioportal", "path": "core/src/test/java/org/mskcc/cbio/portal/oncoPrintSpecLanguage/TestOncoPrintSpecificationInParser.java", "license": "agpl-3.0", "size": 31678 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,714,387
public SegmentBlob writeStream(InputStream stream) throws IOException { boolean threw = true; try { RecordId id = SegmentStream.getRecordIdIfAvailable(stream, store); if (id == null) { id = internalWriteStream(stream); } threw = false; ...
SegmentBlob function(InputStream stream) throws IOException { boolean threw = true; try { RecordId id = SegmentStream.getRecordIdIfAvailable(stream, store); if (id == null) { id = internalWriteStream(stream); } threw = false; return new SegmentBlob(id); } finally { Closeables.close(stream, threw); } }
/** * Writes a stream value record. The given stream is consumed * <em>and closed</em> by this method. * * @param stream stream to be written * @return value record identifier * @throws IOException if the stream could not be read */
Writes a stream value record. The given stream is consumed and closed by this method
writeStream
{ "repo_name": "afilimonov/jackrabbit-oak", "path": "oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentWriter.java", "license": "apache-2.0", "size": 48153 }
[ "com.google.common.io.Closeables", "java.io.IOException", "java.io.InputStream" ]
import com.google.common.io.Closeables; import java.io.IOException; import java.io.InputStream;
import com.google.common.io.*; import java.io.*;
[ "com.google.common", "java.io" ]
com.google.common; java.io;
1,940,293
public void noCachingTest() throws SQLException { String schema = this.getTestConfiguration().getUserName(); String sql = "VALUES 1"; Statement s = createStatement(); s.executeQuery(sql).close(); s.close(); assertFalse(sql, isPlanInCache(schema, ...
void function() throws SQLException { String schema = this.getTestConfiguration().getUserName(); String sql = STR; Statement s = createStatement(); s.executeQuery(sql).close(); s.close(); assertFalse(sql, isPlanInCache(schema, sql)); prepareStatement(sql).close(); assertFalse(sql, isPlanInCache(schema, sql)); sql = STR...
/** * Check that when the cache size is set to zero that * no caching takes place. Tests with Statement, PreparedStatement * and CallableStatement. */
Check that when the cache size is set to zero that no caching takes place. Tests with Statement, PreparedStatement and CallableStatement
noCachingTest
{ "repo_name": "apache/derby", "path": "java/org.apache.derby.tests/org/apache/derbyTesting/functionTests/tests/lang/StatementPlanCacheTest.java", "license": "apache-2.0", "size": 11805 }
[ "java.sql.SQLException", "java.sql.Statement" ]
import java.sql.SQLException; import java.sql.Statement;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,953,046
public ProvidedBrowsersComboBoxModel createProvidedBrowsersComboBoxModel() { ProvidedBrowsersComboBoxModel model = new ProvidedBrowsersComboBoxModel(providedBrowserUIList); providedBrowserComboBoxModels.add(new WeakReference<>(model)); return model; }
ProvidedBrowsersComboBoxModel function() { ProvidedBrowsersComboBoxModel model = new ProvidedBrowsersComboBoxModel(providedBrowserUIList); providedBrowserComboBoxModels.add(new WeakReference<>(model)); return model; }
/** * Returns a new {@code ProvidedBrowsersComboBoxModel} with the provided browsers. * * @return a new model with the provided browsers. * @see #getBrowserUIList() * @since 1.1.0 */
Returns a new ProvidedBrowsersComboBoxModel with the provided browsers
createProvidedBrowsersComboBoxModel
{ "repo_name": "denniskniep/zap-extensions", "path": "addOns/selenium/src/main/java/org/zaproxy/zap/extension/selenium/ExtensionSelenium.java", "license": "apache-2.0", "size": 48329 }
[ "java.lang.ref.WeakReference" ]
import java.lang.ref.WeakReference;
import java.lang.ref.*;
[ "java.lang" ]
java.lang;
437,902
@Override public void coreUpdateCatalog(long timestamp, final String catalogDiffs) throws EEException { LOG.trace("Loading Application Catalog..."); int errorCode = 0; errorCode = nativeUpdateCatalog(pointer, timestamp, getStringBytes(catalogDiffs)); checkErrorCode(errorCode); ...
void function(long timestamp, final String catalogDiffs) throws EEException { LOG.trace(STR); int errorCode = 0; errorCode = nativeUpdateCatalog(pointer, timestamp, getStringBytes(catalogDiffs)); checkErrorCode(errorCode); }
/** * Provide a catalog diff and a new catalog version and update the * engine's catalog. */
Provide a catalog diff and a new catalog version and update the engine's catalog
coreUpdateCatalog
{ "repo_name": "migue/voltdb", "path": "src/frontend/org/voltdb/jni/ExecutionEngineJNI.java", "license": "agpl-3.0", "size": 25696 }
[ "org.voltdb.exceptions.EEException" ]
import org.voltdb.exceptions.EEException;
import org.voltdb.exceptions.*;
[ "org.voltdb.exceptions" ]
org.voltdb.exceptions;
259,780
List<PlatformIdent> findByName(String agentName);
List<PlatformIdent> findByName(String agentName);
/** * Finds agent(s) that are registered with given agent name. Same as calling * {@link #findByNameAndIps(String, null)}. * * @param agentName * Name of the agent to search for. * @return The list of {@link PlatformIdent} objects. */
Finds agent(s) that are registered with given agent name. Same as calling <code>#findByNameAndIps(String, null)</code>
findByName
{ "repo_name": "inspectIT/inspectIT", "path": "inspectit.server/src/main/java/rocks/inspectit/server/dao/PlatformIdentDao.java", "license": "agpl-3.0", "size": 2525 }
[ "java.util.List", "rocks.inspectit.shared.all.cmr.model.PlatformIdent" ]
import java.util.List; import rocks.inspectit.shared.all.cmr.model.PlatformIdent;
import java.util.*; import rocks.inspectit.shared.all.cmr.model.*;
[ "java.util", "rocks.inspectit.shared" ]
java.util; rocks.inspectit.shared;
1,761,394
private String lookupVolume(String volumeIdOrName) { String ret = null; if(! Utils.isEmptyOrWhitespaces(volumeIdOrName)) { // Lookup by volume ID DescribeVolumesRequest dvs = new DescribeVolumesRequest(Collections.singletonList(volumeIdOrName)); DescribeVolumesResult dvsresult = null; try { dvs...
String function(String volumeIdOrName) { String ret = null; if(! Utils.isEmptyOrWhitespaces(volumeIdOrName)) { DescribeVolumesRequest dvs = new DescribeVolumesRequest(Collections.singletonList(volumeIdOrName)); DescribeVolumesResult dvsresult = null; try { dvsresult = this.ec2Api.describeVolumes(dvs); } catch(Exception...
/** * Looks up volume, by ID or Name tag. * @param volumeIdOrName the EBS volume ID or Name tag * @return The volume ID of 1st matching volume found, null if no volume found */
Looks up volume, by ID or Name tag
lookupVolume
{ "repo_name": "gibello/roboconf", "path": "core/roboconf-target-iaas-ec2/src/main/java/net/roboconf/target/ec2/internal/Ec2MachineConfigurator.java", "license": "apache-2.0", "size": 15383 }
[ "com.amazonaws.services.ec2.model.DescribeVolumesRequest", "com.amazonaws.services.ec2.model.DescribeVolumesResult", "com.amazonaws.services.ec2.model.Filter", "java.util.Collections", "net.roboconf.core.utils.Utils" ]
import com.amazonaws.services.ec2.model.DescribeVolumesRequest; import com.amazonaws.services.ec2.model.DescribeVolumesResult; import com.amazonaws.services.ec2.model.Filter; import java.util.Collections; import net.roboconf.core.utils.Utils;
import com.amazonaws.services.ec2.model.*; import java.util.*; import net.roboconf.core.utils.*;
[ "com.amazonaws.services", "java.util", "net.roboconf.core" ]
com.amazonaws.services; java.util; net.roboconf.core;
214,761
void checkFacilityContactExists(PerunSession sess, Facility facility, String contactGroupName, Group group) throws FacilityContactNotExistsException;
void checkFacilityContactExists(PerunSession sess, Facility facility, String contactGroupName, Group group) throws FacilityContactNotExistsException;
/** * Check if contact for facility, contact name and group exists. * * @param sess * @param facility * @param contactGroupName * @param group * @throws InternalErrorException * @throws FacilityContactNotExistsException if there is no such contact */
Check if contact for facility, contact name and group exists
checkFacilityContactExists
{ "repo_name": "zoraseb/perun", "path": "perun-core/src/main/java/cz/metacentrum/perun/core/implApi/FacilitiesManagerImplApi.java", "license": "bsd-2-clause", "size": 24424 }
[ "cz.metacentrum.perun.core.api.Facility", "cz.metacentrum.perun.core.api.Group", "cz.metacentrum.perun.core.api.PerunSession", "cz.metacentrum.perun.core.api.exceptions.FacilityContactNotExistsException" ]
import cz.metacentrum.perun.core.api.Facility; import cz.metacentrum.perun.core.api.Group; import cz.metacentrum.perun.core.api.PerunSession; import cz.metacentrum.perun.core.api.exceptions.FacilityContactNotExistsException;
import cz.metacentrum.perun.core.api.*; import cz.metacentrum.perun.core.api.exceptions.*;
[ "cz.metacentrum.perun" ]
cz.metacentrum.perun;
2,155,529
private void addTheme(ViewGroup root, Theme theme) { // Create the layout and assign its theme ThemeView v = (ThemeView)inflate(getContext(), R.layout.theme_view, null); int mw = (int)getResources().getDimension(R.dimen.theme_max_width); int w = (int)(getWidth() / 1.5); this...
void function(ViewGroup root, Theme theme) { ThemeView v = (ThemeView)inflate(getContext(), R.layout.theme_view, null); int mw = (int)getResources().getDimension(R.dimen.theme_max_width); int w = (int)(getWidth() / 1.5); this.mThemeWidth = Math.min(w, mw); v.setLayoutParams( new LinearLayout.LayoutParams( this.mThemeWi...
/** * Method that adds a theme to the roulette * * @param root The root view * @param theme The theme to add */
Method that adds a theme to the roulette
addTheme
{ "repo_name": "AnimeROM/android_package_AnimeManager", "path": "src/com/animerom/filemanager/ui/preferences/ThemeRoulette.java", "license": "apache-2.0", "size": 11018 }
[ "android.graphics.drawable.Drawable", "android.view.ViewGroup", "android.widget.ImageView", "android.widget.LinearLayout", "android.widget.TextView", "com.animerom.filemanager.ui.ThemeManager" ]
import android.graphics.drawable.Drawable; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; import com.animerom.filemanager.ui.ThemeManager;
import android.graphics.drawable.*; import android.view.*; import android.widget.*; import com.animerom.filemanager.ui.*;
[ "android.graphics", "android.view", "android.widget", "com.animerom.filemanager" ]
android.graphics; android.view; android.widget; com.animerom.filemanager;
2,746,698
public static String toXml(Object root, String encoding) { Class clazz = Reflections.getUserClass(root); return toXml(root, clazz, encoding); }
static String function(Object root, String encoding) { Class clazz = Reflections.getUserClass(root); return toXml(root, clazz, encoding); }
/** * Java Object->Xml with encoding. */
Java Object->Xml with encoding
toXml
{ "repo_name": "quangou365/sub", "path": "subadmin/src/main/java/com/thinkgem/jeesite/common/mapper/JaxbMapper.java", "license": "apache-2.0", "size": 4729 }
[ "com.thinkgem.jeesite.common.utils.Reflections" ]
import com.thinkgem.jeesite.common.utils.Reflections;
import com.thinkgem.jeesite.common.utils.*;
[ "com.thinkgem.jeesite" ]
com.thinkgem.jeesite;
269,971
RtfList newList(RtfAttributes attrs) throws IOException;
RtfList newList(RtfAttributes attrs) throws IOException;
/** Close the current list, if any, and starts a new one * @param attrs attributes of new List * @return new List object * @throws IOException for I/O problems */
Close the current list, if any, and starts a new one
newList
{ "repo_name": "pellcorp/fop", "path": "src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/IRtfListContainer.java", "license": "apache-2.0", "size": 1674 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
796,328
private void initializeExecutors(HadoopPrepareForJobRequest req) { int cpus = Runtime.getRuntime().availableProcessors(); // // concMappers = get(req.jobInfo(), EXTERNAL_CONCURRENT_MAPPERS, cpus); // concReducers = get(req.jobInfo(), EXTERNAL_CONCURRENT_REDUCERS, cpus); execSvc = new ...
void function(HadoopPrepareForJobRequest req) { int cpus = Runtime.getRuntime().availableProcessors(); execSvc = new HadoopExecutorService(log, "", cpus * 2, 1024); }
/** * Creates executor services. * * @param req Init child process request. */
Creates executor services
initializeExecutors
{ "repo_name": "f7753/ignite", "path": "modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/taskexecutor/external/child/HadoopChildProcessRunner.java", "license": "apache-2.0", "size": 18314 }
[ "org.apache.ignite.internal.processors.hadoop.taskexecutor.HadoopExecutorService", "org.apache.ignite.internal.processors.hadoop.taskexecutor.external.HadoopPrepareForJobRequest" ]
import org.apache.ignite.internal.processors.hadoop.taskexecutor.HadoopExecutorService; import org.apache.ignite.internal.processors.hadoop.taskexecutor.external.HadoopPrepareForJobRequest;
import org.apache.ignite.internal.processors.hadoop.taskexecutor.*; import org.apache.ignite.internal.processors.hadoop.taskexecutor.external.*;
[ "org.apache.ignite" ]
org.apache.ignite;
113,551
public void setNotificationType(NotificationType notificationType) { FormField formField = FormField.listSingleBuilder(ConfigureNodeFields.notification_type.getFieldName()) .setValue(notificationType) .build(); write(formField); }
void function(NotificationType notificationType) { FormField formField = FormField.listSingleBuilder(ConfigureNodeFields.notification_type.getFieldName()) .setValue(notificationType) .build(); write(formField); }
/** * Sets the NotificationType for the node. * * @param notificationType The enum representing the possible options * @since 4.3 */
Sets the NotificationType for the node
setNotificationType
{ "repo_name": "igniterealtime/Smack", "path": "smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/form/FillableConfigureForm.java", "license": "apache-2.0", "size": 10923 }
[ "org.jivesoftware.smackx.pubsub.ConfigureNodeFields", "org.jivesoftware.smackx.pubsub.NotificationType", "org.jivesoftware.smackx.xdata.FormField" ]
import org.jivesoftware.smackx.pubsub.ConfigureNodeFields; import org.jivesoftware.smackx.pubsub.NotificationType; import org.jivesoftware.smackx.xdata.FormField;
import org.jivesoftware.smackx.pubsub.*; import org.jivesoftware.smackx.xdata.*;
[ "org.jivesoftware.smackx" ]
org.jivesoftware.smackx;
842,155
protected static byte[] pbkdf2(char[] password, byte[] salt, int iterations, int bytes) throws NoSuchAlgorithmException, InvalidKeySpecException { PBEKeySpec spec = new PBEKeySpec(password, salt, iterations, bytes * 8); SecretKeyFactory skf = SecretKeyFactory.getInstance(PBKDF2_ALGORITHM); return skf....
static byte[] function(char[] password, byte[] salt, int iterations, int bytes) throws NoSuchAlgorithmException, InvalidKeySpecException { PBEKeySpec spec = new PBEKeySpec(password, salt, iterations, bytes * 8); SecretKeyFactory skf = SecretKeyFactory.getInstance(PBKDF2_ALGORITHM); return skf.generateSecret(spec).getEn...
/** * Computes the PBKDF2 hash of a password. * * @param password * the password to hash. * @param salt * the salt * @param iterations * the iteration count (slowness factor) * @param bytes * the length of the hash to compute in bytes * @return the PB...
Computes the PBKDF2 hash of a password
pbkdf2
{ "repo_name": "squaregoldfish/QuinCe", "path": "WebApp/src/uk/ac/exeter/QuinCe/User/PasswordHash.java", "license": "gpl-3.0", "size": 12135 }
[ "java.security.NoSuchAlgorithmException", "java.security.spec.InvalidKeySpecException", "javax.crypto.SecretKeyFactory", "javax.crypto.spec.PBEKeySpec" ]
import java.security.NoSuchAlgorithmException; import java.security.spec.InvalidKeySpecException; import javax.crypto.SecretKeyFactory; import javax.crypto.spec.PBEKeySpec;
import java.security.*; import java.security.spec.*; import javax.crypto.*; import javax.crypto.spec.*;
[ "java.security", "javax.crypto" ]
java.security; javax.crypto;
889,098