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 Builder setColor(@ColorInt int argb) { mN.color = argb; sanitizeColor(); return this; }
Builder function(@ColorInt int argb) { mN.color = argb; sanitizeColor(); return this; }
/** * Sets {@link Notification#color}. * * @param argb The accent color to use * * @return The same Builder. */
Sets <code>Notification#color</code>
setColor
{ "repo_name": "daiqiquan/framework-base", "path": "core/java/android/app/Notification.java", "license": "apache-2.0", "size": 264892 }
[ "android.annotation.ColorInt" ]
import android.annotation.ColorInt;
import android.annotation.*;
[ "android.annotation" ]
android.annotation;
1,576,813
public void createPartControl(Composite parent) { viewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL); viewer.setContentProvider(viewContentProvider); ILabelProvider stateLabelProvider = new StateLabelProvider(); viewer.setLabelProvider(stateLabelProvider); ...
void function(Composite parent) { viewer = new TreeViewer(parent, SWT.MULTI SWT.H_SCROLL SWT.V_SCROLL); viewer.setContentProvider(viewContentProvider); ILabelProvider stateLabelProvider = new StateLabelProvider(); viewer.setLabelProvider(stateLabelProvider); viewer.setSorter(new NameSorter(stateLabelProvider)); viewer....
/** * This is a callback that will allow us to create the viewer and initialize it. */
This is a callback that will allow us to create the viewer and initialize it
createPartControl
{ "repo_name": "unintended/pde-osgi-tools", "path": "sources/src/com/github/unintended/depanaleclipse/views/DependencyView.java", "license": "epl-1.0", "size": 23438 }
[ "org.eclipse.jface.viewers.ILabelProvider", "org.eclipse.jface.viewers.TreeViewer", "org.eclipse.jface.viewers.ViewerFilter", "org.eclipse.pde.internal.core.PDECore", "org.eclipse.pde.internal.ui.PDEPlugin", "org.eclipse.swt.widgets.Composite", "org.eclipse.ui.PlatformUI" ]
import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.jface.viewers.TreeViewer; import org.eclipse.jface.viewers.ViewerFilter; import org.eclipse.pde.internal.core.PDECore; import org.eclipse.pde.internal.ui.PDEPlugin; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.PlatformUI;
import org.eclipse.jface.viewers.*; import org.eclipse.pde.internal.core.*; import org.eclipse.pde.internal.ui.*; import org.eclipse.swt.widgets.*; import org.eclipse.ui.*;
[ "org.eclipse.jface", "org.eclipse.pde", "org.eclipse.swt", "org.eclipse.ui" ]
org.eclipse.jface; org.eclipse.pde; org.eclipse.swt; org.eclipse.ui;
143,093
public boolean isPrimaryAction(ActionLookupData actionLookupData) { Preconditions.checkNotNull(primaryAction, "expected primary action to have been set"); return actionLookupData.equals(primaryAction); }
boolean function(ActionLookupData actionLookupData) { Preconditions.checkNotNull(primaryAction, STR); return actionLookupData.equals(primaryAction); }
/** * Whether {@code actionLookupData} is equal to the previously set primary action. May only be * called after the primary action is set. */
Whether actionLookupData is equal to the previously set primary action. May only be called after the primary action is set
isPrimaryAction
{ "repo_name": "dslomov/bazel", "path": "src/main/java/com/google/devtools/build/lib/actions/LostInputsActionExecutionException.java", "license": "apache-2.0", "size": 4960 }
[ "com.google.common.base.Preconditions" ]
import com.google.common.base.Preconditions;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
697,230
// Constants final String exeFileName = "Solitaire.exe"; final int nextScore = 1500; // Offsets are found with a MemReader like CheatEngine final int scoreBaseAddressOffset = 0xBAFA8; final int[] scoreOffsets = new int[] { 0x50, 0x14 }; // Hook to the game final MemEaterBug memEaterBug = new MemEaterBu...
final String exeFileName = STR; final int nextScore = 1500; final int scoreBaseAddressOffset = 0xBAFA8; final int[] scoreOffsets = new int[] { 0x50, 0x14 }; final MemEaterBug memEaterBug = new MemEaterBug(exeFileName); memEaterBug.hookProcess(); final MemManipulator memManipulator = memEaterBug.getMemManipulator(); fin...
/** * Demonstrates the usage of the Mem-Eater-Bug by reading and changing the * user score in the popular game Solitaire.<br/> * <br/> * The program was tested on a Windows 10 64-bit system using the default * 64-bit Solitaire.exe from Windows 7. * * @param args * Not supported */
Demonstrates the usage of the Mem-Eater-Bug by reading and changing the user score in the popular game Solitaire. The program was tested on a Windows 10 64-bit system using the default 64-bit Solitaire.exe from Windows 7
main
{ "repo_name": "ZabuzaW/Mem-Eater-Bug", "path": "src/de/zabuza/memeaterbug/examples/SoliScorer.java", "license": "gpl-3.0", "size": 1848 }
[ "de.zabuza.memeaterbug.MemEaterBug", "de.zabuza.memeaterbug.memory.MemManipulator" ]
import de.zabuza.memeaterbug.MemEaterBug; import de.zabuza.memeaterbug.memory.MemManipulator;
import de.zabuza.memeaterbug.*; import de.zabuza.memeaterbug.memory.*;
[ "de.zabuza.memeaterbug" ]
de.zabuza.memeaterbug;
1,193,197
private DefaultTableModel getQtlTableModel() { return (DefaultTableModel)this.qtlTable.getModel(); }
DefaultTableModel function() { return (DefaultTableModel)this.qtlTable.getModel(); }
/** * convenience function for getting a narrowed cast of the qtl table * model * @return * the model */
convenience function for getting a narrowed cast of the qtl table model
getQtlTableModel
{ "repo_name": "churchill-lab/j-qtl", "path": "modules/main/src/java/org/jax/qtl/cross/gui/QtlBasketPanel.java", "license": "gpl-3.0", "size": 23827 }
[ "javax.swing.table.DefaultTableModel" ]
import javax.swing.table.DefaultTableModel;
import javax.swing.table.*;
[ "javax.swing" ]
javax.swing;
708,827
Observable<List<Request>> requests();
Observable<List<Request>> requests();
/** * Get an {@link Observable} which will emit a List of {@link Request}. */
Get an <code>Observable</code> which will emit a List of <code>Request</code>
requests
{ "repo_name": "zhekin/AmconApp", "path": "app/src/main/java/com/oliinykov/yevgen/android/amconapp/domain/repository/RequestRepository.java", "license": "apache-2.0", "size": 1239 }
[ "com.oliinykov.yevgen.android.amconapp.domain.Request", "java.util.List" ]
import com.oliinykov.yevgen.android.amconapp.domain.Request; import java.util.List;
import com.oliinykov.yevgen.android.amconapp.domain.*; import java.util.*;
[ "com.oliinykov.yevgen", "java.util" ]
com.oliinykov.yevgen; java.util;
244,044
@Test public void testPublicCloneable() { LineAndShapeRenderer r1 = new LineAndShapeRenderer(); assertTrue(r1 instanceof PublicCloneable); }
void function() { LineAndShapeRenderer r1 = new LineAndShapeRenderer(); assertTrue(r1 instanceof PublicCloneable); }
/** * Check that this class implements PublicCloneable. */
Check that this class implements PublicCloneable
testPublicCloneable
{ "repo_name": "GitoMat/jfreechart", "path": "src/test/java/org/jfree/chart/renderer/category/LineAndShapeRendererTest.java", "license": "lgpl-2.1", "size": 10807 }
[ "org.jfree.util.PublicCloneable", "org.junit.Assert" ]
import org.jfree.util.PublicCloneable; import org.junit.Assert;
import org.jfree.util.*; import org.junit.*;
[ "org.jfree.util", "org.junit" ]
org.jfree.util; org.junit;
2,130,679
@VisibleForTesting protected static DiffPathSet fullPathDiff(HiveLocationDescriptor sourceLocation, HiveLocationDescriptor desiredTargetLocation, Optional<HiveLocationDescriptor> currentTargetLocation, Optional<Partition> partition, MultiTimingEvent multiTimer, HiveCopyEntityHelper helper) throws IOExce...
static DiffPathSet function(HiveLocationDescriptor sourceLocation, HiveLocationDescriptor desiredTargetLocation, Optional<HiveLocationDescriptor> currentTargetLocation, Optional<Partition> partition, MultiTimingEvent multiTimer, HiveCopyEntityHelper helper) throws IOException { DiffPathSet.DiffPathSetBuilder builder = ...
/** * Compares three entities to figure out which files should be copied and which files should be deleted in the target * file system. * @param sourceLocation Represents the source table or partition. * @param desiredTargetLocation Represents the new desired table or partition. * @param currentTargetLoc...
Compares three entities to figure out which files should be copied and which files should be deleted in the target file system
fullPathDiff
{ "repo_name": "jenniferzheng/gobblin", "path": "gobblin-data-management/src/main/java/org/apache/gobblin/data/management/copy/hive/HiveCopyEntityHelper.java", "license": "apache-2.0", "size": 36963 }
[ "com.google.common.base.Optional", "com.google.common.collect.Maps", "java.io.IOException", "java.util.Arrays", "java.util.Map", "org.apache.commons.lang3.StringUtils", "org.apache.gobblin.metrics.event.MultiTimingEvent", "org.apache.hadoop.fs.FileStatus", "org.apache.hadoop.fs.Path", "org.apache....
import com.google.common.base.Optional; import com.google.common.collect.Maps; import java.io.IOException; import java.util.Arrays; import java.util.Map; import org.apache.commons.lang3.StringUtils; import org.apache.gobblin.metrics.event.MultiTimingEvent; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoo...
import com.google.common.base.*; import com.google.common.collect.*; import java.io.*; import java.util.*; import org.apache.commons.lang3.*; import org.apache.gobblin.metrics.event.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hive.ql.metadata.*; import org.apache.hadoop.mapred.*;
[ "com.google.common", "java.io", "java.util", "org.apache.commons", "org.apache.gobblin", "org.apache.hadoop" ]
com.google.common; java.io; java.util; org.apache.commons; org.apache.gobblin; org.apache.hadoop;
2,428,302
public void test_delete_leader() throws Exception { final ABC abc = new ABC(true); final HAGlue serverA = abc.serverA, serverB = abc.serverB, serverC = abc.serverC; // The expected HStatus for each of the services (A,B,C). final HAStatusEnum[] expectedHAStatusArray = new HAStatusE...
void function() throws Exception { final ABC abc = new ABC(true); final HAGlue serverA = abc.serverA, serverB = abc.serverB, serverC = abc.serverC; final HAStatusEnum[] expectedHAStatusArray = new HAStatusEnum[] { HAStatusEnum.Follower, }; final HAGlue[] services = new HAGlue[] { serverA, serverB, serverC }; awaitFully...
/** * Test of DELETE on the leader. */
Test of DELETE on the leader
test_delete_leader
{ "repo_name": "rac021/blazegraph_1_5_3_cluster_2_nodes", "path": "bigdata-jini/src/test/java/com/bigdata/journal/jini/ha/AbstractHA3LoadBalancerTestCase.java", "license": "gpl-2.0", "size": 20750 }
[ "com.bigdata.ha.HAGlue", "com.bigdata.ha.HAStatusEnum", "com.bigdata.rdf.sail.webapp.client.RemoteRepository", "com.bigdata.rdf.sail.webapp.client.RemoteRepositoryManager", "org.eclipse.jetty.client.HttpClient" ]
import com.bigdata.ha.HAGlue; import com.bigdata.ha.HAStatusEnum; import com.bigdata.rdf.sail.webapp.client.RemoteRepository; import com.bigdata.rdf.sail.webapp.client.RemoteRepositoryManager; import org.eclipse.jetty.client.HttpClient;
import com.bigdata.ha.*; import com.bigdata.rdf.sail.webapp.client.*; import org.eclipse.jetty.client.*;
[ "com.bigdata.ha", "com.bigdata.rdf", "org.eclipse.jetty" ]
com.bigdata.ha; com.bigdata.rdf; org.eclipse.jetty;
2,039,936
public Page previousPage();
Page function();
/** * Moves back to the previous page of the questionnaire. * * @return new current page (previous page) */
Moves back to the previous page of the questionnaire
previousPage
{ "repo_name": "apruden/onyx", "path": "onyx-modules/quartz/quartz-core/src/main/java/org/obiba/onyx/quartz/core/service/ActiveQuestionnaireAdministrationService.java", "license": "gpl-3.0", "size": 11728 }
[ "org.obiba.onyx.quartz.core.engine.questionnaire.question.Page" ]
import org.obiba.onyx.quartz.core.engine.questionnaire.question.Page;
import org.obiba.onyx.quartz.core.engine.questionnaire.question.*;
[ "org.obiba.onyx" ]
org.obiba.onyx;
488,652
@RequestMapping("/downloadInputFile.do") public ModelAndView downloadFile(HttpServletRequest request, HttpServletResponse response) { String dirPathStr = request.getParameter("dirPath"); String fileName = request.getParameter("filename"); String erro...
@RequestMapping(STR) ModelAndView function(HttpServletRequest request, HttpServletResponse response) { String dirPathStr = request.getParameter(STR); String fileName = request.getParameter(STR); String errorString = null; if (dirPathStr != null && fileName != null) { logger.debug(STR+dirPathStr+fileName+"."); File f = ...
/** * Sends the contents of a input job file to the client. * * @param request The servlet request including a filename parameter * * @param response The servlet response receiving the data * * @return null on success or the joblist view with an error parameter on ...
Sends the contents of a input job file to the client
downloadFile
{ "repo_name": "AuScope/GeodesyWorkflow", "path": "src/main/java/org/auscope/portal/server/web/controllers/GridSubmitController.java", "license": "gpl-3.0", "size": 84237 }
[ "java.io.File", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse", "org.springframework.web.bind.annotation.RequestMapping", "org.springframework.web.servlet.ModelAndView" ]
import java.io.File; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.servlet.ModelAndView;
import java.io.*; import javax.servlet.http.*; import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.*;
[ "java.io", "javax.servlet", "org.springframework.web" ]
java.io; javax.servlet; org.springframework.web;
183,709
public DistributedSystemMXBean getDistributedSystemMXBean() { return getMBeanProxy(MBeanJMXAdapter.getDistributedSystemName(), DistributedSystemMXBean.class); }
DistributedSystemMXBean function() { return getMBeanProxy(MBeanJMXAdapter.getDistributedSystemName(), DistributedSystemMXBean.class); }
/** * Gets a proxy to the remote DistributedSystem MXBean to access attributes and invoke operations on the distributed * system, or the GemFire cluster. * * @return a proxy instance of the GemFire Manager's DistributedSystem MXBean. * @see #getMBeanProxy(javax.management.ObjectName, Class) * @see co...
Gets a proxy to the remote DistributedSystem MXBean to access attributes and invoke operations on the distributed system, or the GemFire cluster
getDistributedSystemMXBean
{ "repo_name": "ameybarve15/incubator-geode", "path": "gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/web/shell/AbstractHttpOperationInvoker.java", "license": "apache-2.0", "size": 35164 }
[ "com.gemstone.gemfire.management.DistributedSystemMXBean", "com.gemstone.gemfire.management.internal.MBeanJMXAdapter" ]
import com.gemstone.gemfire.management.DistributedSystemMXBean; import com.gemstone.gemfire.management.internal.MBeanJMXAdapter;
import com.gemstone.gemfire.management.*; import com.gemstone.gemfire.management.internal.*;
[ "com.gemstone.gemfire" ]
com.gemstone.gemfire;
137,527
public Builder requiresConfigurationFragments(ConfigurationTransition transition, Collection<Class<?>> configurationFragments) { // We can relax this assumption if needed. But it's already sketchy to let a rule see more // than its own configuration. So we don't want to casually proliferate this...
Builder function(ConfigurationTransition transition, Collection<Class<?>> configurationFragments) { Preconditions.checkArgument( transition == NoTransition.INSTANCE transition.isHostTransition()); requiredConfigurationFragments.putAll(transition, configurationFragments); return this; }
/** * Declares that the implementation of the associated rule class requires the given * fragments to be present in the specified configuration. Valid transition values are * HOST for the host configuration and NONE for the target configuration. * * <p>The value is inherited by subclasses. ...
Declares that the implementation of the associated rule class requires the given fragments to be present in the specified configuration. Valid transition values are HOST for the host configuration and NONE for the target configuration. The value is inherited by subclasses
requiresConfigurationFragments
{ "repo_name": "aehlig/bazel", "path": "src/main/java/com/google/devtools/build/lib/packages/ConfigurationFragmentPolicy.java", "license": "apache-2.0", "size": 11166 }
[ "com.google.common.base.Preconditions", "com.google.devtools.build.lib.analysis.config.transitions.ConfigurationTransition", "com.google.devtools.build.lib.analysis.config.transitions.NoTransition", "java.util.Collection" ]
import com.google.common.base.Preconditions; import com.google.devtools.build.lib.analysis.config.transitions.ConfigurationTransition; import com.google.devtools.build.lib.analysis.config.transitions.NoTransition; import java.util.Collection;
import com.google.common.base.*; import com.google.devtools.build.lib.analysis.config.transitions.*; import java.util.*;
[ "com.google.common", "com.google.devtools", "java.util" ]
com.google.common; com.google.devtools; java.util;
2,616,019
private static final GenericListener listener_persistentOutOfMemory = new GenericListener() { private void forceOutOfMemory() { peskyMemory = new ArrayList(); // Allocate this _before_ exhausting memory :-) final AssertionError whoops = new AssertionError("Timeout!"); try { for ...
static final GenericListener listener_persistentOutOfMemory = new GenericListener() { private void function() { peskyMemory = new ArrayList(); final AssertionError whoops = new AssertionError(STR); try { for (;;) { peskyMemory.add(new long[100000]); } } catch (OutOfMemoryError e) { SystemFailure.setFailure(e); long fin...
/** * Allocate objects until death */
Allocate objects until death
forceOutOfMemory
{ "repo_name": "jdeppe-pivotal/geode", "path": "geode-core/src/distributedTest/java/org/apache/geode/internal/cache/SystemFailureDUnitTest.java", "license": "apache-2.0", "size": 22921 }
[ "java.util.ArrayList", "org.apache.geode.SystemFailure", "org.apache.geode.test.dunit.Assert" ]
import java.util.ArrayList; import org.apache.geode.SystemFailure; import org.apache.geode.test.dunit.Assert;
import java.util.*; import org.apache.geode.*; import org.apache.geode.test.dunit.*;
[ "java.util", "org.apache.geode" ]
java.util; org.apache.geode;
253,790
public void addPreloadEntry(GridCacheEntryInfo info) { assert info.cacheId() != 0; if (preloadEntries == null) preloadEntries = new ArrayList<>(); preloadEntries.add(info); }
void function(GridCacheEntryInfo info) { assert info.cacheId() != 0; if (preloadEntries == null) preloadEntries = new ArrayList<>(); preloadEntries.add(info); }
/** * Adds preload entry. * * @param info Info to add. */
Adds preload entry
addPreloadEntry
{ "repo_name": "pperalta/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareResponse.java", "license": "apache-2.0", "size": 10326 }
[ "java.util.ArrayList", "org.apache.ignite.internal.processors.cache.GridCacheEntryInfo" ]
import java.util.ArrayList; import org.apache.ignite.internal.processors.cache.GridCacheEntryInfo;
import java.util.*; import org.apache.ignite.internal.processors.cache.*;
[ "java.util", "org.apache.ignite" ]
java.util; org.apache.ignite;
1,482,960
//TODO Particles and update to Github public static void showParticleCentral(Particle particle, World world, int x, int y, int z, double dx, double dy, double dz, int speed) { showParticle(particle, world, x + 0.5, y + 0.5, z + 0.5, dx, dy, dz, speed); }
static void function(Particle particle, World world, int x, int y, int z, double dx, double dy, double dz, int speed) { showParticle(particle, world, x + 0.5, y + 0.5, z + 0.5, dx, dy, dz, speed); }
/** * Shows particles centred at a block position * @param particle the type of particle to display * @param world the world in which the particles will be displayed * @param x the x coordinate where the particles will be displayed * @param y the y coordinate where the particles will be displayed * @param z...
Shows particles centred at a block position
showParticleCentral
{ "repo_name": "BossWasHere/MechanicalTools", "path": "src/main/java/com/mechanicals/plugin/particle/ParticleManager.java", "license": "lgpl-3.0", "size": 2444 }
[ "org.bukkit.Particle", "org.bukkit.World" ]
import org.bukkit.Particle; import org.bukkit.World;
import org.bukkit.*;
[ "org.bukkit" ]
org.bukkit;
1,470,367
@SuppressWarnings("unchecked") public T build() { try { Class<?> clazz = Class.forName(fullQualifiedClassName); T instance = (T) clazz.newInstance(); attributes.values().stream().filter(Attribute::isNotReference).forEach(attribute -> { setBeanProperty...
@SuppressWarnings(STR) T function() { try { Class<?> clazz = Class.forName(fullQualifiedClassName); T instance = (T) clazz.newInstance(); attributes.values().stream().filter(Attribute::isNotReference).forEach(attribute -> { setBeanProperty(instance, attribute.getId(), attribute.getValue()); }); factoryManager.context()...
/** * Create an instance based on the definitions of this factory. * * @return an instance of type T */
Create an instance based on the definitions of this factory
build
{ "repo_name": "wrpinheiro/easy-factory", "path": "core/src/main/java/com/thecodeinside/easyfactory/core/Factory.java", "license": "mit", "size": 5900 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
993,721
public final void readBinderList(List<IBinder> list) { int M = list.size(); int N = readInt(); int i = 0; for (; i < M && i < N; i++) { list.set(i, readStrongBinder()); } for (; i<N; i++) { list.add(readStrongBinder()); } for (;...
final void function(List<IBinder> list) { int M = list.size(); int N = readInt(); int i = 0; for (; i < M && i < N; i++) { list.set(i, readStrongBinder()); } for (; i<N; i++) { list.add(readStrongBinder()); } for (; i<M; i++) { list.remove(N); } }
/** * Read into the given List items IBinder objects that were written with * {@link #writeBinderList} at the current dataPosition(). * * @return A newly created ArrayList containing strings with the same data * as those that were previously written. * * @see #writeBinderList ...
Read into the given List items IBinder objects that were written with <code>#writeBinderList</code> at the current dataPosition()
readBinderList
{ "repo_name": "JSDemos/android-sdk-20", "path": "src/android/os/Parcel.java", "license": "apache-2.0", "size": 81518 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
378,542
private void setUpHashMap() throws ExecException { SchemaTupleFactory[] inputSchemaTupleFactories = new SchemaTupleFactory[inputSchemas.length]; SchemaTupleFactory[] keySchemaTupleFactories = new SchemaTupleFactory[inputSchemas.length]; for (int i = 0; i < inputSchemas.length; i++) { ...
void function() throws ExecException { SchemaTupleFactory[] inputSchemaTupleFactories = new SchemaTupleFactory[inputSchemas.length]; SchemaTupleFactory[] keySchemaTupleFactories = new SchemaTupleFactory[inputSchemas.length]; for (int i = 0; i < inputSchemas.length; i++) { Schema schema = inputSchemas[i]; if (schema != ...
/** * Builds the HashMaps by reading each replicated input from the DFS using a * Load operator * * @throws ExecException */
Builds the HashMaps by reading each replicated input from the DFS using a Load operator
setUpHashMap
{ "repo_name": "hxquangnhat/PIG-ROLLUP-AUTO-HII", "path": "src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POFRJoin.java", "license": "apache-2.0", "size": 20286 }
[ "java.util.Arrays", "java.util.Properties", "org.apache.pig.ExecType", "org.apache.pig.backend.executionengine.ExecException", "org.apache.pig.backend.hadoop.datastorage.ConfigurationUtil", "org.apache.pig.backend.hadoop.executionengine.physicalLayer.POStatus", "org.apache.pig.backend.hadoop.executionen...
import java.util.Arrays; import java.util.Properties; import org.apache.pig.ExecType; import org.apache.pig.backend.executionengine.ExecException; import org.apache.pig.backend.hadoop.datastorage.ConfigurationUtil; import org.apache.pig.backend.hadoop.executionengine.physicalLayer.POStatus; import org.apache.pig.backen...
import java.util.*; import org.apache.pig.*; import org.apache.pig.backend.executionengine.*; import org.apache.pig.backend.hadoop.datastorage.*; import org.apache.pig.backend.hadoop.executionengine.*; import org.apache.pig.data.*; import org.apache.pig.impl.*; import org.apache.pig.impl.io.*; import org.apache.pig.imp...
[ "java.util", "org.apache.pig" ]
java.util; org.apache.pig;
2,429,223
private void prepareItems(String prefix, boolean excludeUnselected, ListModel model) { if (model != null) { List<String> optList = new ArrayList<String>(); final boolean old = _childable; try { _childable = true; final ItemRenderer renderer = getRealRenderer(); // order by _selIdxs content if ...
void function(String prefix, boolean excludeUnselected, ListModel model) { if (model != null) { List<String> optList = new ArrayList<String>(); final boolean old = _childable; try { _childable = true; final ItemRenderer renderer = getRealRenderer(); if (excludeUnselected) { for (int i = 0; i < _selIdxs.size(); i++) { S...
/** * prepare the list content or selected items to render, * @param prefix * Only add the item starts with it if it is not null. * @param excludeUnselected * Only add selected item, with select order. * @param model * the model to render. */
prepare the list content or selected items to render
prepareItems
{ "repo_name": "benbai123/chosenbox", "path": "src/org/zkoss/addon/chosenbox/Chosenbox.java", "license": "lgpl-3.0", "size": 22843 }
[ "java.util.ArrayList", "java.util.List", "org.zkoss.zk.ui.UiException", "org.zkoss.zul.ItemRenderer", "org.zkoss.zul.ListModel" ]
import java.util.ArrayList; import java.util.List; import org.zkoss.zk.ui.UiException; import org.zkoss.zul.ItemRenderer; import org.zkoss.zul.ListModel;
import java.util.*; import org.zkoss.zk.ui.*; import org.zkoss.zul.*;
[ "java.util", "org.zkoss.zk", "org.zkoss.zul" ]
java.util; org.zkoss.zk; org.zkoss.zul;
1,820,351
public int getItemCountForCard(Pair<Date, String> dateAndDomain) { return getCurrentPageCount(dateAndDomain) * ITEM_COUNT_PER_PAGE; }
int function(Pair<Date, String> dateAndDomain) { return getCurrentPageCount(dateAndDomain) * ITEM_COUNT_PER_PAGE; }
/** * Called to get the item count on the card. * @param dateAndDomain The date and domain for the items in the card. * @return The number of items being shown on the card. */
Called to get the item count on the card
getItemCountForCard
{ "repo_name": "ric2b/Vivaldi-browser", "path": "chromium/chrome/browser/download/internal/android/java/src/org/chromium/chrome/browser/download/home/list/mutator/CardPaginator.java", "license": "bsd-3-clause", "size": 2349 }
[ "android.util.Pair", "java.util.Date" ]
import android.util.Pair; import java.util.Date;
import android.util.*; import java.util.*;
[ "android.util", "java.util" ]
android.util; java.util;
376,592
public synchronized Collection<String> getPropertyNames() { if (properties == null) { return Collections.emptySet(); } return Collections.unmodifiableSet(new HashSet<String>(properties.keySet())); }
synchronized Collection<String> function() { if (properties == null) { return Collections.emptySet(); } return Collections.unmodifiableSet(new HashSet<String>(properties.keySet())); }
/** * Returns an unmodifiable collection of all the property names that are set. * * @return all property names. */
Returns an unmodifiable collection of all the property names that are set
getPropertyNames
{ "repo_name": "opg7371/Smack", "path": "smack-extensions/src/main/java/org/jivesoftware/smackx/jiveproperties/packet/JivePropertiesExtension.java", "license": "apache-2.0", "size": 7557 }
[ "java.util.Collection", "java.util.Collections", "java.util.HashSet" ]
import java.util.Collection; import java.util.Collections; import java.util.HashSet;
import java.util.*;
[ "java.util" ]
java.util;
1,781,029
void configure(Config config);
void configure(Config config);
/** * called by the bean creator to allow custom modifications to the configuration * * @param config the configuration to modify */
called by the bean creator to allow custom modifications to the configuration
configure
{ "repo_name": "taimos/dvalin", "path": "cluster/hazelcast/src/main/java/de/taimos/dvalin/cluster/hazelcast/ConfigProvider.java", "license": "apache-2.0", "size": 1003 }
[ "com.hazelcast.config.Config" ]
import com.hazelcast.config.Config;
import com.hazelcast.config.*;
[ "com.hazelcast.config" ]
com.hazelcast.config;
881,952
private static Date convertDateStringToDate(String dateString) { Calendar cal = null; try{ String[] dateParts = dateString.split("-"); cal = new GregorianCalendar( Integer.valueOf(dateParts[0]), Integer.valueOf(dateParts[1])-1, Integer.valueOf(dateParts[2]) ); }catch(Exception e){ ...
static Date function(String dateString) { Calendar cal = null; try{ String[] dateParts = dateString.split("-"); cal = new GregorianCalendar( Integer.valueOf(dateParts[0]), Integer.valueOf(dateParts[1])-1, Integer.valueOf(dateParts[2]) ); }catch(Exception e){ throw new FormatDateException(STR); } return cal.getTime(); }
/** * Convert date pattern yyyy-MM-dd to Date object * * @param dateString * @return */
Convert date pattern yyyy-MM-dd to Date object
convertDateStringToDate
{ "repo_name": "christopherscotini/sonicbot-collector", "path": "src/main/java/com/gamaset/sonicbot/collector/infra/utils/DateUtils.java", "license": "mit", "size": 2828 }
[ "com.gamaset.sonicbot.collector.infra.exception.FormatDateException", "java.util.Calendar", "java.util.Date", "java.util.GregorianCalendar" ]
import com.gamaset.sonicbot.collector.infra.exception.FormatDateException; import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar;
import com.gamaset.sonicbot.collector.infra.exception.*; import java.util.*;
[ "com.gamaset.sonicbot", "java.util" ]
com.gamaset.sonicbot; java.util;
1,472,063
public List<String> process(String id, String userId) { if(id == null || userId == null) { messages.add("There was a problem: parameter id and/or userId was null."); //TODO add to audit trail } currentUserId = userId; ContentResource resource; Document...
List<String> function(String id, String userId) { if(id == null userId == null) { messages.add(STR); } currentUserId = userId; ContentResource resource; Document doc; InputStream in = null; try { contentHostingService.checkResource(id); resource = contentHostingService.getResource(id); in = resource.streamContent(); SA...
/** * Parse and save or update evaluation data found in an XML ContentResource * * @param id The Reference id of the ContentResource * @param userId * @return String error message(s) */
Parse and save or update evaluation data found in an XML ContentResource
process
{ "repo_name": "sakaiproject/evaluation", "path": "sakai-evaluation-impl/src/java/org/sakaiproject/evaluation/logic/imports/EvalImportImpl.java", "license": "apache-2.0", "size": 67670 }
[ "java.io.InputStream", "java.util.List", "org.jdom2.Document", "org.jdom2.input.SAXBuilder", "org.sakaiproject.content.api.ContentResource" ]
import java.io.InputStream; import java.util.List; import org.jdom2.Document; import org.jdom2.input.SAXBuilder; import org.sakaiproject.content.api.ContentResource;
import java.io.*; import java.util.*; import org.jdom2.*; import org.jdom2.input.*; import org.sakaiproject.content.api.*;
[ "java.io", "java.util", "org.jdom2", "org.jdom2.input", "org.sakaiproject.content" ]
java.io; java.util; org.jdom2; org.jdom2.input; org.sakaiproject.content;
2,674,463
public static void removeDir(String directory) throws IOException { File targetDir = new File(directory); if (!targetDir.exists()) { return; } if (targetDir.isDirectory()) { for (File child : targetDir.listFiles()) { if (child != null) { removeDir(child.getAbsolutePath()); } } targe...
static void function(String directory) throws IOException { File targetDir = new File(directory); if (!targetDir.exists()) { return; } if (targetDir.isDirectory()) { for (File child : targetDir.listFiles()) { if (child != null) { removeDir(child.getAbsolutePath()); } } targetDir.delete(); } else { targetDir.delete(); }...
/** * Removes a whole directory. * * @param directory * directory to be removed * @throws IOException * thrown if dir cannot be removed */
Removes a whole directory
removeDir
{ "repo_name": "sopeco/LPE-Common", "path": "org.lpe.common.utils/src/org/lpe/common/util/LpeFileUtils.java", "license": "apache-2.0", "size": 20987 }
[ "java.io.File", "java.io.IOException" ]
import java.io.File; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
110,533
public void setPortName(QName port) { portName = port; }
void function(QName port) { portName = port; }
/** * The endpoint name this service is implementing, it maps to the wsdl:port@name. In the format of ns:PORT_NAME where ns is a namespace prefix valid at this scope. */
The endpoint name this service is implementing, it maps to the wsdl:port@name. In the format of ns:PORT_NAME where ns is a namespace prefix valid at this scope
setPortName
{ "repo_name": "lburgazzoli/apache-camel", "path": "components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java", "license": "apache-2.0", "size": 53263 }
[ "javax.xml.namespace.QName" ]
import javax.xml.namespace.QName;
import javax.xml.namespace.*;
[ "javax.xml" ]
javax.xml;
1,964,915
public synchronized final void write(int b) throws IOException { if (count >= buf.length) { flushBuffer(); if (flushStreamWhenFull) { out.flush(); } } buf[count++] = (byte) b; }
synchronized final void function(int b) throws IOException { if (count >= buf.length) { flushBuffer(); if (flushStreamWhenFull) { out.flush(); } } buf[count++] = (byte) b; }
/** * Writes the specified byte to this buffered output stream. * * @param b the byte to be written. * @exception IOException if an I/O error occurs. */
Writes the specified byte to this buffered output stream
write
{ "repo_name": "wknishio/variable-terminal", "path": "src/vate/org/vash/vate/stream/filter/VTBufferedOutputStream.java", "license": "mit", "size": 4538 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,254,168
static synchronized native long createNativeCallback(Callback callback, Method method, Class[] parameterTypes, Class returnType, ...
static synchronized native long createNativeCallback(Callback callback, Method method, Class[] parameterTypes, Class returnType, int callingConvention, boolean direct);
/** Create a native trampoline to delegate execution to the Java callback. */
Create a native trampoline to delegate execution to the Java callback
createNativeCallback
{ "repo_name": "jenkinsci/jna", "path": "src/com/sun/jna/Native.java", "license": "lgpl-2.1", "size": 67817 }
[ "java.lang.reflect.Method" ]
import java.lang.reflect.Method;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
2,327,640
if (httpMethod != null && StringUtils.hasText(request.getMethod()) && httpMethod != HttpMethod.valueOf(request.getMethod())) { if (logger.isDebugEnabled()) { logger.debug("Request '" + request.getMethod() + " " + getRequestPath(request) + "'" + " doesn't match '" + ht...
if (httpMethod != null && StringUtils.hasText(request.getMethod()) && httpMethod != HttpMethod.valueOf(request.getMethod())) { if (logger.isDebugEnabled()) { logger.debug(STR + request.getMethod() + " " + getRequestPath(request) + "'" + STR + httpMethod + " " + pattern); } return false; } if (pattern.equals(MATCH_ALL))...
/** * Returns true if the configured pattern (and HTTP-Method) match those of the supplied request. * * @param request the request to match against. The ant pattern will be matched against the * {@code servletPath} + {@code pathInfo} of the request. */
Returns true if the configured pattern (and HTTP-Method) match those of the supplied request
matches
{ "repo_name": "vitorgv/spring-security", "path": "web/src/main/java/org/springframework/security/web/util/matcher/AntPathRequestMatcher.java", "license": "apache-2.0", "size": 8261 }
[ "org.springframework.http.HttpMethod", "org.springframework.util.StringUtils" ]
import org.springframework.http.HttpMethod; import org.springframework.util.StringUtils;
import org.springframework.http.*; import org.springframework.util.*;
[ "org.springframework.http", "org.springframework.util" ]
org.springframework.http; org.springframework.util;
2,141,754
public void loginWithProvider(final IdentityProvider provider) { Log.d(LOG_TAG, "loginWithProvider"); final Map<String, String> loginMap = new HashMap<String, String>(); loginMap.put(provider.getCognitoLoginKey(), provider.getToken()); currentIdentityProvider = provider;
void function(final IdentityProvider provider) { Log.d(LOG_TAG, STR); final Map<String, String> loginMap = new HashMap<String, String>(); loginMap.put(provider.getCognitoLoginKey(), provider.getToken()); currentIdentityProvider = provider;
/** * Login with an identity provider (ie. Facebook, Twitter, etc.). * @param provider A sign-in provider. */
Login with an identity provider (ie. Facebook, Twitter, etc.)
loginWithProvider
{ "repo_name": "bootcamptropa/android", "path": "app/src/main/java/com/dancingqueen/walladog/aws/user/IdentityManager.java", "license": "mit", "size": 15039 }
[ "android.util.Log", "java.util.HashMap", "java.util.Map" ]
import android.util.Log; import java.util.HashMap; import java.util.Map;
import android.util.*; import java.util.*;
[ "android.util", "java.util" ]
android.util; java.util;
1,310,659
private Map<Identification, Set<ModifiedPeptide>> findPrecursorVariations(Map<Identification, Set<ModificationCombination>> possibleExplanations) { //From the theoretical information we already have (e.g. the precursor sequence //and all possible modifications) we therefore first create all possib...
Map<Identification, Set<ModifiedPeptide>> function(Map<Identification, Set<ModificationCombination>> possibleExplanations) { Map<Identification, Set<ModifiedPeptide>> precursorVariations = new HashMap<>(); for (Identification identificationSet : possibleExplanations.keySet()) { Set<ModificationCombination> modification...
/** * find all possible precursor variations (taking all the possible * modification combinations into account). * * @param massDeltaExplanationsMap the possible modifications map (key: the * identification data, value the set of modification combinations) * @return the precursor var...
find all possible precursor variations (taking all the possible modification combinations into account)
findPrecursorVariations
{ "repo_name": "compomics/pride-asa-pipeline", "path": "pride-asa-pipeline-core/src/main/java/com/compomics/pride_asa_pipeline/core/logic/SinglePassAbstractSpectrumAnnotator.java", "license": "apache-2.0", "size": 20464 }
[ "com.compomics.pride_asa_pipeline.core.model.ModificationCombination", "com.compomics.pride_asa_pipeline.model.Identification", "com.compomics.pride_asa_pipeline.model.ModifiedPeptide", "java.util.HashMap", "java.util.Map", "java.util.Set" ]
import com.compomics.pride_asa_pipeline.core.model.ModificationCombination; import com.compomics.pride_asa_pipeline.model.Identification; import com.compomics.pride_asa_pipeline.model.ModifiedPeptide; import java.util.HashMap; import java.util.Map; import java.util.Set;
import com.compomics.pride_asa_pipeline.core.model.*; import com.compomics.pride_asa_pipeline.model.*; import java.util.*;
[ "com.compomics.pride_asa_pipeline", "java.util" ]
com.compomics.pride_asa_pipeline; java.util;
2,074,381
private ASN1EncodableVector buildUnauthenticatedAttributes(byte[] timeStampToken) throws IOException { if (timeStampToken == null) return null; // @todo: move this together with the rest of the defintions String ID_TIME_STAMP_TOKEN = "1.2.840.113549.1.9.16.2.14"; // RFC 3161 id...
ASN1EncodableVector function(byte[] timeStampToken) throws IOException { if (timeStampToken == null) return null; String ID_TIME_STAMP_TOKEN = STR; ASN1InputStream tempstream = new ASN1InputStream(new ByteArrayInputStream(timeStampToken)); ASN1EncodableVector unauthAttributes = new ASN1EncodableVector(); ASN1EncodableV...
/** * Added by Aiken Sam, 2006-11-15, modifed by Martin Brunecky 07/12/2007 * to start with the timeStampToken (signedData 1.2.840.113549.1.7.2). * Token is the TSA response without response status, which is usually * handled by the (vendor supplied) TSA request/response interface). * @param ti...
Added by Aiken Sam, 2006-11-15, modifed by Martin Brunecky 07/12/2007 to start with the timeStampToken (signedData 1.2.840.113549.1.7.2). Token is the TSA response without response status, which is usually handled by the (vendor supplied) TSA request/response interface)
buildUnauthenticatedAttributes
{ "repo_name": "bullda/DroidText", "path": "src/core/com/lowagie/text/pdf/PdfPKCS7.java", "license": "lgpl-3.0", "size": 68093 }
[ "java.io.ByteArrayInputStream", "java.io.IOException", "java.security.MessageDigest", "java.util.Calendar" ]
import java.io.ByteArrayInputStream; import java.io.IOException; import java.security.MessageDigest; import java.util.Calendar;
import java.io.*; import java.security.*; import java.util.*;
[ "java.io", "java.security", "java.util" ]
java.io; java.security; java.util;
2,785,585
@Test public void testBspMsg() throws IOException, InterruptedException, ClassNotFoundException { GiraphConfiguration conf = new GiraphConfiguration(); conf.setComputationClass(SimpleMsgComputation.class); conf.setVertexInputFormatClass(SimpleSuperstepVertexInputFormat.class); GiraphJob job = ...
void function() throws IOException, InterruptedException, ClassNotFoundException { GiraphConfiguration conf = new GiraphConfiguration(); conf.setComputationClass(SimpleMsgComputation.class); conf.setVertexInputFormatClass(SimpleSuperstepVertexInputFormat.class); GiraphJob job = prepareJob(getCallingMethodName(), conf);...
/** * Run a sample BSP job locally and test messages. * * @throws IOException * @throws ClassNotFoundException * @throws InterruptedException */
Run a sample BSP job locally and test messages
testBspMsg
{ "repo_name": "mmaro/giraph", "path": "giraph-examples/src/test/java/org/apache/giraph/TestBspBasic.java", "license": "apache-2.0", "size": 20289 }
[ "java.io.IOException", "org.apache.giraph.conf.GiraphConfiguration", "org.apache.giraph.examples.SimpleMsgComputation", "org.apache.giraph.examples.SimpleSuperstepComputation", "org.apache.giraph.job.GiraphJob", "org.junit.Assert" ]
import java.io.IOException; import org.apache.giraph.conf.GiraphConfiguration; import org.apache.giraph.examples.SimpleMsgComputation; import org.apache.giraph.examples.SimpleSuperstepComputation; import org.apache.giraph.job.GiraphJob; import org.junit.Assert;
import java.io.*; import org.apache.giraph.conf.*; import org.apache.giraph.examples.*; import org.apache.giraph.job.*; import org.junit.*;
[ "java.io", "org.apache.giraph", "org.junit" ]
java.io; org.apache.giraph; org.junit;
673,538
public static void createPrototype(String n, Color c, byte[] d) { Prototype.addPrototype(new Prototype(c, d, n)); }
static void function(String n, Color c, byte[] d) { Prototype.addPrototype(new Prototype(c, d, n)); }
/** * Adds a Prototype (with a design) to the HashMap * * @param n * @param g * @param c * @param d */
Adds a Prototype (with a design) to the HashMap
createPrototype
{ "repo_name": "tsmacdonald/simulator", "path": "src/edu/wheaton/simulator/simulation/Simulator.java", "license": "mit", "size": 13008 }
[ "edu.wheaton.simulator.entity.Prototype", "java.awt.Color" ]
import edu.wheaton.simulator.entity.Prototype; import java.awt.Color;
import edu.wheaton.simulator.entity.*; import java.awt.*;
[ "edu.wheaton.simulator", "java.awt" ]
edu.wheaton.simulator; java.awt;
1,736,085
@SimpleProperty( description = "URL of the page the WebViewer should initially open to. " + "Setting this will load the page.", category = PropertyCategory.BEHAVIOR) public String HomeUrl() { return homeUrl; }
@SimpleProperty( description = STR + STR, category = PropertyCategory.BEHAVIOR) String function() { return homeUrl; }
/** * Returns the URL of the page the WebVewier should load * * @return URL of the page the WebVewier should load */
Returns the URL of the page the WebVewier should load
HomeUrl
{ "repo_name": "rkipper/AppInventor_RK", "path": "appinventor/components/src/com/google/appinventor/components/runtime/WebViewer.java", "license": "mit", "size": 8806 }
[ "com.google.appinventor.components.annotations.PropertyCategory", "com.google.appinventor.components.annotations.SimpleProperty" ]
import com.google.appinventor.components.annotations.PropertyCategory; import com.google.appinventor.components.annotations.SimpleProperty;
import com.google.appinventor.components.annotations.*;
[ "com.google.appinventor" ]
com.google.appinventor;
1,909,964
private void collectFromArchive(String archiveName, List list) { try { ZipFile zipFile = new ZipFile(archiveName); for(Enumeration e = zipFile.entries(); e.hasMoreElements(); ) { ZipEntry entry = (ZipEntry)e.nextElement(); String name = entry.getName(); if(name.toLo...
void function(String archiveName, List list) { try { ZipFile zipFile = new ZipFile(archiveName); for(Enumeration e = zipFile.entries(); e.hasMoreElements(); ) { ZipEntry entry = (ZipEntry)e.nextElement(); String name = entry.getName(); if(name.toLowerCase().endsWith(STR)) { list.add(entry.getName()); } } } catch(Except...
/** * Collects files from the archive * * @param archiveName the archive name * @param list the resulting list */
Collects files from the archive
collectFromArchive
{ "repo_name": "shvets/cafebabe", "path": "cafebabe/src/main/java/org/sf/cafebabe/task/classhound/ClassHound.java", "license": "mit", "size": 12498 }
[ "java.util.Enumeration", "java.util.List", "java.util.zip.ZipEntry", "java.util.zip.ZipFile" ]
import java.util.Enumeration; import java.util.List; import java.util.zip.ZipEntry; import java.util.zip.ZipFile;
import java.util.*; import java.util.zip.*;
[ "java.util" ]
java.util;
2,089,935
void applyTranslations(TokenRewriteStream tokenRewriteStream) { applyTranslations(tokenRewriteStream, TokenRewriteStream.DEFAULT_PROGRAM_NAME); }
void applyTranslations(TokenRewriteStream tokenRewriteStream) { applyTranslations(tokenRewriteStream, TokenRewriteStream.DEFAULT_PROGRAM_NAME); }
/** * Apply all translations on the given token stream. * * @param tokenRewriteStream * rewrite-capable stream */
Apply all translations on the given token stream
applyTranslations
{ "repo_name": "sankarh/hive", "path": "ql/src/java/org/apache/hadoop/hive/ql/parse/UnparseTranslator.java", "license": "apache-2.0", "size": 10298 }
[ "org.antlr.runtime.TokenRewriteStream" ]
import org.antlr.runtime.TokenRewriteStream;
import org.antlr.runtime.*;
[ "org.antlr.runtime" ]
org.antlr.runtime;
42,955
public static boolean handleSingleSelectionAction(final SimpleFileListFragment navigator, MenuItem mItem, FileHolder fItem, Context context){ DialogFragment dialog; Bundle args; switch (mItem.getItemId()) { case R.id.menu_open: navigator.openInformingPathBar(fItem); return true; case R.id.menu...
static boolean function(final SimpleFileListFragment navigator, MenuItem mItem, FileHolder fItem, Context context){ DialogFragment dialog; Bundle args; switch (mItem.getItemId()) { case R.id.menu_open: navigator.openInformingPathBar(fItem); return true; case R.id.menu_create_shortcut: createShortcut(fItem, context); re...
/** * Central point where we handle actions for single selection, for every API level. * @param mItem The selected menu option/action. * @param fItem The data to act upon. */
Central point where we handle actions for single selection, for every API level
handleSingleSelectionAction
{ "repo_name": "msafin/wmc", "path": "src/org/openintents/filemanager/util/MenuUtils.java", "license": "gpl-2.0", "size": 16426 }
[ "android.content.Context", "android.os.Bundle", "android.support.v4.app.DialogFragment", "android.view.MenuItem", "com.sharegogo.wireless.SharegogoWirelessApp", "java.io.File", "org.openintents.filemanager.compatibility.ActionbarRefreshHelper", "org.openintents.filemanager.dialogs.DetailsDialog", "o...
import android.content.Context; import android.os.Bundle; import android.support.v4.app.DialogFragment; import android.view.MenuItem; import com.sharegogo.wireless.SharegogoWirelessApp; import java.io.File; import org.openintents.filemanager.compatibility.ActionbarRefreshHelper; import org.openintents.filemanager.dialo...
import android.content.*; import android.os.*; import android.support.v4.app.*; import android.view.*; import com.sharegogo.wireless.*; import java.io.*; import org.openintents.filemanager.compatibility.*; import org.openintents.filemanager.dialogs.*; import org.openintents.filemanager.files.*; import org.openintents.f...
[ "android.content", "android.os", "android.support", "android.view", "com.sharegogo.wireless", "java.io", "org.openintents.filemanager", "org.openintents.intents" ]
android.content; android.os; android.support; android.view; com.sharegogo.wireless; java.io; org.openintents.filemanager; org.openintents.intents;
475,747
public List getManagers() throws PdcException, SQLException { List usersAndGroups = new ArrayList(); String valueId = "-1"; if (getCurrentValue() != null) { valueId = getCurrentValue().getPK().getId(); } List<List<String>> managers = pdcBm.getManagers(getCurrentAxis().getAxisHeader().getPK...
List function() throws PdcException, SQLException { List usersAndGroups = new ArrayList(); String valueId = "-1"; if (getCurrentValue() != null) { valueId = getCurrentValue().getPK().getId(); } List<List<String>> managers = pdcBm.getManagers(getCurrentAxis().getAxisHeader().getPK() .getId(), valueId); List<String> user...
/** * get the managers for the current value * * @return ArrayList ( ArrayList UserDetail, ArrayList Group ) * @throws PdcException */
get the managers for the current value
getManagers
{ "repo_name": "NicolasEYSSERIC/Silverpeas-Core", "path": "war-core/src/main/java/com/stratelia/silverpeas/pdcPeas/control/PdcSessionController.java", "license": "agpl-3.0", "size": 24667 }
[ "com.stratelia.silverpeas.pdc.model.PdcException", "java.sql.SQLException", "java.util.ArrayList", "java.util.List" ]
import com.stratelia.silverpeas.pdc.model.PdcException; import java.sql.SQLException; import java.util.ArrayList; import java.util.List;
import com.stratelia.silverpeas.pdc.model.*; import java.sql.*; import java.util.*;
[ "com.stratelia.silverpeas", "java.sql", "java.util" ]
com.stratelia.silverpeas; java.sql; java.util;
2,338,250
void setAriaOrientationProperty(Element element, OrientationValue value);
void setAriaOrientationProperty(Element element, OrientationValue value);
/** * Sets the * <a href="http://www.w3.org/TR/wai-aria/states_and_properties#aria-orientation"> * aria-orientation</a> attribute for the {@code element} to the given {@code value}. */
Sets the aria-orientation attribute for the element to the given value
setAriaOrientationProperty
{ "repo_name": "syntelos/gwtcc", "path": "src/com/google/gwt/aria/client/SeparatorRole.java", "license": "apache-2.0", "size": 2618 }
[ "com.google.gwt.dom.client.Element" ]
import com.google.gwt.dom.client.Element;
import com.google.gwt.dom.client.*;
[ "com.google.gwt" ]
com.google.gwt;
2,027,050
public void delete(int[] ids) throws DataAccessException;
void function(int[] ids) throws DataAccessException;
/** * Deletes the specified cities. * * @param ids * The array of IDs of the cities to be deleted. * @throws DataAccessException * If any error occurs. */
Deletes the specified cities
delete
{ "repo_name": "Haixing-Hu/iLibrary", "path": "src/main/java/com/github/haixing_hu/ilibrary/dao/CityDao.java", "license": "gpl-2.0", "size": 3023 }
[ "org.springframework.dao.DataAccessException" ]
import org.springframework.dao.DataAccessException;
import org.springframework.dao.*;
[ "org.springframework.dao" ]
org.springframework.dao;
2,627,072
public void addFlags(EnumSet<FlagTypes> additionalFlags) { _flags.addAll(additionalFlags); }
void function(EnumSet<FlagTypes> additionalFlags) { _flags.addAll(additionalFlags); }
/** * Add flags to this stream. Adds to existing flags. */
Add flags to this stream. Adds to existing flags
addFlags
{ "repo_name": "ryanrhymes/mobiccnx", "path": "javasrc/src/org/ccnx/ccn/io/CCNAbstractInputStream.java", "license": "lgpl-2.1", "size": 86763 }
[ "java.util.EnumSet" ]
import java.util.EnumSet;
import java.util.*;
[ "java.util" ]
java.util;
1,005,671
@Test public void setExpired() { final AssetBase unit = unit(); Assert.assertFalse(unit.isExpired()); unit.setExpired(true); Assert.assertTrue(unit.isExpired()); }
void function() { final AssetBase unit = unit(); Assert.assertFalse(unit.isExpired()); unit.setExpired(true); Assert.assertTrue(unit.isExpired()); }
/** * Tests {@link AssetBase#setExpired()}. */
Tests <code>AssetBase#setExpired()</code>
setExpired
{ "repo_name": "palava/palava-media", "path": "src/test/java/de/cosmcode/palava/media/AssetBaseTest.java", "license": "apache-2.0", "size": 7802 }
[ "de.cosmocode.palava.media.asset.AssetBase", "org.junit.Assert" ]
import de.cosmocode.palava.media.asset.AssetBase; import org.junit.Assert;
import de.cosmocode.palava.media.asset.*; import org.junit.*;
[ "de.cosmocode.palava", "org.junit" ]
de.cosmocode.palava; org.junit;
627,157
public static void matrixMult(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret) throws DMLRuntimeException { matrixMult(m1, m2, ret, 0, m1.rlen); }
static void function(MatrixBlock m1, MatrixBlock m2, MatrixBlock ret) throws DMLRuntimeException { matrixMult(m1, m2, ret, 0, m1.rlen); }
/** * Performs a matrix multiplication and stores the result in the output matrix. * * All variants use a IKJ access pattern, and internally use dense output. After the * actual computation, we recompute nnz and check for sparse/dense representation. * * * @param m1 first matrix * @param m2 second m...
Performs a matrix multiplication and stores the result in the output matrix. All variants use a IKJ access pattern, and internally use dense output. After the actual computation, we recompute nnz and check for sparse/dense representation
matrixMult
{ "repo_name": "asurve/arvind-sysml2", "path": "src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixMult.java", "license": "apache-2.0", "size": 136706 }
[ "org.apache.sysml.runtime.DMLRuntimeException" ]
import org.apache.sysml.runtime.DMLRuntimeException;
import org.apache.sysml.runtime.*;
[ "org.apache.sysml" ]
org.apache.sysml;
1,302,326
public List<MetadataValue> getMetadata(String metadataKey);
List<MetadataValue> function(String metadataKey);
/** * Returns a list of previously set metadata values from the implementing * object's metadata store. * * @param metadataKey the unique metadata key being sought. * @return A list of values, one for each plugin that has set the * requested value. */
Returns a list of previously set metadata values from the implementing object's metadata store
getMetadata
{ "repo_name": "SpannaProject/SpannaAPI", "path": "src/main/java/org/spanna/metadata/Metadatable.java", "license": "apache-2.0", "size": 1796 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,202,811
private void writeObject(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); SerialUtilities.writeStroke(this.groupStroke, stream); SerialUtilities.writePaint(this.groupPaint, stream); }
void function(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); SerialUtilities.writeStroke(this.groupStroke, stream); SerialUtilities.writePaint(this.groupPaint, stream); }
/** * Provides serialization support. * * @param stream the output stream. * * @throws IOException if there is an I/O error. */
Provides serialization support
writeObject
{ "repo_name": "simeshev/parabuild-ci", "path": "3rdparty/jfreechart-1.0.5/source/org/jfree/chart/renderer/category/MinMaxCategoryRenderer.java", "license": "lgpl-3.0", "size": 19040 }
[ "java.io.IOException", "java.io.ObjectOutputStream", "org.jfree.io.SerialUtilities" ]
import java.io.IOException; import java.io.ObjectOutputStream; import org.jfree.io.SerialUtilities;
import java.io.*; import org.jfree.io.*;
[ "java.io", "org.jfree.io" ]
java.io; org.jfree.io;
1,886,320
public static void setScannerCaching(Job job, int batchSize) { job.getConfiguration().setInt("hbase.client.scanner.caching", batchSize); }
static void function(Job job, int batchSize) { job.getConfiguration().setInt(STR, batchSize); }
/** * Sets the number of rows to return and cache with each scanner iteration. * Higher caching values will enable faster mapreduce jobs at the expense of * requiring more heap to contain the cached rows. * * @param job The current job to adjust. * @param batchSize The number of rows to return in batc...
Sets the number of rows to return and cache with each scanner iteration. Higher caching values will enable faster mapreduce jobs at the expense of requiring more heap to contain the cached rows
setScannerCaching
{ "repo_name": "gustavoanatoly/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableMapReduceUtil.java", "license": "apache-2.0", "size": 43465 }
[ "org.apache.hadoop.mapreduce.Job" ]
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
2,457,933
@NotNull static String iStr(@NotNull String in) { return DOUBLE_QUOTES + in + DOUBLE_QUOTES; } // The following are TypeReferences used in calls to getValue and getRawValue. TypeReference<String> STRING_TYPE = new TypeReference<String>() {}; TypeReference<Integer> INTEGER_TYPE = new TypeReference<Integer...
static String iStr(@NotNull String in) { return DOUBLE_QUOTES + in + DOUBLE_QUOTES; } TypeReference<String> STRING_TYPE = new TypeReference<String>() {}; TypeReference<Integer> INTEGER_TYPE = new TypeReference<Integer>() {}; TypeReference<BigDecimal> BIG_DECIMAL_TYPE = new TypeReference<BigDecimal>() {}; TypeReference<...
/** * Converts a string to one that can be used to set interpolated strings using {@link #setValue(Object)} * This type of string will perform string injections, e.g For Gradle file: * * ext { * prop1 = 'Hello' * } * * property.setValue(iStr("$prop1")) * property.getValue(STRING_TYPE) // Th...
Converts a string to one that can be used to set interpolated strings using <code>#setValue(Object)</code> This type of string will perform string injections, e.g For Gradle file: ext { prop1 = 'Hello' } property.setValue(iStr("$prop1")) property.getValue(STRING_TYPE) // This will return the string "Hello"
iStr
{ "repo_name": "scana/ok-gradle", "path": "plugin/src/main/java/me/scana/okgradle/internal/dsl/api/ext/GradlePropertyModel.java", "license": "apache-2.0", "size": 11805 }
[ "java.math.BigDecimal", "java.util.List", "java.util.Map", "me.scana.okgradle.internal.dsl.api.ext.ReferenceTo", "me.scana.okgradle.internal.dsl.api.util.TypeReference", "org.jetbrains.annotations.NotNull" ]
import java.math.BigDecimal; import java.util.List; import java.util.Map; import me.scana.okgradle.internal.dsl.api.ext.ReferenceTo; import me.scana.okgradle.internal.dsl.api.util.TypeReference; import org.jetbrains.annotations.NotNull;
import java.math.*; import java.util.*; import me.scana.okgradle.internal.dsl.api.ext.*; import me.scana.okgradle.internal.dsl.api.util.*; import org.jetbrains.annotations.*;
[ "java.math", "java.util", "me.scana.okgradle", "org.jetbrains.annotations" ]
java.math; java.util; me.scana.okgradle; org.jetbrains.annotations;
673,738
@Override public boolean hasGraphicalOutput() { return (m_List.size() > 0); }
boolean function() { return (m_List.size() > 0); }
/** * Returns whether graphical output was generated. * * @return true if graphical output was generated */
Returns whether graphical output was generated
hasGraphicalOutput
{ "repo_name": "automenta/adams-core", "path": "src/main/java/adams/flow/processor/AbstractListingProcessor.java", "license": "gpl-3.0", "size": 5597 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,199,978
public void deleteObserver(@Nonnull Observer<? super T> observer) { registry.values().removeAll(Collections.singleton(observer)); }
void function(@Nonnull Observer<? super T> observer) { registry.values().removeAll(Collections.singleton(observer)); }
/** * Deregisters all instances of the supplied observer. * <p>Note that reactive-registration allows multiple * registration and deregistration for the same observer instance, * which are treated independently whereas java-observable does not.</p> * <p>The convenience method is to have symmetr...
Deregisters all instances of the supplied observer. Note that reactive-registration allows multiple registration and deregistration for the same observer instance, which are treated independently whereas java-observable does not. The convenience method is to have symmetric means for both observer kinds to interact with...
deleteObserver
{ "repo_name": "akarnokd/reactive4java", "path": "src/main/java/hu/akarnokd/reactive4java/util/HybridSubject.java", "license": "apache-2.0", "size": 5702 }
[ "hu.akarnokd.reactive4java.base.Observer", "java.util.Collections", "javax.annotation.Nonnull" ]
import hu.akarnokd.reactive4java.base.Observer; import java.util.Collections; import javax.annotation.Nonnull;
import hu.akarnokd.reactive4java.base.*; import java.util.*; import javax.annotation.*;
[ "hu.akarnokd.reactive4java", "java.util", "javax.annotation" ]
hu.akarnokd.reactive4java; java.util; javax.annotation;
2,699,841
private static Pair<Format, Long> parseCsdBuffer(CsdBuffer csdBuffer) { byte[] csdData = Arrays.copyOf(csdBuffer.data, csdBuffer.length); int firstByte = csdData[4] & 0xFF; int secondByte = csdData[5] & 0xFF; int thirdByte = csdData[6] & 0xFF; int width = (firstByte << 4) | (secondByte >> 4); ...
static Pair<Format, Long> function(CsdBuffer csdBuffer) { byte[] csdData = Arrays.copyOf(csdBuffer.data, csdBuffer.length); int firstByte = csdData[4] & 0xFF; int secondByte = csdData[5] & 0xFF; int thirdByte = csdData[6] & 0xFF; int width = (firstByte << 4) (secondByte >> 4); int height = (secondByte & 0x0F) << 8 thir...
/** * Parses the {@link Format} and frame duration from a csd buffer. * * @param csdBuffer The csd buffer. * @return A pair consisting of the {@link Format} and the frame duration in microseconds, or * 0 if the duration could not be determined. */
Parses the <code>Format</code> and frame duration from a csd buffer
parseCsdBuffer
{ "repo_name": "Blaez/ZiosGram", "path": "TMessagesProj/src/main/java/org/telegram/messenger/exoplayer2/extractor/ts/H262Reader.java", "license": "gpl-2.0", "size": 10146 }
[ "android.util.Pair", "java.util.Arrays", "java.util.Collections", "org.blaez.ziosgram.exoplayer2.Format", "org.blaez.ziosgram.exoplayer2.util.MimeTypes" ]
import android.util.Pair; import java.util.Arrays; import java.util.Collections; import org.blaez.ziosgram.exoplayer2.Format; import org.blaez.ziosgram.exoplayer2.util.MimeTypes;
import android.util.*; import java.util.*; import org.blaez.ziosgram.exoplayer2.*; import org.blaez.ziosgram.exoplayer2.util.*;
[ "android.util", "java.util", "org.blaez.ziosgram" ]
android.util; java.util; org.blaez.ziosgram;
1,230,770
public JspContext getJspContext() { return this.pageContext; }
JspContext function() { return this.pageContext; }
/** * Returns the context. */
Returns the context
getJspContext
{ "repo_name": "dlitz/resin", "path": "modules/resin/src/com/caucho/jsp/JspFragmentSupport.java", "license": "gpl-2.0", "size": 2910 }
[ "javax.servlet.jsp.JspContext" ]
import javax.servlet.jsp.JspContext;
import javax.servlet.jsp.*;
[ "javax.servlet" ]
javax.servlet;
1,960,407
public int compress(ByteBuffer in, byte[] out, int outPos) { int inPos = in.position(); int inLen = in.capacity() - inPos; if (cachedHashTable == null) { cachedHashTable = new int[HASH_SIZE]; } int[] hashTab = cachedHashTable; int literals = 0; out...
int function(ByteBuffer in, byte[] out, int outPos) { int inPos = in.position(); int inLen = in.capacity() - inPos; if (cachedHashTable == null) { cachedHashTable = new int[HASH_SIZE]; } int[] hashTab = cachedHashTable; int literals = 0; outPos++; int future = first(in, 0); while (inPos < inLen - 4) { byte p2 = in.get(...
/** * Compress a number of bytes. * * @param in the input data * @param out the output area * @param outPos the offset at the output array * @return the end position */
Compress a number of bytes
compress
{ "repo_name": "ferquies/2dam", "path": "AD/Tema 2/h2/src/main/org/h2/compress/CompressLZF.java", "license": "gpl-3.0", "size": 18038 }
[ "java.nio.ByteBuffer" ]
import java.nio.ByteBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
1,160,086
public void run(TestResult result) { for (Enumeration e = names.elements(); e.hasMoreElements(); ) { if (result.shouldStop() ) break; createTest(theClass, (String) e.nextElement()).run(result); } }
void function(TestResult result) { for (Enumeration e = names.elements(); e.hasMoreElements(); ) { if (result.shouldStop() ) break; createTest(theClass, (String) e.nextElement()).run(result); } }
/** * Runs the tests and collects their result in a TestResult. */
Runs the tests and collects their result in a TestResult
run
{ "repo_name": "freeVM/freeVM", "path": "enhanced/archive/classlib/modules/crypto2/test/ar/org/fitc/test/util/TestSuiteAcumulable.java", "license": "apache-2.0", "size": 7888 }
[ "java.util.Enumeration", "junit.framework.TestResult" ]
import java.util.Enumeration; import junit.framework.TestResult;
import java.util.*; import junit.framework.*;
[ "java.util", "junit.framework" ]
java.util; junit.framework;
1,516,736
@Test public void testNearBoundary() { parser = new DegreesParser("N89.9999;E179.9999"); assertEquals(89.9999, parser.latitude, delta); assertEquals(179.9999, parser.longitude, delta); parser = new DegreesParser("S89.9999;W179.9999"); assertEquals(-89.9999, parser.latitud...
void function() { parser = new DegreesParser(STR); assertEquals(89.9999, parser.latitude, delta); assertEquals(179.9999, parser.longitude, delta); parser = new DegreesParser(STR); assertEquals(-89.9999, parser.latitude, delta); assertEquals(-179.9999, parser.longitude, delta); parser = new DegreesParser(STR); assertEqu...
/** * Tests inputs that are close to latitude 90/-90 degrees and longitude 180/-180 degrees. */
Tests inputs that are close to latitude 90/-90 degrees and longitude 180/-180 degrees
testNearBoundary
{ "repo_name": "vespa-engine/vespa", "path": "vespajlib/src/test/java/com/yahoo/geo/DegreesParserTestCase.java", "license": "apache-2.0", "size": 9897 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
509,586
public static void logJSONResult(JSONObject res) { logStringResult(res.toString(2)); }
static void function(JSONObject res) { logStringResult(res.toString(2)); }
/** * Convenience method to output results from tests * * @param res the JSON object containing the query result */
Convenience method to output results from tests
logJSONResult
{ "repo_name": "Novartis/YADA", "path": "yada-api/src/test/java/com/novartis/opensource/yada/test/ServiceTest.java", "license": "apache-2.0", "size": 90877 }
[ "org.json.JSONObject" ]
import org.json.JSONObject;
import org.json.*;
[ "org.json" ]
org.json;
1,977,018
LinkedList<Integer> q = new LinkedList<Integer>(); assertTrue(q.isEmpty()); for (int i = 0; i < n; ++i) assertTrue(q.offer(new Integer(i))); assertFalse(q.isEmpty()); assertEquals(n, q.size()); return q; }
LinkedList<Integer> q = new LinkedList<Integer>(); assertTrue(q.isEmpty()); for (int i = 0; i < n; ++i) assertTrue(q.offer(new Integer(i))); assertFalse(q.isEmpty()); assertEquals(n, q.size()); return q; }
/** * Returns a new queue of given size containing consecutive * Integers 0 ... n. */
Returns a new queue of given size containing consecutive Integers 0 ... n
populatedQueue
{ "repo_name": "AdmireTheDistance/android_libcore", "path": "jsr166-tests/src/test/java/jsr166/LinkedListTest.java", "license": "gpl-2.0", "size": 17831 }
[ "java.util.LinkedList" ]
import java.util.LinkedList;
import java.util.*;
[ "java.util" ]
java.util;
970,657
@Override public Adapter createThrowActionAdapter() { if (throwActionItemProvider == null) { throwActionItemProvider = new ThrowActionItemProvider(this); } return throwActionItemProvider; } protected TermActionItemProvider termActionItemProvider;
Adapter function() { if (throwActionItemProvider == null) { throwActionItemProvider = new ThrowActionItemProvider(this); } return throwActionItemProvider; } protected TermActionItemProvider termActionItemProvider;
/** * This creates an adapter for a {@link org.tud.inf.st.mbt.actions.ThrowAction}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This creates an adapter for a <code>org.tud.inf.st.mbt.actions.ThrowAction</code>.
createThrowActionAdapter
{ "repo_name": "paetti1988/qmate", "path": "MATE/org.tud.inf.st.mbt.emf.edit/src-gen/org/tud/inf/st/mbt/actions/provider/ActionsItemProviderAdapterFactory.java", "license": "apache-2.0", "size": 18606 }
[ "org.eclipse.emf.common.notify.Adapter" ]
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,468,401
private boolean isPartitionKeySubset(Set<String> candidateSubset) { return new HashSet<>(fieldNames).containsAll(candidateSubset); }
boolean function(Set<String> candidateSubset) { return new HashSet<>(fieldNames).containsAll(candidateSubset); }
/** * Check whether the set of field names in {@code candidatePrefix} forms a valid subset of the * set of field names defined in {@link RowDataFieldsKinesisPartitioner#fieldNames}. * * @param candidateSubset A set of field names forming a candidate subset of * {@link RowDataFieldsKinesisPartitioner#fieldN...
Check whether the set of field names in candidatePrefix forms a valid subset of the set of field names defined in <code>RowDataFieldsKinesisPartitioner#fieldNames</code>
isPartitionKeySubset
{ "repo_name": "greghogan/flink", "path": "flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/table/RowDataFieldsKinesisPartitioner.java", "license": "apache-2.0", "size": 9935 }
[ "java.util.HashSet", "java.util.Set" ]
import java.util.HashSet; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,420,397
public static List<Device> lookupStorageDevicesByServer(Server s) { Map<String, Object> params = new HashMap<String, Object>(); params.put("server", s); return singleton.listObjectsByNamedQuery( "Device.findStorageByServer", params); }
static List<Device> function(Server s) { Map<String, Object> params = new HashMap<String, Object>(); params.put(STR, s); return singleton.listObjectsByNamedQuery( STR, params); }
/** * Lookup all storage Devices associated with the server. * @param s The server for the values you would like to lookup * @return List of devices */
Lookup all storage Devices associated with the server
lookupStorageDevicesByServer
{ "repo_name": "aronparsons/spacewalk", "path": "java/code/src/com/redhat/rhn/domain/server/ServerFactory.java", "license": "gpl-2.0", "size": 33635 }
[ "java.util.HashMap", "java.util.List", "java.util.Map" ]
import java.util.HashMap; import java.util.List; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
249,844
private ConnInstanceTO getConectorInstanceTO( final List<ConnInstanceTO> connectorTOs, final ResourceTO resourceTO) { for (ConnInstanceTO to : connectorTOs) { if (Long.valueOf(to.getId()).equals(resourceTO.getConnectorId())) { return to; } ...
ConnInstanceTO function( final List<ConnInstanceTO> connectorTOs, final ResourceTO resourceTO) { for (ConnInstanceTO to : connectorTOs) { if (Long.valueOf(to.getId()).equals(resourceTO.getConnectorId())) { return to; } } return new ConnInstanceTO(); } public static class DetailsModEvent extends ResourceEvent { public D...
/** * Get the connetorTO linked to the resource. * * @param connectorTOs list of all connectors. * @param resourceTO resource. * @return selected connector instance. */
Get the connetorTO linked to the resource
getConectorInstanceTO
{ "repo_name": "ilgrosso/oldSyncopeIdM", "path": "console/src/main/java/org/syncope/console/pages/panels/ResourceDetailsPanel.java", "license": "apache-2.0", "size": 10179 }
[ "java.util.List", "org.apache.wicket.ajax.AjaxRequestTarget", "org.syncope.client.to.ConnInstanceTO", "org.syncope.client.to.ResourceTO", "org.syncope.console.pages.ResourceModalPage" ]
import java.util.List; import org.apache.wicket.ajax.AjaxRequestTarget; import org.syncope.client.to.ConnInstanceTO; import org.syncope.client.to.ResourceTO; import org.syncope.console.pages.ResourceModalPage;
import java.util.*; import org.apache.wicket.ajax.*; import org.syncope.client.to.*; import org.syncope.console.pages.*;
[ "java.util", "org.apache.wicket", "org.syncope.client", "org.syncope.console" ]
java.util; org.apache.wicket; org.syncope.client; org.syncope.console;
190,951
public void focusLost(Component cmp);
void function(Component cmp);
/** * Invoked when component loses focus * @param cmp the component that lost focus */
Invoked when component loses focus
focusLost
{ "repo_name": "JrmyDev/CodenameOne", "path": "CodenameOne/src/com/codename1/ui/events/FocusListener.java", "license": "gpl-2.0", "size": 1811 }
[ "com.codename1.ui.Component" ]
import com.codename1.ui.Component;
import com.codename1.ui.*;
[ "com.codename1.ui" ]
com.codename1.ui;
551,099
public static void setNormalCursor(Component C) { C.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); }
static void function(Component C) { C.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); }
/** * Sets the cursor to the normal cursor. * @param c the owning component. */
Sets the cursor to the normal cursor
setNormalCursor
{ "repo_name": "idega/platform2", "path": "src/com/idega/core/ldap/client/cbutil/CBUtility.java", "license": "gpl-3.0", "size": 45284 }
[ "java.awt.Component", "java.awt.Cursor" ]
import java.awt.Component; import java.awt.Cursor;
import java.awt.*;
[ "java.awt" ]
java.awt;
2,657,494
@Test public void testMaxRepetitionsAndMaxVarsPerPdu() throws Exception { final String snmpConfigXml = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n" + "<snmp-config port=\"161\" retry=\"3\" timeout=\"800\" read-community=\"public\" version=\"v1\" max-repetitions=\"17\" max-vars-pe...
void function() throws Exception { final String snmpConfigXml = STR1.0\STRUTF-8\STRyes\"?>\n" + STR161\STR3\STR800\STRpublic\STRv1\STR17\STR13\STRhttp: final String expectedConfig = STR1.0\STRUTF-8\STRyes\"?>\n" + STR161\STR3\STR800\STRpublic\STRv1\STR17\STR13\STRhttp: STRv2c\STR5\">\n" + STR + STR + STR; SnmpPeerFacto...
/** * In earlier Versions of OpenNMS max-repetitions and max-vars-per-pdu weren't considered in the optimization. * So this test checks if it is now considered. */
In earlier Versions of OpenNMS max-repetitions and max-vars-per-pdu weren't considered in the optimization. So this test checks if it is now considered
testMaxRepetitionsAndMaxVarsPerPdu
{ "repo_name": "roskens/opennms-pre-github", "path": "opennms-config/src/test/java/org/opennms/netmgt/config/SnmpEventInfoTest.java", "license": "agpl-3.0", "size": 69326 }
[ "org.opennms.core.test.xml.XmlTest" ]
import org.opennms.core.test.xml.XmlTest;
import org.opennms.core.test.xml.*;
[ "org.opennms.core" ]
org.opennms.core;
839,758
@Override public synchronized void doBuild() throws TorqueException { if ( isBuilt() ) { return; } dbMap = Torque.getDatabaseMap("track"); dbMap.addTable("TLOGGEDINUSERS"); TableMap tMap = dbMap.getTable("TLOGGEDINUSERS"); tMap.setJavaName("TLogge...
synchronized void function() throws TorqueException { if ( isBuilt() ) { return; } dbMap = Torque.getDatabaseMap("track"); dbMap.addTable(STR); TableMap tMap = dbMap.getTable(STR); tMap.setJavaName(STR); tMap.setOMClass( com.aurel.track.persist.TLoggedInUsers.class ); tMap.setPeerClass( com.aurel.track.persist.TLoggedI...
/** * The doBuild() method builds the DatabaseMap * * @throws TorqueException */
The doBuild() method builds the DatabaseMap
doBuild
{ "repo_name": "trackplus/Genji", "path": "src/main/java/com/aurel/track/persist/map/TLoggedInUsersMapBuilder.java", "license": "gpl-3.0", "size": 7040 }
[ "org.apache.torque.Torque", "org.apache.torque.TorqueException", "org.apache.torque.map.ColumnMap", "org.apache.torque.map.TableMap" ]
import org.apache.torque.Torque; import org.apache.torque.TorqueException; import org.apache.torque.map.ColumnMap; import org.apache.torque.map.TableMap;
import org.apache.torque.*; import org.apache.torque.map.*;
[ "org.apache.torque" ]
org.apache.torque;
175,700
public D any(Predicate<? super D> filter);
D function(Predicate<? super D> filter);
/** * Return a randomly selected item from this dataset that matches the passed * in filter. * * @param filter * the filter * @return a randomly selected item */
Return a randomly selected item from this dataset that matches the passed in filter
any
{ "repo_name": "letrait/magenta", "path": "src/main/java/org/magenta/DataSet.java", "license": "mit", "size": 4231 }
[ "com.google.common.base.Predicate" ]
import com.google.common.base.Predicate;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
1,244,715
public java.util.List<fr.lip6.move.pnml.hlpn.cyclicEnumerations.hlapi.PredecessorHLAPI> getSubterm_cyclicEnumerations_PredecessorHLAPI(){ java.util.List<fr.lip6.move.pnml.hlpn.cyclicEnumerations.hlapi.PredecessorHLAPI> retour = new ArrayList<fr.lip6.move.pnml.hlpn.cyclicEnumerations.hlapi.PredecessorHLAPI>(); ...
java.util.List<fr.lip6.move.pnml.hlpn.cyclicEnumerations.hlapi.PredecessorHLAPI> function(){ java.util.List<fr.lip6.move.pnml.hlpn.cyclicEnumerations.hlapi.PredecessorHLAPI> retour = new ArrayList<fr.lip6.move.pnml.hlpn.cyclicEnumerations.hlapi.PredecessorHLAPI>(); for (Term elemnt : getSubterm()) { if(elemnt.getClass(...
/** * This accessor return a list of encapsulated subelement, only of PredecessorHLAPI kind. * WARNING : this method can creates a lot of new object in memory. */
This accessor return a list of encapsulated subelement, only of PredecessorHLAPI kind. WARNING : this method can creates a lot of new object in memory
getSubterm_cyclicEnumerations_PredecessorHLAPI
{ "repo_name": "lhillah/pnmlframework", "path": "pnmlFw-HLPN/src/fr/lip6/move/pnml/hlpn/strings/hlapi/GreaterThanOrEqualHLAPI.java", "license": "epl-1.0", "size": 108757 }
[ "fr.lip6.move.pnml.hlpn.terms.Term", "java.util.ArrayList", "java.util.List" ]
import fr.lip6.move.pnml.hlpn.terms.Term; import java.util.ArrayList; import java.util.List;
import fr.lip6.move.pnml.hlpn.terms.*; import java.util.*;
[ "fr.lip6.move", "java.util" ]
fr.lip6.move; java.util;
1,882,599
@Test public void testIndexMaintenanceWithIndexOnMethodGetValues() { try { Index i1 = qs.createIndex("indx1", IndexType.FUNCTIONAL, "pf.getID", "/portfolio.getValues() pf"); assertTrue(i1 instanceof CompactRangeIndex); Cache cache = CacheUtils.getCache(); region = CacheUtils.ge...
void function() { try { Index i1 = qs.createIndex("indx1", IndexType.FUNCTIONAL, STR, STR); assertTrue(i1 instanceof CompactRangeIndex); Cache cache = CacheUtils.getCache(); region = CacheUtils.getRegion(STR); region.put("4", new Portfolio(4)); region.put("5", new Portfolio(5)); CompactRangeIndex ri = (CompactRangeInde...
/** * Tests Index maintenance on method getValues() as iterator ( with focus on * behaviour if not implemented in DummyQRegion * @author Asif */
Tests Index maintenance on method getValues() as iterator ( with focus on behaviour if not implemented in DummyQRegion
testIndexMaintenanceWithIndexOnMethodGetValues
{ "repo_name": "robertgeiger/incubator-geode", "path": "gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/IndexMaintenanceJUnitTest.java", "license": "apache-2.0", "size": 51307 }
[ "com.gemstone.gemfire.cache.Cache", "com.gemstone.gemfire.cache.query.CacheUtils", "com.gemstone.gemfire.cache.query.Index", "com.gemstone.gemfire.cache.query.IndexType", "com.gemstone.gemfire.cache.query.data.Portfolio", "org.junit.Assert" ]
import com.gemstone.gemfire.cache.Cache; import com.gemstone.gemfire.cache.query.CacheUtils; import com.gemstone.gemfire.cache.query.Index; import com.gemstone.gemfire.cache.query.IndexType; import com.gemstone.gemfire.cache.query.data.Portfolio; import org.junit.Assert;
import com.gemstone.gemfire.cache.*; import com.gemstone.gemfire.cache.query.*; import com.gemstone.gemfire.cache.query.data.*; import org.junit.*;
[ "com.gemstone.gemfire", "org.junit" ]
com.gemstone.gemfire; org.junit;
2,153,021
private boolean isIgnoreSituation(DetailAST ast) { final DetailAST modifiers = ast.getFirstChild(); boolean result = false; if (ast.getType() == TokenTypes.VARIABLE_DEF) { if ((ignoreFinal || ignoreStatic) && isInterfaceDeclaration(ast)) { // ...
boolean function(DetailAST ast) { final DetailAST modifiers = ast.getFirstChild(); boolean result = false; if (ast.getType() == TokenTypes.VARIABLE_DEF) { if ((ignoreFinal ignoreStatic) && isInterfaceDeclaration(ast)) { result = true; } else { result = ignoreFinal && modifiers.branchContains(TokenTypes.FINAL) ignoreSta...
/** * Checks if it is an ignore situation. * @param ast input DetailAST node. * @return true if it is an ignore situation found for given input DetailAST * node. */
Checks if it is an ignore situation
isIgnoreSituation
{ "repo_name": "HubSpot/checkstyle", "path": "src/main/java/com/puppycrawl/tools/checkstyle/checks/naming/AbbreviationAsWordInNameCheck.java", "license": "lgpl-2.1", "size": 12942 }
[ "com.puppycrawl.tools.checkstyle.api.DetailAST", "com.puppycrawl.tools.checkstyle.api.TokenTypes" ]
import com.puppycrawl.tools.checkstyle.api.DetailAST; import com.puppycrawl.tools.checkstyle.api.TokenTypes;
import com.puppycrawl.tools.checkstyle.api.*;
[ "com.puppycrawl.tools" ]
com.puppycrawl.tools;
942,534
public static String translateTextType(TextType textType) { if (textType == TextType.footer) return "Fußzeile"; else if (textType == TextType.north) return "Wasserzeichen (oben)"; else if (textType == TextType.center) return "Wasserzeichen (mittig)"; else if (textType == TextType.south) return "...
static String function(TextType textType) { if (textType == TextType.footer) return STR; else if (textType == TextType.north) return STR; else if (textType == TextType.center) return STR; else if (textType == TextType.south) return STR; return null; }
/** * Enum to string translation method * * @param textType The enum to translate into a string * @return The string corresponding to the given enum */
Enum to string translation method
translateTextType
{ "repo_name": "aquast/SIP-Builder", "path": "src/main/java/de/uzk/hki/da/sb/Utilities.java", "license": "gpl-3.0", "size": 7753 }
[ "de.uzk.hki.da.sb.PublicationRights" ]
import de.uzk.hki.da.sb.PublicationRights;
import de.uzk.hki.da.sb.*;
[ "de.uzk.hki" ]
de.uzk.hki;
610,724
public static void show(Context context, Class<? extends StandOutWindow> cls, int id) { context.startService(getShowIntent(context, cls, id)); }
static void function(Context context, Class<? extends StandOutWindow> cls, int id) { context.startService(getShowIntent(context, cls, id)); }
/** * Show a new window corresponding to the id, or restore a previously hidden * window. * * @param context * A Context of the application package implementing this class. * @param cls * The Service extending {@link StandOutWindow} that will be used * to create and man...
Show a new window corresponding to the id, or restore a previously hidden window
show
{ "repo_name": "fatangare/LogcatViewer", "path": "standOut/src/main/java/wei/mark/standout/StandOutWindow.java", "license": "gpl-3.0", "size": 59607 }
[ "android.content.Context" ]
import android.content.Context;
import android.content.*;
[ "android.content" ]
android.content;
658,932
@Override public int read(byte[] b, int off, int len) throws IOException { if (closed) { throw new FileItemStream.ItemSkippedException(); } if (len == 0) { return 0; } int res = available(); if (res =...
int function(byte[] b, int off, int len) throws IOException { if (closed) { throw new FileItemStream.ItemSkippedException(); } if (len == 0) { return 0; } int res = available(); if (res == 0) { res = makeAvailable(); if (res == 0) { return -1; } } res = Math.min(res, len); System.arraycopy(buffer, head, b, off, res); h...
/** * Reads bytes into the given buffer. * @param b The destination buffer, where to write to. * @param off Offset of the first byte in the buffer. * @param len Maximum number of bytes to read. * @return Number of bytes, which have been actually read, * or -1 for ...
Reads bytes into the given buffer
read
{ "repo_name": "chvrga/outdoor-explorer", "path": "java/play-1.4.4/framework/src/play/data/parsing/MultipartStream.java", "license": "mit", "size": 32498 }
[ "java.io.IOException", "org.apache.commons.fileupload.FileItemStream" ]
import java.io.IOException; import org.apache.commons.fileupload.FileItemStream;
import java.io.*; import org.apache.commons.fileupload.*;
[ "java.io", "org.apache.commons" ]
java.io; org.apache.commons;
177,829
protected void addNamePropertyDescriptor(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_NamedElement_name_feature"), getString("_UI_PropertyDescriptor_descrip...
void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), CorePackage.Literals.NAMED_ELEMENT__NAME, true, false, false, ItemPropertyDescriptor.GENERIC_VALU...
/** * This adds a property descriptor for the Name feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds a property descriptor for the Name feature.
addNamePropertyDescriptor
{ "repo_name": "ifml/ifml-editor", "path": "plugins/IFMLEditor.edit/src/IFML/Core/provider/IFMLParameterItemProvider.java", "license": "mit", "size": 6414 }
[ "org.eclipse.emf.edit.provider.ComposeableAdapterFactory", "org.eclipse.emf.edit.provider.ItemPropertyDescriptor" ]
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
491,445
private UnsafeCarbonRowForMerge next() { if (hasNext()) { return getSortedRecordFromMemory(); } else { throw new NoSuchElementException("No more elements to return"); } }
UnsafeCarbonRowForMerge function() { if (hasNext()) { return getSortedRecordFromMemory(); } else { throw new NoSuchElementException(STR); } }
/** * This method will be used to get the sorted row * * @return sorted row */
This method will be used to get the sorted row
next
{ "repo_name": "zzcclp/carbondata", "path": "processing/src/main/java/org/apache/carbondata/processing/loading/sort/unsafe/merger/UnsafeInMemoryIntermediateDataMerger.java", "license": "apache-2.0", "size": 9289 }
[ "java.util.NoSuchElementException", "org.apache.carbondata.processing.loading.sort.unsafe.holder.UnsafeCarbonRowForMerge" ]
import java.util.NoSuchElementException; import org.apache.carbondata.processing.loading.sort.unsafe.holder.UnsafeCarbonRowForMerge;
import java.util.*; import org.apache.carbondata.processing.loading.sort.unsafe.holder.*;
[ "java.util", "org.apache.carbondata" ]
java.util; org.apache.carbondata;
2,873,209
public List<COSObject> getObjectsByType( String type ) throws IOException { return getObjectsByType( COSName.getPDFName( type ) ); }
List<COSObject> function( String type ) throws IOException { return getObjectsByType( COSName.getPDFName( type ) ); }
/** * This will get all dictionary objects by type. * * @param type The type of the object. * * @return This will return an object with the specified type. * @throws IOException If there is an error getting the object */
This will get all dictionary objects by type
getObjectsByType
{ "repo_name": "kzganesan/PdfBox-Android", "path": "library/src/main/java/org/apache/pdfbox/cos/COSDocument.java", "license": "apache-2.0", "size": 16698 }
[ "java.io.IOException", "java.util.List" ]
import java.io.IOException; import java.util.List;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,589,295
@GET @Path("/clusters/{clusterid}/apps/{appid}/containers/{containerid}") @Produces(MediaType.APPLICATION_JSON) public TimelineEntity getContainer(@Context HttpServletRequest req, @Context HttpServletResponse res, @PathParam("clusterid") String clusterId, @PathParam("appid") String appId, ...
@Path(STR) @Produces(MediaType.APPLICATION_JSON) TimelineEntity function(@Context HttpServletRequest req, @Context HttpServletResponse res, @PathParam(STR) String clusterId, @PathParam("appid") String appId, @PathParam(STR) String containerId, @QueryParam(STR) String userId, @QueryParam(STR) String flowName, @QueryPara...
/** * Return a single container entity for the given container Id. If userid, * flowname and flowrun id which are optional query parameters are not * specified, they will be queried based on app id and cluster id from the * flow context information stored in underlying storage implementation. * * @par...
Return a single container entity for the given container Id. If userid, flowname and flowrun id which are optional query parameters are not specified, they will be queried based on app id and cluster id from the flow context information stored in underlying storage implementation
getContainer
{ "repo_name": "szegedim/hadoop", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice/src/main/java/org/apache/hadoop/yarn/server/timelineservice/reader/TimelineReaderWebServices.java", "license": "apache-2.0", "size": 182176 }
[ "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse", "javax.ws.rs.Path", "javax.ws.rs.PathParam", "javax.ws.rs.Produces", "javax.ws.rs.QueryParam", "javax.ws.rs.core.Context", "javax.ws.rs.core.MediaType", "org.apache.hadoop.yarn.api.records.timelineservice.TimelineEnti...
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import org.apache.hadoop.yarn.api.records.ti...
import javax.servlet.http.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import org.apache.hadoop.yarn.api.records.timelineservice.*;
[ "javax.servlet", "javax.ws", "org.apache.hadoop" ]
javax.servlet; javax.ws; org.apache.hadoop;
1,633,856
public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException { ConfirmationCallback confirmation = null; for (int i = 0; i < callbacks.length; i++) { if (callbacks[i] instanceof TextOutputCallback) { TextOutputCallback tc = (TextO...
void function(Callback[] callbacks) throws IOException, UnsupportedCallbackException { ConfirmationCallback confirmation = null; for (int i = 0; i < callbacks.length; i++) { if (callbacks[i] instanceof TextOutputCallback) { TextOutputCallback tc = (TextOutputCallback) callbacks[i]; String text; switch (tc.getMessageTyp...
/** * Handles the specified set of callbacks. * * @param callbacks the callbacks to handle * @throws IOException if an input or output error occurs. * @throws UnsupportedCallbackException if the callback is not an * instance of NameCallback or PasswordCallback */
Handles the specified set of callbacks
handle
{ "repo_name": "andreagenso/java2scala", "path": "test/J2s/java/openjdk-6-src-b27/jdk/src/share/classes/com/sun/security/auth/callback/TextCallbackHandler.java", "license": "apache-2.0", "size": 9179 }
[ "java.io.IOException", "javax.security.auth.callback.Callback", "javax.security.auth.callback.ConfirmationCallback", "javax.security.auth.callback.TextOutputCallback", "javax.security.auth.callback.UnsupportedCallbackException" ]
import java.io.IOException; import javax.security.auth.callback.Callback; import javax.security.auth.callback.ConfirmationCallback; import javax.security.auth.callback.TextOutputCallback; import javax.security.auth.callback.UnsupportedCallbackException;
import java.io.*; import javax.security.auth.callback.*;
[ "java.io", "javax.security" ]
java.io; javax.security;
2,422,618
public void propertyChange(PropertyChangeEvent e) { String propertyName = e.getPropertyName(); if (e.getPropertyName().equals(Action.NAME)) { if (component instanceof JMenuItem) { String text = (String) e.getNewValue(); ((JMenuItem)...
void function(PropertyChangeEvent e) { String propertyName = e.getPropertyName(); if (e.getPropertyName().equals(Action.NAME)) { if (component instanceof JMenuItem) { String text = (String) e.getNewValue(); ((JMenuItem) component).setText(text); } } else if (propertyName.equals(STR)) { Boolean enabledState = (Boolean) ...
/** * Handles changes in the action. If the action name * changed we change our menu name. If the action changed * it's enabled state, we change our component's state. * * @param e property change event */
Handles changes in the action. If the action name changed we change our menu name. If the action changed it's enabled state, we change our component's state
propertyChange
{ "repo_name": "mbertacca/JSwat2", "path": "classes/com/bluemarsh/jswat/ui/graphical/MainWindow.java", "license": "gpl-2.0", "size": 26127 }
[ "java.awt.BorderLayout", "java.beans.PropertyChangeEvent", "javax.swing.Action", "javax.swing.JMenuItem" ]
import java.awt.BorderLayout; import java.beans.PropertyChangeEvent; import javax.swing.Action; import javax.swing.JMenuItem;
import java.awt.*; import java.beans.*; import javax.swing.*;
[ "java.awt", "java.beans", "javax.swing" ]
java.awt; java.beans; javax.swing;
1,261,857
private StreamStructure createStreamStructureAndBinding(StreamToken token) { StreamPayload payload = StreamPayload.newBuilder().setStreamToken(token).build(); mChildBindings.add(new PayloadWithId(token.getContentId(), payload)); return createStreamStructureFromToken(token); }
StreamStructure function(StreamToken token) { StreamPayload payload = StreamPayload.newBuilder().setStreamToken(token).build(); mChildBindings.add(new PayloadWithId(token.getContentId(), payload)); return createStreamStructureFromToken(token); }
/** * This has the side affect of populating {@code childBindings} with a {@code PayloadWithId}. */
This has the side affect of populating childBindings with a PayloadWithId
createStreamStructureAndBinding
{ "repo_name": "endlessm/chromium-browser", "path": "chrome/android/feed/core/javatests/src/org/chromium/chrome/browser/feed/library/feedmodelprovider/FeedModelProviderTest.java", "license": "bsd-3-clause", "size": 36630 }
[ "org.chromium.chrome.browser.feed.library.api.internal.common.PayloadWithId", "org.chromium.components.feed.core.proto.libraries.api.internal.StreamDataProto" ]
import org.chromium.chrome.browser.feed.library.api.internal.common.PayloadWithId; import org.chromium.components.feed.core.proto.libraries.api.internal.StreamDataProto;
import org.chromium.chrome.browser.feed.library.api.internal.common.*; import org.chromium.components.feed.core.proto.libraries.api.internal.*;
[ "org.chromium.chrome", "org.chromium.components" ]
org.chromium.chrome; org.chromium.components;
864,977
private void moveToFirst(List<ImageFormat> v, int format){ for(ImageFormat i : v) if(i.getIndex()==format){ v.remove(i); v.add(0, i); break; } }
void function(List<ImageFormat> v, int format){ for(ImageFormat i : v) if(i.getIndex()==format){ v.remove(i); v.add(0, i); break; } }
/** * This method moves the given image format <code>format</code> * in the first position of the vector. * @param v the vector if image format * @param format the index of the format to be moved in first position */
This method moves the given image format <code>format</code> in the first position of the vector
moveToFirst
{ "repo_name": "sarxos/v4l4j", "path": "src/main/java/au/edu/jcu/v4l4j/ImageFormatList.java", "license": "gpl-3.0", "size": 15660 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,242,791
@Test public void testMessagePrimaryActionCallback() { initializeDelegate(); mDelegate.showMessage(); PropertyModel message = mDelegate.getMessageForTesting(); message.get(MessageBannerProperties.ON_PRIMARY_ACTION).run(); Mockito.verify(mNativeMock).onPrimaryAction(mData...
void function() { initializeDelegate(); mDelegate.showMessage(); PropertyModel message = mDelegate.getMessageForTesting(); message.get(MessageBannerProperties.ON_PRIMARY_ACTION).run(); Mockito.verify(mNativeMock).onPrimaryAction(mData.isInstantAppDefault()); }
/** * Tests that the Instant Apps message primary action callback invokes the native method to * account for the primary action. */
Tests that the Instant Apps message primary action callback invokes the native method to account for the primary action
testMessagePrimaryActionCallback
{ "repo_name": "chromium/chromium", "path": "chrome/android/junit/src/org/chromium/chrome/browser/instantapps/InstantAppsMessageDelegateTest.java", "license": "bsd-3-clause", "size": 6372 }
[ "org.chromium.components.messages.MessageBannerProperties", "org.chromium.ui.modelutil.PropertyModel", "org.mockito.Mockito" ]
import org.chromium.components.messages.MessageBannerProperties; import org.chromium.ui.modelutil.PropertyModel; import org.mockito.Mockito;
import org.chromium.components.messages.*; import org.chromium.ui.modelutil.*; import org.mockito.*;
[ "org.chromium.components", "org.chromium.ui", "org.mockito" ]
org.chromium.components; org.chromium.ui; org.mockito;
1,852,561
public boolean tryReconnect(boolean forcedDisconnect, String reason, GemFireCacheImpl oldCache) { final boolean isDebugEnabled = logger.isDebugEnabled(); synchronized (CacheFactory.class) { // bug #51335 - deadlock with app thread trying to create a cache synchronized (GemFireCacheImpl.class) { ...
boolean function(boolean forcedDisconnect, String reason, GemFireCacheImpl oldCache) { final boolean isDebugEnabled = logger.isDebugEnabled(); synchronized (CacheFactory.class) { synchronized (GemFireCacheImpl.class) { synchronized (reconnectLock) { if (!forcedDisconnect && !oldCache.isClosed() && oldCache.getCachePerf...
/** * Tries to reconnect to the distributed system on role loss * if configure to reconnect. * * @param oldCache cache that has apparently failed * */
Tries to reconnect to the distributed system on role loss if configure to reconnect
tryReconnect
{ "repo_name": "ysung-pivotal/incubator-geode", "path": "gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java", "license": "apache-2.0", "size": 106595 }
[ "com.gemstone.gemfire.cache.CacheFactory", "com.gemstone.gemfire.internal.cache.GemFireCacheImpl" ]
import com.gemstone.gemfire.cache.CacheFactory; import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.cache.*; import com.gemstone.gemfire.internal.cache.*;
[ "com.gemstone.gemfire" ]
com.gemstone.gemfire;
258,881
public static String[] list() { if (NativeInterface.isSimulated()) { // as on the Raspberry Pi return new String[]{ "led0", "led1" }; } ArrayList<String> devs = new ArrayList<String>(); File dir = new File("/sys/class/leds"); File[] files = dir.listFiles(); if (files != null) { ...
static String[] function() { if (NativeInterface.isSimulated()) { return new String[]{ "led0", "led1" }; } ArrayList<String> devs = new ArrayList<String>(); File dir = new File(STR); File[] files = dir.listFiles(); if (files != null) { for (File file : files) { devs.add(file.getName()); } } String[] tmp = devs.toArray(...
/** * Lists all available LED devices * @return String array * @webref */
Lists all available LED devices
list
{ "repo_name": "sylviawan/oop_assignment1", "path": "Desktop/Processing.app/Contents/Java/modes/java/libraries/io/src/processing/io/LED.java", "license": "mit", "size": 5147 }
[ "java.io.File", "java.util.ArrayList", "java.util.Arrays" ]
import java.io.File; import java.util.ArrayList; import java.util.Arrays;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
326,197
public final StringArrayList trimAll() { StringArrayList sal = new StringArrayList(); Iterator<String> it = this.iterator(); while (it.hasNext()) { sal.add(it.next().trim()); } return sal; }
final StringArrayList function() { StringArrayList sal = new StringArrayList(); Iterator<String> it = this.iterator(); while (it.hasNext()) { sal.add(it.next().trim()); } return sal; }
/** * Trim all the strings in the list * * @return the new StringArrayList of trimmed strings. */
Trim all the strings in the list
trimAll
{ "repo_name": "jwoehr/Ubloid", "path": "AndroidStudioProject/ubloid/app/src/main/java/ublu/util/Generics.java", "license": "bsd-2-clause", "size": 40962 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
1,788,548
public ArrayList<String> doAccessibilityCheck() { String jsString = "return ((window.$A != null || window.$A !=undefined) && (!$A.util.isUndefinedOrNull($A.devToolService)))? " + "window.$A.devToolService.checkAccessibility() : \"Aura is not Present\""; String result = (String) getE...
ArrayList<String> function() { String jsString = STR + STRAura is not Present\STRSTRSTRTotal Number of Errors found: 0STR0STRTotal Number of Errors foundSTR1STR2"; } resultList.add(output); resultList.add(result); return resultList; }
/** * Method of exposing accessibility tool to be exposed for testing purposes * * @return ArrayList - either 0,1, or 2. Position 0: Indicates there were no errors Position 1: Indicates that there * were errors Position 2: Indicates that something unexpected happened. */
Method of exposing accessibility tool to be exposed for testing purposes
doAccessibilityCheck
{ "repo_name": "DebalinaDey/AuraDevelopDeb", "path": "aura/src/test/java/org/auraframework/test/util/AuraUITestingUtil.java", "license": "apache-2.0", "size": 38373 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
1,847,380
public static IResource resolveTargetResource(IResource resource) { if (!resource.isLinked()) { return resource; } IResource resolvedResource = getResource(resource.getLocation()); return resolvedResource != null ? resolvedResource : resource; }
static IResource function(IResource resource) { if (!resource.isLinked()) { return resource; } IResource resolvedResource = getResource(resource.getLocation()); return resolvedResource != null ? resolvedResource : resource; }
/** * Resolves a linked resource to its target resource, or returns the given * resource if it is not linked or the target resource cannot be resolved. */
Resolves a linked resource to its target resource, or returns the given resource if it is not linked or the target resource cannot be resolved
resolveTargetResource
{ "repo_name": "pruebasetichat/google-plugin-for-eclipse", "path": "plugins/com.google.gdt.eclipse.core/src/com/google/gdt/eclipse/core/ResourceUtils.java", "license": "epl-1.0", "size": 22384 }
[ "org.eclipse.core.resources.IResource" ]
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.*;
[ "org.eclipse.core" ]
org.eclipse.core;
2,320,071
void setProperty( Map<String, Object> context, Object target, Object name, Object value ) throws OgnlException;
void setProperty( Map<String, Object> context, Object target, Object name, Object value ) throws OgnlException;
/** * Sets the value of the property of the given name in the given target object. * * @param context The current execution context. * @param target the object to set the property in * @param name the name of the property to set * @param value the new value for the property. * @excep...
Sets the value of the property of the given name in the given target object
setProperty
{ "repo_name": "mohanaraosv/commons-ognl", "path": "src/main/java/org/apache/commons/ognl/PropertyAccessor.java", "license": "apache-2.0", "size": 4141 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,405,069
public static Object[] fetchAgendaEvent(Connection conn, String[] cidList, String viewdt1, String viewdt2, int limit, int offset, String loginid) throws ServiceException { Object[] jobj = new Object[2]; PreparedStatement calPS = null; java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat("y...
static Object[] function(Connection conn, String[] cidList, String viewdt1, String viewdt2, int limit, int offset, String loginid) throws ServiceException { Object[] jobj = new Object[2]; PreparedStatement calPS = null; java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat(STR); try { String para = new String...
/** * Fetches the events of the specific calendars in that time period for agenda view * @param conn connection object used for performing database operations * @param cid array of calendar ids' * @param viewdt1 start date from when to fetch the events * @param viewdt2 end date till when to fet...
Fetches the events of the specific calendars in that time period for agenda view
fetchAgendaEvent
{ "repo_name": "agilee/Deskera-Project-Management", "path": "src/java/com/krawler/esp/handlers/calEvent.java", "license": "gpl-3.0", "size": 57726 }
[ "com.krawler.common.service.ServiceException", "com.krawler.database.DbPool", "com.krawler.utils.json.base.JSONObject", "java.sql.PreparedStatement", "java.sql.ResultSet", "java.text.SimpleDateFormat" ]
import com.krawler.common.service.ServiceException; import com.krawler.database.DbPool; import com.krawler.utils.json.base.JSONObject; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.text.SimpleDateFormat;
import com.krawler.common.service.*; import com.krawler.database.*; import com.krawler.utils.json.base.*; import java.sql.*; import java.text.*;
[ "com.krawler.common", "com.krawler.database", "com.krawler.utils", "java.sql", "java.text" ]
com.krawler.common; com.krawler.database; com.krawler.utils; java.sql; java.text;
593,591
protected void processMisReplicatedBlocks() { writeLock(); try { if (this.initializedReplQueues) { return; } String logPrefix = "Processing mis-replicated blocks: "; long nrInvalid = 0; // clear queues neededReplications.clear(); overReplicatedBlocks.cl...
void function() { writeLock(); try { if (this.initializedReplQueues) { return; } String logPrefix = STR; long nrInvalid = 0; neededReplications.clear(); overReplicatedBlocks.clear(); raidEncodingTasks.clear(); int totalBlocks = blocksMap.size(); setupInitialBlockReportExecutor(true); if (totalBlocks == 0) { setInitiali...
/** * For each block in the name-node verify whether it belongs to any file, * over or under replicated. Place it into the respective queue. */
For each block in the name-node verify whether it belongs to any file, over or under replicated. Place it into the respective queue
processMisReplicatedBlocks
{ "repo_name": "nvoron23/hadoop-20", "path": "src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java", "license": "apache-2.0", "size": 358914 }
[ "java.util.ArrayList", "java.util.Iterator", "java.util.List", "java.util.concurrent.atomic.AtomicLong", "org.apache.hadoop.hdfs.server.namenode.BlocksMap" ]
import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.concurrent.atomic.AtomicLong; import org.apache.hadoop.hdfs.server.namenode.BlocksMap;
import java.util.*; import java.util.concurrent.atomic.*; import org.apache.hadoop.hdfs.server.namenode.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
2,538,015
public void addBPSProfile(BPSProfileDTO bpsProfileDTO) throws RemoteException, WorkflowAdminServiceWorkflowException { stub.addBPSProfile(bpsProfileDTO); }
void function(BPSProfileDTO bpsProfileDTO) throws RemoteException, WorkflowAdminServiceWorkflowException { stub.addBPSProfile(bpsProfileDTO); }
/** * Add new BPS profile * * @param bpsProfileDTO * @throws RemoteException * @throws WorkflowAdminServiceWorkflowException */
Add new BPS profile
addBPSProfile
{ "repo_name": "jacklotusho/carbon-identity", "path": "components/workflow-mgt/org.wso2.carbon.identity.workflow.mgt.ui/src/main/java/org/wso2/carbon/identity/workflow/mgt/ui/WorkflowAdminServiceClient.java", "license": "apache-2.0", "size": 10768 }
[ "java.rmi.RemoteException", "org.wso2.carbon.identity.workflow.mgt.stub.WorkflowAdminServiceWorkflowException", "org.wso2.carbon.identity.workflow.mgt.stub.bean.BPSProfileDTO" ]
import java.rmi.RemoteException; import org.wso2.carbon.identity.workflow.mgt.stub.WorkflowAdminServiceWorkflowException; import org.wso2.carbon.identity.workflow.mgt.stub.bean.BPSProfileDTO;
import java.rmi.*; import org.wso2.carbon.identity.workflow.mgt.stub.*; import org.wso2.carbon.identity.workflow.mgt.stub.bean.*;
[ "java.rmi", "org.wso2.carbon" ]
java.rmi; org.wso2.carbon;
2,761,194
@Test(dependsOnMethods = {"testSiddhiAPPBackupWithInvalidMethod"}) public void testValidSiddhiAPPRestoreToLastRevision() throws Exception { URI baseURI = URI.create(String.format("http://%s:%d", "localhost", 9090)); String path = "/siddhi-apps/SiddhiApp1/restore"; String method = "POST"...
@Test(dependsOnMethods = {STR}) void function() throws Exception { URI baseURI = URI.create(String.format(STR/siddhi-apps/SiddhiApp1/restoreSTRPOSTSTRtext/plainSTRRestoring the snapshot (last revision) of a Siddhi App that exists in server through REST APISTR", baseURI, path, contentType, method, true, DEFAULT_USER_NAM...
/** * Siddhi App state restore related test cases */
Siddhi App state restore related test cases
testValidSiddhiAPPRestoreToLastRevision
{ "repo_name": "erangatl/carbon-analytics", "path": "components/streaming-integrator-osgi-tests/src/test/java/org/wso2/carbon/analytics/test/osgi/SiddhiAsAPITestcase.java", "license": "apache-2.0", "size": 34959 }
[ "java.net.URI", "org.testng.Assert", "org.testng.annotations.Test" ]
import java.net.URI; import org.testng.Assert; import org.testng.annotations.Test;
import java.net.*; import org.testng.*; import org.testng.annotations.*;
[ "java.net", "org.testng", "org.testng.annotations" ]
java.net; org.testng; org.testng.annotations;
2,900,869
public static DatabaseDataSource getDatabaseConnection( Connection conn, SQLDataHandler handler) throws SQLException { return new DatabaseDataSource(conn, handler); }
static DatabaseDataSource function( Connection conn, SQLDataHandler handler) throws SQLException { return new DatabaseDataSource(conn, handler); }
/** * Get a new database connection. * @param conn the Connection object to the database * @param handler the data handler to use * @return a DatabaseDataSource for interacting with the database * @throws SQLException if an SQL error occurs */
Get a new database connection
getDatabaseConnection
{ "repo_name": "giacomovagni/Prefuse", "path": "src/prefuse/data/io/sql/ConnectionFactory.java", "license": "bsd-3-clause", "size": 6090 }
[ "java.sql.Connection", "java.sql.SQLException" ]
import java.sql.Connection; import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,733,432
ThingHandler getHandler();
ThingHandler getHandler();
/** * Gets the handler. * * @return the handler (can be null) */
Gets the handler
getHandler
{ "repo_name": "Mixajlo/smarthome", "path": "bundles/core/org.eclipse.smarthome.core.thing/src/main/java/org/eclipse/smarthome/core/thing/Thing.java", "license": "epl-1.0", "size": 5543 }
[ "org.eclipse.smarthome.core.thing.binding.ThingHandler" ]
import org.eclipse.smarthome.core.thing.binding.ThingHandler;
import org.eclipse.smarthome.core.thing.binding.*;
[ "org.eclipse.smarthome" ]
org.eclipse.smarthome;
1,975,706
public DateMidnight getDateMidnight();
DateMidnight function();
/** * Retrieve the system time as a Joda DateMidnight object. * * @return - DateMidnight - a Joda DateMidnight object that contains the system time. */
Retrieve the system time as a Joda DateMidnight object
getDateMidnight
{ "repo_name": "yuweijun/learning-programming", "path": "java-libs/src/main/java/com/example/lib/joda/SystemClock.java", "license": "mit", "size": 2034 }
[ "org.joda.time.DateMidnight" ]
import org.joda.time.DateMidnight;
import org.joda.time.*;
[ "org.joda.time" ]
org.joda.time;
1,975,614
protected void readDesign(Element tableSectionElement, DesignContext designContext) throws DesignException { while (!rows.isEmpty()) { removeRow(0); } for (Element row : tableSectionElement.children()) { if (!row.tagName().equa...
void function(Element tableSectionElement, DesignContext designContext) throws DesignException { while (!rows.isEmpty()) { removeRow(0); } for (Element row : tableSectionElement.children()) { if (!row.tagName().equals("tr")) { throw new DesignException(STR + tableSectionElement.tagName() + STR + row.tagName()); } appen...
/** * Writes the declarative design from the given table section element. * * @since 7.5.0 * @param tableSectionElement * Element to read design from * @param designContext * the design context * @throws DesignException ...
Writes the declarative design from the given table section element
readDesign
{ "repo_name": "mstahv/framework", "path": "compatibility-server/src/main/java/com/vaadin/v7/ui/Grid.java", "license": "apache-2.0", "size": 273176 }
[ "com.vaadin.ui.declarative.DesignContext", "com.vaadin.ui.declarative.DesignException", "com.vaadin.v7.shared.ui.grid.GridStaticSectionState", "org.jsoup.nodes.Element" ]
import com.vaadin.ui.declarative.DesignContext; import com.vaadin.ui.declarative.DesignException; import com.vaadin.v7.shared.ui.grid.GridStaticSectionState; import org.jsoup.nodes.Element;
import com.vaadin.ui.declarative.*; import com.vaadin.v7.shared.ui.grid.*; import org.jsoup.nodes.*;
[ "com.vaadin.ui", "com.vaadin.v7", "org.jsoup.nodes" ]
com.vaadin.ui; com.vaadin.v7; org.jsoup.nodes;
19,837
Iterable<Artifact> discoverInputs( Action action, MetadataProvider metadataProvider, MetadataHandler metadataHandler, ProgressEventBehavior progressEventBehavior, Environment env, @Nullable FileSystem actionFileSystem) throws ActionExecutionException, InterruptedException, IO...
Iterable<Artifact> discoverInputs( Action action, MetadataProvider metadataProvider, MetadataHandler metadataHandler, ProgressEventBehavior progressEventBehavior, Environment env, @Nullable FileSystem actionFileSystem) throws ActionExecutionException, InterruptedException, IOException { ActionExecutionContext actionExe...
/** * Perform dependency discovery for action, which must discover its inputs. * * <p>This method is just a wrapper around {@link Action#discoverInputs} that properly processes * any ActionExecutionException thrown before rethrowing it to the caller. */
Perform dependency discovery for action, which must discover its inputs. This method is just a wrapper around <code>Action#discoverInputs</code> that properly processes any ActionExecutionException thrown before rethrowing it to the caller
discoverInputs
{ "repo_name": "aehlig/bazel", "path": "src/main/java/com/google/devtools/build/lib/skyframe/SkyframeActionExecutor.java", "license": "apache-2.0", "size": 72050 }
[ "com.google.devtools.build.lib.actions.Action", "com.google.devtools.build.lib.actions.ActionExecutedEvent", "com.google.devtools.build.lib.actions.ActionExecutionContext", "com.google.devtools.build.lib.actions.ActionExecutionException", "com.google.devtools.build.lib.actions.Artifact", "com.google.devto...
import com.google.devtools.build.lib.actions.Action; import com.google.devtools.build.lib.actions.ActionExecutedEvent; import com.google.devtools.build.lib.actions.ActionExecutionContext; import com.google.devtools.build.lib.actions.ActionExecutionException; import com.google.devtools.build.lib.actions.Artifact; import...
import com.google.devtools.build.lib.actions.*; import com.google.devtools.build.lib.actions.cache.*; import com.google.devtools.build.lib.vfs.*; import com.google.devtools.build.skyframe.*; import java.io.*; import javax.annotation.*;
[ "com.google.devtools", "java.io", "javax.annotation" ]
com.google.devtools; java.io; javax.annotation;
913,194
@Test public void testOrganizedOperandsSingleCondnEvalMultipleGreaterThanInEqualities_AND() { LogWriter logger = CacheUtils.getCache().getLogger(); try { CompiledComparison cv[] = null; ExecutionContext context = new QueryExecutionContext(null, CacheUtils.getCache()); this.bindIteratorsAnd...
void function() { LogWriter logger = CacheUtils.getCache().getLogger(); try { CompiledComparison cv[] = null; ExecutionContext context = new QueryExecutionContext(null, CacheUtils.getCache()); this.bindIteratorsAndCreateIndex(context); cv = new CompiledComparison[4]; cv[0] = new CompiledComparison(new CompiledPath(new ...
/** * Tests the functionality of organizedOperands function of a RangeJunction for various * combinations of GREATER THAN and Not equal conditions etc which results in a * SingleCondnEvaluator or CompiledComparison for a AND junction. It checks the correctness of the * operator & the evaluated key * *...
Tests the functionality of organizedOperands function of a RangeJunction for various combinations of GREATER THAN and Not equal conditions etc which results in a SingleCondnEvaluator or CompiledComparison for a AND junction. It checks the correctness of the operator & the evaluated key
testOrganizedOperandsSingleCondnEvalMultipleGreaterThanInEqualities_AND
{ "repo_name": "smgoller/geode", "path": "geode-core/src/integrationTest/java/org/apache/geode/cache/query/internal/CompiledJunctionInternalsJUnitTest.java", "license": "apache-2.0", "size": 163306 }
[ "java.util.Iterator", "org.apache.geode.LogWriter", "org.apache.geode.cache.query.CacheUtils", "org.apache.geode.cache.query.internal.parse.OQLLexerTokenTypes", "org.junit.Assert" ]
import java.util.Iterator; import org.apache.geode.LogWriter; import org.apache.geode.cache.query.CacheUtils; import org.apache.geode.cache.query.internal.parse.OQLLexerTokenTypes; import org.junit.Assert;
import java.util.*; import org.apache.geode.*; import org.apache.geode.cache.query.*; import org.apache.geode.cache.query.internal.parse.*; import org.junit.*;
[ "java.util", "org.apache.geode", "org.junit" ]
java.util; org.apache.geode; org.junit;
1,010,326
@Test public void getSurveyResponsesWhenSinceAndNextPageWithLastPageSingleResponse() throws Exception { int surveyId = 1; String sinceString = "2014-06-28T21:24:59Z"; Date sinceDate = new ApiDateTimeFormatter().parse(sinceString); String expectedTemplateRequestUrl = this.apiClient.getApiServiceBaseU...
void function() throws Exception { int surveyId = 1; String sinceString = STR; Date sinceDate = new ApiDateTimeFormatter().parse(sinceString); String expectedTemplateRequestUrl = this.apiClient.getApiServiceBaseUri() + SurveyResponsesResource.RELATIVE_URI_TEMPLATE + STR + sinceString + STR; String expectedRequestUrl = ...
/** * Tests {@link SpringApiClientImpl#getSurveyResponses} when the request is for the next page of responses since a * specified date/time, and the response is the last page containing a single response. * * @throws Exception If an unexpected error occurs. */
Tests <code>SpringApiClientImpl#getSurveyResponses</code> when the request is for the next page of responses since a specified date/time, and the response is the last page containing a single response
getSurveyResponsesWhenSinceAndNextPageWithLastPageSingleResponse
{ "repo_name": "neiljbrown/brighttalk-channel-reporting-api-client", "path": "src/test/java/com/neiljbrown/brighttalk/channels/reportingapi/client/spring/SpringApiClientImplIntegrationTest.java", "license": "apache-2.0", "size": 84306 }
[ "com.neiljbrown.brighttalk.channels.reportingapi.client.PageCriteria", "com.neiljbrown.brighttalk.channels.reportingapi.client.common.ApiDateTimeFormatter", "com.neiljbrown.brighttalk.channels.reportingapi.client.resource.SurveyResponseResource", "com.neiljbrown.brighttalk.channels.reportingapi.client.resourc...
import com.neiljbrown.brighttalk.channels.reportingapi.client.PageCriteria; import com.neiljbrown.brighttalk.channels.reportingapi.client.common.ApiDateTimeFormatter; import com.neiljbrown.brighttalk.channels.reportingapi.client.resource.SurveyResponseResource; import com.neiljbrown.brighttalk.channels.reportingapi.cli...
import com.neiljbrown.brighttalk.channels.reportingapi.client.*; import com.neiljbrown.brighttalk.channels.reportingapi.client.common.*; import com.neiljbrown.brighttalk.channels.reportingapi.client.resource.*; import java.util.*; import org.hamcrest.*; import org.hamcrest.collection.*; import org.junit.*; import org.s...
[ "com.neiljbrown.brighttalk", "java.util", "org.hamcrest", "org.hamcrest.collection", "org.junit", "org.springframework.core", "org.springframework.http", "org.springframework.test", "org.springframework.web" ]
com.neiljbrown.brighttalk; java.util; org.hamcrest; org.hamcrest.collection; org.junit; org.springframework.core; org.springframework.http; org.springframework.test; org.springframework.web;
1,621,344
void position(P offset) throws IOException;
void position(P offset) throws IOException;
/** * <p>Move the internal data pointer to some offset.<p> * * <p>The offset should always be one returned by {@link #position() }, e * because this interface does not define what the value represents. It could * be an array index, or it could be byte offset in a file. * * @param offs...
Move the internal data pointer to some offset. The offset should always be one returned by <code>#position() </code>, e because this interface does not define what the value represents. It could be an array index, or it could be byte offset in a file
position
{ "repo_name": "MLCL/MLCLLib", "path": "src/main/java/uk/ac/susx/mlcl/lib/io/Seekable.java", "license": "bsd-3-clause", "size": 3224 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,686,621